commit c70b67b33e96f4a4a27bdae38c24f52f478dbb67 Author: Luke Hagar Date: Tue Nov 19 21:24:42 2024 -0600 Saving initial generation diff --git a/.devcontainer/README.md b/.devcontainer/README.md new file mode 100644 index 0000000..3265703 --- /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 https://raw.githubusercontent.com/coollabsio/documentation-coolify/refs/heads/main/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 https://raw.githubusercontent.com/coollabsio/documentation-coolify/refs/heads/main/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..3c35027 --- /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 +npm install -g ts-node +npm link +npm link coolify +TS_CONFIG_CONTENT=$(cat < samples/tsconfig.json + +# Generate starter usage sample with speakeasy +speakeasy generate usage -s https://raw.githubusercontent.com/coollabsio/documentation-coolify/refs/heads/main/openapi.yaml -l typescript -o samples/root.ts \ No newline at end of file diff --git a/.eslintrc.cjs b/.eslintrc.cjs new file mode 100644 index 0000000..4d160bd --- /dev/null +++ b/.eslintrc.cjs @@ -0,0 +1,28 @@ +/* eslint-env node */ +module.exports = { + root: true, + extends: [ + "eslint:recommended", + "plugin:@typescript-eslint/recommended", + "plugin:import/recommended", + "plugin:import/typescript", + ], + parser: "@typescript-eslint/parser", + plugins: ["@typescript-eslint"], + settings: { + "import/resolver": { + typescript: true, + node: true, + }, + }, + rules: { + // Handled by typescript compiler + "@typescript-eslint/no-unused-vars": "off", + "@typescript-eslint/ban-types": "off", + "@typescript-eslint/no-namespace": "off", + "@typescript-eslint/no-explicit-any": "off", + "import/no-named-as-default-member": "off", + + "import/no-default-export": "error", + }, +}; 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..ea906f8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,17 @@ +/models +/models/errors +/types +/node_modules +/lib +/sdk +/funcs +/hooks +/index.* +/core.* +/cjs +/esm +/dist +/.tsbuildinfo +/.tshy +/.tshy-* +/__tests__ diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..06cd8ab --- /dev/null +++ b/.npmignore @@ -0,0 +1,10 @@ +**/* +!/**/*.ts +!/**/*.js +!/**/*.map + +/.eslintrc.js +/cjs +/.tshy +/.tshy-* +/__tests__ diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock new file mode 100644 index 0000000..0316b7a --- /dev/null +++ b/.speakeasy/gen.lock @@ -0,0 +1,1804 @@ +lockVersion: 2.0.0 +id: a63855c2-e359-4ae7-8bde-837eae0e2b3a +management: + docChecksum: 68b6dd3e364a684fb03c348294f547d8 + docVersion: "0.1" + speakeasyVersion: 1.441.0 + generationVersion: 2.460.1 + releaseVersion: 0.1.1 + configChecksum: e70476ee292de24497eb91315ba72640 + installationURL: https://github.com/LukeHagar/Coolify-TypeScript-SDK +features: + typescript: + additionalDependencies: 0.1.0 + additionalProperties: 0.1.1 + constsAndDefaults: 0.1.11 + core: 3.18.5 + defaultEnabledRetries: 0.1.0 + devContainers: 2.90.0 + enumUnions: 0.1.0 + envVarSecurityUsage: 0.1.2 + globalSecurity: 2.82.11 + globalSecurityCallbacks: 0.1.0 + globalSecurityFlattening: 0.1.0 + globalServerURLs: 2.82.4 + groups: 2.81.2 + nameOverrides: 2.81.2 + nullables: 0.1.0 + responseFormat: 0.2.3 + retries: 2.83.0 + sdkHooks: 0.2.0 + tests: 0.7.0 +generatedFiles: + - .devcontainer/README.md + - .devcontainer/devcontainer.json + - .devcontainer/setup.sh + - .eslintrc.cjs + - .gitattributes + - .npmignore + - CONTRIBUTING.md + - FUNCTIONS.md + - RUNTIMES.md + - USAGE.md + - docs/lib/utils/retryconfig.md + - docs/models/components/application.md + - docs/models/components/applicationdeploymentqueue.md + - docs/models/components/buildpack.md + - docs/models/components/environment.md + - docs/models/components/environmentvariable.md + - docs/models/components/privatekey.md + - docs/models/components/project.md + - docs/models/components/proxy.md + - docs/models/components/proxytype.md + - docs/models/components/redirect.md + - docs/models/components/security.md + - docs/models/components/server.md + - docs/models/components/service.md + - docs/models/components/team.md + - docs/models/components/user.md + - docs/models/errors/badrequest.md + - docs/models/errors/disableapiresponsebody.md + - docs/models/errors/enableapiresponsebody.md + - docs/models/errors/internalservererror.md + - docs/models/errors/notfound.md + - docs/models/errors/ratelimited.md + - docs/models/errors/timeout.md + - docs/models/errors/unauthenticated.md + - docs/models/operations/buildpack.md + - docs/models/operations/createdatabaseclickhouserequestbody.md + - docs/models/operations/createdatabasedragonflyrequestbody.md + - docs/models/operations/createdatabasekeydbrequestbody.md + - docs/models/operations/createdatabasemariadbrequestbody.md + - docs/models/operations/createdatabasemongodbrequestbody.md + - docs/models/operations/createdatabasemysqlrequestbody.md + - docs/models/operations/createdatabasepostgresqlrequestbody.md + - docs/models/operations/createdatabaseredisrequestbody.md + - docs/models/operations/createdockercomposeapplicationrequestbody.md + - docs/models/operations/createdockerfileapplicationbuildpack.md + - docs/models/operations/createdockerfileapplicationredirect.md + - docs/models/operations/createdockerfileapplicationrequestbody.md + - docs/models/operations/createdockerimageapplicationredirect.md + - docs/models/operations/createdockerimageapplicationrequestbody.md + - docs/models/operations/createenvbyapplicationuuidrequest.md + - docs/models/operations/createenvbyapplicationuuidrequestbody.md + - docs/models/operations/createenvbyapplicationuuidresponsebody.md + - docs/models/operations/createenvbyserviceuuidrequest.md + - docs/models/operations/createenvbyserviceuuidrequestbody.md + - docs/models/operations/createenvbyserviceuuidresponsebody.md + - docs/models/operations/createprivatedeploykeyapplicationbuildpack.md + - docs/models/operations/createprivatedeploykeyapplicationredirect.md + - docs/models/operations/createprivatedeploykeyapplicationrequestbody.md + - docs/models/operations/createprivatedeploykeyapplicationstaticimage.md + - docs/models/operations/createprivategithubappapplicationbuildpack.md + - docs/models/operations/createprivategithubappapplicationredirect.md + - docs/models/operations/createprivategithubappapplicationrequestbody.md + - docs/models/operations/createprivategithubappapplicationstaticimage.md + - docs/models/operations/createprivatekeyrequestbody.md + - docs/models/operations/createprivatekeyresponsebody.md + - docs/models/operations/createprojectrequestbody.md + - docs/models/operations/createprojectresponsebody.md + - docs/models/operations/createpublicapplicationrequestbody.md + - docs/models/operations/createserverrequestbody.md + - docs/models/operations/createserverresponsebody.md + - docs/models/operations/createservicerequestbody.md + - docs/models/operations/createserviceresponsebody.md + - docs/models/operations/data.md + - docs/models/operations/deleteapplicationbyuuidrequest.md + - docs/models/operations/deleteapplicationbyuuidresponsebody.md + - docs/models/operations/deletedatabasebyuuidrequest.md + - docs/models/operations/deletedatabasebyuuidresponsebody.md + - docs/models/operations/deleteenvbyapplicationuuidrequest.md + - docs/models/operations/deleteenvbyapplicationuuidresponsebody.md + - docs/models/operations/deleteenvbyserviceuuidrequest.md + - docs/models/operations/deleteenvbyserviceuuidresponsebody.md + - docs/models/operations/deleteprivatekeybyuuidrequest.md + - docs/models/operations/deleteprivatekeybyuuidresponsebody.md + - docs/models/operations/deleteprojectbyuuidrequest.md + - docs/models/operations/deleteprojectbyuuidresponsebody.md + - docs/models/operations/deleteserverbyuuidrequest.md + - docs/models/operations/deleteserverbyuuidresponsebody.md + - docs/models/operations/deleteservicebyuuidrequest.md + - docs/models/operations/deleteservicebyuuidresponsebody.md + - docs/models/operations/deploybytagoruuidrequest.md + - docs/models/operations/deploybytagoruuidresponsebody.md + - docs/models/operations/deployments.md + - docs/models/operations/disableapiresponsebody.md + - docs/models/operations/enableapiresponsebody.md + - docs/models/operations/executecommandapplicationrequest.md + - docs/models/operations/executecommandapplicationrequestbody.md + - docs/models/operations/executecommandapplicationresponsebody.md + - docs/models/operations/getapplicationbyuuidrequest.md + - docs/models/operations/getdatabasebyuuidrequest.md + - docs/models/operations/getdeploymentbyuuidrequest.md + - docs/models/operations/getdomainsbyserveruuidrequest.md + - docs/models/operations/getdomainsbyserveruuidresponsebody.md + - docs/models/operations/getenvironmentbynamerequest.md + - docs/models/operations/getmembersbyteamidrequest.md + - docs/models/operations/getprivatekeybyuuidrequest.md + - docs/models/operations/getprojectbyuuidrequest.md + - docs/models/operations/getresourcesbyserveruuidrequest.md + - docs/models/operations/getserverbyuuidrequest.md + - docs/models/operations/getservicebyuuidrequest.md + - docs/models/operations/getteambyidrequest.md + - docs/models/operations/listenvsbyapplicationuuidrequest.md + - docs/models/operations/listenvsbyserviceuuidrequest.md + - docs/models/operations/proxytype.md + - docs/models/operations/redirect.md + - docs/models/operations/responsebody.md + - docs/models/operations/restartapplicationbyuuidrequest.md + - docs/models/operations/restartapplicationbyuuidresponsebody.md + - docs/models/operations/restartdatabasebyuuidrequest.md + - docs/models/operations/restartdatabasebyuuidresponsebody.md + - docs/models/operations/restartservicebyuuidrequest.md + - docs/models/operations/restartservicebyuuidresponsebody.md + - docs/models/operations/startapplicationbyuuidrequest.md + - docs/models/operations/startapplicationbyuuidresponsebody.md + - docs/models/operations/startdatabasebyuuidrequest.md + - docs/models/operations/startdatabasebyuuidresponsebody.md + - docs/models/operations/startservicebyuuidrequest.md + - docs/models/operations/startservicebyuuidresponsebody.md + - docs/models/operations/staticimage.md + - docs/models/operations/stopapplicationbyuuidrequest.md + - docs/models/operations/stopapplicationbyuuidresponsebody.md + - docs/models/operations/stopdatabasebyuuidrequest.md + - docs/models/operations/stopdatabasebyuuidresponsebody.md + - docs/models/operations/stopservicebyuuidrequest.md + - docs/models/operations/stopservicebyuuidresponsebody.md + - docs/models/operations/type.md + - docs/models/operations/updateapplicationbyuuidbuildpack.md + - docs/models/operations/updateapplicationbyuuidredirect.md + - docs/models/operations/updateapplicationbyuuidrequest.md + - docs/models/operations/updateapplicationbyuuidrequestbody.md + - docs/models/operations/updateapplicationbyuuidresponsebody.md + - docs/models/operations/updatedatabasebyuuidrequest.md + - docs/models/operations/updatedatabasebyuuidrequestbody.md + - docs/models/operations/updateenvbyapplicationuuidrequest.md + - docs/models/operations/updateenvbyapplicationuuidrequestbody.md + - docs/models/operations/updateenvbyapplicationuuidresponsebody.md + - docs/models/operations/updateenvbyserviceuuidrequest.md + - docs/models/operations/updateenvbyserviceuuidrequestbody.md + - docs/models/operations/updateenvbyserviceuuidresponsebody.md + - docs/models/operations/updateenvsbyapplicationuuidrequest.md + - docs/models/operations/updateenvsbyapplicationuuidrequestbody.md + - docs/models/operations/updateenvsbyapplicationuuidresponsebody.md + - docs/models/operations/updateenvsbyserviceuuiddata.md + - docs/models/operations/updateenvsbyserviceuuidrequest.md + - docs/models/operations/updateenvsbyserviceuuidrequestbody.md + - docs/models/operations/updateenvsbyserviceuuidresponsebody.md + - docs/models/operations/updateprivatekeyrequestbody.md + - docs/models/operations/updateprivatekeyresponsebody.md + - docs/models/operations/updateprojectbyuuidrequest.md + - docs/models/operations/updateprojectbyuuidrequestbody.md + - docs/models/operations/updateprojectbyuuidresponsebody.md + - docs/models/operations/updateserverbyuuidproxytype.md + - docs/models/operations/updateserverbyuuidrequest.md + - docs/models/operations/updateserverbyuuidrequestbody.md + - docs/models/operations/validateserverbyuuidrequest.md + - docs/models/operations/validateserverbyuuidresponsebody.md + - docs/sdks/api/README.md + - docs/sdks/applications/README.md + - docs/sdks/coolify/README.md + - docs/sdks/databases/README.md + - docs/sdks/deployments/README.md + - docs/sdks/health/README.md + - docs/sdks/privatekeys/README.md + - docs/sdks/projects/README.md + - docs/sdks/resources/README.md + - docs/sdks/servers/README.md + - docs/sdks/services/README.md + - docs/sdks/teams/README.md + - docs/sdks/version/README.md + - jsr.json + - package.json + - src/core.ts + - src/funcs/apiDisable.ts + - src/funcs/apiEnable.ts + - src/funcs/applicationsCreateDockerCompose.ts + - src/funcs/applicationsCreateDockerImage.ts + - src/funcs/applicationsCreateDockerfile.ts + - src/funcs/applicationsCreateEnv.ts + - src/funcs/applicationsCreatePrivateDeployKey.ts + - src/funcs/applicationsCreatePrivateGithubApp.ts + - src/funcs/applicationsCreatePublic.ts + - src/funcs/applicationsDelete.ts + - src/funcs/applicationsDeleteEnv.ts + - src/funcs/applicationsExecuteCommand.ts + - src/funcs/applicationsGet.ts + - src/funcs/applicationsList.ts + - src/funcs/applicationsListEnvs.ts + - src/funcs/applicationsRestart.ts + - src/funcs/applicationsStart.ts + - src/funcs/applicationsStop.ts + - src/funcs/applicationsUpdate.ts + - src/funcs/applicationsUpdateEnv.ts + - src/funcs/applicationsUpdateEnvsBulk.ts + - src/funcs/databasesCreateClickhouse.ts + - src/funcs/databasesCreateDragonfly.ts + - src/funcs/databasesCreateKeydb.ts + - src/funcs/databasesCreateMariadb.ts + - src/funcs/databasesCreateMongodb.ts + - src/funcs/databasesCreateMysql.ts + - src/funcs/databasesCreatePostgresql.ts + - src/funcs/databasesCreateRedis.ts + - src/funcs/databasesDelete.ts + - src/funcs/databasesGet.ts + - src/funcs/databasesList.ts + - src/funcs/databasesRestart.ts + - src/funcs/databasesStart.ts + - src/funcs/databasesStop.ts + - src/funcs/databasesUpdate.ts + - src/funcs/deploymentsDeployByTagOrUuid.ts + - src/funcs/deploymentsGet.ts + - src/funcs/deploymentsList.ts + - src/funcs/healthCheck.ts + - src/funcs/privateKeysCreate.ts + - src/funcs/privateKeysDelete.ts + - src/funcs/privateKeysGet.ts + - src/funcs/privateKeysList.ts + - src/funcs/privateKeysUpdate.ts + - src/funcs/projectsCreate.ts + - src/funcs/projectsDelete.ts + - src/funcs/projectsGet.ts + - src/funcs/projectsGetEnvironment.ts + - src/funcs/projectsList.ts + - src/funcs/projectsUpdate.ts + - src/funcs/resourcesList.ts + - src/funcs/serversCreate.ts + - src/funcs/serversDelete.ts + - src/funcs/serversGet.ts + - src/funcs/serversGetDomains.ts + - src/funcs/serversGetResources.ts + - src/funcs/serversList.ts + - src/funcs/serversUpdate.ts + - src/funcs/serversValidate.ts + - src/funcs/servicesCreate.ts + - src/funcs/servicesCreateEnv.ts + - src/funcs/servicesDelete.ts + - src/funcs/servicesDeleteEnv.ts + - src/funcs/servicesGet.ts + - src/funcs/servicesList.ts + - src/funcs/servicesListEnvs.ts + - src/funcs/servicesRestart.ts + - src/funcs/servicesStart.ts + - src/funcs/servicesStop.ts + - src/funcs/servicesUpdateEnv.ts + - src/funcs/servicesUpdateEnvsBulk.ts + - src/funcs/teamsGet.ts + - src/funcs/teamsGetCurrent.ts + - src/funcs/teamsGetCurrentMembers.ts + - src/funcs/teamsGetMembers.ts + - src/funcs/teamsList.ts + - src/funcs/versionGet.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/components/application.ts + - src/models/components/applicationdeploymentqueue.ts + - src/models/components/environment.ts + - src/models/components/environmentvariable.ts + - src/models/components/index.ts + - src/models/components/privatekey.ts + - src/models/components/project.ts + - src/models/components/security.ts + - src/models/components/server.ts + - src/models/components/service.ts + - src/models/components/team.ts + - src/models/components/user.ts + - src/models/errors/apierror.ts + - src/models/errors/badrequest.ts + - src/models/errors/disableapi.ts + - src/models/errors/enableapi.ts + - src/models/errors/httpclienterrors.ts + - src/models/errors/index.ts + - src/models/errors/internalservererror.ts + - src/models/errors/notfound.ts + - src/models/errors/ratelimited.ts + - src/models/errors/sdkvalidationerror.ts + - src/models/errors/timeout.ts + - src/models/errors/unauthenticated.ts + - src/models/operations/createdatabaseclickhouse.ts + - src/models/operations/createdatabasedragonfly.ts + - src/models/operations/createdatabasekeydb.ts + - src/models/operations/createdatabasemariadb.ts + - src/models/operations/createdatabasemongodb.ts + - src/models/operations/createdatabasemysql.ts + - src/models/operations/createdatabasepostgresql.ts + - src/models/operations/createdatabaseredis.ts + - src/models/operations/createdockercomposeapplication.ts + - src/models/operations/createdockerfileapplication.ts + - src/models/operations/createdockerimageapplication.ts + - src/models/operations/createenvbyapplicationuuid.ts + - src/models/operations/createenvbyserviceuuid.ts + - src/models/operations/createprivatedeploykeyapplication.ts + - src/models/operations/createprivategithubappapplication.ts + - src/models/operations/createprivatekey.ts + - src/models/operations/createproject.ts + - src/models/operations/createpublicapplication.ts + - src/models/operations/createserver.ts + - src/models/operations/createservice.ts + - src/models/operations/deleteapplicationbyuuid.ts + - src/models/operations/deletedatabasebyuuid.ts + - src/models/operations/deleteenvbyapplicationuuid.ts + - src/models/operations/deleteenvbyserviceuuid.ts + - src/models/operations/deleteprivatekeybyuuid.ts + - src/models/operations/deleteprojectbyuuid.ts + - src/models/operations/deleteserverbyuuid.ts + - src/models/operations/deleteservicebyuuid.ts + - src/models/operations/deploybytagoruuid.ts + - src/models/operations/disableapi.ts + - src/models/operations/enableapi.ts + - src/models/operations/executecommandapplication.ts + - src/models/operations/getapplicationbyuuid.ts + - src/models/operations/getdatabasebyuuid.ts + - src/models/operations/getdeploymentbyuuid.ts + - src/models/operations/getdomainsbyserveruuid.ts + - src/models/operations/getenvironmentbyname.ts + - src/models/operations/getmembersbyteamid.ts + - src/models/operations/getprivatekeybyuuid.ts + - src/models/operations/getprojectbyuuid.ts + - src/models/operations/getresourcesbyserveruuid.ts + - src/models/operations/getserverbyuuid.ts + - src/models/operations/getservicebyuuid.ts + - src/models/operations/getteambyid.ts + - src/models/operations/index.ts + - src/models/operations/listenvsbyapplicationuuid.ts + - src/models/operations/listenvsbyserviceuuid.ts + - src/models/operations/restartapplicationbyuuid.ts + - src/models/operations/restartdatabasebyuuid.ts + - src/models/operations/restartservicebyuuid.ts + - src/models/operations/startapplicationbyuuid.ts + - src/models/operations/startdatabasebyuuid.ts + - src/models/operations/startservicebyuuid.ts + - src/models/operations/stopapplicationbyuuid.ts + - src/models/operations/stopdatabasebyuuid.ts + - src/models/operations/stopservicebyuuid.ts + - src/models/operations/updateapplicationbyuuid.ts + - src/models/operations/updatedatabasebyuuid.ts + - src/models/operations/updateenvbyapplicationuuid.ts + - src/models/operations/updateenvbyserviceuuid.ts + - src/models/operations/updateenvsbyapplicationuuid.ts + - src/models/operations/updateenvsbyserviceuuid.ts + - src/models/operations/updateprivatekey.ts + - src/models/operations/updateprojectbyuuid.ts + - src/models/operations/updateserverbyuuid.ts + - src/models/operations/validateserverbyuuid.ts + - src/sdk/api.ts + - src/sdk/applications.ts + - src/sdk/databases.ts + - src/sdk/deployments.ts + - src/sdk/health.ts + - src/sdk/index.ts + - src/sdk/privatekeys.ts + - src/sdk/projects.ts + - src/sdk/resources.ts + - src/sdk/sdk.ts + - src/sdk/servers.ts + - src/sdk/services.ts + - src/sdk/teams.ts + - src/sdk/version.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: + version: + "": + responses: + "200": + application/json: "v4.0.0" + enable-api: + speakeasy-default-enable-api: + responses: + "200": + application/json: {"message": "API enabled."} + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "403": + application/json: {"message": "You are not allowed to enable the API."} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": "", "key1": ""} + "429": + application/json: {"key": "", "key1": "", "key2": ""} + "500": + application/json: {"key": "", "key1": "", "key2": ""} + disable-api: + speakeasy-default-disable-api: + responses: + "200": + application/json: {"message": "API disabled."} + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "403": + application/json: {"message": "You are not allowed to disable the API."} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": "", "key1": "", "key2": ""} + "429": + application/json: {"key": "", "key1": "", "key2": ""} + "500": + application/json: {"key": ""} + healthcheck: + "": + responses: + "200": + application/json: "OK" + list-applications: + speakeasy-default-list-applications: + responses: + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "200": {} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": "", "key1": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": ""} + create-public-application: + speakeasy-default-create-public-application: + requestBody: + application/json: {"project_uuid": "", "server_uuid": "", "environment_name": "", "git_repository": "", "git_branch": "", "build_pack": "nixpacks", "ports_exposes": ""} + responses: + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": ""} + "429": + application/json: {"key": ""} + "500": + application/json: {"key": "", "key1": ""} + create-private-github-app-application: + speakeasy-default-create-private-github-app-application: + requestBody: + application/json: {"project_uuid": "", "server_uuid": "", "environment_name": "", "github_app_uuid": "", "git_repository": "", "git_branch": "", "ports_exposes": "", "build_pack": "dockerfile"} + responses: + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": {} + "429": + application/json: {"key": ""} + "500": + application/json: {"key": "", "key1": ""} + create-private-deploy-key-application: + speakeasy-default-create-private-deploy-key-application: + requestBody: + application/json: {"project_uuid": "", "server_uuid": "", "environment_name": "", "private_key_uuid": "", "git_repository": "", "git_branch": "", "ports_exposes": "", "build_pack": "static"} + responses: + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": "", "key1": "", "key2": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": "", "key2": ""} + create-dockerfile-application: + speakeasy-default-create-dockerfile-application: + requestBody: + application/json: {"project_uuid": "", "server_uuid": "", "environment_name": "", "dockerfile": ""} + responses: + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": "", "key1": "", "key2": ""} + "429": + application/json: {"key": "", "key1": "", "key2": ""} + "500": + application/json: {"key": ""} + create-dockerimage-application: + speakeasy-default-create-dockerimage-application: + requestBody: + application/json: {"project_uuid": "", "server_uuid": "", "environment_name": "", "docker_registry_image_name": "", "ports_exposes": ""} + responses: + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": {} + "429": + application/json: {"key": ""} + "500": + application/json: {"key": ""} + create-dockercompose-application: + speakeasy-default-create-dockercompose-application: + requestBody: + application/json: {"project_uuid": "", "server_uuid": "", "environment_name": "", "docker_compose_raw": ""} + responses: + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": "", "key1": "", "key2": ""} + "429": + application/json: {"key": "", "key1": "", "key2": ""} + "500": + application/json: {"key": "", "key1": ""} + get-application-by-uuid: + speakeasy-default-get-application-by-uuid: + parameters: + path: + uuid: "61f687df-a2c6-49ae-927c-701e1869129c" + responses: + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "200": {} + "408": + application/json: {"key": "", "key1": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": ""} + delete-application-by-uuid: + speakeasy-default-delete-application-by-uuid: + parameters: + path: + uuid: "b7774d3f-40ad-4c95-8c81-888632bd34e1" + query: {} + responses: + "200": + application/json: {"message": "Application deleted."} + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": "", "key1": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": ""} + update-application-by-uuid: + speakeasy-default-update-application-by-uuid: + parameters: + path: + uuid: "2dd6d1b1-2896-4369-b2ed-d1789d4abe06" + responses: + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "200": {} + "408": + application/json: {"key": "", "key1": "", "key2": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": ""} + list-envs-by-application-uuid: + speakeasy-default-list-envs-by-application-uuid: + parameters: + path: + uuid: "c1cca4f0-5746-4721-9989-b05fee4a02e4" + responses: + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "200": {} + "408": + application/json: {"key": ""} + "429": + application/json: {"key": ""} + "500": + application/json: {"key": ""} + create-env-by-application-uuid: + speakeasy-default-create-env-by-application-uuid: + parameters: + path: + uuid: "41e7ad1e-bfed-46b3-b163-d6b1de04f2c9" + responses: + "201": + application/json: {"uuid": "nc0k04gk8g0cgsk440g0koko"} + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": "", "key1": "", "key2": ""} + "429": + application/json: {"key": "", "key1": "", "key2": ""} + "500": {} + update-env-by-application-uuid: + speakeasy-default-update-env-by-application-uuid: + parameters: + path: + uuid: "38636143-32bc-410a-bf25-57be00b8a243" + requestBody: + application/json: {"key": "", "value": ""} + responses: + "201": + application/json: {"message": "Environment variable updated."} + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": ""} + update-envs-by-application-uuid: + speakeasy-default-update-envs-by-application-uuid: + parameters: + path: + uuid: "0a6652ad-7216-4c18-9026-f7327599db39" + requestBody: + application/json: {"data": []} + responses: + "201": + application/json: {"message": "Environment variables updated."} + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": "", "key1": "", "key2": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": ""} + delete-env-by-application-uuid: + speakeasy-default-delete-env-by-application-uuid: + parameters: + path: + uuid: "29178270-449b-4b61-8c4c-a70fe8abfb71" + env_uuid: "33106c3f-066e-4bc0-aa2c-bde0210b2cd0" + responses: + "200": + application/json: {"message": "Environment variable deleted."} + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": "", "key1": "", "key2": ""} + "429": + application/json: {"key": "", "key1": "", "key2": ""} + "500": + application/json: {"key": "", "key1": ""} + start-application-by-uuid: + speakeasy-default-start-application-by-uuid: + parameters: + path: + uuid: "572630a1-cd73-4275-880b-f045ee102419" + query: {} + responses: + "200": + application/json: {"message": "Deployment request queued.", "deployment_uuid": "doogksw"} + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": {} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": "", "key2": ""} + stop-application-by-uuid: + speakeasy-default-stop-application-by-uuid: + parameters: + path: + uuid: "c7f49fe8-2360-46f6-9bda-86c275c44858" + responses: + "200": + application/json: {"message": "Application stopping request queued."} + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": ""} + restart-application-by-uuid: + speakeasy-default-restart-application-by-uuid: + parameters: + path: + uuid: "f6e08c98-9f12-4fa8-a341-05b629d9a23a" + responses: + "200": + application/json: {"message": "Restart request queued.", "deployment_uuid": "doogksw"} + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": {} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": ""} + execute-command-application: + speakeasy-default-execute-command-application: + parameters: + path: + uuid: "5be3e72e-82ca-4e4e-862e-5e0cf0b853f6" + responses: + "200": + application/json: {"message": "Command executed."} + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": "", "key1": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": ""} + list-databases: + "": + responses: + "200": + application/json: "Content is very complex. Will be implemented later." + get-database-by-uuid: + "": + parameters: + path: + uuid: "74d5589b-49ac-48d8-81bc-d384b1e22591" + responses: + "200": + application/json: "Content is very complex. Will be implemented later." + delete-database-by-uuid: + speakeasy-default-delete-database-by-uuid: + parameters: + path: + uuid: "97d3b16d-4e3e-43de-90da-8825514f9704" + query: {} + responses: + "200": + application/json: {"message": "Database deleted."} + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": "", "key1": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": ""} + update-database-by-uuid: + speakeasy-default-update-database-by-uuid: + parameters: + path: + uuid: "8ce069c2-b9ca-4606-a156-f18931ac7716" + responses: + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": "", "key1": "", "key2": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": ""} + create-database-postgresql: + speakeasy-default-create-database-postgresql: + requestBody: + application/json: {"server_uuid": "", "project_uuid": "", "environment_name": ""} + responses: + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": "", "key1": "", "key2": ""} + "429": + application/json: {"key": "", "key1": "", "key2": ""} + "500": + application/json: {"key": "", "key1": "", "key2": ""} + create-database-clickhouse: + speakeasy-default-create-database-clickhouse: + requestBody: + application/json: {"server_uuid": "", "project_uuid": "", "environment_name": ""} + responses: + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": {} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": "", "key2": ""} + create-database-dragonfly: + speakeasy-default-create-database-dragonfly: + requestBody: + application/json: {"server_uuid": "", "project_uuid": "", "environment_name": ""} + responses: + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": {} + "429": + application/json: {"key": "", "key1": "", "key2": ""} + "500": + application/json: {"key": ""} + create-database-redis: + speakeasy-default-create-database-redis: + requestBody: + application/json: {"server_uuid": "", "project_uuid": "", "environment_name": ""} + responses: + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": "", "key1": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": ""} + create-database-keydb: + speakeasy-default-create-database-keydb: + requestBody: + application/json: {"server_uuid": "", "project_uuid": "", "environment_name": ""} + responses: + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": "", "key1": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": ""} + create-database-mariadb: + speakeasy-default-create-database-mariadb: + requestBody: + application/json: {"server_uuid": "", "project_uuid": "", "environment_name": ""} + responses: + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": ""} + "429": + application/json: {"key": ""} + "500": + application/json: {"key": "", "key1": "", "key2": ""} + create-database-mysql: + speakeasy-default-create-database-mysql: + requestBody: + application/json: {"server_uuid": "", "project_uuid": "", "environment_name": ""} + responses: + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": ""} + "429": + application/json: {"key": ""} + "500": + application/json: {"key": ""} + create-database-mongodb: + speakeasy-default-create-database-mongodb: + requestBody: + application/json: {"server_uuid": "", "project_uuid": "", "environment_name": ""} + responses: + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": {} + "429": + application/json: {"key": "", "key1": "", "key2": ""} + "500": + application/json: {"key": ""} + start-database-by-uuid: + speakeasy-default-start-database-by-uuid: + parameters: + path: + uuid: "f40511cd-7fe9-4acb-ba62-b4ed38ad7597" + responses: + "200": + application/json: {"message": "Database starting request queued."} + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": {} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": "", "key2": ""} + stop-database-by-uuid: + speakeasy-default-stop-database-by-uuid: + parameters: + path: + uuid: "3833eaa9-ac55-4488-907b-122d1dc43961" + responses: + "200": + application/json: {"message": "Database stopping request queued."} + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": ""} + restart-database-by-uuid: + speakeasy-default-restart-database-by-uuid: + parameters: + path: + uuid: "87eeb84f-bfe7-4d69-be6c-c4602521ac1a" + responses: + "200": + application/json: {"message": "Database restaring request queued."} + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": {} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": ""} + list-deployments: + speakeasy-default-list-deployments: + responses: + "200": + application/json: [] + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": "", "key1": "", "key2": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": ""} + get-deployment-by-uuid: + speakeasy-default-get-deployment-by-uuid: + parameters: + path: + uuid: "2ad7d3d7-960f-4230-bfe2-5ed5941b0a65" + responses: + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "200": {} + "408": + application/json: {"key": "", "key1": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": ""} + deploy-by-tag-or-uuid: + speakeasy-default-deploy-by-tag-or-uuid: + responses: + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "200": {} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": "", "key2": ""} + list-projects: + speakeasy-default-list-projects: + responses: + "200": + application/json: [] + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": "", "key1": "", "key2": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": ""} + create-project: + speakeasy-default-create-project: + responses: + "201": + application/json: {"uuid": "og888os"} + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": ""} + get-project-by-uuid: + speakeasy-default-get-project-by-uuid: + parameters: + path: + uuid: "8ee4c350-f599-4db3-ad60-4e858f981b76" + responses: + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "200": {} + "408": + application/json: {"key": "", "key1": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": ""} + "501": + application/json: {"message": "Resource not found."} + delete-project-by-uuid: + speakeasy-default-delete-project-by-uuid: + parameters: + path: + uuid: "9e5be611-8766-4db1-9ad7-f03e9284084f" + responses: + "200": + application/json: {"message": "Project deleted."} + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": "", "key1": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": ""} + update-project-by-uuid: + speakeasy-default-update-project-by-uuid: + parameters: + path: + uuid: "d493415b-6548-4c8b-8e4a-d0ae131f3835" + responses: + "201": + application/json: {"uuid": "og888os", "name": "Project Name", "description": "Project Description"} + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": "", "key1": "", "key2": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": ""} + get-environment-by-name: + speakeasy-default-get-environment-by-name: + parameters: + path: + uuid: "d9b108d3-6f92-44fb-9c22-b9c31c745f88" + environment_name: "" + responses: + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "200": {} + "408": {} + "429": {} + "500": + application/json: {"key": "", "key1": "", "key2": ""} + list-resources: + "": + responses: + "200": + application/json: "Content is very complex. Will be implemented later." + list-private-keys: + speakeasy-default-list-private-keys: + responses: + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "200": {} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": "", "key1": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": ""} + create-private-key: + speakeasy-default-create-private-key: + requestBody: + application/json: {"private_key": ""} + responses: + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "201": {} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": ""} + update-private-key: + speakeasy-default-update-private-key: + requestBody: + application/json: {"private_key": ""} + responses: + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "201": {} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": "", "key1": "", "key2": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": ""} + get-private-key-by-uuid: + speakeasy-default-get-private-key-by-uuid: + parameters: + path: + uuid: "de612435-5d53-45e6-bbe3-7f2c13a14f66" + responses: + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "200": {} + "408": + application/json: {"key": "", "key1": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": ""} + "501": + application/json: {"message": "Resource not found."} + delete-private-key-by-uuid: + speakeasy-default-delete-private-key-by-uuid: + parameters: + path: + uuid: "d12ec548-7853-4eb5-ad51-3372962d2e05" + responses: + "200": + application/json: {"message": "Private Key deleted."} + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "408": + application/json: {"key": "", "key1": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": ""} + "501": + application/json: {"message": "Resource not found."} + list-servers: + speakeasy-default-list-servers: + responses: + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "200": {} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": "", "key1": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": ""} + create-server: + speakeasy-default-create-server: + requestBody: + application/json: {"name": "My Server", "description": "My Server Description", "ip": "127.0.0.1", "port": 22, "user": "root", "private_key_uuid": "og888os", "is_build_server": false, "instant_validate": false, "proxy_type": "traefik"} + responses: + "201": + application/json: {"uuid": "og888os"} + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": ""} + get-server-by-uuid: + speakeasy-default-get-server-by-uuid: + parameters: + path: + uuid: "878632ca-cced-4853-8da6-87221abec029" + responses: + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "200": {} + "408": + application/json: {"key": "", "key1": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": ""} + delete-server-by-uuid: + speakeasy-default-delete-server-by-uuid: + parameters: + path: + uuid: "183d3ea1-6bc7-4679-83e6-ee71ea432238" + responses: + "200": + application/json: {"message": "Server deleted."} + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": "", "key1": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": ""} + update-server-by-uuid: + speakeasy-default-update-server-by-uuid: + parameters: + path: + uuid: "1c295953-9423-418a-96cd-0fd6e1b41a9e" + responses: + "201": + application/json: [] + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": "", "key1": "", "key2": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": ""} + get-resources-by-server-uuid: + speakeasy-default-get-resources-by-server-uuid: + parameters: + path: + uuid: "ce37b3ba-2b08-4d5d-9238-c6a5920c72c9" + responses: + "200": + application/json: [] + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": {} + "429": + application/json: {"key": "", "key1": "", "key2": ""} + "500": + application/json: {"key": "", "key1": "", "key2": ""} + get-domains-by-server-uuid: + speakeasy-default-get-domains-by-server-uuid: + parameters: + path: + uuid: "03ea70d2-cdac-4a42-b170-cbba7d1cffcf" + responses: + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "200": + application/json: [] + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": ""} + validate-server-by-uuid: + speakeasy-default-validate-server-by-uuid: + parameters: + path: + uuid: "ef3bad97-f956-4f33-8e23-85d6e694004d" + responses: + "201": + application/json: {"message": "Validation started."} + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": "", "key1": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": {} + list-services: + speakeasy-default-list-services: + responses: + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "200": {} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": "", "key1": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": ""} + create-service: + speakeasy-default-create-service: + requestBody: + application/json: {"type": "gitea", "project_uuid": "", "environment_name": "", "server_uuid": ""} + responses: + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "201": {} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": ""} + get-service-by-uuid: + speakeasy-default-get-service-by-uuid: + parameters: + path: + uuid: "5639b38b-4535-4e45-a890-384cf735116d" + responses: + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "200": {} + "408": + application/json: {"key": "", "key1": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": ""} + delete-service-by-uuid: + speakeasy-default-delete-service-by-uuid: + parameters: + path: + uuid: "14cb9244-2326-4bec-9c7e-4b61cdd548f5" + query: {} + responses: + "200": + application/json: {"message": "Service deletion request queued."} + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": "", "key1": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": ""} + list-envs-by-service-uuid: + speakeasy-default-list-envs-by-service-uuid: + parameters: + path: + uuid: "ef4a6137-8bba-4132-909e-72f1b2d26d47" + responses: + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "200": {} + "408": + application/json: {"key": ""} + "429": + application/json: {"key": ""} + "500": + application/json: {"key": ""} + create-env-by-service-uuid: + speakeasy-default-create-env-by-service-uuid: + parameters: + path: + uuid: "b793dd27-7b05-40e6-b80c-e49c6dd37147" + responses: + "201": + application/json: {"uuid": "nc0k04gk8g0cgsk440g0koko"} + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": "", "key1": "", "key2": ""} + "429": + application/json: {"key": "", "key1": "", "key2": ""} + "500": {} + update-env-by-service-uuid: + speakeasy-default-update-env-by-service-uuid: + parameters: + path: + uuid: "37d5d3ba-c274-48f2-818c-6ab32dbc0de2" + requestBody: + application/json: {"key": "", "value": ""} + responses: + "201": + application/json: {"message": "Environment variable updated."} + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": ""} + update-envs-by-service-uuid: + speakeasy-default-update-envs-by-service-uuid: + parameters: + path: + uuid: "b88c7e0b-d8f9-4138-bf33-e97852e42e37" + requestBody: + application/json: {} + responses: + "201": + application/json: {"message": "Environment variables updated."} + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": "", "key1": "", "key2": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": ""} + delete-env-by-service-uuid: + speakeasy-default-delete-env-by-service-uuid: + parameters: + path: + uuid: "6b5e4a6b-40ac-4774-b639-b27d9c59c9a2" + env_uuid: "b300b74f-72ea-4848-85d3-4b61a952165c" + responses: + "200": + application/json: {"message": "Environment variable deleted."} + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": "", "key1": "", "key2": ""} + "429": + application/json: {"key": "", "key1": "", "key2": ""} + "500": + application/json: {"key": "", "key1": ""} + start-service-by-uuid: + speakeasy-default-start-service-by-uuid: + parameters: + path: + uuid: "230d98c7-fc68-4357-9260-dd6c6394ea60" + responses: + "200": + application/json: {"message": "Service starting request queued."} + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": {} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": "", "key2": ""} + stop-service-by-uuid: + speakeasy-default-stop-service-by-uuid: + parameters: + path: + uuid: "578100c6-9564-4ccb-94f7-ce1dfb7b5d65" + responses: + "200": + application/json: {"message": "Service stopping request queued."} + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": ""} + restart-service-by-uuid: + speakeasy-default-restart-service-by-uuid: + parameters: + path: + uuid: "c5048915-c301-46b1-9a79-4a3ae47609b2" + responses: + "200": + application/json: {"message": "Service restaring request queued."} + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "408": {} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": ""} + list-teams: + speakeasy-default-list-teams: + responses: + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "200": {} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": "", "key1": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": ""} + get-team-by-id: + speakeasy-default-get-team-by-id: + parameters: + path: + id: 393445 + responses: + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "200": {} + "408": + application/json: {"key": "", "key1": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": ""} + get-members-by-team-id: + speakeasy-default-get-members-by-team-id: + parameters: + path: + id: 272299 + responses: + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "404": + application/json: {"message": "Resource not found."} + "200": {} + "408": + application/json: {"key": "", "key1": ""} + "429": + application/json: {"key": "", "key1": "", "key2": ""} + "500": + application/json: {"key": ""} + get-current-team: + speakeasy-default-get-current-team: + responses: + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "200": {} + "404": + application/json: {"message": "Resource not found."} + "408": {} + "429": + application/json: {"key": "", "key1": "", "key2": ""} + "500": + application/json: {"key": "", "key1": "", "key2": ""} + get-current-team-members: + speakeasy-default-get-current-team-members: + responses: + "400": + application/json: {"message": "Invalid token."} + "401": + application/json: {"message": "Unauthenticated."} + "200": {} + "404": + application/json: {"message": "Resource not found."} + "408": + application/json: {"key": "", "key1": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": "", "key2": ""} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml new file mode 100644 index 0000000..6d02321 --- /dev/null +++ b/.speakeasy/gen.yaml @@ -0,0 +1,48 @@ +configVersion: 2.0.0 +generation: + devContainers: + enabled: true + schemaPath: https://raw.githubusercontent.com/coollabsio/documentation-coolify/refs/heads/main/openapi.yaml + sdkClassName: Coolify + maintainOpenAPIOrder: true + usageSnippets: + optionalPropertyRendering: withExample + useClassNamesForArrayFields: true + fixes: + nameResolutionDec2023: true + parameterOrderingFeb2024: true + requestResponseComponentNamesFeb2024: true + auth: + oAuth2ClientCredentialsEnabled: true + oAuth2PasswordEnabled: true +typescript: + version: 0.1.1 + additionalDependencies: + dependencies: {} + devDependencies: {} + peerDependencies: {} + additionalPackageJSON: {} + author: Speakeasy + clientServerStatusCodesAsErrors: true + defaultErrorName: APIError + enumFormat: union + envVarPrefix: COOLIFY + flattenGlobalSecurity: true + flatteningOrder: parameters-first + imports: + option: openapi + paths: + callbacks: models/callbacks + errors: models/errors + operations: models/operations + shared: models/components + webhooks: models/webhooks + inputModelSuffix: input + maxMethodParams: 0 + methodArguments: require-security-and-request + moduleFormat: commonjs + outputModelSuffix: output + packageName: coolify + responseFormat: flat + templateVersion: v2 + useIndexModules: true diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock new file mode 100644 index 0000000..f3a5fbd --- /dev/null +++ b/.speakeasy/workflow.lock @@ -0,0 +1,36 @@ +speakeasyVersion: 1.441.0 +sources: + Coolify-OAS: + sourceNamespace: coolify-oas + sourceRevisionDigest: sha256:6f90b2e956ab8c0b49b28a442b3315a73ef04bedc9caf4a55d496547cd6ef283 + sourceBlobDigest: sha256:8b9fa64561d834d376afef39a6ebecd3814c914ca8f134b1cea2eca72cf33919 + tags: + - latest +targets: + coolify: + source: Coolify-OAS + sourceNamespace: coolify-oas + sourceRevisionDigest: sha256:6f90b2e956ab8c0b49b28a442b3315a73ef04bedc9caf4a55d496547cd6ef283 + sourceBlobDigest: sha256:8b9fa64561d834d376afef39a6ebecd3814c914ca8f134b1cea2eca72cf33919 + codeSamplesNamespace: coolify-oas-code-samples + codeSamplesRevisionDigest: sha256:f093bd5deaaeea41ab713948ef4b25ccffc80af0e111f75b772fc27e1b03b54d +workflow: + workflowVersion: 1.0.0 + speakeasyVersion: latest + sources: + Coolify-OAS: + inputs: + - location: ./OpenAPI.yaml + overlays: + - location: ./speakeasy-suggested-name-overlay.yaml + - location: ./speakeasy-suggested-error-overlay.yaml + registry: + location: registry.speakeasyapi.dev/lukehagar/lukehagar/coolify-oas + targets: + coolify: + target: typescript + source: Coolify-OAS + codeSamples: + registry: + location: registry.speakeasyapi.dev/lukehagar/lukehagar/coolify-oas-code-samples + blocking: false diff --git a/.speakeasy/workflow.yaml b/.speakeasy/workflow.yaml new file mode 100644 index 0000000..6b16f19 --- /dev/null +++ b/.speakeasy/workflow.yaml @@ -0,0 +1,19 @@ +workflowVersion: 1.0.0 +speakeasyVersion: latest +sources: + Coolify-OAS: + inputs: + - location: ./OpenAPI.yaml + overlays: + - location: ./speakeasy-suggested-name-overlay.yaml + - location: ./speakeasy-suggested-error-overlay.yaml + registry: + location: registry.speakeasyapi.dev/lukehagar/lukehagar/coolify-oas +targets: + coolify: + target: typescript + source: Coolify-OAS + codeSamples: + registry: + location: registry.speakeasyapi.dev/lukehagar/lukehagar/coolify-oas-code-samples + 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..76bcb23 --- /dev/null +++ b/FUNCTIONS.md @@ -0,0 +1,104 @@ +# 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 { CoolifyCore } from "coolify/core.js"; +import { applicationsList } from "coolify/funcs/applicationsList.js"; +import { SDKValidationError } from "coolify/models/errors/sdkvalidationerror.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await applicationsList(coolify); + + switch (true) { + case res.ok: + // The success case will be handled outside of the switch block + break; + case res.error instanceof SDKValidationError: + // Pretty-print validation errors. + return console.log(res.error.pretty()); + case res.error instanceof Error: + return console.log(res.error); + default: + // TypeScript's type checking will fail on the following line if the above + // cases were not exhaustive. + res.error satisfies never; + throw new Error("Assertion failed: expected error checks to be exhaustive: " + res.error); + } + + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +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/OpenAPI.yaml b/OpenAPI.yaml new file mode 100644 index 0000000..d320d48 --- /dev/null +++ b/OpenAPI.yaml @@ -0,0 +1,5504 @@ +openapi: 3.1.0 +info: + title: Coolify + version: "0.1" +servers: + - url: "https://app.coolify.io/api/v1" + description: "Coolify Cloud API. Change the host to your own instance if you are self-hosting." +paths: + /applications: + get: + tags: + - Applications + summary: List + description: "List all applications." + operationId: list-applications + responses: + "200": + description: "Get all applications." + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Application" + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + security: + - bearerAuth: [] + /applications/public: + post: + tags: + - Applications + summary: "Create (Public)" + description: "Create new application based on a public git repository." + operationId: create-public-application + requestBody: + description: "Application object that needs to be created." + required: true + content: + application/json: + schema: + required: + - project_uuid + - server_uuid + - environment_name + - git_repository + - git_branch + - build_pack + - ports_exposes + properties: + project_uuid: + type: string + description: "The project UUID." + server_uuid: + type: string + description: "The server UUID." + environment_name: + type: string + description: "The environment name." + git_repository: + type: string + description: "The git repository URL." + git_branch: + type: string + description: "The git branch." + build_pack: + type: string + enum: [nixpacks, static, dockerfile, dockercompose] + description: "The build pack type." + ports_exposes: + type: string + description: "The ports to expose." + destination_uuid: + type: string + description: "The destination UUID." + name: + type: string + description: "The application name." + description: + type: string + description: "The application description." + domains: + type: string + description: "The application domains." + git_commit_sha: + type: string + description: "The git commit SHA." + docker_registry_image_name: + type: string + description: "The docker registry image name." + docker_registry_image_tag: + type: string + description: "The docker registry image tag." + is_static: + type: boolean + description: "The flag to indicate if the application is static." + static_image: + type: string + enum: ["nginx:alpine"] + description: "The static image." + install_command: + type: string + description: "The install command." + build_command: + type: string + description: "The build command." + start_command: + type: string + description: "The start command." + ports_mappings: + type: string + description: "The ports mappings." + base_directory: + type: string + description: "The base directory for all commands." + publish_directory: + type: string + description: "The publish directory." + health_check_enabled: + type: boolean + description: "Health check enabled." + health_check_path: + type: string + description: "Health check path." + health_check_port: + type: string + nullable: true + description: "Health check port." + health_check_host: + type: string + nullable: true + description: "Health check host." + health_check_method: + type: string + description: "Health check method." + health_check_return_code: + type: integer + description: "Health check return code." + health_check_scheme: + type: string + description: "Health check scheme." + health_check_response_text: + type: string + nullable: true + description: "Health check response text." + health_check_interval: + type: integer + description: "Health check interval in seconds." + health_check_timeout: + type: integer + description: "Health check timeout in seconds." + health_check_retries: + type: integer + description: "Health check retries count." + health_check_start_period: + type: integer + description: "Health check start period in seconds." + limits_memory: + type: string + description: "Memory limit." + limits_memory_swap: + type: string + description: "Memory swap limit." + limits_memory_swappiness: + type: integer + description: "Memory swappiness." + limits_memory_reservation: + type: string + description: "Memory reservation." + limits_cpus: + type: string + description: "CPU limit." + limits_cpuset: + type: string + nullable: true + description: "CPU set." + limits_cpu_shares: + type: integer + description: "CPU shares." + custom_labels: + type: string + description: "Custom labels." + custom_docker_run_options: + type: string + description: "Custom docker run options." + post_deployment_command: + type: string + description: "Post deployment command." + post_deployment_command_container: + type: string + description: "Post deployment command container." + pre_deployment_command: + type: string + description: "Pre deployment command." + pre_deployment_command_container: + type: string + description: "Pre deployment command container." + manual_webhook_secret_github: + type: string + description: "Manual webhook secret for Github." + manual_webhook_secret_gitlab: + type: string + description: "Manual webhook secret for Gitlab." + manual_webhook_secret_bitbucket: + type: string + description: "Manual webhook secret for Bitbucket." + manual_webhook_secret_gitea: + type: string + description: "Manual webhook secret for Gitea." + redirect: + type: string + nullable: true + description: "How to set redirect with Traefik / Caddy. www<->non-www." + enum: [www, non-www, both] + instant_deploy: + type: boolean + description: "The flag to indicate if the application should be deployed instantly." + dockerfile: + type: string + description: "The Dockerfile content." + docker_compose_location: + type: string + description: "The Docker Compose location." + docker_compose_raw: + type: string + description: "The Docker Compose raw content." + docker_compose_custom_start_command: + type: string + description: "The Docker Compose custom start command." + docker_compose_custom_build_command: + type: string + description: "The Docker Compose custom build command." + docker_compose_domains: + type: array + description: "The Docker Compose domains." + watch_paths: + type: string + description: "The watch paths." + use_build_server: + type: boolean + nullable: true + description: "Use build server." + type: object + responses: + "200": + description: "Application created successfully." + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + security: + - bearerAuth: [] + /applications/private-github-app: + post: + tags: + - Applications + summary: "Create (Private - GH App)" + description: "Create new application based on a private repository through a Github App." + operationId: create-private-github-app-application + requestBody: + description: "Application object that needs to be created." + required: true + content: + application/json: + schema: + required: + - project_uuid + - server_uuid + - environment_name + - github_app_uuid + - git_repository + - git_branch + - build_pack + - ports_exposes + properties: + project_uuid: + type: string + description: "The project UUID." + server_uuid: + type: string + description: "The server UUID." + environment_name: + type: string + description: "The environment name." + github_app_uuid: + type: string + description: "The Github App UUID." + git_repository: + type: string + description: "The git repository URL." + git_branch: + type: string + description: "The git branch." + ports_exposes: + type: string + description: "The ports to expose." + destination_uuid: + type: string + description: "The destination UUID." + build_pack: + type: string + enum: [nixpacks, static, dockerfile, dockercompose] + description: "The build pack type." + name: + type: string + description: "The application name." + description: + type: string + description: "The application description." + domains: + type: string + description: "The application domains." + git_commit_sha: + type: string + description: "The git commit SHA." + docker_registry_image_name: + type: string + description: "The docker registry image name." + docker_registry_image_tag: + type: string + description: "The docker registry image tag." + is_static: + type: boolean + description: "The flag to indicate if the application is static." + static_image: + type: string + enum: ["nginx:alpine"] + description: "The static image." + install_command: + type: string + description: "The install command." + build_command: + type: string + description: "The build command." + start_command: + type: string + description: "The start command." + ports_mappings: + type: string + description: "The ports mappings." + base_directory: + type: string + description: "The base directory for all commands." + publish_directory: + type: string + description: "The publish directory." + health_check_enabled: + type: boolean + description: "Health check enabled." + health_check_path: + type: string + description: "Health check path." + health_check_port: + type: string + nullable: true + description: "Health check port." + health_check_host: + type: string + nullable: true + description: "Health check host." + health_check_method: + type: string + description: "Health check method." + health_check_return_code: + type: integer + description: "Health check return code." + health_check_scheme: + type: string + description: "Health check scheme." + health_check_response_text: + type: string + nullable: true + description: "Health check response text." + health_check_interval: + type: integer + description: "Health check interval in seconds." + health_check_timeout: + type: integer + description: "Health check timeout in seconds." + health_check_retries: + type: integer + description: "Health check retries count." + health_check_start_period: + type: integer + description: "Health check start period in seconds." + limits_memory: + type: string + description: "Memory limit." + limits_memory_swap: + type: string + description: "Memory swap limit." + limits_memory_swappiness: + type: integer + description: "Memory swappiness." + limits_memory_reservation: + type: string + description: "Memory reservation." + limits_cpus: + type: string + description: "CPU limit." + limits_cpuset: + type: string + nullable: true + description: "CPU set." + limits_cpu_shares: + type: integer + description: "CPU shares." + custom_labels: + type: string + description: "Custom labels." + custom_docker_run_options: + type: string + description: "Custom docker run options." + post_deployment_command: + type: string + description: "Post deployment command." + post_deployment_command_container: + type: string + description: "Post deployment command container." + pre_deployment_command: + type: string + description: "Pre deployment command." + pre_deployment_command_container: + type: string + description: "Pre deployment command container." + manual_webhook_secret_github: + type: string + description: "Manual webhook secret for Github." + manual_webhook_secret_gitlab: + type: string + description: "Manual webhook secret for Gitlab." + manual_webhook_secret_bitbucket: + type: string + description: "Manual webhook secret for Bitbucket." + manual_webhook_secret_gitea: + type: string + description: "Manual webhook secret for Gitea." + redirect: + type: string + nullable: true + description: "How to set redirect with Traefik / Caddy. www<->non-www." + enum: [www, non-www, both] + instant_deploy: + type: boolean + description: "The flag to indicate if the application should be deployed instantly." + dockerfile: + type: string + description: "The Dockerfile content." + docker_compose_location: + type: string + description: "The Docker Compose location." + docker_compose_raw: + type: string + description: "The Docker Compose raw content." + docker_compose_custom_start_command: + type: string + description: "The Docker Compose custom start command." + docker_compose_custom_build_command: + type: string + description: "The Docker Compose custom build command." + docker_compose_domains: + type: array + description: "The Docker Compose domains." + watch_paths: + type: string + description: "The watch paths." + use_build_server: + type: boolean + nullable: true + description: "Use build server." + type: object + responses: + "200": + description: "Application created successfully." + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + security: + - bearerAuth: [] + /applications/private-deploy-key: + post: + tags: + - Applications + summary: "Create (Private - Deploy Key)" + description: "Create new application based on a private repository through a Deploy Key." + operationId: create-private-deploy-key-application + requestBody: + description: "Application object that needs to be created." + required: true + content: + application/json: + schema: + required: + - project_uuid + - server_uuid + - environment_name + - private_key_uuid + - git_repository + - git_branch + - build_pack + - ports_exposes + properties: + project_uuid: + type: string + description: "The project UUID." + server_uuid: + type: string + description: "The server UUID." + environment_name: + type: string + description: "The environment name." + private_key_uuid: + type: string + description: "The private key UUID." + git_repository: + type: string + description: "The git repository URL." + git_branch: + type: string + description: "The git branch." + ports_exposes: + type: string + description: "The ports to expose." + destination_uuid: + type: string + description: "The destination UUID." + build_pack: + type: string + enum: [nixpacks, static, dockerfile, dockercompose] + description: "The build pack type." + name: + type: string + description: "The application name." + description: + type: string + description: "The application description." + domains: + type: string + description: "The application domains." + git_commit_sha: + type: string + description: "The git commit SHA." + docker_registry_image_name: + type: string + description: "The docker registry image name." + docker_registry_image_tag: + type: string + description: "The docker registry image tag." + is_static: + type: boolean + description: "The flag to indicate if the application is static." + static_image: + type: string + enum: ["nginx:alpine"] + description: "The static image." + install_command: + type: string + description: "The install command." + build_command: + type: string + description: "The build command." + start_command: + type: string + description: "The start command." + ports_mappings: + type: string + description: "The ports mappings." + base_directory: + type: string + description: "The base directory for all commands." + publish_directory: + type: string + description: "The publish directory." + health_check_enabled: + type: boolean + description: "Health check enabled." + health_check_path: + type: string + description: "Health check path." + health_check_port: + type: string + nullable: true + description: "Health check port." + health_check_host: + type: string + nullable: true + description: "Health check host." + health_check_method: + type: string + description: "Health check method." + health_check_return_code: + type: integer + description: "Health check return code." + health_check_scheme: + type: string + description: "Health check scheme." + health_check_response_text: + type: string + nullable: true + description: "Health check response text." + health_check_interval: + type: integer + description: "Health check interval in seconds." + health_check_timeout: + type: integer + description: "Health check timeout in seconds." + health_check_retries: + type: integer + description: "Health check retries count." + health_check_start_period: + type: integer + description: "Health check start period in seconds." + limits_memory: + type: string + description: "Memory limit." + limits_memory_swap: + type: string + description: "Memory swap limit." + limits_memory_swappiness: + type: integer + description: "Memory swappiness." + limits_memory_reservation: + type: string + description: "Memory reservation." + limits_cpus: + type: string + description: "CPU limit." + limits_cpuset: + type: string + nullable: true + description: "CPU set." + limits_cpu_shares: + type: integer + description: "CPU shares." + custom_labels: + type: string + description: "Custom labels." + custom_docker_run_options: + type: string + description: "Custom docker run options." + post_deployment_command: + type: string + description: "Post deployment command." + post_deployment_command_container: + type: string + description: "Post deployment command container." + pre_deployment_command: + type: string + description: "Pre deployment command." + pre_deployment_command_container: + type: string + description: "Pre deployment command container." + manual_webhook_secret_github: + type: string + description: "Manual webhook secret for Github." + manual_webhook_secret_gitlab: + type: string + description: "Manual webhook secret for Gitlab." + manual_webhook_secret_bitbucket: + type: string + description: "Manual webhook secret for Bitbucket." + manual_webhook_secret_gitea: + type: string + description: "Manual webhook secret for Gitea." + redirect: + type: string + nullable: true + description: "How to set redirect with Traefik / Caddy. www<->non-www." + enum: [www, non-www, both] + instant_deploy: + type: boolean + description: "The flag to indicate if the application should be deployed instantly." + dockerfile: + type: string + description: "The Dockerfile content." + docker_compose_location: + type: string + description: "The Docker Compose location." + docker_compose_raw: + type: string + description: "The Docker Compose raw content." + docker_compose_custom_start_command: + type: string + description: "The Docker Compose custom start command." + docker_compose_custom_build_command: + type: string + description: "The Docker Compose custom build command." + docker_compose_domains: + type: array + description: "The Docker Compose domains." + watch_paths: + type: string + description: "The watch paths." + use_build_server: + type: boolean + nullable: true + description: "Use build server." + type: object + responses: + "200": + description: "Application created successfully." + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + security: + - bearerAuth: [] + /applications/dockerfile: + post: + tags: + - Applications + summary: "Create (Dockerfile)" + description: "Create new application based on a simple Dockerfile." + operationId: create-dockerfile-application + requestBody: + description: "Application object that needs to be created." + required: true + content: + application/json: + schema: + required: + - project_uuid + - server_uuid + - environment_name + - dockerfile + properties: + project_uuid: + type: string + description: "The project UUID." + server_uuid: + type: string + description: "The server UUID." + environment_name: + type: string + description: "The environment name." + dockerfile: + type: string + description: "The Dockerfile content." + build_pack: + type: string + enum: [nixpacks, static, dockerfile, dockercompose] + description: "The build pack type." + ports_exposes: + type: string + description: "The ports to expose." + destination_uuid: + type: string + description: "The destination UUID." + name: + type: string + description: "The application name." + description: + type: string + description: "The application description." + domains: + type: string + description: "The application domains." + docker_registry_image_name: + type: string + description: "The docker registry image name." + docker_registry_image_tag: + type: string + description: "The docker registry image tag." + ports_mappings: + type: string + description: "The ports mappings." + base_directory: + type: string + description: "The base directory for all commands." + health_check_enabled: + type: boolean + description: "Health check enabled." + health_check_path: + type: string + description: "Health check path." + health_check_port: + type: string + nullable: true + description: "Health check port." + health_check_host: + type: string + nullable: true + description: "Health check host." + health_check_method: + type: string + description: "Health check method." + health_check_return_code: + type: integer + description: "Health check return code." + health_check_scheme: + type: string + description: "Health check scheme." + health_check_response_text: + type: string + nullable: true + description: "Health check response text." + health_check_interval: + type: integer + description: "Health check interval in seconds." + health_check_timeout: + type: integer + description: "Health check timeout in seconds." + health_check_retries: + type: integer + description: "Health check retries count." + health_check_start_period: + type: integer + description: "Health check start period in seconds." + limits_memory: + type: string + description: "Memory limit." + limits_memory_swap: + type: string + description: "Memory swap limit." + limits_memory_swappiness: + type: integer + description: "Memory swappiness." + limits_memory_reservation: + type: string + description: "Memory reservation." + limits_cpus: + type: string + description: "CPU limit." + limits_cpuset: + type: string + nullable: true + description: "CPU set." + limits_cpu_shares: + type: integer + description: "CPU shares." + custom_labels: + type: string + description: "Custom labels." + custom_docker_run_options: + type: string + description: "Custom docker run options." + post_deployment_command: + type: string + description: "Post deployment command." + post_deployment_command_container: + type: string + description: "Post deployment command container." + pre_deployment_command: + type: string + description: "Pre deployment command." + pre_deployment_command_container: + type: string + description: "Pre deployment command container." + manual_webhook_secret_github: + type: string + description: "Manual webhook secret for Github." + manual_webhook_secret_gitlab: + type: string + description: "Manual webhook secret for Gitlab." + manual_webhook_secret_bitbucket: + type: string + description: "Manual webhook secret for Bitbucket." + manual_webhook_secret_gitea: + type: string + description: "Manual webhook secret for Gitea." + redirect: + type: string + nullable: true + description: "How to set redirect with Traefik / Caddy. www<->non-www." + enum: [www, non-www, both] + instant_deploy: + type: boolean + description: "The flag to indicate if the application should be deployed instantly." + use_build_server: + type: boolean + nullable: true + description: "Use build server." + type: object + responses: + "200": + description: "Application created successfully." + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + security: + - bearerAuth: [] + /applications/dockerimage: + post: + tags: + - Applications + summary: "Create (Docker Image)" + description: "Create new application based on a prebuilt docker image" + operationId: create-dockerimage-application + requestBody: + description: "Application object that needs to be created." + required: true + content: + application/json: + schema: + required: + - project_uuid + - server_uuid + - environment_name + - docker_registry_image_name + - ports_exposes + properties: + project_uuid: + type: string + description: "The project UUID." + server_uuid: + type: string + description: "The server UUID." + environment_name: + type: string + description: "The environment name." + docker_registry_image_name: + type: string + description: "The docker registry image name." + docker_registry_image_tag: + type: string + description: "The docker registry image tag." + ports_exposes: + type: string + description: "The ports to expose." + destination_uuid: + type: string + description: "The destination UUID." + name: + type: string + description: "The application name." + description: + type: string + description: "The application description." + domains: + type: string + description: "The application domains." + ports_mappings: + type: string + description: "The ports mappings." + health_check_enabled: + type: boolean + description: "Health check enabled." + health_check_path: + type: string + description: "Health check path." + health_check_port: + type: string + nullable: true + description: "Health check port." + health_check_host: + type: string + nullable: true + description: "Health check host." + health_check_method: + type: string + description: "Health check method." + health_check_return_code: + type: integer + description: "Health check return code." + health_check_scheme: + type: string + description: "Health check scheme." + health_check_response_text: + type: string + nullable: true + description: "Health check response text." + health_check_interval: + type: integer + description: "Health check interval in seconds." + health_check_timeout: + type: integer + description: "Health check timeout in seconds." + health_check_retries: + type: integer + description: "Health check retries count." + health_check_start_period: + type: integer + description: "Health check start period in seconds." + limits_memory: + type: string + description: "Memory limit." + limits_memory_swap: + type: string + description: "Memory swap limit." + limits_memory_swappiness: + type: integer + description: "Memory swappiness." + limits_memory_reservation: + type: string + description: "Memory reservation." + limits_cpus: + type: string + description: "CPU limit." + limits_cpuset: + type: string + nullable: true + description: "CPU set." + limits_cpu_shares: + type: integer + description: "CPU shares." + custom_labels: + type: string + description: "Custom labels." + custom_docker_run_options: + type: string + description: "Custom docker run options." + post_deployment_command: + type: string + description: "Post deployment command." + post_deployment_command_container: + type: string + description: "Post deployment command container." + pre_deployment_command: + type: string + description: "Pre deployment command." + pre_deployment_command_container: + type: string + description: "Pre deployment command container." + manual_webhook_secret_github: + type: string + description: "Manual webhook secret for Github." + manual_webhook_secret_gitlab: + type: string + description: "Manual webhook secret for Gitlab." + manual_webhook_secret_bitbucket: + type: string + description: "Manual webhook secret for Bitbucket." + manual_webhook_secret_gitea: + type: string + description: "Manual webhook secret for Gitea." + redirect: + type: string + nullable: true + description: "How to set redirect with Traefik / Caddy. www<->non-www." + enum: [www, non-www, both] + instant_deploy: + type: boolean + description: "The flag to indicate if the application should be deployed instantly." + use_build_server: + type: boolean + nullable: true + description: "Use build server." + type: object + responses: + "200": + description: "Application created successfully." + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + security: + - bearerAuth: [] + /applications/dockercompose: + post: + tags: + - Applications + summary: "Create (Docker Compose)" + description: "Create new application based on a docker-compose file." + operationId: create-dockercompose-application + requestBody: + description: "Application object that needs to be created." + required: true + content: + application/json: + schema: + required: + - project_uuid + - server_uuid + - environment_name + - docker_compose_raw + properties: + project_uuid: + type: string + description: "The project UUID." + server_uuid: + type: string + description: "The server UUID." + environment_name: + type: string + description: "The environment name." + docker_compose_raw: + type: string + description: "The Docker Compose raw content." + destination_uuid: + type: string + description: "The destination UUID if the server has more than one destinations." + name: + type: string + description: "The application name." + description: + type: string + description: "The application description." + instant_deploy: + type: boolean + description: "The flag to indicate if the application should be deployed instantly." + use_build_server: + type: boolean + nullable: true + description: "Use build server." + type: object + responses: + "200": + description: "Application created successfully." + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + security: + - bearerAuth: [] + "/applications/{uuid}": + get: + tags: + - Applications + summary: Get + description: "Get application by UUID." + operationId: get-application-by-uuid + parameters: + - name: uuid + in: path + description: "UUID of the application." + required: true + schema: + type: string + format: uuid + responses: + "200": + description: "Get application by UUID." + content: + application/json: + schema: + $ref: "#/components/schemas/Application" + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + security: + - bearerAuth: [] + delete: + tags: + - Applications + summary: Delete + description: "Delete application by UUID." + operationId: delete-application-by-uuid + parameters: + - name: uuid + in: path + description: "UUID of the application." + required: true + schema: + type: string + format: uuid + - name: delete_configurations + in: query + description: "Delete configurations." + required: false + schema: + type: boolean + default: true + - name: delete_volumes + in: query + description: "Delete volumes." + required: false + schema: + type: boolean + default: true + - name: docker_cleanup + in: query + description: "Run docker cleanup." + required: false + schema: + type: boolean + default: true + - name: delete_connected_networks + in: query + description: "Delete connected networks." + required: false + schema: + type: boolean + default: true + responses: + "200": + description: "Application deleted." + content: + application/json: + schema: + properties: + message: { type: string, example: "Application deleted." } + type: object + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + security: + - bearerAuth: [] + patch: + tags: + - Applications + summary: Update + description: "Update application by UUID." + operationId: update-application-by-uuid + parameters: + - name: uuid + in: path + description: "UUID of the application." + required: true + schema: + type: string + format: uuid + requestBody: + description: "Application updated." + required: true + content: + application/json: + schema: + properties: + project_uuid: + type: string + description: "The project UUID." + server_uuid: + type: string + description: "The server UUID." + environment_name: + type: string + description: "The environment name." + github_app_uuid: + type: string + description: "The Github App UUID." + git_repository: + type: string + description: "The git repository URL." + git_branch: + type: string + description: "The git branch." + ports_exposes: + type: string + description: "The ports to expose." + destination_uuid: + type: string + description: "The destination UUID." + build_pack: + type: string + enum: [nixpacks, static, dockerfile, dockercompose] + description: "The build pack type." + name: + type: string + description: "The application name." + description: + type: string + description: "The application description." + domains: + type: string + description: "The application domains." + git_commit_sha: + type: string + description: "The git commit SHA." + docker_registry_image_name: + type: string + description: "The docker registry image name." + docker_registry_image_tag: + type: string + description: "The docker registry image tag." + is_static: + type: boolean + description: "The flag to indicate if the application is static." + install_command: + type: string + description: "The install command." + build_command: + type: string + description: "The build command." + start_command: + type: string + description: "The start command." + ports_mappings: + type: string + description: "The ports mappings." + base_directory: + type: string + description: "The base directory for all commands." + publish_directory: + type: string + description: "The publish directory." + health_check_enabled: + type: boolean + description: "Health check enabled." + health_check_path: + type: string + description: "Health check path." + health_check_port: + type: string + nullable: true + description: "Health check port." + health_check_host: + type: string + nullable: true + description: "Health check host." + health_check_method: + type: string + description: "Health check method." + health_check_return_code: + type: integer + description: "Health check return code." + health_check_scheme: + type: string + description: "Health check scheme." + health_check_response_text: + type: string + nullable: true + description: "Health check response text." + health_check_interval: + type: integer + description: "Health check interval in seconds." + health_check_timeout: + type: integer + description: "Health check timeout in seconds." + health_check_retries: + type: integer + description: "Health check retries count." + health_check_start_period: + type: integer + description: "Health check start period in seconds." + limits_memory: + type: string + description: "Memory limit." + limits_memory_swap: + type: string + description: "Memory swap limit." + limits_memory_swappiness: + type: integer + description: "Memory swappiness." + limits_memory_reservation: + type: string + description: "Memory reservation." + limits_cpus: + type: string + description: "CPU limit." + limits_cpuset: + type: string + nullable: true + description: "CPU set." + limits_cpu_shares: + type: integer + description: "CPU shares." + custom_labels: + type: string + description: "Custom labels." + custom_docker_run_options: + type: string + description: "Custom docker run options." + post_deployment_command: + type: string + description: "Post deployment command." + post_deployment_command_container: + type: string + description: "Post deployment command container." + pre_deployment_command: + type: string + description: "Pre deployment command." + pre_deployment_command_container: + type: string + description: "Pre deployment command container." + manual_webhook_secret_github: + type: string + description: "Manual webhook secret for Github." + manual_webhook_secret_gitlab: + type: string + description: "Manual webhook secret for Gitlab." + manual_webhook_secret_bitbucket: + type: string + description: "Manual webhook secret for Bitbucket." + manual_webhook_secret_gitea: + type: string + description: "Manual webhook secret for Gitea." + redirect: + type: string + nullable: true + description: "How to set redirect with Traefik / Caddy. www<->non-www." + enum: [www, non-www, both] + instant_deploy: + type: boolean + description: "The flag to indicate if the application should be deployed instantly." + dockerfile: + type: string + description: "The Dockerfile content." + docker_compose_location: + type: string + description: "The Docker Compose location." + docker_compose_raw: + type: string + description: "The Docker Compose raw content." + docker_compose_custom_start_command: + type: string + description: "The Docker Compose custom start command." + docker_compose_custom_build_command: + type: string + description: "The Docker Compose custom build command." + docker_compose_domains: + type: array + description: "The Docker Compose domains." + watch_paths: + type: string + description: "The watch paths." + use_build_server: + type: boolean + nullable: true + description: "Use build server." + type: object + responses: + "200": + description: "Application updated." + content: + application/json: + schema: + properties: + uuid: { type: string } + type: object + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + security: + - bearerAuth: [] + "/applications/{uuid}/envs": + get: + tags: + - Applications + summary: "List Envs" + description: "List all envs by application UUID." + operationId: list-envs-by-application-uuid + parameters: + - name: uuid + in: path + description: "UUID of the application." + required: true + schema: + type: string + format: uuid + responses: + "200": + description: "All environment variables by application UUID." + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/EnvironmentVariable" + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + security: + - bearerAuth: [] + post: + tags: + - Applications + summary: "Create Env" + description: "Create env by application UUID." + operationId: create-env-by-application-uuid + parameters: + - name: uuid + in: path + description: "UUID of the application." + required: true + schema: + type: string + format: uuid + requestBody: + description: "Env created." + required: true + content: + application/json: + schema: + properties: + key: + type: string + description: "The key of the environment variable." + value: + type: string + description: "The value of the environment variable." + is_preview: + type: boolean + description: "The flag to indicate if the environment variable is used in preview deployments." + is_build_time: + type: boolean + description: "The flag to indicate if the environment variable is used in build time." + is_literal: + type: boolean + description: "The flag to indicate if the environment variable is a literal, nothing espaced." + is_multiline: + type: boolean + description: "The flag to indicate if the environment variable is multiline." + is_shown_once: + type: boolean + description: "The flag to indicate if the environment variable's value is shown on the UI." + type: object + responses: + "201": + description: "Environment variable created." + content: + application/json: + schema: + properties: + uuid: { type: string, example: nc0k04gk8g0cgsk440g0koko } + type: object + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + security: + - bearerAuth: [] + patch: + tags: + - Applications + summary: "Update Env" + description: "Update env by application UUID." + operationId: update-env-by-application-uuid + parameters: + - name: uuid + in: path + description: "UUID of the application." + required: true + schema: + type: string + format: uuid + requestBody: + description: "Env updated." + required: true + content: + application/json: + schema: + required: + - key + - value + properties: + key: + type: string + description: "The key of the environment variable." + value: + type: string + description: "The value of the environment variable." + is_preview: + type: boolean + description: "The flag to indicate if the environment variable is used in preview deployments." + is_build_time: + type: boolean + description: "The flag to indicate if the environment variable is used in build time." + is_literal: + type: boolean + description: "The flag to indicate if the environment variable is a literal, nothing espaced." + is_multiline: + type: boolean + description: "The flag to indicate if the environment variable is multiline." + is_shown_once: + type: boolean + description: "The flag to indicate if the environment variable's value is shown on the UI." + type: object + responses: + "201": + description: "Environment variable updated." + content: + application/json: + schema: + properties: + message: + { type: string, example: "Environment variable updated." } + type: object + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + security: + - bearerAuth: [] + "/applications/{uuid}/envs/bulk": + patch: + tags: + - Applications + summary: "Update Envs (Bulk)" + description: "Update multiple envs by application UUID." + operationId: update-envs-by-application-uuid + parameters: + - name: uuid + in: path + description: "UUID of the application." + required: true + schema: + type: string + format: uuid + requestBody: + description: "Bulk envs updated." + required: true + content: + application/json: + schema: + required: + - data + properties: + data: + type: array + items: + { + properties: + { + key: + { + type: string, + description: "The key of the environment variable.", + }, + value: + { + type: string, + description: "The value of the environment variable.", + }, + is_preview: + { + type: boolean, + description: "The flag to indicate if the environment variable is used in preview deployments.", + }, + is_build_time: + { + type: boolean, + description: "The flag to indicate if the environment variable is used in build time.", + }, + is_literal: + { + type: boolean, + description: "The flag to indicate if the environment variable is a literal, nothing espaced.", + }, + is_multiline: + { + type: boolean, + description: "The flag to indicate if the environment variable is multiline.", + }, + is_shown_once: + { + type: boolean, + description: "The flag to indicate if the environment variable's value is shown on the UI.", + }, + }, + type: object, + } + type: object + responses: + "201": + description: "Environment variables updated." + content: + application/json: + schema: + properties: + message: + { type: string, example: "Environment variables updated." } + type: object + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + security: + - bearerAuth: [] + "/applications/{uuid}/envs/{env_uuid}": + delete: + tags: + - Applications + summary: "Delete Env" + description: "Delete env by UUID." + operationId: delete-env-by-application-uuid + parameters: + - name: uuid + in: path + description: "UUID of the application." + required: true + schema: + type: string + format: uuid + - name: env_uuid + in: path + description: "UUID of the environment variable." + required: true + schema: + type: string + format: uuid + responses: + "200": + description: "Environment variable deleted." + content: + application/json: + schema: + properties: + message: + { type: string, example: "Environment variable deleted." } + type: object + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + security: + - bearerAuth: [] + "/applications/{uuid}/start": + get: + tags: + - Applications + summary: Start + description: "Start application. `Post` request is also accepted." + operationId: start-application-by-uuid + parameters: + - name: uuid + in: path + description: "UUID of the application." + required: true + schema: + type: string + format: uuid + - name: force + in: query + description: "Force rebuild." + schema: + type: boolean + default: false + - name: instant_deploy + in: query + description: "Instant deploy (skip queuing)." + schema: + type: boolean + default: false + responses: + "200": + description: "Start application." + content: + application/json: + schema: + properties: + message: + { + type: string, + example: "Deployment request queued.", + description: Message., + } + deployment_uuid: + { + type: string, + example: doogksw, + description: "UUID of the deployment.", + } + type: object + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + security: + - bearerAuth: [] + "/applications/{uuid}/stop": + get: + tags: + - Applications + summary: Stop + description: "Stop application. `Post` request is also accepted." + operationId: stop-application-by-uuid + parameters: + - name: uuid + in: path + description: "UUID of the application." + required: true + schema: + type: string + format: uuid + responses: + "200": + description: "Stop application." + content: + application/json: + schema: + properties: + message: + { + type: string, + example: "Application stopping request queued.", + } + type: object + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + security: + - bearerAuth: [] + "/applications/{uuid}/restart": + get: + tags: + - Applications + summary: Restart + description: "Restart application. `Post` request is also accepted." + operationId: restart-application-by-uuid + parameters: + - name: uuid + in: path + description: "UUID of the application." + required: true + schema: + type: string + format: uuid + responses: + "200": + description: "Restart application." + content: + application/json: + schema: + properties: + message: { type: string, example: "Restart request queued." } + deployment_uuid: + { + type: string, + example: doogksw, + description: "UUID of the deployment.", + } + type: object + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + security: + - bearerAuth: [] + "/applications/{uuid}/execute": + post: + tags: + - Applications + summary: "Execute Command" + description: "Execute a command on the application's current container." + operationId: execute-command-application + parameters: + - name: uuid + in: path + description: "UUID of the application." + required: true + schema: + type: string + format: uuid + requestBody: + description: "Command to execute." + required: true + content: + application/json: + schema: + properties: + command: + type: string + description: "Command to execute." + type: object + responses: + "200": + description: "Execute a command on the application's current container." + content: + application/json: + schema: + properties: + message: { type: string, example: "Command executed." } + response: { type: string } + type: object + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + security: + - bearerAuth: [] + /databases: + get: + tags: + - Databases + summary: List + description: "List all databases." + operationId: list-databases + responses: + "200": + description: "Get all databases" + content: + application/json: + schema: + type: string + example: "Content is very complex. Will be implemented later." + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + security: + - bearerAuth: [] + "/databases/{uuid}": + get: + tags: + - Databases + summary: Get + description: "Get database by UUID." + operationId: get-database-by-uuid + parameters: + - name: uuid + in: path + description: "UUID of the database." + required: true + schema: + type: string + format: uuid + responses: + "200": + description: "Get all databases" + content: + application/json: + schema: + type: string + example: "Content is very complex. Will be implemented later." + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + security: + - bearerAuth: [] + delete: + tags: + - Databases + summary: Delete + description: "Delete database by UUID." + operationId: delete-database-by-uuid + parameters: + - name: uuid + in: path + description: "UUID of the database." + required: true + schema: + type: string + format: uuid + - name: delete_configurations + in: query + description: "Delete configurations." + required: false + schema: + type: boolean + default: true + - name: delete_volumes + in: query + description: "Delete volumes." + required: false + schema: + type: boolean + default: true + - name: docker_cleanup + in: query + description: "Run docker cleanup." + required: false + schema: + type: boolean + default: true + - name: delete_connected_networks + in: query + description: "Delete connected networks." + required: false + schema: + type: boolean + default: true + responses: + "200": + description: "Database deleted." + content: + application/json: + schema: + properties: + message: { type: string, example: "Database deleted." } + type: object + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + security: + - bearerAuth: [] + patch: + tags: + - Databases + summary: Update + description: "Update database by UUID." + operationId: update-database-by-uuid + parameters: + - name: uuid + in: path + description: "UUID of the database." + required: true + schema: + type: string + format: uuid + requestBody: + description: "Database data" + required: true + content: + application/json: + schema: + properties: + name: + type: string + description: "Name of the database" + description: + type: string + description: "Description of the database" + image: + type: string + description: "Docker Image of the database" + is_public: + type: boolean + description: "Is the database public?" + public_port: + type: integer + description: "Public port of the database" + limits_memory: + type: string + description: "Memory limit of the database" + limits_memory_swap: + type: string + description: "Memory swap limit of the database" + limits_memory_swappiness: + type: integer + description: "Memory swappiness of the database" + limits_memory_reservation: + type: string + description: "Memory reservation of the database" + limits_cpus: + type: string + description: "CPU limit of the database" + limits_cpuset: + type: string + description: "CPU set of the database" + limits_cpu_shares: + type: integer + description: "CPU shares of the database" + postgres_user: + type: string + description: "PostgreSQL user" + postgres_password: + type: string + description: "PostgreSQL password" + postgres_db: + type: string + description: "PostgreSQL database" + postgres_initdb_args: + type: string + description: "PostgreSQL initdb args" + postgres_host_auth_method: + type: string + description: "PostgreSQL host auth method" + postgres_conf: + type: string + description: "PostgreSQL conf" + clickhouse_admin_user: + type: string + description: "Clickhouse admin user" + clickhouse_admin_password: + type: string + description: "Clickhouse admin password" + dragonfly_password: + type: string + description: "DragonFly password" + redis_password: + type: string + description: "Redis password" + redis_conf: + type: string + description: "Redis conf" + keydb_password: + type: string + description: "KeyDB password" + keydb_conf: + type: string + description: "KeyDB conf" + mariadb_conf: + type: string + description: "MariaDB conf" + mariadb_root_password: + type: string + description: "MariaDB root password" + mariadb_user: + type: string + description: "MariaDB user" + mariadb_password: + type: string + description: "MariaDB password" + mariadb_database: + type: string + description: "MariaDB database" + mongo_conf: + type: string + description: "Mongo conf" + mongo_initdb_root_username: + type: string + description: "Mongo initdb root username" + mongo_initdb_root_password: + type: string + description: "Mongo initdb root password" + mongo_initdb_init_database: + type: string + description: "Mongo initdb init database" + mysql_root_password: + type: string + description: "MySQL root password" + mysql_user: + type: string + description: "MySQL user" + mysql_database: + type: string + description: "MySQL database" + mysql_conf: + type: string + description: "MySQL conf" + type: object + responses: + "200": + description: "Database updated" + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + security: + - bearerAuth: [] + /databases/postgresql: + post: + tags: + - Databases + summary: "Create (PostgreSQL)" + description: "Create a new PostgreSQL database." + operationId: create-database-postgresql + requestBody: + description: "Database data" + required: true + content: + application/json: + schema: + required: + - server_uuid + - project_uuid + - environment_name + properties: + server_uuid: + type: string + description: "UUID of the server" + project_uuid: + type: string + description: "UUID of the project" + environment_name: + type: string + description: "Name of the environment" + postgres_user: + type: string + description: "PostgreSQL user" + postgres_password: + type: string + description: "PostgreSQL password" + postgres_db: + type: string + description: "PostgreSQL database" + postgres_initdb_args: + type: string + description: "PostgreSQL initdb args" + postgres_host_auth_method: + type: string + description: "PostgreSQL host auth method" + postgres_conf: + type: string + description: "PostgreSQL conf" + destination_uuid: + type: string + description: "UUID of the destination if the server has multiple destinations" + name: + type: string + description: "Name of the database" + description: + type: string + description: "Description of the database" + image: + type: string + description: "Docker Image of the database" + is_public: + type: boolean + description: "Is the database public?" + public_port: + type: integer + description: "Public port of the database" + limits_memory: + type: string + description: "Memory limit of the database" + limits_memory_swap: + type: string + description: "Memory swap limit of the database" + limits_memory_swappiness: + type: integer + description: "Memory swappiness of the database" + limits_memory_reservation: + type: string + description: "Memory reservation of the database" + limits_cpus: + type: string + description: "CPU limit of the database" + limits_cpuset: + type: string + description: "CPU set of the database" + limits_cpu_shares: + type: integer + description: "CPU shares of the database" + instant_deploy: + type: boolean + description: "Instant deploy the database" + type: object + responses: + "200": + description: "Database updated" + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + security: + - bearerAuth: [] + /databases/clickhouse: + post: + tags: + - Databases + summary: "Create (Clickhouse)" + description: "Create a new Clickhouse database." + operationId: create-database-clickhouse + requestBody: + description: "Database data" + required: true + content: + application/json: + schema: + required: + - server_uuid + - project_uuid + - environment_name + properties: + server_uuid: + type: string + description: "UUID of the server" + project_uuid: + type: string + description: "UUID of the project" + environment_name: + type: string + description: "Name of the environment" + destination_uuid: + type: string + description: "UUID of the destination if the server has multiple destinations" + clickhouse_admin_user: + type: string + description: "Clickhouse admin user" + clickhouse_admin_password: + type: string + description: "Clickhouse admin password" + name: + type: string + description: "Name of the database" + description: + type: string + description: "Description of the database" + image: + type: string + description: "Docker Image of the database" + is_public: + type: boolean + description: "Is the database public?" + public_port: + type: integer + description: "Public port of the database" + limits_memory: + type: string + description: "Memory limit of the database" + limits_memory_swap: + type: string + description: "Memory swap limit of the database" + limits_memory_swappiness: + type: integer + description: "Memory swappiness of the database" + limits_memory_reservation: + type: string + description: "Memory reservation of the database" + limits_cpus: + type: string + description: "CPU limit of the database" + limits_cpuset: + type: string + description: "CPU set of the database" + limits_cpu_shares: + type: integer + description: "CPU shares of the database" + instant_deploy: + type: boolean + description: "Instant deploy the database" + type: object + responses: + "200": + description: "Database updated" + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + security: + - bearerAuth: [] + /databases/dragonfly: + post: + tags: + - Databases + summary: "Create (DragonFly)" + description: "Create a new DragonFly database." + operationId: create-database-dragonfly + requestBody: + description: "Database data" + required: true + content: + application/json: + schema: + required: + - server_uuid + - project_uuid + - environment_name + properties: + server_uuid: + type: string + description: "UUID of the server" + project_uuid: + type: string + description: "UUID of the project" + environment_name: + type: string + description: "Name of the environment" + destination_uuid: + type: string + description: "UUID of the destination if the server has multiple destinations" + dragonfly_password: + type: string + description: "DragonFly password" + name: + type: string + description: "Name of the database" + description: + type: string + description: "Description of the database" + image: + type: string + description: "Docker Image of the database" + is_public: + type: boolean + description: "Is the database public?" + public_port: + type: integer + description: "Public port of the database" + limits_memory: + type: string + description: "Memory limit of the database" + limits_memory_swap: + type: string + description: "Memory swap limit of the database" + limits_memory_swappiness: + type: integer + description: "Memory swappiness of the database" + limits_memory_reservation: + type: string + description: "Memory reservation of the database" + limits_cpus: + type: string + description: "CPU limit of the database" + limits_cpuset: + type: string + description: "CPU set of the database" + limits_cpu_shares: + type: integer + description: "CPU shares of the database" + instant_deploy: + type: boolean + description: "Instant deploy the database" + type: object + responses: + "200": + description: "Database updated" + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + security: + - bearerAuth: [] + /databases/redis: + post: + tags: + - Databases + summary: "Create (Redis)" + description: "Create a new Redis database." + operationId: create-database-redis + requestBody: + description: "Database data" + required: true + content: + application/json: + schema: + required: + - server_uuid + - project_uuid + - environment_name + properties: + server_uuid: + type: string + description: "UUID of the server" + project_uuid: + type: string + description: "UUID of the project" + environment_name: + type: string + description: "Name of the environment" + destination_uuid: + type: string + description: "UUID of the destination if the server has multiple destinations" + redis_password: + type: string + description: "Redis password" + redis_conf: + type: string + description: "Redis conf" + name: + type: string + description: "Name of the database" + description: + type: string + description: "Description of the database" + image: + type: string + description: "Docker Image of the database" + is_public: + type: boolean + description: "Is the database public?" + public_port: + type: integer + description: "Public port of the database" + limits_memory: + type: string + description: "Memory limit of the database" + limits_memory_swap: + type: string + description: "Memory swap limit of the database" + limits_memory_swappiness: + type: integer + description: "Memory swappiness of the database" + limits_memory_reservation: + type: string + description: "Memory reservation of the database" + limits_cpus: + type: string + description: "CPU limit of the database" + limits_cpuset: + type: string + description: "CPU set of the database" + limits_cpu_shares: + type: integer + description: "CPU shares of the database" + instant_deploy: + type: boolean + description: "Instant deploy the database" + type: object + responses: + "200": + description: "Database updated" + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + security: + - bearerAuth: [] + /databases/keydb: + post: + tags: + - Databases + summary: "Create (KeyDB)" + description: "Create a new KeyDB database." + operationId: create-database-keydb + requestBody: + description: "Database data" + required: true + content: + application/json: + schema: + required: + - server_uuid + - project_uuid + - environment_name + properties: + server_uuid: + type: string + description: "UUID of the server" + project_uuid: + type: string + description: "UUID of the project" + environment_name: + type: string + description: "Name of the environment" + destination_uuid: + type: string + description: "UUID of the destination if the server has multiple destinations" + keydb_password: + type: string + description: "KeyDB password" + keydb_conf: + type: string + description: "KeyDB conf" + name: + type: string + description: "Name of the database" + description: + type: string + description: "Description of the database" + image: + type: string + description: "Docker Image of the database" + is_public: + type: boolean + description: "Is the database public?" + public_port: + type: integer + description: "Public port of the database" + limits_memory: + type: string + description: "Memory limit of the database" + limits_memory_swap: + type: string + description: "Memory swap limit of the database" + limits_memory_swappiness: + type: integer + description: "Memory swappiness of the database" + limits_memory_reservation: + type: string + description: "Memory reservation of the database" + limits_cpus: + type: string + description: "CPU limit of the database" + limits_cpuset: + type: string + description: "CPU set of the database" + limits_cpu_shares: + type: integer + description: "CPU shares of the database" + instant_deploy: + type: boolean + description: "Instant deploy the database" + type: object + responses: + "200": + description: "Database updated" + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + security: + - bearerAuth: [] + /databases/mariadb: + post: + tags: + - Databases + summary: "Create (MariaDB)" + description: "Create a new MariaDB database." + operationId: create-database-mariadb + requestBody: + description: "Database data" + required: true + content: + application/json: + schema: + required: + - server_uuid + - project_uuid + - environment_name + properties: + server_uuid: + type: string + description: "UUID of the server" + project_uuid: + type: string + description: "UUID of the project" + environment_name: + type: string + description: "Name of the environment" + destination_uuid: + type: string + description: "UUID of the destination if the server has multiple destinations" + mariadb_conf: + type: string + description: "MariaDB conf" + mariadb_root_password: + type: string + description: "MariaDB root password" + mariadb_user: + type: string + description: "MariaDB user" + mariadb_password: + type: string + description: "MariaDB password" + mariadb_database: + type: string + description: "MariaDB database" + name: + type: string + description: "Name of the database" + description: + type: string + description: "Description of the database" + image: + type: string + description: "Docker Image of the database" + is_public: + type: boolean + description: "Is the database public?" + public_port: + type: integer + description: "Public port of the database" + limits_memory: + type: string + description: "Memory limit of the database" + limits_memory_swap: + type: string + description: "Memory swap limit of the database" + limits_memory_swappiness: + type: integer + description: "Memory swappiness of the database" + limits_memory_reservation: + type: string + description: "Memory reservation of the database" + limits_cpus: + type: string + description: "CPU limit of the database" + limits_cpuset: + type: string + description: "CPU set of the database" + limits_cpu_shares: + type: integer + description: "CPU shares of the database" + instant_deploy: + type: boolean + description: "Instant deploy the database" + type: object + responses: + "200": + description: "Database updated" + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + security: + - bearerAuth: [] + /databases/mysql: + post: + tags: + - Databases + summary: "Create (MySQL)" + description: "Create a new MySQL database." + operationId: create-database-mysql + requestBody: + description: "Database data" + required: true + content: + application/json: + schema: + required: + - server_uuid + - project_uuid + - environment_name + properties: + server_uuid: + type: string + description: "UUID of the server" + project_uuid: + type: string + description: "UUID of the project" + environment_name: + type: string + description: "Name of the environment" + destination_uuid: + type: string + description: "UUID of the destination if the server has multiple destinations" + mysql_root_password: + type: string + description: "MySQL root password" + mysql_user: + type: string + description: "MySQL user" + mysql_database: + type: string + description: "MySQL database" + mysql_conf: + type: string + description: "MySQL conf" + name: + type: string + description: "Name of the database" + description: + type: string + description: "Description of the database" + image: + type: string + description: "Docker Image of the database" + is_public: + type: boolean + description: "Is the database public?" + public_port: + type: integer + description: "Public port of the database" + limits_memory: + type: string + description: "Memory limit of the database" + limits_memory_swap: + type: string + description: "Memory swap limit of the database" + limits_memory_swappiness: + type: integer + description: "Memory swappiness of the database" + limits_memory_reservation: + type: string + description: "Memory reservation of the database" + limits_cpus: + type: string + description: "CPU limit of the database" + limits_cpuset: + type: string + description: "CPU set of the database" + limits_cpu_shares: + type: integer + description: "CPU shares of the database" + instant_deploy: + type: boolean + description: "Instant deploy the database" + type: object + responses: + "200": + description: "Database updated" + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + security: + - bearerAuth: [] + /databases/mongodb: + post: + tags: + - Databases + summary: "Create (MongoDB)" + description: "Create a new MongoDB database." + operationId: create-database-mongodb + requestBody: + description: "Database data" + required: true + content: + application/json: + schema: + required: + - server_uuid + - project_uuid + - environment_name + properties: + server_uuid: + type: string + description: "UUID of the server" + project_uuid: + type: string + description: "UUID of the project" + environment_name: + type: string + description: "Name of the environment" + destination_uuid: + type: string + description: "UUID of the destination if the server has multiple destinations" + mongo_conf: + type: string + description: "MongoDB conf" + mongo_initdb_root_username: + type: string + description: "MongoDB initdb root username" + name: + type: string + description: "Name of the database" + description: + type: string + description: "Description of the database" + image: + type: string + description: "Docker Image of the database" + is_public: + type: boolean + description: "Is the database public?" + public_port: + type: integer + description: "Public port of the database" + limits_memory: + type: string + description: "Memory limit of the database" + limits_memory_swap: + type: string + description: "Memory swap limit of the database" + limits_memory_swappiness: + type: integer + description: "Memory swappiness of the database" + limits_memory_reservation: + type: string + description: "Memory reservation of the database" + limits_cpus: + type: string + description: "CPU limit of the database" + limits_cpuset: + type: string + description: "CPU set of the database" + limits_cpu_shares: + type: integer + description: "CPU shares of the database" + instant_deploy: + type: boolean + description: "Instant deploy the database" + type: object + responses: + "200": + description: "Database updated" + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + security: + - bearerAuth: [] + "/databases/{uuid}/start": + get: + tags: + - Databases + summary: Start + description: "Start database. `Post` request is also accepted." + operationId: start-database-by-uuid + parameters: + - name: uuid + in: path + description: "UUID of the database." + required: true + schema: + type: string + format: uuid + responses: + "200": + description: "Start database." + content: + application/json: + schema: + properties: + message: + { + type: string, + example: "Database starting request queued.", + } + type: object + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + security: + - bearerAuth: [] + "/databases/{uuid}/stop": + get: + tags: + - Databases + summary: Stop + description: "Stop database. `Post` request is also accepted." + operationId: stop-database-by-uuid + parameters: + - name: uuid + in: path + description: "UUID of the database." + required: true + schema: + type: string + format: uuid + responses: + "200": + description: "Stop database." + content: + application/json: + schema: + properties: + message: + { + type: string, + example: "Database stopping request queued.", + } + type: object + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + security: + - bearerAuth: [] + "/databases/{uuid}/restart": + get: + tags: + - Databases + summary: Restart + description: "Restart database. `Post` request is also accepted." + operationId: restart-database-by-uuid + parameters: + - name: uuid + in: path + description: "UUID of the database." + required: true + schema: + type: string + format: uuid + responses: + "200": + description: "Restart database." + content: + application/json: + schema: + properties: + message: + { + type: string, + example: "Database restaring request queued.", + } + type: object + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + security: + - bearerAuth: [] + /deployments: + get: + tags: + - Deployments + summary: List + description: "List currently running deployments" + operationId: list-deployments + responses: + "200": + description: "Get all currently running deployments." + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/ApplicationDeploymentQueue" + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + security: + - bearerAuth: [] + "/deployments/{uuid}": + get: + tags: + - Deployments + summary: Get + description: "Get deployment by UUID." + operationId: get-deployment-by-uuid + parameters: + - name: uuid + in: path + description: "Deployment UUID" + required: true + schema: + type: string + responses: + "200": + description: "Get deployment by UUID." + content: + application/json: + schema: + $ref: "#/components/schemas/ApplicationDeploymentQueue" + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + security: + - bearerAuth: [] + /deploy: + get: + tags: + - Deployments + summary: Deploy + description: "Deploy by tag or uuid. `Post` request also accepted." + operationId: deploy-by-tag-or-uuid + parameters: + - name: tag + in: query + description: "Tag name(s). Comma separated list is also accepted." + schema: + type: string + - name: uuid + in: query + description: "Resource UUID(s). Comma separated list is also accepted." + schema: + type: string + - name: force + in: query + description: "Force rebuild (without cache)" + schema: + type: boolean + responses: + "200": + description: "Get deployment(s) UUID's" + content: + application/json: + schema: + properties: + deployments: + { + type: array, + items: + { + properties: + { + message: { type: string }, + resource_uuid: { type: string }, + deployment_uuid: { type: string }, + }, + type: object, + }, + } + type: object + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + security: + - bearerAuth: [] + /version: + get: + summary: Version + description: "Get Coolify version." + operationId: version + responses: + "200": + description: "Returns the version of the application" + content: + application/json: + schema: + type: string + example: v4.0.0 + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + security: + - bearerAuth: [] + /enable: + get: + summary: "Enable API" + description: "Enable API (only with root permissions)." + operationId: enable-api + responses: + "200": + description: "Enable API." + content: + application/json: + schema: + properties: + message: { type: string, example: "API enabled." } + type: object + "403": + description: "You are not allowed to enable the API." + content: + application/json: + schema: + properties: + message: + { + type: string, + example: "You are not allowed to enable the API.", + } + type: object + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + security: + - bearerAuth: [] + /disable: + get: + summary: "Disable API" + description: "Disable API (only with root permissions)." + operationId: disable-api + responses: + "200": + description: "Disable API." + content: + application/json: + schema: + properties: + message: { type: string, example: "API disabled." } + type: object + "403": + description: "You are not allowed to disable the API." + content: + application/json: + schema: + properties: + message: + { + type: string, + example: "You are not allowed to disable the API.", + } + type: object + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + security: + - bearerAuth: [] + /health: + get: + summary: Healthcheck + description: "Healthcheck endpoint." + operationId: healthcheck + responses: + "200": + description: "Healthcheck endpoint." + content: + application/json: + schema: + type: string + example: OK + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + /projects: + get: + tags: + - Projects + summary: List + description: "List projects." + operationId: list-projects + responses: + "200": + description: "Get all projects." + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Project" + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + security: + - bearerAuth: [] + post: + tags: + - Projects + summary: Create + description: "Create Project." + operationId: create-project + requestBody: + description: "Project created." + required: true + content: + application/json: + schema: + properties: + name: + type: string + description: "The name of the project." + description: + type: string + description: "The description of the project." + type: object + responses: + "201": + description: "Project created." + content: + application/json: + schema: + properties: + uuid: + { + type: string, + example: og888os, + description: "The UUID of the project.", + } + type: object + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + security: + - bearerAuth: [] + "/projects/{uuid}": + get: + tags: + - Projects + summary: Get + description: "Get project by UUID." + operationId: get-project-by-uuid + parameters: + - name: uuid + in: path + description: "Project UUID" + required: true + schema: + type: string + responses: + "200": + description: "Project details" + content: + application/json: + schema: + $ref: "#/components/schemas/Project" + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + description: "Project not found." + security: + - bearerAuth: [] + delete: + tags: + - Projects + summary: Delete + description: "Delete project by UUID." + operationId: delete-project-by-uuid + parameters: + - name: uuid + in: path + description: "UUID of the application." + required: true + schema: + type: string + format: uuid + responses: + "200": + description: "Project deleted." + content: + application/json: + schema: + properties: + message: { type: string, example: "Project deleted." } + type: object + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + security: + - bearerAuth: [] + patch: + tags: + - Projects + summary: Update + description: "Update Project." + operationId: update-project-by-uuid + parameters: + - name: uuid + in: path + description: "UUID of the application." + required: true + schema: + type: string + format: uuid + requestBody: + description: "Project updated." + required: true + content: + application/json: + schema: + properties: + name: + type: string + description: "The name of the project." + description: + type: string + description: "The description of the project." + type: object + responses: + "201": + description: "Project updated." + content: + application/json: + schema: + properties: + uuid: { type: string, example: og888os } + name: { type: string, example: "Project Name" } + description: { type: string, example: "Project Description" } + type: object + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + security: + - bearerAuth: [] + "/projects/{uuid}/{environment_name}": + get: + tags: + - Projects + summary: Environment + description: "Get environment by name." + operationId: get-environment-by-name + parameters: + - name: uuid + in: path + description: "Project UUID" + required: true + schema: + type: string + - name: environment_name + in: path + description: "Environment name" + required: true + schema: + type: string + responses: + "200": + description: "Environment details" + content: + application/json: + schema: + $ref: "#/components/schemas/Environment" + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + security: + - bearerAuth: [] + /resources: + get: + tags: + - Resources + summary: List + description: "Get all resources." + operationId: list-resources + responses: + "200": + description: "Get all resources" + content: + application/json: + schema: + type: string + example: "Content is very complex. Will be implemented later." + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + security: + - bearerAuth: [] + /security/keys: + get: + tags: + - "Private Keys" + summary: List + description: "List all private keys." + operationId: list-private-keys + responses: + "200": + description: "Get all private keys." + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/PrivateKey" + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + security: + - bearerAuth: [] + post: + tags: + - "Private Keys" + summary: Create + description: "Create a new private key." + operationId: create-private-key + requestBody: + required: true + content: + application/json: + schema: + required: + - private_key + properties: + name: + type: string + description: + type: string + private_key: + type: string + type: object + additionalProperties: false + responses: + "201": + description: "The created private key's UUID." + content: + application/json: + schema: + properties: + uuid: { type: string } + type: object + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + security: + - bearerAuth: [] + patch: + tags: + - "Private Keys" + summary: Update + description: "Update a private key." + operationId: update-private-key + requestBody: + required: true + content: + application/json: + schema: + required: + - private_key + properties: + name: + type: string + description: + type: string + private_key: + type: string + type: object + additionalProperties: false + responses: + "201": + description: "The updated private key's UUID." + content: + application/json: + schema: + properties: + uuid: { type: string } + type: object + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + security: + - bearerAuth: [] + "/security/keys/{uuid}": + get: + tags: + - "Private Keys" + summary: Get + description: "Get key by UUID." + operationId: get-private-key-by-uuid + parameters: + - name: uuid + in: path + description: "Private Key UUID" + required: true + schema: + type: string + responses: + "200": + description: "Get all private keys." + content: + application/json: + schema: + $ref: "#/components/schemas/PrivateKey" + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + description: "Private Key not found." + security: + - bearerAuth: [] + delete: + tags: + - "Private Keys" + summary: Delete + description: "Delete a private key." + operationId: delete-private-key-by-uuid + parameters: + - name: uuid + in: path + description: "Private Key UUID" + required: true + schema: + type: string + responses: + "200": + description: "Private Key deleted." + content: + application/json: + schema: + properties: + message: { type: string, example: "Private Key deleted." } + type: object + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + description: "Private Key not found." + security: + - bearerAuth: [] + /servers: + get: + tags: + - Servers + summary: List + description: "List all servers." + operationId: list-servers + responses: + "200": + description: "Get all servers." + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Server" + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + security: + - bearerAuth: [] + post: + tags: + - Servers + summary: Create + description: "Create Server." + operationId: create-server + requestBody: + description: "Server created." + required: true + content: + application/json: + schema: + properties: + name: + type: string + example: "My Server" + description: "The name of the server." + description: + type: string + example: "My Server Description" + description: "The description of the server." + ip: + type: string + example: 127.0.0.1 + description: "The IP of the server." + port: + type: integer + example: 22 + description: "The port of the server." + user: + type: string + example: root + description: "The user of the server." + private_key_uuid: + type: string + example: og888os + description: "The UUID of the private key." + is_build_server: + type: boolean + example: false + description: "Is build server." + instant_validate: + type: boolean + example: false + description: "Instant validate." + proxy_type: + type: string + enum: [traefik, caddy, none] + example: traefik + description: "The proxy type." + type: object + responses: + "201": + description: "Server created." + content: + application/json: + schema: + properties: + uuid: + { + type: string, + example: og888os, + description: "The UUID of the server.", + } + type: object + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + security: + - bearerAuth: [] + "/servers/{uuid}": + get: + tags: + - Servers + summary: Get + description: "Get server by UUID." + operationId: get-server-by-uuid + parameters: + - name: uuid + in: path + description: "Server's UUID" + required: true + schema: + type: string + responses: + "200": + description: "Get server by UUID" + content: + application/json: + schema: + $ref: "#/components/schemas/Server" + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + security: + - bearerAuth: [] + delete: + tags: + - Servers + summary: Delete + description: "Delete server by UUID." + operationId: delete-server-by-uuid + parameters: + - name: uuid + in: path + description: "UUID of the server." + required: true + schema: + type: string + format: uuid + responses: + "200": + description: "Server deleted." + content: + application/json: + schema: + properties: + message: { type: string, example: "Server deleted." } + type: object + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + security: + - bearerAuth: [] + patch: + tags: + - Servers + summary: Update + description: "Update Server." + operationId: update-server-by-uuid + parameters: + - name: uuid + in: path + description: "Server's UUID" + required: true + schema: + type: string + requestBody: + description: "Server updated." + required: true + content: + application/json: + schema: + properties: + name: + type: string + description: "The name of the server." + description: + type: string + description: "The description of the server." + ip: + type: string + description: "The IP of the server." + port: + type: integer + description: "The port of the server." + user: + type: string + description: "The user of the server." + private_key_uuid: + type: string + description: "The UUID of the private key." + is_build_server: + type: boolean + description: "Is build server." + instant_validate: + type: boolean + description: "Instant validate." + proxy_type: + type: string + enum: [traefik, caddy, none] + description: "The proxy type." + type: object + responses: + "201": + description: "Server updated." + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Server" + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + security: + - bearerAuth: [] + "/servers/{uuid}/resources": + get: + tags: + - Servers + summary: Resources + description: "Get resources by server." + operationId: get-resources-by-server-uuid + parameters: + - name: uuid + in: path + description: "Server's UUID" + required: true + schema: + type: string + responses: + "200": + description: "Get resources by server" + content: + application/json: + schema: + type: array + items: + properties: + { + id: { type: integer }, + uuid: { type: string }, + name: { type: string }, + type: { type: string }, + created_at: { type: string }, + updated_at: { type: string }, + status: { type: string }, + } + type: object + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + security: + - bearerAuth: [] + "/servers/{uuid}/domains": + get: + tags: + - Servers + summary: Domains + description: "Get domains by server." + operationId: get-domains-by-server-uuid + parameters: + - name: uuid + in: path + description: "Server's UUID" + required: true + schema: + type: string + responses: + "200": + description: "Get domains by server" + content: + application/json: + schema: + type: array + items: + properties: + { + ip: { type: string }, + domains: { type: array, items: { type: string } }, + } + type: object + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + security: + - bearerAuth: [] + "/servers/{uuid}/validate": + get: + tags: + - Servers + summary: Validate + description: "Validate server by UUID." + operationId: validate-server-by-uuid + parameters: + - name: uuid + in: path + description: "Server UUID" + required: true + schema: + type: string + responses: + "201": + description: "Server validation started." + content: + application/json: + schema: + properties: + message: { type: string, example: "Validation started." } + type: object + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + security: + - bearerAuth: [] + /services: + get: + tags: + - Services + summary: List + description: "List all services." + operationId: list-services + responses: + "200": + description: "Get all services" + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Service" + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + security: + - bearerAuth: [] + post: + tags: + - Services + summary: Create + description: "Create a one-click service" + operationId: create-service + requestBody: + required: true + content: + application/json: + schema: + required: + - server_uuid + - project_uuid + - environment_name + - type + properties: + type: + description: "The one-click service type" + type: string + enum: + [ + activepieces, + appsmith, + appwrite, + authentik, + babybuddy, + budge, + changedetection, + chatwoot, + classicpress-with-mariadb, + classicpress-with-mysql, + classicpress-without-database, + cloudflared, + code-server, + dashboard, + directus, + directus-with-postgresql, + docker-registry, + docuseal, + docuseal-with-postgres, + dokuwiki, + duplicati, + emby, + embystat, + fider, + filebrowser, + firefly, + formbricks, + ghost, + gitea, + gitea-with-mariadb, + gitea-with-mysql, + gitea-with-postgresql, + glance, + glances, + glitchtip, + grafana, + grafana-with-postgresql, + grocy, + heimdall, + homepage, + jellyfin, + jenkins, + kuzzle, + listmonk, + logto, + mediawiki, + meilisearch, + metabase, + metube, + minio, + moodle, + mosquitto, + n8n, + n8n-with-postgresql, + next-image-transformation, + nextcloud, + nocodb, + odoo, + openblocks, + pairdrop, + penpot, + phpmyadmin, + pocketbase, + posthog, + reactive-resume, + rocketchat, + shlink, + slash, + snapdrop, + statusnook, + stirling-pdf, + supabase, + syncthing, + tolgee, + trigger, + trigger-with-external-database, + twenty, + umami, + unleash-with-postgresql, + unleash-without-database, + uptime-kuma, + vaultwarden, + vikunja, + weblate, + whoogle, + wordpress-with-mariadb, + wordpress-with-mysql, + wordpress-without-database, + ] + name: + type: string + maxLength: 255 + description: "Name of the service." + description: + type: string + nullable: true + description: "Description of the service." + project_uuid: + type: string + description: "Project UUID." + environment_name: + type: string + description: "Environment name." + server_uuid: + type: string + description: "Server UUID." + destination_uuid: + type: string + description: "Destination UUID. Required if server has multiple destinations." + instant_deploy: + type: boolean + default: false + description: "Start the service immediately after creation." + type: object + responses: + "201": + description: "Create a service." + content: + application/json: + schema: + properties: + uuid: { type: string, description: "Service UUID." } + domains: + { + type: array, + items: { type: string }, + description: "Service domains.", + } + type: object + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + security: + - bearerAuth: [] + "/services/{uuid}": + get: + tags: + - Services + summary: Get + description: "Get service by UUID." + operationId: get-service-by-uuid + parameters: + - name: uuid + in: path + description: "Service UUID" + required: true + schema: + type: string + responses: + "200": + description: "Get a service by UUID." + content: + application/json: + schema: + $ref: "#/components/schemas/Service" + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + security: + - bearerAuth: [] + delete: + tags: + - Services + summary: Delete + description: "Delete service by UUID." + operationId: delete-service-by-uuid + parameters: + - name: uuid + in: path + description: "Service UUID" + required: true + schema: + type: string + - name: delete_configurations + in: query + description: "Delete configurations." + required: false + schema: + type: boolean + default: true + - name: delete_volumes + in: query + description: "Delete volumes." + required: false + schema: + type: boolean + default: true + - name: docker_cleanup + in: query + description: "Run docker cleanup." + required: false + schema: + type: boolean + default: true + - name: delete_connected_networks + in: query + description: "Delete connected networks." + required: false + schema: + type: boolean + default: true + responses: + "200": + description: "Delete a service by UUID" + content: + application/json: + schema: + properties: + message: + { + type: string, + example: "Service deletion request queued.", + } + type: object + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + security: + - bearerAuth: [] + "/services/{uuid}/envs": + get: + tags: + - Services + summary: "List Envs" + description: "List all envs by service UUID." + operationId: list-envs-by-service-uuid + parameters: + - name: uuid + in: path + description: "UUID of the service." + required: true + schema: + type: string + format: uuid + responses: + "200": + description: "All environment variables by service UUID." + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/EnvironmentVariable" + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + security: + - bearerAuth: [] + post: + tags: + - Services + summary: "Create Env" + description: "Create env by service UUID." + operationId: create-env-by-service-uuid + parameters: + - name: uuid + in: path + description: "UUID of the service." + required: true + schema: + type: string + format: uuid + requestBody: + description: "Env created." + required: true + content: + application/json: + schema: + properties: + key: + type: string + description: "The key of the environment variable." + value: + type: string + description: "The value of the environment variable." + is_preview: + type: boolean + description: "The flag to indicate if the environment variable is used in preview deployments." + is_build_time: + type: boolean + description: "The flag to indicate if the environment variable is used in build time." + is_literal: + type: boolean + description: "The flag to indicate if the environment variable is a literal, nothing espaced." + is_multiline: + type: boolean + description: "The flag to indicate if the environment variable is multiline." + is_shown_once: + type: boolean + description: "The flag to indicate if the environment variable's value is shown on the UI." + type: object + responses: + "201": + description: "Environment variable created." + content: + application/json: + schema: + properties: + uuid: { type: string, example: nc0k04gk8g0cgsk440g0koko } + type: object + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + security: + - bearerAuth: [] + patch: + tags: + - Services + summary: "Update Env" + description: "Update env by service UUID." + operationId: update-env-by-service-uuid + parameters: + - name: uuid + in: path + description: "UUID of the service." + required: true + schema: + type: string + format: uuid + requestBody: + description: "Env updated." + required: true + content: + application/json: + schema: + required: + - key + - value + properties: + key: + type: string + description: "The key of the environment variable." + value: + type: string + description: "The value of the environment variable." + is_preview: + type: boolean + description: "The flag to indicate if the environment variable is used in preview deployments." + is_build_time: + type: boolean + description: "The flag to indicate if the environment variable is used in build time." + is_literal: + type: boolean + description: "The flag to indicate if the environment variable is a literal, nothing espaced." + is_multiline: + type: boolean + description: "The flag to indicate if the environment variable is multiline." + is_shown_once: + type: boolean + description: "The flag to indicate if the environment variable's value is shown on the UI." + type: object + responses: + "201": + description: "Environment variable updated." + content: + application/json: + schema: + properties: + message: + { type: string, example: "Environment variable updated." } + type: object + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + security: + - bearerAuth: [] + "/services/{uuid}/envs/bulk": + patch: + tags: + - Services + summary: "Update Envs (Bulk)" + description: "Update multiple envs by service UUID." + operationId: update-envs-by-service-uuid + parameters: + - name: uuid + in: path + description: "UUID of the service." + required: true + schema: + type: string + format: uuid + requestBody: + description: "Bulk envs updated." + required: true + content: + application/json: + schema: + required: + - data + properties: + data: + type: array + items: + { + properties: + { + key: + { + type: string, + description: "The key of the environment variable.", + }, + value: + { + type: string, + description: "The value of the environment variable.", + }, + is_preview: + { + type: boolean, + description: "The flag to indicate if the environment variable is used in preview deployments.", + }, + is_build_time: + { + type: boolean, + description: "The flag to indicate if the environment variable is used in build time.", + }, + is_literal: + { + type: boolean, + description: "The flag to indicate if the environment variable is a literal, nothing espaced.", + }, + is_multiline: + { + type: boolean, + description: "The flag to indicate if the environment variable is multiline.", + }, + is_shown_once: + { + type: boolean, + description: "The flag to indicate if the environment variable's value is shown on the UI.", + }, + }, + type: object, + } + type: object + responses: + "201": + description: "Environment variables updated." + content: + application/json: + schema: + properties: + message: + { type: string, example: "Environment variables updated." } + type: object + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + security: + - bearerAuth: [] + "/services/{uuid}/envs/{env_uuid}": + delete: + tags: + - Services + summary: "Delete Env" + description: "Delete env by UUID." + operationId: delete-env-by-service-uuid + parameters: + - name: uuid + in: path + description: "UUID of the service." + required: true + schema: + type: string + format: uuid + - name: env_uuid + in: path + description: "UUID of the environment variable." + required: true + schema: + type: string + format: uuid + responses: + "200": + description: "Environment variable deleted." + content: + application/json: + schema: + properties: + message: + { type: string, example: "Environment variable deleted." } + type: object + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + security: + - bearerAuth: [] + "/services/{uuid}/start": + get: + tags: + - Services + summary: Start + description: "Start service. `Post` request is also accepted." + operationId: start-service-by-uuid + parameters: + - name: uuid + in: path + description: "UUID of the service." + required: true + schema: + type: string + format: uuid + responses: + "200": + description: "Start service." + content: + application/json: + schema: + properties: + message: + { + type: string, + example: "Service starting request queued.", + } + type: object + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + security: + - bearerAuth: [] + "/services/{uuid}/stop": + get: + tags: + - Services + summary: Stop + description: "Stop service. `Post` request is also accepted." + operationId: stop-service-by-uuid + parameters: + - name: uuid + in: path + description: "UUID of the service." + required: true + schema: + type: string + format: uuid + responses: + "200": + description: "Stop service." + content: + application/json: + schema: + properties: + message: + { + type: string, + example: "Service stopping request queued.", + } + type: object + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + security: + - bearerAuth: [] + "/services/{uuid}/restart": + get: + tags: + - Services + summary: Restart + description: "Restart service. `Post` request is also accepted." + operationId: restart-service-by-uuid + parameters: + - name: uuid + in: path + description: "UUID of the service." + required: true + schema: + type: string + format: uuid + responses: + "200": + description: "Restart service." + content: + application/json: + schema: + properties: + message: + { + type: string, + example: "Service restaring request queued.", + } + type: object + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + security: + - bearerAuth: [] + /teams: + get: + tags: + - Teams + summary: List + description: "Get all teams." + operationId: list-teams + responses: + "200": + description: "List of teams." + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Team" + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + security: + - bearerAuth: [] + "/teams/{id}": + get: + tags: + - Teams + summary: Get + description: "Get team by TeamId." + operationId: get-team-by-id + parameters: + - name: id + in: path + description: "Team ID" + required: true + schema: + type: integer + responses: + "200": + description: "List of teams." + content: + application/json: + schema: + $ref: "#/components/schemas/Team" + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + security: + - bearerAuth: [] + "/teams/{id}/members": + get: + tags: + - Teams + summary: Members + description: "Get members by TeamId." + operationId: get-members-by-team-id + parameters: + - name: id + in: path + description: "Team ID" + required: true + schema: + type: integer + responses: + "200": + description: "List of members." + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/User" + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + security: + - bearerAuth: [] + /teams/current: + get: + tags: + - Teams + summary: "Authenticated Team" + description: "Get currently authenticated team." + operationId: get-current-team + responses: + "200": + description: "Current Team." + content: + application/json: + schema: + $ref: "#/components/schemas/Team" + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + security: + - bearerAuth: [] + /teams/current/members: + get: + tags: + - Teams + summary: "Authenticated Team Members" + description: "Get currently authenticated team members." + operationId: get-current-team-members + responses: + "200": + description: "Currently authenticated team members." + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/User" + "401": + $ref: "#/components/responses/Unauthenticated" + "400": + $ref: "#/components/responses/BadRequest" + security: + - bearerAuth: [] +components: + schemas: + Application: + description: "Application model" + properties: + id: + type: integer + description: "The application identifier in the database." + description: + type: string + nullable: true + description: "The application description." + repository_project_id: + type: integer + nullable: true + description: "The repository project identifier." + uuid: + type: string + description: "The application UUID." + name: + type: string + description: "The application name." + fqdn: + type: string + nullable: true + description: "The application domains." + config_hash: + type: string + description: "Configuration hash." + git_repository: + type: string + description: "Git repository URL." + git_branch: + type: string + description: "Git branch." + git_commit_sha: + type: string + description: "Git commit SHA." + git_full_url: + type: string + nullable: true + description: "Git full URL." + docker_registry_image_name: + type: string + nullable: true + description: "Docker registry image name." + docker_registry_image_tag: + type: string + nullable: true + description: "Docker registry image tag." + build_pack: + type: string + description: "Build pack." + enum: + - nixpacks + - static + - dockerfile + - dockercompose + static_image: + type: string + description: "Static image used when static site is deployed." + install_command: + type: string + description: "Install command." + build_command: + type: string + description: "Build command." + start_command: + type: string + description: "Start command." + ports_exposes: + type: string + description: "Ports exposes." + ports_mappings: + type: string + nullable: true + description: "Ports mappings." + base_directory: + type: string + description: "Base directory for all commands." + publish_directory: + type: string + description: "Publish directory." + health_check_enabled: + type: boolean + description: "Health check enabled." + health_check_path: + type: string + description: "Health check path." + health_check_port: + type: string + nullable: true + description: "Health check port." + health_check_host: + type: string + nullable: true + description: "Health check host." + health_check_method: + type: string + description: "Health check method." + health_check_return_code: + type: integer + description: "Health check return code." + health_check_scheme: + type: string + description: "Health check scheme." + health_check_response_text: + type: string + nullable: true + description: "Health check response text." + health_check_interval: + type: integer + description: "Health check interval in seconds." + health_check_timeout: + type: integer + description: "Health check timeout in seconds." + health_check_retries: + type: integer + description: "Health check retries count." + health_check_start_period: + type: integer + description: "Health check start period in seconds." + limits_memory: + type: string + description: "Memory limit." + limits_memory_swap: + type: string + description: "Memory swap limit." + limits_memory_swappiness: + type: integer + description: "Memory swappiness." + limits_memory_reservation: + type: string + description: "Memory reservation." + limits_cpus: + type: string + description: "CPU limit." + limits_cpuset: + type: string + nullable: true + description: "CPU set." + limits_cpu_shares: + type: integer + description: "CPU shares." + status: + type: string + description: "Application status." + preview_url_template: + type: string + description: "Preview URL template." + destination_type: + type: string + description: "Destination type." + destination_id: + type: integer + description: "Destination identifier." + source_id: + type: integer + nullable: true + description: "Source identifier." + private_key_id: + type: integer + nullable: true + description: "Private key identifier." + environment_id: + type: integer + description: "Environment identifier." + dockerfile: + type: string + nullable: true + description: "Dockerfile content. Used for dockerfile build pack." + dockerfile_location: + type: string + description: "Dockerfile location." + custom_labels: + type: string + nullable: true + description: "Custom labels." + dockerfile_target_build: + type: string + nullable: true + description: "Dockerfile target build." + manual_webhook_secret_github: + type: string + nullable: true + description: "Manual webhook secret for GitHub." + manual_webhook_secret_gitlab: + type: string + nullable: true + description: "Manual webhook secret for GitLab." + manual_webhook_secret_bitbucket: + type: string + nullable: true + description: "Manual webhook secret for Bitbucket." + manual_webhook_secret_gitea: + type: string + nullable: true + description: "Manual webhook secret for Gitea." + docker_compose_location: + type: string + description: "Docker compose location." + docker_compose: + type: string + nullable: true + description: "Docker compose content. Used for docker compose build pack." + docker_compose_raw: + type: string + nullable: true + description: "Docker compose raw content." + docker_compose_domains: + type: string + nullable: true + description: "Docker compose domains." + docker_compose_custom_start_command: + type: string + nullable: true + description: "Docker compose custom start command." + docker_compose_custom_build_command: + type: string + nullable: true + description: "Docker compose custom build command." + swarm_replicas: + type: integer + nullable: true + description: "Swarm replicas. Only used for swarm deployments." + swarm_placement_constraints: + type: string + nullable: true + description: "Swarm placement constraints. Only used for swarm deployments." + custom_docker_run_options: + type: string + nullable: true + description: "Custom docker run options." + post_deployment_command: + type: string + nullable: true + description: "Post deployment command." + post_deployment_command_container: + type: string + nullable: true + description: "Post deployment command container." + pre_deployment_command: + type: string + nullable: true + description: "Pre deployment command." + pre_deployment_command_container: + type: string + nullable: true + description: "Pre deployment command container." + watch_paths: + type: string + nullable: true + description: "Watch paths." + custom_healthcheck_found: + type: boolean + description: "Custom healthcheck found." + redirect: + type: string + nullable: true + description: "How to set redirect with Traefik / Caddy. www<->non-www." + enum: + - www + - non-www + - both + created_at: + type: string + format: date-time + description: "The date and time when the application was created." + updated_at: + type: string + format: date-time + description: "The date and time when the application was last updated." + deleted_at: + type: string + format: date-time + nullable: true + description: "The date and time when the application was deleted." + compose_parsing_version: + type: string + description: "How Coolify parse the compose file." + custom_nginx_configuration: + type: string + nullable: true + description: "Custom Nginx configuration base64 encoded." + type: object + ApplicationDeploymentQueue: + description: "Project model" + properties: + id: + type: integer + application_id: + type: string + deployment_uuid: + type: string + pull_request_id: + type: integer + force_rebuild: + type: boolean + commit: + type: string + status: + type: string + is_webhook: + type: boolean + is_api: + type: boolean + created_at: + type: string + updated_at: + type: string + logs: + type: string + current_process_id: + type: string + restart_only: + type: boolean + git_type: + type: string + server_id: + type: integer + application_name: + type: string + server_name: + type: string + deployment_url: + type: string + destination_id: + type: string + only_this_server: + type: boolean + rollback: + type: boolean + commit_message: + type: string + type: object + Environment: + description: "Environment model" + properties: + id: + type: integer + name: + type: string + project_id: + type: integer + created_at: + type: string + updated_at: + type: string + description: + type: string + type: object + EnvironmentVariable: + description: "Environment Variable model" + properties: + id: + type: integer + uuid: + type: string + application_id: + type: integer + service_id: + type: integer + database_id: + type: integer + is_build_time: + type: boolean + is_literal: + type: boolean + is_multiline: + type: boolean + is_preview: + type: boolean + is_shared: + type: boolean + is_shown_once: + type: boolean + key: + type: string + value: + type: string + real_value: + type: string + version: + type: string + created_at: + type: string + updated_at: + type: string + type: object + PrivateKey: + description: "Private Key model" + properties: + id: + type: integer + uuid: + type: string + name: + type: string + description: + type: string + private_key: + type: string + format: private-key + is_git_related: + type: boolean + team_id: + type: integer + created_at: + type: string + updated_at: + type: string + type: object + Project: + description: "Project model" + properties: + id: + type: integer + uuid: + type: string + name: + type: string + description: + type: string + environments: + description: "The environments of the project." + type: array + items: + $ref: "#/components/schemas/Environment" + type: object + Server: + description: "Server model" + properties: + id: + type: integer + description: "The server ID." + uuid: + type: string + description: "The server UUID." + name: + type: string + description: "The server name." + description: + type: string + description: "The server description." + ip: + type: string + description: "The IP address." + user: + type: string + description: "The user." + port: + type: integer + description: "The port number." + proxy: + type: object + description: "The proxy configuration." + proxy_type: + type: string + enum: + - traefik + - caddy + - none + description: "The proxy type." + high_disk_usage_notification_sent: + type: boolean + description: "The flag to indicate if the high disk usage notification has been sent." + unreachable_notification_sent: + type: boolean + description: "The flag to indicate if the unreachable notification has been sent." + unreachable_count: + type: integer + description: "The unreachable count for your server." + validation_logs: + type: string + description: "The validation logs." + log_drain_notification_sent: + type: boolean + description: "The flag to indicate if the log drain notification has been sent." + swarm_cluster: + type: string + description: "The swarm cluster configuration." + delete_unused_volumes: + type: boolean + description: "The flag to indicate if the unused volumes should be deleted." + delete_unused_networks: + type: boolean + description: "The flag to indicate if the unused networks should be deleted." + type: object + ServerSetting: + description: "Server Settings model" + properties: + id: + type: integer + concurrent_builds: + type: integer + dynamic_timeout: + type: integer + force_disabled: + type: boolean + force_server_cleanup: + type: boolean + is_build_server: + type: boolean + is_cloudflare_tunnel: + type: boolean + is_jump_server: + type: boolean + is_logdrain_axiom_enabled: + type: boolean + is_logdrain_custom_enabled: + type: boolean + is_logdrain_highlight_enabled: + type: boolean + is_logdrain_newrelic_enabled: + type: boolean + is_metrics_enabled: + type: boolean + is_reachable: + type: boolean + is_sentinel_enabled: + type: boolean + is_swarm_manager: + type: boolean + is_swarm_worker: + type: boolean + is_usable: + type: boolean + logdrain_axiom_api_key: + type: string + logdrain_axiom_dataset_name: + type: string + logdrain_custom_config: + type: string + logdrain_custom_config_parser: + type: string + logdrain_highlight_project_id: + type: string + logdrain_newrelic_base_uri: + type: string + logdrain_newrelic_license_key: + type: string + sentinel_metrics_history_days: + type: integer + sentinel_metrics_refresh_rate_seconds: + type: integer + sentinel_token: + type: string + docker_cleanup_frequency: + type: string + docker_cleanup_threshold: + type: integer + server_id: + type: integer + wildcard_domain: + type: string + created_at: + type: string + updated_at: + type: string + type: object + Service: + description: "Service model" + properties: + id: + type: integer + description: "The unique identifier of the service. Only used for database identification." + uuid: + type: string + description: "The unique identifier of the service." + name: + type: string + description: "The name of the service." + environment_id: + type: integer + description: "The unique identifier of the environment where the service is attached to." + server_id: + type: integer + description: "The unique identifier of the server where the service is running." + description: + type: string + description: "The description of the service." + docker_compose_raw: + type: string + description: "The raw docker-compose.yml file of the service." + docker_compose: + type: string + description: "The docker-compose.yml file that is parsed and modified by Coolify." + destination_type: + type: string + description: "Destination type." + destination_id: + type: integer + description: "The unique identifier of the destination where the service is running." + connect_to_docker_network: + type: boolean + description: "The flag to connect the service to the predefined Docker network." + is_container_label_escape_enabled: + type: boolean + description: "The flag to enable the container label escape." + is_container_label_readonly_enabled: + type: boolean + description: "The flag to enable the container label readonly." + config_hash: + type: string + description: "The hash of the service configuration." + service_type: + type: string + description: "The type of the service." + created_at: + type: string + description: "The date and time when the service was created." + updated_at: + type: string + description: "The date and time when the service was last updated." + deleted_at: + type: string + description: "The date and time when the service was deleted." + type: object + Team: + description: "Team model" + properties: + id: + type: integer + description: "The unique identifier of the team." + name: + type: string + description: "The name of the team." + description: + type: string + description: "The description of the team." + personal_team: + type: boolean + description: "Whether the team is personal or not." + created_at: + type: string + description: "The date and time the team was created." + updated_at: + type: string + description: "The date and time the team was last updated." + smtp_enabled: + type: boolean + description: "Whether SMTP is enabled or not." + smtp_from_address: + type: string + description: "The email address to send emails from." + smtp_from_name: + type: string + description: "The name to send emails from." + smtp_recipients: + type: string + description: "The email addresses to send emails to." + smtp_host: + type: string + description: "The SMTP host." + smtp_port: + type: string + description: "The SMTP port." + smtp_encryption: + type: string + description: "The SMTP encryption." + smtp_username: + type: string + description: "The SMTP username." + smtp_password: + type: string + description: "The SMTP password." + smtp_timeout: + type: string + description: "The SMTP timeout." + smtp_notifications_test: + type: boolean + description: "Whether to send test notifications via SMTP." + smtp_notifications_deployments: + type: boolean + description: "Whether to send deployment notifications via SMTP." + smtp_notifications_status_changes: + type: boolean + description: "Whether to send status change notifications via SMTP." + smtp_notifications_scheduled_tasks: + type: boolean + description: "Whether to send scheduled task notifications via SMTP." + smtp_notifications_database_backups: + type: boolean + description: "Whether to send database backup notifications via SMTP." + smtp_notifications_server_disk_usage: + type: boolean + description: "Whether to send server disk usage notifications via SMTP." + discord_enabled: + type: boolean + description: "Whether Discord is enabled or not." + discord_webhook_url: + type: string + description: "The Discord webhook URL." + discord_notifications_test: + type: boolean + description: "Whether to send test notifications via Discord." + discord_notifications_deployments: + type: boolean + description: "Whether to send deployment notifications via Discord." + discord_notifications_status_changes: + type: boolean + description: "Whether to send status change notifications via Discord." + discord_notifications_database_backups: + type: boolean + description: "Whether to send database backup notifications via Discord." + discord_notifications_scheduled_tasks: + type: boolean + description: "Whether to send scheduled task notifications via Discord." + discord_notifications_server_disk_usage: + type: boolean + description: "Whether to send server disk usage notifications via Discord." + show_boarding: + type: boolean + description: "Whether to show the boarding screen or not." + resend_enabled: + type: boolean + description: "Whether to enable resending or not." + resend_api_key: + type: string + description: "The resending API key." + use_instance_email_settings: + type: boolean + description: "Whether to use instance email settings or not." + telegram_enabled: + type: boolean + description: "Whether Telegram is enabled or not." + telegram_token: + type: string + description: "The Telegram token." + telegram_chat_id: + type: string + description: "The Telegram chat ID." + telegram_notifications_test: + type: boolean + description: "Whether to send test notifications via Telegram." + telegram_notifications_deployments: + type: boolean + description: "Whether to send deployment notifications via Telegram." + telegram_notifications_status_changes: + type: boolean + description: "Whether to send status change notifications via Telegram." + telegram_notifications_database_backups: + type: boolean + description: "Whether to send database backup notifications via Telegram." + telegram_notifications_test_message_thread_id: + type: string + description: "The Telegram test message thread ID." + telegram_notifications_deployments_message_thread_id: + type: string + description: "The Telegram deployment message thread ID." + telegram_notifications_status_changes_message_thread_id: + type: string + description: "The Telegram status change message thread ID." + telegram_notifications_database_backups_message_thread_id: + type: string + description: "The Telegram database backup message thread ID." + custom_server_limit: + type: string + description: "The custom server limit." + telegram_notifications_scheduled_tasks: + type: boolean + description: "Whether to send scheduled task notifications via Telegram." + telegram_notifications_scheduled_tasks_thread_id: + type: string + description: "The Telegram scheduled task message thread ID." + members: + description: "The members of the team." + type: array + items: + $ref: "#/components/schemas/User" + type: object + User: + description: "User model" + properties: + id: + type: integer + description: "The user identifier in the database." + name: + type: string + description: "The user name." + email: + type: string + description: "The user email." + email_verified_at: + type: string + description: "The date when the user email was verified." + created_at: + type: string + description: "The date when the user was created." + updated_at: + type: string + description: "The date when the user was updated." + two_factor_confirmed_at: + type: string + description: "The date when the user two factor was confirmed." + force_password_reset: + type: boolean + description: "The flag to force the user to reset the password." + marketing_emails: + type: boolean + description: "The flag to receive marketing emails." + type: object + responses: + BadRequest: + description: "Invalid token." + content: + application/json: + schema: + properties: + message: + type: string + example: "Invalid token." + type: object + Unauthenticated: + description: Unauthenticated. + content: + application/json: + schema: + properties: + message: + type: string + example: Unauthenticated. + type: object + NotFound: + description: "Resource not found." + content: + application/json: + schema: + properties: + message: + type: string + example: "Resource not found." + type: object + securitySchemes: + bearerAuth: + type: http + description: "Go to `Keys & Tokens` / `API tokens` and create a new token. Use the token as the bearer token." + scheme: bearer +tags: + - name: Applications + description: Applications + - name: Databases + description: Databases + - name: Deployments + description: Deployments + - name: Projects + description: Projects + - name: Resources + description: Resources + - name: "Private Keys" + description: "Private Keys" + - name: Servers + description: Servers + - name: Services + description: Services + - name: Teams + description: Teams diff --git a/README.md b/README.md new file mode 100644 index 0000000..7dc754f --- /dev/null +++ b/README.md @@ -0,0 +1,629 @@ +
+ +

Coolify Typescript SDK

+

Self-hosting with superpowers.

+

Developer-friendly & type-safe Typescript SDK specifically catered to leverage the Coolify 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 + + + + + +## Table of Contents + +* [SDK Installation](#sdk-installation) +* [Requirements](#requirements) +* [SDK Example Usage](#sdk-example-usage) +* [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) +* [Authentication](#authentication) +* [Debugging](#debugging) + + + +## SDK Installation + +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 https://github.com/LukeHagar/Coolify-TypeScript-SDK +``` + +### PNPM + +```bash +pnpm add https://github.com/LukeHagar/Coolify-TypeScript-SDK +``` + +### Bun + +```bash +bun add https://github.com/LukeHagar/Coolify-TypeScript-SDK +``` + +### Yarn + +```bash +yarn add https://github.com/LukeHagar/Coolify-TypeScript-SDK zod + +# Note that Yarn does not install peer dependencies automatically. You will need +# to install zod as shown above. +``` + + + +## Requirements + +For supported JavaScript runtimes, please consult [RUNTIMES.md](RUNTIMES.md). + + + +## SDK Example Usage + +### Example + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.applications.list(); + + // Handle the result + console.log(result); +} + +run(); + +``` + + + +## Available Resources and Operations + +
+Available methods + +### [api](docs/sdks/api/README.md) + +* [enable](docs/sdks/api/README.md#enable) - Enable API +* [disable](docs/sdks/api/README.md#disable) - Disable API + +### [applications](docs/sdks/applications/README.md) + +* [list](docs/sdks/applications/README.md#list) - List +* [createPublic](docs/sdks/applications/README.md#createpublic) - Create (Public) +* [createPrivateGithubApp](docs/sdks/applications/README.md#createprivategithubapp) - Create (Private - GH App) +* [createPrivateDeployKey](docs/sdks/applications/README.md#createprivatedeploykey) - Create (Private - Deploy Key) +* [createDockerfile](docs/sdks/applications/README.md#createdockerfile) - Create (Dockerfile) +* [createDockerImage](docs/sdks/applications/README.md#createdockerimage) - Create (Docker Image) +* [createDockerCompose](docs/sdks/applications/README.md#createdockercompose) - Create (Docker Compose) +* [get](docs/sdks/applications/README.md#get) - Get +* [delete](docs/sdks/applications/README.md#delete) - Delete +* [update](docs/sdks/applications/README.md#update) - Update +* [listEnvs](docs/sdks/applications/README.md#listenvs) - List Envs +* [createEnv](docs/sdks/applications/README.md#createenv) - Create Env +* [updateEnv](docs/sdks/applications/README.md#updateenv) - Update Env +* [updateEnvsBulk](docs/sdks/applications/README.md#updateenvsbulk) - Update Envs (Bulk) +* [deleteEnv](docs/sdks/applications/README.md#deleteenv) - Delete Env +* [start](docs/sdks/applications/README.md#start) - Start +* [stop](docs/sdks/applications/README.md#stop) - Stop +* [restart](docs/sdks/applications/README.md#restart) - Restart +* [executeCommand](docs/sdks/applications/README.md#executecommand) - Execute Command + + +### [databases](docs/sdks/databases/README.md) + +* [list](docs/sdks/databases/README.md#list) - List +* [get](docs/sdks/databases/README.md#get) - Get +* [delete](docs/sdks/databases/README.md#delete) - Delete +* [update](docs/sdks/databases/README.md#update) - Update +* [createPostgresql](docs/sdks/databases/README.md#createpostgresql) - Create (PostgreSQL) +* [createClickhouse](docs/sdks/databases/README.md#createclickhouse) - Create (Clickhouse) +* [createDragonfly](docs/sdks/databases/README.md#createdragonfly) - Create (DragonFly) +* [createRedis](docs/sdks/databases/README.md#createredis) - Create (Redis) +* [createKeydb](docs/sdks/databases/README.md#createkeydb) - Create (KeyDB) +* [createMariadb](docs/sdks/databases/README.md#createmariadb) - Create (MariaDB) +* [createMysql](docs/sdks/databases/README.md#createmysql) - Create (MySQL) +* [createMongodb](docs/sdks/databases/README.md#createmongodb) - Create (MongoDB) +* [start](docs/sdks/databases/README.md#start) - Start +* [stop](docs/sdks/databases/README.md#stop) - Stop +* [restart](docs/sdks/databases/README.md#restart) - Restart + +### [deployments](docs/sdks/deployments/README.md) + +* [list](docs/sdks/deployments/README.md#list) - List +* [get](docs/sdks/deployments/README.md#get) - Get +* [deployByTagOrUuid](docs/sdks/deployments/README.md#deploybytagoruuid) - Deploy + +### [health](docs/sdks/health/README.md) + +* [check](docs/sdks/health/README.md#check) - Healthcheck + +### [privateKeys](docs/sdks/privatekeys/README.md) + +* [list](docs/sdks/privatekeys/README.md#list) - List +* [create](docs/sdks/privatekeys/README.md#create) - Create +* [update](docs/sdks/privatekeys/README.md#update) - Update +* [get](docs/sdks/privatekeys/README.md#get) - Get +* [delete](docs/sdks/privatekeys/README.md#delete) - Delete + +### [projects](docs/sdks/projects/README.md) + +* [list](docs/sdks/projects/README.md#list) - List +* [create](docs/sdks/projects/README.md#create) - Create +* [get](docs/sdks/projects/README.md#get) - Get +* [delete](docs/sdks/projects/README.md#delete) - Delete +* [update](docs/sdks/projects/README.md#update) - Update +* [getEnvironment](docs/sdks/projects/README.md#getenvironment) - Environment + +### [resources](docs/sdks/resources/README.md) + +* [list](docs/sdks/resources/README.md#list) - List + +### [servers](docs/sdks/servers/README.md) + +* [list](docs/sdks/servers/README.md#list) - List +* [create](docs/sdks/servers/README.md#create) - Create +* [get](docs/sdks/servers/README.md#get) - Get +* [delete](docs/sdks/servers/README.md#delete) - Delete +* [update](docs/sdks/servers/README.md#update) - Update +* [getResources](docs/sdks/servers/README.md#getresources) - Resources +* [getDomains](docs/sdks/servers/README.md#getdomains) - Domains +* [validate](docs/sdks/servers/README.md#validate) - Validate + +### [services](docs/sdks/services/README.md) + +* [list](docs/sdks/services/README.md#list) - List +* [create](docs/sdks/services/README.md#create) - Create +* [get](docs/sdks/services/README.md#get) - Get +* [delete](docs/sdks/services/README.md#delete) - Delete +* [listEnvs](docs/sdks/services/README.md#listenvs) - List Envs +* [createEnv](docs/sdks/services/README.md#createenv) - Create Env +* [updateEnv](docs/sdks/services/README.md#updateenv) - Update Env +* [updateEnvsBulk](docs/sdks/services/README.md#updateenvsbulk) - Update Envs (Bulk) +* [deleteEnv](docs/sdks/services/README.md#deleteenv) - Delete Env +* [start](docs/sdks/services/README.md#start) - Start +* [stop](docs/sdks/services/README.md#stop) - Stop +* [restart](docs/sdks/services/README.md#restart) - Restart + +### [teams](docs/sdks/teams/README.md) + +* [list](docs/sdks/teams/README.md#list) - List +* [get](docs/sdks/teams/README.md#get) - Get +* [getMembers](docs/sdks/teams/README.md#getmembers) - Members +* [getCurrent](docs/sdks/teams/README.md#getcurrent) - Authenticated Team +* [getCurrentMembers](docs/sdks/teams/README.md#getcurrentmembers) - Authenticated Team Members + +### [version](docs/sdks/version/README.md) + +* [get](docs/sdks/version/README.md#get) - Version + +
+ + + +## 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 + +- [`apiDisable`](docs/sdks/api/README.md#disable) - Disable API +- [`apiEnable`](docs/sdks/api/README.md#enable) - Enable API +- [`applicationsCreateDockerCompose`](docs/sdks/applications/README.md#createdockercompose) - Create (Docker Compose) +- [`applicationsCreateDockerfile`](docs/sdks/applications/README.md#createdockerfile) - Create (Dockerfile) +- [`applicationsCreateDockerImage`](docs/sdks/applications/README.md#createdockerimage) - Create (Docker Image) +- [`applicationsCreateEnv`](docs/sdks/applications/README.md#createenv) - Create Env +- [`applicationsCreatePrivateDeployKey`](docs/sdks/applications/README.md#createprivatedeploykey) - Create (Private - Deploy Key) +- [`applicationsCreatePrivateGithubApp`](docs/sdks/applications/README.md#createprivategithubapp) - Create (Private - GH App) +- [`applicationsCreatePublic`](docs/sdks/applications/README.md#createpublic) - Create (Public) +- [`applicationsDelete`](docs/sdks/applications/README.md#delete) - Delete +- [`applicationsDeleteEnv`](docs/sdks/applications/README.md#deleteenv) - Delete Env +- [`applicationsExecuteCommand`](docs/sdks/applications/README.md#executecommand) - Execute Command +- [`applicationsGet`](docs/sdks/applications/README.md#get) - Get +- [`applicationsList`](docs/sdks/applications/README.md#list) - List +- [`applicationsListEnvs`](docs/sdks/applications/README.md#listenvs) - List Envs +- [`applicationsRestart`](docs/sdks/applications/README.md#restart) - Restart +- [`applicationsStart`](docs/sdks/applications/README.md#start) - Start +- [`applicationsStop`](docs/sdks/applications/README.md#stop) - Stop +- [`applicationsUpdate`](docs/sdks/applications/README.md#update) - Update +- [`applicationsUpdateEnv`](docs/sdks/applications/README.md#updateenv) - Update Env +- [`applicationsUpdateEnvsBulk`](docs/sdks/applications/README.md#updateenvsbulk) - Update Envs (Bulk) +- [`databasesCreateClickhouse`](docs/sdks/databases/README.md#createclickhouse) - Create (Clickhouse) +- [`databasesCreateDragonfly`](docs/sdks/databases/README.md#createdragonfly) - Create (DragonFly) +- [`databasesCreateKeydb`](docs/sdks/databases/README.md#createkeydb) - Create (KeyDB) +- [`databasesCreateMariadb`](docs/sdks/databases/README.md#createmariadb) - Create (MariaDB) +- [`databasesCreateMongodb`](docs/sdks/databases/README.md#createmongodb) - Create (MongoDB) +- [`databasesCreateMysql`](docs/sdks/databases/README.md#createmysql) - Create (MySQL) +- [`databasesCreatePostgresql`](docs/sdks/databases/README.md#createpostgresql) - Create (PostgreSQL) +- [`databasesCreateRedis`](docs/sdks/databases/README.md#createredis) - Create (Redis) +- [`databasesDelete`](docs/sdks/databases/README.md#delete) - Delete +- [`databasesGet`](docs/sdks/databases/README.md#get) - Get +- [`databasesList`](docs/sdks/databases/README.md#list) - List +- [`databasesRestart`](docs/sdks/databases/README.md#restart) - Restart +- [`databasesStart`](docs/sdks/databases/README.md#start) - Start +- [`databasesStop`](docs/sdks/databases/README.md#stop) - Stop +- [`databasesUpdate`](docs/sdks/databases/README.md#update) - Update +- [`deploymentsDeployByTagOrUuid`](docs/sdks/deployments/README.md#deploybytagoruuid) - Deploy +- [`deploymentsGet`](docs/sdks/deployments/README.md#get) - Get +- [`deploymentsList`](docs/sdks/deployments/README.md#list) - List +- [`healthCheck`](docs/sdks/health/README.md#check) - Healthcheck +- [`privateKeysCreate`](docs/sdks/privatekeys/README.md#create) - Create +- [`privateKeysDelete`](docs/sdks/privatekeys/README.md#delete) - Delete +- [`privateKeysGet`](docs/sdks/privatekeys/README.md#get) - Get +- [`privateKeysList`](docs/sdks/privatekeys/README.md#list) - List +- [`privateKeysUpdate`](docs/sdks/privatekeys/README.md#update) - Update +- [`projectsCreate`](docs/sdks/projects/README.md#create) - Create +- [`projectsDelete`](docs/sdks/projects/README.md#delete) - Delete +- [`projectsGet`](docs/sdks/projects/README.md#get) - Get +- [`projectsGetEnvironment`](docs/sdks/projects/README.md#getenvironment) - Environment +- [`projectsList`](docs/sdks/projects/README.md#list) - List +- [`projectsUpdate`](docs/sdks/projects/README.md#update) - Update +- [`resourcesList`](docs/sdks/resources/README.md#list) - List +- [`serversCreate`](docs/sdks/servers/README.md#create) - Create +- [`serversDelete`](docs/sdks/servers/README.md#delete) - Delete +- [`serversGet`](docs/sdks/servers/README.md#get) - Get +- [`serversGetDomains`](docs/sdks/servers/README.md#getdomains) - Domains +- [`serversGetResources`](docs/sdks/servers/README.md#getresources) - Resources +- [`serversList`](docs/sdks/servers/README.md#list) - List +- [`serversUpdate`](docs/sdks/servers/README.md#update) - Update +- [`serversValidate`](docs/sdks/servers/README.md#validate) - Validate +- [`servicesCreate`](docs/sdks/services/README.md#create) - Create +- [`servicesCreateEnv`](docs/sdks/services/README.md#createenv) - Create Env +- [`servicesDelete`](docs/sdks/services/README.md#delete) - Delete +- [`servicesDeleteEnv`](docs/sdks/services/README.md#deleteenv) - Delete Env +- [`servicesGet`](docs/sdks/services/README.md#get) - Get +- [`servicesList`](docs/sdks/services/README.md#list) - List +- [`servicesListEnvs`](docs/sdks/services/README.md#listenvs) - List Envs +- [`servicesRestart`](docs/sdks/services/README.md#restart) - Restart +- [`servicesStart`](docs/sdks/services/README.md#start) - Start +- [`servicesStop`](docs/sdks/services/README.md#stop) - Stop +- [`servicesUpdateEnv`](docs/sdks/services/README.md#updateenv) - Update Env +- [`servicesUpdateEnvsBulk`](docs/sdks/services/README.md#updateenvsbulk) - Update Envs (Bulk) +- [`teamsGet`](docs/sdks/teams/README.md#get) - Get +- [`teamsGetCurrent`](docs/sdks/teams/README.md#getcurrent) - Authenticated Team +- [`teamsGetCurrentMembers`](docs/sdks/teams/README.md#getcurrentmembers) - Authenticated Team Members +- [`teamsGetMembers`](docs/sdks/teams/README.md#getmembers) - Members +- [`teamsList`](docs/sdks/teams/README.md#list) - List +- [`versionGet`](docs/sdks/version/README.md#get) - Version + +
+ + + +## 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 { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.applications.list({ + retries: { + strategy: "backoff", + backoff: { + initialInterval: 1, + maxInterval: 50, + exponent: 1.1, + maxElapsedTime: 100, + }, + retryConnectionErrors: false, + }, + }); + + // Handle the result + 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 { Coolify } from "coolify"; + +const coolify = new Coolify({ + retryConfig: { + strategy: "backoff", + backoff: { + initialInterval: 1, + maxInterval: 50, + exponent: 1.1, + maxElapsedTime: 100, + }, + retryConnectionErrors: false, + }, + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.applications.list(); + + // Handle the result + console.log(result); +} + +run(); + +``` + + + +## Error Handling + +All SDK methods return a response object or throw an error. By default, an API error will throw a `errors.APIError`. + +If a HTTP request fails, an operation my also throw an error from the `models/errors/httpclienterrors.ts` module: + +| HTTP Client Error | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | +| RequestAbortedError | HTTP request was aborted by the client | +| RequestTimeoutError | HTTP request timed out due to an AbortSignal signal | +| ConnectionError | HTTP client was unable to make a request to a server | +| InvalidRequestError | Any input used to create a request is invalid | +| UnexpectedClientError | Unrecognised or unexpected error | + +In addition, when custom error responses are specified for an operation, the SDK may throw their associated Error type. You can refer to respective *Errors* tables in SDK docs for more details on possible error types for each operation. For example, the `list` method may throw the following errors: + +| Error Type | Status Code | Content Type | +| -------------------------- | --------------------------------- | ---------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +```typescript +import { Coolify } from "coolify"; +import { + BadRequest, + InternalServerError, + NotFound, + RateLimited, + SDKValidationError, + Timeout, + Unauthenticated, +} from "coolify/models/errors"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + let result; + try { + result = await coolify.applications.list(); + + // Handle the result + console.log(result); + } catch (err) { + switch (true) { + case (err instanceof SDKValidationError): { + // Validation errors can be pretty-printed + console.error(err.pretty()); + // Raw value may also be inspected + console.error(err.rawValue); + return; + } + case (err instanceof BadRequest): { + // Handle err.data$: BadRequestData + console.error(err); + return; + } + case (err instanceof Unauthenticated): { + // Handle err.data$: UnauthenticatedData + console.error(err); + return; + } + case (err instanceof NotFound): { + // Handle err.data$: NotFoundData + console.error(err); + return; + } + case (err instanceof Timeout): { + // Handle err.data$: TimeoutData + console.error(err); + return; + } + case (err instanceof RateLimited): { + // Handle err.data$: RateLimitedData + console.error(err); + return; + } + case (err instanceof InternalServerError): { + // Handle err.data$: InternalServerErrorData + console.error(err); + return; + } + default: { + throw err; + } + } + } +} + +run(); + +``` + +Validation errors can also occur when either method arguments or data returned from the server do not match the expected format. The `SDKValidationError` that is thrown as a result will capture the raw value that failed validation in an attribute called `rawValue`. Additionally, a `pretty()` method is available on this error that can be used to log a nicely formatted string since validation errors can list many issues and the plain error string may be difficult read when debugging. + + + +## Server Selection + +### Override Server URL Per-Client + +The default server can also be overridden globally by passing a URL to the `serverURL: string` optional parameter when initializing the SDK client instance. For example: +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + serverURL: "https://app.coolify.io/api/v1", + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.applications.list(); + + // Handle the result + 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 { Coolify } from "coolify"; +import { HTTPClient } from "coolify/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 Coolify({ httpClient }); +``` + + + +## Authentication + +### Per-Client Security Schemes + +This SDK supports the following security scheme globally: + +| Name | Type | Scheme | Environment Variable | +| ------------ | ---- | ----------- | --------------------- | +| `bearerAuth` | http | HTTP Bearer | `COOLIFY_BEARER_AUTH` | + +To authenticate with the API the `bearerAuth` parameter must be set when initializing the SDK client instance. For example: +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.applications.list(); + + // Handle the result + console.log(result); +} + +run(); + +``` + + + +## 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 { Coolify } from "coolify"; + +const sdk = new Coolify({ debugLogger: console }); +``` + +You can also enable a default debug logger by setting an environment variable `COOLIFY_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=coolify&utm_campaign=typescript) diff --git a/RUNTIMES.md b/RUNTIMES.md new file mode 100644 index 0000000..d08a0c0 --- /dev/null +++ b/RUNTIMES.md @@ -0,0 +1,22 @@ +# Supported JavaScript runtimes + +This SDK is intended to be used in JavaScript runtimes that support 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 diff --git a/USAGE.md b/USAGE.md new file mode 100644 index 0000000..675fb97 --- /dev/null +++ b/USAGE.md @@ -0,0 +1,19 @@ + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.applications.list(); + + // Handle the result + 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/components/application.md b/docs/models/components/application.md new file mode 100644 index 0000000..fae7247 --- /dev/null +++ b/docs/models/components/application.md @@ -0,0 +1,93 @@ +# Application + +Application model + +## Example Usage + +```typescript +import { Application } from "coolify/models/components"; + +let value: Application = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `id` | *number* | :heavy_minus_sign: | The application identifier in the database. | +| `description` | *string* | :heavy_minus_sign: | The application description. | +| `repositoryProjectId` | *number* | :heavy_minus_sign: | The repository project identifier. | +| `uuid` | *string* | :heavy_minus_sign: | The application UUID. | +| `name` | *string* | :heavy_minus_sign: | The application name. | +| `fqdn` | *string* | :heavy_minus_sign: | The application domains. | +| `configHash` | *string* | :heavy_minus_sign: | Configuration hash. | +| `gitRepository` | *string* | :heavy_minus_sign: | Git repository URL. | +| `gitBranch` | *string* | :heavy_minus_sign: | Git branch. | +| `gitCommitSha` | *string* | :heavy_minus_sign: | Git commit SHA. | +| `gitFullUrl` | *string* | :heavy_minus_sign: | Git full URL. | +| `dockerRegistryImageName` | *string* | :heavy_minus_sign: | Docker registry image name. | +| `dockerRegistryImageTag` | *string* | :heavy_minus_sign: | Docker registry image tag. | +| `buildPack` | [components.BuildPack](../../models/components/buildpack.md) | :heavy_minus_sign: | Build pack. | +| `staticImage` | *string* | :heavy_minus_sign: | Static image used when static site is deployed. | +| `installCommand` | *string* | :heavy_minus_sign: | Install command. | +| `buildCommand` | *string* | :heavy_minus_sign: | Build command. | +| `startCommand` | *string* | :heavy_minus_sign: | Start command. | +| `portsExposes` | *string* | :heavy_minus_sign: | Ports exposes. | +| `portsMappings` | *string* | :heavy_minus_sign: | Ports mappings. | +| `baseDirectory` | *string* | :heavy_minus_sign: | Base directory for all commands. | +| `publishDirectory` | *string* | :heavy_minus_sign: | Publish directory. | +| `healthCheckEnabled` | *boolean* | :heavy_minus_sign: | Health check enabled. | +| `healthCheckPath` | *string* | :heavy_minus_sign: | Health check path. | +| `healthCheckPort` | *string* | :heavy_minus_sign: | Health check port. | +| `healthCheckHost` | *string* | :heavy_minus_sign: | Health check host. | +| `healthCheckMethod` | *string* | :heavy_minus_sign: | Health check method. | +| `healthCheckReturnCode` | *number* | :heavy_minus_sign: | Health check return code. | +| `healthCheckScheme` | *string* | :heavy_minus_sign: | Health check scheme. | +| `healthCheckResponseText` | *string* | :heavy_minus_sign: | Health check response text. | +| `healthCheckInterval` | *number* | :heavy_minus_sign: | Health check interval in seconds. | +| `healthCheckTimeout` | *number* | :heavy_minus_sign: | Health check timeout in seconds. | +| `healthCheckRetries` | *number* | :heavy_minus_sign: | Health check retries count. | +| `healthCheckStartPeriod` | *number* | :heavy_minus_sign: | Health check start period in seconds. | +| `limitsMemory` | *string* | :heavy_minus_sign: | Memory limit. | +| `limitsMemorySwap` | *string* | :heavy_minus_sign: | Memory swap limit. | +| `limitsMemorySwappiness` | *number* | :heavy_minus_sign: | Memory swappiness. | +| `limitsMemoryReservation` | *string* | :heavy_minus_sign: | Memory reservation. | +| `limitsCpus` | *string* | :heavy_minus_sign: | CPU limit. | +| `limitsCpuset` | *string* | :heavy_minus_sign: | CPU set. | +| `limitsCpuShares` | *number* | :heavy_minus_sign: | CPU shares. | +| `status` | *string* | :heavy_minus_sign: | Application status. | +| `previewUrlTemplate` | *string* | :heavy_minus_sign: | Preview URL template. | +| `destinationType` | *string* | :heavy_minus_sign: | Destination type. | +| `destinationId` | *number* | :heavy_minus_sign: | Destination identifier. | +| `sourceId` | *number* | :heavy_minus_sign: | Source identifier. | +| `privateKeyId` | *number* | :heavy_minus_sign: | Private key identifier. | +| `environmentId` | *number* | :heavy_minus_sign: | Environment identifier. | +| `dockerfile` | *string* | :heavy_minus_sign: | Dockerfile content. Used for dockerfile build pack. | +| `dockerfileLocation` | *string* | :heavy_minus_sign: | Dockerfile location. | +| `customLabels` | *string* | :heavy_minus_sign: | Custom labels. | +| `dockerfileTargetBuild` | *string* | :heavy_minus_sign: | Dockerfile target build. | +| `manualWebhookSecretGithub` | *string* | :heavy_minus_sign: | Manual webhook secret for GitHub. | +| `manualWebhookSecretGitlab` | *string* | :heavy_minus_sign: | Manual webhook secret for GitLab. | +| `manualWebhookSecretBitbucket` | *string* | :heavy_minus_sign: | Manual webhook secret for Bitbucket. | +| `manualWebhookSecretGitea` | *string* | :heavy_minus_sign: | Manual webhook secret for Gitea. | +| `dockerComposeLocation` | *string* | :heavy_minus_sign: | Docker compose location. | +| `dockerCompose` | *string* | :heavy_minus_sign: | Docker compose content. Used for docker compose build pack. | +| `dockerComposeRaw` | *string* | :heavy_minus_sign: | Docker compose raw content. | +| `dockerComposeDomains` | *string* | :heavy_minus_sign: | Docker compose domains. | +| `dockerComposeCustomStartCommand` | *string* | :heavy_minus_sign: | Docker compose custom start command. | +| `dockerComposeCustomBuildCommand` | *string* | :heavy_minus_sign: | Docker compose custom build command. | +| `swarmReplicas` | *number* | :heavy_minus_sign: | Swarm replicas. Only used for swarm deployments. | +| `swarmPlacementConstraints` | *string* | :heavy_minus_sign: | Swarm placement constraints. Only used for swarm deployments. | +| `customDockerRunOptions` | *string* | :heavy_minus_sign: | Custom docker run options. | +| `postDeploymentCommand` | *string* | :heavy_minus_sign: | Post deployment command. | +| `postDeploymentCommandContainer` | *string* | :heavy_minus_sign: | Post deployment command container. | +| `preDeploymentCommand` | *string* | :heavy_minus_sign: | Pre deployment command. | +| `preDeploymentCommandContainer` | *string* | :heavy_minus_sign: | Pre deployment command container. | +| `watchPaths` | *string* | :heavy_minus_sign: | Watch paths. | +| `customHealthcheckFound` | *boolean* | :heavy_minus_sign: | Custom healthcheck found. | +| `redirect` | [components.Redirect](../../models/components/redirect.md) | :heavy_minus_sign: | How to set redirect with Traefik / Caddy. www<->non-www. | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The date and time when the application was created. | +| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The date and time when the application was last updated. | +| `deletedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The date and time when the application was deleted. | +| `composeParsingVersion` | *string* | :heavy_minus_sign: | How Coolify parse the compose file. | +| `customNginxConfiguration` | *string* | :heavy_minus_sign: | Custom Nginx configuration base64 encoded. | \ No newline at end of file diff --git a/docs/models/components/applicationdeploymentqueue.md b/docs/models/components/applicationdeploymentqueue.md new file mode 100644 index 0000000..24295c9 --- /dev/null +++ b/docs/models/components/applicationdeploymentqueue.md @@ -0,0 +1,39 @@ +# ApplicationDeploymentQueue + +Project model + +## Example Usage + +```typescript +import { ApplicationDeploymentQueue } from "coolify/models/components"; + +let value: ApplicationDeploymentQueue = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `applicationId` | *string* | :heavy_minus_sign: | N/A | +| `deploymentUuid` | *string* | :heavy_minus_sign: | N/A | +| `pullRequestId` | *number* | :heavy_minus_sign: | N/A | +| `forceRebuild` | *boolean* | :heavy_minus_sign: | N/A | +| `commit` | *string* | :heavy_minus_sign: | N/A | +| `status` | *string* | :heavy_minus_sign: | N/A | +| `isWebhook` | *boolean* | :heavy_minus_sign: | N/A | +| `isApi` | *boolean* | :heavy_minus_sign: | N/A | +| `createdAt` | *string* | :heavy_minus_sign: | N/A | +| `updatedAt` | *string* | :heavy_minus_sign: | N/A | +| `logs` | *string* | :heavy_minus_sign: | N/A | +| `currentProcessId` | *string* | :heavy_minus_sign: | N/A | +| `restartOnly` | *boolean* | :heavy_minus_sign: | N/A | +| `gitType` | *string* | :heavy_minus_sign: | N/A | +| `serverId` | *number* | :heavy_minus_sign: | N/A | +| `applicationName` | *string* | :heavy_minus_sign: | N/A | +| `serverName` | *string* | :heavy_minus_sign: | N/A | +| `deploymentUrl` | *string* | :heavy_minus_sign: | N/A | +| `destinationId` | *string* | :heavy_minus_sign: | N/A | +| `onlyThisServer` | *boolean* | :heavy_minus_sign: | N/A | +| `rollback` | *boolean* | :heavy_minus_sign: | N/A | +| `commitMessage` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/buildpack.md b/docs/models/components/buildpack.md new file mode 100644 index 0000000..f243488 --- /dev/null +++ b/docs/models/components/buildpack.md @@ -0,0 +1,17 @@ +# BuildPack + +Build pack. + +## Example Usage + +```typescript +import { BuildPack } from "coolify/models/components"; + +let value: BuildPack = "dockerfile"; +``` + +## Values + +```typescript +"nixpacks" | "static" | "dockerfile" | "dockercompose" +``` \ No newline at end of file diff --git a/docs/models/components/environment.md b/docs/models/components/environment.md new file mode 100644 index 0000000..59fef50 --- /dev/null +++ b/docs/models/components/environment.md @@ -0,0 +1,22 @@ +# Environment + +Environment model + +## Example Usage + +```typescript +import { Environment } from "coolify/models/components"; + +let value: Environment = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `projectId` | *number* | :heavy_minus_sign: | N/A | +| `createdAt` | *string* | :heavy_minus_sign: | N/A | +| `updatedAt` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/environmentvariable.md b/docs/models/components/environmentvariable.md new file mode 100644 index 0000000..7f38daa --- /dev/null +++ b/docs/models/components/environmentvariable.md @@ -0,0 +1,33 @@ +# EnvironmentVariable + +Environment Variable model + +## Example Usage + +```typescript +import { EnvironmentVariable } from "coolify/models/components"; + +let value: EnvironmentVariable = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `uuid` | *string* | :heavy_minus_sign: | N/A | +| `applicationId` | *number* | :heavy_minus_sign: | N/A | +| `serviceId` | *number* | :heavy_minus_sign: | N/A | +| `databaseId` | *number* | :heavy_minus_sign: | N/A | +| `isBuildTime` | *boolean* | :heavy_minus_sign: | N/A | +| `isLiteral` | *boolean* | :heavy_minus_sign: | N/A | +| `isMultiline` | *boolean* | :heavy_minus_sign: | N/A | +| `isPreview` | *boolean* | :heavy_minus_sign: | N/A | +| `isShared` | *boolean* | :heavy_minus_sign: | N/A | +| `isShownOnce` | *boolean* | :heavy_minus_sign: | N/A | +| `key` | *string* | :heavy_minus_sign: | N/A | +| `value` | *string* | :heavy_minus_sign: | N/A | +| `realValue` | *string* | :heavy_minus_sign: | N/A | +| `version` | *string* | :heavy_minus_sign: | N/A | +| `createdAt` | *string* | :heavy_minus_sign: | N/A | +| `updatedAt` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/privatekey.md b/docs/models/components/privatekey.md new file mode 100644 index 0000000..673a0cd --- /dev/null +++ b/docs/models/components/privatekey.md @@ -0,0 +1,25 @@ +# PrivateKey + +Private Key model + +## Example Usage + +```typescript +import { PrivateKey } from "coolify/models/components"; + +let value: PrivateKey = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `uuid` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `privateKey` | *string* | :heavy_minus_sign: | N/A | +| `isGitRelated` | *boolean* | :heavy_minus_sign: | N/A | +| `teamId` | *number* | :heavy_minus_sign: | N/A | +| `createdAt` | *string* | :heavy_minus_sign: | N/A | +| `updatedAt` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/project.md b/docs/models/components/project.md new file mode 100644 index 0000000..b90e66a --- /dev/null +++ b/docs/models/components/project.md @@ -0,0 +1,21 @@ +# Project + +Project model + +## Example Usage + +```typescript +import { Project } from "coolify/models/components"; + +let value: Project = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `uuid` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `environments` | [components.Environment](../../models/components/environment.md)[] | :heavy_minus_sign: | The environments of the project. | \ No newline at end of file diff --git a/docs/models/components/proxy.md b/docs/models/components/proxy.md new file mode 100644 index 0000000..40c40ca --- /dev/null +++ b/docs/models/components/proxy.md @@ -0,0 +1,16 @@ +# Proxy + +The proxy configuration. + +## Example Usage + +```typescript +import { Proxy } from "coolify/models/components"; + +let value: Proxy = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/proxytype.md b/docs/models/components/proxytype.md new file mode 100644 index 0000000..28ec3b2 --- /dev/null +++ b/docs/models/components/proxytype.md @@ -0,0 +1,17 @@ +# ProxyType + +The proxy type. + +## Example Usage + +```typescript +import { ProxyType } from "coolify/models/components"; + +let value: ProxyType = "caddy"; +``` + +## Values + +```typescript +"traefik" | "caddy" | "none" +``` \ No newline at end of file diff --git a/docs/models/components/redirect.md b/docs/models/components/redirect.md new file mode 100644 index 0000000..44f159a --- /dev/null +++ b/docs/models/components/redirect.md @@ -0,0 +1,17 @@ +# Redirect + +How to set redirect with Traefik / Caddy. www<->non-www. + +## Example Usage + +```typescript +import { Redirect } from "coolify/models/components"; + +let value: Redirect = "both"; +``` + +## Values + +```typescript +"www" | "non-www" | "both" +``` \ No newline at end of file diff --git a/docs/models/components/security.md b/docs/models/components/security.md new file mode 100644 index 0000000..ac691f4 --- /dev/null +++ b/docs/models/components/security.md @@ -0,0 +1,15 @@ +# Security + +## Example Usage + +```typescript +import { Security } from "coolify/models/components"; + +let value: Security = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `bearerAuth` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/server.md b/docs/models/components/server.md new file mode 100644 index 0000000..18d7354 --- /dev/null +++ b/docs/models/components/server.md @@ -0,0 +1,33 @@ +# Server + +Server model + +## Example Usage + +```typescript +import { Server } from "coolify/models/components"; + +let value: Server = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `id` | *number* | :heavy_minus_sign: | The server ID. | +| `uuid` | *string* | :heavy_minus_sign: | The server UUID. | +| `name` | *string* | :heavy_minus_sign: | The server name. | +| `description` | *string* | :heavy_minus_sign: | The server description. | +| `ip` | *string* | :heavy_minus_sign: | The IP address. | +| `user` | *string* | :heavy_minus_sign: | The user. | +| `port` | *number* | :heavy_minus_sign: | The port number. | +| `proxy` | [components.Proxy](../../models/components/proxy.md) | :heavy_minus_sign: | The proxy configuration. | +| `proxyType` | [components.ProxyType](../../models/components/proxytype.md) | :heavy_minus_sign: | The proxy type. | +| `highDiskUsageNotificationSent` | *boolean* | :heavy_minus_sign: | The flag to indicate if the high disk usage notification has been sent. | +| `unreachableNotificationSent` | *boolean* | :heavy_minus_sign: | The flag to indicate if the unreachable notification has been sent. | +| `unreachableCount` | *number* | :heavy_minus_sign: | The unreachable count for your server. | +| `validationLogs` | *string* | :heavy_minus_sign: | The validation logs. | +| `logDrainNotificationSent` | *boolean* | :heavy_minus_sign: | The flag to indicate if the log drain notification has been sent. | +| `swarmCluster` | *string* | :heavy_minus_sign: | The swarm cluster configuration. | +| `deleteUnusedVolumes` | *boolean* | :heavy_minus_sign: | The flag to indicate if the unused volumes should be deleted. | +| `deleteUnusedNetworks` | *boolean* | :heavy_minus_sign: | The flag to indicate if the unused networks should be deleted. | \ No newline at end of file diff --git a/docs/models/components/service.md b/docs/models/components/service.md new file mode 100644 index 0000000..6df0be1 --- /dev/null +++ b/docs/models/components/service.md @@ -0,0 +1,34 @@ +# Service + +Service model + +## Example Usage + +```typescript +import { Service } from "coolify/models/components"; + +let value: Service = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `id` | *number* | :heavy_minus_sign: | The unique identifier of the service. Only used for database identification. | +| `uuid` | *string* | :heavy_minus_sign: | The unique identifier of the service. | +| `name` | *string* | :heavy_minus_sign: | The name of the service. | +| `environmentId` | *number* | :heavy_minus_sign: | The unique identifier of the environment where the service is attached to. | +| `serverId` | *number* | :heavy_minus_sign: | The unique identifier of the server where the service is running. | +| `description` | *string* | :heavy_minus_sign: | The description of the service. | +| `dockerComposeRaw` | *string* | :heavy_minus_sign: | The raw docker-compose.yml file of the service. | +| `dockerCompose` | *string* | :heavy_minus_sign: | The docker-compose.yml file that is parsed and modified by Coolify. | +| `destinationType` | *string* | :heavy_minus_sign: | Destination type. | +| `destinationId` | *number* | :heavy_minus_sign: | The unique identifier of the destination where the service is running. | +| `connectToDockerNetwork` | *boolean* | :heavy_minus_sign: | The flag to connect the service to the predefined Docker network. | +| `isContainerLabelEscapeEnabled` | *boolean* | :heavy_minus_sign: | The flag to enable the container label escape. | +| `isContainerLabelReadonlyEnabled` | *boolean* | :heavy_minus_sign: | The flag to enable the container label readonly. | +| `configHash` | *string* | :heavy_minus_sign: | The hash of the service configuration. | +| `serviceType` | *string* | :heavy_minus_sign: | The type of the service. | +| `createdAt` | *string* | :heavy_minus_sign: | The date and time when the service was created. | +| `updatedAt` | *string* | :heavy_minus_sign: | The date and time when the service was last updated. | +| `deletedAt` | *string* | :heavy_minus_sign: | The date and time when the service was deleted. | \ No newline at end of file diff --git a/docs/models/components/team.md b/docs/models/components/team.md new file mode 100644 index 0000000..d3b9e9e --- /dev/null +++ b/docs/models/components/team.md @@ -0,0 +1,65 @@ +# Team + +Team model + +## Example Usage + +```typescript +import { Team } from "coolify/models/components"; + +let value: Team = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `id` | *number* | :heavy_minus_sign: | The unique identifier of the team. | +| `name` | *string* | :heavy_minus_sign: | The name of the team. | +| `description` | *string* | :heavy_minus_sign: | The description of the team. | +| `personalTeam` | *boolean* | :heavy_minus_sign: | Whether the team is personal or not. | +| `createdAt` | *string* | :heavy_minus_sign: | The date and time the team was created. | +| `updatedAt` | *string* | :heavy_minus_sign: | The date and time the team was last updated. | +| `smtpEnabled` | *boolean* | :heavy_minus_sign: | Whether SMTP is enabled or not. | +| `smtpFromAddress` | *string* | :heavy_minus_sign: | The email address to send emails from. | +| `smtpFromName` | *string* | :heavy_minus_sign: | The name to send emails from. | +| `smtpRecipients` | *string* | :heavy_minus_sign: | The email addresses to send emails to. | +| `smtpHost` | *string* | :heavy_minus_sign: | The SMTP host. | +| `smtpPort` | *string* | :heavy_minus_sign: | The SMTP port. | +| `smtpEncryption` | *string* | :heavy_minus_sign: | The SMTP encryption. | +| `smtpUsername` | *string* | :heavy_minus_sign: | The SMTP username. | +| `smtpPassword` | *string* | :heavy_minus_sign: | The SMTP password. | +| `smtpTimeout` | *string* | :heavy_minus_sign: | The SMTP timeout. | +| `smtpNotificationsTest` | *boolean* | :heavy_minus_sign: | Whether to send test notifications via SMTP. | +| `smtpNotificationsDeployments` | *boolean* | :heavy_minus_sign: | Whether to send deployment notifications via SMTP. | +| `smtpNotificationsStatusChanges` | *boolean* | :heavy_minus_sign: | Whether to send status change notifications via SMTP. | +| `smtpNotificationsScheduledTasks` | *boolean* | :heavy_minus_sign: | Whether to send scheduled task notifications via SMTP. | +| `smtpNotificationsDatabaseBackups` | *boolean* | :heavy_minus_sign: | Whether to send database backup notifications via SMTP. | +| `smtpNotificationsServerDiskUsage` | *boolean* | :heavy_minus_sign: | Whether to send server disk usage notifications via SMTP. | +| `discordEnabled` | *boolean* | :heavy_minus_sign: | Whether Discord is enabled or not. | +| `discordWebhookUrl` | *string* | :heavy_minus_sign: | The Discord webhook URL. | +| `discordNotificationsTest` | *boolean* | :heavy_minus_sign: | Whether to send test notifications via Discord. | +| `discordNotificationsDeployments` | *boolean* | :heavy_minus_sign: | Whether to send deployment notifications via Discord. | +| `discordNotificationsStatusChanges` | *boolean* | :heavy_minus_sign: | Whether to send status change notifications via Discord. | +| `discordNotificationsDatabaseBackups` | *boolean* | :heavy_minus_sign: | Whether to send database backup notifications via Discord. | +| `discordNotificationsScheduledTasks` | *boolean* | :heavy_minus_sign: | Whether to send scheduled task notifications via Discord. | +| `discordNotificationsServerDiskUsage` | *boolean* | :heavy_minus_sign: | Whether to send server disk usage notifications via Discord. | +| `showBoarding` | *boolean* | :heavy_minus_sign: | Whether to show the boarding screen or not. | +| `resendEnabled` | *boolean* | :heavy_minus_sign: | Whether to enable resending or not. | +| `resendApiKey` | *string* | :heavy_minus_sign: | The resending API key. | +| `useInstanceEmailSettings` | *boolean* | :heavy_minus_sign: | Whether to use instance email settings or not. | +| `telegramEnabled` | *boolean* | :heavy_minus_sign: | Whether Telegram is enabled or not. | +| `telegramToken` | *string* | :heavy_minus_sign: | The Telegram token. | +| `telegramChatId` | *string* | :heavy_minus_sign: | The Telegram chat ID. | +| `telegramNotificationsTest` | *boolean* | :heavy_minus_sign: | Whether to send test notifications via Telegram. | +| `telegramNotificationsDeployments` | *boolean* | :heavy_minus_sign: | Whether to send deployment notifications via Telegram. | +| `telegramNotificationsStatusChanges` | *boolean* | :heavy_minus_sign: | Whether to send status change notifications via Telegram. | +| `telegramNotificationsDatabaseBackups` | *boolean* | :heavy_minus_sign: | Whether to send database backup notifications via Telegram. | +| `telegramNotificationsTestMessageThreadId` | *string* | :heavy_minus_sign: | The Telegram test message thread ID. | +| `telegramNotificationsDeploymentsMessageThreadId` | *string* | :heavy_minus_sign: | The Telegram deployment message thread ID. | +| `telegramNotificationsStatusChangesMessageThreadId` | *string* | :heavy_minus_sign: | The Telegram status change message thread ID. | +| `telegramNotificationsDatabaseBackupsMessageThreadId` | *string* | :heavy_minus_sign: | The Telegram database backup message thread ID. | +| `customServerLimit` | *string* | :heavy_minus_sign: | The custom server limit. | +| `telegramNotificationsScheduledTasks` | *boolean* | :heavy_minus_sign: | Whether to send scheduled task notifications via Telegram. | +| `telegramNotificationsScheduledTasksThreadId` | *string* | :heavy_minus_sign: | The Telegram scheduled task message thread ID. | +| `members` | [components.User](../../models/components/user.md)[] | :heavy_minus_sign: | The members of the team. | \ No newline at end of file diff --git a/docs/models/components/user.md b/docs/models/components/user.md new file mode 100644 index 0000000..0a599ed --- /dev/null +++ b/docs/models/components/user.md @@ -0,0 +1,25 @@ +# User + +User model + +## Example Usage + +```typescript +import { User } from "coolify/models/components"; + +let value: User = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | +| `id` | *number* | :heavy_minus_sign: | The user identifier in the database. | +| `name` | *string* | :heavy_minus_sign: | The user name. | +| `email` | *string* | :heavy_minus_sign: | The user email. | +| `emailVerifiedAt` | *string* | :heavy_minus_sign: | The date when the user email was verified. | +| `createdAt` | *string* | :heavy_minus_sign: | The date when the user was created. | +| `updatedAt` | *string* | :heavy_minus_sign: | The date when the user was updated. | +| `twoFactorConfirmedAt` | *string* | :heavy_minus_sign: | The date when the user two factor was confirmed. | +| `forcePasswordReset` | *boolean* | :heavy_minus_sign: | The flag to force the user to reset the password. | +| `marketingEmails` | *boolean* | :heavy_minus_sign: | The flag to receive marketing emails. | \ No newline at end of file diff --git a/docs/models/errors/badrequest.md b/docs/models/errors/badrequest.md new file mode 100644 index 0000000..911d23b --- /dev/null +++ b/docs/models/errors/badrequest.md @@ -0,0 +1,17 @@ +# BadRequest + +Invalid token. + +## Example Usage + +```typescript +import { BadRequest } from "coolify/models/errors"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `message` | *string* | :heavy_minus_sign: | N/A | Invalid token. | \ No newline at end of file diff --git a/docs/models/errors/disableapiresponsebody.md b/docs/models/errors/disableapiresponsebody.md new file mode 100644 index 0000000..68cbfec --- /dev/null +++ b/docs/models/errors/disableapiresponsebody.md @@ -0,0 +1,17 @@ +# DisableApiResponseBody + +You are not allowed to disable the API. + +## Example Usage + +```typescript +import { DisableApiResponseBody } from "coolify/models/errors"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | +| `message` | *string* | :heavy_minus_sign: | N/A | You are not allowed to disable the API. | \ No newline at end of file diff --git a/docs/models/errors/enableapiresponsebody.md b/docs/models/errors/enableapiresponsebody.md new file mode 100644 index 0000000..3305860 --- /dev/null +++ b/docs/models/errors/enableapiresponsebody.md @@ -0,0 +1,17 @@ +# EnableApiResponseBody + +You are not allowed to enable the API. + +## Example Usage + +```typescript +import { EnableApiResponseBody } from "coolify/models/errors"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | +| `message` | *string* | :heavy_minus_sign: | N/A | You are not allowed to enable the API. | \ No newline at end of file diff --git a/docs/models/errors/internalservererror.md b/docs/models/errors/internalservererror.md new file mode 100644 index 0000000..d8d50bf --- /dev/null +++ b/docs/models/errors/internalservererror.md @@ -0,0 +1,18 @@ +# InternalServerError + +A collection of status codes that generally mean the server failed in an unexpected way + +## Example Usage + +```typescript +import { InternalServerError } from "coolify/models/errors"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `message` | *string* | :heavy_minus_sign: | N/A | +| `additionalProperties` | Record | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/errors/notfound.md b/docs/models/errors/notfound.md new file mode 100644 index 0000000..ab5c7a5 --- /dev/null +++ b/docs/models/errors/notfound.md @@ -0,0 +1,17 @@ +# NotFound + +Resource not found. + +## Example Usage + +```typescript +import { NotFound } from "coolify/models/errors"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | +| `message` | *string* | :heavy_minus_sign: | N/A | Resource not found. | \ No newline at end of file diff --git a/docs/models/errors/ratelimited.md b/docs/models/errors/ratelimited.md new file mode 100644 index 0000000..3e67329 --- /dev/null +++ b/docs/models/errors/ratelimited.md @@ -0,0 +1,18 @@ +# RateLimited + +Status codes relating to the client being rate limited by the server + +## Example Usage + +```typescript +import { RateLimited } from "coolify/models/errors"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `message` | *string* | :heavy_minus_sign: | N/A | +| `additionalProperties` | Record | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/errors/timeout.md b/docs/models/errors/timeout.md new file mode 100644 index 0000000..acef360 --- /dev/null +++ b/docs/models/errors/timeout.md @@ -0,0 +1,18 @@ +# Timeout + +Timeouts occurred with the request + +## Example Usage + +```typescript +import { Timeout } from "coolify/models/errors"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `message` | *string* | :heavy_minus_sign: | N/A | +| `additionalProperties` | Record | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/errors/unauthenticated.md b/docs/models/errors/unauthenticated.md new file mode 100644 index 0000000..36b0242 --- /dev/null +++ b/docs/models/errors/unauthenticated.md @@ -0,0 +1,17 @@ +# Unauthenticated + +Unauthenticated. + +## Example Usage + +```typescript +import { Unauthenticated } from "coolify/models/errors"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `message` | *string* | :heavy_minus_sign: | N/A | Unauthenticated. | \ No newline at end of file diff --git a/docs/models/operations/buildpack.md b/docs/models/operations/buildpack.md new file mode 100644 index 0000000..3ec5c7a --- /dev/null +++ b/docs/models/operations/buildpack.md @@ -0,0 +1,17 @@ +# BuildPack + +The build pack type. + +## Example Usage + +```typescript +import { BuildPack } from "coolify/models/operations"; + +let value: BuildPack = "dockerfile"; +``` + +## Values + +```typescript +"nixpacks" | "static" | "dockerfile" | "dockercompose" +``` \ No newline at end of file diff --git a/docs/models/operations/createdatabaseclickhouserequestbody.md b/docs/models/operations/createdatabaseclickhouserequestbody.md new file mode 100644 index 0000000..270584d --- /dev/null +++ b/docs/models/operations/createdatabaseclickhouserequestbody.md @@ -0,0 +1,39 @@ +# CreateDatabaseClickhouseRequestBody + +Database data + +## Example Usage + +```typescript +import { CreateDatabaseClickhouseRequestBody } from "coolify/models/operations"; + +let value: CreateDatabaseClickhouseRequestBody = { + serverUuid: "", + projectUuid: "", + environmentName: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `serverUuid` | *string* | :heavy_check_mark: | UUID of the server | +| `projectUuid` | *string* | :heavy_check_mark: | UUID of the project | +| `environmentName` | *string* | :heavy_check_mark: | Name of the environment | +| `destinationUuid` | *string* | :heavy_minus_sign: | UUID of the destination if the server has multiple destinations | +| `clickhouseAdminUser` | *string* | :heavy_minus_sign: | Clickhouse admin user | +| `clickhouseAdminPassword` | *string* | :heavy_minus_sign: | Clickhouse admin password | +| `name` | *string* | :heavy_minus_sign: | Name of the database | +| `description` | *string* | :heavy_minus_sign: | Description of the database | +| `image` | *string* | :heavy_minus_sign: | Docker Image of the database | +| `isPublic` | *boolean* | :heavy_minus_sign: | Is the database public? | +| `publicPort` | *number* | :heavy_minus_sign: | Public port of the database | +| `limitsMemory` | *string* | :heavy_minus_sign: | Memory limit of the database | +| `limitsMemorySwap` | *string* | :heavy_minus_sign: | Memory swap limit of the database | +| `limitsMemorySwappiness` | *number* | :heavy_minus_sign: | Memory swappiness of the database | +| `limitsMemoryReservation` | *string* | :heavy_minus_sign: | Memory reservation of the database | +| `limitsCpus` | *string* | :heavy_minus_sign: | CPU limit of the database | +| `limitsCpuset` | *string* | :heavy_minus_sign: | CPU set of the database | +| `limitsCpuShares` | *number* | :heavy_minus_sign: | CPU shares of the database | +| `instantDeploy` | *boolean* | :heavy_minus_sign: | Instant deploy the database | \ No newline at end of file diff --git a/docs/models/operations/createdatabasedragonflyrequestbody.md b/docs/models/operations/createdatabasedragonflyrequestbody.md new file mode 100644 index 0000000..110587a --- /dev/null +++ b/docs/models/operations/createdatabasedragonflyrequestbody.md @@ -0,0 +1,38 @@ +# CreateDatabaseDragonflyRequestBody + +Database data + +## Example Usage + +```typescript +import { CreateDatabaseDragonflyRequestBody } from "coolify/models/operations"; + +let value: CreateDatabaseDragonflyRequestBody = { + serverUuid: "", + projectUuid: "", + environmentName: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `serverUuid` | *string* | :heavy_check_mark: | UUID of the server | +| `projectUuid` | *string* | :heavy_check_mark: | UUID of the project | +| `environmentName` | *string* | :heavy_check_mark: | Name of the environment | +| `destinationUuid` | *string* | :heavy_minus_sign: | UUID of the destination if the server has multiple destinations | +| `dragonflyPassword` | *string* | :heavy_minus_sign: | DragonFly password | +| `name` | *string* | :heavy_minus_sign: | Name of the database | +| `description` | *string* | :heavy_minus_sign: | Description of the database | +| `image` | *string* | :heavy_minus_sign: | Docker Image of the database | +| `isPublic` | *boolean* | :heavy_minus_sign: | Is the database public? | +| `publicPort` | *number* | :heavy_minus_sign: | Public port of the database | +| `limitsMemory` | *string* | :heavy_minus_sign: | Memory limit of the database | +| `limitsMemorySwap` | *string* | :heavy_minus_sign: | Memory swap limit of the database | +| `limitsMemorySwappiness` | *number* | :heavy_minus_sign: | Memory swappiness of the database | +| `limitsMemoryReservation` | *string* | :heavy_minus_sign: | Memory reservation of the database | +| `limitsCpus` | *string* | :heavy_minus_sign: | CPU limit of the database | +| `limitsCpuset` | *string* | :heavy_minus_sign: | CPU set of the database | +| `limitsCpuShares` | *number* | :heavy_minus_sign: | CPU shares of the database | +| `instantDeploy` | *boolean* | :heavy_minus_sign: | Instant deploy the database | \ No newline at end of file diff --git a/docs/models/operations/createdatabasekeydbrequestbody.md b/docs/models/operations/createdatabasekeydbrequestbody.md new file mode 100644 index 0000000..8be7bdc --- /dev/null +++ b/docs/models/operations/createdatabasekeydbrequestbody.md @@ -0,0 +1,39 @@ +# CreateDatabaseKeydbRequestBody + +Database data + +## Example Usage + +```typescript +import { CreateDatabaseKeydbRequestBody } from "coolify/models/operations"; + +let value: CreateDatabaseKeydbRequestBody = { + serverUuid: "", + projectUuid: "", + environmentName: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `serverUuid` | *string* | :heavy_check_mark: | UUID of the server | +| `projectUuid` | *string* | :heavy_check_mark: | UUID of the project | +| `environmentName` | *string* | :heavy_check_mark: | Name of the environment | +| `destinationUuid` | *string* | :heavy_minus_sign: | UUID of the destination if the server has multiple destinations | +| `keydbPassword` | *string* | :heavy_minus_sign: | KeyDB password | +| `keydbConf` | *string* | :heavy_minus_sign: | KeyDB conf | +| `name` | *string* | :heavy_minus_sign: | Name of the database | +| `description` | *string* | :heavy_minus_sign: | Description of the database | +| `image` | *string* | :heavy_minus_sign: | Docker Image of the database | +| `isPublic` | *boolean* | :heavy_minus_sign: | Is the database public? | +| `publicPort` | *number* | :heavy_minus_sign: | Public port of the database | +| `limitsMemory` | *string* | :heavy_minus_sign: | Memory limit of the database | +| `limitsMemorySwap` | *string* | :heavy_minus_sign: | Memory swap limit of the database | +| `limitsMemorySwappiness` | *number* | :heavy_minus_sign: | Memory swappiness of the database | +| `limitsMemoryReservation` | *string* | :heavy_minus_sign: | Memory reservation of the database | +| `limitsCpus` | *string* | :heavy_minus_sign: | CPU limit of the database | +| `limitsCpuset` | *string* | :heavy_minus_sign: | CPU set of the database | +| `limitsCpuShares` | *number* | :heavy_minus_sign: | CPU shares of the database | +| `instantDeploy` | *boolean* | :heavy_minus_sign: | Instant deploy the database | \ No newline at end of file diff --git a/docs/models/operations/createdatabasemariadbrequestbody.md b/docs/models/operations/createdatabasemariadbrequestbody.md new file mode 100644 index 0000000..b7bc67f --- /dev/null +++ b/docs/models/operations/createdatabasemariadbrequestbody.md @@ -0,0 +1,42 @@ +# CreateDatabaseMariadbRequestBody + +Database data + +## Example Usage + +```typescript +import { CreateDatabaseMariadbRequestBody } from "coolify/models/operations"; + +let value: CreateDatabaseMariadbRequestBody = { + serverUuid: "", + projectUuid: "", + environmentName: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `serverUuid` | *string* | :heavy_check_mark: | UUID of the server | +| `projectUuid` | *string* | :heavy_check_mark: | UUID of the project | +| `environmentName` | *string* | :heavy_check_mark: | Name of the environment | +| `destinationUuid` | *string* | :heavy_minus_sign: | UUID of the destination if the server has multiple destinations | +| `mariadbConf` | *string* | :heavy_minus_sign: | MariaDB conf | +| `mariadbRootPassword` | *string* | :heavy_minus_sign: | MariaDB root password | +| `mariadbUser` | *string* | :heavy_minus_sign: | MariaDB user | +| `mariadbPassword` | *string* | :heavy_minus_sign: | MariaDB password | +| `mariadbDatabase` | *string* | :heavy_minus_sign: | MariaDB database | +| `name` | *string* | :heavy_minus_sign: | Name of the database | +| `description` | *string* | :heavy_minus_sign: | Description of the database | +| `image` | *string* | :heavy_minus_sign: | Docker Image of the database | +| `isPublic` | *boolean* | :heavy_minus_sign: | Is the database public? | +| `publicPort` | *number* | :heavy_minus_sign: | Public port of the database | +| `limitsMemory` | *string* | :heavy_minus_sign: | Memory limit of the database | +| `limitsMemorySwap` | *string* | :heavy_minus_sign: | Memory swap limit of the database | +| `limitsMemorySwappiness` | *number* | :heavy_minus_sign: | Memory swappiness of the database | +| `limitsMemoryReservation` | *string* | :heavy_minus_sign: | Memory reservation of the database | +| `limitsCpus` | *string* | :heavy_minus_sign: | CPU limit of the database | +| `limitsCpuset` | *string* | :heavy_minus_sign: | CPU set of the database | +| `limitsCpuShares` | *number* | :heavy_minus_sign: | CPU shares of the database | +| `instantDeploy` | *boolean* | :heavy_minus_sign: | Instant deploy the database | \ No newline at end of file diff --git a/docs/models/operations/createdatabasemongodbrequestbody.md b/docs/models/operations/createdatabasemongodbrequestbody.md new file mode 100644 index 0000000..ddb09a9 --- /dev/null +++ b/docs/models/operations/createdatabasemongodbrequestbody.md @@ -0,0 +1,39 @@ +# CreateDatabaseMongodbRequestBody + +Database data + +## Example Usage + +```typescript +import { CreateDatabaseMongodbRequestBody } from "coolify/models/operations"; + +let value: CreateDatabaseMongodbRequestBody = { + serverUuid: "", + projectUuid: "", + environmentName: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `serverUuid` | *string* | :heavy_check_mark: | UUID of the server | +| `projectUuid` | *string* | :heavy_check_mark: | UUID of the project | +| `environmentName` | *string* | :heavy_check_mark: | Name of the environment | +| `destinationUuid` | *string* | :heavy_minus_sign: | UUID of the destination if the server has multiple destinations | +| `mongoConf` | *string* | :heavy_minus_sign: | MongoDB conf | +| `mongoInitdbRootUsername` | *string* | :heavy_minus_sign: | MongoDB initdb root username | +| `name` | *string* | :heavy_minus_sign: | Name of the database | +| `description` | *string* | :heavy_minus_sign: | Description of the database | +| `image` | *string* | :heavy_minus_sign: | Docker Image of the database | +| `isPublic` | *boolean* | :heavy_minus_sign: | Is the database public? | +| `publicPort` | *number* | :heavy_minus_sign: | Public port of the database | +| `limitsMemory` | *string* | :heavy_minus_sign: | Memory limit of the database | +| `limitsMemorySwap` | *string* | :heavy_minus_sign: | Memory swap limit of the database | +| `limitsMemorySwappiness` | *number* | :heavy_minus_sign: | Memory swappiness of the database | +| `limitsMemoryReservation` | *string* | :heavy_minus_sign: | Memory reservation of the database | +| `limitsCpus` | *string* | :heavy_minus_sign: | CPU limit of the database | +| `limitsCpuset` | *string* | :heavy_minus_sign: | CPU set of the database | +| `limitsCpuShares` | *number* | :heavy_minus_sign: | CPU shares of the database | +| `instantDeploy` | *boolean* | :heavy_minus_sign: | Instant deploy the database | \ No newline at end of file diff --git a/docs/models/operations/createdatabasemysqlrequestbody.md b/docs/models/operations/createdatabasemysqlrequestbody.md new file mode 100644 index 0000000..cb0240a --- /dev/null +++ b/docs/models/operations/createdatabasemysqlrequestbody.md @@ -0,0 +1,41 @@ +# CreateDatabaseMysqlRequestBody + +Database data + +## Example Usage + +```typescript +import { CreateDatabaseMysqlRequestBody } from "coolify/models/operations"; + +let value: CreateDatabaseMysqlRequestBody = { + serverUuid: "", + projectUuid: "", + environmentName: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `serverUuid` | *string* | :heavy_check_mark: | UUID of the server | +| `projectUuid` | *string* | :heavy_check_mark: | UUID of the project | +| `environmentName` | *string* | :heavy_check_mark: | Name of the environment | +| `destinationUuid` | *string* | :heavy_minus_sign: | UUID of the destination if the server has multiple destinations | +| `mysqlRootPassword` | *string* | :heavy_minus_sign: | MySQL root password | +| `mysqlUser` | *string* | :heavy_minus_sign: | MySQL user | +| `mysqlDatabase` | *string* | :heavy_minus_sign: | MySQL database | +| `mysqlConf` | *string* | :heavy_minus_sign: | MySQL conf | +| `name` | *string* | :heavy_minus_sign: | Name of the database | +| `description` | *string* | :heavy_minus_sign: | Description of the database | +| `image` | *string* | :heavy_minus_sign: | Docker Image of the database | +| `isPublic` | *boolean* | :heavy_minus_sign: | Is the database public? | +| `publicPort` | *number* | :heavy_minus_sign: | Public port of the database | +| `limitsMemory` | *string* | :heavy_minus_sign: | Memory limit of the database | +| `limitsMemorySwap` | *string* | :heavy_minus_sign: | Memory swap limit of the database | +| `limitsMemorySwappiness` | *number* | :heavy_minus_sign: | Memory swappiness of the database | +| `limitsMemoryReservation` | *string* | :heavy_minus_sign: | Memory reservation of the database | +| `limitsCpus` | *string* | :heavy_minus_sign: | CPU limit of the database | +| `limitsCpuset` | *string* | :heavy_minus_sign: | CPU set of the database | +| `limitsCpuShares` | *number* | :heavy_minus_sign: | CPU shares of the database | +| `instantDeploy` | *boolean* | :heavy_minus_sign: | Instant deploy the database | \ No newline at end of file diff --git a/docs/models/operations/createdatabasepostgresqlrequestbody.md b/docs/models/operations/createdatabasepostgresqlrequestbody.md new file mode 100644 index 0000000..78cdf1e --- /dev/null +++ b/docs/models/operations/createdatabasepostgresqlrequestbody.md @@ -0,0 +1,43 @@ +# CreateDatabasePostgresqlRequestBody + +Database data + +## Example Usage + +```typescript +import { CreateDatabasePostgresqlRequestBody } from "coolify/models/operations"; + +let value: CreateDatabasePostgresqlRequestBody = { + serverUuid: "", + projectUuid: "", + environmentName: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `serverUuid` | *string* | :heavy_check_mark: | UUID of the server | +| `projectUuid` | *string* | :heavy_check_mark: | UUID of the project | +| `environmentName` | *string* | :heavy_check_mark: | Name of the environment | +| `postgresUser` | *string* | :heavy_minus_sign: | PostgreSQL user | +| `postgresPassword` | *string* | :heavy_minus_sign: | PostgreSQL password | +| `postgresDb` | *string* | :heavy_minus_sign: | PostgreSQL database | +| `postgresInitdbArgs` | *string* | :heavy_minus_sign: | PostgreSQL initdb args | +| `postgresHostAuthMethod` | *string* | :heavy_minus_sign: | PostgreSQL host auth method | +| `postgresConf` | *string* | :heavy_minus_sign: | PostgreSQL conf | +| `destinationUuid` | *string* | :heavy_minus_sign: | UUID of the destination if the server has multiple destinations | +| `name` | *string* | :heavy_minus_sign: | Name of the database | +| `description` | *string* | :heavy_minus_sign: | Description of the database | +| `image` | *string* | :heavy_minus_sign: | Docker Image of the database | +| `isPublic` | *boolean* | :heavy_minus_sign: | Is the database public? | +| `publicPort` | *number* | :heavy_minus_sign: | Public port of the database | +| `limitsMemory` | *string* | :heavy_minus_sign: | Memory limit of the database | +| `limitsMemorySwap` | *string* | :heavy_minus_sign: | Memory swap limit of the database | +| `limitsMemorySwappiness` | *number* | :heavy_minus_sign: | Memory swappiness of the database | +| `limitsMemoryReservation` | *string* | :heavy_minus_sign: | Memory reservation of the database | +| `limitsCpus` | *string* | :heavy_minus_sign: | CPU limit of the database | +| `limitsCpuset` | *string* | :heavy_minus_sign: | CPU set of the database | +| `limitsCpuShares` | *number* | :heavy_minus_sign: | CPU shares of the database | +| `instantDeploy` | *boolean* | :heavy_minus_sign: | Instant deploy the database | \ No newline at end of file diff --git a/docs/models/operations/createdatabaseredisrequestbody.md b/docs/models/operations/createdatabaseredisrequestbody.md new file mode 100644 index 0000000..813e4e1 --- /dev/null +++ b/docs/models/operations/createdatabaseredisrequestbody.md @@ -0,0 +1,39 @@ +# CreateDatabaseRedisRequestBody + +Database data + +## Example Usage + +```typescript +import { CreateDatabaseRedisRequestBody } from "coolify/models/operations"; + +let value: CreateDatabaseRedisRequestBody = { + serverUuid: "", + projectUuid: "", + environmentName: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `serverUuid` | *string* | :heavy_check_mark: | UUID of the server | +| `projectUuid` | *string* | :heavy_check_mark: | UUID of the project | +| `environmentName` | *string* | :heavy_check_mark: | Name of the environment | +| `destinationUuid` | *string* | :heavy_minus_sign: | UUID of the destination if the server has multiple destinations | +| `redisPassword` | *string* | :heavy_minus_sign: | Redis password | +| `redisConf` | *string* | :heavy_minus_sign: | Redis conf | +| `name` | *string* | :heavy_minus_sign: | Name of the database | +| `description` | *string* | :heavy_minus_sign: | Description of the database | +| `image` | *string* | :heavy_minus_sign: | Docker Image of the database | +| `isPublic` | *boolean* | :heavy_minus_sign: | Is the database public? | +| `publicPort` | *number* | :heavy_minus_sign: | Public port of the database | +| `limitsMemory` | *string* | :heavy_minus_sign: | Memory limit of the database | +| `limitsMemorySwap` | *string* | :heavy_minus_sign: | Memory swap limit of the database | +| `limitsMemorySwappiness` | *number* | :heavy_minus_sign: | Memory swappiness of the database | +| `limitsMemoryReservation` | *string* | :heavy_minus_sign: | Memory reservation of the database | +| `limitsCpus` | *string* | :heavy_minus_sign: | CPU limit of the database | +| `limitsCpuset` | *string* | :heavy_minus_sign: | CPU set of the database | +| `limitsCpuShares` | *number* | :heavy_minus_sign: | CPU shares of the database | +| `instantDeploy` | *boolean* | :heavy_minus_sign: | Instant deploy the database | \ No newline at end of file diff --git a/docs/models/operations/createdockercomposeapplicationrequestbody.md b/docs/models/operations/createdockercomposeapplicationrequestbody.md new file mode 100644 index 0000000..b0e2521 --- /dev/null +++ b/docs/models/operations/createdockercomposeapplicationrequestbody.md @@ -0,0 +1,30 @@ +# CreateDockercomposeApplicationRequestBody + +Application object that needs to be created. + +## Example Usage + +```typescript +import { CreateDockercomposeApplicationRequestBody } from "coolify/models/operations"; + +let value: CreateDockercomposeApplicationRequestBody = { + projectUuid: "", + serverUuid: "", + environmentName: "", + dockerComposeRaw: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `projectUuid` | *string* | :heavy_check_mark: | The project UUID. | +| `serverUuid` | *string* | :heavy_check_mark: | The server UUID. | +| `environmentName` | *string* | :heavy_check_mark: | The environment name. | +| `dockerComposeRaw` | *string* | :heavy_check_mark: | The Docker Compose raw content. | +| `destinationUuid` | *string* | :heavy_minus_sign: | The destination UUID if the server has more than one destinations. | +| `name` | *string* | :heavy_minus_sign: | The application name. | +| `description` | *string* | :heavy_minus_sign: | The application description. | +| `instantDeploy` | *boolean* | :heavy_minus_sign: | The flag to indicate if the application should be deployed instantly. | +| `useBuildServer` | *boolean* | :heavy_minus_sign: | Use build server. | \ No newline at end of file diff --git a/docs/models/operations/createdockerfileapplicationbuildpack.md b/docs/models/operations/createdockerfileapplicationbuildpack.md new file mode 100644 index 0000000..0ecde5d --- /dev/null +++ b/docs/models/operations/createdockerfileapplicationbuildpack.md @@ -0,0 +1,17 @@ +# CreateDockerfileApplicationBuildPack + +The build pack type. + +## Example Usage + +```typescript +import { CreateDockerfileApplicationBuildPack } from "coolify/models/operations"; + +let value: CreateDockerfileApplicationBuildPack = "dockerfile"; +``` + +## Values + +```typescript +"nixpacks" | "static" | "dockerfile" | "dockercompose" +``` \ No newline at end of file diff --git a/docs/models/operations/createdockerfileapplicationredirect.md b/docs/models/operations/createdockerfileapplicationredirect.md new file mode 100644 index 0000000..2afb406 --- /dev/null +++ b/docs/models/operations/createdockerfileapplicationredirect.md @@ -0,0 +1,17 @@ +# CreateDockerfileApplicationRedirect + +How to set redirect with Traefik / Caddy. www<->non-www. + +## Example Usage + +```typescript +import { CreateDockerfileApplicationRedirect } from "coolify/models/operations"; + +let value: CreateDockerfileApplicationRedirect = "both"; +``` + +## Values + +```typescript +"www" | "non-www" | "both" +``` \ No newline at end of file diff --git a/docs/models/operations/createdockerfileapplicationrequestbody.md b/docs/models/operations/createdockerfileapplicationrequestbody.md new file mode 100644 index 0000000..585b803 --- /dev/null +++ b/docs/models/operations/createdockerfileapplicationrequestbody.md @@ -0,0 +1,67 @@ +# CreateDockerfileApplicationRequestBody + +Application object that needs to be created. + +## Example Usage + +```typescript +import { CreateDockerfileApplicationRequestBody } from "coolify/models/operations"; + +let value: CreateDockerfileApplicationRequestBody = { + projectUuid: "", + serverUuid: "", + environmentName: "", + dockerfile: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `projectUuid` | *string* | :heavy_check_mark: | The project UUID. | +| `serverUuid` | *string* | :heavy_check_mark: | The server UUID. | +| `environmentName` | *string* | :heavy_check_mark: | The environment name. | +| `dockerfile` | *string* | :heavy_check_mark: | The Dockerfile content. | +| `buildPack` | [operations.CreateDockerfileApplicationBuildPack](../../models/operations/createdockerfileapplicationbuildpack.md) | :heavy_minus_sign: | The build pack type. | +| `portsExposes` | *string* | :heavy_minus_sign: | The ports to expose. | +| `destinationUuid` | *string* | :heavy_minus_sign: | The destination UUID. | +| `name` | *string* | :heavy_minus_sign: | The application name. | +| `description` | *string* | :heavy_minus_sign: | The application description. | +| `domains` | *string* | :heavy_minus_sign: | The application domains. | +| `dockerRegistryImageName` | *string* | :heavy_minus_sign: | The docker registry image name. | +| `dockerRegistryImageTag` | *string* | :heavy_minus_sign: | The docker registry image tag. | +| `portsMappings` | *string* | :heavy_minus_sign: | The ports mappings. | +| `baseDirectory` | *string* | :heavy_minus_sign: | The base directory for all commands. | +| `healthCheckEnabled` | *boolean* | :heavy_minus_sign: | Health check enabled. | +| `healthCheckPath` | *string* | :heavy_minus_sign: | Health check path. | +| `healthCheckPort` | *string* | :heavy_minus_sign: | Health check port. | +| `healthCheckHost` | *string* | :heavy_minus_sign: | Health check host. | +| `healthCheckMethod` | *string* | :heavy_minus_sign: | Health check method. | +| `healthCheckReturnCode` | *number* | :heavy_minus_sign: | Health check return code. | +| `healthCheckScheme` | *string* | :heavy_minus_sign: | Health check scheme. | +| `healthCheckResponseText` | *string* | :heavy_minus_sign: | Health check response text. | +| `healthCheckInterval` | *number* | :heavy_minus_sign: | Health check interval in seconds. | +| `healthCheckTimeout` | *number* | :heavy_minus_sign: | Health check timeout in seconds. | +| `healthCheckRetries` | *number* | :heavy_minus_sign: | Health check retries count. | +| `healthCheckStartPeriod` | *number* | :heavy_minus_sign: | Health check start period in seconds. | +| `limitsMemory` | *string* | :heavy_minus_sign: | Memory limit. | +| `limitsMemorySwap` | *string* | :heavy_minus_sign: | Memory swap limit. | +| `limitsMemorySwappiness` | *number* | :heavy_minus_sign: | Memory swappiness. | +| `limitsMemoryReservation` | *string* | :heavy_minus_sign: | Memory reservation. | +| `limitsCpus` | *string* | :heavy_minus_sign: | CPU limit. | +| `limitsCpuset` | *string* | :heavy_minus_sign: | CPU set. | +| `limitsCpuShares` | *number* | :heavy_minus_sign: | CPU shares. | +| `customLabels` | *string* | :heavy_minus_sign: | Custom labels. | +| `customDockerRunOptions` | *string* | :heavy_minus_sign: | Custom docker run options. | +| `postDeploymentCommand` | *string* | :heavy_minus_sign: | Post deployment command. | +| `postDeploymentCommandContainer` | *string* | :heavy_minus_sign: | Post deployment command container. | +| `preDeploymentCommand` | *string* | :heavy_minus_sign: | Pre deployment command. | +| `preDeploymentCommandContainer` | *string* | :heavy_minus_sign: | Pre deployment command container. | +| `manualWebhookSecretGithub` | *string* | :heavy_minus_sign: | Manual webhook secret for Github. | +| `manualWebhookSecretGitlab` | *string* | :heavy_minus_sign: | Manual webhook secret for Gitlab. | +| `manualWebhookSecretBitbucket` | *string* | :heavy_minus_sign: | Manual webhook secret for Bitbucket. | +| `manualWebhookSecretGitea` | *string* | :heavy_minus_sign: | Manual webhook secret for Gitea. | +| `redirect` | [operations.CreateDockerfileApplicationRedirect](../../models/operations/createdockerfileapplicationredirect.md) | :heavy_minus_sign: | How to set redirect with Traefik / Caddy. www<->non-www. | +| `instantDeploy` | *boolean* | :heavy_minus_sign: | The flag to indicate if the application should be deployed instantly. | +| `useBuildServer` | *boolean* | :heavy_minus_sign: | Use build server. | \ No newline at end of file diff --git a/docs/models/operations/createdockerimageapplicationredirect.md b/docs/models/operations/createdockerimageapplicationredirect.md new file mode 100644 index 0000000..535a75c --- /dev/null +++ b/docs/models/operations/createdockerimageapplicationredirect.md @@ -0,0 +1,17 @@ +# CreateDockerimageApplicationRedirect + +How to set redirect with Traefik / Caddy. www<->non-www. + +## Example Usage + +```typescript +import { CreateDockerimageApplicationRedirect } from "coolify/models/operations"; + +let value: CreateDockerimageApplicationRedirect = "www"; +``` + +## Values + +```typescript +"www" | "non-www" | "both" +``` \ No newline at end of file diff --git a/docs/models/operations/createdockerimageapplicationrequestbody.md b/docs/models/operations/createdockerimageapplicationrequestbody.md new file mode 100644 index 0000000..277d507 --- /dev/null +++ b/docs/models/operations/createdockerimageapplicationrequestbody.md @@ -0,0 +1,65 @@ +# CreateDockerimageApplicationRequestBody + +Application object that needs to be created. + +## Example Usage + +```typescript +import { CreateDockerimageApplicationRequestBody } from "coolify/models/operations"; + +let value: CreateDockerimageApplicationRequestBody = { + projectUuid: "", + serverUuid: "", + environmentName: "", + dockerRegistryImageName: "", + portsExposes: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `projectUuid` | *string* | :heavy_check_mark: | The project UUID. | +| `serverUuid` | *string* | :heavy_check_mark: | The server UUID. | +| `environmentName` | *string* | :heavy_check_mark: | The environment name. | +| `dockerRegistryImageName` | *string* | :heavy_check_mark: | The docker registry image name. | +| `dockerRegistryImageTag` | *string* | :heavy_minus_sign: | The docker registry image tag. | +| `portsExposes` | *string* | :heavy_check_mark: | The ports to expose. | +| `destinationUuid` | *string* | :heavy_minus_sign: | The destination UUID. | +| `name` | *string* | :heavy_minus_sign: | The application name. | +| `description` | *string* | :heavy_minus_sign: | The application description. | +| `domains` | *string* | :heavy_minus_sign: | The application domains. | +| `portsMappings` | *string* | :heavy_minus_sign: | The ports mappings. | +| `healthCheckEnabled` | *boolean* | :heavy_minus_sign: | Health check enabled. | +| `healthCheckPath` | *string* | :heavy_minus_sign: | Health check path. | +| `healthCheckPort` | *string* | :heavy_minus_sign: | Health check port. | +| `healthCheckHost` | *string* | :heavy_minus_sign: | Health check host. | +| `healthCheckMethod` | *string* | :heavy_minus_sign: | Health check method. | +| `healthCheckReturnCode` | *number* | :heavy_minus_sign: | Health check return code. | +| `healthCheckScheme` | *string* | :heavy_minus_sign: | Health check scheme. | +| `healthCheckResponseText` | *string* | :heavy_minus_sign: | Health check response text. | +| `healthCheckInterval` | *number* | :heavy_minus_sign: | Health check interval in seconds. | +| `healthCheckTimeout` | *number* | :heavy_minus_sign: | Health check timeout in seconds. | +| `healthCheckRetries` | *number* | :heavy_minus_sign: | Health check retries count. | +| `healthCheckStartPeriod` | *number* | :heavy_minus_sign: | Health check start period in seconds. | +| `limitsMemory` | *string* | :heavy_minus_sign: | Memory limit. | +| `limitsMemorySwap` | *string* | :heavy_minus_sign: | Memory swap limit. | +| `limitsMemorySwappiness` | *number* | :heavy_minus_sign: | Memory swappiness. | +| `limitsMemoryReservation` | *string* | :heavy_minus_sign: | Memory reservation. | +| `limitsCpus` | *string* | :heavy_minus_sign: | CPU limit. | +| `limitsCpuset` | *string* | :heavy_minus_sign: | CPU set. | +| `limitsCpuShares` | *number* | :heavy_minus_sign: | CPU shares. | +| `customLabels` | *string* | :heavy_minus_sign: | Custom labels. | +| `customDockerRunOptions` | *string* | :heavy_minus_sign: | Custom docker run options. | +| `postDeploymentCommand` | *string* | :heavy_minus_sign: | Post deployment command. | +| `postDeploymentCommandContainer` | *string* | :heavy_minus_sign: | Post deployment command container. | +| `preDeploymentCommand` | *string* | :heavy_minus_sign: | Pre deployment command. | +| `preDeploymentCommandContainer` | *string* | :heavy_minus_sign: | Pre deployment command container. | +| `manualWebhookSecretGithub` | *string* | :heavy_minus_sign: | Manual webhook secret for Github. | +| `manualWebhookSecretGitlab` | *string* | :heavy_minus_sign: | Manual webhook secret for Gitlab. | +| `manualWebhookSecretBitbucket` | *string* | :heavy_minus_sign: | Manual webhook secret for Bitbucket. | +| `manualWebhookSecretGitea` | *string* | :heavy_minus_sign: | Manual webhook secret for Gitea. | +| `redirect` | [operations.CreateDockerimageApplicationRedirect](../../models/operations/createdockerimageapplicationredirect.md) | :heavy_minus_sign: | How to set redirect with Traefik / Caddy. www<->non-www. | +| `instantDeploy` | *boolean* | :heavy_minus_sign: | The flag to indicate if the application should be deployed instantly. | +| `useBuildServer` | *boolean* | :heavy_minus_sign: | Use build server. | \ No newline at end of file diff --git a/docs/models/operations/createenvbyapplicationuuidrequest.md b/docs/models/operations/createenvbyapplicationuuidrequest.md new file mode 100644 index 0000000..e1eeeef --- /dev/null +++ b/docs/models/operations/createenvbyapplicationuuidrequest.md @@ -0,0 +1,19 @@ +# CreateEnvByApplicationUuidRequest + +## Example Usage + +```typescript +import { CreateEnvByApplicationUuidRequest } from "coolify/models/operations"; + +let value: CreateEnvByApplicationUuidRequest = { + uuid: "56ecb1eb-f2d2-491d-8c96-1b7bdfd05b28", + requestBody: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `uuid` | *string* | :heavy_check_mark: | UUID of the application. | +| `requestBody` | [operations.CreateEnvByApplicationUuidRequestBody](../../models/operations/createenvbyapplicationuuidrequestbody.md) | :heavy_check_mark: | Env created. | \ No newline at end of file diff --git a/docs/models/operations/createenvbyapplicationuuidrequestbody.md b/docs/models/operations/createenvbyapplicationuuidrequestbody.md new file mode 100644 index 0000000..923b47b --- /dev/null +++ b/docs/models/operations/createenvbyapplicationuuidrequestbody.md @@ -0,0 +1,23 @@ +# CreateEnvByApplicationUuidRequestBody + +Env created. + +## Example Usage + +```typescript +import { CreateEnvByApplicationUuidRequestBody } from "coolify/models/operations"; + +let value: CreateEnvByApplicationUuidRequestBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `key` | *string* | :heavy_minus_sign: | The key of the environment variable. | +| `value` | *string* | :heavy_minus_sign: | The value of the environment variable. | +| `isPreview` | *boolean* | :heavy_minus_sign: | The flag to indicate if the environment variable is used in preview deployments. | +| `isBuildTime` | *boolean* | :heavy_minus_sign: | The flag to indicate if the environment variable is used in build time. | +| `isLiteral` | *boolean* | :heavy_minus_sign: | The flag to indicate if the environment variable is a literal, nothing espaced. | +| `isMultiline` | *boolean* | :heavy_minus_sign: | The flag to indicate if the environment variable is multiline. | +| `isShownOnce` | *boolean* | :heavy_minus_sign: | The flag to indicate if the environment variable's value is shown on the UI. | \ No newline at end of file diff --git a/docs/models/operations/createenvbyapplicationuuidresponsebody.md b/docs/models/operations/createenvbyapplicationuuidresponsebody.md new file mode 100644 index 0000000..a3d0eb6 --- /dev/null +++ b/docs/models/operations/createenvbyapplicationuuidresponsebody.md @@ -0,0 +1,19 @@ +# CreateEnvByApplicationUuidResponseBody + +Environment variable created. + +## Example Usage + +```typescript +import { CreateEnvByApplicationUuidResponseBody } from "coolify/models/operations"; + +let value: CreateEnvByApplicationUuidResponseBody = { + uuid: "nc0k04gk8g0cgsk440g0koko", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `uuid` | *string* | :heavy_minus_sign: | N/A | nc0k04gk8g0cgsk440g0koko | \ No newline at end of file diff --git a/docs/models/operations/createenvbyserviceuuidrequest.md b/docs/models/operations/createenvbyserviceuuidrequest.md new file mode 100644 index 0000000..fdc9193 --- /dev/null +++ b/docs/models/operations/createenvbyserviceuuidrequest.md @@ -0,0 +1,19 @@ +# CreateEnvByServiceUuidRequest + +## Example Usage + +```typescript +import { CreateEnvByServiceUuidRequest } from "coolify/models/operations"; + +let value: CreateEnvByServiceUuidRequest = { + uuid: "c8177365-2748-40ed-98df-1aff92903f5a", + requestBody: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `uuid` | *string* | :heavy_check_mark: | UUID of the service. | +| `requestBody` | [operations.CreateEnvByServiceUuidRequestBody](../../models/operations/createenvbyserviceuuidrequestbody.md) | :heavy_check_mark: | Env created. | \ No newline at end of file diff --git a/docs/models/operations/createenvbyserviceuuidrequestbody.md b/docs/models/operations/createenvbyserviceuuidrequestbody.md new file mode 100644 index 0000000..dd5266b --- /dev/null +++ b/docs/models/operations/createenvbyserviceuuidrequestbody.md @@ -0,0 +1,23 @@ +# CreateEnvByServiceUuidRequestBody + +Env created. + +## Example Usage + +```typescript +import { CreateEnvByServiceUuidRequestBody } from "coolify/models/operations"; + +let value: CreateEnvByServiceUuidRequestBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `key` | *string* | :heavy_minus_sign: | The key of the environment variable. | +| `value` | *string* | :heavy_minus_sign: | The value of the environment variable. | +| `isPreview` | *boolean* | :heavy_minus_sign: | The flag to indicate if the environment variable is used in preview deployments. | +| `isBuildTime` | *boolean* | :heavy_minus_sign: | The flag to indicate if the environment variable is used in build time. | +| `isLiteral` | *boolean* | :heavy_minus_sign: | The flag to indicate if the environment variable is a literal, nothing espaced. | +| `isMultiline` | *boolean* | :heavy_minus_sign: | The flag to indicate if the environment variable is multiline. | +| `isShownOnce` | *boolean* | :heavy_minus_sign: | The flag to indicate if the environment variable's value is shown on the UI. | \ No newline at end of file diff --git a/docs/models/operations/createenvbyserviceuuidresponsebody.md b/docs/models/operations/createenvbyserviceuuidresponsebody.md new file mode 100644 index 0000000..3c5ce07 --- /dev/null +++ b/docs/models/operations/createenvbyserviceuuidresponsebody.md @@ -0,0 +1,19 @@ +# CreateEnvByServiceUuidResponseBody + +Environment variable created. + +## Example Usage + +```typescript +import { CreateEnvByServiceUuidResponseBody } from "coolify/models/operations"; + +let value: CreateEnvByServiceUuidResponseBody = { + uuid: "nc0k04gk8g0cgsk440g0koko", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `uuid` | *string* | :heavy_minus_sign: | N/A | nc0k04gk8g0cgsk440g0koko | \ No newline at end of file diff --git a/docs/models/operations/createprivatedeploykeyapplicationbuildpack.md b/docs/models/operations/createprivatedeploykeyapplicationbuildpack.md new file mode 100644 index 0000000..9cc6585 --- /dev/null +++ b/docs/models/operations/createprivatedeploykeyapplicationbuildpack.md @@ -0,0 +1,17 @@ +# CreatePrivateDeployKeyApplicationBuildPack + +The build pack type. + +## Example Usage + +```typescript +import { CreatePrivateDeployKeyApplicationBuildPack } from "coolify/models/operations"; + +let value: CreatePrivateDeployKeyApplicationBuildPack = "static"; +``` + +## Values + +```typescript +"nixpacks" | "static" | "dockerfile" | "dockercompose" +``` \ No newline at end of file diff --git a/docs/models/operations/createprivatedeploykeyapplicationredirect.md b/docs/models/operations/createprivatedeploykeyapplicationredirect.md new file mode 100644 index 0000000..46e6ba0 --- /dev/null +++ b/docs/models/operations/createprivatedeploykeyapplicationredirect.md @@ -0,0 +1,17 @@ +# CreatePrivateDeployKeyApplicationRedirect + +How to set redirect with Traefik / Caddy. www<->non-www. + +## Example Usage + +```typescript +import { CreatePrivateDeployKeyApplicationRedirect } from "coolify/models/operations"; + +let value: CreatePrivateDeployKeyApplicationRedirect = "both"; +``` + +## Values + +```typescript +"www" | "non-www" | "both" +``` \ No newline at end of file diff --git a/docs/models/operations/createprivatedeploykeyapplicationrequestbody.md b/docs/models/operations/createprivatedeploykeyapplicationrequestbody.md new file mode 100644 index 0000000..b99fb6d --- /dev/null +++ b/docs/models/operations/createprivatedeploykeyapplicationrequestbody.md @@ -0,0 +1,87 @@ +# CreatePrivateDeployKeyApplicationRequestBody + +Application object that needs to be created. + +## Example Usage + +```typescript +import { CreatePrivateDeployKeyApplicationRequestBody } from "coolify/models/operations"; + +let value: CreatePrivateDeployKeyApplicationRequestBody = { + projectUuid: "", + serverUuid: "", + environmentName: "", + privateKeyUuid: "", + gitRepository: "", + gitBranch: "", + portsExposes: "", + buildPack: "dockerfile", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `projectUuid` | *string* | :heavy_check_mark: | The project UUID. | +| `serverUuid` | *string* | :heavy_check_mark: | The server UUID. | +| `environmentName` | *string* | :heavy_check_mark: | The environment name. | +| `privateKeyUuid` | *string* | :heavy_check_mark: | The private key UUID. | +| `gitRepository` | *string* | :heavy_check_mark: | The git repository URL. | +| `gitBranch` | *string* | :heavy_check_mark: | The git branch. | +| `portsExposes` | *string* | :heavy_check_mark: | The ports to expose. | +| `destinationUuid` | *string* | :heavy_minus_sign: | The destination UUID. | +| `buildPack` | [operations.CreatePrivateDeployKeyApplicationBuildPack](../../models/operations/createprivatedeploykeyapplicationbuildpack.md) | :heavy_check_mark: | The build pack type. | +| `name` | *string* | :heavy_minus_sign: | The application name. | +| `description` | *string* | :heavy_minus_sign: | The application description. | +| `domains` | *string* | :heavy_minus_sign: | The application domains. | +| `gitCommitSha` | *string* | :heavy_minus_sign: | The git commit SHA. | +| `dockerRegistryImageName` | *string* | :heavy_minus_sign: | The docker registry image name. | +| `dockerRegistryImageTag` | *string* | :heavy_minus_sign: | The docker registry image tag. | +| `isStatic` | *boolean* | :heavy_minus_sign: | The flag to indicate if the application is static. | +| `staticImage` | [operations.CreatePrivateDeployKeyApplicationStaticImage](../../models/operations/createprivatedeploykeyapplicationstaticimage.md) | :heavy_minus_sign: | The static image. | +| `installCommand` | *string* | :heavy_minus_sign: | The install command. | +| `buildCommand` | *string* | :heavy_minus_sign: | The build command. | +| `startCommand` | *string* | :heavy_minus_sign: | The start command. | +| `portsMappings` | *string* | :heavy_minus_sign: | The ports mappings. | +| `baseDirectory` | *string* | :heavy_minus_sign: | The base directory for all commands. | +| `publishDirectory` | *string* | :heavy_minus_sign: | The publish directory. | +| `healthCheckEnabled` | *boolean* | :heavy_minus_sign: | Health check enabled. | +| `healthCheckPath` | *string* | :heavy_minus_sign: | Health check path. | +| `healthCheckPort` | *string* | :heavy_minus_sign: | Health check port. | +| `healthCheckHost` | *string* | :heavy_minus_sign: | Health check host. | +| `healthCheckMethod` | *string* | :heavy_minus_sign: | Health check method. | +| `healthCheckReturnCode` | *number* | :heavy_minus_sign: | Health check return code. | +| `healthCheckScheme` | *string* | :heavy_minus_sign: | Health check scheme. | +| `healthCheckResponseText` | *string* | :heavy_minus_sign: | Health check response text. | +| `healthCheckInterval` | *number* | :heavy_minus_sign: | Health check interval in seconds. | +| `healthCheckTimeout` | *number* | :heavy_minus_sign: | Health check timeout in seconds. | +| `healthCheckRetries` | *number* | :heavy_minus_sign: | Health check retries count. | +| `healthCheckStartPeriod` | *number* | :heavy_minus_sign: | Health check start period in seconds. | +| `limitsMemory` | *string* | :heavy_minus_sign: | Memory limit. | +| `limitsMemorySwap` | *string* | :heavy_minus_sign: | Memory swap limit. | +| `limitsMemorySwappiness` | *number* | :heavy_minus_sign: | Memory swappiness. | +| `limitsMemoryReservation` | *string* | :heavy_minus_sign: | Memory reservation. | +| `limitsCpus` | *string* | :heavy_minus_sign: | CPU limit. | +| `limitsCpuset` | *string* | :heavy_minus_sign: | CPU set. | +| `limitsCpuShares` | *number* | :heavy_minus_sign: | CPU shares. | +| `customLabels` | *string* | :heavy_minus_sign: | Custom labels. | +| `customDockerRunOptions` | *string* | :heavy_minus_sign: | Custom docker run options. | +| `postDeploymentCommand` | *string* | :heavy_minus_sign: | Post deployment command. | +| `postDeploymentCommandContainer` | *string* | :heavy_minus_sign: | Post deployment command container. | +| `preDeploymentCommand` | *string* | :heavy_minus_sign: | Pre deployment command. | +| `preDeploymentCommandContainer` | *string* | :heavy_minus_sign: | Pre deployment command container. | +| `manualWebhookSecretGithub` | *string* | :heavy_minus_sign: | Manual webhook secret for Github. | +| `manualWebhookSecretGitlab` | *string* | :heavy_minus_sign: | Manual webhook secret for Gitlab. | +| `manualWebhookSecretBitbucket` | *string* | :heavy_minus_sign: | Manual webhook secret for Bitbucket. | +| `manualWebhookSecretGitea` | *string* | :heavy_minus_sign: | Manual webhook secret for Gitea. | +| `redirect` | [operations.CreatePrivateDeployKeyApplicationRedirect](../../models/operations/createprivatedeploykeyapplicationredirect.md) | :heavy_minus_sign: | How to set redirect with Traefik / Caddy. www<->non-www. | +| `instantDeploy` | *boolean* | :heavy_minus_sign: | The flag to indicate if the application should be deployed instantly. | +| `dockerfile` | *string* | :heavy_minus_sign: | The Dockerfile content. | +| `dockerComposeLocation` | *string* | :heavy_minus_sign: | The Docker Compose location. | +| `dockerComposeRaw` | *string* | :heavy_minus_sign: | The Docker Compose raw content. | +| `dockerComposeCustomStartCommand` | *string* | :heavy_minus_sign: | The Docker Compose custom start command. | +| `dockerComposeCustomBuildCommand` | *string* | :heavy_minus_sign: | The Docker Compose custom build command. | +| `dockerComposeDomains` | *any*[] | :heavy_minus_sign: | The Docker Compose domains. | +| `watchPaths` | *string* | :heavy_minus_sign: | The watch paths. | +| `useBuildServer` | *boolean* | :heavy_minus_sign: | Use build server. | \ No newline at end of file diff --git a/docs/models/operations/createprivatedeploykeyapplicationstaticimage.md b/docs/models/operations/createprivatedeploykeyapplicationstaticimage.md new file mode 100644 index 0000000..fe1d594 --- /dev/null +++ b/docs/models/operations/createprivatedeploykeyapplicationstaticimage.md @@ -0,0 +1,17 @@ +# CreatePrivateDeployKeyApplicationStaticImage + +The static image. + +## Example Usage + +```typescript +import { CreatePrivateDeployKeyApplicationStaticImage } from "coolify/models/operations"; + +let value: CreatePrivateDeployKeyApplicationStaticImage = "nginx:alpine"; +``` + +## Values + +```typescript +"nginx:alpine" +``` \ No newline at end of file diff --git a/docs/models/operations/createprivategithubappapplicationbuildpack.md b/docs/models/operations/createprivategithubappapplicationbuildpack.md new file mode 100644 index 0000000..0b46e20 --- /dev/null +++ b/docs/models/operations/createprivategithubappapplicationbuildpack.md @@ -0,0 +1,17 @@ +# CreatePrivateGithubAppApplicationBuildPack + +The build pack type. + +## Example Usage + +```typescript +import { CreatePrivateGithubAppApplicationBuildPack } from "coolify/models/operations"; + +let value: CreatePrivateGithubAppApplicationBuildPack = "static"; +``` + +## Values + +```typescript +"nixpacks" | "static" | "dockerfile" | "dockercompose" +``` \ No newline at end of file diff --git a/docs/models/operations/createprivategithubappapplicationredirect.md b/docs/models/operations/createprivategithubappapplicationredirect.md new file mode 100644 index 0000000..8788a89 --- /dev/null +++ b/docs/models/operations/createprivategithubappapplicationredirect.md @@ -0,0 +1,17 @@ +# CreatePrivateGithubAppApplicationRedirect + +How to set redirect with Traefik / Caddy. www<->non-www. + +## Example Usage + +```typescript +import { CreatePrivateGithubAppApplicationRedirect } from "coolify/models/operations"; + +let value: CreatePrivateGithubAppApplicationRedirect = "both"; +``` + +## Values + +```typescript +"www" | "non-www" | "both" +``` \ No newline at end of file diff --git a/docs/models/operations/createprivategithubappapplicationrequestbody.md b/docs/models/operations/createprivategithubappapplicationrequestbody.md new file mode 100644 index 0000000..4d702dc --- /dev/null +++ b/docs/models/operations/createprivategithubappapplicationrequestbody.md @@ -0,0 +1,87 @@ +# CreatePrivateGithubAppApplicationRequestBody + +Application object that needs to be created. + +## Example Usage + +```typescript +import { CreatePrivateGithubAppApplicationRequestBody } from "coolify/models/operations"; + +let value: CreatePrivateGithubAppApplicationRequestBody = { + projectUuid: "", + serverUuid: "", + environmentName: "", + githubAppUuid: "", + gitRepository: "", + gitBranch: "", + portsExposes: "", + buildPack: "dockercompose", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `projectUuid` | *string* | :heavy_check_mark: | The project UUID. | +| `serverUuid` | *string* | :heavy_check_mark: | The server UUID. | +| `environmentName` | *string* | :heavy_check_mark: | The environment name. | +| `githubAppUuid` | *string* | :heavy_check_mark: | The Github App UUID. | +| `gitRepository` | *string* | :heavy_check_mark: | The git repository URL. | +| `gitBranch` | *string* | :heavy_check_mark: | The git branch. | +| `portsExposes` | *string* | :heavy_check_mark: | The ports to expose. | +| `destinationUuid` | *string* | :heavy_minus_sign: | The destination UUID. | +| `buildPack` | [operations.CreatePrivateGithubAppApplicationBuildPack](../../models/operations/createprivategithubappapplicationbuildpack.md) | :heavy_check_mark: | The build pack type. | +| `name` | *string* | :heavy_minus_sign: | The application name. | +| `description` | *string* | :heavy_minus_sign: | The application description. | +| `domains` | *string* | :heavy_minus_sign: | The application domains. | +| `gitCommitSha` | *string* | :heavy_minus_sign: | The git commit SHA. | +| `dockerRegistryImageName` | *string* | :heavy_minus_sign: | The docker registry image name. | +| `dockerRegistryImageTag` | *string* | :heavy_minus_sign: | The docker registry image tag. | +| `isStatic` | *boolean* | :heavy_minus_sign: | The flag to indicate if the application is static. | +| `staticImage` | [operations.CreatePrivateGithubAppApplicationStaticImage](../../models/operations/createprivategithubappapplicationstaticimage.md) | :heavy_minus_sign: | The static image. | +| `installCommand` | *string* | :heavy_minus_sign: | The install command. | +| `buildCommand` | *string* | :heavy_minus_sign: | The build command. | +| `startCommand` | *string* | :heavy_minus_sign: | The start command. | +| `portsMappings` | *string* | :heavy_minus_sign: | The ports mappings. | +| `baseDirectory` | *string* | :heavy_minus_sign: | The base directory for all commands. | +| `publishDirectory` | *string* | :heavy_minus_sign: | The publish directory. | +| `healthCheckEnabled` | *boolean* | :heavy_minus_sign: | Health check enabled. | +| `healthCheckPath` | *string* | :heavy_minus_sign: | Health check path. | +| `healthCheckPort` | *string* | :heavy_minus_sign: | Health check port. | +| `healthCheckHost` | *string* | :heavy_minus_sign: | Health check host. | +| `healthCheckMethod` | *string* | :heavy_minus_sign: | Health check method. | +| `healthCheckReturnCode` | *number* | :heavy_minus_sign: | Health check return code. | +| `healthCheckScheme` | *string* | :heavy_minus_sign: | Health check scheme. | +| `healthCheckResponseText` | *string* | :heavy_minus_sign: | Health check response text. | +| `healthCheckInterval` | *number* | :heavy_minus_sign: | Health check interval in seconds. | +| `healthCheckTimeout` | *number* | :heavy_minus_sign: | Health check timeout in seconds. | +| `healthCheckRetries` | *number* | :heavy_minus_sign: | Health check retries count. | +| `healthCheckStartPeriod` | *number* | :heavy_minus_sign: | Health check start period in seconds. | +| `limitsMemory` | *string* | :heavy_minus_sign: | Memory limit. | +| `limitsMemorySwap` | *string* | :heavy_minus_sign: | Memory swap limit. | +| `limitsMemorySwappiness` | *number* | :heavy_minus_sign: | Memory swappiness. | +| `limitsMemoryReservation` | *string* | :heavy_minus_sign: | Memory reservation. | +| `limitsCpus` | *string* | :heavy_minus_sign: | CPU limit. | +| `limitsCpuset` | *string* | :heavy_minus_sign: | CPU set. | +| `limitsCpuShares` | *number* | :heavy_minus_sign: | CPU shares. | +| `customLabels` | *string* | :heavy_minus_sign: | Custom labels. | +| `customDockerRunOptions` | *string* | :heavy_minus_sign: | Custom docker run options. | +| `postDeploymentCommand` | *string* | :heavy_minus_sign: | Post deployment command. | +| `postDeploymentCommandContainer` | *string* | :heavy_minus_sign: | Post deployment command container. | +| `preDeploymentCommand` | *string* | :heavy_minus_sign: | Pre deployment command. | +| `preDeploymentCommandContainer` | *string* | :heavy_minus_sign: | Pre deployment command container. | +| `manualWebhookSecretGithub` | *string* | :heavy_minus_sign: | Manual webhook secret for Github. | +| `manualWebhookSecretGitlab` | *string* | :heavy_minus_sign: | Manual webhook secret for Gitlab. | +| `manualWebhookSecretBitbucket` | *string* | :heavy_minus_sign: | Manual webhook secret for Bitbucket. | +| `manualWebhookSecretGitea` | *string* | :heavy_minus_sign: | Manual webhook secret for Gitea. | +| `redirect` | [operations.CreatePrivateGithubAppApplicationRedirect](../../models/operations/createprivategithubappapplicationredirect.md) | :heavy_minus_sign: | How to set redirect with Traefik / Caddy. www<->non-www. | +| `instantDeploy` | *boolean* | :heavy_minus_sign: | The flag to indicate if the application should be deployed instantly. | +| `dockerfile` | *string* | :heavy_minus_sign: | The Dockerfile content. | +| `dockerComposeLocation` | *string* | :heavy_minus_sign: | The Docker Compose location. | +| `dockerComposeRaw` | *string* | :heavy_minus_sign: | The Docker Compose raw content. | +| `dockerComposeCustomStartCommand` | *string* | :heavy_minus_sign: | The Docker Compose custom start command. | +| `dockerComposeCustomBuildCommand` | *string* | :heavy_minus_sign: | The Docker Compose custom build command. | +| `dockerComposeDomains` | *any*[] | :heavy_minus_sign: | The Docker Compose domains. | +| `watchPaths` | *string* | :heavy_minus_sign: | The watch paths. | +| `useBuildServer` | *boolean* | :heavy_minus_sign: | Use build server. | \ No newline at end of file diff --git a/docs/models/operations/createprivategithubappapplicationstaticimage.md b/docs/models/operations/createprivategithubappapplicationstaticimage.md new file mode 100644 index 0000000..12ebb49 --- /dev/null +++ b/docs/models/operations/createprivategithubappapplicationstaticimage.md @@ -0,0 +1,17 @@ +# CreatePrivateGithubAppApplicationStaticImage + +The static image. + +## Example Usage + +```typescript +import { CreatePrivateGithubAppApplicationStaticImage } from "coolify/models/operations"; + +let value: CreatePrivateGithubAppApplicationStaticImage = "nginx:alpine"; +``` + +## Values + +```typescript +"nginx:alpine" +``` \ No newline at end of file diff --git a/docs/models/operations/createprivatekeyrequestbody.md b/docs/models/operations/createprivatekeyrequestbody.md new file mode 100644 index 0000000..034b3cc --- /dev/null +++ b/docs/models/operations/createprivatekeyrequestbody.md @@ -0,0 +1,19 @@ +# CreatePrivateKeyRequestBody + +## Example Usage + +```typescript +import { CreatePrivateKeyRequestBody } from "coolify/models/operations"; + +let value: CreatePrivateKeyRequestBody = { + privateKey: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `privateKey` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createprivatekeyresponsebody.md b/docs/models/operations/createprivatekeyresponsebody.md new file mode 100644 index 0000000..e432cc1 --- /dev/null +++ b/docs/models/operations/createprivatekeyresponsebody.md @@ -0,0 +1,17 @@ +# CreatePrivateKeyResponseBody + +The created private key's UUID. + +## Example Usage + +```typescript +import { CreatePrivateKeyResponseBody } from "coolify/models/operations"; + +let value: CreatePrivateKeyResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `uuid` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createprojectrequestbody.md b/docs/models/operations/createprojectrequestbody.md new file mode 100644 index 0000000..e8273da --- /dev/null +++ b/docs/models/operations/createprojectrequestbody.md @@ -0,0 +1,18 @@ +# CreateProjectRequestBody + +Project created. + +## Example Usage + +```typescript +import { CreateProjectRequestBody } from "coolify/models/operations"; + +let value: CreateProjectRequestBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `name` | *string* | :heavy_minus_sign: | The name of the project. | +| `description` | *string* | :heavy_minus_sign: | The description of the project. | \ No newline at end of file diff --git a/docs/models/operations/createprojectresponsebody.md b/docs/models/operations/createprojectresponsebody.md new file mode 100644 index 0000000..c080d00 --- /dev/null +++ b/docs/models/operations/createprojectresponsebody.md @@ -0,0 +1,19 @@ +# CreateProjectResponseBody + +Project created. + +## Example Usage + +```typescript +import { CreateProjectResponseBody } from "coolify/models/operations"; + +let value: CreateProjectResponseBody = { + uuid: "og888os", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `uuid` | *string* | :heavy_minus_sign: | The UUID of the project. | og888os | \ No newline at end of file diff --git a/docs/models/operations/createpublicapplicationrequestbody.md b/docs/models/operations/createpublicapplicationrequestbody.md new file mode 100644 index 0000000..95db424 --- /dev/null +++ b/docs/models/operations/createpublicapplicationrequestbody.md @@ -0,0 +1,85 @@ +# CreatePublicApplicationRequestBody + +Application object that needs to be created. + +## Example Usage + +```typescript +import { CreatePublicApplicationRequestBody } from "coolify/models/operations"; + +let value: CreatePublicApplicationRequestBody = { + projectUuid: "", + serverUuid: "", + environmentName: "", + gitRepository: "", + gitBranch: "", + buildPack: "dockerfile", + portsExposes: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `projectUuid` | *string* | :heavy_check_mark: | The project UUID. | +| `serverUuid` | *string* | :heavy_check_mark: | The server UUID. | +| `environmentName` | *string* | :heavy_check_mark: | The environment name. | +| `gitRepository` | *string* | :heavy_check_mark: | The git repository URL. | +| `gitBranch` | *string* | :heavy_check_mark: | The git branch. | +| `buildPack` | [operations.BuildPack](../../models/operations/buildpack.md) | :heavy_check_mark: | The build pack type. | +| `portsExposes` | *string* | :heavy_check_mark: | The ports to expose. | +| `destinationUuid` | *string* | :heavy_minus_sign: | The destination UUID. | +| `name` | *string* | :heavy_minus_sign: | The application name. | +| `description` | *string* | :heavy_minus_sign: | The application description. | +| `domains` | *string* | :heavy_minus_sign: | The application domains. | +| `gitCommitSha` | *string* | :heavy_minus_sign: | The git commit SHA. | +| `dockerRegistryImageName` | *string* | :heavy_minus_sign: | The docker registry image name. | +| `dockerRegistryImageTag` | *string* | :heavy_minus_sign: | The docker registry image tag. | +| `isStatic` | *boolean* | :heavy_minus_sign: | The flag to indicate if the application is static. | +| `staticImage` | [operations.StaticImage](../../models/operations/staticimage.md) | :heavy_minus_sign: | The static image. | +| `installCommand` | *string* | :heavy_minus_sign: | The install command. | +| `buildCommand` | *string* | :heavy_minus_sign: | The build command. | +| `startCommand` | *string* | :heavy_minus_sign: | The start command. | +| `portsMappings` | *string* | :heavy_minus_sign: | The ports mappings. | +| `baseDirectory` | *string* | :heavy_minus_sign: | The base directory for all commands. | +| `publishDirectory` | *string* | :heavy_minus_sign: | The publish directory. | +| `healthCheckEnabled` | *boolean* | :heavy_minus_sign: | Health check enabled. | +| `healthCheckPath` | *string* | :heavy_minus_sign: | Health check path. | +| `healthCheckPort` | *string* | :heavy_minus_sign: | Health check port. | +| `healthCheckHost` | *string* | :heavy_minus_sign: | Health check host. | +| `healthCheckMethod` | *string* | :heavy_minus_sign: | Health check method. | +| `healthCheckReturnCode` | *number* | :heavy_minus_sign: | Health check return code. | +| `healthCheckScheme` | *string* | :heavy_minus_sign: | Health check scheme. | +| `healthCheckResponseText` | *string* | :heavy_minus_sign: | Health check response text. | +| `healthCheckInterval` | *number* | :heavy_minus_sign: | Health check interval in seconds. | +| `healthCheckTimeout` | *number* | :heavy_minus_sign: | Health check timeout in seconds. | +| `healthCheckRetries` | *number* | :heavy_minus_sign: | Health check retries count. | +| `healthCheckStartPeriod` | *number* | :heavy_minus_sign: | Health check start period in seconds. | +| `limitsMemory` | *string* | :heavy_minus_sign: | Memory limit. | +| `limitsMemorySwap` | *string* | :heavy_minus_sign: | Memory swap limit. | +| `limitsMemorySwappiness` | *number* | :heavy_minus_sign: | Memory swappiness. | +| `limitsMemoryReservation` | *string* | :heavy_minus_sign: | Memory reservation. | +| `limitsCpus` | *string* | :heavy_minus_sign: | CPU limit. | +| `limitsCpuset` | *string* | :heavy_minus_sign: | CPU set. | +| `limitsCpuShares` | *number* | :heavy_minus_sign: | CPU shares. | +| `customLabels` | *string* | :heavy_minus_sign: | Custom labels. | +| `customDockerRunOptions` | *string* | :heavy_minus_sign: | Custom docker run options. | +| `postDeploymentCommand` | *string* | :heavy_minus_sign: | Post deployment command. | +| `postDeploymentCommandContainer` | *string* | :heavy_minus_sign: | Post deployment command container. | +| `preDeploymentCommand` | *string* | :heavy_minus_sign: | Pre deployment command. | +| `preDeploymentCommandContainer` | *string* | :heavy_minus_sign: | Pre deployment command container. | +| `manualWebhookSecretGithub` | *string* | :heavy_minus_sign: | Manual webhook secret for Github. | +| `manualWebhookSecretGitlab` | *string* | :heavy_minus_sign: | Manual webhook secret for Gitlab. | +| `manualWebhookSecretBitbucket` | *string* | :heavy_minus_sign: | Manual webhook secret for Bitbucket. | +| `manualWebhookSecretGitea` | *string* | :heavy_minus_sign: | Manual webhook secret for Gitea. | +| `redirect` | [operations.Redirect](../../models/operations/redirect.md) | :heavy_minus_sign: | How to set redirect with Traefik / Caddy. www<->non-www. | +| `instantDeploy` | *boolean* | :heavy_minus_sign: | The flag to indicate if the application should be deployed instantly. | +| `dockerfile` | *string* | :heavy_minus_sign: | The Dockerfile content. | +| `dockerComposeLocation` | *string* | :heavy_minus_sign: | The Docker Compose location. | +| `dockerComposeRaw` | *string* | :heavy_minus_sign: | The Docker Compose raw content. | +| `dockerComposeCustomStartCommand` | *string* | :heavy_minus_sign: | The Docker Compose custom start command. | +| `dockerComposeCustomBuildCommand` | *string* | :heavy_minus_sign: | The Docker Compose custom build command. | +| `dockerComposeDomains` | *any*[] | :heavy_minus_sign: | The Docker Compose domains. | +| `watchPaths` | *string* | :heavy_minus_sign: | The watch paths. | +| `useBuildServer` | *boolean* | :heavy_minus_sign: | Use build server. | \ No newline at end of file diff --git a/docs/models/operations/createserverrequestbody.md b/docs/models/operations/createserverrequestbody.md new file mode 100644 index 0000000..d695f8c --- /dev/null +++ b/docs/models/operations/createserverrequestbody.md @@ -0,0 +1,35 @@ +# CreateServerRequestBody + +Server created. + +## Example Usage + +```typescript +import { CreateServerRequestBody } from "coolify/models/operations"; + +let value: CreateServerRequestBody = { + name: "My Server", + description: "My Server Description", + ip: "127.0.0.1", + port: 22, + user: "root", + privateKeyUuid: "og888os", + isBuildServer: false, + instantValidate: false, + proxyType: "traefik", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `name` | *string* | :heavy_minus_sign: | The name of the server. | My Server | +| `description` | *string* | :heavy_minus_sign: | The description of the server. | My Server Description | +| `ip` | *string* | :heavy_minus_sign: | The IP of the server. | 127.0.0.1 | +| `port` | *number* | :heavy_minus_sign: | The port of the server. | 22 | +| `user` | *string* | :heavy_minus_sign: | The user of the server. | root | +| `privateKeyUuid` | *string* | :heavy_minus_sign: | The UUID of the private key. | og888os | +| `isBuildServer` | *boolean* | :heavy_minus_sign: | Is build server. | false | +| `instantValidate` | *boolean* | :heavy_minus_sign: | Instant validate. | false | +| `proxyType` | [operations.ProxyType](../../models/operations/proxytype.md) | :heavy_minus_sign: | The proxy type. | traefik | \ No newline at end of file diff --git a/docs/models/operations/createserverresponsebody.md b/docs/models/operations/createserverresponsebody.md new file mode 100644 index 0000000..54f905a --- /dev/null +++ b/docs/models/operations/createserverresponsebody.md @@ -0,0 +1,19 @@ +# CreateServerResponseBody + +Server created. + +## Example Usage + +```typescript +import { CreateServerResponseBody } from "coolify/models/operations"; + +let value: CreateServerResponseBody = { + uuid: "og888os", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `uuid` | *string* | :heavy_minus_sign: | The UUID of the server. | og888os | \ No newline at end of file diff --git a/docs/models/operations/createservicerequestbody.md b/docs/models/operations/createservicerequestbody.md new file mode 100644 index 0000000..1637848 --- /dev/null +++ b/docs/models/operations/createservicerequestbody.md @@ -0,0 +1,27 @@ +# CreateServiceRequestBody + +## Example Usage + +```typescript +import { CreateServiceRequestBody } from "coolify/models/operations"; + +let value: CreateServiceRequestBody = { + type: "classicpress-with-mysql", + projectUuid: "", + environmentName: "", + serverUuid: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `type` | [operations.Type](../../models/operations/type.md) | :heavy_check_mark: | The one-click service type | +| `name` | *string* | :heavy_minus_sign: | Name of the service. | +| `description` | *string* | :heavy_minus_sign: | Description of the service. | +| `projectUuid` | *string* | :heavy_check_mark: | Project UUID. | +| `environmentName` | *string* | :heavy_check_mark: | Environment name. | +| `serverUuid` | *string* | :heavy_check_mark: | Server UUID. | +| `destinationUuid` | *string* | :heavy_minus_sign: | Destination UUID. Required if server has multiple destinations. | +| `instantDeploy` | *boolean* | :heavy_minus_sign: | Start the service immediately after creation. | \ No newline at end of file diff --git a/docs/models/operations/createserviceresponsebody.md b/docs/models/operations/createserviceresponsebody.md new file mode 100644 index 0000000..2fc51ff --- /dev/null +++ b/docs/models/operations/createserviceresponsebody.md @@ -0,0 +1,18 @@ +# CreateServiceResponseBody + +Create a service. + +## Example Usage + +```typescript +import { CreateServiceResponseBody } from "coolify/models/operations"; + +let value: CreateServiceResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `uuid` | *string* | :heavy_minus_sign: | Service UUID. | +| `domains` | *string*[] | :heavy_minus_sign: | Service domains. | \ No newline at end of file diff --git a/docs/models/operations/data.md b/docs/models/operations/data.md new file mode 100644 index 0000000..90215c4 --- /dev/null +++ b/docs/models/operations/data.md @@ -0,0 +1,21 @@ +# Data + +## Example Usage + +```typescript +import { Data } from "coolify/models/operations"; + +let value: Data = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `key` | *string* | :heavy_minus_sign: | The key of the environment variable. | +| `value` | *string* | :heavy_minus_sign: | The value of the environment variable. | +| `isPreview` | *boolean* | :heavy_minus_sign: | The flag to indicate if the environment variable is used in preview deployments. | +| `isBuildTime` | *boolean* | :heavy_minus_sign: | The flag to indicate if the environment variable is used in build time. | +| `isLiteral` | *boolean* | :heavy_minus_sign: | The flag to indicate if the environment variable is a literal, nothing espaced. | +| `isMultiline` | *boolean* | :heavy_minus_sign: | The flag to indicate if the environment variable is multiline. | +| `isShownOnce` | *boolean* | :heavy_minus_sign: | The flag to indicate if the environment variable's value is shown on the UI. | \ No newline at end of file diff --git a/docs/models/operations/deleteapplicationbyuuidrequest.md b/docs/models/operations/deleteapplicationbyuuidrequest.md new file mode 100644 index 0000000..14ca734 --- /dev/null +++ b/docs/models/operations/deleteapplicationbyuuidrequest.md @@ -0,0 +1,21 @@ +# DeleteApplicationByUuidRequest + +## Example Usage + +```typescript +import { DeleteApplicationByUuidRequest } from "coolify/models/operations"; + +let value: DeleteApplicationByUuidRequest = { + uuid: "325597f1-32a4-4732-91a2-35d1d1f7f9b0", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------- | -------------------------- | -------------------------- | -------------------------- | +| `uuid` | *string* | :heavy_check_mark: | UUID of the application. | +| `deleteConfigurations` | *boolean* | :heavy_minus_sign: | Delete configurations. | +| `deleteVolumes` | *boolean* | :heavy_minus_sign: | Delete volumes. | +| `dockerCleanup` | *boolean* | :heavy_minus_sign: | Run docker cleanup. | +| `deleteConnectedNetworks` | *boolean* | :heavy_minus_sign: | Delete connected networks. | \ No newline at end of file diff --git a/docs/models/operations/deleteapplicationbyuuidresponsebody.md b/docs/models/operations/deleteapplicationbyuuidresponsebody.md new file mode 100644 index 0000000..9e8fb1f --- /dev/null +++ b/docs/models/operations/deleteapplicationbyuuidresponsebody.md @@ -0,0 +1,19 @@ +# DeleteApplicationByUuidResponseBody + +Application deleted. + +## Example Usage + +```typescript +import { DeleteApplicationByUuidResponseBody } from "coolify/models/operations"; + +let value: DeleteApplicationByUuidResponseBody = { + message: "Application deleted.", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------- | -------------------- | -------------------- | -------------------- | -------------------- | +| `message` | *string* | :heavy_minus_sign: | N/A | Application deleted. | \ No newline at end of file diff --git a/docs/models/operations/deletedatabasebyuuidrequest.md b/docs/models/operations/deletedatabasebyuuidrequest.md new file mode 100644 index 0000000..36f005d --- /dev/null +++ b/docs/models/operations/deletedatabasebyuuidrequest.md @@ -0,0 +1,21 @@ +# DeleteDatabaseByUuidRequest + +## Example Usage + +```typescript +import { DeleteDatabaseByUuidRequest } from "coolify/models/operations"; + +let value: DeleteDatabaseByUuidRequest = { + uuid: "f31f3b0b-e465-4b32-974d-38fadfcbff71", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------- | -------------------------- | -------------------------- | -------------------------- | +| `uuid` | *string* | :heavy_check_mark: | UUID of the database. | +| `deleteConfigurations` | *boolean* | :heavy_minus_sign: | Delete configurations. | +| `deleteVolumes` | *boolean* | :heavy_minus_sign: | Delete volumes. | +| `dockerCleanup` | *boolean* | :heavy_minus_sign: | Run docker cleanup. | +| `deleteConnectedNetworks` | *boolean* | :heavy_minus_sign: | Delete connected networks. | \ No newline at end of file diff --git a/docs/models/operations/deletedatabasebyuuidresponsebody.md b/docs/models/operations/deletedatabasebyuuidresponsebody.md new file mode 100644 index 0000000..f5c20ae --- /dev/null +++ b/docs/models/operations/deletedatabasebyuuidresponsebody.md @@ -0,0 +1,19 @@ +# DeleteDatabaseByUuidResponseBody + +Database deleted. + +## Example Usage + +```typescript +import { DeleteDatabaseByUuidResponseBody } from "coolify/models/operations"; + +let value: DeleteDatabaseByUuidResponseBody = { + message: "Database deleted.", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `message` | *string* | :heavy_minus_sign: | N/A | Database deleted. | \ No newline at end of file diff --git a/docs/models/operations/deleteenvbyapplicationuuidrequest.md b/docs/models/operations/deleteenvbyapplicationuuidrequest.md new file mode 100644 index 0000000..9c8418e --- /dev/null +++ b/docs/models/operations/deleteenvbyapplicationuuidrequest.md @@ -0,0 +1,19 @@ +# DeleteEnvByApplicationUuidRequest + +## Example Usage + +```typescript +import { DeleteEnvByApplicationUuidRequest } from "coolify/models/operations"; + +let value: DeleteEnvByApplicationUuidRequest = { + uuid: "365749d1-82b6-4922-a75f-cbe189f4310e", + envUuid: "c4917fe5-f3ff-4cad-84d9-052f77a52d38", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | +| `uuid` | *string* | :heavy_check_mark: | UUID of the application. | +| `envUuid` | *string* | :heavy_check_mark: | UUID of the environment variable. | \ No newline at end of file diff --git a/docs/models/operations/deleteenvbyapplicationuuidresponsebody.md b/docs/models/operations/deleteenvbyapplicationuuidresponsebody.md new file mode 100644 index 0000000..ca8f2e3 --- /dev/null +++ b/docs/models/operations/deleteenvbyapplicationuuidresponsebody.md @@ -0,0 +1,19 @@ +# DeleteEnvByApplicationUuidResponseBody + +Environment variable deleted. + +## Example Usage + +```typescript +import { DeleteEnvByApplicationUuidResponseBody } from "coolify/models/operations"; + +let value: DeleteEnvByApplicationUuidResponseBody = { + message: "Environment variable deleted.", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | +| `message` | *string* | :heavy_minus_sign: | N/A | Environment variable deleted. | \ No newline at end of file diff --git a/docs/models/operations/deleteenvbyserviceuuidrequest.md b/docs/models/operations/deleteenvbyserviceuuidrequest.md new file mode 100644 index 0000000..6a52682 --- /dev/null +++ b/docs/models/operations/deleteenvbyserviceuuidrequest.md @@ -0,0 +1,19 @@ +# DeleteEnvByServiceUuidRequest + +## Example Usage + +```typescript +import { DeleteEnvByServiceUuidRequest } from "coolify/models/operations"; + +let value: DeleteEnvByServiceUuidRequest = { + uuid: "064feda5-8d1c-40dc-80a8-22c9fff1f37c", + envUuid: "9211506a-6114-42f2-bc99-8f5c86f916cb", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | +| `uuid` | *string* | :heavy_check_mark: | UUID of the service. | +| `envUuid` | *string* | :heavy_check_mark: | UUID of the environment variable. | \ No newline at end of file diff --git a/docs/models/operations/deleteenvbyserviceuuidresponsebody.md b/docs/models/operations/deleteenvbyserviceuuidresponsebody.md new file mode 100644 index 0000000..c86ce69 --- /dev/null +++ b/docs/models/operations/deleteenvbyserviceuuidresponsebody.md @@ -0,0 +1,19 @@ +# DeleteEnvByServiceUuidResponseBody + +Environment variable deleted. + +## Example Usage + +```typescript +import { DeleteEnvByServiceUuidResponseBody } from "coolify/models/operations"; + +let value: DeleteEnvByServiceUuidResponseBody = { + message: "Environment variable deleted.", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | +| `message` | *string* | :heavy_minus_sign: | N/A | Environment variable deleted. | \ No newline at end of file diff --git a/docs/models/operations/deleteprivatekeybyuuidrequest.md b/docs/models/operations/deleteprivatekeybyuuidrequest.md new file mode 100644 index 0000000..3f9fde1 --- /dev/null +++ b/docs/models/operations/deleteprivatekeybyuuidrequest.md @@ -0,0 +1,17 @@ +# DeletePrivateKeyByUuidRequest + +## Example Usage + +```typescript +import { DeletePrivateKeyByUuidRequest } from "coolify/models/operations"; + +let value: DeletePrivateKeyByUuidRequest = { + uuid: "91fe6347-0a66-4cbf-95ec-594d1326b870", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `uuid` | *string* | :heavy_check_mark: | Private Key UUID | \ No newline at end of file diff --git a/docs/models/operations/deleteprivatekeybyuuidresponsebody.md b/docs/models/operations/deleteprivatekeybyuuidresponsebody.md new file mode 100644 index 0000000..1f7cf02 --- /dev/null +++ b/docs/models/operations/deleteprivatekeybyuuidresponsebody.md @@ -0,0 +1,19 @@ +# DeletePrivateKeyByUuidResponseBody + +Private Key deleted. + +## Example Usage + +```typescript +import { DeletePrivateKeyByUuidResponseBody } from "coolify/models/operations"; + +let value: DeletePrivateKeyByUuidResponseBody = { + message: "Private Key deleted.", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------- | -------------------- | -------------------- | -------------------- | -------------------- | +| `message` | *string* | :heavy_minus_sign: | N/A | Private Key deleted. | \ No newline at end of file diff --git a/docs/models/operations/deleteprojectbyuuidrequest.md b/docs/models/operations/deleteprojectbyuuidrequest.md new file mode 100644 index 0000000..6e8d3fc --- /dev/null +++ b/docs/models/operations/deleteprojectbyuuidrequest.md @@ -0,0 +1,17 @@ +# DeleteProjectByUuidRequest + +## Example Usage + +```typescript +import { DeleteProjectByUuidRequest } from "coolify/models/operations"; + +let value: DeleteProjectByUuidRequest = { + uuid: "ba6691da-b816-4650-ab19-baf1d0868530", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `uuid` | *string* | :heavy_check_mark: | UUID of the application. | \ No newline at end of file diff --git a/docs/models/operations/deleteprojectbyuuidresponsebody.md b/docs/models/operations/deleteprojectbyuuidresponsebody.md new file mode 100644 index 0000000..9688ef6 --- /dev/null +++ b/docs/models/operations/deleteprojectbyuuidresponsebody.md @@ -0,0 +1,19 @@ +# DeleteProjectByUuidResponseBody + +Project deleted. + +## Example Usage + +```typescript +import { DeleteProjectByUuidResponseBody } from "coolify/models/operations"; + +let value: DeleteProjectByUuidResponseBody = { + message: "Project deleted.", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `message` | *string* | :heavy_minus_sign: | N/A | Project deleted. | \ No newline at end of file diff --git a/docs/models/operations/deleteserverbyuuidrequest.md b/docs/models/operations/deleteserverbyuuidrequest.md new file mode 100644 index 0000000..c67f666 --- /dev/null +++ b/docs/models/operations/deleteserverbyuuidrequest.md @@ -0,0 +1,17 @@ +# DeleteServerByUuidRequest + +## Example Usage + +```typescript +import { DeleteServerByUuidRequest } from "coolify/models/operations"; + +let value: DeleteServerByUuidRequest = { + uuid: "eb2725ee-459f-424d-b7e2-855765ebb49c", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------- | ------------------- | ------------------- | ------------------- | +| `uuid` | *string* | :heavy_check_mark: | UUID of the server. | \ No newline at end of file diff --git a/docs/models/operations/deleteserverbyuuidresponsebody.md b/docs/models/operations/deleteserverbyuuidresponsebody.md new file mode 100644 index 0000000..7f728e6 --- /dev/null +++ b/docs/models/operations/deleteserverbyuuidresponsebody.md @@ -0,0 +1,19 @@ +# DeleteServerByUuidResponseBody + +Server deleted. + +## Example Usage + +```typescript +import { DeleteServerByUuidResponseBody } from "coolify/models/operations"; + +let value: DeleteServerByUuidResponseBody = { + message: "Server deleted.", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `message` | *string* | :heavy_minus_sign: | N/A | Server deleted. | \ No newline at end of file diff --git a/docs/models/operations/deleteservicebyuuidrequest.md b/docs/models/operations/deleteservicebyuuidrequest.md new file mode 100644 index 0000000..0afca80 --- /dev/null +++ b/docs/models/operations/deleteservicebyuuidrequest.md @@ -0,0 +1,21 @@ +# DeleteServiceByUuidRequest + +## Example Usage + +```typescript +import { DeleteServiceByUuidRequest } from "coolify/models/operations"; + +let value: DeleteServiceByUuidRequest = { + uuid: "b06ad7f4-074d-434c-8b8b-600810fd20f4", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------- | -------------------------- | -------------------------- | -------------------------- | +| `uuid` | *string* | :heavy_check_mark: | Service UUID | +| `deleteConfigurations` | *boolean* | :heavy_minus_sign: | Delete configurations. | +| `deleteVolumes` | *boolean* | :heavy_minus_sign: | Delete volumes. | +| `dockerCleanup` | *boolean* | :heavy_minus_sign: | Run docker cleanup. | +| `deleteConnectedNetworks` | *boolean* | :heavy_minus_sign: | Delete connected networks. | \ No newline at end of file diff --git a/docs/models/operations/deleteservicebyuuidresponsebody.md b/docs/models/operations/deleteservicebyuuidresponsebody.md new file mode 100644 index 0000000..2fba2e5 --- /dev/null +++ b/docs/models/operations/deleteservicebyuuidresponsebody.md @@ -0,0 +1,19 @@ +# DeleteServiceByUuidResponseBody + +Delete a service by UUID + +## Example Usage + +```typescript +import { DeleteServiceByUuidResponseBody } from "coolify/models/operations"; + +let value: DeleteServiceByUuidResponseBody = { + message: "Service deletion request queued.", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | +| `message` | *string* | :heavy_minus_sign: | N/A | Service deletion request queued. | \ No newline at end of file diff --git a/docs/models/operations/deploybytagoruuidrequest.md b/docs/models/operations/deploybytagoruuidrequest.md new file mode 100644 index 0000000..5dcfebe --- /dev/null +++ b/docs/models/operations/deploybytagoruuidrequest.md @@ -0,0 +1,17 @@ +# DeployByTagOrUuidRequest + +## Example Usage + +```typescript +import { DeployByTagOrUuidRequest } from "coolify/models/operations"; + +let value: DeployByTagOrUuidRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `tag` | *string* | :heavy_minus_sign: | Tag name(s). Comma separated list is also accepted. | +| `uuid` | *string* | :heavy_minus_sign: | Resource UUID(s). Comma separated list is also accepted. | +| `force` | *boolean* | :heavy_minus_sign: | Force rebuild (without cache) | \ No newline at end of file diff --git a/docs/models/operations/deploybytagoruuidresponsebody.md b/docs/models/operations/deploybytagoruuidresponsebody.md new file mode 100644 index 0000000..48645a2 --- /dev/null +++ b/docs/models/operations/deploybytagoruuidresponsebody.md @@ -0,0 +1,17 @@ +# DeployByTagOrUuidResponseBody + +Get deployment(s) UUID's + +## Example Usage + +```typescript +import { DeployByTagOrUuidResponseBody } from "coolify/models/operations"; + +let value: DeployByTagOrUuidResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `deployments` | [operations.Deployments](../../models/operations/deployments.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deployments.md b/docs/models/operations/deployments.md new file mode 100644 index 0000000..437defe --- /dev/null +++ b/docs/models/operations/deployments.md @@ -0,0 +1,17 @@ +# Deployments + +## Example Usage + +```typescript +import { Deployments } from "coolify/models/operations"; + +let value: Deployments = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `message` | *string* | :heavy_minus_sign: | N/A | +| `resourceUuid` | *string* | :heavy_minus_sign: | N/A | +| `deploymentUuid` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/disableapiresponsebody.md b/docs/models/operations/disableapiresponsebody.md new file mode 100644 index 0000000..6a37e5e --- /dev/null +++ b/docs/models/operations/disableapiresponsebody.md @@ -0,0 +1,19 @@ +# DisableApiResponseBody + +Disable API. + +## Example Usage + +```typescript +import { DisableApiResponseBody } from "coolify/models/operations"; + +let value: DisableApiResponseBody = { + message: "API disabled.", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `message` | *string* | :heavy_minus_sign: | N/A | API disabled. | \ No newline at end of file diff --git a/docs/models/operations/enableapiresponsebody.md b/docs/models/operations/enableapiresponsebody.md new file mode 100644 index 0000000..84f58fc --- /dev/null +++ b/docs/models/operations/enableapiresponsebody.md @@ -0,0 +1,19 @@ +# EnableApiResponseBody + +Enable API. + +## Example Usage + +```typescript +import { EnableApiResponseBody } from "coolify/models/operations"; + +let value: EnableApiResponseBody = { + message: "API enabled.", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `message` | *string* | :heavy_minus_sign: | N/A | API enabled. | \ No newline at end of file diff --git a/docs/models/operations/executecommandapplicationrequest.md b/docs/models/operations/executecommandapplicationrequest.md new file mode 100644 index 0000000..60e635c --- /dev/null +++ b/docs/models/operations/executecommandapplicationrequest.md @@ -0,0 +1,19 @@ +# ExecuteCommandApplicationRequest + +## Example Usage + +```typescript +import { ExecuteCommandApplicationRequest } from "coolify/models/operations"; + +let value: ExecuteCommandApplicationRequest = { + uuid: "6164d0f5-5026-4e1f-ad75-390061434201", + requestBody: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `uuid` | *string* | :heavy_check_mark: | UUID of the application. | +| `requestBody` | [operations.ExecuteCommandApplicationRequestBody](../../models/operations/executecommandapplicationrequestbody.md) | :heavy_check_mark: | Command to execute. | \ No newline at end of file diff --git a/docs/models/operations/executecommandapplicationrequestbody.md b/docs/models/operations/executecommandapplicationrequestbody.md new file mode 100644 index 0000000..f00267e --- /dev/null +++ b/docs/models/operations/executecommandapplicationrequestbody.md @@ -0,0 +1,17 @@ +# ExecuteCommandApplicationRequestBody + +Command to execute. + +## Example Usage + +```typescript +import { ExecuteCommandApplicationRequestBody } from "coolify/models/operations"; + +let value: ExecuteCommandApplicationRequestBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------- | ------------------- | ------------------- | ------------------- | +| `command` | *string* | :heavy_minus_sign: | Command to execute. | \ No newline at end of file diff --git a/docs/models/operations/executecommandapplicationresponsebody.md b/docs/models/operations/executecommandapplicationresponsebody.md new file mode 100644 index 0000000..31261f8 --- /dev/null +++ b/docs/models/operations/executecommandapplicationresponsebody.md @@ -0,0 +1,20 @@ +# ExecuteCommandApplicationResponseBody + +Execute a command on the application's current container. + +## Example Usage + +```typescript +import { ExecuteCommandApplicationResponseBody } from "coolify/models/operations"; + +let value: ExecuteCommandApplicationResponseBody = { + message: "Command executed.", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `message` | *string* | :heavy_minus_sign: | N/A | Command executed. | +| `response` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/getapplicationbyuuidrequest.md b/docs/models/operations/getapplicationbyuuidrequest.md new file mode 100644 index 0000000..e08ed34 --- /dev/null +++ b/docs/models/operations/getapplicationbyuuidrequest.md @@ -0,0 +1,17 @@ +# GetApplicationByUuidRequest + +## Example Usage + +```typescript +import { GetApplicationByUuidRequest } from "coolify/models/operations"; + +let value: GetApplicationByUuidRequest = { + uuid: "10dcdfc7-c1a2-4f86-a4c7-90999fa56b0a", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `uuid` | *string* | :heavy_check_mark: | UUID of the application. | \ No newline at end of file diff --git a/docs/models/operations/getdatabasebyuuidrequest.md b/docs/models/operations/getdatabasebyuuidrequest.md new file mode 100644 index 0000000..a20c8ba --- /dev/null +++ b/docs/models/operations/getdatabasebyuuidrequest.md @@ -0,0 +1,17 @@ +# GetDatabaseByUuidRequest + +## Example Usage + +```typescript +import { GetDatabaseByUuidRequest } from "coolify/models/operations"; + +let value: GetDatabaseByUuidRequest = { + uuid: "ff62a7f1-c43a-43a8-9684-b65de035dffe", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `uuid` | *string* | :heavy_check_mark: | UUID of the database. | \ No newline at end of file diff --git a/docs/models/operations/getdeploymentbyuuidrequest.md b/docs/models/operations/getdeploymentbyuuidrequest.md new file mode 100644 index 0000000..48156d1 --- /dev/null +++ b/docs/models/operations/getdeploymentbyuuidrequest.md @@ -0,0 +1,17 @@ +# GetDeploymentByUuidRequest + +## Example Usage + +```typescript +import { GetDeploymentByUuidRequest } from "coolify/models/operations"; + +let value: GetDeploymentByUuidRequest = { + uuid: "438575f2-159a-46f5-8bad-fecb521368cf", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `uuid` | *string* | :heavy_check_mark: | Deployment UUID | \ No newline at end of file diff --git a/docs/models/operations/getdomainsbyserveruuidrequest.md b/docs/models/operations/getdomainsbyserveruuidrequest.md new file mode 100644 index 0000000..61475d6 --- /dev/null +++ b/docs/models/operations/getdomainsbyserveruuidrequest.md @@ -0,0 +1,17 @@ +# GetDomainsByServerUuidRequest + +## Example Usage + +```typescript +import { GetDomainsByServerUuidRequest } from "coolify/models/operations"; + +let value: GetDomainsByServerUuidRequest = { + uuid: "bd3f2425-78de-4391-9755-7b1eb2f8f384", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `uuid` | *string* | :heavy_check_mark: | Server's UUID | \ No newline at end of file diff --git a/docs/models/operations/getdomainsbyserveruuidresponsebody.md b/docs/models/operations/getdomainsbyserveruuidresponsebody.md new file mode 100644 index 0000000..ddd1cd9 --- /dev/null +++ b/docs/models/operations/getdomainsbyserveruuidresponsebody.md @@ -0,0 +1,16 @@ +# GetDomainsByServerUuidResponseBody + +## Example Usage + +```typescript +import { GetDomainsByServerUuidResponseBody } from "coolify/models/operations"; + +let value: GetDomainsByServerUuidResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `ip` | *string* | :heavy_minus_sign: | N/A | +| `domains` | *string*[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getenvironmentbynamerequest.md b/docs/models/operations/getenvironmentbynamerequest.md new file mode 100644 index 0000000..bac8c98 --- /dev/null +++ b/docs/models/operations/getenvironmentbynamerequest.md @@ -0,0 +1,19 @@ +# GetEnvironmentByNameRequest + +## Example Usage + +```typescript +import { GetEnvironmentByNameRequest } from "coolify/models/operations"; + +let value: GetEnvironmentByNameRequest = { + uuid: "86547a48-120f-4029-b1eb-f848e84e5035", + environmentName: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `uuid` | *string* | :heavy_check_mark: | Project UUID | +| `environmentName` | *string* | :heavy_check_mark: | Environment name | \ No newline at end of file diff --git a/docs/models/operations/getmembersbyteamidrequest.md b/docs/models/operations/getmembersbyteamidrequest.md new file mode 100644 index 0000000..c46ee47 --- /dev/null +++ b/docs/models/operations/getmembersbyteamidrequest.md @@ -0,0 +1,17 @@ +# GetMembersByTeamIdRequest + +## Example Usage + +```typescript +import { GetMembersByTeamIdRequest } from "coolify/models/operations"; + +let value: GetMembersByTeamIdRequest = { + id: 577590, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_check_mark: | Team ID | \ No newline at end of file diff --git a/docs/models/operations/getprivatekeybyuuidrequest.md b/docs/models/operations/getprivatekeybyuuidrequest.md new file mode 100644 index 0000000..e3067c4 --- /dev/null +++ b/docs/models/operations/getprivatekeybyuuidrequest.md @@ -0,0 +1,17 @@ +# GetPrivateKeyByUuidRequest + +## Example Usage + +```typescript +import { GetPrivateKeyByUuidRequest } from "coolify/models/operations"; + +let value: GetPrivateKeyByUuidRequest = { + uuid: "775eff6f-ca33-42e4-877c-d26dd1241619", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `uuid` | *string* | :heavy_check_mark: | Private Key UUID | \ No newline at end of file diff --git a/docs/models/operations/getprojectbyuuidrequest.md b/docs/models/operations/getprojectbyuuidrequest.md new file mode 100644 index 0000000..62fbfdd --- /dev/null +++ b/docs/models/operations/getprojectbyuuidrequest.md @@ -0,0 +1,17 @@ +# GetProjectByUuidRequest + +## Example Usage + +```typescript +import { GetProjectByUuidRequest } from "coolify/models/operations"; + +let value: GetProjectByUuidRequest = { + uuid: "19bdef66-2aad-4179-932d-0717f6d1466a", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `uuid` | *string* | :heavy_check_mark: | Project UUID | \ No newline at end of file diff --git a/docs/models/operations/getresourcesbyserveruuidrequest.md b/docs/models/operations/getresourcesbyserveruuidrequest.md new file mode 100644 index 0000000..6844005 --- /dev/null +++ b/docs/models/operations/getresourcesbyserveruuidrequest.md @@ -0,0 +1,17 @@ +# GetResourcesByServerUuidRequest + +## Example Usage + +```typescript +import { GetResourcesByServerUuidRequest } from "coolify/models/operations"; + +let value: GetResourcesByServerUuidRequest = { + uuid: "5c5a87e8-db0c-43e0-9517-d425d231b64b", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `uuid` | *string* | :heavy_check_mark: | Server's UUID | \ No newline at end of file diff --git a/docs/models/operations/getserverbyuuidrequest.md b/docs/models/operations/getserverbyuuidrequest.md new file mode 100644 index 0000000..ece061b --- /dev/null +++ b/docs/models/operations/getserverbyuuidrequest.md @@ -0,0 +1,17 @@ +# GetServerByUuidRequest + +## Example Usage + +```typescript +import { GetServerByUuidRequest } from "coolify/models/operations"; + +let value: GetServerByUuidRequest = { + uuid: "13e3dc29-1bac-47e0-a4b6-21d7eb658eb0", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `uuid` | *string* | :heavy_check_mark: | Server's UUID | \ No newline at end of file diff --git a/docs/models/operations/getservicebyuuidrequest.md b/docs/models/operations/getservicebyuuidrequest.md new file mode 100644 index 0000000..cd872a2 --- /dev/null +++ b/docs/models/operations/getservicebyuuidrequest.md @@ -0,0 +1,17 @@ +# GetServiceByUuidRequest + +## Example Usage + +```typescript +import { GetServiceByUuidRequest } from "coolify/models/operations"; + +let value: GetServiceByUuidRequest = { + uuid: "4706739c-39af-4cd7-a2f2-71ffb5442825", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `uuid` | *string* | :heavy_check_mark: | Service UUID | \ No newline at end of file diff --git a/docs/models/operations/getteambyidrequest.md b/docs/models/operations/getteambyidrequest.md new file mode 100644 index 0000000..672059f --- /dev/null +++ b/docs/models/operations/getteambyidrequest.md @@ -0,0 +1,17 @@ +# GetTeamByIdRequest + +## Example Usage + +```typescript +import { GetTeamByIdRequest } from "coolify/models/operations"; + +let value: GetTeamByIdRequest = { + id: 810302, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_check_mark: | Team ID | \ No newline at end of file diff --git a/docs/models/operations/listenvsbyapplicationuuidrequest.md b/docs/models/operations/listenvsbyapplicationuuidrequest.md new file mode 100644 index 0000000..2f0b4a9 --- /dev/null +++ b/docs/models/operations/listenvsbyapplicationuuidrequest.md @@ -0,0 +1,17 @@ +# ListEnvsByApplicationUuidRequest + +## Example Usage + +```typescript +import { ListEnvsByApplicationUuidRequest } from "coolify/models/operations"; + +let value: ListEnvsByApplicationUuidRequest = { + uuid: "7db4d6e9-ebb8-4fa6-b904-a49624999aa6", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `uuid` | *string* | :heavy_check_mark: | UUID of the application. | \ No newline at end of file diff --git a/docs/models/operations/listenvsbyserviceuuidrequest.md b/docs/models/operations/listenvsbyserviceuuidrequest.md new file mode 100644 index 0000000..4a6e4dc --- /dev/null +++ b/docs/models/operations/listenvsbyserviceuuidrequest.md @@ -0,0 +1,17 @@ +# ListEnvsByServiceUuidRequest + +## Example Usage + +```typescript +import { ListEnvsByServiceUuidRequest } from "coolify/models/operations"; + +let value: ListEnvsByServiceUuidRequest = { + uuid: "b14fa86c-2fd9-40be-b851-ce1c0f984e4d", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `uuid` | *string* | :heavy_check_mark: | UUID of the service. | \ No newline at end of file diff --git a/docs/models/operations/proxytype.md b/docs/models/operations/proxytype.md new file mode 100644 index 0000000..6ca5ef6 --- /dev/null +++ b/docs/models/operations/proxytype.md @@ -0,0 +1,17 @@ +# ProxyType + +The proxy type. + +## Example Usage + +```typescript +import { ProxyType } from "coolify/models/operations"; + +let value: ProxyType = "traefik"; +``` + +## Values + +```typescript +"traefik" | "caddy" | "none" +``` \ No newline at end of file diff --git a/docs/models/operations/redirect.md b/docs/models/operations/redirect.md new file mode 100644 index 0000000..724ab44 --- /dev/null +++ b/docs/models/operations/redirect.md @@ -0,0 +1,17 @@ +# Redirect + +How to set redirect with Traefik / Caddy. www<->non-www. + +## Example Usage + +```typescript +import { Redirect } from "coolify/models/operations"; + +let value: Redirect = "non-www"; +``` + +## Values + +```typescript +"www" | "non-www" | "both" +``` \ No newline at end of file diff --git a/docs/models/operations/responsebody.md b/docs/models/operations/responsebody.md new file mode 100644 index 0000000..accdfcf --- /dev/null +++ b/docs/models/operations/responsebody.md @@ -0,0 +1,21 @@ +# ResponseBody + +## Example Usage + +```typescript +import { ResponseBody } from "coolify/models/operations"; + +let value: ResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `uuid` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `type` | *string* | :heavy_minus_sign: | N/A | +| `createdAt` | *string* | :heavy_minus_sign: | N/A | +| `updatedAt` | *string* | :heavy_minus_sign: | N/A | +| `status` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/restartapplicationbyuuidrequest.md b/docs/models/operations/restartapplicationbyuuidrequest.md new file mode 100644 index 0000000..d0f5d6a --- /dev/null +++ b/docs/models/operations/restartapplicationbyuuidrequest.md @@ -0,0 +1,17 @@ +# RestartApplicationByUuidRequest + +## Example Usage + +```typescript +import { RestartApplicationByUuidRequest } from "coolify/models/operations"; + +let value: RestartApplicationByUuidRequest = { + uuid: "6f2e87e7-b6eb-4b5c-aa32-cf79d7f9ded2", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `uuid` | *string* | :heavy_check_mark: | UUID of the application. | \ No newline at end of file diff --git a/docs/models/operations/restartapplicationbyuuidresponsebody.md b/docs/models/operations/restartapplicationbyuuidresponsebody.md new file mode 100644 index 0000000..f1992e0 --- /dev/null +++ b/docs/models/operations/restartapplicationbyuuidresponsebody.md @@ -0,0 +1,21 @@ +# RestartApplicationByUuidResponseBody + +Restart application. + +## Example Usage + +```typescript +import { RestartApplicationByUuidResponseBody } from "coolify/models/operations"; + +let value: RestartApplicationByUuidResponseBody = { + message: "Restart request queued.", + deploymentUuid: "doogksw", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `message` | *string* | :heavy_minus_sign: | N/A | Restart request queued. | +| `deploymentUuid` | *string* | :heavy_minus_sign: | UUID of the deployment. | doogksw | \ No newline at end of file diff --git a/docs/models/operations/restartdatabasebyuuidrequest.md b/docs/models/operations/restartdatabasebyuuidrequest.md new file mode 100644 index 0000000..6d0cd26 --- /dev/null +++ b/docs/models/operations/restartdatabasebyuuidrequest.md @@ -0,0 +1,17 @@ +# RestartDatabaseByUuidRequest + +## Example Usage + +```typescript +import { RestartDatabaseByUuidRequest } from "coolify/models/operations"; + +let value: RestartDatabaseByUuidRequest = { + uuid: "42e7e2a7-1b30-400e-9bea-84f576f25a19", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `uuid` | *string* | :heavy_check_mark: | UUID of the database. | \ No newline at end of file diff --git a/docs/models/operations/restartdatabasebyuuidresponsebody.md b/docs/models/operations/restartdatabasebyuuidresponsebody.md new file mode 100644 index 0000000..f5de9dd --- /dev/null +++ b/docs/models/operations/restartdatabasebyuuidresponsebody.md @@ -0,0 +1,19 @@ +# RestartDatabaseByUuidResponseBody + +Restart database. + +## Example Usage + +```typescript +import { RestartDatabaseByUuidResponseBody } from "coolify/models/operations"; + +let value: RestartDatabaseByUuidResponseBody = { + message: "Database restaring request queued.", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | +| `message` | *string* | :heavy_minus_sign: | N/A | Database restaring request queued. | \ No newline at end of file diff --git a/docs/models/operations/restartservicebyuuidrequest.md b/docs/models/operations/restartservicebyuuidrequest.md new file mode 100644 index 0000000..b074cc5 --- /dev/null +++ b/docs/models/operations/restartservicebyuuidrequest.md @@ -0,0 +1,17 @@ +# RestartServiceByUuidRequest + +## Example Usage + +```typescript +import { RestartServiceByUuidRequest } from "coolify/models/operations"; + +let value: RestartServiceByUuidRequest = { + uuid: "05ddf10e-48f6-4a6c-9834-48bfbc256a44", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `uuid` | *string* | :heavy_check_mark: | UUID of the service. | \ No newline at end of file diff --git a/docs/models/operations/restartservicebyuuidresponsebody.md b/docs/models/operations/restartservicebyuuidresponsebody.md new file mode 100644 index 0000000..cdf3b22 --- /dev/null +++ b/docs/models/operations/restartservicebyuuidresponsebody.md @@ -0,0 +1,19 @@ +# RestartServiceByUuidResponseBody + +Restart service. + +## Example Usage + +```typescript +import { RestartServiceByUuidResponseBody } from "coolify/models/operations"; + +let value: RestartServiceByUuidResponseBody = { + message: "Service restaring request queued.", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | +| `message` | *string* | :heavy_minus_sign: | N/A | Service restaring request queued. | \ No newline at end of file diff --git a/docs/models/operations/startapplicationbyuuidrequest.md b/docs/models/operations/startapplicationbyuuidrequest.md new file mode 100644 index 0000000..36e1e3a --- /dev/null +++ b/docs/models/operations/startapplicationbyuuidrequest.md @@ -0,0 +1,19 @@ +# StartApplicationByUuidRequest + +## Example Usage + +```typescript +import { StartApplicationByUuidRequest } from "coolify/models/operations"; + +let value: StartApplicationByUuidRequest = { + uuid: "1dffec51-6320-4b0c-a211-a368db420447", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | +| `uuid` | *string* | :heavy_check_mark: | UUID of the application. | +| `force` | *boolean* | :heavy_minus_sign: | Force rebuild. | +| `instantDeploy` | *boolean* | :heavy_minus_sign: | Instant deploy (skip queuing). | \ No newline at end of file diff --git a/docs/models/operations/startapplicationbyuuidresponsebody.md b/docs/models/operations/startapplicationbyuuidresponsebody.md new file mode 100644 index 0000000..c9ee437 --- /dev/null +++ b/docs/models/operations/startapplicationbyuuidresponsebody.md @@ -0,0 +1,21 @@ +# StartApplicationByUuidResponseBody + +Start application. + +## Example Usage + +```typescript +import { StartApplicationByUuidResponseBody } from "coolify/models/operations"; + +let value: StartApplicationByUuidResponseBody = { + message: "Deployment request queued.", + deploymentUuid: "doogksw", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------- | -------------------------- | -------------------------- | -------------------------- | -------------------------- | +| `message` | *string* | :heavy_minus_sign: | Message. | Deployment request queued. | +| `deploymentUuid` | *string* | :heavy_minus_sign: | UUID of the deployment. | doogksw | \ No newline at end of file diff --git a/docs/models/operations/startdatabasebyuuidrequest.md b/docs/models/operations/startdatabasebyuuidrequest.md new file mode 100644 index 0000000..d7d978f --- /dev/null +++ b/docs/models/operations/startdatabasebyuuidrequest.md @@ -0,0 +1,17 @@ +# StartDatabaseByUuidRequest + +## Example Usage + +```typescript +import { StartDatabaseByUuidRequest } from "coolify/models/operations"; + +let value: StartDatabaseByUuidRequest = { + uuid: "a9b35ae8-40b0-458e-a160-594319baf0a9", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `uuid` | *string* | :heavy_check_mark: | UUID of the database. | \ No newline at end of file diff --git a/docs/models/operations/startdatabasebyuuidresponsebody.md b/docs/models/operations/startdatabasebyuuidresponsebody.md new file mode 100644 index 0000000..c0f5256 --- /dev/null +++ b/docs/models/operations/startdatabasebyuuidresponsebody.md @@ -0,0 +1,19 @@ +# StartDatabaseByUuidResponseBody + +Start database. + +## Example Usage + +```typescript +import { StartDatabaseByUuidResponseBody } from "coolify/models/operations"; + +let value: StartDatabaseByUuidResponseBody = { + message: "Database starting request queued.", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | +| `message` | *string* | :heavy_minus_sign: | N/A | Database starting request queued. | \ No newline at end of file diff --git a/docs/models/operations/startservicebyuuidrequest.md b/docs/models/operations/startservicebyuuidrequest.md new file mode 100644 index 0000000..b735e58 --- /dev/null +++ b/docs/models/operations/startservicebyuuidrequest.md @@ -0,0 +1,17 @@ +# StartServiceByUuidRequest + +## Example Usage + +```typescript +import { StartServiceByUuidRequest } from "coolify/models/operations"; + +let value: StartServiceByUuidRequest = { + uuid: "4c79ffd5-ea60-4c8c-9bc4-c87a014f2505", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `uuid` | *string* | :heavy_check_mark: | UUID of the service. | \ No newline at end of file diff --git a/docs/models/operations/startservicebyuuidresponsebody.md b/docs/models/operations/startservicebyuuidresponsebody.md new file mode 100644 index 0000000..5d34405 --- /dev/null +++ b/docs/models/operations/startservicebyuuidresponsebody.md @@ -0,0 +1,19 @@ +# StartServiceByUuidResponseBody + +Start service. + +## Example Usage + +```typescript +import { StartServiceByUuidResponseBody } from "coolify/models/operations"; + +let value: StartServiceByUuidResponseBody = { + message: "Service starting request queued.", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | +| `message` | *string* | :heavy_minus_sign: | N/A | Service starting request queued. | \ No newline at end of file diff --git a/docs/models/operations/staticimage.md b/docs/models/operations/staticimage.md new file mode 100644 index 0000000..1cd7b13 --- /dev/null +++ b/docs/models/operations/staticimage.md @@ -0,0 +1,17 @@ +# StaticImage + +The static image. + +## Example Usage + +```typescript +import { StaticImage } from "coolify/models/operations"; + +let value: StaticImage = "nginx:alpine"; +``` + +## Values + +```typescript +"nginx:alpine" +``` \ No newline at end of file diff --git a/docs/models/operations/stopapplicationbyuuidrequest.md b/docs/models/operations/stopapplicationbyuuidrequest.md new file mode 100644 index 0000000..8fd02f5 --- /dev/null +++ b/docs/models/operations/stopapplicationbyuuidrequest.md @@ -0,0 +1,17 @@ +# StopApplicationByUuidRequest + +## Example Usage + +```typescript +import { StopApplicationByUuidRequest } from "coolify/models/operations"; + +let value: StopApplicationByUuidRequest = { + uuid: "b462c0bc-c459-4453-870c-1849fa0688a4", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `uuid` | *string* | :heavy_check_mark: | UUID of the application. | \ No newline at end of file diff --git a/docs/models/operations/stopapplicationbyuuidresponsebody.md b/docs/models/operations/stopapplicationbyuuidresponsebody.md new file mode 100644 index 0000000..8be481e --- /dev/null +++ b/docs/models/operations/stopapplicationbyuuidresponsebody.md @@ -0,0 +1,19 @@ +# StopApplicationByUuidResponseBody + +Stop application. + +## Example Usage + +```typescript +import { StopApplicationByUuidResponseBody } from "coolify/models/operations"; + +let value: StopApplicationByUuidResponseBody = { + message: "Application stopping request queued.", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `message` | *string* | :heavy_minus_sign: | N/A | Application stopping request queued. | \ No newline at end of file diff --git a/docs/models/operations/stopdatabasebyuuidrequest.md b/docs/models/operations/stopdatabasebyuuidrequest.md new file mode 100644 index 0000000..44be038 --- /dev/null +++ b/docs/models/operations/stopdatabasebyuuidrequest.md @@ -0,0 +1,17 @@ +# StopDatabaseByUuidRequest + +## Example Usage + +```typescript +import { StopDatabaseByUuidRequest } from "coolify/models/operations"; + +let value: StopDatabaseByUuidRequest = { + uuid: "f0bd85c1-78b1-4369-be92-fd8e8edfe026", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `uuid` | *string* | :heavy_check_mark: | UUID of the database. | \ No newline at end of file diff --git a/docs/models/operations/stopdatabasebyuuidresponsebody.md b/docs/models/operations/stopdatabasebyuuidresponsebody.md new file mode 100644 index 0000000..073e34c --- /dev/null +++ b/docs/models/operations/stopdatabasebyuuidresponsebody.md @@ -0,0 +1,19 @@ +# StopDatabaseByUuidResponseBody + +Stop database. + +## Example Usage + +```typescript +import { StopDatabaseByUuidResponseBody } from "coolify/models/operations"; + +let value: StopDatabaseByUuidResponseBody = { + message: "Database stopping request queued.", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | +| `message` | *string* | :heavy_minus_sign: | N/A | Database stopping request queued. | \ No newline at end of file diff --git a/docs/models/operations/stopservicebyuuidrequest.md b/docs/models/operations/stopservicebyuuidrequest.md new file mode 100644 index 0000000..d996b49 --- /dev/null +++ b/docs/models/operations/stopservicebyuuidrequest.md @@ -0,0 +1,17 @@ +# StopServiceByUuidRequest + +## Example Usage + +```typescript +import { StopServiceByUuidRequest } from "coolify/models/operations"; + +let value: StopServiceByUuidRequest = { + uuid: "fd60da2f-1d46-4caf-891e-cb062dbefcf9", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `uuid` | *string* | :heavy_check_mark: | UUID of the service. | \ No newline at end of file diff --git a/docs/models/operations/stopservicebyuuidresponsebody.md b/docs/models/operations/stopservicebyuuidresponsebody.md new file mode 100644 index 0000000..c5407eb --- /dev/null +++ b/docs/models/operations/stopservicebyuuidresponsebody.md @@ -0,0 +1,19 @@ +# StopServiceByUuidResponseBody + +Stop service. + +## Example Usage + +```typescript +import { StopServiceByUuidResponseBody } from "coolify/models/operations"; + +let value: StopServiceByUuidResponseBody = { + message: "Service stopping request queued.", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | +| `message` | *string* | :heavy_minus_sign: | N/A | Service stopping request queued. | \ No newline at end of file diff --git a/docs/models/operations/type.md b/docs/models/operations/type.md new file mode 100644 index 0000000..eb4ef2c --- /dev/null +++ b/docs/models/operations/type.md @@ -0,0 +1,17 @@ +# Type + +The one-click service type + +## Example Usage + +```typescript +import { Type } from "coolify/models/operations"; + +let value: Type = "mosquitto"; +``` + +## Values + +```typescript +"activepieces" | "appsmith" | "appwrite" | "authentik" | "babybuddy" | "budge" | "changedetection" | "chatwoot" | "classicpress-with-mariadb" | "classicpress-with-mysql" | "classicpress-without-database" | "cloudflared" | "code-server" | "dashboard" | "directus" | "directus-with-postgresql" | "docker-registry" | "docuseal" | "docuseal-with-postgres" | "dokuwiki" | "duplicati" | "emby" | "embystat" | "fider" | "filebrowser" | "firefly" | "formbricks" | "ghost" | "gitea" | "gitea-with-mariadb" | "gitea-with-mysql" | "gitea-with-postgresql" | "glance" | "glances" | "glitchtip" | "grafana" | "grafana-with-postgresql" | "grocy" | "heimdall" | "homepage" | "jellyfin" | "jenkins" | "kuzzle" | "listmonk" | "logto" | "mediawiki" | "meilisearch" | "metabase" | "metube" | "minio" | "moodle" | "mosquitto" | "n8n" | "n8n-with-postgresql" | "next-image-transformation" | "nextcloud" | "nocodb" | "odoo" | "openblocks" | "pairdrop" | "penpot" | "phpmyadmin" | "pocketbase" | "posthog" | "reactive-resume" | "rocketchat" | "shlink" | "slash" | "snapdrop" | "statusnook" | "stirling-pdf" | "supabase" | "syncthing" | "tolgee" | "trigger" | "trigger-with-external-database" | "twenty" | "umami" | "unleash-with-postgresql" | "unleash-without-database" | "uptime-kuma" | "vaultwarden" | "vikunja" | "weblate" | "whoogle" | "wordpress-with-mariadb" | "wordpress-with-mysql" | "wordpress-without-database" +``` \ No newline at end of file diff --git a/docs/models/operations/updateapplicationbyuuidbuildpack.md b/docs/models/operations/updateapplicationbyuuidbuildpack.md new file mode 100644 index 0000000..268ee41 --- /dev/null +++ b/docs/models/operations/updateapplicationbyuuidbuildpack.md @@ -0,0 +1,17 @@ +# UpdateApplicationByUuidBuildPack + +The build pack type. + +## Example Usage + +```typescript +import { UpdateApplicationByUuidBuildPack } from "coolify/models/operations"; + +let value: UpdateApplicationByUuidBuildPack = "nixpacks"; +``` + +## Values + +```typescript +"nixpacks" | "static" | "dockerfile" | "dockercompose" +``` \ No newline at end of file diff --git a/docs/models/operations/updateapplicationbyuuidredirect.md b/docs/models/operations/updateapplicationbyuuidredirect.md new file mode 100644 index 0000000..d516866 --- /dev/null +++ b/docs/models/operations/updateapplicationbyuuidredirect.md @@ -0,0 +1,17 @@ +# UpdateApplicationByUuidRedirect + +How to set redirect with Traefik / Caddy. www<->non-www. + +## Example Usage + +```typescript +import { UpdateApplicationByUuidRedirect } from "coolify/models/operations"; + +let value: UpdateApplicationByUuidRedirect = "www"; +``` + +## Values + +```typescript +"www" | "non-www" | "both" +``` \ No newline at end of file diff --git a/docs/models/operations/updateapplicationbyuuidrequest.md b/docs/models/operations/updateapplicationbyuuidrequest.md new file mode 100644 index 0000000..63a0d63 --- /dev/null +++ b/docs/models/operations/updateapplicationbyuuidrequest.md @@ -0,0 +1,19 @@ +# UpdateApplicationByUuidRequest + +## Example Usage + +```typescript +import { UpdateApplicationByUuidRequest } from "coolify/models/operations"; + +let value: UpdateApplicationByUuidRequest = { + uuid: "1561b948-19e5-4a2b-b429-0d0a4bf39993", + requestBody: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `uuid` | *string* | :heavy_check_mark: | UUID of the application. | +| `requestBody` | [operations.UpdateApplicationByUuidRequestBody](../../models/operations/updateapplicationbyuuidrequestbody.md) | :heavy_check_mark: | Application updated. | \ No newline at end of file diff --git a/docs/models/operations/updateapplicationbyuuidrequestbody.md b/docs/models/operations/updateapplicationbyuuidrequestbody.md new file mode 100644 index 0000000..77cc81d --- /dev/null +++ b/docs/models/operations/updateapplicationbyuuidrequestbody.md @@ -0,0 +1,77 @@ +# UpdateApplicationByUuidRequestBody + +Application updated. + +## Example Usage + +```typescript +import { UpdateApplicationByUuidRequestBody } from "coolify/models/operations"; + +let value: UpdateApplicationByUuidRequestBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `projectUuid` | *string* | :heavy_minus_sign: | The project UUID. | +| `serverUuid` | *string* | :heavy_minus_sign: | The server UUID. | +| `environmentName` | *string* | :heavy_minus_sign: | The environment name. | +| `githubAppUuid` | *string* | :heavy_minus_sign: | The Github App UUID. | +| `gitRepository` | *string* | :heavy_minus_sign: | The git repository URL. | +| `gitBranch` | *string* | :heavy_minus_sign: | The git branch. | +| `portsExposes` | *string* | :heavy_minus_sign: | The ports to expose. | +| `destinationUuid` | *string* | :heavy_minus_sign: | The destination UUID. | +| `buildPack` | [operations.UpdateApplicationByUuidBuildPack](../../models/operations/updateapplicationbyuuidbuildpack.md) | :heavy_minus_sign: | The build pack type. | +| `name` | *string* | :heavy_minus_sign: | The application name. | +| `description` | *string* | :heavy_minus_sign: | The application description. | +| `domains` | *string* | :heavy_minus_sign: | The application domains. | +| `gitCommitSha` | *string* | :heavy_minus_sign: | The git commit SHA. | +| `dockerRegistryImageName` | *string* | :heavy_minus_sign: | The docker registry image name. | +| `dockerRegistryImageTag` | *string* | :heavy_minus_sign: | The docker registry image tag. | +| `isStatic` | *boolean* | :heavy_minus_sign: | The flag to indicate if the application is static. | +| `installCommand` | *string* | :heavy_minus_sign: | The install command. | +| `buildCommand` | *string* | :heavy_minus_sign: | The build command. | +| `startCommand` | *string* | :heavy_minus_sign: | The start command. | +| `portsMappings` | *string* | :heavy_minus_sign: | The ports mappings. | +| `baseDirectory` | *string* | :heavy_minus_sign: | The base directory for all commands. | +| `publishDirectory` | *string* | :heavy_minus_sign: | The publish directory. | +| `healthCheckEnabled` | *boolean* | :heavy_minus_sign: | Health check enabled. | +| `healthCheckPath` | *string* | :heavy_minus_sign: | Health check path. | +| `healthCheckPort` | *string* | :heavy_minus_sign: | Health check port. | +| `healthCheckHost` | *string* | :heavy_minus_sign: | Health check host. | +| `healthCheckMethod` | *string* | :heavy_minus_sign: | Health check method. | +| `healthCheckReturnCode` | *number* | :heavy_minus_sign: | Health check return code. | +| `healthCheckScheme` | *string* | :heavy_minus_sign: | Health check scheme. | +| `healthCheckResponseText` | *string* | :heavy_minus_sign: | Health check response text. | +| `healthCheckInterval` | *number* | :heavy_minus_sign: | Health check interval in seconds. | +| `healthCheckTimeout` | *number* | :heavy_minus_sign: | Health check timeout in seconds. | +| `healthCheckRetries` | *number* | :heavy_minus_sign: | Health check retries count. | +| `healthCheckStartPeriod` | *number* | :heavy_minus_sign: | Health check start period in seconds. | +| `limitsMemory` | *string* | :heavy_minus_sign: | Memory limit. | +| `limitsMemorySwap` | *string* | :heavy_minus_sign: | Memory swap limit. | +| `limitsMemorySwappiness` | *number* | :heavy_minus_sign: | Memory swappiness. | +| `limitsMemoryReservation` | *string* | :heavy_minus_sign: | Memory reservation. | +| `limitsCpus` | *string* | :heavy_minus_sign: | CPU limit. | +| `limitsCpuset` | *string* | :heavy_minus_sign: | CPU set. | +| `limitsCpuShares` | *number* | :heavy_minus_sign: | CPU shares. | +| `customLabels` | *string* | :heavy_minus_sign: | Custom labels. | +| `customDockerRunOptions` | *string* | :heavy_minus_sign: | Custom docker run options. | +| `postDeploymentCommand` | *string* | :heavy_minus_sign: | Post deployment command. | +| `postDeploymentCommandContainer` | *string* | :heavy_minus_sign: | Post deployment command container. | +| `preDeploymentCommand` | *string* | :heavy_minus_sign: | Pre deployment command. | +| `preDeploymentCommandContainer` | *string* | :heavy_minus_sign: | Pre deployment command container. | +| `manualWebhookSecretGithub` | *string* | :heavy_minus_sign: | Manual webhook secret for Github. | +| `manualWebhookSecretGitlab` | *string* | :heavy_minus_sign: | Manual webhook secret for Gitlab. | +| `manualWebhookSecretBitbucket` | *string* | :heavy_minus_sign: | Manual webhook secret for Bitbucket. | +| `manualWebhookSecretGitea` | *string* | :heavy_minus_sign: | Manual webhook secret for Gitea. | +| `redirect` | [operations.UpdateApplicationByUuidRedirect](../../models/operations/updateapplicationbyuuidredirect.md) | :heavy_minus_sign: | How to set redirect with Traefik / Caddy. www<->non-www. | +| `instantDeploy` | *boolean* | :heavy_minus_sign: | The flag to indicate if the application should be deployed instantly. | +| `dockerfile` | *string* | :heavy_minus_sign: | The Dockerfile content. | +| `dockerComposeLocation` | *string* | :heavy_minus_sign: | The Docker Compose location. | +| `dockerComposeRaw` | *string* | :heavy_minus_sign: | The Docker Compose raw content. | +| `dockerComposeCustomStartCommand` | *string* | :heavy_minus_sign: | The Docker Compose custom start command. | +| `dockerComposeCustomBuildCommand` | *string* | :heavy_minus_sign: | The Docker Compose custom build command. | +| `dockerComposeDomains` | *any*[] | :heavy_minus_sign: | The Docker Compose domains. | +| `watchPaths` | *string* | :heavy_minus_sign: | The watch paths. | +| `useBuildServer` | *boolean* | :heavy_minus_sign: | Use build server. | \ No newline at end of file diff --git a/docs/models/operations/updateapplicationbyuuidresponsebody.md b/docs/models/operations/updateapplicationbyuuidresponsebody.md new file mode 100644 index 0000000..195d560 --- /dev/null +++ b/docs/models/operations/updateapplicationbyuuidresponsebody.md @@ -0,0 +1,17 @@ +# UpdateApplicationByUuidResponseBody + +Application updated. + +## Example Usage + +```typescript +import { UpdateApplicationByUuidResponseBody } from "coolify/models/operations"; + +let value: UpdateApplicationByUuidResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `uuid` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatedatabasebyuuidrequest.md b/docs/models/operations/updatedatabasebyuuidrequest.md new file mode 100644 index 0000000..d27400a --- /dev/null +++ b/docs/models/operations/updatedatabasebyuuidrequest.md @@ -0,0 +1,19 @@ +# UpdateDatabaseByUuidRequest + +## Example Usage + +```typescript +import { UpdateDatabaseByUuidRequest } from "coolify/models/operations"; + +let value: UpdateDatabaseByUuidRequest = { + uuid: "26296ef8-49e6-4847-a638-458c5ed04715", + requestBody: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| `uuid` | *string* | :heavy_check_mark: | UUID of the database. | +| `requestBody` | [operations.UpdateDatabaseByUuidRequestBody](../../models/operations/updatedatabasebyuuidrequestbody.md) | :heavy_check_mark: | Database data | \ No newline at end of file diff --git a/docs/models/operations/updatedatabasebyuuidrequestbody.md b/docs/models/operations/updatedatabasebyuuidrequestbody.md new file mode 100644 index 0000000..be53b11 --- /dev/null +++ b/docs/models/operations/updatedatabasebyuuidrequestbody.md @@ -0,0 +1,54 @@ +# UpdateDatabaseByUuidRequestBody + +Database data + +## Example Usage + +```typescript +import { UpdateDatabaseByUuidRequestBody } from "coolify/models/operations"; + +let value: UpdateDatabaseByUuidRequestBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | +| `name` | *string* | :heavy_minus_sign: | Name of the database | +| `description` | *string* | :heavy_minus_sign: | Description of the database | +| `image` | *string* | :heavy_minus_sign: | Docker Image of the database | +| `isPublic` | *boolean* | :heavy_minus_sign: | Is the database public? | +| `publicPort` | *number* | :heavy_minus_sign: | Public port of the database | +| `limitsMemory` | *string* | :heavy_minus_sign: | Memory limit of the database | +| `limitsMemorySwap` | *string* | :heavy_minus_sign: | Memory swap limit of the database | +| `limitsMemorySwappiness` | *number* | :heavy_minus_sign: | Memory swappiness of the database | +| `limitsMemoryReservation` | *string* | :heavy_minus_sign: | Memory reservation of the database | +| `limitsCpus` | *string* | :heavy_minus_sign: | CPU limit of the database | +| `limitsCpuset` | *string* | :heavy_minus_sign: | CPU set of the database | +| `limitsCpuShares` | *number* | :heavy_minus_sign: | CPU shares of the database | +| `postgresUser` | *string* | :heavy_minus_sign: | PostgreSQL user | +| `postgresPassword` | *string* | :heavy_minus_sign: | PostgreSQL password | +| `postgresDb` | *string* | :heavy_minus_sign: | PostgreSQL database | +| `postgresInitdbArgs` | *string* | :heavy_minus_sign: | PostgreSQL initdb args | +| `postgresHostAuthMethod` | *string* | :heavy_minus_sign: | PostgreSQL host auth method | +| `postgresConf` | *string* | :heavy_minus_sign: | PostgreSQL conf | +| `clickhouseAdminUser` | *string* | :heavy_minus_sign: | Clickhouse admin user | +| `clickhouseAdminPassword` | *string* | :heavy_minus_sign: | Clickhouse admin password | +| `dragonflyPassword` | *string* | :heavy_minus_sign: | DragonFly password | +| `redisPassword` | *string* | :heavy_minus_sign: | Redis password | +| `redisConf` | *string* | :heavy_minus_sign: | Redis conf | +| `keydbPassword` | *string* | :heavy_minus_sign: | KeyDB password | +| `keydbConf` | *string* | :heavy_minus_sign: | KeyDB conf | +| `mariadbConf` | *string* | :heavy_minus_sign: | MariaDB conf | +| `mariadbRootPassword` | *string* | :heavy_minus_sign: | MariaDB root password | +| `mariadbUser` | *string* | :heavy_minus_sign: | MariaDB user | +| `mariadbPassword` | *string* | :heavy_minus_sign: | MariaDB password | +| `mariadbDatabase` | *string* | :heavy_minus_sign: | MariaDB database | +| `mongoConf` | *string* | :heavy_minus_sign: | Mongo conf | +| `mongoInitdbRootUsername` | *string* | :heavy_minus_sign: | Mongo initdb root username | +| `mongoInitdbRootPassword` | *string* | :heavy_minus_sign: | Mongo initdb root password | +| `mongoInitdbInitDatabase` | *string* | :heavy_minus_sign: | Mongo initdb init database | +| `mysqlRootPassword` | *string* | :heavy_minus_sign: | MySQL root password | +| `mysqlUser` | *string* | :heavy_minus_sign: | MySQL user | +| `mysqlDatabase` | *string* | :heavy_minus_sign: | MySQL database | +| `mysqlConf` | *string* | :heavy_minus_sign: | MySQL conf | \ No newline at end of file diff --git a/docs/models/operations/updateenvbyapplicationuuidrequest.md b/docs/models/operations/updateenvbyapplicationuuidrequest.md new file mode 100644 index 0000000..dd81bda --- /dev/null +++ b/docs/models/operations/updateenvbyapplicationuuidrequest.md @@ -0,0 +1,22 @@ +# UpdateEnvByApplicationUuidRequest + +## Example Usage + +```typescript +import { UpdateEnvByApplicationUuidRequest } from "coolify/models/operations"; + +let value: UpdateEnvByApplicationUuidRequest = { + uuid: "30c35eb0-2993-4e98-99b4-632fb734064b", + requestBody: { + key: "", + value: "", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `uuid` | *string* | :heavy_check_mark: | UUID of the application. | +| `requestBody` | [operations.UpdateEnvByApplicationUuidRequestBody](../../models/operations/updateenvbyapplicationuuidrequestbody.md) | :heavy_check_mark: | Env updated. | \ No newline at end of file diff --git a/docs/models/operations/updateenvbyapplicationuuidrequestbody.md b/docs/models/operations/updateenvbyapplicationuuidrequestbody.md new file mode 100644 index 0000000..559c465 --- /dev/null +++ b/docs/models/operations/updateenvbyapplicationuuidrequestbody.md @@ -0,0 +1,26 @@ +# UpdateEnvByApplicationUuidRequestBody + +Env updated. + +## Example Usage + +```typescript +import { UpdateEnvByApplicationUuidRequestBody } from "coolify/models/operations"; + +let value: UpdateEnvByApplicationUuidRequestBody = { + key: "", + value: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `key` | *string* | :heavy_check_mark: | The key of the environment variable. | +| `value` | *string* | :heavy_check_mark: | The value of the environment variable. | +| `isPreview` | *boolean* | :heavy_minus_sign: | The flag to indicate if the environment variable is used in preview deployments. | +| `isBuildTime` | *boolean* | :heavy_minus_sign: | The flag to indicate if the environment variable is used in build time. | +| `isLiteral` | *boolean* | :heavy_minus_sign: | The flag to indicate if the environment variable is a literal, nothing espaced. | +| `isMultiline` | *boolean* | :heavy_minus_sign: | The flag to indicate if the environment variable is multiline. | +| `isShownOnce` | *boolean* | :heavy_minus_sign: | The flag to indicate if the environment variable's value is shown on the UI. | \ No newline at end of file diff --git a/docs/models/operations/updateenvbyapplicationuuidresponsebody.md b/docs/models/operations/updateenvbyapplicationuuidresponsebody.md new file mode 100644 index 0000000..b329f6e --- /dev/null +++ b/docs/models/operations/updateenvbyapplicationuuidresponsebody.md @@ -0,0 +1,19 @@ +# UpdateEnvByApplicationUuidResponseBody + +Environment variable updated. + +## Example Usage + +```typescript +import { UpdateEnvByApplicationUuidResponseBody } from "coolify/models/operations"; + +let value: UpdateEnvByApplicationUuidResponseBody = { + message: "Environment variable updated.", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | +| `message` | *string* | :heavy_minus_sign: | N/A | Environment variable updated. | \ No newline at end of file diff --git a/docs/models/operations/updateenvbyserviceuuidrequest.md b/docs/models/operations/updateenvbyserviceuuidrequest.md new file mode 100644 index 0000000..52335df --- /dev/null +++ b/docs/models/operations/updateenvbyserviceuuidrequest.md @@ -0,0 +1,22 @@ +# UpdateEnvByServiceUuidRequest + +## Example Usage + +```typescript +import { UpdateEnvByServiceUuidRequest } from "coolify/models/operations"; + +let value: UpdateEnvByServiceUuidRequest = { + uuid: "fb5c163a-1648-45b0-aa34-cf5d1ac26e10", + requestBody: { + key: "", + value: "", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `uuid` | *string* | :heavy_check_mark: | UUID of the service. | +| `requestBody` | [operations.UpdateEnvByServiceUuidRequestBody](../../models/operations/updateenvbyserviceuuidrequestbody.md) | :heavy_check_mark: | Env updated. | \ No newline at end of file diff --git a/docs/models/operations/updateenvbyserviceuuidrequestbody.md b/docs/models/operations/updateenvbyserviceuuidrequestbody.md new file mode 100644 index 0000000..869dcec --- /dev/null +++ b/docs/models/operations/updateenvbyserviceuuidrequestbody.md @@ -0,0 +1,26 @@ +# UpdateEnvByServiceUuidRequestBody + +Env updated. + +## Example Usage + +```typescript +import { UpdateEnvByServiceUuidRequestBody } from "coolify/models/operations"; + +let value: UpdateEnvByServiceUuidRequestBody = { + key: "", + value: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `key` | *string* | :heavy_check_mark: | The key of the environment variable. | +| `value` | *string* | :heavy_check_mark: | The value of the environment variable. | +| `isPreview` | *boolean* | :heavy_minus_sign: | The flag to indicate if the environment variable is used in preview deployments. | +| `isBuildTime` | *boolean* | :heavy_minus_sign: | The flag to indicate if the environment variable is used in build time. | +| `isLiteral` | *boolean* | :heavy_minus_sign: | The flag to indicate if the environment variable is a literal, nothing espaced. | +| `isMultiline` | *boolean* | :heavy_minus_sign: | The flag to indicate if the environment variable is multiline. | +| `isShownOnce` | *boolean* | :heavy_minus_sign: | The flag to indicate if the environment variable's value is shown on the UI. | \ No newline at end of file diff --git a/docs/models/operations/updateenvbyserviceuuidresponsebody.md b/docs/models/operations/updateenvbyserviceuuidresponsebody.md new file mode 100644 index 0000000..3072b2c --- /dev/null +++ b/docs/models/operations/updateenvbyserviceuuidresponsebody.md @@ -0,0 +1,19 @@ +# UpdateEnvByServiceUuidResponseBody + +Environment variable updated. + +## Example Usage + +```typescript +import { UpdateEnvByServiceUuidResponseBody } from "coolify/models/operations"; + +let value: UpdateEnvByServiceUuidResponseBody = { + message: "Environment variable updated.", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | +| `message` | *string* | :heavy_minus_sign: | N/A | Environment variable updated. | \ No newline at end of file diff --git a/docs/models/operations/updateenvsbyapplicationuuidrequest.md b/docs/models/operations/updateenvsbyapplicationuuidrequest.md new file mode 100644 index 0000000..830204e --- /dev/null +++ b/docs/models/operations/updateenvsbyapplicationuuidrequest.md @@ -0,0 +1,23 @@ +# UpdateEnvsByApplicationUuidRequest + +## Example Usage + +```typescript +import { UpdateEnvsByApplicationUuidRequest } from "coolify/models/operations"; + +let value: UpdateEnvsByApplicationUuidRequest = { + uuid: "201a78ef-3a40-4c56-89da-d4c2fa3fb438", + requestBody: { + data: [ + {}, + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| `uuid` | *string* | :heavy_check_mark: | UUID of the application. | +| `requestBody` | [operations.UpdateEnvsByApplicationUuidRequestBody](../../models/operations/updateenvsbyapplicationuuidrequestbody.md) | :heavy_check_mark: | Bulk envs updated. | \ No newline at end of file diff --git a/docs/models/operations/updateenvsbyapplicationuuidrequestbody.md b/docs/models/operations/updateenvsbyapplicationuuidrequestbody.md new file mode 100644 index 0000000..c64409c --- /dev/null +++ b/docs/models/operations/updateenvsbyapplicationuuidrequestbody.md @@ -0,0 +1,21 @@ +# UpdateEnvsByApplicationUuidRequestBody + +Bulk envs updated. + +## Example Usage + +```typescript +import { UpdateEnvsByApplicationUuidRequestBody } from "coolify/models/operations"; + +let value: UpdateEnvsByApplicationUuidRequestBody = { + data: [ + {}, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `data` | [operations.Data](../../models/operations/data.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateenvsbyapplicationuuidresponsebody.md b/docs/models/operations/updateenvsbyapplicationuuidresponsebody.md new file mode 100644 index 0000000..fc26228 --- /dev/null +++ b/docs/models/operations/updateenvsbyapplicationuuidresponsebody.md @@ -0,0 +1,19 @@ +# UpdateEnvsByApplicationUuidResponseBody + +Environment variables updated. + +## Example Usage + +```typescript +import { UpdateEnvsByApplicationUuidResponseBody } from "coolify/models/operations"; + +let value: UpdateEnvsByApplicationUuidResponseBody = { + message: "Environment variables updated.", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | +| `message` | *string* | :heavy_minus_sign: | N/A | Environment variables updated. | \ No newline at end of file diff --git a/docs/models/operations/updateenvsbyserviceuuiddata.md b/docs/models/operations/updateenvsbyserviceuuiddata.md new file mode 100644 index 0000000..8f9f0b7 --- /dev/null +++ b/docs/models/operations/updateenvsbyserviceuuiddata.md @@ -0,0 +1,21 @@ +# UpdateEnvsByServiceUuidData + +## Example Usage + +```typescript +import { UpdateEnvsByServiceUuidData } from "coolify/models/operations"; + +let value: UpdateEnvsByServiceUuidData = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `key` | *string* | :heavy_minus_sign: | The key of the environment variable. | +| `value` | *string* | :heavy_minus_sign: | The value of the environment variable. | +| `isPreview` | *boolean* | :heavy_minus_sign: | The flag to indicate if the environment variable is used in preview deployments. | +| `isBuildTime` | *boolean* | :heavy_minus_sign: | The flag to indicate if the environment variable is used in build time. | +| `isLiteral` | *boolean* | :heavy_minus_sign: | The flag to indicate if the environment variable is a literal, nothing espaced. | +| `isMultiline` | *boolean* | :heavy_minus_sign: | The flag to indicate if the environment variable is multiline. | +| `isShownOnce` | *boolean* | :heavy_minus_sign: | The flag to indicate if the environment variable's value is shown on the UI. | \ No newline at end of file diff --git a/docs/models/operations/updateenvsbyserviceuuidrequest.md b/docs/models/operations/updateenvsbyserviceuuidrequest.md new file mode 100644 index 0000000..06099c7 --- /dev/null +++ b/docs/models/operations/updateenvsbyserviceuuidrequest.md @@ -0,0 +1,23 @@ +# UpdateEnvsByServiceUuidRequest + +## Example Usage + +```typescript +import { UpdateEnvsByServiceUuidRequest } from "coolify/models/operations"; + +let value: UpdateEnvsByServiceUuidRequest = { + uuid: "6ce4679f-b64f-42be-9a63-5baedde4568a", + requestBody: { + data: [ + {}, + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `uuid` | *string* | :heavy_check_mark: | UUID of the service. | +| `requestBody` | [operations.UpdateEnvsByServiceUuidRequestBody](../../models/operations/updateenvsbyserviceuuidrequestbody.md) | :heavy_check_mark: | Bulk envs updated. | \ No newline at end of file diff --git a/docs/models/operations/updateenvsbyserviceuuidrequestbody.md b/docs/models/operations/updateenvsbyserviceuuidrequestbody.md new file mode 100644 index 0000000..841962c --- /dev/null +++ b/docs/models/operations/updateenvsbyserviceuuidrequestbody.md @@ -0,0 +1,21 @@ +# UpdateEnvsByServiceUuidRequestBody + +Bulk envs updated. + +## Example Usage + +```typescript +import { UpdateEnvsByServiceUuidRequestBody } from "coolify/models/operations"; + +let value: UpdateEnvsByServiceUuidRequestBody = { + data: [ + {}, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `data` | [operations.UpdateEnvsByServiceUuidData](../../models/operations/updateenvsbyserviceuuiddata.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateenvsbyserviceuuidresponsebody.md b/docs/models/operations/updateenvsbyserviceuuidresponsebody.md new file mode 100644 index 0000000..5830311 --- /dev/null +++ b/docs/models/operations/updateenvsbyserviceuuidresponsebody.md @@ -0,0 +1,19 @@ +# UpdateEnvsByServiceUuidResponseBody + +Environment variables updated. + +## Example Usage + +```typescript +import { UpdateEnvsByServiceUuidResponseBody } from "coolify/models/operations"; + +let value: UpdateEnvsByServiceUuidResponseBody = { + message: "Environment variables updated.", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | +| `message` | *string* | :heavy_minus_sign: | N/A | Environment variables updated. | \ No newline at end of file diff --git a/docs/models/operations/updateprivatekeyrequestbody.md b/docs/models/operations/updateprivatekeyrequestbody.md new file mode 100644 index 0000000..d6784d4 --- /dev/null +++ b/docs/models/operations/updateprivatekeyrequestbody.md @@ -0,0 +1,19 @@ +# UpdatePrivateKeyRequestBody + +## Example Usage + +```typescript +import { UpdatePrivateKeyRequestBody } from "coolify/models/operations"; + +let value: UpdatePrivateKeyRequestBody = { + privateKey: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `privateKey` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateprivatekeyresponsebody.md b/docs/models/operations/updateprivatekeyresponsebody.md new file mode 100644 index 0000000..d673ba5 --- /dev/null +++ b/docs/models/operations/updateprivatekeyresponsebody.md @@ -0,0 +1,17 @@ +# UpdatePrivateKeyResponseBody + +The updated private key's UUID. + +## Example Usage + +```typescript +import { UpdatePrivateKeyResponseBody } from "coolify/models/operations"; + +let value: UpdatePrivateKeyResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `uuid` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateprojectbyuuidrequest.md b/docs/models/operations/updateprojectbyuuidrequest.md new file mode 100644 index 0000000..458e3f3 --- /dev/null +++ b/docs/models/operations/updateprojectbyuuidrequest.md @@ -0,0 +1,19 @@ +# UpdateProjectByUuidRequest + +## Example Usage + +```typescript +import { UpdateProjectByUuidRequest } from "coolify/models/operations"; + +let value: UpdateProjectByUuidRequest = { + uuid: "d5311314-11d2-48c7-9236-85cce0e6ebfc", + requestBody: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `uuid` | *string* | :heavy_check_mark: | UUID of the application. | +| `requestBody` | [operations.UpdateProjectByUuidRequestBody](../../models/operations/updateprojectbyuuidrequestbody.md) | :heavy_check_mark: | Project updated. | \ No newline at end of file diff --git a/docs/models/operations/updateprojectbyuuidrequestbody.md b/docs/models/operations/updateprojectbyuuidrequestbody.md new file mode 100644 index 0000000..05f9306 --- /dev/null +++ b/docs/models/operations/updateprojectbyuuidrequestbody.md @@ -0,0 +1,18 @@ +# UpdateProjectByUuidRequestBody + +Project updated. + +## Example Usage + +```typescript +import { UpdateProjectByUuidRequestBody } from "coolify/models/operations"; + +let value: UpdateProjectByUuidRequestBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `name` | *string* | :heavy_minus_sign: | The name of the project. | +| `description` | *string* | :heavy_minus_sign: | The description of the project. | \ No newline at end of file diff --git a/docs/models/operations/updateprojectbyuuidresponsebody.md b/docs/models/operations/updateprojectbyuuidresponsebody.md new file mode 100644 index 0000000..3aa1155 --- /dev/null +++ b/docs/models/operations/updateprojectbyuuidresponsebody.md @@ -0,0 +1,23 @@ +# UpdateProjectByUuidResponseBody + +Project updated. + +## Example Usage + +```typescript +import { UpdateProjectByUuidResponseBody } from "coolify/models/operations"; + +let value: UpdateProjectByUuidResponseBody = { + uuid: "og888os", + name: "Project Name", + description: "Project Description", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | +| `uuid` | *string* | :heavy_minus_sign: | N/A | og888os | +| `name` | *string* | :heavy_minus_sign: | N/A | Project Name | +| `description` | *string* | :heavy_minus_sign: | N/A | Project Description | \ No newline at end of file diff --git a/docs/models/operations/updateserverbyuuidproxytype.md b/docs/models/operations/updateserverbyuuidproxytype.md new file mode 100644 index 0000000..4462358 --- /dev/null +++ b/docs/models/operations/updateserverbyuuidproxytype.md @@ -0,0 +1,17 @@ +# UpdateServerByUuidProxyType + +The proxy type. + +## Example Usage + +```typescript +import { UpdateServerByUuidProxyType } from "coolify/models/operations"; + +let value: UpdateServerByUuidProxyType = "caddy"; +``` + +## Values + +```typescript +"traefik" | "caddy" | "none" +``` \ No newline at end of file diff --git a/docs/models/operations/updateserverbyuuidrequest.md b/docs/models/operations/updateserverbyuuidrequest.md new file mode 100644 index 0000000..19b2f16 --- /dev/null +++ b/docs/models/operations/updateserverbyuuidrequest.md @@ -0,0 +1,19 @@ +# UpdateServerByUuidRequest + +## Example Usage + +```typescript +import { UpdateServerByUuidRequest } from "coolify/models/operations"; + +let value: UpdateServerByUuidRequest = { + uuid: "cb2d7779-97da-466c-9530-ee1521e0f1d9", + requestBody: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `uuid` | *string* | :heavy_check_mark: | Server's UUID | +| `requestBody` | [operations.UpdateServerByUuidRequestBody](../../models/operations/updateserverbyuuidrequestbody.md) | :heavy_check_mark: | Server updated. | \ No newline at end of file diff --git a/docs/models/operations/updateserverbyuuidrequestbody.md b/docs/models/operations/updateserverbyuuidrequestbody.md new file mode 100644 index 0000000..a98b5e3 --- /dev/null +++ b/docs/models/operations/updateserverbyuuidrequestbody.md @@ -0,0 +1,25 @@ +# UpdateServerByUuidRequestBody + +Server updated. + +## Example Usage + +```typescript +import { UpdateServerByUuidRequestBody } from "coolify/models/operations"; + +let value: UpdateServerByUuidRequestBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `name` | *string* | :heavy_minus_sign: | The name of the server. | +| `description` | *string* | :heavy_minus_sign: | The description of the server. | +| `ip` | *string* | :heavy_minus_sign: | The IP of the server. | +| `port` | *number* | :heavy_minus_sign: | The port of the server. | +| `user` | *string* | :heavy_minus_sign: | The user of the server. | +| `privateKeyUuid` | *string* | :heavy_minus_sign: | The UUID of the private key. | +| `isBuildServer` | *boolean* | :heavy_minus_sign: | Is build server. | +| `instantValidate` | *boolean* | :heavy_minus_sign: | Instant validate. | +| `proxyType` | [operations.UpdateServerByUuidProxyType](../../models/operations/updateserverbyuuidproxytype.md) | :heavy_minus_sign: | The proxy type. | \ No newline at end of file diff --git a/docs/models/operations/validateserverbyuuidrequest.md b/docs/models/operations/validateserverbyuuidrequest.md new file mode 100644 index 0000000..f496bf6 --- /dev/null +++ b/docs/models/operations/validateserverbyuuidrequest.md @@ -0,0 +1,17 @@ +# ValidateServerByUuidRequest + +## Example Usage + +```typescript +import { ValidateServerByUuidRequest } from "coolify/models/operations"; + +let value: ValidateServerByUuidRequest = { + uuid: "9ecb8e7d-d3c0-4538-bb18-f3a907b0e803", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `uuid` | *string* | :heavy_check_mark: | Server UUID | \ No newline at end of file diff --git a/docs/models/operations/validateserverbyuuidresponsebody.md b/docs/models/operations/validateserverbyuuidresponsebody.md new file mode 100644 index 0000000..e07c167 --- /dev/null +++ b/docs/models/operations/validateserverbyuuidresponsebody.md @@ -0,0 +1,19 @@ +# ValidateServerByUuidResponseBody + +Server validation started. + +## Example Usage + +```typescript +import { ValidateServerByUuidResponseBody } from "coolify/models/operations"; + +let value: ValidateServerByUuidResponseBody = { + message: "Validation started.", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | +| `message` | *string* | :heavy_minus_sign: | N/A | Validation started. | \ No newline at end of file diff --git a/docs/sdks/api/README.md b/docs/sdks/api/README.md new file mode 100644 index 0000000..c39a238 --- /dev/null +++ b/docs/sdks/api/README.md @@ -0,0 +1,165 @@ +# Api +(*api*) + +## Overview + +### Available Operations + +* [enable](#enable) - Enable API +* [disable](#disable) - Disable API + +## enable + +Enable API (only with root permissions). + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.api.enable(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { apiEnable } from "coolify/funcs/apiEnable.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await apiEnable(coolify); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +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\<[operations.EnableApiResponseBody](../../models/operations/enableapiresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 407, 511 | application/json | +| errors.EnableApiResponseBody | 403 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## disable + +Disable API (only with root permissions). + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.api.disable(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { apiDisable } from "coolify/funcs/apiDisable.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await apiDisable(coolify); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +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\<[operations.DisableApiResponseBody](../../models/operations/disableapiresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 407, 511 | application/json | +| errors.DisableApiResponseBody | 403 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/applications/README.md b/docs/sdks/applications/README.md new file mode 100644 index 0000000..ca1119b --- /dev/null +++ b/docs/sdks/applications/README.md @@ -0,0 +1,1655 @@ +# Applications +(*applications*) + +## Overview + +Applications + +### Available Operations + +* [list](#list) - List +* [createPublic](#createpublic) - Create (Public) +* [createPrivateGithubApp](#createprivategithubapp) - Create (Private - GH App) +* [createPrivateDeployKey](#createprivatedeploykey) - Create (Private - Deploy Key) +* [createDockerfile](#createdockerfile) - Create (Dockerfile) +* [createDockerImage](#createdockerimage) - Create (Docker Image) +* [createDockerCompose](#createdockercompose) - Create (Docker Compose) +* [get](#get) - Get +* [delete](#delete) - Delete +* [update](#update) - Update +* [listEnvs](#listenvs) - List Envs +* [createEnv](#createenv) - Create Env +* [updateEnv](#updateenv) - Update Env +* [updateEnvsBulk](#updateenvsbulk) - Update Envs (Bulk) +* [deleteEnv](#deleteenv) - Delete Env +* [start](#start) - Start +* [stop](#stop) - Stop +* [restart](#restart) - Restart +* [executeCommand](#executecommand) - Execute Command + +## list + +List all applications. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.applications.list(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { applicationsList } from "coolify/funcs/applicationsList.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await applicationsList(coolify); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +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\<[components.Application[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## createPublic + +Create new application based on a public git repository. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + await coolify.applications.createPublic({ + projectUuid: "", + serverUuid: "", + environmentName: "", + gitRepository: "", + gitBranch: "", + buildPack: "nixpacks", + portsExposes: "", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { applicationsCreatePublic } from "coolify/funcs/applicationsCreatePublic.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await applicationsCreatePublic(coolify, { + projectUuid: "", + serverUuid: "", + environmentName: "", + gitRepository: "", + gitBranch: "", + buildPack: "nixpacks", + portsExposes: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreatePublicApplicationRequestBody](../../models/operations/createpublicapplicationrequestbody.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\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## createPrivateGithubApp + +Create new application based on a private repository through a Github App. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + await coolify.applications.createPrivateGithubApp({ + projectUuid: "", + serverUuid: "", + environmentName: "", + githubAppUuid: "", + gitRepository: "", + gitBranch: "", + portsExposes: "", + buildPack: "dockerfile", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { applicationsCreatePrivateGithubApp } from "coolify/funcs/applicationsCreatePrivateGithubApp.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await applicationsCreatePrivateGithubApp(coolify, { + projectUuid: "", + serverUuid: "", + environmentName: "", + githubAppUuid: "", + gitRepository: "", + gitBranch: "", + portsExposes: "", + buildPack: "dockerfile", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreatePrivateGithubAppApplicationRequestBody](../../models/operations/createprivategithubappapplicationrequestbody.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\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## createPrivateDeployKey + +Create new application based on a private repository through a Deploy Key. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + await coolify.applications.createPrivateDeployKey({ + projectUuid: "", + serverUuid: "", + environmentName: "", + privateKeyUuid: "", + gitRepository: "", + gitBranch: "", + portsExposes: "", + buildPack: "static", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { applicationsCreatePrivateDeployKey } from "coolify/funcs/applicationsCreatePrivateDeployKey.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await applicationsCreatePrivateDeployKey(coolify, { + projectUuid: "", + serverUuid: "", + environmentName: "", + privateKeyUuid: "", + gitRepository: "", + gitBranch: "", + portsExposes: "", + buildPack: "static", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreatePrivateDeployKeyApplicationRequestBody](../../models/operations/createprivatedeploykeyapplicationrequestbody.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\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## createDockerfile + +Create new application based on a simple Dockerfile. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + await coolify.applications.createDockerfile({ + projectUuid: "", + serverUuid: "", + environmentName: "", + dockerfile: "", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { applicationsCreateDockerfile } from "coolify/funcs/applicationsCreateDockerfile.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await applicationsCreateDockerfile(coolify, { + projectUuid: "", + serverUuid: "", + environmentName: "", + dockerfile: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateDockerfileApplicationRequestBody](../../models/operations/createdockerfileapplicationrequestbody.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\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## createDockerImage + +Create new application based on a prebuilt docker image + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + await coolify.applications.createDockerImage({ + projectUuid: "", + serverUuid: "", + environmentName: "", + dockerRegistryImageName: "", + portsExposes: "", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { applicationsCreateDockerImage } from "coolify/funcs/applicationsCreateDockerImage.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await applicationsCreateDockerImage(coolify, { + projectUuid: "", + serverUuid: "", + environmentName: "", + dockerRegistryImageName: "", + portsExposes: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateDockerimageApplicationRequestBody](../../models/operations/createdockerimageapplicationrequestbody.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\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## createDockerCompose + +Create new application based on a docker-compose file. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + await coolify.applications.createDockerCompose({ + projectUuid: "", + serverUuid: "", + environmentName: "", + dockerComposeRaw: "", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { applicationsCreateDockerCompose } from "coolify/funcs/applicationsCreateDockerCompose.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await applicationsCreateDockerCompose(coolify, { + projectUuid: "", + serverUuid: "", + environmentName: "", + dockerComposeRaw: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateDockercomposeApplicationRequestBody](../../models/operations/createdockercomposeapplicationrequestbody.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\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## get + +Get application by UUID. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.applications.get({ + uuid: "61f687df-a2c6-49ae-927c-701e1869129c", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { applicationsGet } from "coolify/funcs/applicationsGet.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await applicationsGet(coolify, { + uuid: "61f687df-a2c6-49ae-927c-701e1869129c", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetApplicationByUuidRequest](../../models/operations/getapplicationbyuuidrequest.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\<[components.Application](../../models/components/application.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## delete + +Delete application by UUID. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.applications.delete({ + uuid: "b7774d3f-40ad-4c95-8c81-888632bd34e1", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { applicationsDelete } from "coolify/funcs/applicationsDelete.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await applicationsDelete(coolify, { + uuid: "b7774d3f-40ad-4c95-8c81-888632bd34e1", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteApplicationByUuidRequest](../../models/operations/deleteapplicationbyuuidrequest.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\<[operations.DeleteApplicationByUuidResponseBody](../../models/operations/deleteapplicationbyuuidresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## update + +Update application by UUID. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.applications.update({ + uuid: "2dd6d1b1-2896-4369-b2ed-d1789d4abe06", + requestBody: {}, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { applicationsUpdate } from "coolify/funcs/applicationsUpdate.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await applicationsUpdate(coolify, { + uuid: "2dd6d1b1-2896-4369-b2ed-d1789d4abe06", + requestBody: {}, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdateApplicationByUuidRequest](../../models/operations/updateapplicationbyuuidrequest.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\<[operations.UpdateApplicationByUuidResponseBody](../../models/operations/updateapplicationbyuuidresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## listEnvs + +List all envs by application UUID. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.applications.listEnvs({ + uuid: "c1cca4f0-5746-4721-9989-b05fee4a02e4", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { applicationsListEnvs } from "coolify/funcs/applicationsListEnvs.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await applicationsListEnvs(coolify, { + uuid: "c1cca4f0-5746-4721-9989-b05fee4a02e4", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListEnvsByApplicationUuidRequest](../../models/operations/listenvsbyapplicationuuidrequest.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\<[components.EnvironmentVariable[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## createEnv + +Create env by application UUID. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.applications.createEnv({ + uuid: "41e7ad1e-bfed-46b3-b163-d6b1de04f2c9", + requestBody: {}, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { applicationsCreateEnv } from "coolify/funcs/applicationsCreateEnv.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await applicationsCreateEnv(coolify, { + uuid: "41e7ad1e-bfed-46b3-b163-d6b1de04f2c9", + requestBody: {}, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateEnvByApplicationUuidRequest](../../models/operations/createenvbyapplicationuuidrequest.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\<[operations.CreateEnvByApplicationUuidResponseBody](../../models/operations/createenvbyapplicationuuidresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## updateEnv + +Update env by application UUID. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.applications.updateEnv({ + uuid: "38636143-32bc-410a-bf25-57be00b8a243", + requestBody: { + key: "", + value: "", + }, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { applicationsUpdateEnv } from "coolify/funcs/applicationsUpdateEnv.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await applicationsUpdateEnv(coolify, { + uuid: "38636143-32bc-410a-bf25-57be00b8a243", + requestBody: { + key: "", + value: "", + }, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdateEnvByApplicationUuidRequest](../../models/operations/updateenvbyapplicationuuidrequest.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\<[operations.UpdateEnvByApplicationUuidResponseBody](../../models/operations/updateenvbyapplicationuuidresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## updateEnvsBulk + +Update multiple envs by application UUID. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.applications.updateEnvsBulk({ + uuid: "0a6652ad-7216-4c18-9026-f7327599db39", + requestBody: { + data: [ + {}, + ], + }, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { applicationsUpdateEnvsBulk } from "coolify/funcs/applicationsUpdateEnvsBulk.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await applicationsUpdateEnvsBulk(coolify, { + uuid: "0a6652ad-7216-4c18-9026-f7327599db39", + requestBody: { + data: [ + {}, + ], + }, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdateEnvsByApplicationUuidRequest](../../models/operations/updateenvsbyapplicationuuidrequest.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\<[operations.UpdateEnvsByApplicationUuidResponseBody](../../models/operations/updateenvsbyapplicationuuidresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## deleteEnv + +Delete env by UUID. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.applications.deleteEnv({ + uuid: "29178270-449b-4b61-8c4c-a70fe8abfb71", + envUuid: "33106c3f-066e-4bc0-aa2c-bde0210b2cd0", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { applicationsDeleteEnv } from "coolify/funcs/applicationsDeleteEnv.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await applicationsDeleteEnv(coolify, { + uuid: "29178270-449b-4b61-8c4c-a70fe8abfb71", + envUuid: "33106c3f-066e-4bc0-aa2c-bde0210b2cd0", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteEnvByApplicationUuidRequest](../../models/operations/deleteenvbyapplicationuuidrequest.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\<[operations.DeleteEnvByApplicationUuidResponseBody](../../models/operations/deleteenvbyapplicationuuidresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## start + +Start application. `Post` request is also accepted. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.applications.start({ + uuid: "572630a1-cd73-4275-880b-f045ee102419", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { applicationsStart } from "coolify/funcs/applicationsStart.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await applicationsStart(coolify, { + uuid: "572630a1-cd73-4275-880b-f045ee102419", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.StartApplicationByUuidRequest](../../models/operations/startapplicationbyuuidrequest.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\<[operations.StartApplicationByUuidResponseBody](../../models/operations/startapplicationbyuuidresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## stop + +Stop application. `Post` request is also accepted. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.applications.stop({ + uuid: "c7f49fe8-2360-46f6-9bda-86c275c44858", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { applicationsStop } from "coolify/funcs/applicationsStop.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await applicationsStop(coolify, { + uuid: "c7f49fe8-2360-46f6-9bda-86c275c44858", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.StopApplicationByUuidRequest](../../models/operations/stopapplicationbyuuidrequest.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\<[operations.StopApplicationByUuidResponseBody](../../models/operations/stopapplicationbyuuidresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## restart + +Restart application. `Post` request is also accepted. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.applications.restart({ + uuid: "f6e08c98-9f12-4fa8-a341-05b629d9a23a", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { applicationsRestart } from "coolify/funcs/applicationsRestart.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await applicationsRestart(coolify, { + uuid: "f6e08c98-9f12-4fa8-a341-05b629d9a23a", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.RestartApplicationByUuidRequest](../../models/operations/restartapplicationbyuuidrequest.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\<[operations.RestartApplicationByUuidResponseBody](../../models/operations/restartapplicationbyuuidresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## executeCommand + +Execute a command on the application's current container. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.applications.executeCommand({ + uuid: "5be3e72e-82ca-4e4e-862e-5e0cf0b853f6", + requestBody: {}, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { applicationsExecuteCommand } from "coolify/funcs/applicationsExecuteCommand.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await applicationsExecuteCommand(coolify, { + uuid: "5be3e72e-82ca-4e4e-862e-5e0cf0b853f6", + requestBody: {}, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ExecuteCommandApplicationRequest](../../models/operations/executecommandapplicationrequest.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\<[operations.ExecuteCommandApplicationResponseBody](../../models/operations/executecommandapplicationresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/coolify/README.md b/docs/sdks/coolify/README.md new file mode 100644 index 0000000..0221f7f --- /dev/null +++ b/docs/sdks/coolify/README.md @@ -0,0 +1,3 @@ +# Coolify SDK + +## Overview \ No newline at end of file diff --git a/docs/sdks/databases/README.md b/docs/sdks/databases/README.md new file mode 100644 index 0000000..886dc5f --- /dev/null +++ b/docs/sdks/databases/README.md @@ -0,0 +1,1265 @@ +# Databases +(*databases*) + +## Overview + +Databases + +### Available Operations + +* [list](#list) - List +* [get](#get) - Get +* [delete](#delete) - Delete +* [update](#update) - Update +* [createPostgresql](#createpostgresql) - Create (PostgreSQL) +* [createClickhouse](#createclickhouse) - Create (Clickhouse) +* [createDragonfly](#createdragonfly) - Create (DragonFly) +* [createRedis](#createredis) - Create (Redis) +* [createKeydb](#createkeydb) - Create (KeyDB) +* [createMariadb](#createmariadb) - Create (MariaDB) +* [createMysql](#createmysql) - Create (MySQL) +* [createMongodb](#createmongodb) - Create (MongoDB) +* [start](#start) - Start +* [stop](#stop) - Stop +* [restart](#restart) - Restart + +## list + +List all databases. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.databases.list(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { databasesList } from "coolify/funcs/databasesList.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await databasesList(coolify); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +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\<[string](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## get + +Get database by UUID. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.databases.get({ + uuid: "74d5589b-49ac-48d8-81bc-d384b1e22591", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { databasesGet } from "coolify/funcs/databasesGet.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await databasesGet(coolify, { + uuid: "74d5589b-49ac-48d8-81bc-d384b1e22591", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetDatabaseByUuidRequest](../../models/operations/getdatabasebyuuidrequest.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\<[string](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## delete + +Delete database by UUID. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.databases.delete({ + uuid: "97d3b16d-4e3e-43de-90da-8825514f9704", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { databasesDelete } from "coolify/funcs/databasesDelete.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await databasesDelete(coolify, { + uuid: "97d3b16d-4e3e-43de-90da-8825514f9704", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteDatabaseByUuidRequest](../../models/operations/deletedatabasebyuuidrequest.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\<[operations.DeleteDatabaseByUuidResponseBody](../../models/operations/deletedatabasebyuuidresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## update + +Update database by UUID. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + await coolify.databases.update({ + uuid: "8ce069c2-b9ca-4606-a156-f18931ac7716", + requestBody: {}, + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { databasesUpdate } from "coolify/funcs/databasesUpdate.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await databasesUpdate(coolify, { + uuid: "8ce069c2-b9ca-4606-a156-f18931ac7716", + requestBody: {}, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdateDatabaseByUuidRequest](../../models/operations/updatedatabasebyuuidrequest.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\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## createPostgresql + +Create a new PostgreSQL database. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + await coolify.databases.createPostgresql({ + serverUuid: "", + projectUuid: "", + environmentName: "", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { databasesCreatePostgresql } from "coolify/funcs/databasesCreatePostgresql.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await databasesCreatePostgresql(coolify, { + serverUuid: "", + projectUuid: "", + environmentName: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateDatabasePostgresqlRequestBody](../../models/operations/createdatabasepostgresqlrequestbody.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\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## createClickhouse + +Create a new Clickhouse database. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + await coolify.databases.createClickhouse({ + serverUuid: "", + projectUuid: "", + environmentName: "", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { databasesCreateClickhouse } from "coolify/funcs/databasesCreateClickhouse.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await databasesCreateClickhouse(coolify, { + serverUuid: "", + projectUuid: "", + environmentName: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateDatabaseClickhouseRequestBody](../../models/operations/createdatabaseclickhouserequestbody.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\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## createDragonfly + +Create a new DragonFly database. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + await coolify.databases.createDragonfly({ + serverUuid: "", + projectUuid: "", + environmentName: "", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { databasesCreateDragonfly } from "coolify/funcs/databasesCreateDragonfly.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await databasesCreateDragonfly(coolify, { + serverUuid: "", + projectUuid: "", + environmentName: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateDatabaseDragonflyRequestBody](../../models/operations/createdatabasedragonflyrequestbody.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\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## createRedis + +Create a new Redis database. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + await coolify.databases.createRedis({ + serverUuid: "", + projectUuid: "", + environmentName: "", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { databasesCreateRedis } from "coolify/funcs/databasesCreateRedis.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await databasesCreateRedis(coolify, { + serverUuid: "", + projectUuid: "", + environmentName: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateDatabaseRedisRequestBody](../../models/operations/createdatabaseredisrequestbody.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\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## createKeydb + +Create a new KeyDB database. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + await coolify.databases.createKeydb({ + serverUuid: "", + projectUuid: "", + environmentName: "", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { databasesCreateKeydb } from "coolify/funcs/databasesCreateKeydb.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await databasesCreateKeydb(coolify, { + serverUuid: "", + projectUuid: "", + environmentName: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateDatabaseKeydbRequestBody](../../models/operations/createdatabasekeydbrequestbody.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\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## createMariadb + +Create a new MariaDB database. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + await coolify.databases.createMariadb({ + serverUuid: "", + projectUuid: "", + environmentName: "", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { databasesCreateMariadb } from "coolify/funcs/databasesCreateMariadb.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await databasesCreateMariadb(coolify, { + serverUuid: "", + projectUuid: "", + environmentName: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateDatabaseMariadbRequestBody](../../models/operations/createdatabasemariadbrequestbody.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\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## createMysql + +Create a new MySQL database. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + await coolify.databases.createMysql({ + serverUuid: "", + projectUuid: "", + environmentName: "", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { databasesCreateMysql } from "coolify/funcs/databasesCreateMysql.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await databasesCreateMysql(coolify, { + serverUuid: "", + projectUuid: "", + environmentName: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateDatabaseMysqlRequestBody](../../models/operations/createdatabasemysqlrequestbody.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\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## createMongodb + +Create a new MongoDB database. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + await coolify.databases.createMongodb({ + serverUuid: "", + projectUuid: "", + environmentName: "", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { databasesCreateMongodb } from "coolify/funcs/databasesCreateMongodb.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await databasesCreateMongodb(coolify, { + serverUuid: "", + projectUuid: "", + environmentName: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateDatabaseMongodbRequestBody](../../models/operations/createdatabasemongodbrequestbody.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\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## start + +Start database. `Post` request is also accepted. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.databases.start({ + uuid: "f40511cd-7fe9-4acb-ba62-b4ed38ad7597", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { databasesStart } from "coolify/funcs/databasesStart.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await databasesStart(coolify, { + uuid: "f40511cd-7fe9-4acb-ba62-b4ed38ad7597", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.StartDatabaseByUuidRequest](../../models/operations/startdatabasebyuuidrequest.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\<[operations.StartDatabaseByUuidResponseBody](../../models/operations/startdatabasebyuuidresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## stop + +Stop database. `Post` request is also accepted. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.databases.stop({ + uuid: "3833eaa9-ac55-4488-907b-122d1dc43961", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { databasesStop } from "coolify/funcs/databasesStop.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await databasesStop(coolify, { + uuid: "3833eaa9-ac55-4488-907b-122d1dc43961", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.StopDatabaseByUuidRequest](../../models/operations/stopdatabasebyuuidrequest.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\<[operations.StopDatabaseByUuidResponseBody](../../models/operations/stopdatabasebyuuidresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## restart + +Restart database. `Post` request is also accepted. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.databases.restart({ + uuid: "87eeb84f-bfe7-4d69-be6c-c4602521ac1a", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { databasesRestart } from "coolify/funcs/databasesRestart.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await databasesRestart(coolify, { + uuid: "87eeb84f-bfe7-4d69-be6c-c4602521ac1a", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.RestartDatabaseByUuidRequest](../../models/operations/restartdatabasebyuuidrequest.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\<[operations.RestartDatabaseByUuidResponseBody](../../models/operations/restartdatabasebyuuidresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/deployments/README.md b/docs/sdks/deployments/README.md new file mode 100644 index 0000000..49bafab --- /dev/null +++ b/docs/sdks/deployments/README.md @@ -0,0 +1,249 @@ +# Deployments +(*deployments*) + +## Overview + +Deployments + +### Available Operations + +* [list](#list) - List +* [get](#get) - Get +* [deployByTagOrUuid](#deploybytagoruuid) - Deploy + +## list + +List currently running deployments + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.deployments.list(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { deploymentsList } from "coolify/funcs/deploymentsList.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await deploymentsList(coolify); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +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\<[components.ApplicationDeploymentQueue[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## get + +Get deployment by UUID. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.deployments.get({ + uuid: "2ad7d3d7-960f-4230-bfe2-5ed5941b0a65", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { deploymentsGet } from "coolify/funcs/deploymentsGet.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await deploymentsGet(coolify, { + uuid: "2ad7d3d7-960f-4230-bfe2-5ed5941b0a65", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetDeploymentByUuidRequest](../../models/operations/getdeploymentbyuuidrequest.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\<[components.ApplicationDeploymentQueue](../../models/components/applicationdeploymentqueue.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## deployByTagOrUuid + +Deploy by tag or uuid. `Post` request also accepted. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.deployments.deployByTagOrUuid({}); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { deploymentsDeployByTagOrUuid } from "coolify/funcs/deploymentsDeployByTagOrUuid.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await deploymentsDeployByTagOrUuid(coolify, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeployByTagOrUuidRequest](../../models/operations/deploybytagoruuidrequest.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\<[operations.DeployByTagOrUuidResponseBody](../../models/operations/deploybytagoruuidresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/health/README.md b/docs/sdks/health/README.md new file mode 100644 index 0000000..0aba4d4 --- /dev/null +++ b/docs/sdks/health/README.md @@ -0,0 +1,85 @@ +# Health +(*health*) + +## Overview + +### Available Operations + +* [check](#check) - Healthcheck + +## check + +Healthcheck endpoint. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.health.check(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { healthCheck } from "coolify/funcs/healthCheck.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await healthCheck(coolify); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +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\<[string](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/privatekeys/README.md b/docs/sdks/privatekeys/README.md new file mode 100644 index 0000000..54f623a --- /dev/null +++ b/docs/sdks/privatekeys/README.md @@ -0,0 +1,417 @@ +# PrivateKeys +(*privateKeys*) + +## Overview + +### Available Operations + +* [list](#list) - List +* [create](#create) - Create +* [update](#update) - Update +* [get](#get) - Get +* [delete](#delete) - Delete + +## list + +List all private keys. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.privateKeys.list(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { privateKeysList } from "coolify/funcs/privateKeysList.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await privateKeysList(coolify); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +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\<[components.PrivateKey[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## create + +Create a new private key. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.privateKeys.create({ + privateKey: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { privateKeysCreate } from "coolify/funcs/privateKeysCreate.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await privateKeysCreate(coolify, { + privateKey: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreatePrivateKeyRequestBody](../../models/operations/createprivatekeyrequestbody.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\<[operations.CreatePrivateKeyResponseBody](../../models/operations/createprivatekeyresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## update + +Update a private key. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.privateKeys.update({ + privateKey: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { privateKeysUpdate } from "coolify/funcs/privateKeysUpdate.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await privateKeysUpdate(coolify, { + privateKey: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdatePrivateKeyRequestBody](../../models/operations/updateprivatekeyrequestbody.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\<[operations.UpdatePrivateKeyResponseBody](../../models/operations/updateprivatekeyresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## get + +Get key by UUID. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.privateKeys.get({ + uuid: "de612435-5d53-45e6-bbe3-7f2c13a14f66", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { privateKeysGet } from "coolify/funcs/privateKeysGet.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await privateKeysGet(coolify, { + uuid: "de612435-5d53-45e6-bbe3-7f2c13a14f66", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetPrivateKeyByUuidRequest](../../models/operations/getprivatekeybyuuidrequest.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\<[components.PrivateKey](../../models/components/privatekey.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.NotFound | 501, 505 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## delete + +Delete a private key. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.privateKeys.delete({ + uuid: "d12ec548-7853-4eb5-ad51-3372962d2e05", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { privateKeysDelete } from "coolify/funcs/privateKeysDelete.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await privateKeysDelete(coolify, { + uuid: "d12ec548-7853-4eb5-ad51-3372962d2e05", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeletePrivateKeyByUuidRequest](../../models/operations/deleteprivatekeybyuuidrequest.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\<[operations.DeletePrivateKeyByUuidResponseBody](../../models/operations/deleteprivatekeybyuuidresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.NotFound | 501, 505 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/projects/README.md b/docs/sdks/projects/README.md new file mode 100644 index 0000000..ce07e00 --- /dev/null +++ b/docs/sdks/projects/README.md @@ -0,0 +1,502 @@ +# Projects +(*projects*) + +## Overview + +Projects + +### Available Operations + +* [list](#list) - List +* [create](#create) - Create +* [get](#get) - Get +* [delete](#delete) - Delete +* [update](#update) - Update +* [getEnvironment](#getenvironment) - Environment + +## list + +List projects. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.projects.list(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { projectsList } from "coolify/funcs/projectsList.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await projectsList(coolify); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +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\<[components.Project[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## create + +Create Project. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.projects.create({}); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { projectsCreate } from "coolify/funcs/projectsCreate.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await projectsCreate(coolify, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateProjectRequestBody](../../models/operations/createprojectrequestbody.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\<[operations.CreateProjectResponseBody](../../models/operations/createprojectresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## get + +Get project by UUID. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.projects.get({ + uuid: "8ee4c350-f599-4db3-ad60-4e858f981b76", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { projectsGet } from "coolify/funcs/projectsGet.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await projectsGet(coolify, { + uuid: "8ee4c350-f599-4db3-ad60-4e858f981b76", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetProjectByUuidRequest](../../models/operations/getprojectbyuuidrequest.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\<[components.Project](../../models/components/project.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.NotFound | 501, 505 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## delete + +Delete project by UUID. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.projects.delete({ + uuid: "9e5be611-8766-4db1-9ad7-f03e9284084f", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { projectsDelete } from "coolify/funcs/projectsDelete.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await projectsDelete(coolify, { + uuid: "9e5be611-8766-4db1-9ad7-f03e9284084f", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteProjectByUuidRequest](../../models/operations/deleteprojectbyuuidrequest.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\<[operations.DeleteProjectByUuidResponseBody](../../models/operations/deleteprojectbyuuidresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## update + +Update Project. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.projects.update({ + uuid: "d493415b-6548-4c8b-8e4a-d0ae131f3835", + requestBody: {}, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { projectsUpdate } from "coolify/funcs/projectsUpdate.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await projectsUpdate(coolify, { + uuid: "d493415b-6548-4c8b-8e4a-d0ae131f3835", + requestBody: {}, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdateProjectByUuidRequest](../../models/operations/updateprojectbyuuidrequest.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\<[operations.UpdateProjectByUuidResponseBody](../../models/operations/updateprojectbyuuidresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getEnvironment + +Get environment by name. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.projects.getEnvironment({ + uuid: "d9b108d3-6f92-44fb-9c22-b9c31c745f88", + environmentName: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { projectsGetEnvironment } from "coolify/funcs/projectsGetEnvironment.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await projectsGetEnvironment(coolify, { + uuid: "d9b108d3-6f92-44fb-9c22-b9c31c745f88", + environmentName: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetEnvironmentByNameRequest](../../models/operations/getenvironmentbynamerequest.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\<[components.Environment](../../models/components/environment.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/resources/README.md b/docs/sdks/resources/README.md new file mode 100644 index 0000000..097b178 --- /dev/null +++ b/docs/sdks/resources/README.md @@ -0,0 +1,87 @@ +# Resources +(*resources*) + +## Overview + +Resources + +### Available Operations + +* [list](#list) - List + +## list + +Get all resources. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.resources.list(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { resourcesList } from "coolify/funcs/resourcesList.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await resourcesList(coolify); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +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\<[string](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 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..052485f --- /dev/null +++ b/docs/sdks/servers/README.md @@ -0,0 +1,686 @@ +# Servers +(*servers*) + +## Overview + +Servers + +### Available Operations + +* [list](#list) - List +* [create](#create) - Create +* [get](#get) - Get +* [delete](#delete) - Delete +* [update](#update) - Update +* [getResources](#getresources) - Resources +* [getDomains](#getdomains) - Domains +* [validate](#validate) - Validate + +## list + +List all servers. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.servers.list(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { serversList } from "coolify/funcs/serversList.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await serversList(coolify); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +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\<[components.Server[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## create + +Create Server. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.servers.create({ + name: "My Server", + description: "My Server Description", + ip: "127.0.0.1", + port: 22, + user: "root", + privateKeyUuid: "og888os", + isBuildServer: false, + instantValidate: false, + proxyType: "traefik", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { serversCreate } from "coolify/funcs/serversCreate.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await serversCreate(coolify, { + name: "My Server", + description: "My Server Description", + ip: "127.0.0.1", + port: 22, + user: "root", + privateKeyUuid: "og888os", + isBuildServer: false, + instantValidate: false, + proxyType: "traefik", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateServerRequestBody](../../models/operations/createserverrequestbody.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\<[operations.CreateServerResponseBody](../../models/operations/createserverresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## get + +Get server by UUID. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.servers.get({ + uuid: "878632ca-cced-4853-8da6-87221abec029", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { serversGet } from "coolify/funcs/serversGet.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await serversGet(coolify, { + uuid: "878632ca-cced-4853-8da6-87221abec029", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetServerByUuidRequest](../../models/operations/getserverbyuuidrequest.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\<[components.Server](../../models/components/server.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## delete + +Delete server by UUID. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.servers.delete({ + uuid: "183d3ea1-6bc7-4679-83e6-ee71ea432238", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { serversDelete } from "coolify/funcs/serversDelete.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await serversDelete(coolify, { + uuid: "183d3ea1-6bc7-4679-83e6-ee71ea432238", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteServerByUuidRequest](../../models/operations/deleteserverbyuuidrequest.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\<[operations.DeleteServerByUuidResponseBody](../../models/operations/deleteserverbyuuidresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## update + +Update Server. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.servers.update({ + uuid: "1c295953-9423-418a-96cd-0fd6e1b41a9e", + requestBody: {}, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { serversUpdate } from "coolify/funcs/serversUpdate.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await serversUpdate(coolify, { + uuid: "1c295953-9423-418a-96cd-0fd6e1b41a9e", + requestBody: {}, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdateServerByUuidRequest](../../models/operations/updateserverbyuuidrequest.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\<[components.Server[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getResources + +Get resources by server. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.servers.getResources({ + uuid: "ce37b3ba-2b08-4d5d-9238-c6a5920c72c9", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { serversGetResources } from "coolify/funcs/serversGetResources.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await serversGetResources(coolify, { + uuid: "ce37b3ba-2b08-4d5d-9238-c6a5920c72c9", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetResourcesByServerUuidRequest](../../models/operations/getresourcesbyserveruuidrequest.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\<[operations.ResponseBody[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getDomains + +Get domains by server. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.servers.getDomains({ + uuid: "03ea70d2-cdac-4a42-b170-cbba7d1cffcf", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { serversGetDomains } from "coolify/funcs/serversGetDomains.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await serversGetDomains(coolify, { + uuid: "03ea70d2-cdac-4a42-b170-cbba7d1cffcf", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetDomainsByServerUuidRequest](../../models/operations/getdomainsbyserveruuidrequest.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\<[operations.GetDomainsByServerUuidResponseBody[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## validate + +Validate server by UUID. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.servers.validate({ + uuid: "ef3bad97-f956-4f33-8e23-85d6e694004d", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { serversValidate } from "coolify/funcs/serversValidate.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await serversValidate(coolify, { + uuid: "ef3bad97-f956-4f33-8e23-85d6e694004d", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ValidateServerByUuidRequest](../../models/operations/validateserverbyuuidrequest.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\<[operations.ValidateServerByUuidResponseBody](../../models/operations/validateserverbyuuidresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/services/README.md b/docs/sdks/services/README.md new file mode 100644 index 0000000..659a0ff --- /dev/null +++ b/docs/sdks/services/README.md @@ -0,0 +1,1028 @@ +# Services +(*services*) + +## Overview + +Services + +### Available Operations + +* [list](#list) - List +* [create](#create) - Create +* [get](#get) - Get +* [delete](#delete) - Delete +* [listEnvs](#listenvs) - List Envs +* [createEnv](#createenv) - Create Env +* [updateEnv](#updateenv) - Update Env +* [updateEnvsBulk](#updateenvsbulk) - Update Envs (Bulk) +* [deleteEnv](#deleteenv) - Delete Env +* [start](#start) - Start +* [stop](#stop) - Stop +* [restart](#restart) - Restart + +## list + +List all services. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.services.list(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { servicesList } from "coolify/funcs/servicesList.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await servicesList(coolify); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +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\<[components.Service[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## create + +Create a one-click service + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.services.create({ + type: "gitea", + projectUuid: "", + environmentName: "", + serverUuid: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { servicesCreate } from "coolify/funcs/servicesCreate.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await servicesCreate(coolify, { + type: "gitea", + projectUuid: "", + environmentName: "", + serverUuid: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateServiceRequestBody](../../models/operations/createservicerequestbody.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\<[operations.CreateServiceResponseBody](../../models/operations/createserviceresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## get + +Get service by UUID. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.services.get({ + uuid: "5639b38b-4535-4e45-a890-384cf735116d", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { servicesGet } from "coolify/funcs/servicesGet.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await servicesGet(coolify, { + uuid: "5639b38b-4535-4e45-a890-384cf735116d", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetServiceByUuidRequest](../../models/operations/getservicebyuuidrequest.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\<[components.Service](../../models/components/service.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## delete + +Delete service by UUID. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.services.delete({ + uuid: "14cb9244-2326-4bec-9c7e-4b61cdd548f5", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { servicesDelete } from "coolify/funcs/servicesDelete.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await servicesDelete(coolify, { + uuid: "14cb9244-2326-4bec-9c7e-4b61cdd548f5", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteServiceByUuidRequest](../../models/operations/deleteservicebyuuidrequest.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\<[operations.DeleteServiceByUuidResponseBody](../../models/operations/deleteservicebyuuidresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## listEnvs + +List all envs by service UUID. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.services.listEnvs({ + uuid: "ef4a6137-8bba-4132-909e-72f1b2d26d47", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { servicesListEnvs } from "coolify/funcs/servicesListEnvs.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await servicesListEnvs(coolify, { + uuid: "ef4a6137-8bba-4132-909e-72f1b2d26d47", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListEnvsByServiceUuidRequest](../../models/operations/listenvsbyserviceuuidrequest.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\<[components.EnvironmentVariable[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## createEnv + +Create env by service UUID. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.services.createEnv({ + uuid: "b793dd27-7b05-40e6-b80c-e49c6dd37147", + requestBody: {}, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { servicesCreateEnv } from "coolify/funcs/servicesCreateEnv.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await servicesCreateEnv(coolify, { + uuid: "b793dd27-7b05-40e6-b80c-e49c6dd37147", + requestBody: {}, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateEnvByServiceUuidRequest](../../models/operations/createenvbyserviceuuidrequest.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\<[operations.CreateEnvByServiceUuidResponseBody](../../models/operations/createenvbyserviceuuidresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## updateEnv + +Update env by service UUID. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.services.updateEnv({ + uuid: "37d5d3ba-c274-48f2-818c-6ab32dbc0de2", + requestBody: { + key: "", + value: "", + }, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { servicesUpdateEnv } from "coolify/funcs/servicesUpdateEnv.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await servicesUpdateEnv(coolify, { + uuid: "37d5d3ba-c274-48f2-818c-6ab32dbc0de2", + requestBody: { + key: "", + value: "", + }, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdateEnvByServiceUuidRequest](../../models/operations/updateenvbyserviceuuidrequest.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\<[operations.UpdateEnvByServiceUuidResponseBody](../../models/operations/updateenvbyserviceuuidresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## updateEnvsBulk + +Update multiple envs by service UUID. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.services.updateEnvsBulk({ + uuid: "b88c7e0b-d8f9-4138-bf33-e97852e42e37", + requestBody: { + data: [ + {}, + ], + }, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { servicesUpdateEnvsBulk } from "coolify/funcs/servicesUpdateEnvsBulk.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await servicesUpdateEnvsBulk(coolify, { + uuid: "b88c7e0b-d8f9-4138-bf33-e97852e42e37", + requestBody: { + data: [ + {}, + ], + }, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdateEnvsByServiceUuidRequest](../../models/operations/updateenvsbyserviceuuidrequest.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\<[operations.UpdateEnvsByServiceUuidResponseBody](../../models/operations/updateenvsbyserviceuuidresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## deleteEnv + +Delete env by UUID. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.services.deleteEnv({ + uuid: "6b5e4a6b-40ac-4774-b639-b27d9c59c9a2", + envUuid: "b300b74f-72ea-4848-85d3-4b61a952165c", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { servicesDeleteEnv } from "coolify/funcs/servicesDeleteEnv.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await servicesDeleteEnv(coolify, { + uuid: "6b5e4a6b-40ac-4774-b639-b27d9c59c9a2", + envUuid: "b300b74f-72ea-4848-85d3-4b61a952165c", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteEnvByServiceUuidRequest](../../models/operations/deleteenvbyserviceuuidrequest.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\<[operations.DeleteEnvByServiceUuidResponseBody](../../models/operations/deleteenvbyserviceuuidresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## start + +Start service. `Post` request is also accepted. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.services.start({ + uuid: "230d98c7-fc68-4357-9260-dd6c6394ea60", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { servicesStart } from "coolify/funcs/servicesStart.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await servicesStart(coolify, { + uuid: "230d98c7-fc68-4357-9260-dd6c6394ea60", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.StartServiceByUuidRequest](../../models/operations/startservicebyuuidrequest.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\<[operations.StartServiceByUuidResponseBody](../../models/operations/startservicebyuuidresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## stop + +Stop service. `Post` request is also accepted. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.services.stop({ + uuid: "578100c6-9564-4ccb-94f7-ce1dfb7b5d65", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { servicesStop } from "coolify/funcs/servicesStop.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await servicesStop(coolify, { + uuid: "578100c6-9564-4ccb-94f7-ce1dfb7b5d65", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.StopServiceByUuidRequest](../../models/operations/stopservicebyuuidrequest.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\<[operations.StopServiceByUuidResponseBody](../../models/operations/stopservicebyuuidresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## restart + +Restart service. `Post` request is also accepted. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.services.restart({ + uuid: "c5048915-c301-46b1-9a79-4a3ae47609b2", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { servicesRestart } from "coolify/funcs/servicesRestart.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await servicesRestart(coolify, { + uuid: "c5048915-c301-46b1-9a79-4a3ae47609b2", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.RestartServiceByUuidRequest](../../models/operations/restartservicebyuuidrequest.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\<[operations.RestartServiceByUuidResponseBody](../../models/operations/restartservicebyuuidresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/teams/README.md b/docs/sdks/teams/README.md new file mode 100644 index 0000000..6eb4f31 --- /dev/null +++ b/docs/sdks/teams/README.md @@ -0,0 +1,409 @@ +# Teams +(*teams*) + +## Overview + +Teams + +### Available Operations + +* [list](#list) - List +* [get](#get) - Get +* [getMembers](#getmembers) - Members +* [getCurrent](#getcurrent) - Authenticated Team +* [getCurrentMembers](#getcurrentmembers) - Authenticated Team Members + +## list + +Get all teams. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.teams.list(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { teamsList } from "coolify/funcs/teamsList.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await teamsList(coolify); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +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\<[components.Team[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## get + +Get team by TeamId. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.teams.get({ + id: 393445, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { teamsGet } from "coolify/funcs/teamsGet.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await teamsGet(coolify, { + id: 393445, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetTeamByIdRequest](../../models/operations/getteambyidrequest.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\<[components.Team](../../models/components/team.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getMembers + +Get members by TeamId. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.teams.getMembers({ + id: 272299, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { teamsGetMembers } from "coolify/funcs/teamsGetMembers.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await teamsGetMembers(coolify, { + id: 272299, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetMembersByTeamIdRequest](../../models/operations/getmembersbyteamidrequest.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\<[components.User[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getCurrent + +Get currently authenticated team. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.teams.getCurrent(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { teamsGetCurrent } from "coolify/funcs/teamsGetCurrent.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await teamsGetCurrent(coolify); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +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\<[components.Team](../../models/components/team.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getCurrentMembers + +Get currently authenticated team members. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.teams.getCurrentMembers(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { teamsGetCurrentMembers } from "coolify/funcs/teamsGetCurrentMembers.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await teamsGetCurrentMembers(coolify); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +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\<[components.User[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/version/README.md b/docs/sdks/version/README.md new file mode 100644 index 0000000..3a94acb --- /dev/null +++ b/docs/sdks/version/README.md @@ -0,0 +1,85 @@ +# Version +(*version*) + +## Overview + +### Available Operations + +* [get](#get) - Version + +## get + +Get Coolify version. + +### Example Usage + +```typescript +import { Coolify } from "coolify"; + +const coolify = new Coolify({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await coolify.version.get(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CoolifyCore } from "coolify/core.js"; +import { versionGet } from "coolify/funcs/versionGet.js"; + +// Use `CoolifyCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const coolify = new CoolifyCore({ + bearerAuth: process.env["COOLIFY_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await versionGet(coolify); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +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\<[string](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | +| errors.Unauthenticated | 401, 403, 407, 511 | application/json | +| errors.NotFound | 404, 501, 505 | application/json | +| errors.Timeout | 408, 504 | application/json | +| errors.RateLimited | 429 | application/json | +| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/jsr.json b/jsr.json new file mode 100644 index 0000000..41c8dd1 --- /dev/null +++ b/jsr.json @@ -0,0 +1,27 @@ + + +{ + "name": "coolify", + "version": "0.1.1", + "exports": { + ".": "./src/index.ts", + "./models/errors": "./src/models/errors/index.ts", + "./models/components": "./src/models/components/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..8c91cfb --- /dev/null +++ b/package-lock.json @@ -0,0 +1,3350 @@ +{ + "name": "coolify", + "version": "0.1.1", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "coolify", + "version": "0.1.1", + "devDependencies": { + "@typescript-eslint/eslint-plugin": "^7.7.1", + "@typescript-eslint/parser": "^7.7.1", + "eslint": "^8.57.0", + "eslint-import-resolver-typescript": "^3.6.1", + "eslint-plugin-import": "^2.29.1", + "typescript": "^5.4.5", + "zod": "^3.23.4" + }, + "peerDependencies": { + "zod": ">= 3" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", + "integrity": "sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==", + "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/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/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.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": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/eslintrc/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/@eslint/js": { + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", + "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", + "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", + "deprecated": "Use @eslint/config-array instead", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.3", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@humanwhocodes/config-array/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/@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/object-schema": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "deprecated": "Use @eslint/object-schema instead", + "dev": true, + "license": "BSD-3-Clause" + }, + "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/@nolyfill/is-core-module": { + "version": "1.0.39", + "resolved": "https://registry.npmjs.org/@nolyfill/is-core-module/-/is-core-module-1.0.39.tgz", + "integrity": "sha512-nn5ozdjYQpUCZlWGuxcJY/KpxkWQs4DcbMCmKojjyrYDEAGy4Ce19NN4v5MduafTwJlbKc99UA8YhSVqq9yPZA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.4.0" + } + }, + "node_modules/@rtsao/scc": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz", + "integrity": "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.18.0.tgz", + "integrity": "sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/type-utils": "7.18.0", + "@typescript-eslint/utils": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", + "graphemer": "^1.4.0", + "ignore": "^5.3.1", + "natural-compare": "^1.4.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^7.0.0", + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.18.0.tgz", + "integrity": "sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/typescript-estree": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz", + "integrity": "sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.18.0.tgz", + "integrity": "sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/typescript-estree": "7.18.0", + "@typescript-eslint/utils": "7.18.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.18.0.tgz", + "integrity": "sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz", + "integrity": "sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.18.0.tgz", + "integrity": "sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/typescript-estree": "7.18.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz", + "integrity": "sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "7.18.0", + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/acorn": { + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", + "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": "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/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/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/array-buffer-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", + "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-includes": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz", + "integrity": "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.4", + "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/array.prototype.findlastindex": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz", + "integrity": "sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flat": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", + "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flatmap": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz", + "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", + "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.2.1", + "get-intrinsic": "^1.2.3", + "is-array-buffer": "^3.0.4", + "is-shared-array-buffer": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "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/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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/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/data-view-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", + "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", + "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", + "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "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/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/enhanced-resolve": { + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", + "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/es-abstract": { + "version": "1.23.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.5.tgz", + "integrity": "sha512-vlmniQ0WNPwXqA0BnmwV3Ng7HxiGlh6r5U6JcTMNx8OilcAGqVJBHJcPjqOMaczU9fRuRK5Px2BdVyPRnKMMVQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "arraybuffer.prototype.slice": "^1.0.3", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "data-view-buffer": "^1.0.1", + "data-view-byte-length": "^1.0.1", + "data-view-byte-offset": "^1.0.0", + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-set-tostringtag": "^2.0.3", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.4", + "get-symbol-description": "^1.0.2", + "globalthis": "^1.0.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", + "has-symbols": "^1.0.3", + "hasown": "^2.0.2", + "internal-slot": "^1.0.7", + "is-array-buffer": "^3.0.4", + "is-callable": "^1.2.7", + "is-data-view": "^1.0.1", + "is-negative-zero": "^2.0.3", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.3", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.13", + "is-weakref": "^1.0.2", + "object-inspect": "^1.13.3", + "object-keys": "^1.1.1", + "object.assign": "^4.1.5", + "regexp.prototype.flags": "^1.5.3", + "safe-array-concat": "^1.1.2", + "safe-regex-test": "^1.0.3", + "string.prototype.trim": "^1.2.9", + "string.prototype.trimend": "^1.0.8", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.2", + "typed-array-byte-length": "^1.0.1", + "typed-array-byte-offset": "^1.0.2", + "typed-array-length": "^1.0.6", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.15" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", + "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.2.4", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-shim-unscopables": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", + "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.0" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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": "8.57.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", + "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", + "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.1", + "@humanwhocodes/config-array": "^0.13.0", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-import-resolver-node": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", + "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^3.2.7", + "is-core-module": "^2.13.0", + "resolve": "^1.22.4" + } + }, + "node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-import-resolver-typescript": { + "version": "3.6.3", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.3.tgz", + "integrity": "sha512-ud9aw4szY9cCT1EWWdGv1L1XR6hh2PaRWif0j2QjQ0pgTY/69iw+W0Z4qZv5wHahOl8isEr+k/JnyAqNQkLkIA==", + "dev": true, + "license": "ISC", + "dependencies": { + "@nolyfill/is-core-module": "1.0.39", + "debug": "^4.3.5", + "enhanced-resolve": "^5.15.0", + "eslint-module-utils": "^2.8.1", + "fast-glob": "^3.3.2", + "get-tsconfig": "^4.7.5", + "is-bun-module": "^1.0.2", + "is-glob": "^4.0.3" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts/projects/eslint-import-resolver-ts" + }, + "peerDependencies": { + "eslint": "*", + "eslint-plugin-import": "*", + "eslint-plugin-import-x": "*" + }, + "peerDependenciesMeta": { + "eslint-plugin-import": { + "optional": true + }, + "eslint-plugin-import-x": { + "optional": true + } + } + }, + "node_modules/eslint-module-utils": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.0.tgz", + "integrity": "sha512-wALZ0HFoytlyh/1+4wuZ9FJCD/leWHQzzrxJ8+rebyReSLk7LApMyd3WJaLVoN+D5+WIdJyDK1c6JnE65V4Zyg==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^3.2.7" + }, + "engines": { + "node": ">=4" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/eslint-module-utils/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import": { + "version": "2.31.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.31.0.tgz", + "integrity": "sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rtsao/scc": "^1.1.0", + "array-includes": "^3.1.8", + "array.prototype.findlastindex": "^1.2.5", + "array.prototype.flat": "^1.3.2", + "array.prototype.flatmap": "^1.3.2", + "debug": "^3.2.7", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.9", + "eslint-module-utils": "^2.12.0", + "hasown": "^2.0.2", + "is-core-module": "^2.15.1", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.fromentries": "^2.0.8", + "object.groupby": "^1.0.3", + "object.values": "^1.2.0", + "semver": "^6.3.1", + "string.prototype.trimend": "^1.0.8", + "tsconfig-paths": "^3.15.0" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9" + } + }, + "node_modules/eslint-plugin-import/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import/node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-plugin-import/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/eslint-plugin-import/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "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/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint/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/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.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.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "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.4" + }, + "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.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.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": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.2.tgz", + "integrity": "sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==", + "dev": true, + "license": "ISC" + }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-callable": "^1.1.3" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/function.prototype.name": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-symbol-description": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", + "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-tsconfig": { + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.8.1.tgz", + "integrity": "sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "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": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/glob/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/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globalthis": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-properties": "^1.2.1", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "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-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "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.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "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/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/internal-slot": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", + "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "hasown": "^2.0.0", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-array-buffer": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", + "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-bun-module": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-bun-module/-/is-bun-module-1.2.1.tgz", + "integrity": "sha512-AmidtEM6D6NmUiLOvvU7+IePxjEjOzra2h0pSrsfSAcXwl/83zLLXDByafUJy9k/rKK0pvXMLdwKwGHlX2Ke6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.6.3" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-core-module": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", + "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-view": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", + "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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-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-negative-zero": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", + "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "which-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true, + "license": "MIT" + }, + "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/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/json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "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/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": "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/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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/object-inspect": { + "version": "1.13.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.3.tgz", + "integrity": "sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.fromentries": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", + "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.groupby": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz", + "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.values": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz", + "integrity": "sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "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/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-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "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-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "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/possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "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/regexp.prototype.flags": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.3.tgz", + "integrity": "sha512-vqlC04+RQoFalODCbCumG2xIOvapzVMHwsyIGM/SIE8fRhFFsXeH8/QQ+s0T0kDAhKc4k30s73/0ydkHQz6HlQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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-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/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "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/safe-array-concat": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", + "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-regex-test": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", + "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-regex": "^1.1.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-function-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "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/side-channel": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/string.prototype.trim": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", + "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", + "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "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/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true, + "license": "MIT" + }, + "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": "1.4.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.0.tgz", + "integrity": "sha512-032cPxaEKwM+GT3vA5JXNzIaizx388rhsSW79vGRNGXfRRAdEAn2mvk36PvK5HnOchyWZ7afLEXqYCvPCrzuzQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, + "node_modules/tsconfig-paths": { + "version": "3.15.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", + "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + } + }, + "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/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typed-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", + "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", + "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", + "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", + "dev": true, + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", + "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typescript": { + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", + "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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/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/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", + "dev": true, + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, + "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.23.8", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.23.8.tgz", + "integrity": "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..37510ca --- /dev/null +++ b/package.json @@ -0,0 +1,27 @@ +{ + "name": "coolify", + "version": "0.1.1", + "author": "Speakeasy", + "main": "./index.js", + "sideEffects": false, + "scripts": { + "lint": "eslint --max-warnings=0 src", + "build": "tsc", + "prepublishOnly": "npm run build" + }, + "peerDependencies": { + "zod": ">= 3" + }, + "devDependencies": { + "@typescript-eslint/eslint-plugin": "^7.7.1", + "@typescript-eslint/parser": "^7.7.1", + "eslint": "^8.57.0", + "eslint-import-resolver-typescript": "^3.6.1", + "eslint-plugin-import": "^2.29.1", + "typescript": "^5.4.5", + "zod": "^3.23.4" + }, + "dependencies": { + + } +} diff --git a/speakeasy-suggested-error-overlay.yaml b/speakeasy-suggested-error-overlay.yaml new file mode 100644 index 0000000..e59b9e5 --- /dev/null +++ b/speakeasy-suggested-error-overlay.yaml @@ -0,0 +1,4011 @@ +overlay: 1.0.0 +info: + title: Response Codes Overlay + version: 0.0.0 +actions: + - target: $["paths"]["/databases/postgresql"]["post"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '404': + $ref: '#/components/responses/NotFound' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + create-database-postgresql: + catch(SDKError) { ... } + after: |- + create-database-postgresql: + catch(Unauthorized) { ... } + - target: $["paths"]["/enable"]["get"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '404': + $ref: '#/components/responses/NotFound' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + enable-api: + catch(SDKError) { ... } + after: |- + enable-api: + catch(Unauthorized) { ... } + - target: $["paths"]["/projects/{uuid}"]["patch"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + update-project-by-uuid: + catch(SDKError) { ... } + after: |- + update-project-by-uuid: + catch(Unauthorized) { ... } + - target: $["paths"]["/applications/{uuid}/envs/bulk"]["patch"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + update-envs-by-application-uuid: + catch(SDKError) { ... } + after: |- + update-envs-by-application-uuid: + catch(Unauthorized) { ... } + - target: $["paths"]["/applications/{uuid}/start"]["get"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + start-application-by-uuid: + catch(SDKError) { ... } + after: |- + start-application-by-uuid: + catch(Unauthorized) { ... } + - target: $["paths"]["/applications/{uuid}/restart"]["get"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + restart-application-by-uuid: + catch(SDKError) { ... } + after: |- + restart-application-by-uuid: + catch(Unauthorized) { ... } + - target: $["paths"]["/databases/{uuid}"]["get"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + get-database-by-uuid: + catch(SDKError) { ... } + after: |- + get-database-by-uuid: + catch(Unauthorized) { ... } + - target: $["paths"]["/databases/{uuid}"]["delete"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + delete-database-by-uuid: + catch(SDKError) { ... } + after: |- + delete-database-by-uuid: + catch(Unauthorized) { ... } + - target: $["paths"]["/projects/{uuid}/{environment_name}"]["get"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + get-environment-by-name: + catch(SDKError) { ... } + after: |- + get-environment-by-name: + catch(Unauthorized) { ... } + - target: $["paths"]["/services"]["post"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '404': + $ref: '#/components/responses/NotFound' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + create-service: + catch(SDKError) { ... } + after: |- + create-service: + catch(Unauthorized) { ... } + - target: $["paths"]["/services/{uuid}/envs/{env_uuid}"]["delete"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + delete-env-by-service-uuid: + catch(SDKError) { ... } + after: |- + delete-env-by-service-uuid: + catch(Unauthorized) { ... } + - target: $["paths"]["/applications/dockercompose"]["post"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '404': + $ref: '#/components/responses/NotFound' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + create-dockercompose-application: + catch(SDKError) { ... } + after: |- + create-dockercompose-application: + catch(Unauthorized) { ... } + - target: $["paths"]["/applications/{uuid}/envs"]["post"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + create-env-by-application-uuid: + catch(SDKError) { ... } + after: |- + create-env-by-application-uuid: + catch(Unauthorized) { ... } + - target: $["paths"]["/security/keys"]["patch"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '404': + $ref: '#/components/responses/NotFound' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + update-private-key: + catch(SDKError) { ... } + after: |- + update-private-key: + catch(Unauthorized) { ... } + - target: $["paths"]["/services/{uuid}/envs"]["patch"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + update-env-by-service-uuid: + catch(SDKError) { ... } + after: |- + update-env-by-service-uuid: + catch(Unauthorized) { ... } + - target: $["paths"]["/teams/current"]["get"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '404': + $ref: '#/components/responses/NotFound' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + get-current-team: + catch(SDKError) { ... } + after: |- + get-current-team: + catch(Unauthorized) { ... } + - target: $["paths"]["/deploy"]["get"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '404': + $ref: '#/components/responses/NotFound' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + deploy-by-tag-or-uuid: + catch(SDKError) { ... } + after: |- + deploy-by-tag-or-uuid: + catch(Unauthorized) { ... } + - target: $["paths"]["/security/keys"]["post"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '404': + $ref: '#/components/responses/NotFound' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + create-private-key: + catch(SDKError) { ... } + after: |- + create-private-key: + catch(Unauthorized) { ... } + - target: $["paths"]["/projects/{uuid}"]["delete"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + delete-project-by-uuid: + catch(SDKError) { ... } + after: |- + delete-project-by-uuid: + catch(Unauthorized) { ... } + - target: $["paths"]["/servers/{uuid}/resources"]["get"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '404': + $ref: '#/components/responses/NotFound' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + get-resources-by-server-uuid: + catch(SDKError) { ... } + after: |- + get-resources-by-server-uuid: + catch(Unauthorized) { ... } + - target: $["paths"]["/version"]["get"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '404': + $ref: '#/components/responses/NotFound' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + version: + catch(SDKError) { ... } + after: |- + version: + catch(Unauthorized) { ... } + - target: $["paths"]["/projects"]["get"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '404': + $ref: '#/components/responses/NotFound' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + list-projects: + catch(SDKError) { ... } + after: |- + list-projects: + catch(Unauthorized) { ... } + - target: $["paths"]["/databases/{uuid}"]["patch"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + update-database-by-uuid: + catch(SDKError) { ... } + after: |- + update-database-by-uuid: + catch(Unauthorized) { ... } + - target: $["paths"]["/databases/mysql"]["post"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '404': + $ref: '#/components/responses/NotFound' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + create-database-mysql: + catch(SDKError) { ... } + after: |- + create-database-mysql: + catch(Unauthorized) { ... } + - target: $["paths"]["/servers/{uuid}/validate"]["get"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + validate-server-by-uuid: + catch(SDKError) { ... } + after: |- + validate-server-by-uuid: + catch(Unauthorized) { ... } + - target: $["paths"]["/applications/dockerimage"]["post"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '404': + $ref: '#/components/responses/NotFound' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + create-dockerimage-application: + catch(SDKError) { ... } + after: |- + create-dockerimage-application: + catch(Unauthorized) { ... } + - target: $["paths"]["/applications/{uuid}/envs/{env_uuid}"]["delete"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + delete-env-by-application-uuid: + catch(SDKError) { ... } + after: |- + delete-env-by-application-uuid: + catch(Unauthorized) { ... } + - target: $["paths"]["/services"]["get"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '404': + $ref: '#/components/responses/NotFound' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + list-services: + catch(SDKError) { ... } + after: |- + list-services: + catch(Unauthorized) { ... } + - target: $["paths"]["/teams/current/members"]["get"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '404': + $ref: '#/components/responses/NotFound' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + get-current-team-members: + catch(SDKError) { ... } + after: |- + get-current-team-members: + catch(Unauthorized) { ... } + - target: $["paths"]["/applications/{uuid}/envs"]["patch"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + update-env-by-application-uuid: + catch(SDKError) { ... } + after: |- + update-env-by-application-uuid: + catch(Unauthorized) { ... } + - target: $["paths"]["/applications/{uuid}/stop"]["get"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + stop-application-by-uuid: + catch(SDKError) { ... } + after: |- + stop-application-by-uuid: + catch(Unauthorized) { ... } + - target: $["paths"]["/servers/{uuid}/domains"]["get"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '404': + $ref: '#/components/responses/NotFound' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + get-domains-by-server-uuid: + catch(SDKError) { ... } + after: |- + get-domains-by-server-uuid: + catch(Unauthorized) { ... } + - target: $["paths"]["/applications/private-github-app"]["post"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '404': + $ref: '#/components/responses/NotFound' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + create-private-github-app-application: + catch(SDKError) { ... } + after: |- + create-private-github-app-application: + catch(Unauthorized) { ... } + - target: $["paths"]["/databases/{uuid}/start"]["get"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + start-database-by-uuid: + catch(SDKError) { ... } + after: |- + start-database-by-uuid: + catch(Unauthorized) { ... } + - target: $["paths"]["/databases/clickhouse"]["post"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '404': + $ref: '#/components/responses/NotFound' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + create-database-clickhouse: + catch(SDKError) { ... } + after: |- + create-database-clickhouse: + catch(Unauthorized) { ... } + - target: $["paths"]["/projects/{uuid}"]["get"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + get-project-by-uuid: + catch(SDKError) { ... } + after: |- + get-project-by-uuid: + catch(Unauthorized) { ... } + - target: $["paths"]["/security/keys"]["get"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '404': + $ref: '#/components/responses/NotFound' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + list-private-keys: + catch(SDKError) { ... } + after: |- + list-private-keys: + catch(Unauthorized) { ... } + - target: $["paths"]["/applications"]["get"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '404': + $ref: '#/components/responses/NotFound' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + list-applications: + catch(SDKError) { ... } + after: |- + list-applications: + catch(Unauthorized) { ... } + - target: $["paths"]["/applications/dockerfile"]["post"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '404': + $ref: '#/components/responses/NotFound' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + create-dockerfile-application: + catch(SDKError) { ... } + after: |- + create-dockerfile-application: + catch(Unauthorized) { ... } + - target: $["paths"]["/servers"]["get"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '404': + $ref: '#/components/responses/NotFound' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + list-servers: + catch(SDKError) { ... } + after: |- + list-servers: + catch(Unauthorized) { ... } + - target: $["paths"]["/servers/{uuid}"]["get"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + get-server-by-uuid: + catch(SDKError) { ... } + after: |- + get-server-by-uuid: + catch(Unauthorized) { ... } + - target: $["paths"]["/services/{uuid}/envs"]["get"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + list-envs-by-service-uuid: + catch(SDKError) { ... } + after: |- + list-envs-by-service-uuid: + catch(Unauthorized) { ... } + - target: $["paths"]["/services/{uuid}/start"]["get"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + start-service-by-uuid: + catch(SDKError) { ... } + after: |- + start-service-by-uuid: + catch(Unauthorized) { ... } + - target: $["paths"]["/applications/{uuid}/execute"]["post"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + execute-command-application: + catch(SDKError) { ... } + after: |- + execute-command-application: + catch(Unauthorized) { ... } + - target: $["paths"]["/databases/keydb"]["post"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '404': + $ref: '#/components/responses/NotFound' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + create-database-keydb: + catch(SDKError) { ... } + after: |- + create-database-keydb: + catch(Unauthorized) { ... } + - target: $["paths"]["/applications/{uuid}/envs"]["get"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + list-envs-by-application-uuid: + catch(SDKError) { ... } + after: |- + list-envs-by-application-uuid: + catch(Unauthorized) { ... } + - target: $["paths"]["/databases"]["get"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '404': + $ref: '#/components/responses/NotFound' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + list-databases: + catch(SDKError) { ... } + after: |- + list-databases: + catch(Unauthorized) { ... } + - target: $["paths"]["/databases/mongodb"]["post"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '404': + $ref: '#/components/responses/NotFound' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + create-database-mongodb: + catch(SDKError) { ... } + after: |- + create-database-mongodb: + catch(Unauthorized) { ... } + - target: $["paths"]["/databases/{uuid}/stop"]["get"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + stop-database-by-uuid: + catch(SDKError) { ... } + after: |- + stop-database-by-uuid: + catch(Unauthorized) { ... } + - target: $["paths"]["/health"]["get"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '404': + $ref: '#/components/responses/NotFound' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + healthcheck: + catch(SDKError) { ... } + after: |- + healthcheck: + catch(Unauthorized) { ... } + - target: $["paths"]["/security/keys/{uuid}"]["delete"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + delete-private-key-by-uuid: + catch(SDKError) { ... } + after: |- + delete-private-key-by-uuid: + catch(Unauthorized) { ... } + - target: $["paths"]["/applications/private-deploy-key"]["post"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '404': + $ref: '#/components/responses/NotFound' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + create-private-deploy-key-application: + catch(SDKError) { ... } + after: |- + create-private-deploy-key-application: + catch(Unauthorized) { ... } + - target: $["paths"]["/applications/{uuid}"]["get"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + get-application-by-uuid: + catch(SDKError) { ... } + after: |- + get-application-by-uuid: + catch(Unauthorized) { ... } + - target: $["paths"]["/services/{uuid}"]["get"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + get-service-by-uuid: + catch(SDKError) { ... } + after: |- + get-service-by-uuid: + catch(Unauthorized) { ... } + - target: $["paths"]["/services/{uuid}/restart"]["get"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + restart-service-by-uuid: + catch(SDKError) { ... } + after: |- + restart-service-by-uuid: + catch(Unauthorized) { ... } + - target: $["paths"]["/disable"]["get"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '404': + $ref: '#/components/responses/NotFound' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + disable-api: + catch(SDKError) { ... } + after: |- + disable-api: + catch(Unauthorized) { ... } + - target: $["paths"]["/security/keys/{uuid}"]["get"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + get-private-key-by-uuid: + catch(SDKError) { ... } + after: |- + get-private-key-by-uuid: + catch(Unauthorized) { ... } + - target: $["paths"]["/services/{uuid}/envs"]["post"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + create-env-by-service-uuid: + catch(SDKError) { ... } + after: |- + create-env-by-service-uuid: + catch(Unauthorized) { ... } + - target: $["paths"]["/teams/{id}"]["get"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + get-team-by-id: + catch(SDKError) { ... } + after: |- + get-team-by-id: + catch(Unauthorized) { ... } + - target: $["paths"]["/applications/{uuid}"]["delete"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + delete-application-by-uuid: + catch(SDKError) { ... } + after: |- + delete-application-by-uuid: + catch(Unauthorized) { ... } + - target: $["paths"]["/databases/{uuid}/restart"]["get"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + restart-database-by-uuid: + catch(SDKError) { ... } + after: |- + restart-database-by-uuid: + catch(Unauthorized) { ... } + - target: $["paths"]["/services/{uuid}/envs/bulk"]["patch"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + update-envs-by-service-uuid: + catch(SDKError) { ... } + after: |- + update-envs-by-service-uuid: + catch(Unauthorized) { ... } + - target: $["paths"]["/databases/mariadb"]["post"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '404': + $ref: '#/components/responses/NotFound' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + create-database-mariadb: + catch(SDKError) { ... } + after: |- + create-database-mariadb: + catch(Unauthorized) { ... } + - target: $["paths"]["/servers/{uuid}"]["patch"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + update-server-by-uuid: + catch(SDKError) { ... } + after: |- + update-server-by-uuid: + catch(Unauthorized) { ... } + - target: $["paths"]["/resources"]["get"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '404': + $ref: '#/components/responses/NotFound' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + list-resources: + catch(SDKError) { ... } + after: |- + list-resources: + catch(Unauthorized) { ... } + - target: $["paths"]["/servers"]["post"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + create-server: + catch(SDKError) { ... } + after: |- + create-server: + catch(Unauthorized) { ... } + - target: $["paths"]["/servers/{uuid}"]["delete"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + delete-server-by-uuid: + catch(SDKError) { ... } + after: |- + delete-server-by-uuid: + catch(Unauthorized) { ... } + - target: $["paths"]["/teams"]["get"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '404': + $ref: '#/components/responses/NotFound' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + list-teams: + catch(SDKError) { ... } + after: |- + list-teams: + catch(Unauthorized) { ... } + - target: $["paths"]["/teams/{id}/members"]["get"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + get-members-by-team-id: + catch(SDKError) { ... } + after: |- + get-members-by-team-id: + catch(Unauthorized) { ... } + - target: $["paths"]["/applications/{uuid}"]["patch"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + update-application-by-uuid: + catch(SDKError) { ... } + after: |- + update-application-by-uuid: + catch(Unauthorized) { ... } + - target: $["paths"]["/databases/dragonfly"]["post"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '404': + $ref: '#/components/responses/NotFound' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + create-database-dragonfly: + catch(SDKError) { ... } + after: |- + create-database-dragonfly: + catch(Unauthorized) { ... } + - target: $["paths"]["/deployments"]["get"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '404': + $ref: '#/components/responses/NotFound' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + list-deployments: + catch(SDKError) { ... } + after: |- + list-deployments: + catch(Unauthorized) { ... } + - target: $["paths"]["/deployments/{uuid}"]["get"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + get-deployment-by-uuid: + catch(SDKError) { ... } + after: |- + get-deployment-by-uuid: + catch(Unauthorized) { ... } + - target: $["paths"]["/projects"]["post"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + create-project: + catch(SDKError) { ... } + after: |- + create-project: + catch(Unauthorized) { ... } + - target: $["paths"]["/services/{uuid}"]["delete"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + delete-service-by-uuid: + catch(SDKError) { ... } + after: |- + delete-service-by-uuid: + catch(Unauthorized) { ... } + - target: $["paths"]["/applications/public"]["post"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '404': + $ref: '#/components/responses/NotFound' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + create-public-application: + catch(SDKError) { ... } + after: |- + create-public-application: + catch(Unauthorized) { ... } + - target: $["paths"]["/databases/redis"]["post"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '404': + $ref: '#/components/responses/NotFound' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + create-database-redis: + catch(SDKError) { ... } + after: |- + create-database-redis: + catch(Unauthorized) { ... } + - target: $["paths"]["/services/{uuid}/stop"]["get"]["responses"] + update: + '413': + $ref: '#/components/responses/BadRequest' + '414': + $ref: '#/components/responses/BadRequest' + '415': + $ref: '#/components/responses/BadRequest' + '422': + $ref: '#/components/responses/BadRequest' + '431': + $ref: '#/components/responses/BadRequest' + '510': + $ref: '#/components/responses/BadRequest' + '403': + $ref: '#/components/responses/Unauthenticated' + '407': + $ref: '#/components/responses/Unauthenticated' + '511': + $ref: '#/components/responses/Unauthenticated' + '501': + $ref: '#/components/responses/NotFound' + '505': + $ref: '#/components/responses/NotFound' + '429': + $ref: '#/components/responses/RateLimited' + '500': + $ref: '#/components/responses/InternalServerError' + '502': + $ref: '#/components/responses/InternalServerError' + '503': + $ref: '#/components/responses/InternalServerError' + '506': + $ref: '#/components/responses/InternalServerError' + '507': + $ref: '#/components/responses/InternalServerError' + '508': + $ref: '#/components/responses/InternalServerError' + '408': + $ref: '#/components/responses/Timeout' + '504': + $ref: '#/components/responses/Timeout' + x-speakeasy-metadata: + type: error-names + before: |- + stop-service-by-uuid: + catch(SDKError) { ... } + after: |- + stop-service-by-uuid: + catch(Unauthorized) { ... } + - target: $.components.schemas + update: + RateLimited: + type: object + properties: + message: + type: string + additionalProperties: true + InternalServerError: + type: object + properties: + message: + type: string + additionalProperties: true + Timeout: + type: object + properties: + message: + type: string + additionalProperties: true + - target: $.components.responses + update: + RateLimited: + description: Status codes relating to the client being rate limited by the server + content: + application/json: + schema: + $ref: '#/components/schemas/RateLimited' + InternalServerError: + description: A collection of status codes that generally mean the server failed in an unexpected way + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerError' + Timeout: + description: Timeouts occurred with the request + content: + application/json: + schema: + $ref: '#/components/schemas/Timeout' diff --git a/speakeasy-suggested-name-overlay.yaml b/speakeasy-suggested-name-overlay.yaml new file mode 100644 index 0000000..ca81890 --- /dev/null +++ b/speakeasy-suggested-name-overlay.yaml @@ -0,0 +1,560 @@ +overlay: 1.0.0 +info: + title: Speakeasy Suggestions - Coolify + version: 0.0.1 +actions: + - target: $["paths"]["/servers/{uuid}"]["delete"] + update: + x-speakeasy-name-override: delete + x-speakeasy-metadata: + after: sdk.servers.delete() + before: sdk.Servers.delete-server-by-uuid() + type: method-name + - target: $["paths"]["/disable"]["get"] + update: + x-speakeasy-group: api + x-speakeasy-name-override: disable + x-speakeasy-metadata: + after: sdk.api.disable() + before: sdk..disable-api() + type: method-name + - target: $["paths"]["/servers"]["post"] + update: + x-speakeasy-name-override: create + x-speakeasy-metadata: + after: sdk.servers.create() + before: sdk.Servers.create-server() + type: method-name + - target: $["paths"]["/teams"]["get"] + update: + x-speakeasy-name-override: list + x-speakeasy-metadata: + after: sdk.teams.list() + before: sdk.Teams.list-teams() + type: method-name + - target: $["paths"]["/security/keys/{uuid}"]["delete"] + update: + x-speakeasy-group: privateKeys + x-speakeasy-name-override: delete + x-speakeasy-metadata: + after: sdk.privateKeys.delete() + before: sdk.Private Keys.delete-private-key-by-uuid() + type: method-name + - target: $["paths"]["/databases"]["get"] + update: + x-speakeasy-name-override: list + x-speakeasy-metadata: + after: sdk.databases.list() + before: sdk.Databases.list-databases() + type: method-name + - target: $["paths"]["/teams/{id}"]["get"] + update: + x-speakeasy-name-override: get + x-speakeasy-metadata: + after: sdk.teams.get() + before: sdk.Teams.get-team-by-id() + type: method-name + - target: $["paths"]["/databases/mariadb"]["post"] + update: + x-speakeasy-name-override: createMariadb + x-speakeasy-metadata: + after: sdk.databases.createMariadb() + before: sdk.Databases.create-database-mariadb() + type: method-name + - target: $["paths"]["/servers/{uuid}/domains"]["get"] + update: + x-speakeasy-name-override: getDomains + x-speakeasy-metadata: + after: sdk.servers.getDomains() + before: sdk.Servers.get-domains-by-server-uuid() + type: method-name + - target: $["paths"]["/resources"]["get"] + update: + x-speakeasy-name-override: list + x-speakeasy-metadata: + after: sdk.resources.list() + before: sdk.Resources.list-resources() + type: method-name + - target: $["paths"]["/projects/{uuid}"]["get"] + update: + x-speakeasy-name-override: get + x-speakeasy-metadata: + after: sdk.projects.get() + before: sdk.Projects.get-project-by-uuid() + type: method-name + - target: $["paths"]["/applications/{uuid}/envs"]["get"] + update: + x-speakeasy-name-override: listEnvs + x-speakeasy-metadata: + after: sdk.applications.listEnvs() + before: sdk.Applications.list-envs-by-application-uuid() + type: method-name + - target: $["paths"]["/databases/clickhouse"]["post"] + update: + x-speakeasy-name-override: createClickhouse + x-speakeasy-metadata: + after: sdk.databases.createClickhouse() + before: sdk.Databases.create-database-clickhouse() + type: method-name + - target: $["paths"]["/applications/{uuid}"]["get"] + update: + x-speakeasy-name-override: get + x-speakeasy-metadata: + after: sdk.applications.get() + before: sdk.Applications.get-application-by-uuid() + type: method-name + - target: $["paths"]["/security/keys"]["get"] + update: + x-speakeasy-name-override: list + x-speakeasy-group: privateKeys + x-speakeasy-metadata: + after: sdk.privateKeys.list() + before: sdk.Private Keys.list-private-keys() + type: method-name + - target: $["paths"]["/version"]["get"] + update: + x-speakeasy-group: version + x-speakeasy-name-override: get + x-speakeasy-metadata: + after: sdk.version.get() + before: sdk..version() + type: method-name + - target: $["paths"]["/services/{uuid}"]["delete"] + update: + x-speakeasy-name-override: delete + x-speakeasy-metadata: + after: sdk.services.delete() + before: sdk.Services.delete-service-by-uuid() + type: method-name + - target: $["paths"]["/databases/{uuid}"]["delete"] + update: + x-speakeasy-name-override: delete + x-speakeasy-metadata: + after: sdk.databases.delete() + before: sdk.Databases.delete-database-by-uuid() + type: method-name + - target: $["paths"]["/servers/{uuid}"]["get"] + update: + x-speakeasy-name-override: get + x-speakeasy-metadata: + after: sdk.servers.get() + before: sdk.Servers.get-server-by-uuid() + type: method-name + - target: $["paths"]["/servers/{uuid}/resources"]["get"] + update: + x-speakeasy-name-override: getResources + x-speakeasy-metadata: + after: sdk.servers.getResources() + before: sdk.Servers.get-resources-by-server-uuid() + type: method-name + - target: $["paths"]["/applications/dockercompose"]["post"] + update: + x-speakeasy-name-override: createDockerCompose + x-speakeasy-metadata: + after: sdk.applications.createDockerCompose() + before: sdk.Applications.create-dockercompose-application() + type: method-name + - target: $["paths"]["/applications/{uuid}"]["delete"] + update: + x-speakeasy-name-override: delete + x-speakeasy-metadata: + after: sdk.applications.delete() + before: sdk.Applications.delete-application-by-uuid() + type: method-name + - target: $["paths"]["/applications/{uuid}/execute"]["post"] + update: + x-speakeasy-name-override: executeCommand + x-speakeasy-metadata: + after: sdk.applications.executeCommand() + before: sdk.Applications.execute-command-application() + type: method-name + - target: $["paths"]["/deployments"]["get"] + update: + x-speakeasy-name-override: list + x-speakeasy-metadata: + after: sdk.deployments.list() + before: sdk.Deployments.list-deployments() + type: method-name + - target: $["paths"]["/databases/mongodb"]["post"] + update: + x-speakeasy-name-override: createMongodb + x-speakeasy-metadata: + after: sdk.databases.createMongodb() + before: sdk.Databases.create-database-mongodb() + type: method-name + - target: $["paths"]["/databases/{uuid}/start"]["get"] + update: + x-speakeasy-name-override: start + x-speakeasy-metadata: + after: sdk.databases.start() + before: sdk.Databases.start-database-by-uuid() + type: method-name + - target: $["paths"]["/servers/{uuid}/validate"]["get"] + update: + x-speakeasy-name-override: validate + x-speakeasy-metadata: + after: sdk.servers.validate() + before: sdk.Servers.validate-server-by-uuid() + type: method-name + - target: $["paths"]["/teams/current"]["get"] + update: + x-speakeasy-name-override: getCurrent + x-speakeasy-metadata: + after: sdk.teams.getCurrent() + before: sdk.Teams.get-current-team() + type: method-name + - target: $["paths"]["/applications/{uuid}/envs"]["patch"] + update: + x-speakeasy-name-override: updateEnv + x-speakeasy-metadata: + after: sdk.applications.updateEnv() + before: sdk.Applications.update-env-by-application-uuid() + type: method-name + - target: $["paths"]["/applications/dockerimage"]["post"] + update: + x-speakeasy-name-override: createDockerImage + x-speakeasy-metadata: + after: sdk.applications.createDockerImage() + before: sdk.Applications.create-dockerimage-application() + type: method-name + - target: $["paths"]["/databases/{uuid}"]["patch"] + update: + x-speakeasy-name-override: update + x-speakeasy-metadata: + after: sdk.databases.update() + before: sdk.Databases.update-database-by-uuid() + type: method-name + - target: $["paths"]["/services/{uuid}/envs/bulk"]["patch"] + update: + x-speakeasy-name-override: updateEnvsBulk + x-speakeasy-metadata: + after: sdk.services.updateEnvsBulk() + before: sdk.Services.update-envs-by-service-uuid() + type: method-name + - target: $["paths"]["/applications/public"]["post"] + update: + x-speakeasy-name-override: createPublic + x-speakeasy-metadata: + after: sdk.applications.createPublic() + before: sdk.Applications.create-public-application() + type: method-name + - target: $["paths"]["/applications/{uuid}/envs/bulk"]["patch"] + update: + x-speakeasy-name-override: updateEnvsBulk + x-speakeasy-metadata: + after: sdk.applications.updateEnvsBulk() + before: sdk.Applications.update-envs-by-application-uuid() + type: method-name + - target: $["paths"]["/databases/keydb"]["post"] + update: + x-speakeasy-name-override: createKeydb + x-speakeasy-metadata: + after: sdk.databases.createKeydb() + before: sdk.Databases.create-database-keydb() + type: method-name + - target: $["paths"]["/services/{uuid}/envs/{env_uuid}"]["delete"] + update: + x-speakeasy-name-override: deleteEnv + x-speakeasy-metadata: + after: sdk.services.deleteEnv() + before: sdk.Services.delete-env-by-service-uuid() + type: method-name + - target: $["paths"]["/databases/redis"]["post"] + update: + x-speakeasy-name-override: createRedis + x-speakeasy-metadata: + after: sdk.databases.createRedis() + before: sdk.Databases.create-database-redis() + type: method-name + - target: $["paths"]["/teams/{id}/members"]["get"] + update: + x-speakeasy-name-override: getMembers + x-speakeasy-metadata: + after: sdk.teams.getMembers() + before: sdk.Teams.get-members-by-team-id() + type: method-name + - target: $["paths"]["/servers/{uuid}"]["patch"] + update: + x-speakeasy-name-override: update + x-speakeasy-metadata: + after: sdk.servers.update() + before: sdk.Servers.update-server-by-uuid() + type: method-name + - target: $["paths"]["/applications/private-github-app"]["post"] + update: + x-speakeasy-name-override: createPrivateGithubApp + x-speakeasy-metadata: + after: sdk.applications.createPrivateGithubApp() + before: sdk.Applications.create-private-github-app-application() + type: method-name + - target: $["paths"]["/applications/private-deploy-key"]["post"] + update: + x-speakeasy-name-override: createPrivateDeployKey + x-speakeasy-metadata: + after: sdk.applications.createPrivateDeployKey() + before: sdk.Applications.create-private-deploy-key-application() + type: method-name + - target: $["paths"]["/databases/{uuid}/restart"]["get"] + update: + x-speakeasy-name-override: restart + x-speakeasy-metadata: + after: sdk.databases.restart() + before: sdk.Databases.restart-database-by-uuid() + type: method-name + - target: $["paths"]["/services/{uuid}/start"]["get"] + update: + x-speakeasy-name-override: start + x-speakeasy-metadata: + after: sdk.services.start() + before: sdk.Services.start-service-by-uuid() + type: method-name + - target: $["paths"]["/services/{uuid}/stop"]["get"] + update: + x-speakeasy-name-override: stop + x-speakeasy-metadata: + after: sdk.services.stop() + before: sdk.Services.stop-service-by-uuid() + type: method-name + - target: $["paths"]["/security/keys/{uuid}"]["get"] + update: + x-speakeasy-group: privateKeys + x-speakeasy-name-override: get + x-speakeasy-metadata: + after: sdk.privateKeys.get() + before: sdk.Private Keys.get-private-key-by-uuid() + type: method-name + - target: $["paths"]["/services"]["get"] + update: + x-speakeasy-name-override: list + x-speakeasy-metadata: + after: sdk.services.list() + before: sdk.Services.list-services() + type: method-name + - target: $["paths"]["/projects"]["get"] + update: + x-speakeasy-name-override: list + x-speakeasy-metadata: + after: sdk.projects.list() + before: sdk.Projects.list-projects() + type: method-name + - target: $["paths"]["/services/{uuid}/envs"]["get"] + update: + x-speakeasy-name-override: listEnvs + x-speakeasy-metadata: + after: sdk.services.listEnvs() + before: sdk.Services.list-envs-by-service-uuid() + type: method-name + - target: $["paths"]["/teams/current/members"]["get"] + update: + x-speakeasy-name-override: getCurrentMembers + x-speakeasy-metadata: + after: sdk.teams.getCurrentMembers() + before: sdk.Teams.get-current-team-members() + type: method-name + - target: $["paths"]["/services"]["post"] + update: + x-speakeasy-name-override: create + x-speakeasy-metadata: + after: sdk.services.create() + before: sdk.Services.create-service() + type: method-name + - target: $["paths"]["/projects/{uuid}/{environment_name}"]["get"] + update: + x-speakeasy-name-override: getEnvironment + x-speakeasy-metadata: + after: sdk.projects.getEnvironment() + before: sdk.Projects.get-environment-by-name() + type: method-name + - target: $["paths"]["/projects"]["post"] + update: + x-speakeasy-name-override: create + x-speakeasy-metadata: + after: sdk.projects.create() + before: sdk.Projects.create-project() + type: method-name + - target: $["paths"]["/services/{uuid}/envs"]["post"] + update: + x-speakeasy-name-override: createEnv + x-speakeasy-metadata: + after: sdk.services.createEnv() + before: sdk.Services.create-env-by-service-uuid() + type: method-name + - target: $["paths"]["/enable"]["get"] + update: + x-speakeasy-group: api + x-speakeasy-name-override: enable + x-speakeasy-metadata: + after: sdk.api.enable() + before: sdk..enable-api() + type: method-name + - target: $["paths"]["/services/{uuid}/envs"]["patch"] + update: + x-speakeasy-name-override: updateEnv + x-speakeasy-metadata: + after: sdk.services.updateEnv() + before: sdk.Services.update-env-by-service-uuid() + type: method-name + - target: $["paths"]["/applications/{uuid}/start"]["get"] + update: + x-speakeasy-name-override: start + x-speakeasy-metadata: + after: sdk.applications.start() + before: sdk.Applications.start-application-by-uuid() + type: method-name + - target: $["paths"]["/deployments/{uuid}"]["get"] + update: + x-speakeasy-name-override: get + x-speakeasy-metadata: + after: sdk.deployments.get() + before: sdk.Deployments.get-deployment-by-uuid() + type: method-name + - target: $["paths"]["/applications/{uuid}"]["patch"] + update: + x-speakeasy-name-override: update + x-speakeasy-metadata: + after: sdk.applications.update() + before: sdk.Applications.update-application-by-uuid() + type: method-name + - target: $["paths"]["/projects/{uuid}"]["delete"] + update: + x-speakeasy-name-override: delete + x-speakeasy-metadata: + after: sdk.projects.delete() + before: sdk.Projects.delete-project-by-uuid() + type: method-name + - target: $["paths"]["/databases/mysql"]["post"] + update: + x-speakeasy-name-override: createMysql + x-speakeasy-metadata: + after: sdk.databases.createMysql() + before: sdk.Databases.create-database-mysql() + type: method-name + - target: $["paths"]["/databases/dragonfly"]["post"] + update: + x-speakeasy-name-override: createDragonfly + x-speakeasy-metadata: + after: sdk.databases.createDragonfly() + before: sdk.Databases.create-database-dragonfly() + type: method-name + - target: $["paths"]["/projects/{uuid}"]["patch"] + update: + x-speakeasy-name-override: update + x-speakeasy-metadata: + after: sdk.projects.update() + before: sdk.Projects.update-project-by-uuid() + type: method-name + - target: $["paths"]["/applications/{uuid}/stop"]["get"] + update: + x-speakeasy-name-override: stop + x-speakeasy-metadata: + after: sdk.applications.stop() + before: sdk.Applications.stop-application-by-uuid() + type: method-name + - target: $["paths"]["/security/keys"]["post"] + update: + x-speakeasy-group: privateKeys + x-speakeasy-name-override: create + x-speakeasy-metadata: + after: sdk.privateKeys.create() + before: sdk.Private Keys.create-private-key() + type: method-name + - target: $["paths"]["/applications/{uuid}/restart"]["get"] + update: + x-speakeasy-name-override: restart + x-speakeasy-metadata: + after: sdk.applications.restart() + before: sdk.Applications.restart-application-by-uuid() + type: method-name + - target: $["paths"]["/databases/{uuid}/stop"]["get"] + update: + x-speakeasy-name-override: stop + x-speakeasy-metadata: + after: sdk.databases.stop() + before: sdk.Databases.stop-database-by-uuid() + type: method-name + - target: $["paths"]["/deploy"]["get"] + update: + x-speakeasy-name-override: deployByTagOrUuid + x-speakeasy-metadata: + after: sdk.deployments.deployByTagOrUuid() + before: sdk.Deployments.deploy-by-tag-or-uuid() + type: method-name + - target: $["paths"]["/applications/{uuid}/envs/{env_uuid}"]["delete"] + update: + x-speakeasy-name-override: deleteEnv + x-speakeasy-metadata: + after: sdk.applications.deleteEnv() + before: sdk.Applications.delete-env-by-application-uuid() + type: method-name + - target: $["paths"]["/applications/dockerfile"]["post"] + update: + x-speakeasy-name-override: createDockerfile + x-speakeasy-metadata: + after: sdk.applications.createDockerfile() + before: sdk.Applications.create-dockerfile-application() + type: method-name + - target: $["paths"]["/servers"]["get"] + update: + x-speakeasy-name-override: list + x-speakeasy-metadata: + after: sdk.servers.list() + before: sdk.Servers.list-servers() + type: method-name + - target: $["paths"]["/databases/{uuid}"]["get"] + update: + x-speakeasy-name-override: get + x-speakeasy-metadata: + after: sdk.databases.get() + before: sdk.Databases.get-database-by-uuid() + type: method-name + - target: $["paths"]["/applications/{uuid}/envs"]["post"] + update: + x-speakeasy-name-override: createEnv + x-speakeasy-metadata: + after: sdk.applications.createEnv() + before: sdk.Applications.create-env-by-application-uuid() + type: method-name + - target: $["paths"]["/services/{uuid}"]["get"] + update: + x-speakeasy-name-override: get + x-speakeasy-metadata: + after: sdk.services.get() + before: sdk.Services.get-service-by-uuid() + type: method-name + - target: $["paths"]["/applications"]["get"] + update: + x-speakeasy-name-override: list + x-speakeasy-metadata: + after: sdk.applications.list() + before: sdk.Applications.list-applications() + type: method-name + - target: $["paths"]["/services/{uuid}/restart"]["get"] + update: + x-speakeasy-name-override: restart + x-speakeasy-metadata: + after: sdk.services.restart() + before: sdk.Services.restart-service-by-uuid() + type: method-name + - target: $["paths"]["/health"]["get"] + update: + x-speakeasy-group: health + x-speakeasy-name-override: check + x-speakeasy-metadata: + after: sdk.health.check() + before: sdk..healthcheck() + type: method-name + - target: $["paths"]["/databases/postgresql"]["post"] + update: + x-speakeasy-name-override: createPostgresql + x-speakeasy-metadata: + after: sdk.databases.createPostgresql() + before: sdk.Databases.create-database-postgresql() + type: method-name + - target: $["paths"]["/security/keys"]["patch"] + update: + x-speakeasy-group: privateKeys + x-speakeasy-name-override: update + x-speakeasy-metadata: + after: sdk.privateKeys.update() + before: sdk.Private Keys.update-private-key() + type: method-name diff --git a/src/core.ts b/src/core.ts new file mode 100644 index 0000000..ebc9797 --- /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 CoolifyCore extends ClientSDK {} diff --git a/src/funcs/apiDisable.ts b/src/funcs/apiDisable.ts new file mode 100644 index 0000000..a9bf584 --- /dev/null +++ b/src/funcs/apiDisable.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Disable API + * + * @remarks + * Disable API (only with root permissions). + */ +export async function apiDisable( + client: CoolifyCore, + options?: RequestOptions, +): Promise< + Result< + operations.DisableApiResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.DisableApiResponseBody + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const path = pathToFunc("/disable")(); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "disable-api", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.DisableApiResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.DisableApiResponseBody + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, operations.DisableApiResponseBody$inboundSchema), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr(403, errors.DisableApiResponseBody$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/apiEnable.ts b/src/funcs/apiEnable.ts new file mode 100644 index 0000000..8f95193 --- /dev/null +++ b/src/funcs/apiEnable.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Enable API + * + * @remarks + * Enable API (only with root permissions). + */ +export async function apiEnable( + client: CoolifyCore, + options?: RequestOptions, +): Promise< + Result< + operations.EnableApiResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.EnableApiResponseBody + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const path = pathToFunc("/enable")(); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "enable-api", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.EnableApiResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.EnableApiResponseBody + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, operations.EnableApiResponseBody$inboundSchema), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr(403, errors.EnableApiResponseBody$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/applicationsCreateDockerCompose.ts b/src/funcs/applicationsCreateDockerCompose.ts new file mode 100644 index 0000000..f56e1ec --- /dev/null +++ b/src/funcs/applicationsCreateDockerCompose.ts @@ -0,0 +1,182 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { CoolifyCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Create (Docker Compose) + * + * @remarks + * Create new application based on a docker-compose file. + */ +export async function applicationsCreateDockerCompose( + client: CoolifyCore, + request: operations.CreateDockercomposeApplicationRequestBody, + options?: RequestOptions, +): Promise< + Result< + void, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.CreateDockercomposeApplicationRequestBody$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/applications/dockercompose")(); + + const headers = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "create-dockercompose-application", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + void, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/applicationsCreateDockerImage.ts b/src/funcs/applicationsCreateDockerImage.ts new file mode 100644 index 0000000..6bd6e4e --- /dev/null +++ b/src/funcs/applicationsCreateDockerImage.ts @@ -0,0 +1,182 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { CoolifyCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Create (Docker Image) + * + * @remarks + * Create new application based on a prebuilt docker image + */ +export async function applicationsCreateDockerImage( + client: CoolifyCore, + request: operations.CreateDockerimageApplicationRequestBody, + options?: RequestOptions, +): Promise< + Result< + void, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.CreateDockerimageApplicationRequestBody$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/applications/dockerimage")(); + + const headers = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "create-dockerimage-application", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + void, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/applicationsCreateDockerfile.ts b/src/funcs/applicationsCreateDockerfile.ts new file mode 100644 index 0000000..eb169fb --- /dev/null +++ b/src/funcs/applicationsCreateDockerfile.ts @@ -0,0 +1,182 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { CoolifyCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Create (Dockerfile) + * + * @remarks + * Create new application based on a simple Dockerfile. + */ +export async function applicationsCreateDockerfile( + client: CoolifyCore, + request: operations.CreateDockerfileApplicationRequestBody, + options?: RequestOptions, +): Promise< + Result< + void, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.CreateDockerfileApplicationRequestBody$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/applications/dockerfile")(); + + const headers = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "create-dockerfile-application", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + void, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/applicationsCreateEnv.ts b/src/funcs/applicationsCreateEnv.ts new file mode 100644 index 0000000..36dc7d4 --- /dev/null +++ b/src/funcs/applicationsCreateEnv.ts @@ -0,0 +1,189 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Create Env + * + * @remarks + * Create env by application UUID. + */ +export async function applicationsCreateEnv( + client: CoolifyCore, + request: operations.CreateEnvByApplicationUuidRequest, + options?: RequestOptions, +): Promise< + Result< + operations.CreateEnvByApplicationUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.CreateEnvByApplicationUuidRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const pathParams = { + uuid: encodeSimple("uuid", payload.uuid, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/applications/{uuid}/envs")(pathParams); + + const headers = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "create-env-by-application-uuid", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.CreateEnvByApplicationUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json( + 201, + operations.CreateEnvByApplicationUuidResponseBody$inboundSchema, + ), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/applicationsCreatePrivateDeployKey.ts b/src/funcs/applicationsCreatePrivateDeployKey.ts new file mode 100644 index 0000000..edf3006 --- /dev/null +++ b/src/funcs/applicationsCreatePrivateDeployKey.ts @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { CoolifyCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Create (Private - Deploy Key) + * + * @remarks + * Create new application based on a private repository through a Deploy Key. + */ +export async function applicationsCreatePrivateDeployKey( + client: CoolifyCore, + request: operations.CreatePrivateDeployKeyApplicationRequestBody, + options?: RequestOptions, +): Promise< + Result< + void, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.CreatePrivateDeployKeyApplicationRequestBody$outboundSchema + .parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/applications/private-deploy-key")(); + + const headers = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "create-private-deploy-key-application", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + void, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/applicationsCreatePrivateGithubApp.ts b/src/funcs/applicationsCreatePrivateGithubApp.ts new file mode 100644 index 0000000..cf805a2 --- /dev/null +++ b/src/funcs/applicationsCreatePrivateGithubApp.ts @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { CoolifyCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Create (Private - GH App) + * + * @remarks + * Create new application based on a private repository through a Github App. + */ +export async function applicationsCreatePrivateGithubApp( + client: CoolifyCore, + request: operations.CreatePrivateGithubAppApplicationRequestBody, + options?: RequestOptions, +): Promise< + Result< + void, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.CreatePrivateGithubAppApplicationRequestBody$outboundSchema + .parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/applications/private-github-app")(); + + const headers = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "create-private-github-app-application", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + void, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/applicationsCreatePublic.ts b/src/funcs/applicationsCreatePublic.ts new file mode 100644 index 0000000..9de7c3f --- /dev/null +++ b/src/funcs/applicationsCreatePublic.ts @@ -0,0 +1,180 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { CoolifyCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Create (Public) + * + * @remarks + * Create new application based on a public git repository. + */ +export async function applicationsCreatePublic( + client: CoolifyCore, + request: operations.CreatePublicApplicationRequestBody, + options?: RequestOptions, +): Promise< + Result< + void, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.CreatePublicApplicationRequestBody$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/applications/public")(); + + const headers = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "create-public-application", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + void, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/applicationsDelete.ts b/src/funcs/applicationsDelete.ts new file mode 100644 index 0000000..2ebdf14 --- /dev/null +++ b/src/funcs/applicationsDelete.ts @@ -0,0 +1,193 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete + * + * @remarks + * Delete application by UUID. + */ +export async function applicationsDelete( + client: CoolifyCore, + request: operations.DeleteApplicationByUuidRequest, + options?: RequestOptions, +): Promise< + Result< + operations.DeleteApplicationByUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteApplicationByUuidRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + uuid: encodeSimple("uuid", payload.uuid, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/applications/{uuid}")(pathParams); + + const query = encodeFormQuery({ + "delete_configurations": payload.delete_configurations, + "delete_connected_networks": payload.delete_connected_networks, + "delete_volumes": payload.delete_volumes, + "docker_cleanup": payload.docker_cleanup, + }); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "delete-application-by-uuid", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.DeleteApplicationByUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, operations.DeleteApplicationByUuidResponseBody$inboundSchema), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/applicationsDeleteEnv.ts b/src/funcs/applicationsDeleteEnv.ts new file mode 100644 index 0000000..40f6c7b --- /dev/null +++ b/src/funcs/applicationsDeleteEnv.ts @@ -0,0 +1,192 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete Env + * + * @remarks + * Delete env by UUID. + */ +export async function applicationsDeleteEnv( + client: CoolifyCore, + request: operations.DeleteEnvByApplicationUuidRequest, + options?: RequestOptions, +): Promise< + Result< + operations.DeleteEnvByApplicationUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteEnvByApplicationUuidRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + env_uuid: encodeSimple("env_uuid", payload.env_uuid, { + explode: false, + charEncoding: "percent", + }), + uuid: encodeSimple("uuid", payload.uuid, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/applications/{uuid}/envs/{env_uuid}")(pathParams); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "delete-env-by-application-uuid", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.DeleteEnvByApplicationUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json( + 200, + operations.DeleteEnvByApplicationUuidResponseBody$inboundSchema, + ), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/applicationsExecuteCommand.ts b/src/funcs/applicationsExecuteCommand.ts new file mode 100644 index 0000000..e97d568 --- /dev/null +++ b/src/funcs/applicationsExecuteCommand.ts @@ -0,0 +1,186 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Execute Command + * + * @remarks + * Execute a command on the application's current container. + */ +export async function applicationsExecuteCommand( + client: CoolifyCore, + request: operations.ExecuteCommandApplicationRequest, + options?: RequestOptions, +): Promise< + Result< + operations.ExecuteCommandApplicationResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.ExecuteCommandApplicationRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const pathParams = { + uuid: encodeSimple("uuid", payload.uuid, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/applications/{uuid}/execute")(pathParams); + + const headers = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "execute-command-application", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.ExecuteCommandApplicationResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, operations.ExecuteCommandApplicationResponseBody$inboundSchema), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/applicationsGet.ts b/src/funcs/applicationsGet.ts new file mode 100644 index 0000000..e1fafcd --- /dev/null +++ b/src/funcs/applicationsGet.ts @@ -0,0 +1,186 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Get + * + * @remarks + * Get application by UUID. + */ +export async function applicationsGet( + client: CoolifyCore, + request: operations.GetApplicationByUuidRequest, + options?: RequestOptions, +): Promise< + Result< + components.Application, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.GetApplicationByUuidRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + uuid: encodeSimple("uuid", payload.uuid, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/applications/{uuid}")(pathParams); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "get-application-by-uuid", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + components.Application, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.Application$inboundSchema), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/applicationsList.ts b/src/funcs/applicationsList.ts new file mode 100644 index 0000000..85e39a9 --- /dev/null +++ b/src/funcs/applicationsList.ts @@ -0,0 +1,163 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { CoolifyCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { Result } from "../types/fp.js"; + +/** + * List + * + * @remarks + * List all applications. + */ +export async function applicationsList( + client: CoolifyCore, + options?: RequestOptions, +): Promise< + Result< + Array, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const path = pathToFunc("/applications")(); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "list-applications", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + Array, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.array(components.Application$inboundSchema)), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/applicationsListEnvs.ts b/src/funcs/applicationsListEnvs.ts new file mode 100644 index 0000000..5992535 --- /dev/null +++ b/src/funcs/applicationsListEnvs.ts @@ -0,0 +1,187 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { CoolifyCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * List Envs + * + * @remarks + * List all envs by application UUID. + */ +export async function applicationsListEnvs( + client: CoolifyCore, + request: operations.ListEnvsByApplicationUuidRequest, + options?: RequestOptions, +): Promise< + Result< + Array, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.ListEnvsByApplicationUuidRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + uuid: encodeSimple("uuid", payload.uuid, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/applications/{uuid}/envs")(pathParams); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "list-envs-by-application-uuid", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + Array, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.array(components.EnvironmentVariable$inboundSchema)), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/applicationsRestart.ts b/src/funcs/applicationsRestart.ts new file mode 100644 index 0000000..7d7ccf8 --- /dev/null +++ b/src/funcs/applicationsRestart.ts @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Restart + * + * @remarks + * Restart application. `Post` request is also accepted. + */ +export async function applicationsRestart( + client: CoolifyCore, + request: operations.RestartApplicationByUuidRequest, + options?: RequestOptions, +): Promise< + Result< + operations.RestartApplicationByUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.RestartApplicationByUuidRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + uuid: encodeSimple("uuid", payload.uuid, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/applications/{uuid}/restart")(pathParams); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "restart-application-by-uuid", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.RestartApplicationByUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, operations.RestartApplicationByUuidResponseBody$inboundSchema), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/applicationsStart.ts b/src/funcs/applicationsStart.ts new file mode 100644 index 0000000..ba11e50 --- /dev/null +++ b/src/funcs/applicationsStart.ts @@ -0,0 +1,191 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Start + * + * @remarks + * Start application. `Post` request is also accepted. + */ +export async function applicationsStart( + client: CoolifyCore, + request: operations.StartApplicationByUuidRequest, + options?: RequestOptions, +): Promise< + Result< + operations.StartApplicationByUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.StartApplicationByUuidRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + uuid: encodeSimple("uuid", payload.uuid, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/applications/{uuid}/start")(pathParams); + + const query = encodeFormQuery({ + "force": payload.force, + "instant_deploy": payload.instant_deploy, + }); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "start-application-by-uuid", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.StartApplicationByUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, operations.StartApplicationByUuidResponseBody$inboundSchema), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/applicationsStop.ts b/src/funcs/applicationsStop.ts new file mode 100644 index 0000000..01e2092 --- /dev/null +++ b/src/funcs/applicationsStop.ts @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Stop + * + * @remarks + * Stop application. `Post` request is also accepted. + */ +export async function applicationsStop( + client: CoolifyCore, + request: operations.StopApplicationByUuidRequest, + options?: RequestOptions, +): Promise< + Result< + operations.StopApplicationByUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.StopApplicationByUuidRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + uuid: encodeSimple("uuid", payload.uuid, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/applications/{uuid}/stop")(pathParams); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "stop-application-by-uuid", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.StopApplicationByUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, operations.StopApplicationByUuidResponseBody$inboundSchema), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/applicationsUpdate.ts b/src/funcs/applicationsUpdate.ts new file mode 100644 index 0000000..c843275 --- /dev/null +++ b/src/funcs/applicationsUpdate.ts @@ -0,0 +1,186 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Update + * + * @remarks + * Update application by UUID. + */ +export async function applicationsUpdate( + client: CoolifyCore, + request: operations.UpdateApplicationByUuidRequest, + options?: RequestOptions, +): Promise< + Result< + operations.UpdateApplicationByUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateApplicationByUuidRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const pathParams = { + uuid: encodeSimple("uuid", payload.uuid, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/applications/{uuid}")(pathParams); + + const headers = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "update-application-by-uuid", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.UpdateApplicationByUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, operations.UpdateApplicationByUuidResponseBody$inboundSchema), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/applicationsUpdateEnv.ts b/src/funcs/applicationsUpdateEnv.ts new file mode 100644 index 0000000..02592f1 --- /dev/null +++ b/src/funcs/applicationsUpdateEnv.ts @@ -0,0 +1,189 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Update Env + * + * @remarks + * Update env by application UUID. + */ +export async function applicationsUpdateEnv( + client: CoolifyCore, + request: operations.UpdateEnvByApplicationUuidRequest, + options?: RequestOptions, +): Promise< + Result< + operations.UpdateEnvByApplicationUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateEnvByApplicationUuidRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const pathParams = { + uuid: encodeSimple("uuid", payload.uuid, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/applications/{uuid}/envs")(pathParams); + + const headers = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "update-env-by-application-uuid", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.UpdateEnvByApplicationUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json( + 201, + operations.UpdateEnvByApplicationUuidResponseBody$inboundSchema, + ), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/applicationsUpdateEnvsBulk.ts b/src/funcs/applicationsUpdateEnvsBulk.ts new file mode 100644 index 0000000..8f15a9b --- /dev/null +++ b/src/funcs/applicationsUpdateEnvsBulk.ts @@ -0,0 +1,189 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Update Envs (Bulk) + * + * @remarks + * Update multiple envs by application UUID. + */ +export async function applicationsUpdateEnvsBulk( + client: CoolifyCore, + request: operations.UpdateEnvsByApplicationUuidRequest, + options?: RequestOptions, +): Promise< + Result< + operations.UpdateEnvsByApplicationUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateEnvsByApplicationUuidRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const pathParams = { + uuid: encodeSimple("uuid", payload.uuid, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/applications/{uuid}/envs/bulk")(pathParams); + + const headers = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "update-envs-by-application-uuid", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.UpdateEnvsByApplicationUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json( + 201, + operations.UpdateEnvsByApplicationUuidResponseBody$inboundSchema, + ), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/databasesCreateClickhouse.ts b/src/funcs/databasesCreateClickhouse.ts new file mode 100644 index 0000000..0e594d4 --- /dev/null +++ b/src/funcs/databasesCreateClickhouse.ts @@ -0,0 +1,182 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { CoolifyCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Create (Clickhouse) + * + * @remarks + * Create a new Clickhouse database. + */ +export async function databasesCreateClickhouse( + client: CoolifyCore, + request: operations.CreateDatabaseClickhouseRequestBody, + options?: RequestOptions, +): Promise< + Result< + void, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.CreateDatabaseClickhouseRequestBody$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/databases/clickhouse")(); + + const headers = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "create-database-clickhouse", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + void, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/databasesCreateDragonfly.ts b/src/funcs/databasesCreateDragonfly.ts new file mode 100644 index 0000000..c925952 --- /dev/null +++ b/src/funcs/databasesCreateDragonfly.ts @@ -0,0 +1,180 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { CoolifyCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Create (DragonFly) + * + * @remarks + * Create a new DragonFly database. + */ +export async function databasesCreateDragonfly( + client: CoolifyCore, + request: operations.CreateDatabaseDragonflyRequestBody, + options?: RequestOptions, +): Promise< + Result< + void, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.CreateDatabaseDragonflyRequestBody$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/databases/dragonfly")(); + + const headers = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "create-database-dragonfly", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + void, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/databasesCreateKeydb.ts b/src/funcs/databasesCreateKeydb.ts new file mode 100644 index 0000000..0a4bd91 --- /dev/null +++ b/src/funcs/databasesCreateKeydb.ts @@ -0,0 +1,180 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { CoolifyCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Create (KeyDB) + * + * @remarks + * Create a new KeyDB database. + */ +export async function databasesCreateKeydb( + client: CoolifyCore, + request: operations.CreateDatabaseKeydbRequestBody, + options?: RequestOptions, +): Promise< + Result< + void, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.CreateDatabaseKeydbRequestBody$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/databases/keydb")(); + + const headers = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "create-database-keydb", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + void, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/databasesCreateMariadb.ts b/src/funcs/databasesCreateMariadb.ts new file mode 100644 index 0000000..37dc386 --- /dev/null +++ b/src/funcs/databasesCreateMariadb.ts @@ -0,0 +1,180 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { CoolifyCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Create (MariaDB) + * + * @remarks + * Create a new MariaDB database. + */ +export async function databasesCreateMariadb( + client: CoolifyCore, + request: operations.CreateDatabaseMariadbRequestBody, + options?: RequestOptions, +): Promise< + Result< + void, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.CreateDatabaseMariadbRequestBody$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/databases/mariadb")(); + + const headers = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "create-database-mariadb", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + void, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/databasesCreateMongodb.ts b/src/funcs/databasesCreateMongodb.ts new file mode 100644 index 0000000..e6ca07b --- /dev/null +++ b/src/funcs/databasesCreateMongodb.ts @@ -0,0 +1,180 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { CoolifyCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Create (MongoDB) + * + * @remarks + * Create a new MongoDB database. + */ +export async function databasesCreateMongodb( + client: CoolifyCore, + request: operations.CreateDatabaseMongodbRequestBody, + options?: RequestOptions, +): Promise< + Result< + void, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.CreateDatabaseMongodbRequestBody$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/databases/mongodb")(); + + const headers = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "create-database-mongodb", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + void, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/databasesCreateMysql.ts b/src/funcs/databasesCreateMysql.ts new file mode 100644 index 0000000..ce184c1 --- /dev/null +++ b/src/funcs/databasesCreateMysql.ts @@ -0,0 +1,180 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { CoolifyCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Create (MySQL) + * + * @remarks + * Create a new MySQL database. + */ +export async function databasesCreateMysql( + client: CoolifyCore, + request: operations.CreateDatabaseMysqlRequestBody, + options?: RequestOptions, +): Promise< + Result< + void, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.CreateDatabaseMysqlRequestBody$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/databases/mysql")(); + + const headers = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "create-database-mysql", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + void, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/databasesCreatePostgresql.ts b/src/funcs/databasesCreatePostgresql.ts new file mode 100644 index 0000000..946afc5 --- /dev/null +++ b/src/funcs/databasesCreatePostgresql.ts @@ -0,0 +1,182 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { CoolifyCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Create (PostgreSQL) + * + * @remarks + * Create a new PostgreSQL database. + */ +export async function databasesCreatePostgresql( + client: CoolifyCore, + request: operations.CreateDatabasePostgresqlRequestBody, + options?: RequestOptions, +): Promise< + Result< + void, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.CreateDatabasePostgresqlRequestBody$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/databases/postgresql")(); + + const headers = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "create-database-postgresql", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + void, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/databasesCreateRedis.ts b/src/funcs/databasesCreateRedis.ts new file mode 100644 index 0000000..4ac5b88 --- /dev/null +++ b/src/funcs/databasesCreateRedis.ts @@ -0,0 +1,180 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { CoolifyCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Create (Redis) + * + * @remarks + * Create a new Redis database. + */ +export async function databasesCreateRedis( + client: CoolifyCore, + request: operations.CreateDatabaseRedisRequestBody, + options?: RequestOptions, +): Promise< + Result< + void, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.CreateDatabaseRedisRequestBody$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/databases/redis")(); + + const headers = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "create-database-redis", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + void, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/databasesDelete.ts b/src/funcs/databasesDelete.ts new file mode 100644 index 0000000..8e6a0ba --- /dev/null +++ b/src/funcs/databasesDelete.ts @@ -0,0 +1,193 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete + * + * @remarks + * Delete database by UUID. + */ +export async function databasesDelete( + client: CoolifyCore, + request: operations.DeleteDatabaseByUuidRequest, + options?: RequestOptions, +): Promise< + Result< + operations.DeleteDatabaseByUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteDatabaseByUuidRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + uuid: encodeSimple("uuid", payload.uuid, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/databases/{uuid}")(pathParams); + + const query = encodeFormQuery({ + "delete_configurations": payload.delete_configurations, + "delete_connected_networks": payload.delete_connected_networks, + "delete_volumes": payload.delete_volumes, + "docker_cleanup": payload.docker_cleanup, + }); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "delete-database-by-uuid", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.DeleteDatabaseByUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, operations.DeleteDatabaseByUuidResponseBody$inboundSchema), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/databasesGet.ts b/src/funcs/databasesGet.ts new file mode 100644 index 0000000..98bf00f --- /dev/null +++ b/src/funcs/databasesGet.ts @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { CoolifyCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Get + * + * @remarks + * Get database by UUID. + */ +export async function databasesGet( + client: CoolifyCore, + request: operations.GetDatabaseByUuidRequest, + options?: RequestOptions, +): Promise< + Result< + string, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => operations.GetDatabaseByUuidRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + uuid: encodeSimple("uuid", payload.uuid, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/databases/{uuid}")(pathParams); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "get-database-by-uuid", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + string, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.string()), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/databasesList.ts b/src/funcs/databasesList.ts new file mode 100644 index 0000000..beb37f1 --- /dev/null +++ b/src/funcs/databasesList.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { CoolifyCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { Result } from "../types/fp.js"; + +/** + * List + * + * @remarks + * List all databases. + */ +export async function databasesList( + client: CoolifyCore, + options?: RequestOptions, +): Promise< + Result< + string, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const path = pathToFunc("/databases")(); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "list-databases", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + string, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.string()), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/databasesRestart.ts b/src/funcs/databasesRestart.ts new file mode 100644 index 0000000..86d786f --- /dev/null +++ b/src/funcs/databasesRestart.ts @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Restart + * + * @remarks + * Restart database. `Post` request is also accepted. + */ +export async function databasesRestart( + client: CoolifyCore, + request: operations.RestartDatabaseByUuidRequest, + options?: RequestOptions, +): Promise< + Result< + operations.RestartDatabaseByUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.RestartDatabaseByUuidRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + uuid: encodeSimple("uuid", payload.uuid, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/databases/{uuid}/restart")(pathParams); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "restart-database-by-uuid", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.RestartDatabaseByUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, operations.RestartDatabaseByUuidResponseBody$inboundSchema), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/databasesStart.ts b/src/funcs/databasesStart.ts new file mode 100644 index 0000000..289c234 --- /dev/null +++ b/src/funcs/databasesStart.ts @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Start + * + * @remarks + * Start database. `Post` request is also accepted. + */ +export async function databasesStart( + client: CoolifyCore, + request: operations.StartDatabaseByUuidRequest, + options?: RequestOptions, +): Promise< + Result< + operations.StartDatabaseByUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.StartDatabaseByUuidRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + uuid: encodeSimple("uuid", payload.uuid, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/databases/{uuid}/start")(pathParams); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "start-database-by-uuid", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.StartDatabaseByUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, operations.StartDatabaseByUuidResponseBody$inboundSchema), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/databasesStop.ts b/src/funcs/databasesStop.ts new file mode 100644 index 0000000..87ed7e5 --- /dev/null +++ b/src/funcs/databasesStop.ts @@ -0,0 +1,184 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Stop + * + * @remarks + * Stop database. `Post` request is also accepted. + */ +export async function databasesStop( + client: CoolifyCore, + request: operations.StopDatabaseByUuidRequest, + options?: RequestOptions, +): Promise< + Result< + operations.StopDatabaseByUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => operations.StopDatabaseByUuidRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + uuid: encodeSimple("uuid", payload.uuid, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/databases/{uuid}/stop")(pathParams); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "stop-database-by-uuid", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.StopDatabaseByUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, operations.StopDatabaseByUuidResponseBody$inboundSchema), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/databasesUpdate.ts b/src/funcs/databasesUpdate.ts new file mode 100644 index 0000000..d0ccd6b --- /dev/null +++ b/src/funcs/databasesUpdate.ts @@ -0,0 +1,187 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { CoolifyCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Update + * + * @remarks + * Update database by UUID. + */ +export async function databasesUpdate( + client: CoolifyCore, + request: operations.UpdateDatabaseByUuidRequest, + options?: RequestOptions, +): Promise< + Result< + void, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateDatabaseByUuidRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const pathParams = { + uuid: encodeSimple("uuid", payload.uuid, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/databases/{uuid}")(pathParams); + + const headers = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "update-database-by-uuid", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + void, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/deploymentsDeployByTagOrUuid.ts b/src/funcs/deploymentsDeployByTagOrUuid.ts new file mode 100644 index 0000000..8786cbb --- /dev/null +++ b/src/funcs/deploymentsDeployByTagOrUuid.ts @@ -0,0 +1,184 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Deploy + * + * @remarks + * Deploy by tag or uuid. `Post` request also accepted. + */ +export async function deploymentsDeployByTagOrUuid( + client: CoolifyCore, + request: operations.DeployByTagOrUuidRequest, + options?: RequestOptions, +): Promise< + Result< + operations.DeployByTagOrUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => operations.DeployByTagOrUuidRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/deploy")(); + + const query = encodeFormQuery({ + "force": payload.force, + "tag": payload.tag, + "uuid": payload.uuid, + }); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "deploy-by-tag-or-uuid", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.DeployByTagOrUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, operations.DeployByTagOrUuidResponseBody$inboundSchema), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/deploymentsGet.ts b/src/funcs/deploymentsGet.ts new file mode 100644 index 0000000..a3328e9 --- /dev/null +++ b/src/funcs/deploymentsGet.ts @@ -0,0 +1,186 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Get + * + * @remarks + * Get deployment by UUID. + */ +export async function deploymentsGet( + client: CoolifyCore, + request: operations.GetDeploymentByUuidRequest, + options?: RequestOptions, +): Promise< + Result< + components.ApplicationDeploymentQueue, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.GetDeploymentByUuidRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + uuid: encodeSimple("uuid", payload.uuid, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/deployments/{uuid}")(pathParams); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "get-deployment-by-uuid", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + components.ApplicationDeploymentQueue, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.ApplicationDeploymentQueue$inboundSchema), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/deploymentsList.ts b/src/funcs/deploymentsList.ts new file mode 100644 index 0000000..a44ddbf --- /dev/null +++ b/src/funcs/deploymentsList.ts @@ -0,0 +1,163 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { CoolifyCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { Result } from "../types/fp.js"; + +/** + * List + * + * @remarks + * List currently running deployments + */ +export async function deploymentsList( + client: CoolifyCore, + options?: RequestOptions, +): Promise< + Result< + Array, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const path = pathToFunc("/deployments")(); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "list-deployments", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + Array, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.array(components.ApplicationDeploymentQueue$inboundSchema)), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/healthCheck.ts b/src/funcs/healthCheck.ts new file mode 100644 index 0000000..a37ddd0 --- /dev/null +++ b/src/funcs/healthCheck.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { CoolifyCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { Result } from "../types/fp.js"; + +/** + * Healthcheck + * + * @remarks + * Healthcheck endpoint. + */ +export async function healthCheck( + client: CoolifyCore, + options?: RequestOptions, +): Promise< + Result< + string, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const path = pathToFunc("/health")(); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "healthcheck", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + string, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.string()), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/privateKeysCreate.ts b/src/funcs/privateKeysCreate.ts new file mode 100644 index 0000000..98e4ff8 --- /dev/null +++ b/src/funcs/privateKeysCreate.ts @@ -0,0 +1,179 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Create + * + * @remarks + * Create a new private key. + */ +export async function privateKeysCreate( + client: CoolifyCore, + request: operations.CreatePrivateKeyRequestBody, + options?: RequestOptions, +): Promise< + Result< + operations.CreatePrivateKeyResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.CreatePrivateKeyRequestBody$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/security/keys")(); + + const headers = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "create-private-key", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.CreatePrivateKeyResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, operations.CreatePrivateKeyResponseBody$inboundSchema), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/privateKeysDelete.ts b/src/funcs/privateKeysDelete.ts new file mode 100644 index 0000000..b44108d --- /dev/null +++ b/src/funcs/privateKeysDelete.ts @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete + * + * @remarks + * Delete a private key. + */ +export async function privateKeysDelete( + client: CoolifyCore, + request: operations.DeletePrivateKeyByUuidRequest, + options?: RequestOptions, +): Promise< + Result< + operations.DeletePrivateKeyByUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | errors.NotFound + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.DeletePrivateKeyByUuidRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + uuid: encodeSimple("uuid", payload.uuid, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/security/keys/{uuid}")(pathParams); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "delete-private-key-by-uuid", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.DeletePrivateKeyByUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | errors.NotFound + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, operations.DeletePrivateKeyByUuidResponseBody$inboundSchema), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.fail([404, "4XX", "5XX"]), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.jsonErr([501, 505], errors.NotFound$inboundSchema), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/privateKeysGet.ts b/src/funcs/privateKeysGet.ts new file mode 100644 index 0000000..35ab0cf --- /dev/null +++ b/src/funcs/privateKeysGet.ts @@ -0,0 +1,186 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Get + * + * @remarks + * Get key by UUID. + */ +export async function privateKeysGet( + client: CoolifyCore, + request: operations.GetPrivateKeyByUuidRequest, + options?: RequestOptions, +): Promise< + Result< + components.PrivateKey, + | errors.BadRequest + | errors.Unauthenticated + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | errors.NotFound + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.GetPrivateKeyByUuidRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + uuid: encodeSimple("uuid", payload.uuid, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/security/keys/{uuid}")(pathParams); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "get-private-key-by-uuid", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + components.PrivateKey, + | errors.BadRequest + | errors.Unauthenticated + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | errors.NotFound + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.PrivateKey$inboundSchema), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.fail([404, "4XX", "5XX"]), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.jsonErr([501, 505], errors.NotFound$inboundSchema), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/privateKeysList.ts b/src/funcs/privateKeysList.ts new file mode 100644 index 0000000..8388b26 --- /dev/null +++ b/src/funcs/privateKeysList.ts @@ -0,0 +1,163 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { CoolifyCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { Result } from "../types/fp.js"; + +/** + * List + * + * @remarks + * List all private keys. + */ +export async function privateKeysList( + client: CoolifyCore, + options?: RequestOptions, +): Promise< + Result< + Array, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const path = pathToFunc("/security/keys")(); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "list-private-keys", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + Array, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.array(components.PrivateKey$inboundSchema)), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/privateKeysUpdate.ts b/src/funcs/privateKeysUpdate.ts new file mode 100644 index 0000000..1b3b660 --- /dev/null +++ b/src/funcs/privateKeysUpdate.ts @@ -0,0 +1,179 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Update + * + * @remarks + * Update a private key. + */ +export async function privateKeysUpdate( + client: CoolifyCore, + request: operations.UpdatePrivateKeyRequestBody, + options?: RequestOptions, +): Promise< + Result< + operations.UpdatePrivateKeyResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.UpdatePrivateKeyRequestBody$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/security/keys")(); + + const headers = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "update-private-key", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.UpdatePrivateKeyResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, operations.UpdatePrivateKeyResponseBody$inboundSchema), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/projectsCreate.ts b/src/funcs/projectsCreate.ts new file mode 100644 index 0000000..e054e1e --- /dev/null +++ b/src/funcs/projectsCreate.ts @@ -0,0 +1,178 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Create + * + * @remarks + * Create Project. + */ +export async function projectsCreate( + client: CoolifyCore, + request: operations.CreateProjectRequestBody, + options?: RequestOptions, +): Promise< + Result< + operations.CreateProjectResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => operations.CreateProjectRequestBody$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/projects")(); + + const headers = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "create-project", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.CreateProjectResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, operations.CreateProjectResponseBody$inboundSchema), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/projectsDelete.ts b/src/funcs/projectsDelete.ts new file mode 100644 index 0000000..15a2475 --- /dev/null +++ b/src/funcs/projectsDelete.ts @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete + * + * @remarks + * Delete project by UUID. + */ +export async function projectsDelete( + client: CoolifyCore, + request: operations.DeleteProjectByUuidRequest, + options?: RequestOptions, +): Promise< + Result< + operations.DeleteProjectByUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteProjectByUuidRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + uuid: encodeSimple("uuid", payload.uuid, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/projects/{uuid}")(pathParams); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "delete-project-by-uuid", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.DeleteProjectByUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, operations.DeleteProjectByUuidResponseBody$inboundSchema), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/projectsGet.ts b/src/funcs/projectsGet.ts new file mode 100644 index 0000000..126b7d4 --- /dev/null +++ b/src/funcs/projectsGet.ts @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Get + * + * @remarks + * Get project by UUID. + */ +export async function projectsGet( + client: CoolifyCore, + request: operations.GetProjectByUuidRequest, + options?: RequestOptions, +): Promise< + Result< + components.Project, + | errors.BadRequest + | errors.Unauthenticated + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | errors.NotFound + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => operations.GetProjectByUuidRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + uuid: encodeSimple("uuid", payload.uuid, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/projects/{uuid}")(pathParams); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "get-project-by-uuid", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + components.Project, + | errors.BadRequest + | errors.Unauthenticated + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | errors.NotFound + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.Project$inboundSchema), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.fail([404, "4XX", "5XX"]), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.jsonErr([501, 505], errors.NotFound$inboundSchema), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/projectsGetEnvironment.ts b/src/funcs/projectsGetEnvironment.ts new file mode 100644 index 0000000..94887f0 --- /dev/null +++ b/src/funcs/projectsGetEnvironment.ts @@ -0,0 +1,191 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Environment + * + * @remarks + * Get environment by name. + */ +export async function projectsGetEnvironment( + client: CoolifyCore, + request: operations.GetEnvironmentByNameRequest, + options?: RequestOptions, +): Promise< + Result< + components.Environment, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.GetEnvironmentByNameRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + environment_name: encodeSimple( + "environment_name", + payload.environment_name, + { explode: false, charEncoding: "percent" }, + ), + uuid: encodeSimple("uuid", payload.uuid, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/projects/{uuid}/{environment_name}")(pathParams); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "get-environment-by-name", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + components.Environment, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.Environment$inboundSchema), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/projectsList.ts b/src/funcs/projectsList.ts new file mode 100644 index 0000000..67c1d15 --- /dev/null +++ b/src/funcs/projectsList.ts @@ -0,0 +1,163 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { CoolifyCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { Result } from "../types/fp.js"; + +/** + * List + * + * @remarks + * List projects. + */ +export async function projectsList( + client: CoolifyCore, + options?: RequestOptions, +): Promise< + Result< + Array, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const path = pathToFunc("/projects")(); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "list-projects", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + Array, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.array(components.Project$inboundSchema)), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/projectsUpdate.ts b/src/funcs/projectsUpdate.ts new file mode 100644 index 0000000..218a02a --- /dev/null +++ b/src/funcs/projectsUpdate.ts @@ -0,0 +1,186 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Update + * + * @remarks + * Update Project. + */ +export async function projectsUpdate( + client: CoolifyCore, + request: operations.UpdateProjectByUuidRequest, + options?: RequestOptions, +): Promise< + Result< + operations.UpdateProjectByUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateProjectByUuidRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const pathParams = { + uuid: encodeSimple("uuid", payload.uuid, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/projects/{uuid}")(pathParams); + + const headers = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "update-project-by-uuid", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.UpdateProjectByUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, operations.UpdateProjectByUuidResponseBody$inboundSchema), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/resourcesList.ts b/src/funcs/resourcesList.ts new file mode 100644 index 0000000..b1cec81 --- /dev/null +++ b/src/funcs/resourcesList.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { CoolifyCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { Result } from "../types/fp.js"; + +/** + * List + * + * @remarks + * Get all resources. + */ +export async function resourcesList( + client: CoolifyCore, + options?: RequestOptions, +): Promise< + Result< + string, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const path = pathToFunc("/resources")(); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "list-resources", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + string, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.string()), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/serversCreate.ts b/src/funcs/serversCreate.ts new file mode 100644 index 0000000..47d95eb --- /dev/null +++ b/src/funcs/serversCreate.ts @@ -0,0 +1,178 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Create + * + * @remarks + * Create Server. + */ +export async function serversCreate( + client: CoolifyCore, + request: operations.CreateServerRequestBody, + options?: RequestOptions, +): Promise< + Result< + operations.CreateServerResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => operations.CreateServerRequestBody$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/servers")(); + + const headers = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "create-server", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.CreateServerResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, operations.CreateServerResponseBody$inboundSchema), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/serversDelete.ts b/src/funcs/serversDelete.ts new file mode 100644 index 0000000..f9f59c7 --- /dev/null +++ b/src/funcs/serversDelete.ts @@ -0,0 +1,184 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete + * + * @remarks + * Delete server by UUID. + */ +export async function serversDelete( + client: CoolifyCore, + request: operations.DeleteServerByUuidRequest, + options?: RequestOptions, +): Promise< + Result< + operations.DeleteServerByUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => operations.DeleteServerByUuidRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + uuid: encodeSimple("uuid", payload.uuid, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/servers/{uuid}")(pathParams); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "delete-server-by-uuid", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.DeleteServerByUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, operations.DeleteServerByUuidResponseBody$inboundSchema), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/serversGet.ts b/src/funcs/serversGet.ts new file mode 100644 index 0000000..f92734c --- /dev/null +++ b/src/funcs/serversGet.ts @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Get + * + * @remarks + * Get server by UUID. + */ +export async function serversGet( + client: CoolifyCore, + request: operations.GetServerByUuidRequest, + options?: RequestOptions, +): Promise< + Result< + components.Server, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => operations.GetServerByUuidRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + uuid: encodeSimple("uuid", payload.uuid, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/servers/{uuid}")(pathParams); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "get-server-by-uuid", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + components.Server, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.Server$inboundSchema), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/serversGetDomains.ts b/src/funcs/serversGetDomains.ts new file mode 100644 index 0000000..9d0ea6f --- /dev/null +++ b/src/funcs/serversGetDomains.ts @@ -0,0 +1,189 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { CoolifyCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Domains + * + * @remarks + * Get domains by server. + */ +export async function serversGetDomains( + client: CoolifyCore, + request: operations.GetDomainsByServerUuidRequest, + options?: RequestOptions, +): Promise< + Result< + Array, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.GetDomainsByServerUuidRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + uuid: encodeSimple("uuid", payload.uuid, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/servers/{uuid}/domains")(pathParams); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "get-domains-by-server-uuid", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + Array, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json( + 200, + z.array(operations.GetDomainsByServerUuidResponseBody$inboundSchema), + ), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/serversGetResources.ts b/src/funcs/serversGetResources.ts new file mode 100644 index 0000000..1afc332 --- /dev/null +++ b/src/funcs/serversGetResources.ts @@ -0,0 +1,186 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { CoolifyCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Resources + * + * @remarks + * Get resources by server. + */ +export async function serversGetResources( + client: CoolifyCore, + request: operations.GetResourcesByServerUuidRequest, + options?: RequestOptions, +): Promise< + Result< + Array, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.GetResourcesByServerUuidRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + uuid: encodeSimple("uuid", payload.uuid, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/servers/{uuid}/resources")(pathParams); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "get-resources-by-server-uuid", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + Array, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.array(operations.ResponseBody$inboundSchema)), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/serversList.ts b/src/funcs/serversList.ts new file mode 100644 index 0000000..fc17b5e --- /dev/null +++ b/src/funcs/serversList.ts @@ -0,0 +1,163 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { CoolifyCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { Result } from "../types/fp.js"; + +/** + * List + * + * @remarks + * List all servers. + */ +export async function serversList( + client: CoolifyCore, + options?: RequestOptions, +): Promise< + Result< + Array, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const path = pathToFunc("/servers")(); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "list-servers", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + Array, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.array(components.Server$inboundSchema)), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/serversUpdate.ts b/src/funcs/serversUpdate.ts new file mode 100644 index 0000000..c537af9 --- /dev/null +++ b/src/funcs/serversUpdate.ts @@ -0,0 +1,187 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { CoolifyCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Update + * + * @remarks + * Update Server. + */ +export async function serversUpdate( + client: CoolifyCore, + request: operations.UpdateServerByUuidRequest, + options?: RequestOptions, +): Promise< + Result< + Array, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => operations.UpdateServerByUuidRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const pathParams = { + uuid: encodeSimple("uuid", payload.uuid, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/servers/{uuid}")(pathParams); + + const headers = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "update-server-by-uuid", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + Array, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, z.array(components.Server$inboundSchema)), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/serversValidate.ts b/src/funcs/serversValidate.ts new file mode 100644 index 0000000..c45acb7 --- /dev/null +++ b/src/funcs/serversValidate.ts @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Validate + * + * @remarks + * Validate server by UUID. + */ +export async function serversValidate( + client: CoolifyCore, + request: operations.ValidateServerByUuidRequest, + options?: RequestOptions, +): Promise< + Result< + operations.ValidateServerByUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.ValidateServerByUuidRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + uuid: encodeSimple("uuid", payload.uuid, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/servers/{uuid}/validate")(pathParams); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "validate-server-by-uuid", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.ValidateServerByUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, operations.ValidateServerByUuidResponseBody$inboundSchema), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/servicesCreate.ts b/src/funcs/servicesCreate.ts new file mode 100644 index 0000000..553174c --- /dev/null +++ b/src/funcs/servicesCreate.ts @@ -0,0 +1,178 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Create + * + * @remarks + * Create a one-click service + */ +export async function servicesCreate( + client: CoolifyCore, + request: operations.CreateServiceRequestBody, + options?: RequestOptions, +): Promise< + Result< + operations.CreateServiceResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => operations.CreateServiceRequestBody$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/services")(); + + const headers = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "create-service", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.CreateServiceResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, operations.CreateServiceResponseBody$inboundSchema), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/servicesCreateEnv.ts b/src/funcs/servicesCreateEnv.ts new file mode 100644 index 0000000..55c185a --- /dev/null +++ b/src/funcs/servicesCreateEnv.ts @@ -0,0 +1,186 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Create Env + * + * @remarks + * Create env by service UUID. + */ +export async function servicesCreateEnv( + client: CoolifyCore, + request: operations.CreateEnvByServiceUuidRequest, + options?: RequestOptions, +): Promise< + Result< + operations.CreateEnvByServiceUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.CreateEnvByServiceUuidRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const pathParams = { + uuid: encodeSimple("uuid", payload.uuid, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/services/{uuid}/envs")(pathParams); + + const headers = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "create-env-by-service-uuid", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.CreateEnvByServiceUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, operations.CreateEnvByServiceUuidResponseBody$inboundSchema), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/servicesDelete.ts b/src/funcs/servicesDelete.ts new file mode 100644 index 0000000..13ffb4d --- /dev/null +++ b/src/funcs/servicesDelete.ts @@ -0,0 +1,193 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete + * + * @remarks + * Delete service by UUID. + */ +export async function servicesDelete( + client: CoolifyCore, + request: operations.DeleteServiceByUuidRequest, + options?: RequestOptions, +): Promise< + Result< + operations.DeleteServiceByUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteServiceByUuidRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + uuid: encodeSimple("uuid", payload.uuid, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/services/{uuid}")(pathParams); + + const query = encodeFormQuery({ + "delete_configurations": payload.delete_configurations, + "delete_connected_networks": payload.delete_connected_networks, + "delete_volumes": payload.delete_volumes, + "docker_cleanup": payload.docker_cleanup, + }); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "delete-service-by-uuid", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.DeleteServiceByUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, operations.DeleteServiceByUuidResponseBody$inboundSchema), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/servicesDeleteEnv.ts b/src/funcs/servicesDeleteEnv.ts new file mode 100644 index 0000000..a84622a --- /dev/null +++ b/src/funcs/servicesDeleteEnv.ts @@ -0,0 +1,189 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete Env + * + * @remarks + * Delete env by UUID. + */ +export async function servicesDeleteEnv( + client: CoolifyCore, + request: operations.DeleteEnvByServiceUuidRequest, + options?: RequestOptions, +): Promise< + Result< + operations.DeleteEnvByServiceUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteEnvByServiceUuidRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + env_uuid: encodeSimple("env_uuid", payload.env_uuid, { + explode: false, + charEncoding: "percent", + }), + uuid: encodeSimple("uuid", payload.uuid, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/services/{uuid}/envs/{env_uuid}")(pathParams); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "delete-env-by-service-uuid", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.DeleteEnvByServiceUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, operations.DeleteEnvByServiceUuidResponseBody$inboundSchema), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/servicesGet.ts b/src/funcs/servicesGet.ts new file mode 100644 index 0000000..20b0738 --- /dev/null +++ b/src/funcs/servicesGet.ts @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Get + * + * @remarks + * Get service by UUID. + */ +export async function servicesGet( + client: CoolifyCore, + request: operations.GetServiceByUuidRequest, + options?: RequestOptions, +): Promise< + Result< + components.Service, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => operations.GetServiceByUuidRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + uuid: encodeSimple("uuid", payload.uuid, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/services/{uuid}")(pathParams); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "get-service-by-uuid", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + components.Service, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.Service$inboundSchema), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/servicesList.ts b/src/funcs/servicesList.ts new file mode 100644 index 0000000..283b84d --- /dev/null +++ b/src/funcs/servicesList.ts @@ -0,0 +1,163 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { CoolifyCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { Result } from "../types/fp.js"; + +/** + * List + * + * @remarks + * List all services. + */ +export async function servicesList( + client: CoolifyCore, + options?: RequestOptions, +): Promise< + Result< + Array, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const path = pathToFunc("/services")(); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "list-services", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + Array, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.array(components.Service$inboundSchema)), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/servicesListEnvs.ts b/src/funcs/servicesListEnvs.ts new file mode 100644 index 0000000..cf95ac4 --- /dev/null +++ b/src/funcs/servicesListEnvs.ts @@ -0,0 +1,187 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { CoolifyCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * List Envs + * + * @remarks + * List all envs by service UUID. + */ +export async function servicesListEnvs( + client: CoolifyCore, + request: operations.ListEnvsByServiceUuidRequest, + options?: RequestOptions, +): Promise< + Result< + Array, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.ListEnvsByServiceUuidRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + uuid: encodeSimple("uuid", payload.uuid, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/services/{uuid}/envs")(pathParams); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "list-envs-by-service-uuid", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + Array, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.array(components.EnvironmentVariable$inboundSchema)), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/servicesRestart.ts b/src/funcs/servicesRestart.ts new file mode 100644 index 0000000..657f847 --- /dev/null +++ b/src/funcs/servicesRestart.ts @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Restart + * + * @remarks + * Restart service. `Post` request is also accepted. + */ +export async function servicesRestart( + client: CoolifyCore, + request: operations.RestartServiceByUuidRequest, + options?: RequestOptions, +): Promise< + Result< + operations.RestartServiceByUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.RestartServiceByUuidRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + uuid: encodeSimple("uuid", payload.uuid, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/services/{uuid}/restart")(pathParams); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "restart-service-by-uuid", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.RestartServiceByUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, operations.RestartServiceByUuidResponseBody$inboundSchema), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/servicesStart.ts b/src/funcs/servicesStart.ts new file mode 100644 index 0000000..d4c6f32 --- /dev/null +++ b/src/funcs/servicesStart.ts @@ -0,0 +1,184 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Start + * + * @remarks + * Start service. `Post` request is also accepted. + */ +export async function servicesStart( + client: CoolifyCore, + request: operations.StartServiceByUuidRequest, + options?: RequestOptions, +): Promise< + Result< + operations.StartServiceByUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => operations.StartServiceByUuidRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + uuid: encodeSimple("uuid", payload.uuid, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/services/{uuid}/start")(pathParams); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "start-service-by-uuid", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.StartServiceByUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, operations.StartServiceByUuidResponseBody$inboundSchema), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/servicesStop.ts b/src/funcs/servicesStop.ts new file mode 100644 index 0000000..47c92ea --- /dev/null +++ b/src/funcs/servicesStop.ts @@ -0,0 +1,184 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Stop + * + * @remarks + * Stop service. `Post` request is also accepted. + */ +export async function servicesStop( + client: CoolifyCore, + request: operations.StopServiceByUuidRequest, + options?: RequestOptions, +): Promise< + Result< + operations.StopServiceByUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => operations.StopServiceByUuidRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + uuid: encodeSimple("uuid", payload.uuid, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/services/{uuid}/stop")(pathParams); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "stop-service-by-uuid", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.StopServiceByUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, operations.StopServiceByUuidResponseBody$inboundSchema), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/servicesUpdateEnv.ts b/src/funcs/servicesUpdateEnv.ts new file mode 100644 index 0000000..00ee77e --- /dev/null +++ b/src/funcs/servicesUpdateEnv.ts @@ -0,0 +1,186 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Update Env + * + * @remarks + * Update env by service UUID. + */ +export async function servicesUpdateEnv( + client: CoolifyCore, + request: operations.UpdateEnvByServiceUuidRequest, + options?: RequestOptions, +): Promise< + Result< + operations.UpdateEnvByServiceUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateEnvByServiceUuidRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const pathParams = { + uuid: encodeSimple("uuid", payload.uuid, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/services/{uuid}/envs")(pathParams); + + const headers = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "update-env-by-service-uuid", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.UpdateEnvByServiceUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, operations.UpdateEnvByServiceUuidResponseBody$inboundSchema), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/servicesUpdateEnvsBulk.ts b/src/funcs/servicesUpdateEnvsBulk.ts new file mode 100644 index 0000000..eb95146 --- /dev/null +++ b/src/funcs/servicesUpdateEnvsBulk.ts @@ -0,0 +1,186 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Update Envs (Bulk) + * + * @remarks + * Update multiple envs by service UUID. + */ +export async function servicesUpdateEnvsBulk( + client: CoolifyCore, + request: operations.UpdateEnvsByServiceUuidRequest, + options?: RequestOptions, +): Promise< + Result< + operations.UpdateEnvsByServiceUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateEnvsByServiceUuidRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const pathParams = { + uuid: encodeSimple("uuid", payload.uuid, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/services/{uuid}/envs/bulk")(pathParams); + + const headers = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "update-envs-by-service-uuid", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.UpdateEnvsByServiceUuidResponseBody, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, operations.UpdateEnvsByServiceUuidResponseBody$inboundSchema), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/teamsGet.ts b/src/funcs/teamsGet.ts new file mode 100644 index 0000000..b29d7c3 --- /dev/null +++ b/src/funcs/teamsGet.ts @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Get + * + * @remarks + * Get team by TeamId. + */ +export async function teamsGet( + client: CoolifyCore, + request: operations.GetTeamByIdRequest, + options?: RequestOptions, +): Promise< + Result< + components.Team, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => operations.GetTeamByIdRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/teams/{id}")(pathParams); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "get-team-by-id", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + components.Team, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.Team$inboundSchema), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/teamsGetCurrent.ts b/src/funcs/teamsGetCurrent.ts new file mode 100644 index 0000000..399eafe --- /dev/null +++ b/src/funcs/teamsGetCurrent.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CoolifyCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { Result } from "../types/fp.js"; + +/** + * Authenticated Team + * + * @remarks + * Get currently authenticated team. + */ +export async function teamsGetCurrent( + client: CoolifyCore, + options?: RequestOptions, +): Promise< + Result< + components.Team, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const path = pathToFunc("/teams/current")(); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "get-current-team", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + components.Team, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.Team$inboundSchema), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/teamsGetCurrentMembers.ts b/src/funcs/teamsGetCurrentMembers.ts new file mode 100644 index 0000000..5ad4669 --- /dev/null +++ b/src/funcs/teamsGetCurrentMembers.ts @@ -0,0 +1,163 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { CoolifyCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { Result } from "../types/fp.js"; + +/** + * Authenticated Team Members + * + * @remarks + * Get currently authenticated team members. + */ +export async function teamsGetCurrentMembers( + client: CoolifyCore, + options?: RequestOptions, +): Promise< + Result< + Array, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const path = pathToFunc("/teams/current/members")(); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "get-current-team-members", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + Array, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.array(components.User$inboundSchema)), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/teamsGetMembers.ts b/src/funcs/teamsGetMembers.ts new file mode 100644 index 0000000..1792abb --- /dev/null +++ b/src/funcs/teamsGetMembers.ts @@ -0,0 +1,186 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { CoolifyCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.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 * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Members + * + * @remarks + * Get members by TeamId. + */ +export async function teamsGetMembers( + client: CoolifyCore, + request: operations.GetMembersByTeamIdRequest, + options?: RequestOptions, +): Promise< + Result< + Array, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const parsed = safeParse( + request, + (value) => operations.GetMembersByTeamIdRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/teams/{id}/members")(pathParams); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "get-members-by-team-id", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + Array, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.array(components.User$inboundSchema)), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/teamsList.ts b/src/funcs/teamsList.ts new file mode 100644 index 0000000..7bf9d45 --- /dev/null +++ b/src/funcs/teamsList.ts @@ -0,0 +1,163 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { CoolifyCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { Result } from "../types/fp.js"; + +/** + * List + * + * @remarks + * Get all teams. + */ +export async function teamsList( + client: CoolifyCore, + options?: RequestOptions, +): Promise< + Result< + Array, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const path = pathToFunc("/teams")(); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "list-teams", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + Array, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.array(components.Team$inboundSchema)), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/versionGet.ts b/src/funcs/versionGet.ts new file mode 100644 index 0000000..8224b26 --- /dev/null +++ b/src/funcs/versionGet.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { CoolifyCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { Result } from "../types/fp.js"; + +/** + * Version + * + * @remarks + * Get Coolify version. + */ +export async function versionGet( + client: CoolifyCore, + options?: RequestOptions, +): Promise< + Result< + string, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const path = pathToFunc("/version")(); + + const headers = new Headers({ + Accept: "application/json", + }); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "version", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + 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", + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "407", + "408", + "413", + "414", + "415", + "422", + "429", + "431", + "4XX", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "510", + "511", + "5XX", + ], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + string, + | errors.BadRequest + | errors.Unauthenticated + | errors.NotFound + | errors.Timeout + | errors.RateLimited + | errors.InternalServerError + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.string()), + M.jsonErr( + [400, 413, 414, 415, 422, 431, 510], + errors.BadRequest$inboundSchema, + ), + M.jsonErr([401, 403, 407, 511], errors.Unauthenticated$inboundSchema), + M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), + M.jsonErr([408, 504], errors.Timeout$inboundSchema), + M.jsonErr(429, errors.RateLimited$inboundSchema), + M.jsonErr( + [500, 502, 503, 506, 507, 508], + errors.InternalServerError$inboundSchema, + ), + M.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/hooks/hooks.ts b/src/hooks/hooks.ts new file mode 100644 index 0000000..d1b3396 --- /dev/null +++ b/src/hooks/hooks.ts @@ -0,0 +1,112 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { RequestInput } from "../lib/http.js"; +import { + AfterErrorContext, + AfterErrorHook, + AfterSuccessContext, + AfterSuccessHook, + BeforeCreateRequestContext, + BeforeCreateRequestHook, + BeforeRequestContext, + BeforeRequestHook, + Hooks, + SDKInitHook, + SDKInitOptions, +} from "./types.js"; + +import { initHooks } from "./registration.js"; + +export class SDKHooks implements Hooks { + sdkInitHooks: SDKInitHook[] = []; + beforeCreateRequestHooks: BeforeCreateRequestHook[] = []; + beforeRequestHooks: BeforeRequestHook[] = []; + afterSuccessHooks: AfterSuccessHook[] = []; + afterErrorHooks: AfterErrorHook[] = []; + + constructor() { + 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: SDKInitOptions): SDKInitOptions { + 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..df5237d --- /dev/null +++ b/src/hooks/types.ts @@ -0,0 +1,102 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { HTTPClient, RequestInput } from "../lib/http.js"; +import { RetryConfig } from "../lib/retries.js"; +import { SecurityState } from "../lib/security.js"; + +export type HookContext = { + operationID: string; + oAuth2Scopes?: string[]; + securitySource?: any | (() => Promise); + retryConfig: RetryConfig; + resolvedSecurity: SecurityState | null; +}; + +export type Awaitable = T | Promise; + +export type SDKInitOptions = { + baseURL: URL | null; + client: HTTPClient; +}; + +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: SDKInitOptions) => SDKInitOptions; +} + +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; +} diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..5ddc765 --- /dev/null +++ b/src/index.ts @@ -0,0 +1,7 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export * from "./lib/config.js"; +export * as files from "./lib/files.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..af359f5 --- /dev/null +++ b/src/lib/config.ts @@ -0,0 +1,63 @@ +/* + * 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 = [ + /** + * Coolify Cloud API. Change the host to your own instance if you are self-hosting. + */ + "https://app.coolify.io/api/v1", +] as const; + +export type SDKOptions = { + bearerAuth?: string | (() => Promise); + + httpClient?: HTTPClient; + /** + * Allows overriding the default server used by the SDK + */ + serverIdx?: number; + /** + * Allows overriding the default server URL used by the SDK + */ + serverURL?: string; + /** + * 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: "0.1", + sdkVersion: "0.1.1", + genVersion: "2.460.1", + userAgent: "speakeasy-sdk/typescript 0.1.1 2.460.1 0.1 coolify", +} 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..44fa728 --- /dev/null +++ b/src/lib/encodings.ts @@ -0,0 +1,449 @@ +/* + * 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 { + 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 === undefined) { + return; + } else if (Array.isArray(pv)) { + encValue = mapDefined(pv, (v) => `${encodeValue(v)}`).join(","); + } else if (isPlainObject(pv)) { + encValue = mapDefinedEntries(Object.entries(pv), ([k, v]) => { + return `,${encodeString(k)},${encodeValue(v)}`; + }).join(""); + encValue = encValue.slice(1); + } else { + encValue = `${encodeValue(pv)}`; + } + + 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 { + 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 encValue = ""; + + if (pv === undefined) { + return; + } else if (Array.isArray(pv)) { + encValue = mapDefined(pv, (v) => `${encodeValue(v)}`).join("."); + } else if (isPlainObject(pv)) { + encValue = mapDefinedEntries(Object.entries(pv), ([k, v]) => { + return `.${encodeString(k)}.${encodeValue(v)}`; + }).join(""); + encValue = encValue.slice(1); + } else { + const k = + options?.explode && isPlainObject(value) ? `${encodeString(pk)}=` : ""; + encValue = `${k}${encodeValue(pv)}`; + } + + out += `.${encValue}`; + }); + + return out; +} + +type FormEncoder = ( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, +) => string; + +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]]; + + 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 = ""; + + if (pv === undefined) { + 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)}`; + } + + 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 === undefined) { + 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 { + if (value == null) { + return ""; + } + + if (!isPlainObject(value)) { + throw new EncodingError( + `Value of parameter '${key}' which uses deepObject encoding must be an object`, + ); + } + + return encodeDeepObjectObject(key, value, options); +} + +export function encodeDeepObjectObject( + key: string, + value: unknown, + options?: { charEncoding?: "percent" | "none" }, +): string { + 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 === undefined) { + return; + } + + const pk = `${key}[${ck}]`; + + if (isPlainObject(cv)) { + const objOut = encodeDeepObjectObject(pk, cv, options); + + out += `&${objOut}`; + + return; + } + + const pairs: unknown[] = Array.isArray(cv) ? cv : [cv]; + let encoded = ""; + + encoded = mapDefined(pairs, (v) => { + return `${encodeString(pk)}=${encodeString(serializeValue(v))}`; + }).join("&"); + + out += `&${encoded}`; + }); + + return out.slice(1); +} + +export function encodeJSON( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, +): string { + 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 => { + 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 = ""; + + if (pv === undefined) { + return; + } else if (Array.isArray(pv)) { + tmp = mapDefined(pv, (v) => `${encodeValue(v)}`).join(","); + } else if (isPlainObject(pv)) { + tmp = mapDefinedEntries(Object.entries(pv), ([k, v]) => { + return `,${encodeString(k)},${encodeValue(v)}`; + }).join(""); + tmp = tmp.slice(1); + } else { + const k = options?.explode && isPlainObject(value) ? `${pk}=` : ""; + tmp = `${k}${encodeValue(pv)}`; + } + + // If we end up with the nothing then skip forward + if (!tmp) { + return; + } + + out += `,${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 "null"; + } else if (typeof value === "undefined") { + 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[] { + return inp.reduce((acc, v) => { + if (v === undefined) { + return acc; + } + + const m = mapper(v); + if (m === undefined) { + return acc; + } + + acc.push(m); + + return acc; + }, []); +} + +function mapDefinedEntries( + inp: Iterable<[K, V]>, + mapper: (v: [K, V]) => R, +): R[] { + const acc: R[] = []; + for (const [k, v] of inp) { + if (v === undefined) { + continue; + } + + const m = mapper([k, v]); + if (m === undefined) { + continue; + } + + acc.push(m); + } + + return acc; +} + +export function queryJoin(...args: string[]): string { + return args.filter(Boolean).join("&"); +} + +type QueryEncoderOptions = { + explode?: boolean; + charEncoding?: "percent" | "none"; +}; + +type QueryEncoder = ( + key: string, + value: unknown, + options?: QueryEncoderOptions, +) => string; + +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); diff --git a/src/lib/env.ts b/src/lib/env.ts new file mode 100644 index 0000000..ca2e17d --- /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 { + COOLIFY_BEARER_AUTH?: string | undefined; + + COOLIFY_DEBUG?: boolean | undefined; +} + +export const envSchema: z.ZodType = z.object({ + COOLIFY_BEARER_AUTH: z.string().optional(), + + COOLIFY_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..19e0804 --- /dev/null +++ b/src/lib/files.ts @@ -0,0 +1,40 @@ +/* + * 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; +} 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..65858ac --- /dev/null +++ b/src/lib/matchers.ts @@ -0,0 +1,322 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { APIError } from "../models/errors/apierror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { Result } from "../types/fp.js"; +import { matchResponse, matchStatusCode, StatusCodePredicate } from "./http.js"; +import { isPlainObject } from "./is-plain-object.js"; +import { safeParse } from "./schemas.js"; + +export type Encoding = + | "json" + | "text" + | "bytes" + | "stream" + | "sse" + | "nil" + | "fail"; + +const DEFAULT_CONTENT_TYPES: Record = { + 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 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, + options?: { resultKey?: string; extraFields?: Record }, +) => Promise<[result: Result, raw: unknown]>; + +export function match( + ...matchers: Array> +): MatchFunc { + return async function matchFunc( + response: Response, + 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) { + const responseBody = await response.text(); + return [{ + ok: false, + error: new APIError( + "Unexpected API response status or content-type", + response, + responseBody, + ), + }, responseBody]; + } + + const encoding = matcher.enc; + switch (encoding) { + case "json": + raw = await response.json(); + break; + case "bytes": + raw = new Uint8Array(await response.arrayBuffer()); + break; + case "stream": + raw = response.body; + break; + case "text": + raw = await response.text(); + break; + case "sse": + raw = response.body; + break; + case "nil": + raw = await discardResponseBody(response); + break; + case "fail": + raw = await response.text(); + break; + default: + encoding satisfies never; + throw new Error(`Unsupported response type: ${encoding}`); + } + + if (matcher.enc === "fail") { + return [{ + ok: false, + error: new APIError( + "API error occurred", + response, + typeof raw === "string" ? raw : "", + ), + }, 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), + }; + } 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 = safeParse( + data, + (v: unknown) => matcher.schema.parse(v), + "Response validation failed", + ); + return [result.ok ? { ok: false, error: result.value } : result, raw]; + } else { + return [ + safeParse( + data, + (v: unknown) => matcher.schema.parse(v), + "Response validation failed", + ), + 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; +} + +/** + * Discards the response body to free up resources. + * + * To learn why this is need, see the undici docs: + * https://undici.nodejs.org/#/?id=garbage-collection + */ +export async function discardResponseBody(res: Response) { + const reader = res.body?.getReader(); + if (reader == null) { + return; + } + + try { + let done = false; + while (!done) { + const res = await reader.read(); + done = res.done; + } + } finally { + reader.releaseLock(); + } +} diff --git a/src/lib/primitives.ts b/src/lib/primitives.ts new file mode 100644 index 0000000..48b2867 --- /dev/null +++ b/src/lib/primitives.ts @@ -0,0 +1,60 @@ +/* + * 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; +} diff --git a/src/lib/retries.ts b/src/lib/retries.ts new file mode 100644 index 0000000..93ebc8d --- /dev/null +++ b/src/lib/retries.ts @@ -0,0 +1,219 @@ +/* + * 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; + + // eslint-disable-next-line no-constant-condition + 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..f3856dc --- /dev/null +++ b/src/lib/schemas.ts @@ -0,0 +1,86 @@ +/* + * 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, +): 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]; + } + + return { ...val, [extrasKey]: extras }; + }); +} diff --git a/src/lib/sdks.ts b/src/lib/sdks.ts new file mode 100644 index 0000000..108edf8 --- /dev/null +++ b/src/lib/sdks.ts @@ -0,0 +1,392 @@ +/* + * 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[]; + /** + * 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; +}; + +type RequestConfig = { + method: string; + path: string; + baseURL?: string | URL; + query?: string; + body?: RequestInit["body"]; + headers?: HeadersInit; + security?: SecurityState | null; + uaHeader?: string; + 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; + protected 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(); + } + this._options = { ...options, hooks: this.#hooks }; + + const url = serverURLFromOptions(options); + if (url) { + url.pathname = url.pathname.replace(/\/+$/, "") + "/"; + } + const { baseURL, client } = this.#hooks.sdkInit({ + baseURL: url, + client: options.httpClient || new HTTPClient(), + }); + this._baseURL = baseURL; + this.#httpClient = client; + this.#logger = options.debugLogger; + if (!this.#logger && env().COOLIFY_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 += inputURL.pathname.replace(/^\/+/, ""); + } + + let finalQuery = query || ""; + + const secQuery: string[] = []; + for (const [k, v] of Object.entries(security?.queryParams || {})) { + secQuery.push(encodeForm(k, v, { charEncoding: "percent" })); + } + 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?.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", SDK_METADATA.userAgent); + } + + let fetchOptions = options?.fetchOptions; + if (!fetchOptions?.signal && conf.timeoutMs && conf.timeoutMs > 0) { + const timeoutSignal = AbortSignal.timeout(conf.timeoutMs); + if (!fetchOptions) { + fetchOptions = { signal: timeoutSignal }; + } else { + fetchOptions.signal = timeoutSignal; + } + } + + if (conf.body instanceof ReadableStream) { + if (!fetchOptions) { + fetchOptions = { + // @ts-expect-error see https://github.com/node-fetch/node-fetch/issues/1769 + duplex: "half", + }; + } else { + // @ts-expect-error see https://github.com/node-fetch/node-fetch/issues/1769 + 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\/(?:.{0,100}\+)?json/; +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): + logger.log(await res.clone().json()); + 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..ec46092 --- /dev/null +++ b/src/lib/security.ts @@ -0,0 +1,254 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as components from "../models/components/index.js"; +import { env } from "./env.js"; + +type OAuth2PasswordFlow = { + username: string; + password?: string | undefined; + clientID: string; + 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 + | undefined; +}; + +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: { username: "", password: "" }, + 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") { + 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}`; + } + + state.headers[spec.fieldName] = value; +} + +export function resolveGlobalSecurity( + security: Partial | null | undefined, +): SecurityState | null { + return resolveSecurity( + [ + { + fieldName: "Authorization", + type: "http:bearer", + value: security?.bearerAuth ?? env().COOLIFY_BEARER_AUTH, + }, + ], + ); +} + +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..6bc6356 --- /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_]+?)\}/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/components/application.ts b/src/models/components/application.ts new file mode 100644 index 0000000..0c1dea4 --- /dev/null +++ b/src/models/components/application.ts @@ -0,0 +1,815 @@ +/* + * 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"; + +/** + * Build pack. + */ +export const BuildPack = { + Nixpacks: "nixpacks", + Static: "static", + Dockerfile: "dockerfile", + Dockercompose: "dockercompose", +} as const; +/** + * Build pack. + */ +export type BuildPack = ClosedEnum; + +/** + * How to set redirect with Traefik / Caddy. www<->non-www. + */ +export const Redirect = { + Www: "www", + NonWww: "non-www", + Both: "both", +} as const; +/** + * How to set redirect with Traefik / Caddy. www<->non-www. + */ +export type Redirect = ClosedEnum; + +/** + * Application model + */ +export type Application = { + /** + * The application identifier in the database. + */ + id?: number | undefined; + /** + * The application description. + */ + description?: string | null | undefined; + /** + * The repository project identifier. + */ + repositoryProjectId?: number | null | undefined; + /** + * The application UUID. + */ + uuid?: string | undefined; + /** + * The application name. + */ + name?: string | undefined; + /** + * The application domains. + */ + fqdn?: string | null | undefined; + /** + * Configuration hash. + */ + configHash?: string | undefined; + /** + * Git repository URL. + */ + gitRepository?: string | undefined; + /** + * Git branch. + */ + gitBranch?: string | undefined; + /** + * Git commit SHA. + */ + gitCommitSha?: string | undefined; + /** + * Git full URL. + */ + gitFullUrl?: string | null | undefined; + /** + * Docker registry image name. + */ + dockerRegistryImageName?: string | null | undefined; + /** + * Docker registry image tag. + */ + dockerRegistryImageTag?: string | null | undefined; + /** + * Build pack. + */ + buildPack?: BuildPack | undefined; + /** + * Static image used when static site is deployed. + */ + staticImage?: string | undefined; + /** + * Install command. + */ + installCommand?: string | undefined; + /** + * Build command. + */ + buildCommand?: string | undefined; + /** + * Start command. + */ + startCommand?: string | undefined; + /** + * Ports exposes. + */ + portsExposes?: string | undefined; + /** + * Ports mappings. + */ + portsMappings?: string | null | undefined; + /** + * Base directory for all commands. + */ + baseDirectory?: string | undefined; + /** + * Publish directory. + */ + publishDirectory?: string | undefined; + /** + * Health check enabled. + */ + healthCheckEnabled?: boolean | undefined; + /** + * Health check path. + */ + healthCheckPath?: string | undefined; + /** + * Health check port. + */ + healthCheckPort?: string | null | undefined; + /** + * Health check host. + */ + healthCheckHost?: string | null | undefined; + /** + * Health check method. + */ + healthCheckMethod?: string | undefined; + /** + * Health check return code. + */ + healthCheckReturnCode?: number | undefined; + /** + * Health check scheme. + */ + healthCheckScheme?: string | undefined; + /** + * Health check response text. + */ + healthCheckResponseText?: string | null | undefined; + /** + * Health check interval in seconds. + */ + healthCheckInterval?: number | undefined; + /** + * Health check timeout in seconds. + */ + healthCheckTimeout?: number | undefined; + /** + * Health check retries count. + */ + healthCheckRetries?: number | undefined; + /** + * Health check start period in seconds. + */ + healthCheckStartPeriod?: number | undefined; + /** + * Memory limit. + */ + limitsMemory?: string | undefined; + /** + * Memory swap limit. + */ + limitsMemorySwap?: string | undefined; + /** + * Memory swappiness. + */ + limitsMemorySwappiness?: number | undefined; + /** + * Memory reservation. + */ + limitsMemoryReservation?: string | undefined; + /** + * CPU limit. + */ + limitsCpus?: string | undefined; + /** + * CPU set. + */ + limitsCpuset?: string | null | undefined; + /** + * CPU shares. + */ + limitsCpuShares?: number | undefined; + /** + * Application status. + */ + status?: string | undefined; + /** + * Preview URL template. + */ + previewUrlTemplate?: string | undefined; + /** + * Destination type. + */ + destinationType?: string | undefined; + /** + * Destination identifier. + */ + destinationId?: number | undefined; + /** + * Source identifier. + */ + sourceId?: number | null | undefined; + /** + * Private key identifier. + */ + privateKeyId?: number | null | undefined; + /** + * Environment identifier. + */ + environmentId?: number | undefined; + /** + * Dockerfile content. Used for dockerfile build pack. + */ + dockerfile?: string | null | undefined; + /** + * Dockerfile location. + */ + dockerfileLocation?: string | undefined; + /** + * Custom labels. + */ + customLabels?: string | null | undefined; + /** + * Dockerfile target build. + */ + dockerfileTargetBuild?: string | null | undefined; + /** + * Manual webhook secret for GitHub. + */ + manualWebhookSecretGithub?: string | null | undefined; + /** + * Manual webhook secret for GitLab. + */ + manualWebhookSecretGitlab?: string | null | undefined; + /** + * Manual webhook secret for Bitbucket. + */ + manualWebhookSecretBitbucket?: string | null | undefined; + /** + * Manual webhook secret for Gitea. + */ + manualWebhookSecretGitea?: string | null | undefined; + /** + * Docker compose location. + */ + dockerComposeLocation?: string | undefined; + /** + * Docker compose content. Used for docker compose build pack. + */ + dockerCompose?: string | null | undefined; + /** + * Docker compose raw content. + */ + dockerComposeRaw?: string | null | undefined; + /** + * Docker compose domains. + */ + dockerComposeDomains?: string | null | undefined; + /** + * Docker compose custom start command. + */ + dockerComposeCustomStartCommand?: string | null | undefined; + /** + * Docker compose custom build command. + */ + dockerComposeCustomBuildCommand?: string | null | undefined; + /** + * Swarm replicas. Only used for swarm deployments. + */ + swarmReplicas?: number | null | undefined; + /** + * Swarm placement constraints. Only used for swarm deployments. + */ + swarmPlacementConstraints?: string | null | undefined; + /** + * Custom docker run options. + */ + customDockerRunOptions?: string | null | undefined; + /** + * Post deployment command. + */ + postDeploymentCommand?: string | null | undefined; + /** + * Post deployment command container. + */ + postDeploymentCommandContainer?: string | null | undefined; + /** + * Pre deployment command. + */ + preDeploymentCommand?: string | null | undefined; + /** + * Pre deployment command container. + */ + preDeploymentCommandContainer?: string | null | undefined; + /** + * Watch paths. + */ + watchPaths?: string | null | undefined; + /** + * Custom healthcheck found. + */ + customHealthcheckFound?: boolean | undefined; + /** + * How to set redirect with Traefik / Caddy. www<->non-www. + */ + redirect?: Redirect | null | undefined; + /** + * The date and time when the application was created. + */ + createdAt?: Date | undefined; + /** + * The date and time when the application was last updated. + */ + updatedAt?: Date | undefined; + /** + * The date and time when the application was deleted. + */ + deletedAt?: Date | null | undefined; + /** + * How Coolify parse the compose file. + */ + composeParsingVersion?: string | undefined; + /** + * Custom Nginx configuration base64 encoded. + */ + customNginxConfiguration?: string | null | undefined; +}; + +/** @internal */ +export const BuildPack$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(BuildPack); + +/** @internal */ +export const BuildPack$outboundSchema: z.ZodNativeEnum = + BuildPack$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace BuildPack$ { + /** @deprecated use `BuildPack$inboundSchema` instead. */ + export const inboundSchema = BuildPack$inboundSchema; + /** @deprecated use `BuildPack$outboundSchema` instead. */ + export const outboundSchema = BuildPack$outboundSchema; +} + +/** @internal */ +export const Redirect$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(Redirect); + +/** @internal */ +export const Redirect$outboundSchema: z.ZodNativeEnum = + Redirect$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Redirect$ { + /** @deprecated use `Redirect$inboundSchema` instead. */ + export const inboundSchema = Redirect$inboundSchema; + /** @deprecated use `Redirect$outboundSchema` instead. */ + export const outboundSchema = Redirect$outboundSchema; +} + +/** @internal */ +export const Application$inboundSchema: z.ZodType< + Application, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + description: z.nullable(z.string()).optional(), + repository_project_id: z.nullable(z.number().int()).optional(), + uuid: z.string().optional(), + name: z.string().optional(), + fqdn: z.nullable(z.string()).optional(), + config_hash: z.string().optional(), + git_repository: z.string().optional(), + git_branch: z.string().optional(), + git_commit_sha: z.string().optional(), + git_full_url: z.nullable(z.string()).optional(), + docker_registry_image_name: z.nullable(z.string()).optional(), + docker_registry_image_tag: z.nullable(z.string()).optional(), + build_pack: BuildPack$inboundSchema.optional(), + static_image: z.string().optional(), + install_command: z.string().optional(), + build_command: z.string().optional(), + start_command: z.string().optional(), + ports_exposes: z.string().optional(), + ports_mappings: z.nullable(z.string()).optional(), + base_directory: z.string().optional(), + publish_directory: z.string().optional(), + health_check_enabled: z.boolean().optional(), + health_check_path: z.string().optional(), + health_check_port: z.nullable(z.string()).optional(), + health_check_host: z.nullable(z.string()).optional(), + health_check_method: z.string().optional(), + health_check_return_code: z.number().int().optional(), + health_check_scheme: z.string().optional(), + health_check_response_text: z.nullable(z.string()).optional(), + health_check_interval: z.number().int().optional(), + health_check_timeout: z.number().int().optional(), + health_check_retries: z.number().int().optional(), + health_check_start_period: z.number().int().optional(), + limits_memory: z.string().optional(), + limits_memory_swap: z.string().optional(), + limits_memory_swappiness: z.number().int().optional(), + limits_memory_reservation: z.string().optional(), + limits_cpus: z.string().optional(), + limits_cpuset: z.nullable(z.string()).optional(), + limits_cpu_shares: z.number().int().optional(), + status: z.string().optional(), + preview_url_template: z.string().optional(), + destination_type: z.string().optional(), + destination_id: z.number().int().optional(), + source_id: z.nullable(z.number().int()).optional(), + private_key_id: z.nullable(z.number().int()).optional(), + environment_id: z.number().int().optional(), + dockerfile: z.nullable(z.string()).optional(), + dockerfile_location: z.string().optional(), + custom_labels: z.nullable(z.string()).optional(), + dockerfile_target_build: z.nullable(z.string()).optional(), + manual_webhook_secret_github: z.nullable(z.string()).optional(), + manual_webhook_secret_gitlab: z.nullable(z.string()).optional(), + manual_webhook_secret_bitbucket: z.nullable(z.string()).optional(), + manual_webhook_secret_gitea: z.nullable(z.string()).optional(), + docker_compose_location: z.string().optional(), + docker_compose: z.nullable(z.string()).optional(), + docker_compose_raw: z.nullable(z.string()).optional(), + docker_compose_domains: z.nullable(z.string()).optional(), + docker_compose_custom_start_command: z.nullable(z.string()).optional(), + docker_compose_custom_build_command: z.nullable(z.string()).optional(), + swarm_replicas: z.nullable(z.number().int()).optional(), + swarm_placement_constraints: z.nullable(z.string()).optional(), + custom_docker_run_options: z.nullable(z.string()).optional(), + post_deployment_command: z.nullable(z.string()).optional(), + post_deployment_command_container: z.nullable(z.string()).optional(), + pre_deployment_command: z.nullable(z.string()).optional(), + pre_deployment_command_container: z.nullable(z.string()).optional(), + watch_paths: z.nullable(z.string()).optional(), + custom_healthcheck_found: z.boolean().optional(), + redirect: z.nullable(Redirect$inboundSchema).optional(), + created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) + .optional(), + updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) + .optional(), + deleted_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + compose_parsing_version: z.string().optional(), + custom_nginx_configuration: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "repository_project_id": "repositoryProjectId", + "config_hash": "configHash", + "git_repository": "gitRepository", + "git_branch": "gitBranch", + "git_commit_sha": "gitCommitSha", + "git_full_url": "gitFullUrl", + "docker_registry_image_name": "dockerRegistryImageName", + "docker_registry_image_tag": "dockerRegistryImageTag", + "build_pack": "buildPack", + "static_image": "staticImage", + "install_command": "installCommand", + "build_command": "buildCommand", + "start_command": "startCommand", + "ports_exposes": "portsExposes", + "ports_mappings": "portsMappings", + "base_directory": "baseDirectory", + "publish_directory": "publishDirectory", + "health_check_enabled": "healthCheckEnabled", + "health_check_path": "healthCheckPath", + "health_check_port": "healthCheckPort", + "health_check_host": "healthCheckHost", + "health_check_method": "healthCheckMethod", + "health_check_return_code": "healthCheckReturnCode", + "health_check_scheme": "healthCheckScheme", + "health_check_response_text": "healthCheckResponseText", + "health_check_interval": "healthCheckInterval", + "health_check_timeout": "healthCheckTimeout", + "health_check_retries": "healthCheckRetries", + "health_check_start_period": "healthCheckStartPeriod", + "limits_memory": "limitsMemory", + "limits_memory_swap": "limitsMemorySwap", + "limits_memory_swappiness": "limitsMemorySwappiness", + "limits_memory_reservation": "limitsMemoryReservation", + "limits_cpus": "limitsCpus", + "limits_cpuset": "limitsCpuset", + "limits_cpu_shares": "limitsCpuShares", + "preview_url_template": "previewUrlTemplate", + "destination_type": "destinationType", + "destination_id": "destinationId", + "source_id": "sourceId", + "private_key_id": "privateKeyId", + "environment_id": "environmentId", + "dockerfile_location": "dockerfileLocation", + "custom_labels": "customLabels", + "dockerfile_target_build": "dockerfileTargetBuild", + "manual_webhook_secret_github": "manualWebhookSecretGithub", + "manual_webhook_secret_gitlab": "manualWebhookSecretGitlab", + "manual_webhook_secret_bitbucket": "manualWebhookSecretBitbucket", + "manual_webhook_secret_gitea": "manualWebhookSecretGitea", + "docker_compose_location": "dockerComposeLocation", + "docker_compose": "dockerCompose", + "docker_compose_raw": "dockerComposeRaw", + "docker_compose_domains": "dockerComposeDomains", + "docker_compose_custom_start_command": "dockerComposeCustomStartCommand", + "docker_compose_custom_build_command": "dockerComposeCustomBuildCommand", + "swarm_replicas": "swarmReplicas", + "swarm_placement_constraints": "swarmPlacementConstraints", + "custom_docker_run_options": "customDockerRunOptions", + "post_deployment_command": "postDeploymentCommand", + "post_deployment_command_container": "postDeploymentCommandContainer", + "pre_deployment_command": "preDeploymentCommand", + "pre_deployment_command_container": "preDeploymentCommandContainer", + "watch_paths": "watchPaths", + "custom_healthcheck_found": "customHealthcheckFound", + "created_at": "createdAt", + "updated_at": "updatedAt", + "deleted_at": "deletedAt", + "compose_parsing_version": "composeParsingVersion", + "custom_nginx_configuration": "customNginxConfiguration", + }); +}); + +/** @internal */ +export type Application$Outbound = { + id?: number | undefined; + description?: string | null | undefined; + repository_project_id?: number | null | undefined; + uuid?: string | undefined; + name?: string | undefined; + fqdn?: string | null | undefined; + config_hash?: string | undefined; + git_repository?: string | undefined; + git_branch?: string | undefined; + git_commit_sha?: string | undefined; + git_full_url?: string | null | undefined; + docker_registry_image_name?: string | null | undefined; + docker_registry_image_tag?: string | null | undefined; + build_pack?: string | undefined; + static_image?: string | undefined; + install_command?: string | undefined; + build_command?: string | undefined; + start_command?: string | undefined; + ports_exposes?: string | undefined; + ports_mappings?: string | null | undefined; + base_directory?: string | undefined; + publish_directory?: string | undefined; + health_check_enabled?: boolean | undefined; + health_check_path?: string | undefined; + health_check_port?: string | null | undefined; + health_check_host?: string | null | undefined; + health_check_method?: string | undefined; + health_check_return_code?: number | undefined; + health_check_scheme?: string | undefined; + health_check_response_text?: string | null | undefined; + health_check_interval?: number | undefined; + health_check_timeout?: number | undefined; + health_check_retries?: number | undefined; + health_check_start_period?: number | undefined; + limits_memory?: string | undefined; + limits_memory_swap?: string | undefined; + limits_memory_swappiness?: number | undefined; + limits_memory_reservation?: string | undefined; + limits_cpus?: string | undefined; + limits_cpuset?: string | null | undefined; + limits_cpu_shares?: number | undefined; + status?: string | undefined; + preview_url_template?: string | undefined; + destination_type?: string | undefined; + destination_id?: number | undefined; + source_id?: number | null | undefined; + private_key_id?: number | null | undefined; + environment_id?: number | undefined; + dockerfile?: string | null | undefined; + dockerfile_location?: string | undefined; + custom_labels?: string | null | undefined; + dockerfile_target_build?: string | null | undefined; + manual_webhook_secret_github?: string | null | undefined; + manual_webhook_secret_gitlab?: string | null | undefined; + manual_webhook_secret_bitbucket?: string | null | undefined; + manual_webhook_secret_gitea?: string | null | undefined; + docker_compose_location?: string | undefined; + docker_compose?: string | null | undefined; + docker_compose_raw?: string | null | undefined; + docker_compose_domains?: string | null | undefined; + docker_compose_custom_start_command?: string | null | undefined; + docker_compose_custom_build_command?: string | null | undefined; + swarm_replicas?: number | null | undefined; + swarm_placement_constraints?: string | null | undefined; + custom_docker_run_options?: string | null | undefined; + post_deployment_command?: string | null | undefined; + post_deployment_command_container?: string | null | undefined; + pre_deployment_command?: string | null | undefined; + pre_deployment_command_container?: string | null | undefined; + watch_paths?: string | null | undefined; + custom_healthcheck_found?: boolean | undefined; + redirect?: string | null | undefined; + created_at?: string | undefined; + updated_at?: string | undefined; + deleted_at?: string | null | undefined; + compose_parsing_version?: string | undefined; + custom_nginx_configuration?: string | null | undefined; +}; + +/** @internal */ +export const Application$outboundSchema: z.ZodType< + Application$Outbound, + z.ZodTypeDef, + Application +> = z.object({ + id: z.number().int().optional(), + description: z.nullable(z.string()).optional(), + repositoryProjectId: z.nullable(z.number().int()).optional(), + uuid: z.string().optional(), + name: z.string().optional(), + fqdn: z.nullable(z.string()).optional(), + configHash: z.string().optional(), + gitRepository: z.string().optional(), + gitBranch: z.string().optional(), + gitCommitSha: z.string().optional(), + gitFullUrl: z.nullable(z.string()).optional(), + dockerRegistryImageName: z.nullable(z.string()).optional(), + dockerRegistryImageTag: z.nullable(z.string()).optional(), + buildPack: BuildPack$outboundSchema.optional(), + staticImage: z.string().optional(), + installCommand: z.string().optional(), + buildCommand: z.string().optional(), + startCommand: z.string().optional(), + portsExposes: z.string().optional(), + portsMappings: z.nullable(z.string()).optional(), + baseDirectory: z.string().optional(), + publishDirectory: z.string().optional(), + healthCheckEnabled: z.boolean().optional(), + healthCheckPath: z.string().optional(), + healthCheckPort: z.nullable(z.string()).optional(), + healthCheckHost: z.nullable(z.string()).optional(), + healthCheckMethod: z.string().optional(), + healthCheckReturnCode: z.number().int().optional(), + healthCheckScheme: z.string().optional(), + healthCheckResponseText: z.nullable(z.string()).optional(), + healthCheckInterval: z.number().int().optional(), + healthCheckTimeout: z.number().int().optional(), + healthCheckRetries: z.number().int().optional(), + healthCheckStartPeriod: z.number().int().optional(), + limitsMemory: z.string().optional(), + limitsMemorySwap: z.string().optional(), + limitsMemorySwappiness: z.number().int().optional(), + limitsMemoryReservation: z.string().optional(), + limitsCpus: z.string().optional(), + limitsCpuset: z.nullable(z.string()).optional(), + limitsCpuShares: z.number().int().optional(), + status: z.string().optional(), + previewUrlTemplate: z.string().optional(), + destinationType: z.string().optional(), + destinationId: z.number().int().optional(), + sourceId: z.nullable(z.number().int()).optional(), + privateKeyId: z.nullable(z.number().int()).optional(), + environmentId: z.number().int().optional(), + dockerfile: z.nullable(z.string()).optional(), + dockerfileLocation: z.string().optional(), + customLabels: z.nullable(z.string()).optional(), + dockerfileTargetBuild: z.nullable(z.string()).optional(), + manualWebhookSecretGithub: z.nullable(z.string()).optional(), + manualWebhookSecretGitlab: z.nullable(z.string()).optional(), + manualWebhookSecretBitbucket: z.nullable(z.string()).optional(), + manualWebhookSecretGitea: z.nullable(z.string()).optional(), + dockerComposeLocation: z.string().optional(), + dockerCompose: z.nullable(z.string()).optional(), + dockerComposeRaw: z.nullable(z.string()).optional(), + dockerComposeDomains: z.nullable(z.string()).optional(), + dockerComposeCustomStartCommand: z.nullable(z.string()).optional(), + dockerComposeCustomBuildCommand: z.nullable(z.string()).optional(), + swarmReplicas: z.nullable(z.number().int()).optional(), + swarmPlacementConstraints: z.nullable(z.string()).optional(), + customDockerRunOptions: z.nullable(z.string()).optional(), + postDeploymentCommand: z.nullable(z.string()).optional(), + postDeploymentCommandContainer: z.nullable(z.string()).optional(), + preDeploymentCommand: z.nullable(z.string()).optional(), + preDeploymentCommandContainer: z.nullable(z.string()).optional(), + watchPaths: z.nullable(z.string()).optional(), + customHealthcheckFound: z.boolean().optional(), + redirect: z.nullable(Redirect$outboundSchema).optional(), + createdAt: z.date().transform(v => v.toISOString()).optional(), + updatedAt: z.date().transform(v => v.toISOString()).optional(), + deletedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + composeParsingVersion: z.string().optional(), + customNginxConfiguration: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + repositoryProjectId: "repository_project_id", + configHash: "config_hash", + gitRepository: "git_repository", + gitBranch: "git_branch", + gitCommitSha: "git_commit_sha", + gitFullUrl: "git_full_url", + dockerRegistryImageName: "docker_registry_image_name", + dockerRegistryImageTag: "docker_registry_image_tag", + buildPack: "build_pack", + staticImage: "static_image", + installCommand: "install_command", + buildCommand: "build_command", + startCommand: "start_command", + portsExposes: "ports_exposes", + portsMappings: "ports_mappings", + baseDirectory: "base_directory", + publishDirectory: "publish_directory", + healthCheckEnabled: "health_check_enabled", + healthCheckPath: "health_check_path", + healthCheckPort: "health_check_port", + healthCheckHost: "health_check_host", + healthCheckMethod: "health_check_method", + healthCheckReturnCode: "health_check_return_code", + healthCheckScheme: "health_check_scheme", + healthCheckResponseText: "health_check_response_text", + healthCheckInterval: "health_check_interval", + healthCheckTimeout: "health_check_timeout", + healthCheckRetries: "health_check_retries", + healthCheckStartPeriod: "health_check_start_period", + limitsMemory: "limits_memory", + limitsMemorySwap: "limits_memory_swap", + limitsMemorySwappiness: "limits_memory_swappiness", + limitsMemoryReservation: "limits_memory_reservation", + limitsCpus: "limits_cpus", + limitsCpuset: "limits_cpuset", + limitsCpuShares: "limits_cpu_shares", + previewUrlTemplate: "preview_url_template", + destinationType: "destination_type", + destinationId: "destination_id", + sourceId: "source_id", + privateKeyId: "private_key_id", + environmentId: "environment_id", + dockerfileLocation: "dockerfile_location", + customLabels: "custom_labels", + dockerfileTargetBuild: "dockerfile_target_build", + manualWebhookSecretGithub: "manual_webhook_secret_github", + manualWebhookSecretGitlab: "manual_webhook_secret_gitlab", + manualWebhookSecretBitbucket: "manual_webhook_secret_bitbucket", + manualWebhookSecretGitea: "manual_webhook_secret_gitea", + dockerComposeLocation: "docker_compose_location", + dockerCompose: "docker_compose", + dockerComposeRaw: "docker_compose_raw", + dockerComposeDomains: "docker_compose_domains", + dockerComposeCustomStartCommand: "docker_compose_custom_start_command", + dockerComposeCustomBuildCommand: "docker_compose_custom_build_command", + swarmReplicas: "swarm_replicas", + swarmPlacementConstraints: "swarm_placement_constraints", + customDockerRunOptions: "custom_docker_run_options", + postDeploymentCommand: "post_deployment_command", + postDeploymentCommandContainer: "post_deployment_command_container", + preDeploymentCommand: "pre_deployment_command", + preDeploymentCommandContainer: "pre_deployment_command_container", + watchPaths: "watch_paths", + customHealthcheckFound: "custom_healthcheck_found", + createdAt: "created_at", + updatedAt: "updated_at", + deletedAt: "deleted_at", + composeParsingVersion: "compose_parsing_version", + customNginxConfiguration: "custom_nginx_configuration", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Application$ { + /** @deprecated use `Application$inboundSchema` instead. */ + export const inboundSchema = Application$inboundSchema; + /** @deprecated use `Application$outboundSchema` instead. */ + export const outboundSchema = Application$outboundSchema; + /** @deprecated use `Application$Outbound` instead. */ + export type Outbound = Application$Outbound; +} + +export function applicationToJSON(application: Application): string { + return JSON.stringify(Application$outboundSchema.parse(application)); +} + +export function applicationFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Application$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Application' from JSON`, + ); +} diff --git a/src/models/components/applicationdeploymentqueue.ts b/src/models/components/applicationdeploymentqueue.ts new file mode 100644 index 0000000..2a041ac --- /dev/null +++ b/src/models/components/applicationdeploymentqueue.ts @@ -0,0 +1,200 @@ +/* + * 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"; + +/** + * Project model + */ +export type ApplicationDeploymentQueue = { + id?: number | undefined; + applicationId?: string | undefined; + deploymentUuid?: string | undefined; + pullRequestId?: number | undefined; + forceRebuild?: boolean | undefined; + commit?: string | undefined; + status?: string | undefined; + isWebhook?: boolean | undefined; + isApi?: boolean | undefined; + createdAt?: string | undefined; + updatedAt?: string | undefined; + logs?: string | undefined; + currentProcessId?: string | undefined; + restartOnly?: boolean | undefined; + gitType?: string | undefined; + serverId?: number | undefined; + applicationName?: string | undefined; + serverName?: string | undefined; + deploymentUrl?: string | undefined; + destinationId?: string | undefined; + onlyThisServer?: boolean | undefined; + rollback?: boolean | undefined; + commitMessage?: string | undefined; +}; + +/** @internal */ +export const ApplicationDeploymentQueue$inboundSchema: z.ZodType< + ApplicationDeploymentQueue, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + application_id: z.string().optional(), + deployment_uuid: z.string().optional(), + pull_request_id: z.number().int().optional(), + force_rebuild: z.boolean().optional(), + commit: z.string().optional(), + status: z.string().optional(), + is_webhook: z.boolean().optional(), + is_api: z.boolean().optional(), + created_at: z.string().optional(), + updated_at: z.string().optional(), + logs: z.string().optional(), + current_process_id: z.string().optional(), + restart_only: z.boolean().optional(), + git_type: z.string().optional(), + server_id: z.number().int().optional(), + application_name: z.string().optional(), + server_name: z.string().optional(), + deployment_url: z.string().optional(), + destination_id: z.string().optional(), + only_this_server: z.boolean().optional(), + rollback: z.boolean().optional(), + commit_message: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "application_id": "applicationId", + "deployment_uuid": "deploymentUuid", + "pull_request_id": "pullRequestId", + "force_rebuild": "forceRebuild", + "is_webhook": "isWebhook", + "is_api": "isApi", + "created_at": "createdAt", + "updated_at": "updatedAt", + "current_process_id": "currentProcessId", + "restart_only": "restartOnly", + "git_type": "gitType", + "server_id": "serverId", + "application_name": "applicationName", + "server_name": "serverName", + "deployment_url": "deploymentUrl", + "destination_id": "destinationId", + "only_this_server": "onlyThisServer", + "commit_message": "commitMessage", + }); +}); + +/** @internal */ +export type ApplicationDeploymentQueue$Outbound = { + id?: number | undefined; + application_id?: string | undefined; + deployment_uuid?: string | undefined; + pull_request_id?: number | undefined; + force_rebuild?: boolean | undefined; + commit?: string | undefined; + status?: string | undefined; + is_webhook?: boolean | undefined; + is_api?: boolean | undefined; + created_at?: string | undefined; + updated_at?: string | undefined; + logs?: string | undefined; + current_process_id?: string | undefined; + restart_only?: boolean | undefined; + git_type?: string | undefined; + server_id?: number | undefined; + application_name?: string | undefined; + server_name?: string | undefined; + deployment_url?: string | undefined; + destination_id?: string | undefined; + only_this_server?: boolean | undefined; + rollback?: boolean | undefined; + commit_message?: string | undefined; +}; + +/** @internal */ +export const ApplicationDeploymentQueue$outboundSchema: z.ZodType< + ApplicationDeploymentQueue$Outbound, + z.ZodTypeDef, + ApplicationDeploymentQueue +> = z.object({ + id: z.number().int().optional(), + applicationId: z.string().optional(), + deploymentUuid: z.string().optional(), + pullRequestId: z.number().int().optional(), + forceRebuild: z.boolean().optional(), + commit: z.string().optional(), + status: z.string().optional(), + isWebhook: z.boolean().optional(), + isApi: z.boolean().optional(), + createdAt: z.string().optional(), + updatedAt: z.string().optional(), + logs: z.string().optional(), + currentProcessId: z.string().optional(), + restartOnly: z.boolean().optional(), + gitType: z.string().optional(), + serverId: z.number().int().optional(), + applicationName: z.string().optional(), + serverName: z.string().optional(), + deploymentUrl: z.string().optional(), + destinationId: z.string().optional(), + onlyThisServer: z.boolean().optional(), + rollback: z.boolean().optional(), + commitMessage: z.string().optional(), +}).transform((v) => { + return remap$(v, { + applicationId: "application_id", + deploymentUuid: "deployment_uuid", + pullRequestId: "pull_request_id", + forceRebuild: "force_rebuild", + isWebhook: "is_webhook", + isApi: "is_api", + createdAt: "created_at", + updatedAt: "updated_at", + currentProcessId: "current_process_id", + restartOnly: "restart_only", + gitType: "git_type", + serverId: "server_id", + applicationName: "application_name", + serverName: "server_name", + deploymentUrl: "deployment_url", + destinationId: "destination_id", + onlyThisServer: "only_this_server", + commitMessage: "commit_message", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ApplicationDeploymentQueue$ { + /** @deprecated use `ApplicationDeploymentQueue$inboundSchema` instead. */ + export const inboundSchema = ApplicationDeploymentQueue$inboundSchema; + /** @deprecated use `ApplicationDeploymentQueue$outboundSchema` instead. */ + export const outboundSchema = ApplicationDeploymentQueue$outboundSchema; + /** @deprecated use `ApplicationDeploymentQueue$Outbound` instead. */ + export type Outbound = ApplicationDeploymentQueue$Outbound; +} + +export function applicationDeploymentQueueToJSON( + applicationDeploymentQueue: ApplicationDeploymentQueue, +): string { + return JSON.stringify( + ApplicationDeploymentQueue$outboundSchema.parse(applicationDeploymentQueue), + ); +} + +export function applicationDeploymentQueueFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ApplicationDeploymentQueue$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ApplicationDeploymentQueue' from JSON`, + ); +} diff --git a/src/models/components/environment.ts b/src/models/components/environment.ts new file mode 100644 index 0000000..7566201 --- /dev/null +++ b/src/models/components/environment.ts @@ -0,0 +1,98 @@ +/* + * 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"; + +/** + * Environment model + */ +export type Environment = { + id?: number | undefined; + name?: string | undefined; + projectId?: number | undefined; + createdAt?: string | undefined; + updatedAt?: string | undefined; + description?: string | undefined; +}; + +/** @internal */ +export const Environment$inboundSchema: z.ZodType< + Environment, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + name: z.string().optional(), + project_id: z.number().int().optional(), + created_at: z.string().optional(), + updated_at: z.string().optional(), + description: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "project_id": "projectId", + "created_at": "createdAt", + "updated_at": "updatedAt", + }); +}); + +/** @internal */ +export type Environment$Outbound = { + id?: number | undefined; + name?: string | undefined; + project_id?: number | undefined; + created_at?: string | undefined; + updated_at?: string | undefined; + description?: string | undefined; +}; + +/** @internal */ +export const Environment$outboundSchema: z.ZodType< + Environment$Outbound, + z.ZodTypeDef, + Environment +> = z.object({ + id: z.number().int().optional(), + name: z.string().optional(), + projectId: z.number().int().optional(), + createdAt: z.string().optional(), + updatedAt: z.string().optional(), + description: z.string().optional(), +}).transform((v) => { + return remap$(v, { + projectId: "project_id", + createdAt: "created_at", + updatedAt: "updated_at", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Environment$ { + /** @deprecated use `Environment$inboundSchema` instead. */ + export const inboundSchema = Environment$inboundSchema; + /** @deprecated use `Environment$outboundSchema` instead. */ + export const outboundSchema = Environment$outboundSchema; + /** @deprecated use `Environment$Outbound` instead. */ + export type Outbound = Environment$Outbound; +} + +export function environmentToJSON(environment: Environment): string { + return JSON.stringify(Environment$outboundSchema.parse(environment)); +} + +export function environmentFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Environment$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Environment' from JSON`, + ); +} diff --git a/src/models/components/environmentvariable.ts b/src/models/components/environmentvariable.ts new file mode 100644 index 0000000..83d7225 --- /dev/null +++ b/src/models/components/environmentvariable.ts @@ -0,0 +1,164 @@ +/* + * 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"; + +/** + * Environment Variable model + */ +export type EnvironmentVariable = { + id?: number | undefined; + uuid?: string | undefined; + applicationId?: number | undefined; + serviceId?: number | undefined; + databaseId?: number | undefined; + isBuildTime?: boolean | undefined; + isLiteral?: boolean | undefined; + isMultiline?: boolean | undefined; + isPreview?: boolean | undefined; + isShared?: boolean | undefined; + isShownOnce?: boolean | undefined; + key?: string | undefined; + value?: string | undefined; + realValue?: string | undefined; + version?: string | undefined; + createdAt?: string | undefined; + updatedAt?: string | undefined; +}; + +/** @internal */ +export const EnvironmentVariable$inboundSchema: z.ZodType< + EnvironmentVariable, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + uuid: z.string().optional(), + application_id: z.number().int().optional(), + service_id: z.number().int().optional(), + database_id: z.number().int().optional(), + is_build_time: z.boolean().optional(), + is_literal: z.boolean().optional(), + is_multiline: z.boolean().optional(), + is_preview: z.boolean().optional(), + is_shared: z.boolean().optional(), + is_shown_once: z.boolean().optional(), + key: z.string().optional(), + value: z.string().optional(), + real_value: z.string().optional(), + version: z.string().optional(), + created_at: z.string().optional(), + updated_at: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "application_id": "applicationId", + "service_id": "serviceId", + "database_id": "databaseId", + "is_build_time": "isBuildTime", + "is_literal": "isLiteral", + "is_multiline": "isMultiline", + "is_preview": "isPreview", + "is_shared": "isShared", + "is_shown_once": "isShownOnce", + "real_value": "realValue", + "created_at": "createdAt", + "updated_at": "updatedAt", + }); +}); + +/** @internal */ +export type EnvironmentVariable$Outbound = { + id?: number | undefined; + uuid?: string | undefined; + application_id?: number | undefined; + service_id?: number | undefined; + database_id?: number | undefined; + is_build_time?: boolean | undefined; + is_literal?: boolean | undefined; + is_multiline?: boolean | undefined; + is_preview?: boolean | undefined; + is_shared?: boolean | undefined; + is_shown_once?: boolean | undefined; + key?: string | undefined; + value?: string | undefined; + real_value?: string | undefined; + version?: string | undefined; + created_at?: string | undefined; + updated_at?: string | undefined; +}; + +/** @internal */ +export const EnvironmentVariable$outboundSchema: z.ZodType< + EnvironmentVariable$Outbound, + z.ZodTypeDef, + EnvironmentVariable +> = z.object({ + id: z.number().int().optional(), + uuid: z.string().optional(), + applicationId: z.number().int().optional(), + serviceId: z.number().int().optional(), + databaseId: z.number().int().optional(), + isBuildTime: z.boolean().optional(), + isLiteral: z.boolean().optional(), + isMultiline: z.boolean().optional(), + isPreview: z.boolean().optional(), + isShared: z.boolean().optional(), + isShownOnce: z.boolean().optional(), + key: z.string().optional(), + value: z.string().optional(), + realValue: z.string().optional(), + version: z.string().optional(), + createdAt: z.string().optional(), + updatedAt: z.string().optional(), +}).transform((v) => { + return remap$(v, { + applicationId: "application_id", + serviceId: "service_id", + databaseId: "database_id", + isBuildTime: "is_build_time", + isLiteral: "is_literal", + isMultiline: "is_multiline", + isPreview: "is_preview", + isShared: "is_shared", + isShownOnce: "is_shown_once", + realValue: "real_value", + createdAt: "created_at", + updatedAt: "updated_at", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace EnvironmentVariable$ { + /** @deprecated use `EnvironmentVariable$inboundSchema` instead. */ + export const inboundSchema = EnvironmentVariable$inboundSchema; + /** @deprecated use `EnvironmentVariable$outboundSchema` instead. */ + export const outboundSchema = EnvironmentVariable$outboundSchema; + /** @deprecated use `EnvironmentVariable$Outbound` instead. */ + export type Outbound = EnvironmentVariable$Outbound; +} + +export function environmentVariableToJSON( + environmentVariable: EnvironmentVariable, +): string { + return JSON.stringify( + EnvironmentVariable$outboundSchema.parse(environmentVariable), + ); +} + +export function environmentVariableFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => EnvironmentVariable$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'EnvironmentVariable' from JSON`, + ); +} diff --git a/src/models/components/index.ts b/src/models/components/index.ts new file mode 100644 index 0000000..f23af95 --- /dev/null +++ b/src/models/components/index.ts @@ -0,0 +1,15 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export * from "./application.js"; +export * from "./applicationdeploymentqueue.js"; +export * from "./environment.js"; +export * from "./environmentvariable.js"; +export * from "./privatekey.js"; +export * from "./project.js"; +export * from "./security.js"; +export * from "./server.js"; +export * from "./service.js"; +export * from "./team.js"; +export * from "./user.js"; diff --git a/src/models/components/privatekey.ts b/src/models/components/privatekey.ts new file mode 100644 index 0000000..8a75a89 --- /dev/null +++ b/src/models/components/privatekey.ts @@ -0,0 +1,114 @@ +/* + * 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"; + +/** + * Private Key model + */ +export type PrivateKey = { + id?: number | undefined; + uuid?: string | undefined; + name?: string | undefined; + description?: string | undefined; + privateKey?: string | undefined; + isGitRelated?: boolean | undefined; + teamId?: number | undefined; + createdAt?: string | undefined; + updatedAt?: string | undefined; +}; + +/** @internal */ +export const PrivateKey$inboundSchema: z.ZodType< + PrivateKey, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + uuid: z.string().optional(), + name: z.string().optional(), + description: z.string().optional(), + private_key: z.string().optional(), + is_git_related: z.boolean().optional(), + team_id: z.number().int().optional(), + created_at: z.string().optional(), + updated_at: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "private_key": "privateKey", + "is_git_related": "isGitRelated", + "team_id": "teamId", + "created_at": "createdAt", + "updated_at": "updatedAt", + }); +}); + +/** @internal */ +export type PrivateKey$Outbound = { + id?: number | undefined; + uuid?: string | undefined; + name?: string | undefined; + description?: string | undefined; + private_key?: string | undefined; + is_git_related?: boolean | undefined; + team_id?: number | undefined; + created_at?: string | undefined; + updated_at?: string | undefined; +}; + +/** @internal */ +export const PrivateKey$outboundSchema: z.ZodType< + PrivateKey$Outbound, + z.ZodTypeDef, + PrivateKey +> = z.object({ + id: z.number().int().optional(), + uuid: z.string().optional(), + name: z.string().optional(), + description: z.string().optional(), + privateKey: z.string().optional(), + isGitRelated: z.boolean().optional(), + teamId: z.number().int().optional(), + createdAt: z.string().optional(), + updatedAt: z.string().optional(), +}).transform((v) => { + return remap$(v, { + privateKey: "private_key", + isGitRelated: "is_git_related", + teamId: "team_id", + createdAt: "created_at", + updatedAt: "updated_at", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PrivateKey$ { + /** @deprecated use `PrivateKey$inboundSchema` instead. */ + export const inboundSchema = PrivateKey$inboundSchema; + /** @deprecated use `PrivateKey$outboundSchema` instead. */ + export const outboundSchema = PrivateKey$outboundSchema; + /** @deprecated use `PrivateKey$Outbound` instead. */ + export type Outbound = PrivateKey$Outbound; +} + +export function privateKeyToJSON(privateKey: PrivateKey): string { + return JSON.stringify(PrivateKey$outboundSchema.parse(privateKey)); +} + +export function privateKeyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PrivateKey$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PrivateKey' from JSON`, + ); +} diff --git a/src/models/components/project.ts b/src/models/components/project.ts new file mode 100644 index 0000000..a709f77 --- /dev/null +++ b/src/models/components/project.ts @@ -0,0 +1,87 @@ +/* + * 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"; +import { + Environment, + Environment$inboundSchema, + Environment$Outbound, + Environment$outboundSchema, +} from "./environment.js"; + +/** + * Project model + */ +export type Project = { + id?: number | undefined; + uuid?: string | undefined; + name?: string | undefined; + description?: string | undefined; + /** + * The environments of the project. + */ + environments?: Array | undefined; +}; + +/** @internal */ +export const Project$inboundSchema: z.ZodType = + z.object({ + id: z.number().int().optional(), + uuid: z.string().optional(), + name: z.string().optional(), + description: z.string().optional(), + environments: z.array(Environment$inboundSchema).optional(), + }); + +/** @internal */ +export type Project$Outbound = { + id?: number | undefined; + uuid?: string | undefined; + name?: string | undefined; + description?: string | undefined; + environments?: Array | undefined; +}; + +/** @internal */ +export const Project$outboundSchema: z.ZodType< + Project$Outbound, + z.ZodTypeDef, + Project +> = z.object({ + id: z.number().int().optional(), + uuid: z.string().optional(), + name: z.string().optional(), + description: z.string().optional(), + environments: z.array(Environment$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 Project$ { + /** @deprecated use `Project$inboundSchema` instead. */ + export const inboundSchema = Project$inboundSchema; + /** @deprecated use `Project$outboundSchema` instead. */ + export const outboundSchema = Project$outboundSchema; + /** @deprecated use `Project$Outbound` instead. */ + export type Outbound = Project$Outbound; +} + +export function projectToJSON(project: Project): string { + return JSON.stringify(Project$outboundSchema.parse(project)); +} + +export function projectFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Project$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Project' from JSON`, + ); +} diff --git a/src/models/components/security.ts b/src/models/components/security.ts new file mode 100644 index 0000000..00256b0 --- /dev/null +++ b/src/models/components/security.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 Security = { + bearerAuth?: string | undefined; +}; + +/** @internal */ +export const Security$inboundSchema: z.ZodType< + Security, + z.ZodTypeDef, + unknown +> = z.object({ + bearerAuth: z.string().optional(), +}); + +/** @internal */ +export type Security$Outbound = { + bearerAuth?: string | undefined; +}; + +/** @internal */ +export const Security$outboundSchema: z.ZodType< + Security$Outbound, + z.ZodTypeDef, + Security +> = z.object({ + bearerAuth: 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 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/models/components/server.ts b/src/models/components/server.ts new file mode 100644 index 0000000..a7ea58c --- /dev/null +++ b/src/models/components/server.ts @@ -0,0 +1,281 @@ +/* + * 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"; + +/** + * The proxy configuration. + */ +export type Proxy = {}; + +/** + * The proxy type. + */ +export const ProxyType = { + Traefik: "traefik", + Caddy: "caddy", + None: "none", +} as const; +/** + * The proxy type. + */ +export type ProxyType = ClosedEnum; + +/** + * Server model + */ +export type Server = { + /** + * The server ID. + */ + id?: number | undefined; + /** + * The server UUID. + */ + uuid?: string | undefined; + /** + * The server name. + */ + name?: string | undefined; + /** + * The server description. + */ + description?: string | undefined; + /** + * The IP address. + */ + ip?: string | undefined; + /** + * The user. + */ + user?: string | undefined; + /** + * The port number. + */ + port?: number | undefined; + /** + * The proxy configuration. + */ + proxy?: Proxy | undefined; + /** + * The proxy type. + */ + proxyType?: ProxyType | undefined; + /** + * The flag to indicate if the high disk usage notification has been sent. + */ + highDiskUsageNotificationSent?: boolean | undefined; + /** + * The flag to indicate if the unreachable notification has been sent. + */ + unreachableNotificationSent?: boolean | undefined; + /** + * The unreachable count for your server. + */ + unreachableCount?: number | undefined; + /** + * The validation logs. + */ + validationLogs?: string | undefined; + /** + * The flag to indicate if the log drain notification has been sent. + */ + logDrainNotificationSent?: boolean | undefined; + /** + * The swarm cluster configuration. + */ + swarmCluster?: string | undefined; + /** + * The flag to indicate if the unused volumes should be deleted. + */ + deleteUnusedVolumes?: boolean | undefined; + /** + * The flag to indicate if the unused networks should be deleted. + */ + deleteUnusedNetworks?: boolean | undefined; +}; + +/** @internal */ +export const Proxy$inboundSchema: z.ZodType = z + .object({}); + +/** @internal */ +export type Proxy$Outbound = {}; + +/** @internal */ +export const Proxy$outboundSchema: z.ZodType< + Proxy$Outbound, + z.ZodTypeDef, + Proxy +> = 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 Proxy$ { + /** @deprecated use `Proxy$inboundSchema` instead. */ + export const inboundSchema = Proxy$inboundSchema; + /** @deprecated use `Proxy$outboundSchema` instead. */ + export const outboundSchema = Proxy$outboundSchema; + /** @deprecated use `Proxy$Outbound` instead. */ + export type Outbound = Proxy$Outbound; +} + +export function proxyToJSON(proxy: Proxy): string { + return JSON.stringify(Proxy$outboundSchema.parse(proxy)); +} + +export function proxyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Proxy$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Proxy' from JSON`, + ); +} + +/** @internal */ +export const ProxyType$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(ProxyType); + +/** @internal */ +export const ProxyType$outboundSchema: z.ZodNativeEnum = + ProxyType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ProxyType$ { + /** @deprecated use `ProxyType$inboundSchema` instead. */ + export const inboundSchema = ProxyType$inboundSchema; + /** @deprecated use `ProxyType$outboundSchema` instead. */ + export const outboundSchema = ProxyType$outboundSchema; +} + +/** @internal */ +export const Server$inboundSchema: z.ZodType = z + .object({ + id: z.number().int().optional(), + uuid: z.string().optional(), + name: z.string().optional(), + description: z.string().optional(), + ip: z.string().optional(), + user: z.string().optional(), + port: z.number().int().optional(), + proxy: z.lazy(() => Proxy$inboundSchema).optional(), + proxy_type: ProxyType$inboundSchema.optional(), + high_disk_usage_notification_sent: z.boolean().optional(), + unreachable_notification_sent: z.boolean().optional(), + unreachable_count: z.number().int().optional(), + validation_logs: z.string().optional(), + log_drain_notification_sent: z.boolean().optional(), + swarm_cluster: z.string().optional(), + delete_unused_volumes: z.boolean().optional(), + delete_unused_networks: z.boolean().optional(), + }).transform((v) => { + return remap$(v, { + "proxy_type": "proxyType", + "high_disk_usage_notification_sent": "highDiskUsageNotificationSent", + "unreachable_notification_sent": "unreachableNotificationSent", + "unreachable_count": "unreachableCount", + "validation_logs": "validationLogs", + "log_drain_notification_sent": "logDrainNotificationSent", + "swarm_cluster": "swarmCluster", + "delete_unused_volumes": "deleteUnusedVolumes", + "delete_unused_networks": "deleteUnusedNetworks", + }); + }); + +/** @internal */ +export type Server$Outbound = { + id?: number | undefined; + uuid?: string | undefined; + name?: string | undefined; + description?: string | undefined; + ip?: string | undefined; + user?: string | undefined; + port?: number | undefined; + proxy?: Proxy$Outbound | undefined; + proxy_type?: string | undefined; + high_disk_usage_notification_sent?: boolean | undefined; + unreachable_notification_sent?: boolean | undefined; + unreachable_count?: number | undefined; + validation_logs?: string | undefined; + log_drain_notification_sent?: boolean | undefined; + swarm_cluster?: string | undefined; + delete_unused_volumes?: boolean | undefined; + delete_unused_networks?: boolean | undefined; +}; + +/** @internal */ +export const Server$outboundSchema: z.ZodType< + Server$Outbound, + z.ZodTypeDef, + Server +> = z.object({ + id: z.number().int().optional(), + uuid: z.string().optional(), + name: z.string().optional(), + description: z.string().optional(), + ip: z.string().optional(), + user: z.string().optional(), + port: z.number().int().optional(), + proxy: z.lazy(() => Proxy$outboundSchema).optional(), + proxyType: ProxyType$outboundSchema.optional(), + highDiskUsageNotificationSent: z.boolean().optional(), + unreachableNotificationSent: z.boolean().optional(), + unreachableCount: z.number().int().optional(), + validationLogs: z.string().optional(), + logDrainNotificationSent: z.boolean().optional(), + swarmCluster: z.string().optional(), + deleteUnusedVolumes: z.boolean().optional(), + deleteUnusedNetworks: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + proxyType: "proxy_type", + highDiskUsageNotificationSent: "high_disk_usage_notification_sent", + unreachableNotificationSent: "unreachable_notification_sent", + unreachableCount: "unreachable_count", + validationLogs: "validation_logs", + logDrainNotificationSent: "log_drain_notification_sent", + swarmCluster: "swarm_cluster", + deleteUnusedVolumes: "delete_unused_volumes", + deleteUnusedNetworks: "delete_unused_networks", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Server$ { + /** @deprecated use `Server$inboundSchema` instead. */ + export const inboundSchema = Server$inboundSchema; + /** @deprecated use `Server$outboundSchema` instead. */ + export const outboundSchema = Server$outboundSchema; + /** @deprecated use `Server$Outbound` instead. */ + export type Outbound = Server$Outbound; +} + +export function serverToJSON(server: Server): string { + return JSON.stringify(Server$outboundSchema.parse(server)); +} + +export function serverFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Server$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Server' from JSON`, + ); +} diff --git a/src/models/components/service.ts b/src/models/components/service.ts new file mode 100644 index 0000000..2048577 --- /dev/null +++ b/src/models/components/service.ts @@ -0,0 +1,219 @@ +/* + * 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"; + +/** + * Service model + */ +export type Service = { + /** + * The unique identifier of the service. Only used for database identification. + */ + id?: number | undefined; + /** + * The unique identifier of the service. + */ + uuid?: string | undefined; + /** + * The name of the service. + */ + name?: string | undefined; + /** + * The unique identifier of the environment where the service is attached to. + */ + environmentId?: number | undefined; + /** + * The unique identifier of the server where the service is running. + */ + serverId?: number | undefined; + /** + * The description of the service. + */ + description?: string | undefined; + /** + * The raw docker-compose.yml file of the service. + */ + dockerComposeRaw?: string | undefined; + /** + * The docker-compose.yml file that is parsed and modified by Coolify. + */ + dockerCompose?: string | undefined; + /** + * Destination type. + */ + destinationType?: string | undefined; + /** + * The unique identifier of the destination where the service is running. + */ + destinationId?: number | undefined; + /** + * The flag to connect the service to the predefined Docker network. + */ + connectToDockerNetwork?: boolean | undefined; + /** + * The flag to enable the container label escape. + */ + isContainerLabelEscapeEnabled?: boolean | undefined; + /** + * The flag to enable the container label readonly. + */ + isContainerLabelReadonlyEnabled?: boolean | undefined; + /** + * The hash of the service configuration. + */ + configHash?: string | undefined; + /** + * The type of the service. + */ + serviceType?: string | undefined; + /** + * The date and time when the service was created. + */ + createdAt?: string | undefined; + /** + * The date and time when the service was last updated. + */ + updatedAt?: string | undefined; + /** + * The date and time when the service was deleted. + */ + deletedAt?: string | undefined; +}; + +/** @internal */ +export const Service$inboundSchema: z.ZodType = + z.object({ + id: z.number().int().optional(), + uuid: z.string().optional(), + name: z.string().optional(), + environment_id: z.number().int().optional(), + server_id: z.number().int().optional(), + description: z.string().optional(), + docker_compose_raw: z.string().optional(), + docker_compose: z.string().optional(), + destination_type: z.string().optional(), + destination_id: z.number().int().optional(), + connect_to_docker_network: z.boolean().optional(), + is_container_label_escape_enabled: z.boolean().optional(), + is_container_label_readonly_enabled: z.boolean().optional(), + config_hash: z.string().optional(), + service_type: z.string().optional(), + created_at: z.string().optional(), + updated_at: z.string().optional(), + deleted_at: z.string().optional(), + }).transform((v) => { + return remap$(v, { + "environment_id": "environmentId", + "server_id": "serverId", + "docker_compose_raw": "dockerComposeRaw", + "docker_compose": "dockerCompose", + "destination_type": "destinationType", + "destination_id": "destinationId", + "connect_to_docker_network": "connectToDockerNetwork", + "is_container_label_escape_enabled": "isContainerLabelEscapeEnabled", + "is_container_label_readonly_enabled": "isContainerLabelReadonlyEnabled", + "config_hash": "configHash", + "service_type": "serviceType", + "created_at": "createdAt", + "updated_at": "updatedAt", + "deleted_at": "deletedAt", + }); + }); + +/** @internal */ +export type Service$Outbound = { + id?: number | undefined; + uuid?: string | undefined; + name?: string | undefined; + environment_id?: number | undefined; + server_id?: number | undefined; + description?: string | undefined; + docker_compose_raw?: string | undefined; + docker_compose?: string | undefined; + destination_type?: string | undefined; + destination_id?: number | undefined; + connect_to_docker_network?: boolean | undefined; + is_container_label_escape_enabled?: boolean | undefined; + is_container_label_readonly_enabled?: boolean | undefined; + config_hash?: string | undefined; + service_type?: string | undefined; + created_at?: string | undefined; + updated_at?: string | undefined; + deleted_at?: string | undefined; +}; + +/** @internal */ +export const Service$outboundSchema: z.ZodType< + Service$Outbound, + z.ZodTypeDef, + Service +> = z.object({ + id: z.number().int().optional(), + uuid: z.string().optional(), + name: z.string().optional(), + environmentId: z.number().int().optional(), + serverId: z.number().int().optional(), + description: z.string().optional(), + dockerComposeRaw: z.string().optional(), + dockerCompose: z.string().optional(), + destinationType: z.string().optional(), + destinationId: z.number().int().optional(), + connectToDockerNetwork: z.boolean().optional(), + isContainerLabelEscapeEnabled: z.boolean().optional(), + isContainerLabelReadonlyEnabled: z.boolean().optional(), + configHash: z.string().optional(), + serviceType: z.string().optional(), + createdAt: z.string().optional(), + updatedAt: z.string().optional(), + deletedAt: z.string().optional(), +}).transform((v) => { + return remap$(v, { + environmentId: "environment_id", + serverId: "server_id", + dockerComposeRaw: "docker_compose_raw", + dockerCompose: "docker_compose", + destinationType: "destination_type", + destinationId: "destination_id", + connectToDockerNetwork: "connect_to_docker_network", + isContainerLabelEscapeEnabled: "is_container_label_escape_enabled", + isContainerLabelReadonlyEnabled: "is_container_label_readonly_enabled", + configHash: "config_hash", + serviceType: "service_type", + createdAt: "created_at", + updatedAt: "updated_at", + deletedAt: "deleted_at", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Service$ { + /** @deprecated use `Service$inboundSchema` instead. */ + export const inboundSchema = Service$inboundSchema; + /** @deprecated use `Service$outboundSchema` instead. */ + export const outboundSchema = Service$outboundSchema; + /** @deprecated use `Service$Outbound` instead. */ + export type Outbound = Service$Outbound; +} + +export function serviceToJSON(service: Service): string { + return JSON.stringify(Service$outboundSchema.parse(service)); +} + +export function serviceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Service$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Service' from JSON`, + ); +} diff --git a/src/models/components/team.ts b/src/models/components/team.ts new file mode 100644 index 0000000..b043d6c --- /dev/null +++ b/src/models/components/team.ts @@ -0,0 +1,529 @@ +/* + * 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"; +import { + User, + User$inboundSchema, + User$Outbound, + User$outboundSchema, +} from "./user.js"; + +/** + * Team model + */ +export type Team = { + /** + * The unique identifier of the team. + */ + id?: number | undefined; + /** + * The name of the team. + */ + name?: string | undefined; + /** + * The description of the team. + */ + description?: string | undefined; + /** + * Whether the team is personal or not. + */ + personalTeam?: boolean | undefined; + /** + * The date and time the team was created. + */ + createdAt?: string | undefined; + /** + * The date and time the team was last updated. + */ + updatedAt?: string | undefined; + /** + * Whether SMTP is enabled or not. + */ + smtpEnabled?: boolean | undefined; + /** + * The email address to send emails from. + */ + smtpFromAddress?: string | undefined; + /** + * The name to send emails from. + */ + smtpFromName?: string | undefined; + /** + * The email addresses to send emails to. + */ + smtpRecipients?: string | undefined; + /** + * The SMTP host. + */ + smtpHost?: string | undefined; + /** + * The SMTP port. + */ + smtpPort?: string | undefined; + /** + * The SMTP encryption. + */ + smtpEncryption?: string | undefined; + /** + * The SMTP username. + */ + smtpUsername?: string | undefined; + /** + * The SMTP password. + */ + smtpPassword?: string | undefined; + /** + * The SMTP timeout. + */ + smtpTimeout?: string | undefined; + /** + * Whether to send test notifications via SMTP. + */ + smtpNotificationsTest?: boolean | undefined; + /** + * Whether to send deployment notifications via SMTP. + */ + smtpNotificationsDeployments?: boolean | undefined; + /** + * Whether to send status change notifications via SMTP. + */ + smtpNotificationsStatusChanges?: boolean | undefined; + /** + * Whether to send scheduled task notifications via SMTP. + */ + smtpNotificationsScheduledTasks?: boolean | undefined; + /** + * Whether to send database backup notifications via SMTP. + */ + smtpNotificationsDatabaseBackups?: boolean | undefined; + /** + * Whether to send server disk usage notifications via SMTP. + */ + smtpNotificationsServerDiskUsage?: boolean | undefined; + /** + * Whether Discord is enabled or not. + */ + discordEnabled?: boolean | undefined; + /** + * The Discord webhook URL. + */ + discordWebhookUrl?: string | undefined; + /** + * Whether to send test notifications via Discord. + */ + discordNotificationsTest?: boolean | undefined; + /** + * Whether to send deployment notifications via Discord. + */ + discordNotificationsDeployments?: boolean | undefined; + /** + * Whether to send status change notifications via Discord. + */ + discordNotificationsStatusChanges?: boolean | undefined; + /** + * Whether to send database backup notifications via Discord. + */ + discordNotificationsDatabaseBackups?: boolean | undefined; + /** + * Whether to send scheduled task notifications via Discord. + */ + discordNotificationsScheduledTasks?: boolean | undefined; + /** + * Whether to send server disk usage notifications via Discord. + */ + discordNotificationsServerDiskUsage?: boolean | undefined; + /** + * Whether to show the boarding screen or not. + */ + showBoarding?: boolean | undefined; + /** + * Whether to enable resending or not. + */ + resendEnabled?: boolean | undefined; + /** + * The resending API key. + */ + resendApiKey?: string | undefined; + /** + * Whether to use instance email settings or not. + */ + useInstanceEmailSettings?: boolean | undefined; + /** + * Whether Telegram is enabled or not. + */ + telegramEnabled?: boolean | undefined; + /** + * The Telegram token. + */ + telegramToken?: string | undefined; + /** + * The Telegram chat ID. + */ + telegramChatId?: string | undefined; + /** + * Whether to send test notifications via Telegram. + */ + telegramNotificationsTest?: boolean | undefined; + /** + * Whether to send deployment notifications via Telegram. + */ + telegramNotificationsDeployments?: boolean | undefined; + /** + * Whether to send status change notifications via Telegram. + */ + telegramNotificationsStatusChanges?: boolean | undefined; + /** + * Whether to send database backup notifications via Telegram. + */ + telegramNotificationsDatabaseBackups?: boolean | undefined; + /** + * The Telegram test message thread ID. + */ + telegramNotificationsTestMessageThreadId?: string | undefined; + /** + * The Telegram deployment message thread ID. + */ + telegramNotificationsDeploymentsMessageThreadId?: string | undefined; + /** + * The Telegram status change message thread ID. + */ + telegramNotificationsStatusChangesMessageThreadId?: string | undefined; + /** + * The Telegram database backup message thread ID. + */ + telegramNotificationsDatabaseBackupsMessageThreadId?: string | undefined; + /** + * The custom server limit. + */ + customServerLimit?: string | undefined; + /** + * Whether to send scheduled task notifications via Telegram. + */ + telegramNotificationsScheduledTasks?: boolean | undefined; + /** + * The Telegram scheduled task message thread ID. + */ + telegramNotificationsScheduledTasksThreadId?: string | undefined; + /** + * The members of the team. + */ + members?: Array | undefined; +}; + +/** @internal */ +export const Team$inboundSchema: z.ZodType = z + .object({ + id: z.number().int().optional(), + name: z.string().optional(), + description: z.string().optional(), + personal_team: z.boolean().optional(), + created_at: z.string().optional(), + updated_at: z.string().optional(), + smtp_enabled: z.boolean().optional(), + smtp_from_address: z.string().optional(), + smtp_from_name: z.string().optional(), + smtp_recipients: z.string().optional(), + smtp_host: z.string().optional(), + smtp_port: z.string().optional(), + smtp_encryption: z.string().optional(), + smtp_username: z.string().optional(), + smtp_password: z.string().optional(), + smtp_timeout: z.string().optional(), + smtp_notifications_test: z.boolean().optional(), + smtp_notifications_deployments: z.boolean().optional(), + smtp_notifications_status_changes: z.boolean().optional(), + smtp_notifications_scheduled_tasks: z.boolean().optional(), + smtp_notifications_database_backups: z.boolean().optional(), + smtp_notifications_server_disk_usage: z.boolean().optional(), + discord_enabled: z.boolean().optional(), + discord_webhook_url: z.string().optional(), + discord_notifications_test: z.boolean().optional(), + discord_notifications_deployments: z.boolean().optional(), + discord_notifications_status_changes: z.boolean().optional(), + discord_notifications_database_backups: z.boolean().optional(), + discord_notifications_scheduled_tasks: z.boolean().optional(), + discord_notifications_server_disk_usage: z.boolean().optional(), + show_boarding: z.boolean().optional(), + resend_enabled: z.boolean().optional(), + resend_api_key: z.string().optional(), + use_instance_email_settings: z.boolean().optional(), + telegram_enabled: z.boolean().optional(), + telegram_token: z.string().optional(), + telegram_chat_id: z.string().optional(), + telegram_notifications_test: z.boolean().optional(), + telegram_notifications_deployments: z.boolean().optional(), + telegram_notifications_status_changes: z.boolean().optional(), + telegram_notifications_database_backups: z.boolean().optional(), + telegram_notifications_test_message_thread_id: z.string().optional(), + telegram_notifications_deployments_message_thread_id: z.string().optional(), + telegram_notifications_status_changes_message_thread_id: z.string() + .optional(), + telegram_notifications_database_backups_message_thread_id: z.string() + .optional(), + custom_server_limit: z.string().optional(), + telegram_notifications_scheduled_tasks: z.boolean().optional(), + telegram_notifications_scheduled_tasks_thread_id: z.string().optional(), + members: z.array(User$inboundSchema).optional(), + }).transform((v) => { + return remap$(v, { + "personal_team": "personalTeam", + "created_at": "createdAt", + "updated_at": "updatedAt", + "smtp_enabled": "smtpEnabled", + "smtp_from_address": "smtpFromAddress", + "smtp_from_name": "smtpFromName", + "smtp_recipients": "smtpRecipients", + "smtp_host": "smtpHost", + "smtp_port": "smtpPort", + "smtp_encryption": "smtpEncryption", + "smtp_username": "smtpUsername", + "smtp_password": "smtpPassword", + "smtp_timeout": "smtpTimeout", + "smtp_notifications_test": "smtpNotificationsTest", + "smtp_notifications_deployments": "smtpNotificationsDeployments", + "smtp_notifications_status_changes": "smtpNotificationsStatusChanges", + "smtp_notifications_scheduled_tasks": "smtpNotificationsScheduledTasks", + "smtp_notifications_database_backups": "smtpNotificationsDatabaseBackups", + "smtp_notifications_server_disk_usage": + "smtpNotificationsServerDiskUsage", + "discord_enabled": "discordEnabled", + "discord_webhook_url": "discordWebhookUrl", + "discord_notifications_test": "discordNotificationsTest", + "discord_notifications_deployments": "discordNotificationsDeployments", + "discord_notifications_status_changes": + "discordNotificationsStatusChanges", + "discord_notifications_database_backups": + "discordNotificationsDatabaseBackups", + "discord_notifications_scheduled_tasks": + "discordNotificationsScheduledTasks", + "discord_notifications_server_disk_usage": + "discordNotificationsServerDiskUsage", + "show_boarding": "showBoarding", + "resend_enabled": "resendEnabled", + "resend_api_key": "resendApiKey", + "use_instance_email_settings": "useInstanceEmailSettings", + "telegram_enabled": "telegramEnabled", + "telegram_token": "telegramToken", + "telegram_chat_id": "telegramChatId", + "telegram_notifications_test": "telegramNotificationsTest", + "telegram_notifications_deployments": "telegramNotificationsDeployments", + "telegram_notifications_status_changes": + "telegramNotificationsStatusChanges", + "telegram_notifications_database_backups": + "telegramNotificationsDatabaseBackups", + "telegram_notifications_test_message_thread_id": + "telegramNotificationsTestMessageThreadId", + "telegram_notifications_deployments_message_thread_id": + "telegramNotificationsDeploymentsMessageThreadId", + "telegram_notifications_status_changes_message_thread_id": + "telegramNotificationsStatusChangesMessageThreadId", + "telegram_notifications_database_backups_message_thread_id": + "telegramNotificationsDatabaseBackupsMessageThreadId", + "custom_server_limit": "customServerLimit", + "telegram_notifications_scheduled_tasks": + "telegramNotificationsScheduledTasks", + "telegram_notifications_scheduled_tasks_thread_id": + "telegramNotificationsScheduledTasksThreadId", + }); + }); + +/** @internal */ +export type Team$Outbound = { + id?: number | undefined; + name?: string | undefined; + description?: string | undefined; + personal_team?: boolean | undefined; + created_at?: string | undefined; + updated_at?: string | undefined; + smtp_enabled?: boolean | undefined; + smtp_from_address?: string | undefined; + smtp_from_name?: string | undefined; + smtp_recipients?: string | undefined; + smtp_host?: string | undefined; + smtp_port?: string | undefined; + smtp_encryption?: string | undefined; + smtp_username?: string | undefined; + smtp_password?: string | undefined; + smtp_timeout?: string | undefined; + smtp_notifications_test?: boolean | undefined; + smtp_notifications_deployments?: boolean | undefined; + smtp_notifications_status_changes?: boolean | undefined; + smtp_notifications_scheduled_tasks?: boolean | undefined; + smtp_notifications_database_backups?: boolean | undefined; + smtp_notifications_server_disk_usage?: boolean | undefined; + discord_enabled?: boolean | undefined; + discord_webhook_url?: string | undefined; + discord_notifications_test?: boolean | undefined; + discord_notifications_deployments?: boolean | undefined; + discord_notifications_status_changes?: boolean | undefined; + discord_notifications_database_backups?: boolean | undefined; + discord_notifications_scheduled_tasks?: boolean | undefined; + discord_notifications_server_disk_usage?: boolean | undefined; + show_boarding?: boolean | undefined; + resend_enabled?: boolean | undefined; + resend_api_key?: string | undefined; + use_instance_email_settings?: boolean | undefined; + telegram_enabled?: boolean | undefined; + telegram_token?: string | undefined; + telegram_chat_id?: string | undefined; + telegram_notifications_test?: boolean | undefined; + telegram_notifications_deployments?: boolean | undefined; + telegram_notifications_status_changes?: boolean | undefined; + telegram_notifications_database_backups?: boolean | undefined; + telegram_notifications_test_message_thread_id?: string | undefined; + telegram_notifications_deployments_message_thread_id?: string | undefined; + telegram_notifications_status_changes_message_thread_id?: string | undefined; + telegram_notifications_database_backups_message_thread_id?: + | string + | undefined; + custom_server_limit?: string | undefined; + telegram_notifications_scheduled_tasks?: boolean | undefined; + telegram_notifications_scheduled_tasks_thread_id?: string | undefined; + members?: Array | undefined; +}; + +/** @internal */ +export const Team$outboundSchema: z.ZodType = + z.object({ + id: z.number().int().optional(), + name: z.string().optional(), + description: z.string().optional(), + personalTeam: z.boolean().optional(), + createdAt: z.string().optional(), + updatedAt: z.string().optional(), + smtpEnabled: z.boolean().optional(), + smtpFromAddress: z.string().optional(), + smtpFromName: z.string().optional(), + smtpRecipients: z.string().optional(), + smtpHost: z.string().optional(), + smtpPort: z.string().optional(), + smtpEncryption: z.string().optional(), + smtpUsername: z.string().optional(), + smtpPassword: z.string().optional(), + smtpTimeout: z.string().optional(), + smtpNotificationsTest: z.boolean().optional(), + smtpNotificationsDeployments: z.boolean().optional(), + smtpNotificationsStatusChanges: z.boolean().optional(), + smtpNotificationsScheduledTasks: z.boolean().optional(), + smtpNotificationsDatabaseBackups: z.boolean().optional(), + smtpNotificationsServerDiskUsage: z.boolean().optional(), + discordEnabled: z.boolean().optional(), + discordWebhookUrl: z.string().optional(), + discordNotificationsTest: z.boolean().optional(), + discordNotificationsDeployments: z.boolean().optional(), + discordNotificationsStatusChanges: z.boolean().optional(), + discordNotificationsDatabaseBackups: z.boolean().optional(), + discordNotificationsScheduledTasks: z.boolean().optional(), + discordNotificationsServerDiskUsage: z.boolean().optional(), + showBoarding: z.boolean().optional(), + resendEnabled: z.boolean().optional(), + resendApiKey: z.string().optional(), + useInstanceEmailSettings: z.boolean().optional(), + telegramEnabled: z.boolean().optional(), + telegramToken: z.string().optional(), + telegramChatId: z.string().optional(), + telegramNotificationsTest: z.boolean().optional(), + telegramNotificationsDeployments: z.boolean().optional(), + telegramNotificationsStatusChanges: z.boolean().optional(), + telegramNotificationsDatabaseBackups: z.boolean().optional(), + telegramNotificationsTestMessageThreadId: z.string().optional(), + telegramNotificationsDeploymentsMessageThreadId: z.string().optional(), + telegramNotificationsStatusChangesMessageThreadId: z.string().optional(), + telegramNotificationsDatabaseBackupsMessageThreadId: z.string().optional(), + customServerLimit: z.string().optional(), + telegramNotificationsScheduledTasks: z.boolean().optional(), + telegramNotificationsScheduledTasksThreadId: z.string().optional(), + members: z.array(User$outboundSchema).optional(), + }).transform((v) => { + return remap$(v, { + personalTeam: "personal_team", + createdAt: "created_at", + updatedAt: "updated_at", + smtpEnabled: "smtp_enabled", + smtpFromAddress: "smtp_from_address", + smtpFromName: "smtp_from_name", + smtpRecipients: "smtp_recipients", + smtpHost: "smtp_host", + smtpPort: "smtp_port", + smtpEncryption: "smtp_encryption", + smtpUsername: "smtp_username", + smtpPassword: "smtp_password", + smtpTimeout: "smtp_timeout", + smtpNotificationsTest: "smtp_notifications_test", + smtpNotificationsDeployments: "smtp_notifications_deployments", + smtpNotificationsStatusChanges: "smtp_notifications_status_changes", + smtpNotificationsScheduledTasks: "smtp_notifications_scheduled_tasks", + smtpNotificationsDatabaseBackups: "smtp_notifications_database_backups", + smtpNotificationsServerDiskUsage: "smtp_notifications_server_disk_usage", + discordEnabled: "discord_enabled", + discordWebhookUrl: "discord_webhook_url", + discordNotificationsTest: "discord_notifications_test", + discordNotificationsDeployments: "discord_notifications_deployments", + discordNotificationsStatusChanges: "discord_notifications_status_changes", + discordNotificationsDatabaseBackups: + "discord_notifications_database_backups", + discordNotificationsScheduledTasks: + "discord_notifications_scheduled_tasks", + discordNotificationsServerDiskUsage: + "discord_notifications_server_disk_usage", + showBoarding: "show_boarding", + resendEnabled: "resend_enabled", + resendApiKey: "resend_api_key", + useInstanceEmailSettings: "use_instance_email_settings", + telegramEnabled: "telegram_enabled", + telegramToken: "telegram_token", + telegramChatId: "telegram_chat_id", + telegramNotificationsTest: "telegram_notifications_test", + telegramNotificationsDeployments: "telegram_notifications_deployments", + telegramNotificationsStatusChanges: + "telegram_notifications_status_changes", + telegramNotificationsDatabaseBackups: + "telegram_notifications_database_backups", + telegramNotificationsTestMessageThreadId: + "telegram_notifications_test_message_thread_id", + telegramNotificationsDeploymentsMessageThreadId: + "telegram_notifications_deployments_message_thread_id", + telegramNotificationsStatusChangesMessageThreadId: + "telegram_notifications_status_changes_message_thread_id", + telegramNotificationsDatabaseBackupsMessageThreadId: + "telegram_notifications_database_backups_message_thread_id", + customServerLimit: "custom_server_limit", + telegramNotificationsScheduledTasks: + "telegram_notifications_scheduled_tasks", + telegramNotificationsScheduledTasksThreadId: + "telegram_notifications_scheduled_tasks_thread_id", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Team$ { + /** @deprecated use `Team$inboundSchema` instead. */ + export const inboundSchema = Team$inboundSchema; + /** @deprecated use `Team$outboundSchema` instead. */ + export const outboundSchema = Team$outboundSchema; + /** @deprecated use `Team$Outbound` instead. */ + export type Outbound = Team$Outbound; +} + +export function teamToJSON(team: Team): string { + return JSON.stringify(Team$outboundSchema.parse(team)); +} + +export function teamFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Team$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Team' from JSON`, + ); +} diff --git a/src/models/components/user.ts b/src/models/components/user.ts new file mode 100644 index 0000000..c1dd415 --- /dev/null +++ b/src/models/components/user.ts @@ -0,0 +1,137 @@ +/* + * 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"; + +/** + * User model + */ +export type User = { + /** + * The user identifier in the database. + */ + id?: number | undefined; + /** + * The user name. + */ + name?: string | undefined; + /** + * The user email. + */ + email?: string | undefined; + /** + * The date when the user email was verified. + */ + emailVerifiedAt?: string | undefined; + /** + * The date when the user was created. + */ + createdAt?: string | undefined; + /** + * The date when the user was updated. + */ + updatedAt?: string | undefined; + /** + * The date when the user two factor was confirmed. + */ + twoFactorConfirmedAt?: string | undefined; + /** + * The flag to force the user to reset the password. + */ + forcePasswordReset?: boolean | undefined; + /** + * The flag to receive marketing emails. + */ + marketingEmails?: boolean | undefined; +}; + +/** @internal */ +export const User$inboundSchema: z.ZodType = z + .object({ + id: z.number().int().optional(), + name: z.string().optional(), + email: z.string().optional(), + email_verified_at: z.string().optional(), + created_at: z.string().optional(), + updated_at: z.string().optional(), + two_factor_confirmed_at: z.string().optional(), + force_password_reset: z.boolean().optional(), + marketing_emails: z.boolean().optional(), + }).transform((v) => { + return remap$(v, { + "email_verified_at": "emailVerifiedAt", + "created_at": "createdAt", + "updated_at": "updatedAt", + "two_factor_confirmed_at": "twoFactorConfirmedAt", + "force_password_reset": "forcePasswordReset", + "marketing_emails": "marketingEmails", + }); + }); + +/** @internal */ +export type User$Outbound = { + id?: number | undefined; + name?: string | undefined; + email?: string | undefined; + email_verified_at?: string | undefined; + created_at?: string | undefined; + updated_at?: string | undefined; + two_factor_confirmed_at?: string | undefined; + force_password_reset?: boolean | undefined; + marketing_emails?: boolean | undefined; +}; + +/** @internal */ +export const User$outboundSchema: z.ZodType = + z.object({ + id: z.number().int().optional(), + name: z.string().optional(), + email: z.string().optional(), + emailVerifiedAt: z.string().optional(), + createdAt: z.string().optional(), + updatedAt: z.string().optional(), + twoFactorConfirmedAt: z.string().optional(), + forcePasswordReset: z.boolean().optional(), + marketingEmails: z.boolean().optional(), + }).transform((v) => { + return remap$(v, { + emailVerifiedAt: "email_verified_at", + createdAt: "created_at", + updatedAt: "updated_at", + twoFactorConfirmedAt: "two_factor_confirmed_at", + forcePasswordReset: "force_password_reset", + marketingEmails: "marketing_emails", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace User$ { + /** @deprecated use `User$inboundSchema` instead. */ + export const inboundSchema = User$inboundSchema; + /** @deprecated use `User$outboundSchema` instead. */ + export const outboundSchema = User$outboundSchema; + /** @deprecated use `User$Outbound` instead. */ + export type Outbound = User$Outbound; +} + +export function userToJSON(user: User): string { + return JSON.stringify(User$outboundSchema.parse(user)); +} + +export function userFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => User$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'User' from JSON`, + ); +} diff --git a/src/models/errors/apierror.ts b/src/models/errors/apierror.ts new file mode 100644 index 0000000..3a04a1c --- /dev/null +++ b/src/models/errors/apierror.ts @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export class APIError extends Error { + public readonly statusCode: number; + public readonly contentType: string; + + constructor( + message: string, + public readonly rawResponse: Response, + public readonly body: string = "", + ) { + const statusCode = rawResponse.status; + const contentType = rawResponse.headers.get("content-type") || ""; + const bodyString = body.length > 0 ? `\n${body}` : ""; + + super( + `${message}: Status ${statusCode} Content-Type ${contentType} Body ${bodyString}`, + ); + + this.statusCode = statusCode; + this.contentType = contentType; + + this.name = "APIError"; + } +} diff --git a/src/models/errors/badrequest.ts b/src/models/errors/badrequest.ts new file mode 100644 index 0000000..3c80f18 --- /dev/null +++ b/src/models/errors/badrequest.ts @@ -0,0 +1,71 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * Invalid token. + */ +export type BadRequestData = { + message?: string | undefined; +}; + +/** + * Invalid token. + */ +export class BadRequest extends Error { + /** The original data that was passed to this error instance. */ + data$: BadRequestData; + + constructor(err: BadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; + + this.name = "BadRequest"; + } +} + +/** @internal */ +export const BadRequest$inboundSchema: z.ZodType< + BadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + message: z.string().optional(), +}) + .transform((v) => { + return new BadRequest(v); + }); + +/** @internal */ +export type BadRequest$Outbound = { + message?: string | undefined; +}; + +/** @internal */ +export const BadRequest$outboundSchema: z.ZodType< + BadRequest$Outbound, + z.ZodTypeDef, + BadRequest +> = z.instanceof(BadRequest) + .transform(v => v.data$) + .pipe(z.object({ + message: 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 BadRequest$ { + /** @deprecated use `BadRequest$inboundSchema` instead. */ + export const inboundSchema = BadRequest$inboundSchema; + /** @deprecated use `BadRequest$outboundSchema` instead. */ + export const outboundSchema = BadRequest$outboundSchema; + /** @deprecated use `BadRequest$Outbound` instead. */ + export type Outbound = BadRequest$Outbound; +} diff --git a/src/models/errors/disableapi.ts b/src/models/errors/disableapi.ts new file mode 100644 index 0000000..8648f83 --- /dev/null +++ b/src/models/errors/disableapi.ts @@ -0,0 +1,71 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * You are not allowed to disable the API. + */ +export type DisableApiResponseBodyData = { + message?: string | undefined; +}; + +/** + * You are not allowed to disable the API. + */ +export class DisableApiResponseBody extends Error { + /** The original data that was passed to this error instance. */ + data$: DisableApiResponseBodyData; + + constructor(err: DisableApiResponseBodyData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; + + this.name = "DisableApiResponseBody"; + } +} + +/** @internal */ +export const DisableApiResponseBody$inboundSchema: z.ZodType< + DisableApiResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + message: z.string().optional(), +}) + .transform((v) => { + return new DisableApiResponseBody(v); + }); + +/** @internal */ +export type DisableApiResponseBody$Outbound = { + message?: string | undefined; +}; + +/** @internal */ +export const DisableApiResponseBody$outboundSchema: z.ZodType< + DisableApiResponseBody$Outbound, + z.ZodTypeDef, + DisableApiResponseBody +> = z.instanceof(DisableApiResponseBody) + .transform(v => v.data$) + .pipe(z.object({ + message: 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 DisableApiResponseBody$ { + /** @deprecated use `DisableApiResponseBody$inboundSchema` instead. */ + export const inboundSchema = DisableApiResponseBody$inboundSchema; + /** @deprecated use `DisableApiResponseBody$outboundSchema` instead. */ + export const outboundSchema = DisableApiResponseBody$outboundSchema; + /** @deprecated use `DisableApiResponseBody$Outbound` instead. */ + export type Outbound = DisableApiResponseBody$Outbound; +} diff --git a/src/models/errors/enableapi.ts b/src/models/errors/enableapi.ts new file mode 100644 index 0000000..4920dea --- /dev/null +++ b/src/models/errors/enableapi.ts @@ -0,0 +1,71 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * You are not allowed to enable the API. + */ +export type EnableApiResponseBodyData = { + message?: string | undefined; +}; + +/** + * You are not allowed to enable the API. + */ +export class EnableApiResponseBody extends Error { + /** The original data that was passed to this error instance. */ + data$: EnableApiResponseBodyData; + + constructor(err: EnableApiResponseBodyData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; + + this.name = "EnableApiResponseBody"; + } +} + +/** @internal */ +export const EnableApiResponseBody$inboundSchema: z.ZodType< + EnableApiResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + message: z.string().optional(), +}) + .transform((v) => { + return new EnableApiResponseBody(v); + }); + +/** @internal */ +export type EnableApiResponseBody$Outbound = { + message?: string | undefined; +}; + +/** @internal */ +export const EnableApiResponseBody$outboundSchema: z.ZodType< + EnableApiResponseBody$Outbound, + z.ZodTypeDef, + EnableApiResponseBody +> = z.instanceof(EnableApiResponseBody) + .transform(v => v.data$) + .pipe(z.object({ + message: 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 EnableApiResponseBody$ { + /** @deprecated use `EnableApiResponseBody$inboundSchema` instead. */ + export const inboundSchema = EnableApiResponseBody$inboundSchema; + /** @deprecated use `EnableApiResponseBody$outboundSchema` instead. */ + export const outboundSchema = EnableApiResponseBody$outboundSchema; + /** @deprecated use `EnableApiResponseBody$Outbound` instead. */ + export type Outbound = EnableApiResponseBody$Outbound; +} 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..ed98489 --- /dev/null +++ b/src/models/errors/index.ts @@ -0,0 +1,15 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export * from "./apierror.js"; +export * from "./badrequest.js"; +export * from "./disableapi.js"; +export * from "./enableapi.js"; +export * from "./httpclienterrors.js"; +export * from "./internalservererror.js"; +export * from "./notfound.js"; +export * from "./ratelimited.js"; +export * from "./sdkvalidationerror.js"; +export * from "./timeout.js"; +export * from "./unauthenticated.js"; diff --git a/src/models/errors/internalservererror.ts b/src/models/errors/internalservererror.ts new file mode 100644 index 0000000..8959026 --- /dev/null +++ b/src/models/errors/internalservererror.ts @@ -0,0 +1,96 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { collectExtraKeys as collectExtraKeys$ } from "../../lib/schemas.js"; + +/** + * A collection of status codes that generally mean the server failed in an unexpected way + */ +export type InternalServerErrorData = { + message?: string | undefined; + + additionalProperties: { [k: string]: any }; +}; + +/** + * A collection of status codes that generally mean the server failed in an unexpected way + */ +export class InternalServerError extends Error { + additionalProperties: { [k: string]: any } = {}; + + /** The original data that was passed to this error instance. */ + data$: InternalServerErrorData; + + constructor(err: InternalServerErrorData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; + + if (err.additionalProperties != null) { + this.additionalProperties = err.additionalProperties; + } + + this.name = "InternalServerError"; + } +} + +/** @internal */ +export const InternalServerError$inboundSchema: z.ZodType< + InternalServerError, + z.ZodTypeDef, + unknown +> = collectExtraKeys$( + z.object({ + message: z.string().optional(), + }) + .catchall(z.any()), + "additionalProperties", +) + .transform((v) => { + return new InternalServerError(v); + }); + +/** @internal */ +export type InternalServerError$Outbound = { + message?: string | undefined; + [additionalProperties: string]: unknown; +}; + +/** @internal */ +export const InternalServerError$outboundSchema: z.ZodType< + InternalServerError$Outbound, + z.ZodTypeDef, + InternalServerError +> = z.instanceof(InternalServerError) + .transform(v => v.data$) + .pipe( + z.object({ + message: z.string().optional(), + additionalProperties: z.record(z.any()), + }).transform((v) => { + return { + ...v.additionalProperties, + ...remap$(v, { + additionalProperties: null, + }), + }; + }), + ); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace InternalServerError$ { + /** @deprecated use `InternalServerError$inboundSchema` instead. */ + export const inboundSchema = InternalServerError$inboundSchema; + /** @deprecated use `InternalServerError$outboundSchema` instead. */ + export const outboundSchema = InternalServerError$outboundSchema; + /** @deprecated use `InternalServerError$Outbound` instead. */ + export type Outbound = InternalServerError$Outbound; +} diff --git a/src/models/errors/notfound.ts b/src/models/errors/notfound.ts new file mode 100644 index 0000000..335c056 --- /dev/null +++ b/src/models/errors/notfound.ts @@ -0,0 +1,71 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * Resource not found. + */ +export type NotFoundData = { + message?: string | undefined; +}; + +/** + * Resource not found. + */ +export class NotFound extends Error { + /** The original data that was passed to this error instance. */ + data$: NotFoundData; + + constructor(err: NotFoundData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; + + this.name = "NotFound"; + } +} + +/** @internal */ +export const NotFound$inboundSchema: z.ZodType< + NotFound, + z.ZodTypeDef, + unknown +> = z.object({ + message: z.string().optional(), +}) + .transform((v) => { + return new NotFound(v); + }); + +/** @internal */ +export type NotFound$Outbound = { + message?: string | undefined; +}; + +/** @internal */ +export const NotFound$outboundSchema: z.ZodType< + NotFound$Outbound, + z.ZodTypeDef, + NotFound +> = z.instanceof(NotFound) + .transform(v => v.data$) + .pipe(z.object({ + message: 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 NotFound$ { + /** @deprecated use `NotFound$inboundSchema` instead. */ + export const inboundSchema = NotFound$inboundSchema; + /** @deprecated use `NotFound$outboundSchema` instead. */ + export const outboundSchema = NotFound$outboundSchema; + /** @deprecated use `NotFound$Outbound` instead. */ + export type Outbound = NotFound$Outbound; +} diff --git a/src/models/errors/ratelimited.ts b/src/models/errors/ratelimited.ts new file mode 100644 index 0000000..1145973 --- /dev/null +++ b/src/models/errors/ratelimited.ts @@ -0,0 +1,96 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { collectExtraKeys as collectExtraKeys$ } from "../../lib/schemas.js"; + +/** + * Status codes relating to the client being rate limited by the server + */ +export type RateLimitedData = { + message?: string | undefined; + + additionalProperties: { [k: string]: any }; +}; + +/** + * Status codes relating to the client being rate limited by the server + */ +export class RateLimited extends Error { + additionalProperties: { [k: string]: any } = {}; + + /** The original data that was passed to this error instance. */ + data$: RateLimitedData; + + constructor(err: RateLimitedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; + + if (err.additionalProperties != null) { + this.additionalProperties = err.additionalProperties; + } + + this.name = "RateLimited"; + } +} + +/** @internal */ +export const RateLimited$inboundSchema: z.ZodType< + RateLimited, + z.ZodTypeDef, + unknown +> = collectExtraKeys$( + z.object({ + message: z.string().optional(), + }) + .catchall(z.any()), + "additionalProperties", +) + .transform((v) => { + return new RateLimited(v); + }); + +/** @internal */ +export type RateLimited$Outbound = { + message?: string | undefined; + [additionalProperties: string]: unknown; +}; + +/** @internal */ +export const RateLimited$outboundSchema: z.ZodType< + RateLimited$Outbound, + z.ZodTypeDef, + RateLimited +> = z.instanceof(RateLimited) + .transform(v => v.data$) + .pipe( + z.object({ + message: z.string().optional(), + additionalProperties: z.record(z.any()), + }).transform((v) => { + return { + ...v.additionalProperties, + ...remap$(v, { + additionalProperties: null, + }), + }; + }), + ); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RateLimited$ { + /** @deprecated use `RateLimited$inboundSchema` instead. */ + export const inboundSchema = RateLimited$inboundSchema; + /** @deprecated use `RateLimited$outboundSchema` instead. */ + export const outboundSchema = RateLimited$outboundSchema; + /** @deprecated use `RateLimited$Outbound` instead. */ + export type Outbound = RateLimited$Outbound; +} diff --git a/src/models/errors/sdkvalidationerror.ts b/src/models/errors/sdkvalidationerror.ts new file mode 100644 index 0000000..16929b9 --- /dev/null +++ b/src/models/errors/sdkvalidationerror.ts @@ -0,0 +1,97 @@ +/* + * 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; + + 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/errors/timeout.ts b/src/models/errors/timeout.ts new file mode 100644 index 0000000..380a81e --- /dev/null +++ b/src/models/errors/timeout.ts @@ -0,0 +1,93 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { collectExtraKeys as collectExtraKeys$ } from "../../lib/schemas.js"; + +/** + * Timeouts occurred with the request + */ +export type TimeoutData = { + message?: string | undefined; + + additionalProperties: { [k: string]: any }; +}; + +/** + * Timeouts occurred with the request + */ +export class Timeout extends Error { + additionalProperties: { [k: string]: any } = {}; + + /** The original data that was passed to this error instance. */ + data$: TimeoutData; + + constructor(err: TimeoutData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; + + if (err.additionalProperties != null) { + this.additionalProperties = err.additionalProperties; + } + + this.name = "Timeout"; + } +} + +/** @internal */ +export const Timeout$inboundSchema: z.ZodType = + collectExtraKeys$( + z.object({ + message: z.string().optional(), + }) + .catchall(z.any()), + "additionalProperties", + ) + .transform((v) => { + return new Timeout(v); + }); + +/** @internal */ +export type Timeout$Outbound = { + message?: string | undefined; + [additionalProperties: string]: unknown; +}; + +/** @internal */ +export const Timeout$outboundSchema: z.ZodType< + Timeout$Outbound, + z.ZodTypeDef, + Timeout +> = z.instanceof(Timeout) + .transform(v => v.data$) + .pipe( + z.object({ + message: z.string().optional(), + additionalProperties: z.record(z.any()), + }).transform((v) => { + return { + ...v.additionalProperties, + ...remap$(v, { + additionalProperties: null, + }), + }; + }), + ); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Timeout$ { + /** @deprecated use `Timeout$inboundSchema` instead. */ + export const inboundSchema = Timeout$inboundSchema; + /** @deprecated use `Timeout$outboundSchema` instead. */ + export const outboundSchema = Timeout$outboundSchema; + /** @deprecated use `Timeout$Outbound` instead. */ + export type Outbound = Timeout$Outbound; +} diff --git a/src/models/errors/unauthenticated.ts b/src/models/errors/unauthenticated.ts new file mode 100644 index 0000000..a8d44c0 --- /dev/null +++ b/src/models/errors/unauthenticated.ts @@ -0,0 +1,71 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * Unauthenticated. + */ +export type UnauthenticatedData = { + message?: string | undefined; +}; + +/** + * Unauthenticated. + */ +export class Unauthenticated extends Error { + /** The original data that was passed to this error instance. */ + data$: UnauthenticatedData; + + constructor(err: UnauthenticatedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; + + this.name = "Unauthenticated"; + } +} + +/** @internal */ +export const Unauthenticated$inboundSchema: z.ZodType< + Unauthenticated, + z.ZodTypeDef, + unknown +> = z.object({ + message: z.string().optional(), +}) + .transform((v) => { + return new Unauthenticated(v); + }); + +/** @internal */ +export type Unauthenticated$Outbound = { + message?: string | undefined; +}; + +/** @internal */ +export const Unauthenticated$outboundSchema: z.ZodType< + Unauthenticated$Outbound, + z.ZodTypeDef, + Unauthenticated +> = z.instanceof(Unauthenticated) + .transform(v => v.data$) + .pipe(z.object({ + message: 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 Unauthenticated$ { + /** @deprecated use `Unauthenticated$inboundSchema` instead. */ + export const inboundSchema = Unauthenticated$inboundSchema; + /** @deprecated use `Unauthenticated$outboundSchema` instead. */ + export const outboundSchema = Unauthenticated$outboundSchema; + /** @deprecated use `Unauthenticated$Outbound` instead. */ + export type Outbound = Unauthenticated$Outbound; +} diff --git a/src/models/operations/createdatabaseclickhouse.ts b/src/models/operations/createdatabaseclickhouse.ts new file mode 100644 index 0000000..f2fc4b3 --- /dev/null +++ b/src/models/operations/createdatabaseclickhouse.ts @@ -0,0 +1,242 @@ +/* + * 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"; + +/** + * Database data + */ +export type CreateDatabaseClickhouseRequestBody = { + /** + * UUID of the server + */ + serverUuid: string; + /** + * UUID of the project + */ + projectUuid: string; + /** + * Name of the environment + */ + environmentName: string; + /** + * UUID of the destination if the server has multiple destinations + */ + destinationUuid?: string | undefined; + /** + * Clickhouse admin user + */ + clickhouseAdminUser?: string | undefined; + /** + * Clickhouse admin password + */ + clickhouseAdminPassword?: string | undefined; + /** + * Name of the database + */ + name?: string | undefined; + /** + * Description of the database + */ + description?: string | undefined; + /** + * Docker Image of the database + */ + image?: string | undefined; + /** + * Is the database public? + */ + isPublic?: boolean | undefined; + /** + * Public port of the database + */ + publicPort?: number | undefined; + /** + * Memory limit of the database + */ + limitsMemory?: string | undefined; + /** + * Memory swap limit of the database + */ + limitsMemorySwap?: string | undefined; + /** + * Memory swappiness of the database + */ + limitsMemorySwappiness?: number | undefined; + /** + * Memory reservation of the database + */ + limitsMemoryReservation?: string | undefined; + /** + * CPU limit of the database + */ + limitsCpus?: string | undefined; + /** + * CPU set of the database + */ + limitsCpuset?: string | undefined; + /** + * CPU shares of the database + */ + limitsCpuShares?: number | undefined; + /** + * Instant deploy the database + */ + instantDeploy?: boolean | undefined; +}; + +/** @internal */ +export const CreateDatabaseClickhouseRequestBody$inboundSchema: z.ZodType< + CreateDatabaseClickhouseRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + server_uuid: z.string(), + project_uuid: z.string(), + environment_name: z.string(), + destination_uuid: z.string().optional(), + clickhouse_admin_user: z.string().optional(), + clickhouse_admin_password: z.string().optional(), + name: z.string().optional(), + description: z.string().optional(), + image: z.string().optional(), + is_public: z.boolean().optional(), + public_port: z.number().int().optional(), + limits_memory: z.string().optional(), + limits_memory_swap: z.string().optional(), + limits_memory_swappiness: z.number().int().optional(), + limits_memory_reservation: z.string().optional(), + limits_cpus: z.string().optional(), + limits_cpuset: z.string().optional(), + limits_cpu_shares: z.number().int().optional(), + instant_deploy: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + "server_uuid": "serverUuid", + "project_uuid": "projectUuid", + "environment_name": "environmentName", + "destination_uuid": "destinationUuid", + "clickhouse_admin_user": "clickhouseAdminUser", + "clickhouse_admin_password": "clickhouseAdminPassword", + "is_public": "isPublic", + "public_port": "publicPort", + "limits_memory": "limitsMemory", + "limits_memory_swap": "limitsMemorySwap", + "limits_memory_swappiness": "limitsMemorySwappiness", + "limits_memory_reservation": "limitsMemoryReservation", + "limits_cpus": "limitsCpus", + "limits_cpuset": "limitsCpuset", + "limits_cpu_shares": "limitsCpuShares", + "instant_deploy": "instantDeploy", + }); +}); + +/** @internal */ +export type CreateDatabaseClickhouseRequestBody$Outbound = { + server_uuid: string; + project_uuid: string; + environment_name: string; + destination_uuid?: string | undefined; + clickhouse_admin_user?: string | undefined; + clickhouse_admin_password?: string | undefined; + name?: string | undefined; + description?: string | undefined; + image?: string | undefined; + is_public?: boolean | undefined; + public_port?: number | undefined; + limits_memory?: string | undefined; + limits_memory_swap?: string | undefined; + limits_memory_swappiness?: number | undefined; + limits_memory_reservation?: string | undefined; + limits_cpus?: string | undefined; + limits_cpuset?: string | undefined; + limits_cpu_shares?: number | undefined; + instant_deploy?: boolean | undefined; +}; + +/** @internal */ +export const CreateDatabaseClickhouseRequestBody$outboundSchema: z.ZodType< + CreateDatabaseClickhouseRequestBody$Outbound, + z.ZodTypeDef, + CreateDatabaseClickhouseRequestBody +> = z.object({ + serverUuid: z.string(), + projectUuid: z.string(), + environmentName: z.string(), + destinationUuid: z.string().optional(), + clickhouseAdminUser: z.string().optional(), + clickhouseAdminPassword: z.string().optional(), + name: z.string().optional(), + description: z.string().optional(), + image: z.string().optional(), + isPublic: z.boolean().optional(), + publicPort: z.number().int().optional(), + limitsMemory: z.string().optional(), + limitsMemorySwap: z.string().optional(), + limitsMemorySwappiness: z.number().int().optional(), + limitsMemoryReservation: z.string().optional(), + limitsCpus: z.string().optional(), + limitsCpuset: z.string().optional(), + limitsCpuShares: z.number().int().optional(), + instantDeploy: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + serverUuid: "server_uuid", + projectUuid: "project_uuid", + environmentName: "environment_name", + destinationUuid: "destination_uuid", + clickhouseAdminUser: "clickhouse_admin_user", + clickhouseAdminPassword: "clickhouse_admin_password", + isPublic: "is_public", + publicPort: "public_port", + limitsMemory: "limits_memory", + limitsMemorySwap: "limits_memory_swap", + limitsMemorySwappiness: "limits_memory_swappiness", + limitsMemoryReservation: "limits_memory_reservation", + limitsCpus: "limits_cpus", + limitsCpuset: "limits_cpuset", + limitsCpuShares: "limits_cpu_shares", + instantDeploy: "instant_deploy", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateDatabaseClickhouseRequestBody$ { + /** @deprecated use `CreateDatabaseClickhouseRequestBody$inboundSchema` instead. */ + export const inboundSchema = + CreateDatabaseClickhouseRequestBody$inboundSchema; + /** @deprecated use `CreateDatabaseClickhouseRequestBody$outboundSchema` instead. */ + export const outboundSchema = + CreateDatabaseClickhouseRequestBody$outboundSchema; + /** @deprecated use `CreateDatabaseClickhouseRequestBody$Outbound` instead. */ + export type Outbound = CreateDatabaseClickhouseRequestBody$Outbound; +} + +export function createDatabaseClickhouseRequestBodyToJSON( + createDatabaseClickhouseRequestBody: CreateDatabaseClickhouseRequestBody, +): string { + return JSON.stringify( + CreateDatabaseClickhouseRequestBody$outboundSchema.parse( + createDatabaseClickhouseRequestBody, + ), + ); +} + +export function createDatabaseClickhouseRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + CreateDatabaseClickhouseRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateDatabaseClickhouseRequestBody' from JSON`, + ); +} diff --git a/src/models/operations/createdatabasedragonfly.ts b/src/models/operations/createdatabasedragonfly.ts new file mode 100644 index 0000000..d4ad33a --- /dev/null +++ b/src/models/operations/createdatabasedragonfly.ts @@ -0,0 +1,232 @@ +/* + * 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"; + +/** + * Database data + */ +export type CreateDatabaseDragonflyRequestBody = { + /** + * UUID of the server + */ + serverUuid: string; + /** + * UUID of the project + */ + projectUuid: string; + /** + * Name of the environment + */ + environmentName: string; + /** + * UUID of the destination if the server has multiple destinations + */ + destinationUuid?: string | undefined; + /** + * DragonFly password + */ + dragonflyPassword?: string | undefined; + /** + * Name of the database + */ + name?: string | undefined; + /** + * Description of the database + */ + description?: string | undefined; + /** + * Docker Image of the database + */ + image?: string | undefined; + /** + * Is the database public? + */ + isPublic?: boolean | undefined; + /** + * Public port of the database + */ + publicPort?: number | undefined; + /** + * Memory limit of the database + */ + limitsMemory?: string | undefined; + /** + * Memory swap limit of the database + */ + limitsMemorySwap?: string | undefined; + /** + * Memory swappiness of the database + */ + limitsMemorySwappiness?: number | undefined; + /** + * Memory reservation of the database + */ + limitsMemoryReservation?: string | undefined; + /** + * CPU limit of the database + */ + limitsCpus?: string | undefined; + /** + * CPU set of the database + */ + limitsCpuset?: string | undefined; + /** + * CPU shares of the database + */ + limitsCpuShares?: number | undefined; + /** + * Instant deploy the database + */ + instantDeploy?: boolean | undefined; +}; + +/** @internal */ +export const CreateDatabaseDragonflyRequestBody$inboundSchema: z.ZodType< + CreateDatabaseDragonflyRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + server_uuid: z.string(), + project_uuid: z.string(), + environment_name: z.string(), + destination_uuid: z.string().optional(), + dragonfly_password: z.string().optional(), + name: z.string().optional(), + description: z.string().optional(), + image: z.string().optional(), + is_public: z.boolean().optional(), + public_port: z.number().int().optional(), + limits_memory: z.string().optional(), + limits_memory_swap: z.string().optional(), + limits_memory_swappiness: z.number().int().optional(), + limits_memory_reservation: z.string().optional(), + limits_cpus: z.string().optional(), + limits_cpuset: z.string().optional(), + limits_cpu_shares: z.number().int().optional(), + instant_deploy: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + "server_uuid": "serverUuid", + "project_uuid": "projectUuid", + "environment_name": "environmentName", + "destination_uuid": "destinationUuid", + "dragonfly_password": "dragonflyPassword", + "is_public": "isPublic", + "public_port": "publicPort", + "limits_memory": "limitsMemory", + "limits_memory_swap": "limitsMemorySwap", + "limits_memory_swappiness": "limitsMemorySwappiness", + "limits_memory_reservation": "limitsMemoryReservation", + "limits_cpus": "limitsCpus", + "limits_cpuset": "limitsCpuset", + "limits_cpu_shares": "limitsCpuShares", + "instant_deploy": "instantDeploy", + }); +}); + +/** @internal */ +export type CreateDatabaseDragonflyRequestBody$Outbound = { + server_uuid: string; + project_uuid: string; + environment_name: string; + destination_uuid?: string | undefined; + dragonfly_password?: string | undefined; + name?: string | undefined; + description?: string | undefined; + image?: string | undefined; + is_public?: boolean | undefined; + public_port?: number | undefined; + limits_memory?: string | undefined; + limits_memory_swap?: string | undefined; + limits_memory_swappiness?: number | undefined; + limits_memory_reservation?: string | undefined; + limits_cpus?: string | undefined; + limits_cpuset?: string | undefined; + limits_cpu_shares?: number | undefined; + instant_deploy?: boolean | undefined; +}; + +/** @internal */ +export const CreateDatabaseDragonflyRequestBody$outboundSchema: z.ZodType< + CreateDatabaseDragonflyRequestBody$Outbound, + z.ZodTypeDef, + CreateDatabaseDragonflyRequestBody +> = z.object({ + serverUuid: z.string(), + projectUuid: z.string(), + environmentName: z.string(), + destinationUuid: z.string().optional(), + dragonflyPassword: z.string().optional(), + name: z.string().optional(), + description: z.string().optional(), + image: z.string().optional(), + isPublic: z.boolean().optional(), + publicPort: z.number().int().optional(), + limitsMemory: z.string().optional(), + limitsMemorySwap: z.string().optional(), + limitsMemorySwappiness: z.number().int().optional(), + limitsMemoryReservation: z.string().optional(), + limitsCpus: z.string().optional(), + limitsCpuset: z.string().optional(), + limitsCpuShares: z.number().int().optional(), + instantDeploy: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + serverUuid: "server_uuid", + projectUuid: "project_uuid", + environmentName: "environment_name", + destinationUuid: "destination_uuid", + dragonflyPassword: "dragonfly_password", + isPublic: "is_public", + publicPort: "public_port", + limitsMemory: "limits_memory", + limitsMemorySwap: "limits_memory_swap", + limitsMemorySwappiness: "limits_memory_swappiness", + limitsMemoryReservation: "limits_memory_reservation", + limitsCpus: "limits_cpus", + limitsCpuset: "limits_cpuset", + limitsCpuShares: "limits_cpu_shares", + instantDeploy: "instant_deploy", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateDatabaseDragonflyRequestBody$ { + /** @deprecated use `CreateDatabaseDragonflyRequestBody$inboundSchema` instead. */ + export const inboundSchema = CreateDatabaseDragonflyRequestBody$inboundSchema; + /** @deprecated use `CreateDatabaseDragonflyRequestBody$outboundSchema` instead. */ + export const outboundSchema = + CreateDatabaseDragonflyRequestBody$outboundSchema; + /** @deprecated use `CreateDatabaseDragonflyRequestBody$Outbound` instead. */ + export type Outbound = CreateDatabaseDragonflyRequestBody$Outbound; +} + +export function createDatabaseDragonflyRequestBodyToJSON( + createDatabaseDragonflyRequestBody: CreateDatabaseDragonflyRequestBody, +): string { + return JSON.stringify( + CreateDatabaseDragonflyRequestBody$outboundSchema.parse( + createDatabaseDragonflyRequestBody, + ), + ); +} + +export function createDatabaseDragonflyRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + CreateDatabaseDragonflyRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateDatabaseDragonflyRequestBody' from JSON`, + ); +} diff --git a/src/models/operations/createdatabasekeydb.ts b/src/models/operations/createdatabasekeydb.ts new file mode 100644 index 0000000..fb81937 --- /dev/null +++ b/src/models/operations/createdatabasekeydb.ts @@ -0,0 +1,239 @@ +/* + * 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"; + +/** + * Database data + */ +export type CreateDatabaseKeydbRequestBody = { + /** + * UUID of the server + */ + serverUuid: string; + /** + * UUID of the project + */ + projectUuid: string; + /** + * Name of the environment + */ + environmentName: string; + /** + * UUID of the destination if the server has multiple destinations + */ + destinationUuid?: string | undefined; + /** + * KeyDB password + */ + keydbPassword?: string | undefined; + /** + * KeyDB conf + */ + keydbConf?: string | undefined; + /** + * Name of the database + */ + name?: string | undefined; + /** + * Description of the database + */ + description?: string | undefined; + /** + * Docker Image of the database + */ + image?: string | undefined; + /** + * Is the database public? + */ + isPublic?: boolean | undefined; + /** + * Public port of the database + */ + publicPort?: number | undefined; + /** + * Memory limit of the database + */ + limitsMemory?: string | undefined; + /** + * Memory swap limit of the database + */ + limitsMemorySwap?: string | undefined; + /** + * Memory swappiness of the database + */ + limitsMemorySwappiness?: number | undefined; + /** + * Memory reservation of the database + */ + limitsMemoryReservation?: string | undefined; + /** + * CPU limit of the database + */ + limitsCpus?: string | undefined; + /** + * CPU set of the database + */ + limitsCpuset?: string | undefined; + /** + * CPU shares of the database + */ + limitsCpuShares?: number | undefined; + /** + * Instant deploy the database + */ + instantDeploy?: boolean | undefined; +}; + +/** @internal */ +export const CreateDatabaseKeydbRequestBody$inboundSchema: z.ZodType< + CreateDatabaseKeydbRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + server_uuid: z.string(), + project_uuid: z.string(), + environment_name: z.string(), + destination_uuid: z.string().optional(), + keydb_password: z.string().optional(), + keydb_conf: z.string().optional(), + name: z.string().optional(), + description: z.string().optional(), + image: z.string().optional(), + is_public: z.boolean().optional(), + public_port: z.number().int().optional(), + limits_memory: z.string().optional(), + limits_memory_swap: z.string().optional(), + limits_memory_swappiness: z.number().int().optional(), + limits_memory_reservation: z.string().optional(), + limits_cpus: z.string().optional(), + limits_cpuset: z.string().optional(), + limits_cpu_shares: z.number().int().optional(), + instant_deploy: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + "server_uuid": "serverUuid", + "project_uuid": "projectUuid", + "environment_name": "environmentName", + "destination_uuid": "destinationUuid", + "keydb_password": "keydbPassword", + "keydb_conf": "keydbConf", + "is_public": "isPublic", + "public_port": "publicPort", + "limits_memory": "limitsMemory", + "limits_memory_swap": "limitsMemorySwap", + "limits_memory_swappiness": "limitsMemorySwappiness", + "limits_memory_reservation": "limitsMemoryReservation", + "limits_cpus": "limitsCpus", + "limits_cpuset": "limitsCpuset", + "limits_cpu_shares": "limitsCpuShares", + "instant_deploy": "instantDeploy", + }); +}); + +/** @internal */ +export type CreateDatabaseKeydbRequestBody$Outbound = { + server_uuid: string; + project_uuid: string; + environment_name: string; + destination_uuid?: string | undefined; + keydb_password?: string | undefined; + keydb_conf?: string | undefined; + name?: string | undefined; + description?: string | undefined; + image?: string | undefined; + is_public?: boolean | undefined; + public_port?: number | undefined; + limits_memory?: string | undefined; + limits_memory_swap?: string | undefined; + limits_memory_swappiness?: number | undefined; + limits_memory_reservation?: string | undefined; + limits_cpus?: string | undefined; + limits_cpuset?: string | undefined; + limits_cpu_shares?: number | undefined; + instant_deploy?: boolean | undefined; +}; + +/** @internal */ +export const CreateDatabaseKeydbRequestBody$outboundSchema: z.ZodType< + CreateDatabaseKeydbRequestBody$Outbound, + z.ZodTypeDef, + CreateDatabaseKeydbRequestBody +> = z.object({ + serverUuid: z.string(), + projectUuid: z.string(), + environmentName: z.string(), + destinationUuid: z.string().optional(), + keydbPassword: z.string().optional(), + keydbConf: z.string().optional(), + name: z.string().optional(), + description: z.string().optional(), + image: z.string().optional(), + isPublic: z.boolean().optional(), + publicPort: z.number().int().optional(), + limitsMemory: z.string().optional(), + limitsMemorySwap: z.string().optional(), + limitsMemorySwappiness: z.number().int().optional(), + limitsMemoryReservation: z.string().optional(), + limitsCpus: z.string().optional(), + limitsCpuset: z.string().optional(), + limitsCpuShares: z.number().int().optional(), + instantDeploy: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + serverUuid: "server_uuid", + projectUuid: "project_uuid", + environmentName: "environment_name", + destinationUuid: "destination_uuid", + keydbPassword: "keydb_password", + keydbConf: "keydb_conf", + isPublic: "is_public", + publicPort: "public_port", + limitsMemory: "limits_memory", + limitsMemorySwap: "limits_memory_swap", + limitsMemorySwappiness: "limits_memory_swappiness", + limitsMemoryReservation: "limits_memory_reservation", + limitsCpus: "limits_cpus", + limitsCpuset: "limits_cpuset", + limitsCpuShares: "limits_cpu_shares", + instantDeploy: "instant_deploy", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateDatabaseKeydbRequestBody$ { + /** @deprecated use `CreateDatabaseKeydbRequestBody$inboundSchema` instead. */ + export const inboundSchema = CreateDatabaseKeydbRequestBody$inboundSchema; + /** @deprecated use `CreateDatabaseKeydbRequestBody$outboundSchema` instead. */ + export const outboundSchema = CreateDatabaseKeydbRequestBody$outboundSchema; + /** @deprecated use `CreateDatabaseKeydbRequestBody$Outbound` instead. */ + export type Outbound = CreateDatabaseKeydbRequestBody$Outbound; +} + +export function createDatabaseKeydbRequestBodyToJSON( + createDatabaseKeydbRequestBody: CreateDatabaseKeydbRequestBody, +): string { + return JSON.stringify( + CreateDatabaseKeydbRequestBody$outboundSchema.parse( + createDatabaseKeydbRequestBody, + ), + ); +} + +export function createDatabaseKeydbRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateDatabaseKeydbRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateDatabaseKeydbRequestBody' from JSON`, + ); +} diff --git a/src/models/operations/createdatabasemariadb.ts b/src/models/operations/createdatabasemariadb.ts new file mode 100644 index 0000000..e52d9a1 --- /dev/null +++ b/src/models/operations/createdatabasemariadb.ts @@ -0,0 +1,266 @@ +/* + * 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"; + +/** + * Database data + */ +export type CreateDatabaseMariadbRequestBody = { + /** + * UUID of the server + */ + serverUuid: string; + /** + * UUID of the project + */ + projectUuid: string; + /** + * Name of the environment + */ + environmentName: string; + /** + * UUID of the destination if the server has multiple destinations + */ + destinationUuid?: string | undefined; + /** + * MariaDB conf + */ + mariadbConf?: string | undefined; + /** + * MariaDB root password + */ + mariadbRootPassword?: string | undefined; + /** + * MariaDB user + */ + mariadbUser?: string | undefined; + /** + * MariaDB password + */ + mariadbPassword?: string | undefined; + /** + * MariaDB database + */ + mariadbDatabase?: string | undefined; + /** + * Name of the database + */ + name?: string | undefined; + /** + * Description of the database + */ + description?: string | undefined; + /** + * Docker Image of the database + */ + image?: string | undefined; + /** + * Is the database public? + */ + isPublic?: boolean | undefined; + /** + * Public port of the database + */ + publicPort?: number | undefined; + /** + * Memory limit of the database + */ + limitsMemory?: string | undefined; + /** + * Memory swap limit of the database + */ + limitsMemorySwap?: string | undefined; + /** + * Memory swappiness of the database + */ + limitsMemorySwappiness?: number | undefined; + /** + * Memory reservation of the database + */ + limitsMemoryReservation?: string | undefined; + /** + * CPU limit of the database + */ + limitsCpus?: string | undefined; + /** + * CPU set of the database + */ + limitsCpuset?: string | undefined; + /** + * CPU shares of the database + */ + limitsCpuShares?: number | undefined; + /** + * Instant deploy the database + */ + instantDeploy?: boolean | undefined; +}; + +/** @internal */ +export const CreateDatabaseMariadbRequestBody$inboundSchema: z.ZodType< + CreateDatabaseMariadbRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + server_uuid: z.string(), + project_uuid: z.string(), + environment_name: z.string(), + destination_uuid: z.string().optional(), + mariadb_conf: z.string().optional(), + mariadb_root_password: z.string().optional(), + mariadb_user: z.string().optional(), + mariadb_password: z.string().optional(), + mariadb_database: z.string().optional(), + name: z.string().optional(), + description: z.string().optional(), + image: z.string().optional(), + is_public: z.boolean().optional(), + public_port: z.number().int().optional(), + limits_memory: z.string().optional(), + limits_memory_swap: z.string().optional(), + limits_memory_swappiness: z.number().int().optional(), + limits_memory_reservation: z.string().optional(), + limits_cpus: z.string().optional(), + limits_cpuset: z.string().optional(), + limits_cpu_shares: z.number().int().optional(), + instant_deploy: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + "server_uuid": "serverUuid", + "project_uuid": "projectUuid", + "environment_name": "environmentName", + "destination_uuid": "destinationUuid", + "mariadb_conf": "mariadbConf", + "mariadb_root_password": "mariadbRootPassword", + "mariadb_user": "mariadbUser", + "mariadb_password": "mariadbPassword", + "mariadb_database": "mariadbDatabase", + "is_public": "isPublic", + "public_port": "publicPort", + "limits_memory": "limitsMemory", + "limits_memory_swap": "limitsMemorySwap", + "limits_memory_swappiness": "limitsMemorySwappiness", + "limits_memory_reservation": "limitsMemoryReservation", + "limits_cpus": "limitsCpus", + "limits_cpuset": "limitsCpuset", + "limits_cpu_shares": "limitsCpuShares", + "instant_deploy": "instantDeploy", + }); +}); + +/** @internal */ +export type CreateDatabaseMariadbRequestBody$Outbound = { + server_uuid: string; + project_uuid: string; + environment_name: string; + destination_uuid?: string | undefined; + mariadb_conf?: string | undefined; + mariadb_root_password?: string | undefined; + mariadb_user?: string | undefined; + mariadb_password?: string | undefined; + mariadb_database?: string | undefined; + name?: string | undefined; + description?: string | undefined; + image?: string | undefined; + is_public?: boolean | undefined; + public_port?: number | undefined; + limits_memory?: string | undefined; + limits_memory_swap?: string | undefined; + limits_memory_swappiness?: number | undefined; + limits_memory_reservation?: string | undefined; + limits_cpus?: string | undefined; + limits_cpuset?: string | undefined; + limits_cpu_shares?: number | undefined; + instant_deploy?: boolean | undefined; +}; + +/** @internal */ +export const CreateDatabaseMariadbRequestBody$outboundSchema: z.ZodType< + CreateDatabaseMariadbRequestBody$Outbound, + z.ZodTypeDef, + CreateDatabaseMariadbRequestBody +> = z.object({ + serverUuid: z.string(), + projectUuid: z.string(), + environmentName: z.string(), + destinationUuid: z.string().optional(), + mariadbConf: z.string().optional(), + mariadbRootPassword: z.string().optional(), + mariadbUser: z.string().optional(), + mariadbPassword: z.string().optional(), + mariadbDatabase: z.string().optional(), + name: z.string().optional(), + description: z.string().optional(), + image: z.string().optional(), + isPublic: z.boolean().optional(), + publicPort: z.number().int().optional(), + limitsMemory: z.string().optional(), + limitsMemorySwap: z.string().optional(), + limitsMemorySwappiness: z.number().int().optional(), + limitsMemoryReservation: z.string().optional(), + limitsCpus: z.string().optional(), + limitsCpuset: z.string().optional(), + limitsCpuShares: z.number().int().optional(), + instantDeploy: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + serverUuid: "server_uuid", + projectUuid: "project_uuid", + environmentName: "environment_name", + destinationUuid: "destination_uuid", + mariadbConf: "mariadb_conf", + mariadbRootPassword: "mariadb_root_password", + mariadbUser: "mariadb_user", + mariadbPassword: "mariadb_password", + mariadbDatabase: "mariadb_database", + isPublic: "is_public", + publicPort: "public_port", + limitsMemory: "limits_memory", + limitsMemorySwap: "limits_memory_swap", + limitsMemorySwappiness: "limits_memory_swappiness", + limitsMemoryReservation: "limits_memory_reservation", + limitsCpus: "limits_cpus", + limitsCpuset: "limits_cpuset", + limitsCpuShares: "limits_cpu_shares", + instantDeploy: "instant_deploy", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateDatabaseMariadbRequestBody$ { + /** @deprecated use `CreateDatabaseMariadbRequestBody$inboundSchema` instead. */ + export const inboundSchema = CreateDatabaseMariadbRequestBody$inboundSchema; + /** @deprecated use `CreateDatabaseMariadbRequestBody$outboundSchema` instead. */ + export const outboundSchema = CreateDatabaseMariadbRequestBody$outboundSchema; + /** @deprecated use `CreateDatabaseMariadbRequestBody$Outbound` instead. */ + export type Outbound = CreateDatabaseMariadbRequestBody$Outbound; +} + +export function createDatabaseMariadbRequestBodyToJSON( + createDatabaseMariadbRequestBody: CreateDatabaseMariadbRequestBody, +): string { + return JSON.stringify( + CreateDatabaseMariadbRequestBody$outboundSchema.parse( + createDatabaseMariadbRequestBody, + ), + ); +} + +export function createDatabaseMariadbRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateDatabaseMariadbRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateDatabaseMariadbRequestBody' from JSON`, + ); +} diff --git a/src/models/operations/createdatabasemongodb.ts b/src/models/operations/createdatabasemongodb.ts new file mode 100644 index 0000000..7ce14d0 --- /dev/null +++ b/src/models/operations/createdatabasemongodb.ts @@ -0,0 +1,239 @@ +/* + * 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"; + +/** + * Database data + */ +export type CreateDatabaseMongodbRequestBody = { + /** + * UUID of the server + */ + serverUuid: string; + /** + * UUID of the project + */ + projectUuid: string; + /** + * Name of the environment + */ + environmentName: string; + /** + * UUID of the destination if the server has multiple destinations + */ + destinationUuid?: string | undefined; + /** + * MongoDB conf + */ + mongoConf?: string | undefined; + /** + * MongoDB initdb root username + */ + mongoInitdbRootUsername?: string | undefined; + /** + * Name of the database + */ + name?: string | undefined; + /** + * Description of the database + */ + description?: string | undefined; + /** + * Docker Image of the database + */ + image?: string | undefined; + /** + * Is the database public? + */ + isPublic?: boolean | undefined; + /** + * Public port of the database + */ + publicPort?: number | undefined; + /** + * Memory limit of the database + */ + limitsMemory?: string | undefined; + /** + * Memory swap limit of the database + */ + limitsMemorySwap?: string | undefined; + /** + * Memory swappiness of the database + */ + limitsMemorySwappiness?: number | undefined; + /** + * Memory reservation of the database + */ + limitsMemoryReservation?: string | undefined; + /** + * CPU limit of the database + */ + limitsCpus?: string | undefined; + /** + * CPU set of the database + */ + limitsCpuset?: string | undefined; + /** + * CPU shares of the database + */ + limitsCpuShares?: number | undefined; + /** + * Instant deploy the database + */ + instantDeploy?: boolean | undefined; +}; + +/** @internal */ +export const CreateDatabaseMongodbRequestBody$inboundSchema: z.ZodType< + CreateDatabaseMongodbRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + server_uuid: z.string(), + project_uuid: z.string(), + environment_name: z.string(), + destination_uuid: z.string().optional(), + mongo_conf: z.string().optional(), + mongo_initdb_root_username: z.string().optional(), + name: z.string().optional(), + description: z.string().optional(), + image: z.string().optional(), + is_public: z.boolean().optional(), + public_port: z.number().int().optional(), + limits_memory: z.string().optional(), + limits_memory_swap: z.string().optional(), + limits_memory_swappiness: z.number().int().optional(), + limits_memory_reservation: z.string().optional(), + limits_cpus: z.string().optional(), + limits_cpuset: z.string().optional(), + limits_cpu_shares: z.number().int().optional(), + instant_deploy: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + "server_uuid": "serverUuid", + "project_uuid": "projectUuid", + "environment_name": "environmentName", + "destination_uuid": "destinationUuid", + "mongo_conf": "mongoConf", + "mongo_initdb_root_username": "mongoInitdbRootUsername", + "is_public": "isPublic", + "public_port": "publicPort", + "limits_memory": "limitsMemory", + "limits_memory_swap": "limitsMemorySwap", + "limits_memory_swappiness": "limitsMemorySwappiness", + "limits_memory_reservation": "limitsMemoryReservation", + "limits_cpus": "limitsCpus", + "limits_cpuset": "limitsCpuset", + "limits_cpu_shares": "limitsCpuShares", + "instant_deploy": "instantDeploy", + }); +}); + +/** @internal */ +export type CreateDatabaseMongodbRequestBody$Outbound = { + server_uuid: string; + project_uuid: string; + environment_name: string; + destination_uuid?: string | undefined; + mongo_conf?: string | undefined; + mongo_initdb_root_username?: string | undefined; + name?: string | undefined; + description?: string | undefined; + image?: string | undefined; + is_public?: boolean | undefined; + public_port?: number | undefined; + limits_memory?: string | undefined; + limits_memory_swap?: string | undefined; + limits_memory_swappiness?: number | undefined; + limits_memory_reservation?: string | undefined; + limits_cpus?: string | undefined; + limits_cpuset?: string | undefined; + limits_cpu_shares?: number | undefined; + instant_deploy?: boolean | undefined; +}; + +/** @internal */ +export const CreateDatabaseMongodbRequestBody$outboundSchema: z.ZodType< + CreateDatabaseMongodbRequestBody$Outbound, + z.ZodTypeDef, + CreateDatabaseMongodbRequestBody +> = z.object({ + serverUuid: z.string(), + projectUuid: z.string(), + environmentName: z.string(), + destinationUuid: z.string().optional(), + mongoConf: z.string().optional(), + mongoInitdbRootUsername: z.string().optional(), + name: z.string().optional(), + description: z.string().optional(), + image: z.string().optional(), + isPublic: z.boolean().optional(), + publicPort: z.number().int().optional(), + limitsMemory: z.string().optional(), + limitsMemorySwap: z.string().optional(), + limitsMemorySwappiness: z.number().int().optional(), + limitsMemoryReservation: z.string().optional(), + limitsCpus: z.string().optional(), + limitsCpuset: z.string().optional(), + limitsCpuShares: z.number().int().optional(), + instantDeploy: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + serverUuid: "server_uuid", + projectUuid: "project_uuid", + environmentName: "environment_name", + destinationUuid: "destination_uuid", + mongoConf: "mongo_conf", + mongoInitdbRootUsername: "mongo_initdb_root_username", + isPublic: "is_public", + publicPort: "public_port", + limitsMemory: "limits_memory", + limitsMemorySwap: "limits_memory_swap", + limitsMemorySwappiness: "limits_memory_swappiness", + limitsMemoryReservation: "limits_memory_reservation", + limitsCpus: "limits_cpus", + limitsCpuset: "limits_cpuset", + limitsCpuShares: "limits_cpu_shares", + instantDeploy: "instant_deploy", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateDatabaseMongodbRequestBody$ { + /** @deprecated use `CreateDatabaseMongodbRequestBody$inboundSchema` instead. */ + export const inboundSchema = CreateDatabaseMongodbRequestBody$inboundSchema; + /** @deprecated use `CreateDatabaseMongodbRequestBody$outboundSchema` instead. */ + export const outboundSchema = CreateDatabaseMongodbRequestBody$outboundSchema; + /** @deprecated use `CreateDatabaseMongodbRequestBody$Outbound` instead. */ + export type Outbound = CreateDatabaseMongodbRequestBody$Outbound; +} + +export function createDatabaseMongodbRequestBodyToJSON( + createDatabaseMongodbRequestBody: CreateDatabaseMongodbRequestBody, +): string { + return JSON.stringify( + CreateDatabaseMongodbRequestBody$outboundSchema.parse( + createDatabaseMongodbRequestBody, + ), + ); +} + +export function createDatabaseMongodbRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateDatabaseMongodbRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateDatabaseMongodbRequestBody' from JSON`, + ); +} diff --git a/src/models/operations/createdatabasemysql.ts b/src/models/operations/createdatabasemysql.ts new file mode 100644 index 0000000..ba14d72 --- /dev/null +++ b/src/models/operations/createdatabasemysql.ts @@ -0,0 +1,257 @@ +/* + * 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"; + +/** + * Database data + */ +export type CreateDatabaseMysqlRequestBody = { + /** + * UUID of the server + */ + serverUuid: string; + /** + * UUID of the project + */ + projectUuid: string; + /** + * Name of the environment + */ + environmentName: string; + /** + * UUID of the destination if the server has multiple destinations + */ + destinationUuid?: string | undefined; + /** + * MySQL root password + */ + mysqlRootPassword?: string | undefined; + /** + * MySQL user + */ + mysqlUser?: string | undefined; + /** + * MySQL database + */ + mysqlDatabase?: string | undefined; + /** + * MySQL conf + */ + mysqlConf?: string | undefined; + /** + * Name of the database + */ + name?: string | undefined; + /** + * Description of the database + */ + description?: string | undefined; + /** + * Docker Image of the database + */ + image?: string | undefined; + /** + * Is the database public? + */ + isPublic?: boolean | undefined; + /** + * Public port of the database + */ + publicPort?: number | undefined; + /** + * Memory limit of the database + */ + limitsMemory?: string | undefined; + /** + * Memory swap limit of the database + */ + limitsMemorySwap?: string | undefined; + /** + * Memory swappiness of the database + */ + limitsMemorySwappiness?: number | undefined; + /** + * Memory reservation of the database + */ + limitsMemoryReservation?: string | undefined; + /** + * CPU limit of the database + */ + limitsCpus?: string | undefined; + /** + * CPU set of the database + */ + limitsCpuset?: string | undefined; + /** + * CPU shares of the database + */ + limitsCpuShares?: number | undefined; + /** + * Instant deploy the database + */ + instantDeploy?: boolean | undefined; +}; + +/** @internal */ +export const CreateDatabaseMysqlRequestBody$inboundSchema: z.ZodType< + CreateDatabaseMysqlRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + server_uuid: z.string(), + project_uuid: z.string(), + environment_name: z.string(), + destination_uuid: z.string().optional(), + mysql_root_password: z.string().optional(), + mysql_user: z.string().optional(), + mysql_database: z.string().optional(), + mysql_conf: z.string().optional(), + name: z.string().optional(), + description: z.string().optional(), + image: z.string().optional(), + is_public: z.boolean().optional(), + public_port: z.number().int().optional(), + limits_memory: z.string().optional(), + limits_memory_swap: z.string().optional(), + limits_memory_swappiness: z.number().int().optional(), + limits_memory_reservation: z.string().optional(), + limits_cpus: z.string().optional(), + limits_cpuset: z.string().optional(), + limits_cpu_shares: z.number().int().optional(), + instant_deploy: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + "server_uuid": "serverUuid", + "project_uuid": "projectUuid", + "environment_name": "environmentName", + "destination_uuid": "destinationUuid", + "mysql_root_password": "mysqlRootPassword", + "mysql_user": "mysqlUser", + "mysql_database": "mysqlDatabase", + "mysql_conf": "mysqlConf", + "is_public": "isPublic", + "public_port": "publicPort", + "limits_memory": "limitsMemory", + "limits_memory_swap": "limitsMemorySwap", + "limits_memory_swappiness": "limitsMemorySwappiness", + "limits_memory_reservation": "limitsMemoryReservation", + "limits_cpus": "limitsCpus", + "limits_cpuset": "limitsCpuset", + "limits_cpu_shares": "limitsCpuShares", + "instant_deploy": "instantDeploy", + }); +}); + +/** @internal */ +export type CreateDatabaseMysqlRequestBody$Outbound = { + server_uuid: string; + project_uuid: string; + environment_name: string; + destination_uuid?: string | undefined; + mysql_root_password?: string | undefined; + mysql_user?: string | undefined; + mysql_database?: string | undefined; + mysql_conf?: string | undefined; + name?: string | undefined; + description?: string | undefined; + image?: string | undefined; + is_public?: boolean | undefined; + public_port?: number | undefined; + limits_memory?: string | undefined; + limits_memory_swap?: string | undefined; + limits_memory_swappiness?: number | undefined; + limits_memory_reservation?: string | undefined; + limits_cpus?: string | undefined; + limits_cpuset?: string | undefined; + limits_cpu_shares?: number | undefined; + instant_deploy?: boolean | undefined; +}; + +/** @internal */ +export const CreateDatabaseMysqlRequestBody$outboundSchema: z.ZodType< + CreateDatabaseMysqlRequestBody$Outbound, + z.ZodTypeDef, + CreateDatabaseMysqlRequestBody +> = z.object({ + serverUuid: z.string(), + projectUuid: z.string(), + environmentName: z.string(), + destinationUuid: z.string().optional(), + mysqlRootPassword: z.string().optional(), + mysqlUser: z.string().optional(), + mysqlDatabase: z.string().optional(), + mysqlConf: z.string().optional(), + name: z.string().optional(), + description: z.string().optional(), + image: z.string().optional(), + isPublic: z.boolean().optional(), + publicPort: z.number().int().optional(), + limitsMemory: z.string().optional(), + limitsMemorySwap: z.string().optional(), + limitsMemorySwappiness: z.number().int().optional(), + limitsMemoryReservation: z.string().optional(), + limitsCpus: z.string().optional(), + limitsCpuset: z.string().optional(), + limitsCpuShares: z.number().int().optional(), + instantDeploy: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + serverUuid: "server_uuid", + projectUuid: "project_uuid", + environmentName: "environment_name", + destinationUuid: "destination_uuid", + mysqlRootPassword: "mysql_root_password", + mysqlUser: "mysql_user", + mysqlDatabase: "mysql_database", + mysqlConf: "mysql_conf", + isPublic: "is_public", + publicPort: "public_port", + limitsMemory: "limits_memory", + limitsMemorySwap: "limits_memory_swap", + limitsMemorySwappiness: "limits_memory_swappiness", + limitsMemoryReservation: "limits_memory_reservation", + limitsCpus: "limits_cpus", + limitsCpuset: "limits_cpuset", + limitsCpuShares: "limits_cpu_shares", + instantDeploy: "instant_deploy", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateDatabaseMysqlRequestBody$ { + /** @deprecated use `CreateDatabaseMysqlRequestBody$inboundSchema` instead. */ + export const inboundSchema = CreateDatabaseMysqlRequestBody$inboundSchema; + /** @deprecated use `CreateDatabaseMysqlRequestBody$outboundSchema` instead. */ + export const outboundSchema = CreateDatabaseMysqlRequestBody$outboundSchema; + /** @deprecated use `CreateDatabaseMysqlRequestBody$Outbound` instead. */ + export type Outbound = CreateDatabaseMysqlRequestBody$Outbound; +} + +export function createDatabaseMysqlRequestBodyToJSON( + createDatabaseMysqlRequestBody: CreateDatabaseMysqlRequestBody, +): string { + return JSON.stringify( + CreateDatabaseMysqlRequestBody$outboundSchema.parse( + createDatabaseMysqlRequestBody, + ), + ); +} + +export function createDatabaseMysqlRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateDatabaseMysqlRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateDatabaseMysqlRequestBody' from JSON`, + ); +} diff --git a/src/models/operations/createdatabasepostgresql.ts b/src/models/operations/createdatabasepostgresql.ts new file mode 100644 index 0000000..e48d122 --- /dev/null +++ b/src/models/operations/createdatabasepostgresql.ts @@ -0,0 +1,278 @@ +/* + * 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"; + +/** + * Database data + */ +export type CreateDatabasePostgresqlRequestBody = { + /** + * UUID of the server + */ + serverUuid: string; + /** + * UUID of the project + */ + projectUuid: string; + /** + * Name of the environment + */ + environmentName: string; + /** + * PostgreSQL user + */ + postgresUser?: string | undefined; + /** + * PostgreSQL password + */ + postgresPassword?: string | undefined; + /** + * PostgreSQL database + */ + postgresDb?: string | undefined; + /** + * PostgreSQL initdb args + */ + postgresInitdbArgs?: string | undefined; + /** + * PostgreSQL host auth method + */ + postgresHostAuthMethod?: string | undefined; + /** + * PostgreSQL conf + */ + postgresConf?: string | undefined; + /** + * UUID of the destination if the server has multiple destinations + */ + destinationUuid?: string | undefined; + /** + * Name of the database + */ + name?: string | undefined; + /** + * Description of the database + */ + description?: string | undefined; + /** + * Docker Image of the database + */ + image?: string | undefined; + /** + * Is the database public? + */ + isPublic?: boolean | undefined; + /** + * Public port of the database + */ + publicPort?: number | undefined; + /** + * Memory limit of the database + */ + limitsMemory?: string | undefined; + /** + * Memory swap limit of the database + */ + limitsMemorySwap?: string | undefined; + /** + * Memory swappiness of the database + */ + limitsMemorySwappiness?: number | undefined; + /** + * Memory reservation of the database + */ + limitsMemoryReservation?: string | undefined; + /** + * CPU limit of the database + */ + limitsCpus?: string | undefined; + /** + * CPU set of the database + */ + limitsCpuset?: string | undefined; + /** + * CPU shares of the database + */ + limitsCpuShares?: number | undefined; + /** + * Instant deploy the database + */ + instantDeploy?: boolean | undefined; +}; + +/** @internal */ +export const CreateDatabasePostgresqlRequestBody$inboundSchema: z.ZodType< + CreateDatabasePostgresqlRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + server_uuid: z.string(), + project_uuid: z.string(), + environment_name: z.string(), + postgres_user: z.string().optional(), + postgres_password: z.string().optional(), + postgres_db: z.string().optional(), + postgres_initdb_args: z.string().optional(), + postgres_host_auth_method: z.string().optional(), + postgres_conf: z.string().optional(), + destination_uuid: z.string().optional(), + name: z.string().optional(), + description: z.string().optional(), + image: z.string().optional(), + is_public: z.boolean().optional(), + public_port: z.number().int().optional(), + limits_memory: z.string().optional(), + limits_memory_swap: z.string().optional(), + limits_memory_swappiness: z.number().int().optional(), + limits_memory_reservation: z.string().optional(), + limits_cpus: z.string().optional(), + limits_cpuset: z.string().optional(), + limits_cpu_shares: z.number().int().optional(), + instant_deploy: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + "server_uuid": "serverUuid", + "project_uuid": "projectUuid", + "environment_name": "environmentName", + "postgres_user": "postgresUser", + "postgres_password": "postgresPassword", + "postgres_db": "postgresDb", + "postgres_initdb_args": "postgresInitdbArgs", + "postgres_host_auth_method": "postgresHostAuthMethod", + "postgres_conf": "postgresConf", + "destination_uuid": "destinationUuid", + "is_public": "isPublic", + "public_port": "publicPort", + "limits_memory": "limitsMemory", + "limits_memory_swap": "limitsMemorySwap", + "limits_memory_swappiness": "limitsMemorySwappiness", + "limits_memory_reservation": "limitsMemoryReservation", + "limits_cpus": "limitsCpus", + "limits_cpuset": "limitsCpuset", + "limits_cpu_shares": "limitsCpuShares", + "instant_deploy": "instantDeploy", + }); +}); + +/** @internal */ +export type CreateDatabasePostgresqlRequestBody$Outbound = { + server_uuid: string; + project_uuid: string; + environment_name: string; + postgres_user?: string | undefined; + postgres_password?: string | undefined; + postgres_db?: string | undefined; + postgres_initdb_args?: string | undefined; + postgres_host_auth_method?: string | undefined; + postgres_conf?: string | undefined; + destination_uuid?: string | undefined; + name?: string | undefined; + description?: string | undefined; + image?: string | undefined; + is_public?: boolean | undefined; + public_port?: number | undefined; + limits_memory?: string | undefined; + limits_memory_swap?: string | undefined; + limits_memory_swappiness?: number | undefined; + limits_memory_reservation?: string | undefined; + limits_cpus?: string | undefined; + limits_cpuset?: string | undefined; + limits_cpu_shares?: number | undefined; + instant_deploy?: boolean | undefined; +}; + +/** @internal */ +export const CreateDatabasePostgresqlRequestBody$outboundSchema: z.ZodType< + CreateDatabasePostgresqlRequestBody$Outbound, + z.ZodTypeDef, + CreateDatabasePostgresqlRequestBody +> = z.object({ + serverUuid: z.string(), + projectUuid: z.string(), + environmentName: z.string(), + postgresUser: z.string().optional(), + postgresPassword: z.string().optional(), + postgresDb: z.string().optional(), + postgresInitdbArgs: z.string().optional(), + postgresHostAuthMethod: z.string().optional(), + postgresConf: z.string().optional(), + destinationUuid: z.string().optional(), + name: z.string().optional(), + description: z.string().optional(), + image: z.string().optional(), + isPublic: z.boolean().optional(), + publicPort: z.number().int().optional(), + limitsMemory: z.string().optional(), + limitsMemorySwap: z.string().optional(), + limitsMemorySwappiness: z.number().int().optional(), + limitsMemoryReservation: z.string().optional(), + limitsCpus: z.string().optional(), + limitsCpuset: z.string().optional(), + limitsCpuShares: z.number().int().optional(), + instantDeploy: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + serverUuid: "server_uuid", + projectUuid: "project_uuid", + environmentName: "environment_name", + postgresUser: "postgres_user", + postgresPassword: "postgres_password", + postgresDb: "postgres_db", + postgresInitdbArgs: "postgres_initdb_args", + postgresHostAuthMethod: "postgres_host_auth_method", + postgresConf: "postgres_conf", + destinationUuid: "destination_uuid", + isPublic: "is_public", + publicPort: "public_port", + limitsMemory: "limits_memory", + limitsMemorySwap: "limits_memory_swap", + limitsMemorySwappiness: "limits_memory_swappiness", + limitsMemoryReservation: "limits_memory_reservation", + limitsCpus: "limits_cpus", + limitsCpuset: "limits_cpuset", + limitsCpuShares: "limits_cpu_shares", + instantDeploy: "instant_deploy", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateDatabasePostgresqlRequestBody$ { + /** @deprecated use `CreateDatabasePostgresqlRequestBody$inboundSchema` instead. */ + export const inboundSchema = + CreateDatabasePostgresqlRequestBody$inboundSchema; + /** @deprecated use `CreateDatabasePostgresqlRequestBody$outboundSchema` instead. */ + export const outboundSchema = + CreateDatabasePostgresqlRequestBody$outboundSchema; + /** @deprecated use `CreateDatabasePostgresqlRequestBody$Outbound` instead. */ + export type Outbound = CreateDatabasePostgresqlRequestBody$Outbound; +} + +export function createDatabasePostgresqlRequestBodyToJSON( + createDatabasePostgresqlRequestBody: CreateDatabasePostgresqlRequestBody, +): string { + return JSON.stringify( + CreateDatabasePostgresqlRequestBody$outboundSchema.parse( + createDatabasePostgresqlRequestBody, + ), + ); +} + +export function createDatabasePostgresqlRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + CreateDatabasePostgresqlRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateDatabasePostgresqlRequestBody' from JSON`, + ); +} diff --git a/src/models/operations/createdatabaseredis.ts b/src/models/operations/createdatabaseredis.ts new file mode 100644 index 0000000..42a1234 --- /dev/null +++ b/src/models/operations/createdatabaseredis.ts @@ -0,0 +1,239 @@ +/* + * 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"; + +/** + * Database data + */ +export type CreateDatabaseRedisRequestBody = { + /** + * UUID of the server + */ + serverUuid: string; + /** + * UUID of the project + */ + projectUuid: string; + /** + * Name of the environment + */ + environmentName: string; + /** + * UUID of the destination if the server has multiple destinations + */ + destinationUuid?: string | undefined; + /** + * Redis password + */ + redisPassword?: string | undefined; + /** + * Redis conf + */ + redisConf?: string | undefined; + /** + * Name of the database + */ + name?: string | undefined; + /** + * Description of the database + */ + description?: string | undefined; + /** + * Docker Image of the database + */ + image?: string | undefined; + /** + * Is the database public? + */ + isPublic?: boolean | undefined; + /** + * Public port of the database + */ + publicPort?: number | undefined; + /** + * Memory limit of the database + */ + limitsMemory?: string | undefined; + /** + * Memory swap limit of the database + */ + limitsMemorySwap?: string | undefined; + /** + * Memory swappiness of the database + */ + limitsMemorySwappiness?: number | undefined; + /** + * Memory reservation of the database + */ + limitsMemoryReservation?: string | undefined; + /** + * CPU limit of the database + */ + limitsCpus?: string | undefined; + /** + * CPU set of the database + */ + limitsCpuset?: string | undefined; + /** + * CPU shares of the database + */ + limitsCpuShares?: number | undefined; + /** + * Instant deploy the database + */ + instantDeploy?: boolean | undefined; +}; + +/** @internal */ +export const CreateDatabaseRedisRequestBody$inboundSchema: z.ZodType< + CreateDatabaseRedisRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + server_uuid: z.string(), + project_uuid: z.string(), + environment_name: z.string(), + destination_uuid: z.string().optional(), + redis_password: z.string().optional(), + redis_conf: z.string().optional(), + name: z.string().optional(), + description: z.string().optional(), + image: z.string().optional(), + is_public: z.boolean().optional(), + public_port: z.number().int().optional(), + limits_memory: z.string().optional(), + limits_memory_swap: z.string().optional(), + limits_memory_swappiness: z.number().int().optional(), + limits_memory_reservation: z.string().optional(), + limits_cpus: z.string().optional(), + limits_cpuset: z.string().optional(), + limits_cpu_shares: z.number().int().optional(), + instant_deploy: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + "server_uuid": "serverUuid", + "project_uuid": "projectUuid", + "environment_name": "environmentName", + "destination_uuid": "destinationUuid", + "redis_password": "redisPassword", + "redis_conf": "redisConf", + "is_public": "isPublic", + "public_port": "publicPort", + "limits_memory": "limitsMemory", + "limits_memory_swap": "limitsMemorySwap", + "limits_memory_swappiness": "limitsMemorySwappiness", + "limits_memory_reservation": "limitsMemoryReservation", + "limits_cpus": "limitsCpus", + "limits_cpuset": "limitsCpuset", + "limits_cpu_shares": "limitsCpuShares", + "instant_deploy": "instantDeploy", + }); +}); + +/** @internal */ +export type CreateDatabaseRedisRequestBody$Outbound = { + server_uuid: string; + project_uuid: string; + environment_name: string; + destination_uuid?: string | undefined; + redis_password?: string | undefined; + redis_conf?: string | undefined; + name?: string | undefined; + description?: string | undefined; + image?: string | undefined; + is_public?: boolean | undefined; + public_port?: number | undefined; + limits_memory?: string | undefined; + limits_memory_swap?: string | undefined; + limits_memory_swappiness?: number | undefined; + limits_memory_reservation?: string | undefined; + limits_cpus?: string | undefined; + limits_cpuset?: string | undefined; + limits_cpu_shares?: number | undefined; + instant_deploy?: boolean | undefined; +}; + +/** @internal */ +export const CreateDatabaseRedisRequestBody$outboundSchema: z.ZodType< + CreateDatabaseRedisRequestBody$Outbound, + z.ZodTypeDef, + CreateDatabaseRedisRequestBody +> = z.object({ + serverUuid: z.string(), + projectUuid: z.string(), + environmentName: z.string(), + destinationUuid: z.string().optional(), + redisPassword: z.string().optional(), + redisConf: z.string().optional(), + name: z.string().optional(), + description: z.string().optional(), + image: z.string().optional(), + isPublic: z.boolean().optional(), + publicPort: z.number().int().optional(), + limitsMemory: z.string().optional(), + limitsMemorySwap: z.string().optional(), + limitsMemorySwappiness: z.number().int().optional(), + limitsMemoryReservation: z.string().optional(), + limitsCpus: z.string().optional(), + limitsCpuset: z.string().optional(), + limitsCpuShares: z.number().int().optional(), + instantDeploy: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + serverUuid: "server_uuid", + projectUuid: "project_uuid", + environmentName: "environment_name", + destinationUuid: "destination_uuid", + redisPassword: "redis_password", + redisConf: "redis_conf", + isPublic: "is_public", + publicPort: "public_port", + limitsMemory: "limits_memory", + limitsMemorySwap: "limits_memory_swap", + limitsMemorySwappiness: "limits_memory_swappiness", + limitsMemoryReservation: "limits_memory_reservation", + limitsCpus: "limits_cpus", + limitsCpuset: "limits_cpuset", + limitsCpuShares: "limits_cpu_shares", + instantDeploy: "instant_deploy", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateDatabaseRedisRequestBody$ { + /** @deprecated use `CreateDatabaseRedisRequestBody$inboundSchema` instead. */ + export const inboundSchema = CreateDatabaseRedisRequestBody$inboundSchema; + /** @deprecated use `CreateDatabaseRedisRequestBody$outboundSchema` instead. */ + export const outboundSchema = CreateDatabaseRedisRequestBody$outboundSchema; + /** @deprecated use `CreateDatabaseRedisRequestBody$Outbound` instead. */ + export type Outbound = CreateDatabaseRedisRequestBody$Outbound; +} + +export function createDatabaseRedisRequestBodyToJSON( + createDatabaseRedisRequestBody: CreateDatabaseRedisRequestBody, +): string { + return JSON.stringify( + CreateDatabaseRedisRequestBody$outboundSchema.parse( + createDatabaseRedisRequestBody, + ), + ); +} + +export function createDatabaseRedisRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateDatabaseRedisRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateDatabaseRedisRequestBody' from JSON`, + ); +} diff --git a/src/models/operations/createdockercomposeapplication.ts b/src/models/operations/createdockercomposeapplication.ts new file mode 100644 index 0000000..9e4bb5a --- /dev/null +++ b/src/models/operations/createdockercomposeapplication.ts @@ -0,0 +1,161 @@ +/* + * 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"; + +/** + * Application object that needs to be created. + */ +export type CreateDockercomposeApplicationRequestBody = { + /** + * The project UUID. + */ + projectUuid: string; + /** + * The server UUID. + */ + serverUuid: string; + /** + * The environment name. + */ + environmentName: string; + /** + * The Docker Compose raw content. + */ + dockerComposeRaw: string; + /** + * The destination UUID if the server has more than one destinations. + */ + destinationUuid?: string | undefined; + /** + * The application name. + */ + name?: string | undefined; + /** + * The application description. + */ + description?: string | undefined; + /** + * The flag to indicate if the application should be deployed instantly. + */ + instantDeploy?: boolean | undefined; + /** + * Use build server. + */ + useBuildServer?: boolean | null | undefined; +}; + +/** @internal */ +export const CreateDockercomposeApplicationRequestBody$inboundSchema: z.ZodType< + CreateDockercomposeApplicationRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + project_uuid: z.string(), + server_uuid: z.string(), + environment_name: z.string(), + docker_compose_raw: z.string(), + destination_uuid: z.string().optional(), + name: z.string().optional(), + description: z.string().optional(), + instant_deploy: z.boolean().optional(), + use_build_server: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + "project_uuid": "projectUuid", + "server_uuid": "serverUuid", + "environment_name": "environmentName", + "docker_compose_raw": "dockerComposeRaw", + "destination_uuid": "destinationUuid", + "instant_deploy": "instantDeploy", + "use_build_server": "useBuildServer", + }); +}); + +/** @internal */ +export type CreateDockercomposeApplicationRequestBody$Outbound = { + project_uuid: string; + server_uuid: string; + environment_name: string; + docker_compose_raw: string; + destination_uuid?: string | undefined; + name?: string | undefined; + description?: string | undefined; + instant_deploy?: boolean | undefined; + use_build_server?: boolean | null | undefined; +}; + +/** @internal */ +export const CreateDockercomposeApplicationRequestBody$outboundSchema: + z.ZodType< + CreateDockercomposeApplicationRequestBody$Outbound, + z.ZodTypeDef, + CreateDockercomposeApplicationRequestBody + > = z.object({ + projectUuid: z.string(), + serverUuid: z.string(), + environmentName: z.string(), + dockerComposeRaw: z.string(), + destinationUuid: z.string().optional(), + name: z.string().optional(), + description: z.string().optional(), + instantDeploy: z.boolean().optional(), + useBuildServer: z.nullable(z.boolean()).optional(), + }).transform((v) => { + return remap$(v, { + projectUuid: "project_uuid", + serverUuid: "server_uuid", + environmentName: "environment_name", + dockerComposeRaw: "docker_compose_raw", + destinationUuid: "destination_uuid", + instantDeploy: "instant_deploy", + useBuildServer: "use_build_server", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateDockercomposeApplicationRequestBody$ { + /** @deprecated use `CreateDockercomposeApplicationRequestBody$inboundSchema` instead. */ + export const inboundSchema = + CreateDockercomposeApplicationRequestBody$inboundSchema; + /** @deprecated use `CreateDockercomposeApplicationRequestBody$outboundSchema` instead. */ + export const outboundSchema = + CreateDockercomposeApplicationRequestBody$outboundSchema; + /** @deprecated use `CreateDockercomposeApplicationRequestBody$Outbound` instead. */ + export type Outbound = CreateDockercomposeApplicationRequestBody$Outbound; +} + +export function createDockercomposeApplicationRequestBodyToJSON( + createDockercomposeApplicationRequestBody: + CreateDockercomposeApplicationRequestBody, +): string { + return JSON.stringify( + CreateDockercomposeApplicationRequestBody$outboundSchema.parse( + createDockercomposeApplicationRequestBody, + ), + ); +} + +export function createDockercomposeApplicationRequestBodyFromJSON( + jsonString: string, +): SafeParseResult< + CreateDockercomposeApplicationRequestBody, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + CreateDockercomposeApplicationRequestBody$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'CreateDockercomposeApplicationRequestBody' from JSON`, + ); +} diff --git a/src/models/operations/createdockerfileapplication.ts b/src/models/operations/createdockerfileapplication.ts new file mode 100644 index 0000000..b5ff595 --- /dev/null +++ b/src/models/operations/createdockerfileapplication.ts @@ -0,0 +1,563 @@ +/* + * 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"; + +/** + * The build pack type. + */ +export const CreateDockerfileApplicationBuildPack = { + Nixpacks: "nixpacks", + Static: "static", + Dockerfile: "dockerfile", + Dockercompose: "dockercompose", +} as const; +/** + * The build pack type. + */ +export type CreateDockerfileApplicationBuildPack = ClosedEnum< + typeof CreateDockerfileApplicationBuildPack +>; + +/** + * How to set redirect with Traefik / Caddy. www<->non-www. + */ +export const CreateDockerfileApplicationRedirect = { + Www: "www", + NonWww: "non-www", + Both: "both", +} as const; +/** + * How to set redirect with Traefik / Caddy. www<->non-www. + */ +export type CreateDockerfileApplicationRedirect = ClosedEnum< + typeof CreateDockerfileApplicationRedirect +>; + +/** + * Application object that needs to be created. + */ +export type CreateDockerfileApplicationRequestBody = { + /** + * The project UUID. + */ + projectUuid: string; + /** + * The server UUID. + */ + serverUuid: string; + /** + * The environment name. + */ + environmentName: string; + /** + * The Dockerfile content. + */ + dockerfile: string; + /** + * The build pack type. + */ + buildPack?: CreateDockerfileApplicationBuildPack | undefined; + /** + * The ports to expose. + */ + portsExposes?: string | undefined; + /** + * The destination UUID. + */ + destinationUuid?: string | undefined; + /** + * The application name. + */ + name?: string | undefined; + /** + * The application description. + */ + description?: string | undefined; + /** + * The application domains. + */ + domains?: string | undefined; + /** + * The docker registry image name. + */ + dockerRegistryImageName?: string | undefined; + /** + * The docker registry image tag. + */ + dockerRegistryImageTag?: string | undefined; + /** + * The ports mappings. + */ + portsMappings?: string | undefined; + /** + * The base directory for all commands. + */ + baseDirectory?: string | undefined; + /** + * Health check enabled. + */ + healthCheckEnabled?: boolean | undefined; + /** + * Health check path. + */ + healthCheckPath?: string | undefined; + /** + * Health check port. + */ + healthCheckPort?: string | null | undefined; + /** + * Health check host. + */ + healthCheckHost?: string | null | undefined; + /** + * Health check method. + */ + healthCheckMethod?: string | undefined; + /** + * Health check return code. + */ + healthCheckReturnCode?: number | undefined; + /** + * Health check scheme. + */ + healthCheckScheme?: string | undefined; + /** + * Health check response text. + */ + healthCheckResponseText?: string | null | undefined; + /** + * Health check interval in seconds. + */ + healthCheckInterval?: number | undefined; + /** + * Health check timeout in seconds. + */ + healthCheckTimeout?: number | undefined; + /** + * Health check retries count. + */ + healthCheckRetries?: number | undefined; + /** + * Health check start period in seconds. + */ + healthCheckStartPeriod?: number | undefined; + /** + * Memory limit. + */ + limitsMemory?: string | undefined; + /** + * Memory swap limit. + */ + limitsMemorySwap?: string | undefined; + /** + * Memory swappiness. + */ + limitsMemorySwappiness?: number | undefined; + /** + * Memory reservation. + */ + limitsMemoryReservation?: string | undefined; + /** + * CPU limit. + */ + limitsCpus?: string | undefined; + /** + * CPU set. + */ + limitsCpuset?: string | null | undefined; + /** + * CPU shares. + */ + limitsCpuShares?: number | undefined; + /** + * Custom labels. + */ + customLabels?: string | undefined; + /** + * Custom docker run options. + */ + customDockerRunOptions?: string | undefined; + /** + * Post deployment command. + */ + postDeploymentCommand?: string | undefined; + /** + * Post deployment command container. + */ + postDeploymentCommandContainer?: string | undefined; + /** + * Pre deployment command. + */ + preDeploymentCommand?: string | undefined; + /** + * Pre deployment command container. + */ + preDeploymentCommandContainer?: string | undefined; + /** + * Manual webhook secret for Github. + */ + manualWebhookSecretGithub?: string | undefined; + /** + * Manual webhook secret for Gitlab. + */ + manualWebhookSecretGitlab?: string | undefined; + /** + * Manual webhook secret for Bitbucket. + */ + manualWebhookSecretBitbucket?: string | undefined; + /** + * Manual webhook secret for Gitea. + */ + manualWebhookSecretGitea?: string | undefined; + /** + * How to set redirect with Traefik / Caddy. www<->non-www. + */ + redirect?: CreateDockerfileApplicationRedirect | null | undefined; + /** + * The flag to indicate if the application should be deployed instantly. + */ + instantDeploy?: boolean | undefined; + /** + * Use build server. + */ + useBuildServer?: boolean | null | undefined; +}; + +/** @internal */ +export const CreateDockerfileApplicationBuildPack$inboundSchema: + z.ZodNativeEnum = z.nativeEnum( + CreateDockerfileApplicationBuildPack, + ); + +/** @internal */ +export const CreateDockerfileApplicationBuildPack$outboundSchema: + z.ZodNativeEnum = + CreateDockerfileApplicationBuildPack$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateDockerfileApplicationBuildPack$ { + /** @deprecated use `CreateDockerfileApplicationBuildPack$inboundSchema` instead. */ + export const inboundSchema = + CreateDockerfileApplicationBuildPack$inboundSchema; + /** @deprecated use `CreateDockerfileApplicationBuildPack$outboundSchema` instead. */ + export const outboundSchema = + CreateDockerfileApplicationBuildPack$outboundSchema; +} + +/** @internal */ +export const CreateDockerfileApplicationRedirect$inboundSchema: z.ZodNativeEnum< + typeof CreateDockerfileApplicationRedirect +> = z.nativeEnum(CreateDockerfileApplicationRedirect); + +/** @internal */ +export const CreateDockerfileApplicationRedirect$outboundSchema: + z.ZodNativeEnum = + CreateDockerfileApplicationRedirect$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateDockerfileApplicationRedirect$ { + /** @deprecated use `CreateDockerfileApplicationRedirect$inboundSchema` instead. */ + export const inboundSchema = + CreateDockerfileApplicationRedirect$inboundSchema; + /** @deprecated use `CreateDockerfileApplicationRedirect$outboundSchema` instead. */ + export const outboundSchema = + CreateDockerfileApplicationRedirect$outboundSchema; +} + +/** @internal */ +export const CreateDockerfileApplicationRequestBody$inboundSchema: z.ZodType< + CreateDockerfileApplicationRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + project_uuid: z.string(), + server_uuid: z.string(), + environment_name: z.string(), + dockerfile: z.string(), + build_pack: CreateDockerfileApplicationBuildPack$inboundSchema.optional(), + ports_exposes: z.string().optional(), + destination_uuid: z.string().optional(), + name: z.string().optional(), + description: z.string().optional(), + domains: z.string().optional(), + docker_registry_image_name: z.string().optional(), + docker_registry_image_tag: z.string().optional(), + ports_mappings: z.string().optional(), + base_directory: z.string().optional(), + health_check_enabled: z.boolean().optional(), + health_check_path: z.string().optional(), + health_check_port: z.nullable(z.string()).optional(), + health_check_host: z.nullable(z.string()).optional(), + health_check_method: z.string().optional(), + health_check_return_code: z.number().int().optional(), + health_check_scheme: z.string().optional(), + health_check_response_text: z.nullable(z.string()).optional(), + health_check_interval: z.number().int().optional(), + health_check_timeout: z.number().int().optional(), + health_check_retries: z.number().int().optional(), + health_check_start_period: z.number().int().optional(), + limits_memory: z.string().optional(), + limits_memory_swap: z.string().optional(), + limits_memory_swappiness: z.number().int().optional(), + limits_memory_reservation: z.string().optional(), + limits_cpus: z.string().optional(), + limits_cpuset: z.nullable(z.string()).optional(), + limits_cpu_shares: z.number().int().optional(), + custom_labels: z.string().optional(), + custom_docker_run_options: z.string().optional(), + post_deployment_command: z.string().optional(), + post_deployment_command_container: z.string().optional(), + pre_deployment_command: z.string().optional(), + pre_deployment_command_container: z.string().optional(), + manual_webhook_secret_github: z.string().optional(), + manual_webhook_secret_gitlab: z.string().optional(), + manual_webhook_secret_bitbucket: z.string().optional(), + manual_webhook_secret_gitea: z.string().optional(), + redirect: z.nullable(CreateDockerfileApplicationRedirect$inboundSchema) + .optional(), + instant_deploy: z.boolean().optional(), + use_build_server: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + "project_uuid": "projectUuid", + "server_uuid": "serverUuid", + "environment_name": "environmentName", + "build_pack": "buildPack", + "ports_exposes": "portsExposes", + "destination_uuid": "destinationUuid", + "docker_registry_image_name": "dockerRegistryImageName", + "docker_registry_image_tag": "dockerRegistryImageTag", + "ports_mappings": "portsMappings", + "base_directory": "baseDirectory", + "health_check_enabled": "healthCheckEnabled", + "health_check_path": "healthCheckPath", + "health_check_port": "healthCheckPort", + "health_check_host": "healthCheckHost", + "health_check_method": "healthCheckMethod", + "health_check_return_code": "healthCheckReturnCode", + "health_check_scheme": "healthCheckScheme", + "health_check_response_text": "healthCheckResponseText", + "health_check_interval": "healthCheckInterval", + "health_check_timeout": "healthCheckTimeout", + "health_check_retries": "healthCheckRetries", + "health_check_start_period": "healthCheckStartPeriod", + "limits_memory": "limitsMemory", + "limits_memory_swap": "limitsMemorySwap", + "limits_memory_swappiness": "limitsMemorySwappiness", + "limits_memory_reservation": "limitsMemoryReservation", + "limits_cpus": "limitsCpus", + "limits_cpuset": "limitsCpuset", + "limits_cpu_shares": "limitsCpuShares", + "custom_labels": "customLabels", + "custom_docker_run_options": "customDockerRunOptions", + "post_deployment_command": "postDeploymentCommand", + "post_deployment_command_container": "postDeploymentCommandContainer", + "pre_deployment_command": "preDeploymentCommand", + "pre_deployment_command_container": "preDeploymentCommandContainer", + "manual_webhook_secret_github": "manualWebhookSecretGithub", + "manual_webhook_secret_gitlab": "manualWebhookSecretGitlab", + "manual_webhook_secret_bitbucket": "manualWebhookSecretBitbucket", + "manual_webhook_secret_gitea": "manualWebhookSecretGitea", + "instant_deploy": "instantDeploy", + "use_build_server": "useBuildServer", + }); +}); + +/** @internal */ +export type CreateDockerfileApplicationRequestBody$Outbound = { + project_uuid: string; + server_uuid: string; + environment_name: string; + dockerfile: string; + build_pack?: string | undefined; + ports_exposes?: string | undefined; + destination_uuid?: string | undefined; + name?: string | undefined; + description?: string | undefined; + domains?: string | undefined; + docker_registry_image_name?: string | undefined; + docker_registry_image_tag?: string | undefined; + ports_mappings?: string | undefined; + base_directory?: string | undefined; + health_check_enabled?: boolean | undefined; + health_check_path?: string | undefined; + health_check_port?: string | null | undefined; + health_check_host?: string | null | undefined; + health_check_method?: string | undefined; + health_check_return_code?: number | undefined; + health_check_scheme?: string | undefined; + health_check_response_text?: string | null | undefined; + health_check_interval?: number | undefined; + health_check_timeout?: number | undefined; + health_check_retries?: number | undefined; + health_check_start_period?: number | undefined; + limits_memory?: string | undefined; + limits_memory_swap?: string | undefined; + limits_memory_swappiness?: number | undefined; + limits_memory_reservation?: string | undefined; + limits_cpus?: string | undefined; + limits_cpuset?: string | null | undefined; + limits_cpu_shares?: number | undefined; + custom_labels?: string | undefined; + custom_docker_run_options?: string | undefined; + post_deployment_command?: string | undefined; + post_deployment_command_container?: string | undefined; + pre_deployment_command?: string | undefined; + pre_deployment_command_container?: string | undefined; + manual_webhook_secret_github?: string | undefined; + manual_webhook_secret_gitlab?: string | undefined; + manual_webhook_secret_bitbucket?: string | undefined; + manual_webhook_secret_gitea?: string | undefined; + redirect?: string | null | undefined; + instant_deploy?: boolean | undefined; + use_build_server?: boolean | null | undefined; +}; + +/** @internal */ +export const CreateDockerfileApplicationRequestBody$outboundSchema: z.ZodType< + CreateDockerfileApplicationRequestBody$Outbound, + z.ZodTypeDef, + CreateDockerfileApplicationRequestBody +> = z.object({ + projectUuid: z.string(), + serverUuid: z.string(), + environmentName: z.string(), + dockerfile: z.string(), + buildPack: CreateDockerfileApplicationBuildPack$outboundSchema.optional(), + portsExposes: z.string().optional(), + destinationUuid: z.string().optional(), + name: z.string().optional(), + description: z.string().optional(), + domains: z.string().optional(), + dockerRegistryImageName: z.string().optional(), + dockerRegistryImageTag: z.string().optional(), + portsMappings: z.string().optional(), + baseDirectory: z.string().optional(), + healthCheckEnabled: z.boolean().optional(), + healthCheckPath: z.string().optional(), + healthCheckPort: z.nullable(z.string()).optional(), + healthCheckHost: z.nullable(z.string()).optional(), + healthCheckMethod: z.string().optional(), + healthCheckReturnCode: z.number().int().optional(), + healthCheckScheme: z.string().optional(), + healthCheckResponseText: z.nullable(z.string()).optional(), + healthCheckInterval: z.number().int().optional(), + healthCheckTimeout: z.number().int().optional(), + healthCheckRetries: z.number().int().optional(), + healthCheckStartPeriod: z.number().int().optional(), + limitsMemory: z.string().optional(), + limitsMemorySwap: z.string().optional(), + limitsMemorySwappiness: z.number().int().optional(), + limitsMemoryReservation: z.string().optional(), + limitsCpus: z.string().optional(), + limitsCpuset: z.nullable(z.string()).optional(), + limitsCpuShares: z.number().int().optional(), + customLabels: z.string().optional(), + customDockerRunOptions: z.string().optional(), + postDeploymentCommand: z.string().optional(), + postDeploymentCommandContainer: z.string().optional(), + preDeploymentCommand: z.string().optional(), + preDeploymentCommandContainer: z.string().optional(), + manualWebhookSecretGithub: z.string().optional(), + manualWebhookSecretGitlab: z.string().optional(), + manualWebhookSecretBitbucket: z.string().optional(), + manualWebhookSecretGitea: z.string().optional(), + redirect: z.nullable(CreateDockerfileApplicationRedirect$outboundSchema) + .optional(), + instantDeploy: z.boolean().optional(), + useBuildServer: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + projectUuid: "project_uuid", + serverUuid: "server_uuid", + environmentName: "environment_name", + buildPack: "build_pack", + portsExposes: "ports_exposes", + destinationUuid: "destination_uuid", + dockerRegistryImageName: "docker_registry_image_name", + dockerRegistryImageTag: "docker_registry_image_tag", + portsMappings: "ports_mappings", + baseDirectory: "base_directory", + healthCheckEnabled: "health_check_enabled", + healthCheckPath: "health_check_path", + healthCheckPort: "health_check_port", + healthCheckHost: "health_check_host", + healthCheckMethod: "health_check_method", + healthCheckReturnCode: "health_check_return_code", + healthCheckScheme: "health_check_scheme", + healthCheckResponseText: "health_check_response_text", + healthCheckInterval: "health_check_interval", + healthCheckTimeout: "health_check_timeout", + healthCheckRetries: "health_check_retries", + healthCheckStartPeriod: "health_check_start_period", + limitsMemory: "limits_memory", + limitsMemorySwap: "limits_memory_swap", + limitsMemorySwappiness: "limits_memory_swappiness", + limitsMemoryReservation: "limits_memory_reservation", + limitsCpus: "limits_cpus", + limitsCpuset: "limits_cpuset", + limitsCpuShares: "limits_cpu_shares", + customLabels: "custom_labels", + customDockerRunOptions: "custom_docker_run_options", + postDeploymentCommand: "post_deployment_command", + postDeploymentCommandContainer: "post_deployment_command_container", + preDeploymentCommand: "pre_deployment_command", + preDeploymentCommandContainer: "pre_deployment_command_container", + manualWebhookSecretGithub: "manual_webhook_secret_github", + manualWebhookSecretGitlab: "manual_webhook_secret_gitlab", + manualWebhookSecretBitbucket: "manual_webhook_secret_bitbucket", + manualWebhookSecretGitea: "manual_webhook_secret_gitea", + instantDeploy: "instant_deploy", + useBuildServer: "use_build_server", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateDockerfileApplicationRequestBody$ { + /** @deprecated use `CreateDockerfileApplicationRequestBody$inboundSchema` instead. */ + export const inboundSchema = + CreateDockerfileApplicationRequestBody$inboundSchema; + /** @deprecated use `CreateDockerfileApplicationRequestBody$outboundSchema` instead. */ + export const outboundSchema = + CreateDockerfileApplicationRequestBody$outboundSchema; + /** @deprecated use `CreateDockerfileApplicationRequestBody$Outbound` instead. */ + export type Outbound = CreateDockerfileApplicationRequestBody$Outbound; +} + +export function createDockerfileApplicationRequestBodyToJSON( + createDockerfileApplicationRequestBody: + CreateDockerfileApplicationRequestBody, +): string { + return JSON.stringify( + CreateDockerfileApplicationRequestBody$outboundSchema.parse( + createDockerfileApplicationRequestBody, + ), + ); +} + +export function createDockerfileApplicationRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + CreateDockerfileApplicationRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateDockerfileApplicationRequestBody' from JSON`, + ); +} diff --git a/src/models/operations/createdockerimageapplication.ts b/src/models/operations/createdockerimageapplication.ts new file mode 100644 index 0000000..a77a7a2 --- /dev/null +++ b/src/models/operations/createdockerimageapplication.ts @@ -0,0 +1,504 @@ +/* + * 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"; + +/** + * How to set redirect with Traefik / Caddy. www<->non-www. + */ +export const CreateDockerimageApplicationRedirect = { + Www: "www", + NonWww: "non-www", + Both: "both", +} as const; +/** + * How to set redirect with Traefik / Caddy. www<->non-www. + */ +export type CreateDockerimageApplicationRedirect = ClosedEnum< + typeof CreateDockerimageApplicationRedirect +>; + +/** + * Application object that needs to be created. + */ +export type CreateDockerimageApplicationRequestBody = { + /** + * The project UUID. + */ + projectUuid: string; + /** + * The server UUID. + */ + serverUuid: string; + /** + * The environment name. + */ + environmentName: string; + /** + * The docker registry image name. + */ + dockerRegistryImageName: string; + /** + * The docker registry image tag. + */ + dockerRegistryImageTag?: string | undefined; + /** + * The ports to expose. + */ + portsExposes: string; + /** + * The destination UUID. + */ + destinationUuid?: string | undefined; + /** + * The application name. + */ + name?: string | undefined; + /** + * The application description. + */ + description?: string | undefined; + /** + * The application domains. + */ + domains?: string | undefined; + /** + * The ports mappings. + */ + portsMappings?: string | undefined; + /** + * Health check enabled. + */ + healthCheckEnabled?: boolean | undefined; + /** + * Health check path. + */ + healthCheckPath?: string | undefined; + /** + * Health check port. + */ + healthCheckPort?: string | null | undefined; + /** + * Health check host. + */ + healthCheckHost?: string | null | undefined; + /** + * Health check method. + */ + healthCheckMethod?: string | undefined; + /** + * Health check return code. + */ + healthCheckReturnCode?: number | undefined; + /** + * Health check scheme. + */ + healthCheckScheme?: string | undefined; + /** + * Health check response text. + */ + healthCheckResponseText?: string | null | undefined; + /** + * Health check interval in seconds. + */ + healthCheckInterval?: number | undefined; + /** + * Health check timeout in seconds. + */ + healthCheckTimeout?: number | undefined; + /** + * Health check retries count. + */ + healthCheckRetries?: number | undefined; + /** + * Health check start period in seconds. + */ + healthCheckStartPeriod?: number | undefined; + /** + * Memory limit. + */ + limitsMemory?: string | undefined; + /** + * Memory swap limit. + */ + limitsMemorySwap?: string | undefined; + /** + * Memory swappiness. + */ + limitsMemorySwappiness?: number | undefined; + /** + * Memory reservation. + */ + limitsMemoryReservation?: string | undefined; + /** + * CPU limit. + */ + limitsCpus?: string | undefined; + /** + * CPU set. + */ + limitsCpuset?: string | null | undefined; + /** + * CPU shares. + */ + limitsCpuShares?: number | undefined; + /** + * Custom labels. + */ + customLabels?: string | undefined; + /** + * Custom docker run options. + */ + customDockerRunOptions?: string | undefined; + /** + * Post deployment command. + */ + postDeploymentCommand?: string | undefined; + /** + * Post deployment command container. + */ + postDeploymentCommandContainer?: string | undefined; + /** + * Pre deployment command. + */ + preDeploymentCommand?: string | undefined; + /** + * Pre deployment command container. + */ + preDeploymentCommandContainer?: string | undefined; + /** + * Manual webhook secret for Github. + */ + manualWebhookSecretGithub?: string | undefined; + /** + * Manual webhook secret for Gitlab. + */ + manualWebhookSecretGitlab?: string | undefined; + /** + * Manual webhook secret for Bitbucket. + */ + manualWebhookSecretBitbucket?: string | undefined; + /** + * Manual webhook secret for Gitea. + */ + manualWebhookSecretGitea?: string | undefined; + /** + * How to set redirect with Traefik / Caddy. www<->non-www. + */ + redirect?: CreateDockerimageApplicationRedirect | null | undefined; + /** + * The flag to indicate if the application should be deployed instantly. + */ + instantDeploy?: boolean | undefined; + /** + * Use build server. + */ + useBuildServer?: boolean | null | undefined; +}; + +/** @internal */ +export const CreateDockerimageApplicationRedirect$inboundSchema: + z.ZodNativeEnum = z.nativeEnum( + CreateDockerimageApplicationRedirect, + ); + +/** @internal */ +export const CreateDockerimageApplicationRedirect$outboundSchema: + z.ZodNativeEnum = + CreateDockerimageApplicationRedirect$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateDockerimageApplicationRedirect$ { + /** @deprecated use `CreateDockerimageApplicationRedirect$inboundSchema` instead. */ + export const inboundSchema = + CreateDockerimageApplicationRedirect$inboundSchema; + /** @deprecated use `CreateDockerimageApplicationRedirect$outboundSchema` instead. */ + export const outboundSchema = + CreateDockerimageApplicationRedirect$outboundSchema; +} + +/** @internal */ +export const CreateDockerimageApplicationRequestBody$inboundSchema: z.ZodType< + CreateDockerimageApplicationRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + project_uuid: z.string(), + server_uuid: z.string(), + environment_name: z.string(), + docker_registry_image_name: z.string(), + docker_registry_image_tag: z.string().optional(), + ports_exposes: z.string(), + destination_uuid: z.string().optional(), + name: z.string().optional(), + description: z.string().optional(), + domains: z.string().optional(), + ports_mappings: z.string().optional(), + health_check_enabled: z.boolean().optional(), + health_check_path: z.string().optional(), + health_check_port: z.nullable(z.string()).optional(), + health_check_host: z.nullable(z.string()).optional(), + health_check_method: z.string().optional(), + health_check_return_code: z.number().int().optional(), + health_check_scheme: z.string().optional(), + health_check_response_text: z.nullable(z.string()).optional(), + health_check_interval: z.number().int().optional(), + health_check_timeout: z.number().int().optional(), + health_check_retries: z.number().int().optional(), + health_check_start_period: z.number().int().optional(), + limits_memory: z.string().optional(), + limits_memory_swap: z.string().optional(), + limits_memory_swappiness: z.number().int().optional(), + limits_memory_reservation: z.string().optional(), + limits_cpus: z.string().optional(), + limits_cpuset: z.nullable(z.string()).optional(), + limits_cpu_shares: z.number().int().optional(), + custom_labels: z.string().optional(), + custom_docker_run_options: z.string().optional(), + post_deployment_command: z.string().optional(), + post_deployment_command_container: z.string().optional(), + pre_deployment_command: z.string().optional(), + pre_deployment_command_container: z.string().optional(), + manual_webhook_secret_github: z.string().optional(), + manual_webhook_secret_gitlab: z.string().optional(), + manual_webhook_secret_bitbucket: z.string().optional(), + manual_webhook_secret_gitea: z.string().optional(), + redirect: z.nullable(CreateDockerimageApplicationRedirect$inboundSchema) + .optional(), + instant_deploy: z.boolean().optional(), + use_build_server: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + "project_uuid": "projectUuid", + "server_uuid": "serverUuid", + "environment_name": "environmentName", + "docker_registry_image_name": "dockerRegistryImageName", + "docker_registry_image_tag": "dockerRegistryImageTag", + "ports_exposes": "portsExposes", + "destination_uuid": "destinationUuid", + "ports_mappings": "portsMappings", + "health_check_enabled": "healthCheckEnabled", + "health_check_path": "healthCheckPath", + "health_check_port": "healthCheckPort", + "health_check_host": "healthCheckHost", + "health_check_method": "healthCheckMethod", + "health_check_return_code": "healthCheckReturnCode", + "health_check_scheme": "healthCheckScheme", + "health_check_response_text": "healthCheckResponseText", + "health_check_interval": "healthCheckInterval", + "health_check_timeout": "healthCheckTimeout", + "health_check_retries": "healthCheckRetries", + "health_check_start_period": "healthCheckStartPeriod", + "limits_memory": "limitsMemory", + "limits_memory_swap": "limitsMemorySwap", + "limits_memory_swappiness": "limitsMemorySwappiness", + "limits_memory_reservation": "limitsMemoryReservation", + "limits_cpus": "limitsCpus", + "limits_cpuset": "limitsCpuset", + "limits_cpu_shares": "limitsCpuShares", + "custom_labels": "customLabels", + "custom_docker_run_options": "customDockerRunOptions", + "post_deployment_command": "postDeploymentCommand", + "post_deployment_command_container": "postDeploymentCommandContainer", + "pre_deployment_command": "preDeploymentCommand", + "pre_deployment_command_container": "preDeploymentCommandContainer", + "manual_webhook_secret_github": "manualWebhookSecretGithub", + "manual_webhook_secret_gitlab": "manualWebhookSecretGitlab", + "manual_webhook_secret_bitbucket": "manualWebhookSecretBitbucket", + "manual_webhook_secret_gitea": "manualWebhookSecretGitea", + "instant_deploy": "instantDeploy", + "use_build_server": "useBuildServer", + }); +}); + +/** @internal */ +export type CreateDockerimageApplicationRequestBody$Outbound = { + project_uuid: string; + server_uuid: string; + environment_name: string; + docker_registry_image_name: string; + docker_registry_image_tag?: string | undefined; + ports_exposes: string; + destination_uuid?: string | undefined; + name?: string | undefined; + description?: string | undefined; + domains?: string | undefined; + ports_mappings?: string | undefined; + health_check_enabled?: boolean | undefined; + health_check_path?: string | undefined; + health_check_port?: string | null | undefined; + health_check_host?: string | null | undefined; + health_check_method?: string | undefined; + health_check_return_code?: number | undefined; + health_check_scheme?: string | undefined; + health_check_response_text?: string | null | undefined; + health_check_interval?: number | undefined; + health_check_timeout?: number | undefined; + health_check_retries?: number | undefined; + health_check_start_period?: number | undefined; + limits_memory?: string | undefined; + limits_memory_swap?: string | undefined; + limits_memory_swappiness?: number | undefined; + limits_memory_reservation?: string | undefined; + limits_cpus?: string | undefined; + limits_cpuset?: string | null | undefined; + limits_cpu_shares?: number | undefined; + custom_labels?: string | undefined; + custom_docker_run_options?: string | undefined; + post_deployment_command?: string | undefined; + post_deployment_command_container?: string | undefined; + pre_deployment_command?: string | undefined; + pre_deployment_command_container?: string | undefined; + manual_webhook_secret_github?: string | undefined; + manual_webhook_secret_gitlab?: string | undefined; + manual_webhook_secret_bitbucket?: string | undefined; + manual_webhook_secret_gitea?: string | undefined; + redirect?: string | null | undefined; + instant_deploy?: boolean | undefined; + use_build_server?: boolean | null | undefined; +}; + +/** @internal */ +export const CreateDockerimageApplicationRequestBody$outboundSchema: z.ZodType< + CreateDockerimageApplicationRequestBody$Outbound, + z.ZodTypeDef, + CreateDockerimageApplicationRequestBody +> = z.object({ + projectUuid: z.string(), + serverUuid: z.string(), + environmentName: z.string(), + dockerRegistryImageName: z.string(), + dockerRegistryImageTag: z.string().optional(), + portsExposes: z.string(), + destinationUuid: z.string().optional(), + name: z.string().optional(), + description: z.string().optional(), + domains: z.string().optional(), + portsMappings: z.string().optional(), + healthCheckEnabled: z.boolean().optional(), + healthCheckPath: z.string().optional(), + healthCheckPort: z.nullable(z.string()).optional(), + healthCheckHost: z.nullable(z.string()).optional(), + healthCheckMethod: z.string().optional(), + healthCheckReturnCode: z.number().int().optional(), + healthCheckScheme: z.string().optional(), + healthCheckResponseText: z.nullable(z.string()).optional(), + healthCheckInterval: z.number().int().optional(), + healthCheckTimeout: z.number().int().optional(), + healthCheckRetries: z.number().int().optional(), + healthCheckStartPeriod: z.number().int().optional(), + limitsMemory: z.string().optional(), + limitsMemorySwap: z.string().optional(), + limitsMemorySwappiness: z.number().int().optional(), + limitsMemoryReservation: z.string().optional(), + limitsCpus: z.string().optional(), + limitsCpuset: z.nullable(z.string()).optional(), + limitsCpuShares: z.number().int().optional(), + customLabels: z.string().optional(), + customDockerRunOptions: z.string().optional(), + postDeploymentCommand: z.string().optional(), + postDeploymentCommandContainer: z.string().optional(), + preDeploymentCommand: z.string().optional(), + preDeploymentCommandContainer: z.string().optional(), + manualWebhookSecretGithub: z.string().optional(), + manualWebhookSecretGitlab: z.string().optional(), + manualWebhookSecretBitbucket: z.string().optional(), + manualWebhookSecretGitea: z.string().optional(), + redirect: z.nullable(CreateDockerimageApplicationRedirect$outboundSchema) + .optional(), + instantDeploy: z.boolean().optional(), + useBuildServer: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + projectUuid: "project_uuid", + serverUuid: "server_uuid", + environmentName: "environment_name", + dockerRegistryImageName: "docker_registry_image_name", + dockerRegistryImageTag: "docker_registry_image_tag", + portsExposes: "ports_exposes", + destinationUuid: "destination_uuid", + portsMappings: "ports_mappings", + healthCheckEnabled: "health_check_enabled", + healthCheckPath: "health_check_path", + healthCheckPort: "health_check_port", + healthCheckHost: "health_check_host", + healthCheckMethod: "health_check_method", + healthCheckReturnCode: "health_check_return_code", + healthCheckScheme: "health_check_scheme", + healthCheckResponseText: "health_check_response_text", + healthCheckInterval: "health_check_interval", + healthCheckTimeout: "health_check_timeout", + healthCheckRetries: "health_check_retries", + healthCheckStartPeriod: "health_check_start_period", + limitsMemory: "limits_memory", + limitsMemorySwap: "limits_memory_swap", + limitsMemorySwappiness: "limits_memory_swappiness", + limitsMemoryReservation: "limits_memory_reservation", + limitsCpus: "limits_cpus", + limitsCpuset: "limits_cpuset", + limitsCpuShares: "limits_cpu_shares", + customLabels: "custom_labels", + customDockerRunOptions: "custom_docker_run_options", + postDeploymentCommand: "post_deployment_command", + postDeploymentCommandContainer: "post_deployment_command_container", + preDeploymentCommand: "pre_deployment_command", + preDeploymentCommandContainer: "pre_deployment_command_container", + manualWebhookSecretGithub: "manual_webhook_secret_github", + manualWebhookSecretGitlab: "manual_webhook_secret_gitlab", + manualWebhookSecretBitbucket: "manual_webhook_secret_bitbucket", + manualWebhookSecretGitea: "manual_webhook_secret_gitea", + instantDeploy: "instant_deploy", + useBuildServer: "use_build_server", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateDockerimageApplicationRequestBody$ { + /** @deprecated use `CreateDockerimageApplicationRequestBody$inboundSchema` instead. */ + export const inboundSchema = + CreateDockerimageApplicationRequestBody$inboundSchema; + /** @deprecated use `CreateDockerimageApplicationRequestBody$outboundSchema` instead. */ + export const outboundSchema = + CreateDockerimageApplicationRequestBody$outboundSchema; + /** @deprecated use `CreateDockerimageApplicationRequestBody$Outbound` instead. */ + export type Outbound = CreateDockerimageApplicationRequestBody$Outbound; +} + +export function createDockerimageApplicationRequestBodyToJSON( + createDockerimageApplicationRequestBody: + CreateDockerimageApplicationRequestBody, +): string { + return JSON.stringify( + CreateDockerimageApplicationRequestBody$outboundSchema.parse( + createDockerimageApplicationRequestBody, + ), + ); +} + +export function createDockerimageApplicationRequestBodyFromJSON( + jsonString: string, +): SafeParseResult< + CreateDockerimageApplicationRequestBody, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + CreateDockerimageApplicationRequestBody$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'CreateDockerimageApplicationRequestBody' from JSON`, + ); +} diff --git a/src/models/operations/createenvbyapplicationuuid.ts b/src/models/operations/createenvbyapplicationuuid.ts new file mode 100644 index 0000000..812bda6 --- /dev/null +++ b/src/models/operations/createenvbyapplicationuuid.ts @@ -0,0 +1,286 @@ +/* + * 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"; + +/** + * Env created. + */ +export type CreateEnvByApplicationUuidRequestBody = { + /** + * The key of the environment variable. + */ + key?: string | undefined; + /** + * The value of the environment variable. + */ + value?: string | undefined; + /** + * The flag to indicate if the environment variable is used in preview deployments. + */ + isPreview?: boolean | undefined; + /** + * The flag to indicate if the environment variable is used in build time. + */ + isBuildTime?: boolean | undefined; + /** + * The flag to indicate if the environment variable is a literal, nothing espaced. + */ + isLiteral?: boolean | undefined; + /** + * The flag to indicate if the environment variable is multiline. + */ + isMultiline?: boolean | undefined; + /** + * The flag to indicate if the environment variable's value is shown on the UI. + */ + isShownOnce?: boolean | undefined; +}; + +export type CreateEnvByApplicationUuidRequest = { + /** + * UUID of the application. + */ + uuid: string; + /** + * Env created. + */ + requestBody: CreateEnvByApplicationUuidRequestBody; +}; + +/** + * Environment variable created. + */ +export type CreateEnvByApplicationUuidResponseBody = { + uuid?: string | undefined; +}; + +/** @internal */ +export const CreateEnvByApplicationUuidRequestBody$inboundSchema: z.ZodType< + CreateEnvByApplicationUuidRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + key: z.string().optional(), + value: z.string().optional(), + is_preview: z.boolean().optional(), + is_build_time: z.boolean().optional(), + is_literal: z.boolean().optional(), + is_multiline: z.boolean().optional(), + is_shown_once: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + "is_preview": "isPreview", + "is_build_time": "isBuildTime", + "is_literal": "isLiteral", + "is_multiline": "isMultiline", + "is_shown_once": "isShownOnce", + }); +}); + +/** @internal */ +export type CreateEnvByApplicationUuidRequestBody$Outbound = { + key?: string | undefined; + value?: string | undefined; + is_preview?: boolean | undefined; + is_build_time?: boolean | undefined; + is_literal?: boolean | undefined; + is_multiline?: boolean | undefined; + is_shown_once?: boolean | undefined; +}; + +/** @internal */ +export const CreateEnvByApplicationUuidRequestBody$outboundSchema: z.ZodType< + CreateEnvByApplicationUuidRequestBody$Outbound, + z.ZodTypeDef, + CreateEnvByApplicationUuidRequestBody +> = z.object({ + key: z.string().optional(), + value: z.string().optional(), + isPreview: z.boolean().optional(), + isBuildTime: z.boolean().optional(), + isLiteral: z.boolean().optional(), + isMultiline: z.boolean().optional(), + isShownOnce: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + isPreview: "is_preview", + isBuildTime: "is_build_time", + isLiteral: "is_literal", + isMultiline: "is_multiline", + isShownOnce: "is_shown_once", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateEnvByApplicationUuidRequestBody$ { + /** @deprecated use `CreateEnvByApplicationUuidRequestBody$inboundSchema` instead. */ + export const inboundSchema = + CreateEnvByApplicationUuidRequestBody$inboundSchema; + /** @deprecated use `CreateEnvByApplicationUuidRequestBody$outboundSchema` instead. */ + export const outboundSchema = + CreateEnvByApplicationUuidRequestBody$outboundSchema; + /** @deprecated use `CreateEnvByApplicationUuidRequestBody$Outbound` instead. */ + export type Outbound = CreateEnvByApplicationUuidRequestBody$Outbound; +} + +export function createEnvByApplicationUuidRequestBodyToJSON( + createEnvByApplicationUuidRequestBody: CreateEnvByApplicationUuidRequestBody, +): string { + return JSON.stringify( + CreateEnvByApplicationUuidRequestBody$outboundSchema.parse( + createEnvByApplicationUuidRequestBody, + ), + ); +} + +export function createEnvByApplicationUuidRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + CreateEnvByApplicationUuidRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateEnvByApplicationUuidRequestBody' from JSON`, + ); +} + +/** @internal */ +export const CreateEnvByApplicationUuidRequest$inboundSchema: z.ZodType< + CreateEnvByApplicationUuidRequest, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string(), + RequestBody: z.lazy(() => + CreateEnvByApplicationUuidRequestBody$inboundSchema + ), +}).transform((v) => { + return remap$(v, { + "RequestBody": "requestBody", + }); +}); + +/** @internal */ +export type CreateEnvByApplicationUuidRequest$Outbound = { + uuid: string; + RequestBody: CreateEnvByApplicationUuidRequestBody$Outbound; +}; + +/** @internal */ +export const CreateEnvByApplicationUuidRequest$outboundSchema: z.ZodType< + CreateEnvByApplicationUuidRequest$Outbound, + z.ZodTypeDef, + CreateEnvByApplicationUuidRequest +> = z.object({ + uuid: z.string(), + requestBody: z.lazy(() => + CreateEnvByApplicationUuidRequestBody$outboundSchema + ), +}).transform((v) => { + return remap$(v, { + requestBody: "RequestBody", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateEnvByApplicationUuidRequest$ { + /** @deprecated use `CreateEnvByApplicationUuidRequest$inboundSchema` instead. */ + export const inboundSchema = CreateEnvByApplicationUuidRequest$inboundSchema; + /** @deprecated use `CreateEnvByApplicationUuidRequest$outboundSchema` instead. */ + export const outboundSchema = + CreateEnvByApplicationUuidRequest$outboundSchema; + /** @deprecated use `CreateEnvByApplicationUuidRequest$Outbound` instead. */ + export type Outbound = CreateEnvByApplicationUuidRequest$Outbound; +} + +export function createEnvByApplicationUuidRequestToJSON( + createEnvByApplicationUuidRequest: CreateEnvByApplicationUuidRequest, +): string { + return JSON.stringify( + CreateEnvByApplicationUuidRequest$outboundSchema.parse( + createEnvByApplicationUuidRequest, + ), + ); +} + +export function createEnvByApplicationUuidRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateEnvByApplicationUuidRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateEnvByApplicationUuidRequest' from JSON`, + ); +} + +/** @internal */ +export const CreateEnvByApplicationUuidResponseBody$inboundSchema: z.ZodType< + CreateEnvByApplicationUuidResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string().optional(), +}); + +/** @internal */ +export type CreateEnvByApplicationUuidResponseBody$Outbound = { + uuid?: string | undefined; +}; + +/** @internal */ +export const CreateEnvByApplicationUuidResponseBody$outboundSchema: z.ZodType< + CreateEnvByApplicationUuidResponseBody$Outbound, + z.ZodTypeDef, + CreateEnvByApplicationUuidResponseBody +> = z.object({ + uuid: 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 CreateEnvByApplicationUuidResponseBody$ { + /** @deprecated use `CreateEnvByApplicationUuidResponseBody$inboundSchema` instead. */ + export const inboundSchema = + CreateEnvByApplicationUuidResponseBody$inboundSchema; + /** @deprecated use `CreateEnvByApplicationUuidResponseBody$outboundSchema` instead. */ + export const outboundSchema = + CreateEnvByApplicationUuidResponseBody$outboundSchema; + /** @deprecated use `CreateEnvByApplicationUuidResponseBody$Outbound` instead. */ + export type Outbound = CreateEnvByApplicationUuidResponseBody$Outbound; +} + +export function createEnvByApplicationUuidResponseBodyToJSON( + createEnvByApplicationUuidResponseBody: + CreateEnvByApplicationUuidResponseBody, +): string { + return JSON.stringify( + CreateEnvByApplicationUuidResponseBody$outboundSchema.parse( + createEnvByApplicationUuidResponseBody, + ), + ); +} + +export function createEnvByApplicationUuidResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + CreateEnvByApplicationUuidResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateEnvByApplicationUuidResponseBody' from JSON`, + ); +} diff --git a/src/models/operations/createenvbyserviceuuid.ts b/src/models/operations/createenvbyserviceuuid.ts new file mode 100644 index 0000000..1e2d3d3 --- /dev/null +++ b/src/models/operations/createenvbyserviceuuid.ts @@ -0,0 +1,277 @@ +/* + * 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"; + +/** + * Env created. + */ +export type CreateEnvByServiceUuidRequestBody = { + /** + * The key of the environment variable. + */ + key?: string | undefined; + /** + * The value of the environment variable. + */ + value?: string | undefined; + /** + * The flag to indicate if the environment variable is used in preview deployments. + */ + isPreview?: boolean | undefined; + /** + * The flag to indicate if the environment variable is used in build time. + */ + isBuildTime?: boolean | undefined; + /** + * The flag to indicate if the environment variable is a literal, nothing espaced. + */ + isLiteral?: boolean | undefined; + /** + * The flag to indicate if the environment variable is multiline. + */ + isMultiline?: boolean | undefined; + /** + * The flag to indicate if the environment variable's value is shown on the UI. + */ + isShownOnce?: boolean | undefined; +}; + +export type CreateEnvByServiceUuidRequest = { + /** + * UUID of the service. + */ + uuid: string; + /** + * Env created. + */ + requestBody: CreateEnvByServiceUuidRequestBody; +}; + +/** + * Environment variable created. + */ +export type CreateEnvByServiceUuidResponseBody = { + uuid?: string | undefined; +}; + +/** @internal */ +export const CreateEnvByServiceUuidRequestBody$inboundSchema: z.ZodType< + CreateEnvByServiceUuidRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + key: z.string().optional(), + value: z.string().optional(), + is_preview: z.boolean().optional(), + is_build_time: z.boolean().optional(), + is_literal: z.boolean().optional(), + is_multiline: z.boolean().optional(), + is_shown_once: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + "is_preview": "isPreview", + "is_build_time": "isBuildTime", + "is_literal": "isLiteral", + "is_multiline": "isMultiline", + "is_shown_once": "isShownOnce", + }); +}); + +/** @internal */ +export type CreateEnvByServiceUuidRequestBody$Outbound = { + key?: string | undefined; + value?: string | undefined; + is_preview?: boolean | undefined; + is_build_time?: boolean | undefined; + is_literal?: boolean | undefined; + is_multiline?: boolean | undefined; + is_shown_once?: boolean | undefined; +}; + +/** @internal */ +export const CreateEnvByServiceUuidRequestBody$outboundSchema: z.ZodType< + CreateEnvByServiceUuidRequestBody$Outbound, + z.ZodTypeDef, + CreateEnvByServiceUuidRequestBody +> = z.object({ + key: z.string().optional(), + value: z.string().optional(), + isPreview: z.boolean().optional(), + isBuildTime: z.boolean().optional(), + isLiteral: z.boolean().optional(), + isMultiline: z.boolean().optional(), + isShownOnce: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + isPreview: "is_preview", + isBuildTime: "is_build_time", + isLiteral: "is_literal", + isMultiline: "is_multiline", + isShownOnce: "is_shown_once", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateEnvByServiceUuidRequestBody$ { + /** @deprecated use `CreateEnvByServiceUuidRequestBody$inboundSchema` instead. */ + export const inboundSchema = CreateEnvByServiceUuidRequestBody$inboundSchema; + /** @deprecated use `CreateEnvByServiceUuidRequestBody$outboundSchema` instead. */ + export const outboundSchema = + CreateEnvByServiceUuidRequestBody$outboundSchema; + /** @deprecated use `CreateEnvByServiceUuidRequestBody$Outbound` instead. */ + export type Outbound = CreateEnvByServiceUuidRequestBody$Outbound; +} + +export function createEnvByServiceUuidRequestBodyToJSON( + createEnvByServiceUuidRequestBody: CreateEnvByServiceUuidRequestBody, +): string { + return JSON.stringify( + CreateEnvByServiceUuidRequestBody$outboundSchema.parse( + createEnvByServiceUuidRequestBody, + ), + ); +} + +export function createEnvByServiceUuidRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateEnvByServiceUuidRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateEnvByServiceUuidRequestBody' from JSON`, + ); +} + +/** @internal */ +export const CreateEnvByServiceUuidRequest$inboundSchema: z.ZodType< + CreateEnvByServiceUuidRequest, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string(), + RequestBody: z.lazy(() => CreateEnvByServiceUuidRequestBody$inboundSchema), +}).transform((v) => { + return remap$(v, { + "RequestBody": "requestBody", + }); +}); + +/** @internal */ +export type CreateEnvByServiceUuidRequest$Outbound = { + uuid: string; + RequestBody: CreateEnvByServiceUuidRequestBody$Outbound; +}; + +/** @internal */ +export const CreateEnvByServiceUuidRequest$outboundSchema: z.ZodType< + CreateEnvByServiceUuidRequest$Outbound, + z.ZodTypeDef, + CreateEnvByServiceUuidRequest +> = z.object({ + uuid: z.string(), + requestBody: z.lazy(() => CreateEnvByServiceUuidRequestBody$outboundSchema), +}).transform((v) => { + return remap$(v, { + requestBody: "RequestBody", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateEnvByServiceUuidRequest$ { + /** @deprecated use `CreateEnvByServiceUuidRequest$inboundSchema` instead. */ + export const inboundSchema = CreateEnvByServiceUuidRequest$inboundSchema; + /** @deprecated use `CreateEnvByServiceUuidRequest$outboundSchema` instead. */ + export const outboundSchema = CreateEnvByServiceUuidRequest$outboundSchema; + /** @deprecated use `CreateEnvByServiceUuidRequest$Outbound` instead. */ + export type Outbound = CreateEnvByServiceUuidRequest$Outbound; +} + +export function createEnvByServiceUuidRequestToJSON( + createEnvByServiceUuidRequest: CreateEnvByServiceUuidRequest, +): string { + return JSON.stringify( + CreateEnvByServiceUuidRequest$outboundSchema.parse( + createEnvByServiceUuidRequest, + ), + ); +} + +export function createEnvByServiceUuidRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateEnvByServiceUuidRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateEnvByServiceUuidRequest' from JSON`, + ); +} + +/** @internal */ +export const CreateEnvByServiceUuidResponseBody$inboundSchema: z.ZodType< + CreateEnvByServiceUuidResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string().optional(), +}); + +/** @internal */ +export type CreateEnvByServiceUuidResponseBody$Outbound = { + uuid?: string | undefined; +}; + +/** @internal */ +export const CreateEnvByServiceUuidResponseBody$outboundSchema: z.ZodType< + CreateEnvByServiceUuidResponseBody$Outbound, + z.ZodTypeDef, + CreateEnvByServiceUuidResponseBody +> = z.object({ + uuid: 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 CreateEnvByServiceUuidResponseBody$ { + /** @deprecated use `CreateEnvByServiceUuidResponseBody$inboundSchema` instead. */ + export const inboundSchema = CreateEnvByServiceUuidResponseBody$inboundSchema; + /** @deprecated use `CreateEnvByServiceUuidResponseBody$outboundSchema` instead. */ + export const outboundSchema = + CreateEnvByServiceUuidResponseBody$outboundSchema; + /** @deprecated use `CreateEnvByServiceUuidResponseBody$Outbound` instead. */ + export type Outbound = CreateEnvByServiceUuidResponseBody$Outbound; +} + +export function createEnvByServiceUuidResponseBodyToJSON( + createEnvByServiceUuidResponseBody: CreateEnvByServiceUuidResponseBody, +): string { + return JSON.stringify( + CreateEnvByServiceUuidResponseBody$outboundSchema.parse( + createEnvByServiceUuidResponseBody, + ), + ); +} + +export function createEnvByServiceUuidResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + CreateEnvByServiceUuidResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateEnvByServiceUuidResponseBody' from JSON`, + ); +} diff --git a/src/models/operations/createprivatedeploykeyapplication.ts b/src/models/operations/createprivatedeploykeyapplication.ts new file mode 100644 index 0000000..280c403 --- /dev/null +++ b/src/models/operations/createprivatedeploykeyapplication.ts @@ -0,0 +1,753 @@ +/* + * 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"; + +/** + * The build pack type. + */ +export const CreatePrivateDeployKeyApplicationBuildPack = { + Nixpacks: "nixpacks", + Static: "static", + Dockerfile: "dockerfile", + Dockercompose: "dockercompose", +} as const; +/** + * The build pack type. + */ +export type CreatePrivateDeployKeyApplicationBuildPack = ClosedEnum< + typeof CreatePrivateDeployKeyApplicationBuildPack +>; + +/** + * The static image. + */ +export const CreatePrivateDeployKeyApplicationStaticImage = { + NginxAlpine: "nginx:alpine", +} as const; +/** + * The static image. + */ +export type CreatePrivateDeployKeyApplicationStaticImage = ClosedEnum< + typeof CreatePrivateDeployKeyApplicationStaticImage +>; + +/** + * How to set redirect with Traefik / Caddy. www<->non-www. + */ +export const CreatePrivateDeployKeyApplicationRedirect = { + Www: "www", + NonWww: "non-www", + Both: "both", +} as const; +/** + * How to set redirect with Traefik / Caddy. www<->non-www. + */ +export type CreatePrivateDeployKeyApplicationRedirect = ClosedEnum< + typeof CreatePrivateDeployKeyApplicationRedirect +>; + +/** + * Application object that needs to be created. + */ +export type CreatePrivateDeployKeyApplicationRequestBody = { + /** + * The project UUID. + */ + projectUuid: string; + /** + * The server UUID. + */ + serverUuid: string; + /** + * The environment name. + */ + environmentName: string; + /** + * The private key UUID. + */ + privateKeyUuid: string; + /** + * The git repository URL. + */ + gitRepository: string; + /** + * The git branch. + */ + gitBranch: string; + /** + * The ports to expose. + */ + portsExposes: string; + /** + * The destination UUID. + */ + destinationUuid?: string | undefined; + /** + * The build pack type. + */ + buildPack: CreatePrivateDeployKeyApplicationBuildPack; + /** + * The application name. + */ + name?: string | undefined; + /** + * The application description. + */ + description?: string | undefined; + /** + * The application domains. + */ + domains?: string | undefined; + /** + * The git commit SHA. + */ + gitCommitSha?: string | undefined; + /** + * The docker registry image name. + */ + dockerRegistryImageName?: string | undefined; + /** + * The docker registry image tag. + */ + dockerRegistryImageTag?: string | undefined; + /** + * The flag to indicate if the application is static. + */ + isStatic?: boolean | undefined; + /** + * The static image. + */ + staticImage?: CreatePrivateDeployKeyApplicationStaticImage | undefined; + /** + * The install command. + */ + installCommand?: string | undefined; + /** + * The build command. + */ + buildCommand?: string | undefined; + /** + * The start command. + */ + startCommand?: string | undefined; + /** + * The ports mappings. + */ + portsMappings?: string | undefined; + /** + * The base directory for all commands. + */ + baseDirectory?: string | undefined; + /** + * The publish directory. + */ + publishDirectory?: string | undefined; + /** + * Health check enabled. + */ + healthCheckEnabled?: boolean | undefined; + /** + * Health check path. + */ + healthCheckPath?: string | undefined; + /** + * Health check port. + */ + healthCheckPort?: string | null | undefined; + /** + * Health check host. + */ + healthCheckHost?: string | null | undefined; + /** + * Health check method. + */ + healthCheckMethod?: string | undefined; + /** + * Health check return code. + */ + healthCheckReturnCode?: number | undefined; + /** + * Health check scheme. + */ + healthCheckScheme?: string | undefined; + /** + * Health check response text. + */ + healthCheckResponseText?: string | null | undefined; + /** + * Health check interval in seconds. + */ + healthCheckInterval?: number | undefined; + /** + * Health check timeout in seconds. + */ + healthCheckTimeout?: number | undefined; + /** + * Health check retries count. + */ + healthCheckRetries?: number | undefined; + /** + * Health check start period in seconds. + */ + healthCheckStartPeriod?: number | undefined; + /** + * Memory limit. + */ + limitsMemory?: string | undefined; + /** + * Memory swap limit. + */ + limitsMemorySwap?: string | undefined; + /** + * Memory swappiness. + */ + limitsMemorySwappiness?: number | undefined; + /** + * Memory reservation. + */ + limitsMemoryReservation?: string | undefined; + /** + * CPU limit. + */ + limitsCpus?: string | undefined; + /** + * CPU set. + */ + limitsCpuset?: string | null | undefined; + /** + * CPU shares. + */ + limitsCpuShares?: number | undefined; + /** + * Custom labels. + */ + customLabels?: string | undefined; + /** + * Custom docker run options. + */ + customDockerRunOptions?: string | undefined; + /** + * Post deployment command. + */ + postDeploymentCommand?: string | undefined; + /** + * Post deployment command container. + */ + postDeploymentCommandContainer?: string | undefined; + /** + * Pre deployment command. + */ + preDeploymentCommand?: string | undefined; + /** + * Pre deployment command container. + */ + preDeploymentCommandContainer?: string | undefined; + /** + * Manual webhook secret for Github. + */ + manualWebhookSecretGithub?: string | undefined; + /** + * Manual webhook secret for Gitlab. + */ + manualWebhookSecretGitlab?: string | undefined; + /** + * Manual webhook secret for Bitbucket. + */ + manualWebhookSecretBitbucket?: string | undefined; + /** + * Manual webhook secret for Gitea. + */ + manualWebhookSecretGitea?: string | undefined; + /** + * How to set redirect with Traefik / Caddy. www<->non-www. + */ + redirect?: CreatePrivateDeployKeyApplicationRedirect | null | undefined; + /** + * The flag to indicate if the application should be deployed instantly. + */ + instantDeploy?: boolean | undefined; + /** + * The Dockerfile content. + */ + dockerfile?: string | undefined; + /** + * The Docker Compose location. + */ + dockerComposeLocation?: string | undefined; + /** + * The Docker Compose raw content. + */ + dockerComposeRaw?: string | undefined; + /** + * The Docker Compose custom start command. + */ + dockerComposeCustomStartCommand?: string | undefined; + /** + * The Docker Compose custom build command. + */ + dockerComposeCustomBuildCommand?: string | undefined; + /** + * The Docker Compose domains. + */ + dockerComposeDomains?: Array | undefined; + /** + * The watch paths. + */ + watchPaths?: string | undefined; + /** + * Use build server. + */ + useBuildServer?: boolean | null | undefined; +}; + +/** @internal */ +export const CreatePrivateDeployKeyApplicationBuildPack$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(CreatePrivateDeployKeyApplicationBuildPack); + +/** @internal */ +export const CreatePrivateDeployKeyApplicationBuildPack$outboundSchema: + z.ZodNativeEnum = + CreatePrivateDeployKeyApplicationBuildPack$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreatePrivateDeployKeyApplicationBuildPack$ { + /** @deprecated use `CreatePrivateDeployKeyApplicationBuildPack$inboundSchema` instead. */ + export const inboundSchema = + CreatePrivateDeployKeyApplicationBuildPack$inboundSchema; + /** @deprecated use `CreatePrivateDeployKeyApplicationBuildPack$outboundSchema` instead. */ + export const outboundSchema = + CreatePrivateDeployKeyApplicationBuildPack$outboundSchema; +} + +/** @internal */ +export const CreatePrivateDeployKeyApplicationStaticImage$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(CreatePrivateDeployKeyApplicationStaticImage); + +/** @internal */ +export const CreatePrivateDeployKeyApplicationStaticImage$outboundSchema: + z.ZodNativeEnum = + CreatePrivateDeployKeyApplicationStaticImage$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreatePrivateDeployKeyApplicationStaticImage$ { + /** @deprecated use `CreatePrivateDeployKeyApplicationStaticImage$inboundSchema` instead. */ + export const inboundSchema = + CreatePrivateDeployKeyApplicationStaticImage$inboundSchema; + /** @deprecated use `CreatePrivateDeployKeyApplicationStaticImage$outboundSchema` instead. */ + export const outboundSchema = + CreatePrivateDeployKeyApplicationStaticImage$outboundSchema; +} + +/** @internal */ +export const CreatePrivateDeployKeyApplicationRedirect$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(CreatePrivateDeployKeyApplicationRedirect); + +/** @internal */ +export const CreatePrivateDeployKeyApplicationRedirect$outboundSchema: + z.ZodNativeEnum = + CreatePrivateDeployKeyApplicationRedirect$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreatePrivateDeployKeyApplicationRedirect$ { + /** @deprecated use `CreatePrivateDeployKeyApplicationRedirect$inboundSchema` instead. */ + export const inboundSchema = + CreatePrivateDeployKeyApplicationRedirect$inboundSchema; + /** @deprecated use `CreatePrivateDeployKeyApplicationRedirect$outboundSchema` instead. */ + export const outboundSchema = + CreatePrivateDeployKeyApplicationRedirect$outboundSchema; +} + +/** @internal */ +export const CreatePrivateDeployKeyApplicationRequestBody$inboundSchema: + z.ZodType< + CreatePrivateDeployKeyApplicationRequestBody, + z.ZodTypeDef, + unknown + > = z.object({ + project_uuid: z.string(), + server_uuid: z.string(), + environment_name: z.string(), + private_key_uuid: z.string(), + git_repository: z.string(), + git_branch: z.string(), + ports_exposes: z.string(), + destination_uuid: z.string().optional(), + build_pack: CreatePrivateDeployKeyApplicationBuildPack$inboundSchema, + name: z.string().optional(), + description: z.string().optional(), + domains: z.string().optional(), + git_commit_sha: z.string().optional(), + docker_registry_image_name: z.string().optional(), + docker_registry_image_tag: z.string().optional(), + is_static: z.boolean().optional(), + static_image: CreatePrivateDeployKeyApplicationStaticImage$inboundSchema + .optional(), + install_command: z.string().optional(), + build_command: z.string().optional(), + start_command: z.string().optional(), + ports_mappings: z.string().optional(), + base_directory: z.string().optional(), + publish_directory: z.string().optional(), + health_check_enabled: z.boolean().optional(), + health_check_path: z.string().optional(), + health_check_port: z.nullable(z.string()).optional(), + health_check_host: z.nullable(z.string()).optional(), + health_check_method: z.string().optional(), + health_check_return_code: z.number().int().optional(), + health_check_scheme: z.string().optional(), + health_check_response_text: z.nullable(z.string()).optional(), + health_check_interval: z.number().int().optional(), + health_check_timeout: z.number().int().optional(), + health_check_retries: z.number().int().optional(), + health_check_start_period: z.number().int().optional(), + limits_memory: z.string().optional(), + limits_memory_swap: z.string().optional(), + limits_memory_swappiness: z.number().int().optional(), + limits_memory_reservation: z.string().optional(), + limits_cpus: z.string().optional(), + limits_cpuset: z.nullable(z.string()).optional(), + limits_cpu_shares: z.number().int().optional(), + custom_labels: z.string().optional(), + custom_docker_run_options: z.string().optional(), + post_deployment_command: z.string().optional(), + post_deployment_command_container: z.string().optional(), + pre_deployment_command: z.string().optional(), + pre_deployment_command_container: z.string().optional(), + manual_webhook_secret_github: z.string().optional(), + manual_webhook_secret_gitlab: z.string().optional(), + manual_webhook_secret_bitbucket: z.string().optional(), + manual_webhook_secret_gitea: z.string().optional(), + redirect: z.nullable( + CreatePrivateDeployKeyApplicationRedirect$inboundSchema, + ).optional(), + instant_deploy: z.boolean().optional(), + dockerfile: z.string().optional(), + docker_compose_location: z.string().optional(), + docker_compose_raw: z.string().optional(), + docker_compose_custom_start_command: z.string().optional(), + docker_compose_custom_build_command: z.string().optional(), + docker_compose_domains: z.array(z.any()).optional(), + watch_paths: z.string().optional(), + use_build_server: z.nullable(z.boolean()).optional(), + }).transform((v) => { + return remap$(v, { + "project_uuid": "projectUuid", + "server_uuid": "serverUuid", + "environment_name": "environmentName", + "private_key_uuid": "privateKeyUuid", + "git_repository": "gitRepository", + "git_branch": "gitBranch", + "ports_exposes": "portsExposes", + "destination_uuid": "destinationUuid", + "build_pack": "buildPack", + "git_commit_sha": "gitCommitSha", + "docker_registry_image_name": "dockerRegistryImageName", + "docker_registry_image_tag": "dockerRegistryImageTag", + "is_static": "isStatic", + "static_image": "staticImage", + "install_command": "installCommand", + "build_command": "buildCommand", + "start_command": "startCommand", + "ports_mappings": "portsMappings", + "base_directory": "baseDirectory", + "publish_directory": "publishDirectory", + "health_check_enabled": "healthCheckEnabled", + "health_check_path": "healthCheckPath", + "health_check_port": "healthCheckPort", + "health_check_host": "healthCheckHost", + "health_check_method": "healthCheckMethod", + "health_check_return_code": "healthCheckReturnCode", + "health_check_scheme": "healthCheckScheme", + "health_check_response_text": "healthCheckResponseText", + "health_check_interval": "healthCheckInterval", + "health_check_timeout": "healthCheckTimeout", + "health_check_retries": "healthCheckRetries", + "health_check_start_period": "healthCheckStartPeriod", + "limits_memory": "limitsMemory", + "limits_memory_swap": "limitsMemorySwap", + "limits_memory_swappiness": "limitsMemorySwappiness", + "limits_memory_reservation": "limitsMemoryReservation", + "limits_cpus": "limitsCpus", + "limits_cpuset": "limitsCpuset", + "limits_cpu_shares": "limitsCpuShares", + "custom_labels": "customLabels", + "custom_docker_run_options": "customDockerRunOptions", + "post_deployment_command": "postDeploymentCommand", + "post_deployment_command_container": "postDeploymentCommandContainer", + "pre_deployment_command": "preDeploymentCommand", + "pre_deployment_command_container": "preDeploymentCommandContainer", + "manual_webhook_secret_github": "manualWebhookSecretGithub", + "manual_webhook_secret_gitlab": "manualWebhookSecretGitlab", + "manual_webhook_secret_bitbucket": "manualWebhookSecretBitbucket", + "manual_webhook_secret_gitea": "manualWebhookSecretGitea", + "instant_deploy": "instantDeploy", + "docker_compose_location": "dockerComposeLocation", + "docker_compose_raw": "dockerComposeRaw", + "docker_compose_custom_start_command": "dockerComposeCustomStartCommand", + "docker_compose_custom_build_command": "dockerComposeCustomBuildCommand", + "docker_compose_domains": "dockerComposeDomains", + "watch_paths": "watchPaths", + "use_build_server": "useBuildServer", + }); + }); + +/** @internal */ +export type CreatePrivateDeployKeyApplicationRequestBody$Outbound = { + project_uuid: string; + server_uuid: string; + environment_name: string; + private_key_uuid: string; + git_repository: string; + git_branch: string; + ports_exposes: string; + destination_uuid?: string | undefined; + build_pack: string; + name?: string | undefined; + description?: string | undefined; + domains?: string | undefined; + git_commit_sha?: string | undefined; + docker_registry_image_name?: string | undefined; + docker_registry_image_tag?: string | undefined; + is_static?: boolean | undefined; + static_image?: string | undefined; + install_command?: string | undefined; + build_command?: string | undefined; + start_command?: string | undefined; + ports_mappings?: string | undefined; + base_directory?: string | undefined; + publish_directory?: string | undefined; + health_check_enabled?: boolean | undefined; + health_check_path?: string | undefined; + health_check_port?: string | null | undefined; + health_check_host?: string | null | undefined; + health_check_method?: string | undefined; + health_check_return_code?: number | undefined; + health_check_scheme?: string | undefined; + health_check_response_text?: string | null | undefined; + health_check_interval?: number | undefined; + health_check_timeout?: number | undefined; + health_check_retries?: number | undefined; + health_check_start_period?: number | undefined; + limits_memory?: string | undefined; + limits_memory_swap?: string | undefined; + limits_memory_swappiness?: number | undefined; + limits_memory_reservation?: string | undefined; + limits_cpus?: string | undefined; + limits_cpuset?: string | null | undefined; + limits_cpu_shares?: number | undefined; + custom_labels?: string | undefined; + custom_docker_run_options?: string | undefined; + post_deployment_command?: string | undefined; + post_deployment_command_container?: string | undefined; + pre_deployment_command?: string | undefined; + pre_deployment_command_container?: string | undefined; + manual_webhook_secret_github?: string | undefined; + manual_webhook_secret_gitlab?: string | undefined; + manual_webhook_secret_bitbucket?: string | undefined; + manual_webhook_secret_gitea?: string | undefined; + redirect?: string | null | undefined; + instant_deploy?: boolean | undefined; + dockerfile?: string | undefined; + docker_compose_location?: string | undefined; + docker_compose_raw?: string | undefined; + docker_compose_custom_start_command?: string | undefined; + docker_compose_custom_build_command?: string | undefined; + docker_compose_domains?: Array | undefined; + watch_paths?: string | undefined; + use_build_server?: boolean | null | undefined; +}; + +/** @internal */ +export const CreatePrivateDeployKeyApplicationRequestBody$outboundSchema: + z.ZodType< + CreatePrivateDeployKeyApplicationRequestBody$Outbound, + z.ZodTypeDef, + CreatePrivateDeployKeyApplicationRequestBody + > = z.object({ + projectUuid: z.string(), + serverUuid: z.string(), + environmentName: z.string(), + privateKeyUuid: z.string(), + gitRepository: z.string(), + gitBranch: z.string(), + portsExposes: z.string(), + destinationUuid: z.string().optional(), + buildPack: CreatePrivateDeployKeyApplicationBuildPack$outboundSchema, + name: z.string().optional(), + description: z.string().optional(), + domains: z.string().optional(), + gitCommitSha: z.string().optional(), + dockerRegistryImageName: z.string().optional(), + dockerRegistryImageTag: z.string().optional(), + isStatic: z.boolean().optional(), + staticImage: CreatePrivateDeployKeyApplicationStaticImage$outboundSchema + .optional(), + installCommand: z.string().optional(), + buildCommand: z.string().optional(), + startCommand: z.string().optional(), + portsMappings: z.string().optional(), + baseDirectory: z.string().optional(), + publishDirectory: z.string().optional(), + healthCheckEnabled: z.boolean().optional(), + healthCheckPath: z.string().optional(), + healthCheckPort: z.nullable(z.string()).optional(), + healthCheckHost: z.nullable(z.string()).optional(), + healthCheckMethod: z.string().optional(), + healthCheckReturnCode: z.number().int().optional(), + healthCheckScheme: z.string().optional(), + healthCheckResponseText: z.nullable(z.string()).optional(), + healthCheckInterval: z.number().int().optional(), + healthCheckTimeout: z.number().int().optional(), + healthCheckRetries: z.number().int().optional(), + healthCheckStartPeriod: z.number().int().optional(), + limitsMemory: z.string().optional(), + limitsMemorySwap: z.string().optional(), + limitsMemorySwappiness: z.number().int().optional(), + limitsMemoryReservation: z.string().optional(), + limitsCpus: z.string().optional(), + limitsCpuset: z.nullable(z.string()).optional(), + limitsCpuShares: z.number().int().optional(), + customLabels: z.string().optional(), + customDockerRunOptions: z.string().optional(), + postDeploymentCommand: z.string().optional(), + postDeploymentCommandContainer: z.string().optional(), + preDeploymentCommand: z.string().optional(), + preDeploymentCommandContainer: z.string().optional(), + manualWebhookSecretGithub: z.string().optional(), + manualWebhookSecretGitlab: z.string().optional(), + manualWebhookSecretBitbucket: z.string().optional(), + manualWebhookSecretGitea: z.string().optional(), + redirect: z.nullable( + CreatePrivateDeployKeyApplicationRedirect$outboundSchema, + ).optional(), + instantDeploy: z.boolean().optional(), + dockerfile: z.string().optional(), + dockerComposeLocation: z.string().optional(), + dockerComposeRaw: z.string().optional(), + dockerComposeCustomStartCommand: z.string().optional(), + dockerComposeCustomBuildCommand: z.string().optional(), + dockerComposeDomains: z.array(z.any()).optional(), + watchPaths: z.string().optional(), + useBuildServer: z.nullable(z.boolean()).optional(), + }).transform((v) => { + return remap$(v, { + projectUuid: "project_uuid", + serverUuid: "server_uuid", + environmentName: "environment_name", + privateKeyUuid: "private_key_uuid", + gitRepository: "git_repository", + gitBranch: "git_branch", + portsExposes: "ports_exposes", + destinationUuid: "destination_uuid", + buildPack: "build_pack", + gitCommitSha: "git_commit_sha", + dockerRegistryImageName: "docker_registry_image_name", + dockerRegistryImageTag: "docker_registry_image_tag", + isStatic: "is_static", + staticImage: "static_image", + installCommand: "install_command", + buildCommand: "build_command", + startCommand: "start_command", + portsMappings: "ports_mappings", + baseDirectory: "base_directory", + publishDirectory: "publish_directory", + healthCheckEnabled: "health_check_enabled", + healthCheckPath: "health_check_path", + healthCheckPort: "health_check_port", + healthCheckHost: "health_check_host", + healthCheckMethod: "health_check_method", + healthCheckReturnCode: "health_check_return_code", + healthCheckScheme: "health_check_scheme", + healthCheckResponseText: "health_check_response_text", + healthCheckInterval: "health_check_interval", + healthCheckTimeout: "health_check_timeout", + healthCheckRetries: "health_check_retries", + healthCheckStartPeriod: "health_check_start_period", + limitsMemory: "limits_memory", + limitsMemorySwap: "limits_memory_swap", + limitsMemorySwappiness: "limits_memory_swappiness", + limitsMemoryReservation: "limits_memory_reservation", + limitsCpus: "limits_cpus", + limitsCpuset: "limits_cpuset", + limitsCpuShares: "limits_cpu_shares", + customLabels: "custom_labels", + customDockerRunOptions: "custom_docker_run_options", + postDeploymentCommand: "post_deployment_command", + postDeploymentCommandContainer: "post_deployment_command_container", + preDeploymentCommand: "pre_deployment_command", + preDeploymentCommandContainer: "pre_deployment_command_container", + manualWebhookSecretGithub: "manual_webhook_secret_github", + manualWebhookSecretGitlab: "manual_webhook_secret_gitlab", + manualWebhookSecretBitbucket: "manual_webhook_secret_bitbucket", + manualWebhookSecretGitea: "manual_webhook_secret_gitea", + instantDeploy: "instant_deploy", + dockerComposeLocation: "docker_compose_location", + dockerComposeRaw: "docker_compose_raw", + dockerComposeCustomStartCommand: "docker_compose_custom_start_command", + dockerComposeCustomBuildCommand: "docker_compose_custom_build_command", + dockerComposeDomains: "docker_compose_domains", + watchPaths: "watch_paths", + useBuildServer: "use_build_server", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreatePrivateDeployKeyApplicationRequestBody$ { + /** @deprecated use `CreatePrivateDeployKeyApplicationRequestBody$inboundSchema` instead. */ + export const inboundSchema = + CreatePrivateDeployKeyApplicationRequestBody$inboundSchema; + /** @deprecated use `CreatePrivateDeployKeyApplicationRequestBody$outboundSchema` instead. */ + export const outboundSchema = + CreatePrivateDeployKeyApplicationRequestBody$outboundSchema; + /** @deprecated use `CreatePrivateDeployKeyApplicationRequestBody$Outbound` instead. */ + export type Outbound = CreatePrivateDeployKeyApplicationRequestBody$Outbound; +} + +export function createPrivateDeployKeyApplicationRequestBodyToJSON( + createPrivateDeployKeyApplicationRequestBody: + CreatePrivateDeployKeyApplicationRequestBody, +): string { + return JSON.stringify( + CreatePrivateDeployKeyApplicationRequestBody$outboundSchema.parse( + createPrivateDeployKeyApplicationRequestBody, + ), + ); +} + +export function createPrivateDeployKeyApplicationRequestBodyFromJSON( + jsonString: string, +): SafeParseResult< + CreatePrivateDeployKeyApplicationRequestBody, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + CreatePrivateDeployKeyApplicationRequestBody$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'CreatePrivateDeployKeyApplicationRequestBody' from JSON`, + ); +} diff --git a/src/models/operations/createprivategithubappapplication.ts b/src/models/operations/createprivategithubappapplication.ts new file mode 100644 index 0000000..20f846a --- /dev/null +++ b/src/models/operations/createprivategithubappapplication.ts @@ -0,0 +1,753 @@ +/* + * 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"; + +/** + * The build pack type. + */ +export const CreatePrivateGithubAppApplicationBuildPack = { + Nixpacks: "nixpacks", + Static: "static", + Dockerfile: "dockerfile", + Dockercompose: "dockercompose", +} as const; +/** + * The build pack type. + */ +export type CreatePrivateGithubAppApplicationBuildPack = ClosedEnum< + typeof CreatePrivateGithubAppApplicationBuildPack +>; + +/** + * The static image. + */ +export const CreatePrivateGithubAppApplicationStaticImage = { + NginxAlpine: "nginx:alpine", +} as const; +/** + * The static image. + */ +export type CreatePrivateGithubAppApplicationStaticImage = ClosedEnum< + typeof CreatePrivateGithubAppApplicationStaticImage +>; + +/** + * How to set redirect with Traefik / Caddy. www<->non-www. + */ +export const CreatePrivateGithubAppApplicationRedirect = { + Www: "www", + NonWww: "non-www", + Both: "both", +} as const; +/** + * How to set redirect with Traefik / Caddy. www<->non-www. + */ +export type CreatePrivateGithubAppApplicationRedirect = ClosedEnum< + typeof CreatePrivateGithubAppApplicationRedirect +>; + +/** + * Application object that needs to be created. + */ +export type CreatePrivateGithubAppApplicationRequestBody = { + /** + * The project UUID. + */ + projectUuid: string; + /** + * The server UUID. + */ + serverUuid: string; + /** + * The environment name. + */ + environmentName: string; + /** + * The Github App UUID. + */ + githubAppUuid: string; + /** + * The git repository URL. + */ + gitRepository: string; + /** + * The git branch. + */ + gitBranch: string; + /** + * The ports to expose. + */ + portsExposes: string; + /** + * The destination UUID. + */ + destinationUuid?: string | undefined; + /** + * The build pack type. + */ + buildPack: CreatePrivateGithubAppApplicationBuildPack; + /** + * The application name. + */ + name?: string | undefined; + /** + * The application description. + */ + description?: string | undefined; + /** + * The application domains. + */ + domains?: string | undefined; + /** + * The git commit SHA. + */ + gitCommitSha?: string | undefined; + /** + * The docker registry image name. + */ + dockerRegistryImageName?: string | undefined; + /** + * The docker registry image tag. + */ + dockerRegistryImageTag?: string | undefined; + /** + * The flag to indicate if the application is static. + */ + isStatic?: boolean | undefined; + /** + * The static image. + */ + staticImage?: CreatePrivateGithubAppApplicationStaticImage | undefined; + /** + * The install command. + */ + installCommand?: string | undefined; + /** + * The build command. + */ + buildCommand?: string | undefined; + /** + * The start command. + */ + startCommand?: string | undefined; + /** + * The ports mappings. + */ + portsMappings?: string | undefined; + /** + * The base directory for all commands. + */ + baseDirectory?: string | undefined; + /** + * The publish directory. + */ + publishDirectory?: string | undefined; + /** + * Health check enabled. + */ + healthCheckEnabled?: boolean | undefined; + /** + * Health check path. + */ + healthCheckPath?: string | undefined; + /** + * Health check port. + */ + healthCheckPort?: string | null | undefined; + /** + * Health check host. + */ + healthCheckHost?: string | null | undefined; + /** + * Health check method. + */ + healthCheckMethod?: string | undefined; + /** + * Health check return code. + */ + healthCheckReturnCode?: number | undefined; + /** + * Health check scheme. + */ + healthCheckScheme?: string | undefined; + /** + * Health check response text. + */ + healthCheckResponseText?: string | null | undefined; + /** + * Health check interval in seconds. + */ + healthCheckInterval?: number | undefined; + /** + * Health check timeout in seconds. + */ + healthCheckTimeout?: number | undefined; + /** + * Health check retries count. + */ + healthCheckRetries?: number | undefined; + /** + * Health check start period in seconds. + */ + healthCheckStartPeriod?: number | undefined; + /** + * Memory limit. + */ + limitsMemory?: string | undefined; + /** + * Memory swap limit. + */ + limitsMemorySwap?: string | undefined; + /** + * Memory swappiness. + */ + limitsMemorySwappiness?: number | undefined; + /** + * Memory reservation. + */ + limitsMemoryReservation?: string | undefined; + /** + * CPU limit. + */ + limitsCpus?: string | undefined; + /** + * CPU set. + */ + limitsCpuset?: string | null | undefined; + /** + * CPU shares. + */ + limitsCpuShares?: number | undefined; + /** + * Custom labels. + */ + customLabels?: string | undefined; + /** + * Custom docker run options. + */ + customDockerRunOptions?: string | undefined; + /** + * Post deployment command. + */ + postDeploymentCommand?: string | undefined; + /** + * Post deployment command container. + */ + postDeploymentCommandContainer?: string | undefined; + /** + * Pre deployment command. + */ + preDeploymentCommand?: string | undefined; + /** + * Pre deployment command container. + */ + preDeploymentCommandContainer?: string | undefined; + /** + * Manual webhook secret for Github. + */ + manualWebhookSecretGithub?: string | undefined; + /** + * Manual webhook secret for Gitlab. + */ + manualWebhookSecretGitlab?: string | undefined; + /** + * Manual webhook secret for Bitbucket. + */ + manualWebhookSecretBitbucket?: string | undefined; + /** + * Manual webhook secret for Gitea. + */ + manualWebhookSecretGitea?: string | undefined; + /** + * How to set redirect with Traefik / Caddy. www<->non-www. + */ + redirect?: CreatePrivateGithubAppApplicationRedirect | null | undefined; + /** + * The flag to indicate if the application should be deployed instantly. + */ + instantDeploy?: boolean | undefined; + /** + * The Dockerfile content. + */ + dockerfile?: string | undefined; + /** + * The Docker Compose location. + */ + dockerComposeLocation?: string | undefined; + /** + * The Docker Compose raw content. + */ + dockerComposeRaw?: string | undefined; + /** + * The Docker Compose custom start command. + */ + dockerComposeCustomStartCommand?: string | undefined; + /** + * The Docker Compose custom build command. + */ + dockerComposeCustomBuildCommand?: string | undefined; + /** + * The Docker Compose domains. + */ + dockerComposeDomains?: Array | undefined; + /** + * The watch paths. + */ + watchPaths?: string | undefined; + /** + * Use build server. + */ + useBuildServer?: boolean | null | undefined; +}; + +/** @internal */ +export const CreatePrivateGithubAppApplicationBuildPack$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(CreatePrivateGithubAppApplicationBuildPack); + +/** @internal */ +export const CreatePrivateGithubAppApplicationBuildPack$outboundSchema: + z.ZodNativeEnum = + CreatePrivateGithubAppApplicationBuildPack$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreatePrivateGithubAppApplicationBuildPack$ { + /** @deprecated use `CreatePrivateGithubAppApplicationBuildPack$inboundSchema` instead. */ + export const inboundSchema = + CreatePrivateGithubAppApplicationBuildPack$inboundSchema; + /** @deprecated use `CreatePrivateGithubAppApplicationBuildPack$outboundSchema` instead. */ + export const outboundSchema = + CreatePrivateGithubAppApplicationBuildPack$outboundSchema; +} + +/** @internal */ +export const CreatePrivateGithubAppApplicationStaticImage$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(CreatePrivateGithubAppApplicationStaticImage); + +/** @internal */ +export const CreatePrivateGithubAppApplicationStaticImage$outboundSchema: + z.ZodNativeEnum = + CreatePrivateGithubAppApplicationStaticImage$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreatePrivateGithubAppApplicationStaticImage$ { + /** @deprecated use `CreatePrivateGithubAppApplicationStaticImage$inboundSchema` instead. */ + export const inboundSchema = + CreatePrivateGithubAppApplicationStaticImage$inboundSchema; + /** @deprecated use `CreatePrivateGithubAppApplicationStaticImage$outboundSchema` instead. */ + export const outboundSchema = + CreatePrivateGithubAppApplicationStaticImage$outboundSchema; +} + +/** @internal */ +export const CreatePrivateGithubAppApplicationRedirect$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(CreatePrivateGithubAppApplicationRedirect); + +/** @internal */ +export const CreatePrivateGithubAppApplicationRedirect$outboundSchema: + z.ZodNativeEnum = + CreatePrivateGithubAppApplicationRedirect$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreatePrivateGithubAppApplicationRedirect$ { + /** @deprecated use `CreatePrivateGithubAppApplicationRedirect$inboundSchema` instead. */ + export const inboundSchema = + CreatePrivateGithubAppApplicationRedirect$inboundSchema; + /** @deprecated use `CreatePrivateGithubAppApplicationRedirect$outboundSchema` instead. */ + export const outboundSchema = + CreatePrivateGithubAppApplicationRedirect$outboundSchema; +} + +/** @internal */ +export const CreatePrivateGithubAppApplicationRequestBody$inboundSchema: + z.ZodType< + CreatePrivateGithubAppApplicationRequestBody, + z.ZodTypeDef, + unknown + > = z.object({ + project_uuid: z.string(), + server_uuid: z.string(), + environment_name: z.string(), + github_app_uuid: z.string(), + git_repository: z.string(), + git_branch: z.string(), + ports_exposes: z.string(), + destination_uuid: z.string().optional(), + build_pack: CreatePrivateGithubAppApplicationBuildPack$inboundSchema, + name: z.string().optional(), + description: z.string().optional(), + domains: z.string().optional(), + git_commit_sha: z.string().optional(), + docker_registry_image_name: z.string().optional(), + docker_registry_image_tag: z.string().optional(), + is_static: z.boolean().optional(), + static_image: CreatePrivateGithubAppApplicationStaticImage$inboundSchema + .optional(), + install_command: z.string().optional(), + build_command: z.string().optional(), + start_command: z.string().optional(), + ports_mappings: z.string().optional(), + base_directory: z.string().optional(), + publish_directory: z.string().optional(), + health_check_enabled: z.boolean().optional(), + health_check_path: z.string().optional(), + health_check_port: z.nullable(z.string()).optional(), + health_check_host: z.nullable(z.string()).optional(), + health_check_method: z.string().optional(), + health_check_return_code: z.number().int().optional(), + health_check_scheme: z.string().optional(), + health_check_response_text: z.nullable(z.string()).optional(), + health_check_interval: z.number().int().optional(), + health_check_timeout: z.number().int().optional(), + health_check_retries: z.number().int().optional(), + health_check_start_period: z.number().int().optional(), + limits_memory: z.string().optional(), + limits_memory_swap: z.string().optional(), + limits_memory_swappiness: z.number().int().optional(), + limits_memory_reservation: z.string().optional(), + limits_cpus: z.string().optional(), + limits_cpuset: z.nullable(z.string()).optional(), + limits_cpu_shares: z.number().int().optional(), + custom_labels: z.string().optional(), + custom_docker_run_options: z.string().optional(), + post_deployment_command: z.string().optional(), + post_deployment_command_container: z.string().optional(), + pre_deployment_command: z.string().optional(), + pre_deployment_command_container: z.string().optional(), + manual_webhook_secret_github: z.string().optional(), + manual_webhook_secret_gitlab: z.string().optional(), + manual_webhook_secret_bitbucket: z.string().optional(), + manual_webhook_secret_gitea: z.string().optional(), + redirect: z.nullable( + CreatePrivateGithubAppApplicationRedirect$inboundSchema, + ).optional(), + instant_deploy: z.boolean().optional(), + dockerfile: z.string().optional(), + docker_compose_location: z.string().optional(), + docker_compose_raw: z.string().optional(), + docker_compose_custom_start_command: z.string().optional(), + docker_compose_custom_build_command: z.string().optional(), + docker_compose_domains: z.array(z.any()).optional(), + watch_paths: z.string().optional(), + use_build_server: z.nullable(z.boolean()).optional(), + }).transform((v) => { + return remap$(v, { + "project_uuid": "projectUuid", + "server_uuid": "serverUuid", + "environment_name": "environmentName", + "github_app_uuid": "githubAppUuid", + "git_repository": "gitRepository", + "git_branch": "gitBranch", + "ports_exposes": "portsExposes", + "destination_uuid": "destinationUuid", + "build_pack": "buildPack", + "git_commit_sha": "gitCommitSha", + "docker_registry_image_name": "dockerRegistryImageName", + "docker_registry_image_tag": "dockerRegistryImageTag", + "is_static": "isStatic", + "static_image": "staticImage", + "install_command": "installCommand", + "build_command": "buildCommand", + "start_command": "startCommand", + "ports_mappings": "portsMappings", + "base_directory": "baseDirectory", + "publish_directory": "publishDirectory", + "health_check_enabled": "healthCheckEnabled", + "health_check_path": "healthCheckPath", + "health_check_port": "healthCheckPort", + "health_check_host": "healthCheckHost", + "health_check_method": "healthCheckMethod", + "health_check_return_code": "healthCheckReturnCode", + "health_check_scheme": "healthCheckScheme", + "health_check_response_text": "healthCheckResponseText", + "health_check_interval": "healthCheckInterval", + "health_check_timeout": "healthCheckTimeout", + "health_check_retries": "healthCheckRetries", + "health_check_start_period": "healthCheckStartPeriod", + "limits_memory": "limitsMemory", + "limits_memory_swap": "limitsMemorySwap", + "limits_memory_swappiness": "limitsMemorySwappiness", + "limits_memory_reservation": "limitsMemoryReservation", + "limits_cpus": "limitsCpus", + "limits_cpuset": "limitsCpuset", + "limits_cpu_shares": "limitsCpuShares", + "custom_labels": "customLabels", + "custom_docker_run_options": "customDockerRunOptions", + "post_deployment_command": "postDeploymentCommand", + "post_deployment_command_container": "postDeploymentCommandContainer", + "pre_deployment_command": "preDeploymentCommand", + "pre_deployment_command_container": "preDeploymentCommandContainer", + "manual_webhook_secret_github": "manualWebhookSecretGithub", + "manual_webhook_secret_gitlab": "manualWebhookSecretGitlab", + "manual_webhook_secret_bitbucket": "manualWebhookSecretBitbucket", + "manual_webhook_secret_gitea": "manualWebhookSecretGitea", + "instant_deploy": "instantDeploy", + "docker_compose_location": "dockerComposeLocation", + "docker_compose_raw": "dockerComposeRaw", + "docker_compose_custom_start_command": "dockerComposeCustomStartCommand", + "docker_compose_custom_build_command": "dockerComposeCustomBuildCommand", + "docker_compose_domains": "dockerComposeDomains", + "watch_paths": "watchPaths", + "use_build_server": "useBuildServer", + }); + }); + +/** @internal */ +export type CreatePrivateGithubAppApplicationRequestBody$Outbound = { + project_uuid: string; + server_uuid: string; + environment_name: string; + github_app_uuid: string; + git_repository: string; + git_branch: string; + ports_exposes: string; + destination_uuid?: string | undefined; + build_pack: string; + name?: string | undefined; + description?: string | undefined; + domains?: string | undefined; + git_commit_sha?: string | undefined; + docker_registry_image_name?: string | undefined; + docker_registry_image_tag?: string | undefined; + is_static?: boolean | undefined; + static_image?: string | undefined; + install_command?: string | undefined; + build_command?: string | undefined; + start_command?: string | undefined; + ports_mappings?: string | undefined; + base_directory?: string | undefined; + publish_directory?: string | undefined; + health_check_enabled?: boolean | undefined; + health_check_path?: string | undefined; + health_check_port?: string | null | undefined; + health_check_host?: string | null | undefined; + health_check_method?: string | undefined; + health_check_return_code?: number | undefined; + health_check_scheme?: string | undefined; + health_check_response_text?: string | null | undefined; + health_check_interval?: number | undefined; + health_check_timeout?: number | undefined; + health_check_retries?: number | undefined; + health_check_start_period?: number | undefined; + limits_memory?: string | undefined; + limits_memory_swap?: string | undefined; + limits_memory_swappiness?: number | undefined; + limits_memory_reservation?: string | undefined; + limits_cpus?: string | undefined; + limits_cpuset?: string | null | undefined; + limits_cpu_shares?: number | undefined; + custom_labels?: string | undefined; + custom_docker_run_options?: string | undefined; + post_deployment_command?: string | undefined; + post_deployment_command_container?: string | undefined; + pre_deployment_command?: string | undefined; + pre_deployment_command_container?: string | undefined; + manual_webhook_secret_github?: string | undefined; + manual_webhook_secret_gitlab?: string | undefined; + manual_webhook_secret_bitbucket?: string | undefined; + manual_webhook_secret_gitea?: string | undefined; + redirect?: string | null | undefined; + instant_deploy?: boolean | undefined; + dockerfile?: string | undefined; + docker_compose_location?: string | undefined; + docker_compose_raw?: string | undefined; + docker_compose_custom_start_command?: string | undefined; + docker_compose_custom_build_command?: string | undefined; + docker_compose_domains?: Array | undefined; + watch_paths?: string | undefined; + use_build_server?: boolean | null | undefined; +}; + +/** @internal */ +export const CreatePrivateGithubAppApplicationRequestBody$outboundSchema: + z.ZodType< + CreatePrivateGithubAppApplicationRequestBody$Outbound, + z.ZodTypeDef, + CreatePrivateGithubAppApplicationRequestBody + > = z.object({ + projectUuid: z.string(), + serverUuid: z.string(), + environmentName: z.string(), + githubAppUuid: z.string(), + gitRepository: z.string(), + gitBranch: z.string(), + portsExposes: z.string(), + destinationUuid: z.string().optional(), + buildPack: CreatePrivateGithubAppApplicationBuildPack$outboundSchema, + name: z.string().optional(), + description: z.string().optional(), + domains: z.string().optional(), + gitCommitSha: z.string().optional(), + dockerRegistryImageName: z.string().optional(), + dockerRegistryImageTag: z.string().optional(), + isStatic: z.boolean().optional(), + staticImage: CreatePrivateGithubAppApplicationStaticImage$outboundSchema + .optional(), + installCommand: z.string().optional(), + buildCommand: z.string().optional(), + startCommand: z.string().optional(), + portsMappings: z.string().optional(), + baseDirectory: z.string().optional(), + publishDirectory: z.string().optional(), + healthCheckEnabled: z.boolean().optional(), + healthCheckPath: z.string().optional(), + healthCheckPort: z.nullable(z.string()).optional(), + healthCheckHost: z.nullable(z.string()).optional(), + healthCheckMethod: z.string().optional(), + healthCheckReturnCode: z.number().int().optional(), + healthCheckScheme: z.string().optional(), + healthCheckResponseText: z.nullable(z.string()).optional(), + healthCheckInterval: z.number().int().optional(), + healthCheckTimeout: z.number().int().optional(), + healthCheckRetries: z.number().int().optional(), + healthCheckStartPeriod: z.number().int().optional(), + limitsMemory: z.string().optional(), + limitsMemorySwap: z.string().optional(), + limitsMemorySwappiness: z.number().int().optional(), + limitsMemoryReservation: z.string().optional(), + limitsCpus: z.string().optional(), + limitsCpuset: z.nullable(z.string()).optional(), + limitsCpuShares: z.number().int().optional(), + customLabels: z.string().optional(), + customDockerRunOptions: z.string().optional(), + postDeploymentCommand: z.string().optional(), + postDeploymentCommandContainer: z.string().optional(), + preDeploymentCommand: z.string().optional(), + preDeploymentCommandContainer: z.string().optional(), + manualWebhookSecretGithub: z.string().optional(), + manualWebhookSecretGitlab: z.string().optional(), + manualWebhookSecretBitbucket: z.string().optional(), + manualWebhookSecretGitea: z.string().optional(), + redirect: z.nullable( + CreatePrivateGithubAppApplicationRedirect$outboundSchema, + ).optional(), + instantDeploy: z.boolean().optional(), + dockerfile: z.string().optional(), + dockerComposeLocation: z.string().optional(), + dockerComposeRaw: z.string().optional(), + dockerComposeCustomStartCommand: z.string().optional(), + dockerComposeCustomBuildCommand: z.string().optional(), + dockerComposeDomains: z.array(z.any()).optional(), + watchPaths: z.string().optional(), + useBuildServer: z.nullable(z.boolean()).optional(), + }).transform((v) => { + return remap$(v, { + projectUuid: "project_uuid", + serverUuid: "server_uuid", + environmentName: "environment_name", + githubAppUuid: "github_app_uuid", + gitRepository: "git_repository", + gitBranch: "git_branch", + portsExposes: "ports_exposes", + destinationUuid: "destination_uuid", + buildPack: "build_pack", + gitCommitSha: "git_commit_sha", + dockerRegistryImageName: "docker_registry_image_name", + dockerRegistryImageTag: "docker_registry_image_tag", + isStatic: "is_static", + staticImage: "static_image", + installCommand: "install_command", + buildCommand: "build_command", + startCommand: "start_command", + portsMappings: "ports_mappings", + baseDirectory: "base_directory", + publishDirectory: "publish_directory", + healthCheckEnabled: "health_check_enabled", + healthCheckPath: "health_check_path", + healthCheckPort: "health_check_port", + healthCheckHost: "health_check_host", + healthCheckMethod: "health_check_method", + healthCheckReturnCode: "health_check_return_code", + healthCheckScheme: "health_check_scheme", + healthCheckResponseText: "health_check_response_text", + healthCheckInterval: "health_check_interval", + healthCheckTimeout: "health_check_timeout", + healthCheckRetries: "health_check_retries", + healthCheckStartPeriod: "health_check_start_period", + limitsMemory: "limits_memory", + limitsMemorySwap: "limits_memory_swap", + limitsMemorySwappiness: "limits_memory_swappiness", + limitsMemoryReservation: "limits_memory_reservation", + limitsCpus: "limits_cpus", + limitsCpuset: "limits_cpuset", + limitsCpuShares: "limits_cpu_shares", + customLabels: "custom_labels", + customDockerRunOptions: "custom_docker_run_options", + postDeploymentCommand: "post_deployment_command", + postDeploymentCommandContainer: "post_deployment_command_container", + preDeploymentCommand: "pre_deployment_command", + preDeploymentCommandContainer: "pre_deployment_command_container", + manualWebhookSecretGithub: "manual_webhook_secret_github", + manualWebhookSecretGitlab: "manual_webhook_secret_gitlab", + manualWebhookSecretBitbucket: "manual_webhook_secret_bitbucket", + manualWebhookSecretGitea: "manual_webhook_secret_gitea", + instantDeploy: "instant_deploy", + dockerComposeLocation: "docker_compose_location", + dockerComposeRaw: "docker_compose_raw", + dockerComposeCustomStartCommand: "docker_compose_custom_start_command", + dockerComposeCustomBuildCommand: "docker_compose_custom_build_command", + dockerComposeDomains: "docker_compose_domains", + watchPaths: "watch_paths", + useBuildServer: "use_build_server", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreatePrivateGithubAppApplicationRequestBody$ { + /** @deprecated use `CreatePrivateGithubAppApplicationRequestBody$inboundSchema` instead. */ + export const inboundSchema = + CreatePrivateGithubAppApplicationRequestBody$inboundSchema; + /** @deprecated use `CreatePrivateGithubAppApplicationRequestBody$outboundSchema` instead. */ + export const outboundSchema = + CreatePrivateGithubAppApplicationRequestBody$outboundSchema; + /** @deprecated use `CreatePrivateGithubAppApplicationRequestBody$Outbound` instead. */ + export type Outbound = CreatePrivateGithubAppApplicationRequestBody$Outbound; +} + +export function createPrivateGithubAppApplicationRequestBodyToJSON( + createPrivateGithubAppApplicationRequestBody: + CreatePrivateGithubAppApplicationRequestBody, +): string { + return JSON.stringify( + CreatePrivateGithubAppApplicationRequestBody$outboundSchema.parse( + createPrivateGithubAppApplicationRequestBody, + ), + ); +} + +export function createPrivateGithubAppApplicationRequestBodyFromJSON( + jsonString: string, +): SafeParseResult< + CreatePrivateGithubAppApplicationRequestBody, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + CreatePrivateGithubAppApplicationRequestBody$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'CreatePrivateGithubAppApplicationRequestBody' from JSON`, + ); +} diff --git a/src/models/operations/createprivatekey.ts b/src/models/operations/createprivatekey.ts new file mode 100644 index 0000000..41d2a7e --- /dev/null +++ b/src/models/operations/createprivatekey.ts @@ -0,0 +1,148 @@ +/* + * 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 CreatePrivateKeyRequestBody = { + name?: string | undefined; + description?: string | undefined; + privateKey: string; +}; + +/** + * The created private key's UUID. + */ +export type CreatePrivateKeyResponseBody = { + uuid?: string | undefined; +}; + +/** @internal */ +export const CreatePrivateKeyRequestBody$inboundSchema: z.ZodType< + CreatePrivateKeyRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string().optional(), + description: z.string().optional(), + private_key: z.string(), +}).transform((v) => { + return remap$(v, { + "private_key": "privateKey", + }); +}); + +/** @internal */ +export type CreatePrivateKeyRequestBody$Outbound = { + name?: string | undefined; + description?: string | undefined; + private_key: string; +}; + +/** @internal */ +export const CreatePrivateKeyRequestBody$outboundSchema: z.ZodType< + CreatePrivateKeyRequestBody$Outbound, + z.ZodTypeDef, + CreatePrivateKeyRequestBody +> = z.object({ + name: z.string().optional(), + description: z.string().optional(), + privateKey: z.string(), +}).transform((v) => { + return remap$(v, { + privateKey: "private_key", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreatePrivateKeyRequestBody$ { + /** @deprecated use `CreatePrivateKeyRequestBody$inboundSchema` instead. */ + export const inboundSchema = CreatePrivateKeyRequestBody$inboundSchema; + /** @deprecated use `CreatePrivateKeyRequestBody$outboundSchema` instead. */ + export const outboundSchema = CreatePrivateKeyRequestBody$outboundSchema; + /** @deprecated use `CreatePrivateKeyRequestBody$Outbound` instead. */ + export type Outbound = CreatePrivateKeyRequestBody$Outbound; +} + +export function createPrivateKeyRequestBodyToJSON( + createPrivateKeyRequestBody: CreatePrivateKeyRequestBody, +): string { + return JSON.stringify( + CreatePrivateKeyRequestBody$outboundSchema.parse( + createPrivateKeyRequestBody, + ), + ); +} + +export function createPrivateKeyRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreatePrivateKeyRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreatePrivateKeyRequestBody' from JSON`, + ); +} + +/** @internal */ +export const CreatePrivateKeyResponseBody$inboundSchema: z.ZodType< + CreatePrivateKeyResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string().optional(), +}); + +/** @internal */ +export type CreatePrivateKeyResponseBody$Outbound = { + uuid?: string | undefined; +}; + +/** @internal */ +export const CreatePrivateKeyResponseBody$outboundSchema: z.ZodType< + CreatePrivateKeyResponseBody$Outbound, + z.ZodTypeDef, + CreatePrivateKeyResponseBody +> = z.object({ + uuid: 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 CreatePrivateKeyResponseBody$ { + /** @deprecated use `CreatePrivateKeyResponseBody$inboundSchema` instead. */ + export const inboundSchema = CreatePrivateKeyResponseBody$inboundSchema; + /** @deprecated use `CreatePrivateKeyResponseBody$outboundSchema` instead. */ + export const outboundSchema = CreatePrivateKeyResponseBody$outboundSchema; + /** @deprecated use `CreatePrivateKeyResponseBody$Outbound` instead. */ + export type Outbound = CreatePrivateKeyResponseBody$Outbound; +} + +export function createPrivateKeyResponseBodyToJSON( + createPrivateKeyResponseBody: CreatePrivateKeyResponseBody, +): string { + return JSON.stringify( + CreatePrivateKeyResponseBody$outboundSchema.parse( + createPrivateKeyResponseBody, + ), + ); +} + +export function createPrivateKeyResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreatePrivateKeyResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreatePrivateKeyResponseBody' from JSON`, + ); +} diff --git a/src/models/operations/createproject.ts b/src/models/operations/createproject.ts new file mode 100644 index 0000000..ab166fc --- /dev/null +++ b/src/models/operations/createproject.ts @@ -0,0 +1,143 @@ +/* + * 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"; + +/** + * Project created. + */ +export type CreateProjectRequestBody = { + /** + * The name of the project. + */ + name?: string | undefined; + /** + * The description of the project. + */ + description?: string | undefined; +}; + +/** + * Project created. + */ +export type CreateProjectResponseBody = { + /** + * The UUID of the project. + */ + uuid?: string | undefined; +}; + +/** @internal */ +export const CreateProjectRequestBody$inboundSchema: z.ZodType< + CreateProjectRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string().optional(), + description: z.string().optional(), +}); + +/** @internal */ +export type CreateProjectRequestBody$Outbound = { + name?: string | undefined; + description?: string | undefined; +}; + +/** @internal */ +export const CreateProjectRequestBody$outboundSchema: z.ZodType< + CreateProjectRequestBody$Outbound, + z.ZodTypeDef, + CreateProjectRequestBody +> = z.object({ + name: z.string().optional(), + description: 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 CreateProjectRequestBody$ { + /** @deprecated use `CreateProjectRequestBody$inboundSchema` instead. */ + export const inboundSchema = CreateProjectRequestBody$inboundSchema; + /** @deprecated use `CreateProjectRequestBody$outboundSchema` instead. */ + export const outboundSchema = CreateProjectRequestBody$outboundSchema; + /** @deprecated use `CreateProjectRequestBody$Outbound` instead. */ + export type Outbound = CreateProjectRequestBody$Outbound; +} + +export function createProjectRequestBodyToJSON( + createProjectRequestBody: CreateProjectRequestBody, +): string { + return JSON.stringify( + CreateProjectRequestBody$outboundSchema.parse(createProjectRequestBody), + ); +} + +export function createProjectRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateProjectRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateProjectRequestBody' from JSON`, + ); +} + +/** @internal */ +export const CreateProjectResponseBody$inboundSchema: z.ZodType< + CreateProjectResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string().optional(), +}); + +/** @internal */ +export type CreateProjectResponseBody$Outbound = { + uuid?: string | undefined; +}; + +/** @internal */ +export const CreateProjectResponseBody$outboundSchema: z.ZodType< + CreateProjectResponseBody$Outbound, + z.ZodTypeDef, + CreateProjectResponseBody +> = z.object({ + uuid: 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 CreateProjectResponseBody$ { + /** @deprecated use `CreateProjectResponseBody$inboundSchema` instead. */ + export const inboundSchema = CreateProjectResponseBody$inboundSchema; + /** @deprecated use `CreateProjectResponseBody$outboundSchema` instead. */ + export const outboundSchema = CreateProjectResponseBody$outboundSchema; + /** @deprecated use `CreateProjectResponseBody$Outbound` instead. */ + export type Outbound = CreateProjectResponseBody$Outbound; +} + +export function createProjectResponseBodyToJSON( + createProjectResponseBody: CreateProjectResponseBody, +): string { + return JSON.stringify( + CreateProjectResponseBody$outboundSchema.parse(createProjectResponseBody), + ); +} + +export function createProjectResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateProjectResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateProjectResponseBody' from JSON`, + ); +} diff --git a/src/models/operations/createpublicapplication.ts b/src/models/operations/createpublicapplication.ts new file mode 100644 index 0000000..1cddc20 --- /dev/null +++ b/src/models/operations/createpublicapplication.ts @@ -0,0 +1,711 @@ +/* + * 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"; + +/** + * The build pack type. + */ +export const BuildPack = { + Nixpacks: "nixpacks", + Static: "static", + Dockerfile: "dockerfile", + Dockercompose: "dockercompose", +} as const; +/** + * The build pack type. + */ +export type BuildPack = ClosedEnum; + +/** + * The static image. + */ +export const StaticImage = { + NginxAlpine: "nginx:alpine", +} as const; +/** + * The static image. + */ +export type StaticImage = ClosedEnum; + +/** + * How to set redirect with Traefik / Caddy. www<->non-www. + */ +export const Redirect = { + Www: "www", + NonWww: "non-www", + Both: "both", +} as const; +/** + * How to set redirect with Traefik / Caddy. www<->non-www. + */ +export type Redirect = ClosedEnum; + +/** + * Application object that needs to be created. + */ +export type CreatePublicApplicationRequestBody = { + /** + * The project UUID. + */ + projectUuid: string; + /** + * The server UUID. + */ + serverUuid: string; + /** + * The environment name. + */ + environmentName: string; + /** + * The git repository URL. + */ + gitRepository: string; + /** + * The git branch. + */ + gitBranch: string; + /** + * The build pack type. + */ + buildPack: BuildPack; + /** + * The ports to expose. + */ + portsExposes: string; + /** + * The destination UUID. + */ + destinationUuid?: string | undefined; + /** + * The application name. + */ + name?: string | undefined; + /** + * The application description. + */ + description?: string | undefined; + /** + * The application domains. + */ + domains?: string | undefined; + /** + * The git commit SHA. + */ + gitCommitSha?: string | undefined; + /** + * The docker registry image name. + */ + dockerRegistryImageName?: string | undefined; + /** + * The docker registry image tag. + */ + dockerRegistryImageTag?: string | undefined; + /** + * The flag to indicate if the application is static. + */ + isStatic?: boolean | undefined; + /** + * The static image. + */ + staticImage?: StaticImage | undefined; + /** + * The install command. + */ + installCommand?: string | undefined; + /** + * The build command. + */ + buildCommand?: string | undefined; + /** + * The start command. + */ + startCommand?: string | undefined; + /** + * The ports mappings. + */ + portsMappings?: string | undefined; + /** + * The base directory for all commands. + */ + baseDirectory?: string | undefined; + /** + * The publish directory. + */ + publishDirectory?: string | undefined; + /** + * Health check enabled. + */ + healthCheckEnabled?: boolean | undefined; + /** + * Health check path. + */ + healthCheckPath?: string | undefined; + /** + * Health check port. + */ + healthCheckPort?: string | null | undefined; + /** + * Health check host. + */ + healthCheckHost?: string | null | undefined; + /** + * Health check method. + */ + healthCheckMethod?: string | undefined; + /** + * Health check return code. + */ + healthCheckReturnCode?: number | undefined; + /** + * Health check scheme. + */ + healthCheckScheme?: string | undefined; + /** + * Health check response text. + */ + healthCheckResponseText?: string | null | undefined; + /** + * Health check interval in seconds. + */ + healthCheckInterval?: number | undefined; + /** + * Health check timeout in seconds. + */ + healthCheckTimeout?: number | undefined; + /** + * Health check retries count. + */ + healthCheckRetries?: number | undefined; + /** + * Health check start period in seconds. + */ + healthCheckStartPeriod?: number | undefined; + /** + * Memory limit. + */ + limitsMemory?: string | undefined; + /** + * Memory swap limit. + */ + limitsMemorySwap?: string | undefined; + /** + * Memory swappiness. + */ + limitsMemorySwappiness?: number | undefined; + /** + * Memory reservation. + */ + limitsMemoryReservation?: string | undefined; + /** + * CPU limit. + */ + limitsCpus?: string | undefined; + /** + * CPU set. + */ + limitsCpuset?: string | null | undefined; + /** + * CPU shares. + */ + limitsCpuShares?: number | undefined; + /** + * Custom labels. + */ + customLabels?: string | undefined; + /** + * Custom docker run options. + */ + customDockerRunOptions?: string | undefined; + /** + * Post deployment command. + */ + postDeploymentCommand?: string | undefined; + /** + * Post deployment command container. + */ + postDeploymentCommandContainer?: string | undefined; + /** + * Pre deployment command. + */ + preDeploymentCommand?: string | undefined; + /** + * Pre deployment command container. + */ + preDeploymentCommandContainer?: string | undefined; + /** + * Manual webhook secret for Github. + */ + manualWebhookSecretGithub?: string | undefined; + /** + * Manual webhook secret for Gitlab. + */ + manualWebhookSecretGitlab?: string | undefined; + /** + * Manual webhook secret for Bitbucket. + */ + manualWebhookSecretBitbucket?: string | undefined; + /** + * Manual webhook secret for Gitea. + */ + manualWebhookSecretGitea?: string | undefined; + /** + * How to set redirect with Traefik / Caddy. www<->non-www. + */ + redirect?: Redirect | null | undefined; + /** + * The flag to indicate if the application should be deployed instantly. + */ + instantDeploy?: boolean | undefined; + /** + * The Dockerfile content. + */ + dockerfile?: string | undefined; + /** + * The Docker Compose location. + */ + dockerComposeLocation?: string | undefined; + /** + * The Docker Compose raw content. + */ + dockerComposeRaw?: string | undefined; + /** + * The Docker Compose custom start command. + */ + dockerComposeCustomStartCommand?: string | undefined; + /** + * The Docker Compose custom build command. + */ + dockerComposeCustomBuildCommand?: string | undefined; + /** + * The Docker Compose domains. + */ + dockerComposeDomains?: Array | undefined; + /** + * The watch paths. + */ + watchPaths?: string | undefined; + /** + * Use build server. + */ + useBuildServer?: boolean | null | undefined; +}; + +/** @internal */ +export const BuildPack$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(BuildPack); + +/** @internal */ +export const BuildPack$outboundSchema: z.ZodNativeEnum = + BuildPack$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace BuildPack$ { + /** @deprecated use `BuildPack$inboundSchema` instead. */ + export const inboundSchema = BuildPack$inboundSchema; + /** @deprecated use `BuildPack$outboundSchema` instead. */ + export const outboundSchema = BuildPack$outboundSchema; +} + +/** @internal */ +export const StaticImage$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(StaticImage); + +/** @internal */ +export const StaticImage$outboundSchema: z.ZodNativeEnum = + StaticImage$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace StaticImage$ { + /** @deprecated use `StaticImage$inboundSchema` instead. */ + export const inboundSchema = StaticImage$inboundSchema; + /** @deprecated use `StaticImage$outboundSchema` instead. */ + export const outboundSchema = StaticImage$outboundSchema; +} + +/** @internal */ +export const Redirect$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(Redirect); + +/** @internal */ +export const Redirect$outboundSchema: z.ZodNativeEnum = + Redirect$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Redirect$ { + /** @deprecated use `Redirect$inboundSchema` instead. */ + export const inboundSchema = Redirect$inboundSchema; + /** @deprecated use `Redirect$outboundSchema` instead. */ + export const outboundSchema = Redirect$outboundSchema; +} + +/** @internal */ +export const CreatePublicApplicationRequestBody$inboundSchema: z.ZodType< + CreatePublicApplicationRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + project_uuid: z.string(), + server_uuid: z.string(), + environment_name: z.string(), + git_repository: z.string(), + git_branch: z.string(), + build_pack: BuildPack$inboundSchema, + ports_exposes: z.string(), + destination_uuid: z.string().optional(), + name: z.string().optional(), + description: z.string().optional(), + domains: z.string().optional(), + git_commit_sha: z.string().optional(), + docker_registry_image_name: z.string().optional(), + docker_registry_image_tag: z.string().optional(), + is_static: z.boolean().optional(), + static_image: StaticImage$inboundSchema.optional(), + install_command: z.string().optional(), + build_command: z.string().optional(), + start_command: z.string().optional(), + ports_mappings: z.string().optional(), + base_directory: z.string().optional(), + publish_directory: z.string().optional(), + health_check_enabled: z.boolean().optional(), + health_check_path: z.string().optional(), + health_check_port: z.nullable(z.string()).optional(), + health_check_host: z.nullable(z.string()).optional(), + health_check_method: z.string().optional(), + health_check_return_code: z.number().int().optional(), + health_check_scheme: z.string().optional(), + health_check_response_text: z.nullable(z.string()).optional(), + health_check_interval: z.number().int().optional(), + health_check_timeout: z.number().int().optional(), + health_check_retries: z.number().int().optional(), + health_check_start_period: z.number().int().optional(), + limits_memory: z.string().optional(), + limits_memory_swap: z.string().optional(), + limits_memory_swappiness: z.number().int().optional(), + limits_memory_reservation: z.string().optional(), + limits_cpus: z.string().optional(), + limits_cpuset: z.nullable(z.string()).optional(), + limits_cpu_shares: z.number().int().optional(), + custom_labels: z.string().optional(), + custom_docker_run_options: z.string().optional(), + post_deployment_command: z.string().optional(), + post_deployment_command_container: z.string().optional(), + pre_deployment_command: z.string().optional(), + pre_deployment_command_container: z.string().optional(), + manual_webhook_secret_github: z.string().optional(), + manual_webhook_secret_gitlab: z.string().optional(), + manual_webhook_secret_bitbucket: z.string().optional(), + manual_webhook_secret_gitea: z.string().optional(), + redirect: z.nullable(Redirect$inboundSchema).optional(), + instant_deploy: z.boolean().optional(), + dockerfile: z.string().optional(), + docker_compose_location: z.string().optional(), + docker_compose_raw: z.string().optional(), + docker_compose_custom_start_command: z.string().optional(), + docker_compose_custom_build_command: z.string().optional(), + docker_compose_domains: z.array(z.any()).optional(), + watch_paths: z.string().optional(), + use_build_server: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + "project_uuid": "projectUuid", + "server_uuid": "serverUuid", + "environment_name": "environmentName", + "git_repository": "gitRepository", + "git_branch": "gitBranch", + "build_pack": "buildPack", + "ports_exposes": "portsExposes", + "destination_uuid": "destinationUuid", + "git_commit_sha": "gitCommitSha", + "docker_registry_image_name": "dockerRegistryImageName", + "docker_registry_image_tag": "dockerRegistryImageTag", + "is_static": "isStatic", + "static_image": "staticImage", + "install_command": "installCommand", + "build_command": "buildCommand", + "start_command": "startCommand", + "ports_mappings": "portsMappings", + "base_directory": "baseDirectory", + "publish_directory": "publishDirectory", + "health_check_enabled": "healthCheckEnabled", + "health_check_path": "healthCheckPath", + "health_check_port": "healthCheckPort", + "health_check_host": "healthCheckHost", + "health_check_method": "healthCheckMethod", + "health_check_return_code": "healthCheckReturnCode", + "health_check_scheme": "healthCheckScheme", + "health_check_response_text": "healthCheckResponseText", + "health_check_interval": "healthCheckInterval", + "health_check_timeout": "healthCheckTimeout", + "health_check_retries": "healthCheckRetries", + "health_check_start_period": "healthCheckStartPeriod", + "limits_memory": "limitsMemory", + "limits_memory_swap": "limitsMemorySwap", + "limits_memory_swappiness": "limitsMemorySwappiness", + "limits_memory_reservation": "limitsMemoryReservation", + "limits_cpus": "limitsCpus", + "limits_cpuset": "limitsCpuset", + "limits_cpu_shares": "limitsCpuShares", + "custom_labels": "customLabels", + "custom_docker_run_options": "customDockerRunOptions", + "post_deployment_command": "postDeploymentCommand", + "post_deployment_command_container": "postDeploymentCommandContainer", + "pre_deployment_command": "preDeploymentCommand", + "pre_deployment_command_container": "preDeploymentCommandContainer", + "manual_webhook_secret_github": "manualWebhookSecretGithub", + "manual_webhook_secret_gitlab": "manualWebhookSecretGitlab", + "manual_webhook_secret_bitbucket": "manualWebhookSecretBitbucket", + "manual_webhook_secret_gitea": "manualWebhookSecretGitea", + "instant_deploy": "instantDeploy", + "docker_compose_location": "dockerComposeLocation", + "docker_compose_raw": "dockerComposeRaw", + "docker_compose_custom_start_command": "dockerComposeCustomStartCommand", + "docker_compose_custom_build_command": "dockerComposeCustomBuildCommand", + "docker_compose_domains": "dockerComposeDomains", + "watch_paths": "watchPaths", + "use_build_server": "useBuildServer", + }); +}); + +/** @internal */ +export type CreatePublicApplicationRequestBody$Outbound = { + project_uuid: string; + server_uuid: string; + environment_name: string; + git_repository: string; + git_branch: string; + build_pack: string; + ports_exposes: string; + destination_uuid?: string | undefined; + name?: string | undefined; + description?: string | undefined; + domains?: string | undefined; + git_commit_sha?: string | undefined; + docker_registry_image_name?: string | undefined; + docker_registry_image_tag?: string | undefined; + is_static?: boolean | undefined; + static_image?: string | undefined; + install_command?: string | undefined; + build_command?: string | undefined; + start_command?: string | undefined; + ports_mappings?: string | undefined; + base_directory?: string | undefined; + publish_directory?: string | undefined; + health_check_enabled?: boolean | undefined; + health_check_path?: string | undefined; + health_check_port?: string | null | undefined; + health_check_host?: string | null | undefined; + health_check_method?: string | undefined; + health_check_return_code?: number | undefined; + health_check_scheme?: string | undefined; + health_check_response_text?: string | null | undefined; + health_check_interval?: number | undefined; + health_check_timeout?: number | undefined; + health_check_retries?: number | undefined; + health_check_start_period?: number | undefined; + limits_memory?: string | undefined; + limits_memory_swap?: string | undefined; + limits_memory_swappiness?: number | undefined; + limits_memory_reservation?: string | undefined; + limits_cpus?: string | undefined; + limits_cpuset?: string | null | undefined; + limits_cpu_shares?: number | undefined; + custom_labels?: string | undefined; + custom_docker_run_options?: string | undefined; + post_deployment_command?: string | undefined; + post_deployment_command_container?: string | undefined; + pre_deployment_command?: string | undefined; + pre_deployment_command_container?: string | undefined; + manual_webhook_secret_github?: string | undefined; + manual_webhook_secret_gitlab?: string | undefined; + manual_webhook_secret_bitbucket?: string | undefined; + manual_webhook_secret_gitea?: string | undefined; + redirect?: string | null | undefined; + instant_deploy?: boolean | undefined; + dockerfile?: string | undefined; + docker_compose_location?: string | undefined; + docker_compose_raw?: string | undefined; + docker_compose_custom_start_command?: string | undefined; + docker_compose_custom_build_command?: string | undefined; + docker_compose_domains?: Array | undefined; + watch_paths?: string | undefined; + use_build_server?: boolean | null | undefined; +}; + +/** @internal */ +export const CreatePublicApplicationRequestBody$outboundSchema: z.ZodType< + CreatePublicApplicationRequestBody$Outbound, + z.ZodTypeDef, + CreatePublicApplicationRequestBody +> = z.object({ + projectUuid: z.string(), + serverUuid: z.string(), + environmentName: z.string(), + gitRepository: z.string(), + gitBranch: z.string(), + buildPack: BuildPack$outboundSchema, + portsExposes: z.string(), + destinationUuid: z.string().optional(), + name: z.string().optional(), + description: z.string().optional(), + domains: z.string().optional(), + gitCommitSha: z.string().optional(), + dockerRegistryImageName: z.string().optional(), + dockerRegistryImageTag: z.string().optional(), + isStatic: z.boolean().optional(), + staticImage: StaticImage$outboundSchema.optional(), + installCommand: z.string().optional(), + buildCommand: z.string().optional(), + startCommand: z.string().optional(), + portsMappings: z.string().optional(), + baseDirectory: z.string().optional(), + publishDirectory: z.string().optional(), + healthCheckEnabled: z.boolean().optional(), + healthCheckPath: z.string().optional(), + healthCheckPort: z.nullable(z.string()).optional(), + healthCheckHost: z.nullable(z.string()).optional(), + healthCheckMethod: z.string().optional(), + healthCheckReturnCode: z.number().int().optional(), + healthCheckScheme: z.string().optional(), + healthCheckResponseText: z.nullable(z.string()).optional(), + healthCheckInterval: z.number().int().optional(), + healthCheckTimeout: z.number().int().optional(), + healthCheckRetries: z.number().int().optional(), + healthCheckStartPeriod: z.number().int().optional(), + limitsMemory: z.string().optional(), + limitsMemorySwap: z.string().optional(), + limitsMemorySwappiness: z.number().int().optional(), + limitsMemoryReservation: z.string().optional(), + limitsCpus: z.string().optional(), + limitsCpuset: z.nullable(z.string()).optional(), + limitsCpuShares: z.number().int().optional(), + customLabels: z.string().optional(), + customDockerRunOptions: z.string().optional(), + postDeploymentCommand: z.string().optional(), + postDeploymentCommandContainer: z.string().optional(), + preDeploymentCommand: z.string().optional(), + preDeploymentCommandContainer: z.string().optional(), + manualWebhookSecretGithub: z.string().optional(), + manualWebhookSecretGitlab: z.string().optional(), + manualWebhookSecretBitbucket: z.string().optional(), + manualWebhookSecretGitea: z.string().optional(), + redirect: z.nullable(Redirect$outboundSchema).optional(), + instantDeploy: z.boolean().optional(), + dockerfile: z.string().optional(), + dockerComposeLocation: z.string().optional(), + dockerComposeRaw: z.string().optional(), + dockerComposeCustomStartCommand: z.string().optional(), + dockerComposeCustomBuildCommand: z.string().optional(), + dockerComposeDomains: z.array(z.any()).optional(), + watchPaths: z.string().optional(), + useBuildServer: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + projectUuid: "project_uuid", + serverUuid: "server_uuid", + environmentName: "environment_name", + gitRepository: "git_repository", + gitBranch: "git_branch", + buildPack: "build_pack", + portsExposes: "ports_exposes", + destinationUuid: "destination_uuid", + gitCommitSha: "git_commit_sha", + dockerRegistryImageName: "docker_registry_image_name", + dockerRegistryImageTag: "docker_registry_image_tag", + isStatic: "is_static", + staticImage: "static_image", + installCommand: "install_command", + buildCommand: "build_command", + startCommand: "start_command", + portsMappings: "ports_mappings", + baseDirectory: "base_directory", + publishDirectory: "publish_directory", + healthCheckEnabled: "health_check_enabled", + healthCheckPath: "health_check_path", + healthCheckPort: "health_check_port", + healthCheckHost: "health_check_host", + healthCheckMethod: "health_check_method", + healthCheckReturnCode: "health_check_return_code", + healthCheckScheme: "health_check_scheme", + healthCheckResponseText: "health_check_response_text", + healthCheckInterval: "health_check_interval", + healthCheckTimeout: "health_check_timeout", + healthCheckRetries: "health_check_retries", + healthCheckStartPeriod: "health_check_start_period", + limitsMemory: "limits_memory", + limitsMemorySwap: "limits_memory_swap", + limitsMemorySwappiness: "limits_memory_swappiness", + limitsMemoryReservation: "limits_memory_reservation", + limitsCpus: "limits_cpus", + limitsCpuset: "limits_cpuset", + limitsCpuShares: "limits_cpu_shares", + customLabels: "custom_labels", + customDockerRunOptions: "custom_docker_run_options", + postDeploymentCommand: "post_deployment_command", + postDeploymentCommandContainer: "post_deployment_command_container", + preDeploymentCommand: "pre_deployment_command", + preDeploymentCommandContainer: "pre_deployment_command_container", + manualWebhookSecretGithub: "manual_webhook_secret_github", + manualWebhookSecretGitlab: "manual_webhook_secret_gitlab", + manualWebhookSecretBitbucket: "manual_webhook_secret_bitbucket", + manualWebhookSecretGitea: "manual_webhook_secret_gitea", + instantDeploy: "instant_deploy", + dockerComposeLocation: "docker_compose_location", + dockerComposeRaw: "docker_compose_raw", + dockerComposeCustomStartCommand: "docker_compose_custom_start_command", + dockerComposeCustomBuildCommand: "docker_compose_custom_build_command", + dockerComposeDomains: "docker_compose_domains", + watchPaths: "watch_paths", + useBuildServer: "use_build_server", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreatePublicApplicationRequestBody$ { + /** @deprecated use `CreatePublicApplicationRequestBody$inboundSchema` instead. */ + export const inboundSchema = CreatePublicApplicationRequestBody$inboundSchema; + /** @deprecated use `CreatePublicApplicationRequestBody$outboundSchema` instead. */ + export const outboundSchema = + CreatePublicApplicationRequestBody$outboundSchema; + /** @deprecated use `CreatePublicApplicationRequestBody$Outbound` instead. */ + export type Outbound = CreatePublicApplicationRequestBody$Outbound; +} + +export function createPublicApplicationRequestBodyToJSON( + createPublicApplicationRequestBody: CreatePublicApplicationRequestBody, +): string { + return JSON.stringify( + CreatePublicApplicationRequestBody$outboundSchema.parse( + createPublicApplicationRequestBody, + ), + ); +} + +export function createPublicApplicationRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + CreatePublicApplicationRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreatePublicApplicationRequestBody' from JSON`, + ); +} diff --git a/src/models/operations/createserver.ts b/src/models/operations/createserver.ts new file mode 100644 index 0000000..4dd0632 --- /dev/null +++ b/src/models/operations/createserver.ts @@ -0,0 +1,240 @@ +/* + * 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"; + +/** + * The proxy type. + */ +export const ProxyType = { + Traefik: "traefik", + Caddy: "caddy", + None: "none", +} as const; +/** + * The proxy type. + */ +export type ProxyType = ClosedEnum; + +/** + * Server created. + */ +export type CreateServerRequestBody = { + /** + * The name of the server. + */ + name?: string | undefined; + /** + * The description of the server. + */ + description?: string | undefined; + /** + * The IP of the server. + */ + ip?: string | undefined; + /** + * The port of the server. + */ + port?: number | undefined; + /** + * The user of the server. + */ + user?: string | undefined; + /** + * The UUID of the private key. + */ + privateKeyUuid?: string | undefined; + /** + * Is build server. + */ + isBuildServer?: boolean | undefined; + /** + * Instant validate. + */ + instantValidate?: boolean | undefined; + /** + * The proxy type. + */ + proxyType?: ProxyType | undefined; +}; + +/** + * Server created. + */ +export type CreateServerResponseBody = { + /** + * The UUID of the server. + */ + uuid?: string | undefined; +}; + +/** @internal */ +export const ProxyType$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(ProxyType); + +/** @internal */ +export const ProxyType$outboundSchema: z.ZodNativeEnum = + ProxyType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ProxyType$ { + /** @deprecated use `ProxyType$inboundSchema` instead. */ + export const inboundSchema = ProxyType$inboundSchema; + /** @deprecated use `ProxyType$outboundSchema` instead. */ + export const outboundSchema = ProxyType$outboundSchema; +} + +/** @internal */ +export const CreateServerRequestBody$inboundSchema: z.ZodType< + CreateServerRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string().optional(), + description: z.string().optional(), + ip: z.string().optional(), + port: z.number().int().optional(), + user: z.string().optional(), + private_key_uuid: z.string().optional(), + is_build_server: z.boolean().optional(), + instant_validate: z.boolean().optional(), + proxy_type: ProxyType$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "private_key_uuid": "privateKeyUuid", + "is_build_server": "isBuildServer", + "instant_validate": "instantValidate", + "proxy_type": "proxyType", + }); +}); + +/** @internal */ +export type CreateServerRequestBody$Outbound = { + name?: string | undefined; + description?: string | undefined; + ip?: string | undefined; + port?: number | undefined; + user?: string | undefined; + private_key_uuid?: string | undefined; + is_build_server?: boolean | undefined; + instant_validate?: boolean | undefined; + proxy_type?: string | undefined; +}; + +/** @internal */ +export const CreateServerRequestBody$outboundSchema: z.ZodType< + CreateServerRequestBody$Outbound, + z.ZodTypeDef, + CreateServerRequestBody +> = z.object({ + name: z.string().optional(), + description: z.string().optional(), + ip: z.string().optional(), + port: z.number().int().optional(), + user: z.string().optional(), + privateKeyUuid: z.string().optional(), + isBuildServer: z.boolean().optional(), + instantValidate: z.boolean().optional(), + proxyType: ProxyType$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + privateKeyUuid: "private_key_uuid", + isBuildServer: "is_build_server", + instantValidate: "instant_validate", + proxyType: "proxy_type", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateServerRequestBody$ { + /** @deprecated use `CreateServerRequestBody$inboundSchema` instead. */ + export const inboundSchema = CreateServerRequestBody$inboundSchema; + /** @deprecated use `CreateServerRequestBody$outboundSchema` instead. */ + export const outboundSchema = CreateServerRequestBody$outboundSchema; + /** @deprecated use `CreateServerRequestBody$Outbound` instead. */ + export type Outbound = CreateServerRequestBody$Outbound; +} + +export function createServerRequestBodyToJSON( + createServerRequestBody: CreateServerRequestBody, +): string { + return JSON.stringify( + CreateServerRequestBody$outboundSchema.parse(createServerRequestBody), + ); +} + +export function createServerRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateServerRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateServerRequestBody' from JSON`, + ); +} + +/** @internal */ +export const CreateServerResponseBody$inboundSchema: z.ZodType< + CreateServerResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string().optional(), +}); + +/** @internal */ +export type CreateServerResponseBody$Outbound = { + uuid?: string | undefined; +}; + +/** @internal */ +export const CreateServerResponseBody$outboundSchema: z.ZodType< + CreateServerResponseBody$Outbound, + z.ZodTypeDef, + CreateServerResponseBody +> = z.object({ + uuid: 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 CreateServerResponseBody$ { + /** @deprecated use `CreateServerResponseBody$inboundSchema` instead. */ + export const inboundSchema = CreateServerResponseBody$inboundSchema; + /** @deprecated use `CreateServerResponseBody$outboundSchema` instead. */ + export const outboundSchema = CreateServerResponseBody$outboundSchema; + /** @deprecated use `CreateServerResponseBody$Outbound` instead. */ + export type Outbound = CreateServerResponseBody$Outbound; +} + +export function createServerResponseBodyToJSON( + createServerResponseBody: CreateServerResponseBody, +): string { + return JSON.stringify( + CreateServerResponseBody$outboundSchema.parse(createServerResponseBody), + ); +} + +export function createServerResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateServerResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateServerResponseBody' from JSON`, + ); +} diff --git a/src/models/operations/createservice.ts b/src/models/operations/createservice.ts new file mode 100644 index 0000000..fab1dc5 --- /dev/null +++ b/src/models/operations/createservice.ts @@ -0,0 +1,325 @@ +/* + * 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"; + +/** + * The one-click service type + */ +export const Type = { + Activepieces: "activepieces", + Appsmith: "appsmith", + Appwrite: "appwrite", + Authentik: "authentik", + Babybuddy: "babybuddy", + Budge: "budge", + Changedetection: "changedetection", + Chatwoot: "chatwoot", + ClassicpressWithMariadb: "classicpress-with-mariadb", + ClassicpressWithMysql: "classicpress-with-mysql", + ClassicpressWithoutDatabase: "classicpress-without-database", + Cloudflared: "cloudflared", + CodeServer: "code-server", + Dashboard: "dashboard", + Directus: "directus", + DirectusWithPostgresql: "directus-with-postgresql", + DockerRegistry: "docker-registry", + Docuseal: "docuseal", + DocusealWithPostgres: "docuseal-with-postgres", + Dokuwiki: "dokuwiki", + Duplicati: "duplicati", + Emby: "emby", + Embystat: "embystat", + Fider: "fider", + Filebrowser: "filebrowser", + Firefly: "firefly", + Formbricks: "formbricks", + Ghost: "ghost", + Gitea: "gitea", + GiteaWithMariadb: "gitea-with-mariadb", + GiteaWithMysql: "gitea-with-mysql", + GiteaWithPostgresql: "gitea-with-postgresql", + Glance: "glance", + Glances: "glances", + Glitchtip: "glitchtip", + Grafana: "grafana", + GrafanaWithPostgresql: "grafana-with-postgresql", + Grocy: "grocy", + Heimdall: "heimdall", + Homepage: "homepage", + Jellyfin: "jellyfin", + Jenkins: "jenkins", + Kuzzle: "kuzzle", + Listmonk: "listmonk", + Logto: "logto", + Mediawiki: "mediawiki", + Meilisearch: "meilisearch", + Metabase: "metabase", + Metube: "metube", + Minio: "minio", + Moodle: "moodle", + Mosquitto: "mosquitto", + N8n: "n8n", + N8nWithPostgresql: "n8n-with-postgresql", + NextImageTransformation: "next-image-transformation", + Nextcloud: "nextcloud", + Nocodb: "nocodb", + Odoo: "odoo", + Openblocks: "openblocks", + Pairdrop: "pairdrop", + Penpot: "penpot", + Phpmyadmin: "phpmyadmin", + Pocketbase: "pocketbase", + Posthog: "posthog", + ReactiveResume: "reactive-resume", + Rocketchat: "rocketchat", + Shlink: "shlink", + Slash: "slash", + Snapdrop: "snapdrop", + Statusnook: "statusnook", + StirlingPdf: "stirling-pdf", + Supabase: "supabase", + Syncthing: "syncthing", + Tolgee: "tolgee", + Trigger: "trigger", + TriggerWithExternalDatabase: "trigger-with-external-database", + Twenty: "twenty", + Umami: "umami", + UnleashWithPostgresql: "unleash-with-postgresql", + UnleashWithoutDatabase: "unleash-without-database", + UptimeKuma: "uptime-kuma", + Vaultwarden: "vaultwarden", + Vikunja: "vikunja", + Weblate: "weblate", + Whoogle: "whoogle", + WordpressWithMariadb: "wordpress-with-mariadb", + WordpressWithMysql: "wordpress-with-mysql", + WordpressWithoutDatabase: "wordpress-without-database", +} as const; +/** + * The one-click service type + */ +export type Type = ClosedEnum; + +export type CreateServiceRequestBody = { + /** + * The one-click service type + */ + type: Type; + /** + * Name of the service. + */ + name?: string | undefined; + /** + * Description of the service. + */ + description?: string | null | undefined; + /** + * Project UUID. + */ + projectUuid: string; + /** + * Environment name. + */ + environmentName: string; + /** + * Server UUID. + */ + serverUuid: string; + /** + * Destination UUID. Required if server has multiple destinations. + */ + destinationUuid?: string | undefined; + /** + * Start the service immediately after creation. + */ + instantDeploy?: boolean | undefined; +}; + +/** + * Create a service. + */ +export type CreateServiceResponseBody = { + /** + * Service UUID. + */ + uuid?: string | undefined; + /** + * Service domains. + */ + domains?: Array | undefined; +}; + +/** @internal */ +export const Type$inboundSchema: z.ZodNativeEnum = z.nativeEnum( + Type, +); + +/** @internal */ +export const Type$outboundSchema: z.ZodNativeEnum = + Type$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Type$ { + /** @deprecated use `Type$inboundSchema` instead. */ + export const inboundSchema = Type$inboundSchema; + /** @deprecated use `Type$outboundSchema` instead. */ + export const outboundSchema = Type$outboundSchema; +} + +/** @internal */ +export const CreateServiceRequestBody$inboundSchema: z.ZodType< + CreateServiceRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + type: Type$inboundSchema, + name: z.string().optional(), + description: z.nullable(z.string()).optional(), + project_uuid: z.string(), + environment_name: z.string(), + server_uuid: z.string(), + destination_uuid: z.string().optional(), + instant_deploy: z.boolean().default(false), +}).transform((v) => { + return remap$(v, { + "project_uuid": "projectUuid", + "environment_name": "environmentName", + "server_uuid": "serverUuid", + "destination_uuid": "destinationUuid", + "instant_deploy": "instantDeploy", + }); +}); + +/** @internal */ +export type CreateServiceRequestBody$Outbound = { + type: string; + name?: string | undefined; + description?: string | null | undefined; + project_uuid: string; + environment_name: string; + server_uuid: string; + destination_uuid?: string | undefined; + instant_deploy: boolean; +}; + +/** @internal */ +export const CreateServiceRequestBody$outboundSchema: z.ZodType< + CreateServiceRequestBody$Outbound, + z.ZodTypeDef, + CreateServiceRequestBody +> = z.object({ + type: Type$outboundSchema, + name: z.string().optional(), + description: z.nullable(z.string()).optional(), + projectUuid: z.string(), + environmentName: z.string(), + serverUuid: z.string(), + destinationUuid: z.string().optional(), + instantDeploy: z.boolean().default(false), +}).transform((v) => { + return remap$(v, { + projectUuid: "project_uuid", + environmentName: "environment_name", + serverUuid: "server_uuid", + destinationUuid: "destination_uuid", + instantDeploy: "instant_deploy", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateServiceRequestBody$ { + /** @deprecated use `CreateServiceRequestBody$inboundSchema` instead. */ + export const inboundSchema = CreateServiceRequestBody$inboundSchema; + /** @deprecated use `CreateServiceRequestBody$outboundSchema` instead. */ + export const outboundSchema = CreateServiceRequestBody$outboundSchema; + /** @deprecated use `CreateServiceRequestBody$Outbound` instead. */ + export type Outbound = CreateServiceRequestBody$Outbound; +} + +export function createServiceRequestBodyToJSON( + createServiceRequestBody: CreateServiceRequestBody, +): string { + return JSON.stringify( + CreateServiceRequestBody$outboundSchema.parse(createServiceRequestBody), + ); +} + +export function createServiceRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateServiceRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateServiceRequestBody' from JSON`, + ); +} + +/** @internal */ +export const CreateServiceResponseBody$inboundSchema: z.ZodType< + CreateServiceResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string().optional(), + domains: z.array(z.string()).optional(), +}); + +/** @internal */ +export type CreateServiceResponseBody$Outbound = { + uuid?: string | undefined; + domains?: Array | undefined; +}; + +/** @internal */ +export const CreateServiceResponseBody$outboundSchema: z.ZodType< + CreateServiceResponseBody$Outbound, + z.ZodTypeDef, + CreateServiceResponseBody +> = z.object({ + uuid: z.string().optional(), + domains: z.array(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 CreateServiceResponseBody$ { + /** @deprecated use `CreateServiceResponseBody$inboundSchema` instead. */ + export const inboundSchema = CreateServiceResponseBody$inboundSchema; + /** @deprecated use `CreateServiceResponseBody$outboundSchema` instead. */ + export const outboundSchema = CreateServiceResponseBody$outboundSchema; + /** @deprecated use `CreateServiceResponseBody$Outbound` instead. */ + export type Outbound = CreateServiceResponseBody$Outbound; +} + +export function createServiceResponseBodyToJSON( + createServiceResponseBody: CreateServiceResponseBody, +): string { + return JSON.stringify( + CreateServiceResponseBody$outboundSchema.parse(createServiceResponseBody), + ); +} + +export function createServiceResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateServiceResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateServiceResponseBody' from JSON`, + ); +} diff --git a/src/models/operations/deleteapplicationbyuuid.ts b/src/models/operations/deleteapplicationbyuuid.ts new file mode 100644 index 0000000..4c05a81 --- /dev/null +++ b/src/models/operations/deleteapplicationbyuuid.ts @@ -0,0 +1,180 @@ +/* + * 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 DeleteApplicationByUuidRequest = { + /** + * UUID of the application. + */ + uuid: string; + /** + * Delete configurations. + */ + deleteConfigurations?: boolean | undefined; + /** + * Delete volumes. + */ + deleteVolumes?: boolean | undefined; + /** + * Run docker cleanup. + */ + dockerCleanup?: boolean | undefined; + /** + * Delete connected networks. + */ + deleteConnectedNetworks?: boolean | undefined; +}; + +/** + * Application deleted. + */ +export type DeleteApplicationByUuidResponseBody = { + message?: string | undefined; +}; + +/** @internal */ +export const DeleteApplicationByUuidRequest$inboundSchema: z.ZodType< + DeleteApplicationByUuidRequest, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string(), + delete_configurations: z.boolean().default(true), + delete_volumes: z.boolean().default(true), + docker_cleanup: z.boolean().default(true), + delete_connected_networks: z.boolean().default(true), +}).transform((v) => { + return remap$(v, { + "delete_configurations": "deleteConfigurations", + "delete_volumes": "deleteVolumes", + "docker_cleanup": "dockerCleanup", + "delete_connected_networks": "deleteConnectedNetworks", + }); +}); + +/** @internal */ +export type DeleteApplicationByUuidRequest$Outbound = { + uuid: string; + delete_configurations: boolean; + delete_volumes: boolean; + docker_cleanup: boolean; + delete_connected_networks: boolean; +}; + +/** @internal */ +export const DeleteApplicationByUuidRequest$outboundSchema: z.ZodType< + DeleteApplicationByUuidRequest$Outbound, + z.ZodTypeDef, + DeleteApplicationByUuidRequest +> = z.object({ + uuid: z.string(), + deleteConfigurations: z.boolean().default(true), + deleteVolumes: z.boolean().default(true), + dockerCleanup: z.boolean().default(true), + deleteConnectedNetworks: z.boolean().default(true), +}).transform((v) => { + return remap$(v, { + deleteConfigurations: "delete_configurations", + deleteVolumes: "delete_volumes", + dockerCleanup: "docker_cleanup", + deleteConnectedNetworks: "delete_connected_networks", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteApplicationByUuidRequest$ { + /** @deprecated use `DeleteApplicationByUuidRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteApplicationByUuidRequest$inboundSchema; + /** @deprecated use `DeleteApplicationByUuidRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteApplicationByUuidRequest$outboundSchema; + /** @deprecated use `DeleteApplicationByUuidRequest$Outbound` instead. */ + export type Outbound = DeleteApplicationByUuidRequest$Outbound; +} + +export function deleteApplicationByUuidRequestToJSON( + deleteApplicationByUuidRequest: DeleteApplicationByUuidRequest, +): string { + return JSON.stringify( + DeleteApplicationByUuidRequest$outboundSchema.parse( + deleteApplicationByUuidRequest, + ), + ); +} + +export function deleteApplicationByUuidRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteApplicationByUuidRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteApplicationByUuidRequest' from JSON`, + ); +} + +/** @internal */ +export const DeleteApplicationByUuidResponseBody$inboundSchema: z.ZodType< + DeleteApplicationByUuidResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + message: z.string().optional(), +}); + +/** @internal */ +export type DeleteApplicationByUuidResponseBody$Outbound = { + message?: string | undefined; +}; + +/** @internal */ +export const DeleteApplicationByUuidResponseBody$outboundSchema: z.ZodType< + DeleteApplicationByUuidResponseBody$Outbound, + z.ZodTypeDef, + DeleteApplicationByUuidResponseBody +> = z.object({ + message: 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 DeleteApplicationByUuidResponseBody$ { + /** @deprecated use `DeleteApplicationByUuidResponseBody$inboundSchema` instead. */ + export const inboundSchema = + DeleteApplicationByUuidResponseBody$inboundSchema; + /** @deprecated use `DeleteApplicationByUuidResponseBody$outboundSchema` instead. */ + export const outboundSchema = + DeleteApplicationByUuidResponseBody$outboundSchema; + /** @deprecated use `DeleteApplicationByUuidResponseBody$Outbound` instead. */ + export type Outbound = DeleteApplicationByUuidResponseBody$Outbound; +} + +export function deleteApplicationByUuidResponseBodyToJSON( + deleteApplicationByUuidResponseBody: DeleteApplicationByUuidResponseBody, +): string { + return JSON.stringify( + DeleteApplicationByUuidResponseBody$outboundSchema.parse( + deleteApplicationByUuidResponseBody, + ), + ); +} + +export function deleteApplicationByUuidResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + DeleteApplicationByUuidResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteApplicationByUuidResponseBody' from JSON`, + ); +} diff --git a/src/models/operations/deletedatabasebyuuid.ts b/src/models/operations/deletedatabasebyuuid.ts new file mode 100644 index 0000000..b07e3e1 --- /dev/null +++ b/src/models/operations/deletedatabasebyuuid.ts @@ -0,0 +1,177 @@ +/* + * 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 DeleteDatabaseByUuidRequest = { + /** + * UUID of the database. + */ + uuid: string; + /** + * Delete configurations. + */ + deleteConfigurations?: boolean | undefined; + /** + * Delete volumes. + */ + deleteVolumes?: boolean | undefined; + /** + * Run docker cleanup. + */ + dockerCleanup?: boolean | undefined; + /** + * Delete connected networks. + */ + deleteConnectedNetworks?: boolean | undefined; +}; + +/** + * Database deleted. + */ +export type DeleteDatabaseByUuidResponseBody = { + message?: string | undefined; +}; + +/** @internal */ +export const DeleteDatabaseByUuidRequest$inboundSchema: z.ZodType< + DeleteDatabaseByUuidRequest, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string(), + delete_configurations: z.boolean().default(true), + delete_volumes: z.boolean().default(true), + docker_cleanup: z.boolean().default(true), + delete_connected_networks: z.boolean().default(true), +}).transform((v) => { + return remap$(v, { + "delete_configurations": "deleteConfigurations", + "delete_volumes": "deleteVolumes", + "docker_cleanup": "dockerCleanup", + "delete_connected_networks": "deleteConnectedNetworks", + }); +}); + +/** @internal */ +export type DeleteDatabaseByUuidRequest$Outbound = { + uuid: string; + delete_configurations: boolean; + delete_volumes: boolean; + docker_cleanup: boolean; + delete_connected_networks: boolean; +}; + +/** @internal */ +export const DeleteDatabaseByUuidRequest$outboundSchema: z.ZodType< + DeleteDatabaseByUuidRequest$Outbound, + z.ZodTypeDef, + DeleteDatabaseByUuidRequest +> = z.object({ + uuid: z.string(), + deleteConfigurations: z.boolean().default(true), + deleteVolumes: z.boolean().default(true), + dockerCleanup: z.boolean().default(true), + deleteConnectedNetworks: z.boolean().default(true), +}).transform((v) => { + return remap$(v, { + deleteConfigurations: "delete_configurations", + deleteVolumes: "delete_volumes", + dockerCleanup: "docker_cleanup", + deleteConnectedNetworks: "delete_connected_networks", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteDatabaseByUuidRequest$ { + /** @deprecated use `DeleteDatabaseByUuidRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteDatabaseByUuidRequest$inboundSchema; + /** @deprecated use `DeleteDatabaseByUuidRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteDatabaseByUuidRequest$outboundSchema; + /** @deprecated use `DeleteDatabaseByUuidRequest$Outbound` instead. */ + export type Outbound = DeleteDatabaseByUuidRequest$Outbound; +} + +export function deleteDatabaseByUuidRequestToJSON( + deleteDatabaseByUuidRequest: DeleteDatabaseByUuidRequest, +): string { + return JSON.stringify( + DeleteDatabaseByUuidRequest$outboundSchema.parse( + deleteDatabaseByUuidRequest, + ), + ); +} + +export function deleteDatabaseByUuidRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteDatabaseByUuidRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteDatabaseByUuidRequest' from JSON`, + ); +} + +/** @internal */ +export const DeleteDatabaseByUuidResponseBody$inboundSchema: z.ZodType< + DeleteDatabaseByUuidResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + message: z.string().optional(), +}); + +/** @internal */ +export type DeleteDatabaseByUuidResponseBody$Outbound = { + message?: string | undefined; +}; + +/** @internal */ +export const DeleteDatabaseByUuidResponseBody$outboundSchema: z.ZodType< + DeleteDatabaseByUuidResponseBody$Outbound, + z.ZodTypeDef, + DeleteDatabaseByUuidResponseBody +> = z.object({ + message: 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 DeleteDatabaseByUuidResponseBody$ { + /** @deprecated use `DeleteDatabaseByUuidResponseBody$inboundSchema` instead. */ + export const inboundSchema = DeleteDatabaseByUuidResponseBody$inboundSchema; + /** @deprecated use `DeleteDatabaseByUuidResponseBody$outboundSchema` instead. */ + export const outboundSchema = DeleteDatabaseByUuidResponseBody$outboundSchema; + /** @deprecated use `DeleteDatabaseByUuidResponseBody$Outbound` instead. */ + export type Outbound = DeleteDatabaseByUuidResponseBody$Outbound; +} + +export function deleteDatabaseByUuidResponseBodyToJSON( + deleteDatabaseByUuidResponseBody: DeleteDatabaseByUuidResponseBody, +): string { + return JSON.stringify( + DeleteDatabaseByUuidResponseBody$outboundSchema.parse( + deleteDatabaseByUuidResponseBody, + ), + ); +} + +export function deleteDatabaseByUuidResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteDatabaseByUuidResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteDatabaseByUuidResponseBody' from JSON`, + ); +} diff --git a/src/models/operations/deleteenvbyapplicationuuid.ts b/src/models/operations/deleteenvbyapplicationuuid.ts new file mode 100644 index 0000000..cc92ee8 --- /dev/null +++ b/src/models/operations/deleteenvbyapplicationuuid.ts @@ -0,0 +1,155 @@ +/* + * 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 DeleteEnvByApplicationUuidRequest = { + /** + * UUID of the application. + */ + uuid: string; + /** + * UUID of the environment variable. + */ + envUuid: string; +}; + +/** + * Environment variable deleted. + */ +export type DeleteEnvByApplicationUuidResponseBody = { + message?: string | undefined; +}; + +/** @internal */ +export const DeleteEnvByApplicationUuidRequest$inboundSchema: z.ZodType< + DeleteEnvByApplicationUuidRequest, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string(), + env_uuid: z.string(), +}).transform((v) => { + return remap$(v, { + "env_uuid": "envUuid", + }); +}); + +/** @internal */ +export type DeleteEnvByApplicationUuidRequest$Outbound = { + uuid: string; + env_uuid: string; +}; + +/** @internal */ +export const DeleteEnvByApplicationUuidRequest$outboundSchema: z.ZodType< + DeleteEnvByApplicationUuidRequest$Outbound, + z.ZodTypeDef, + DeleteEnvByApplicationUuidRequest +> = z.object({ + uuid: z.string(), + envUuid: z.string(), +}).transform((v) => { + return remap$(v, { + envUuid: "env_uuid", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteEnvByApplicationUuidRequest$ { + /** @deprecated use `DeleteEnvByApplicationUuidRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteEnvByApplicationUuidRequest$inboundSchema; + /** @deprecated use `DeleteEnvByApplicationUuidRequest$outboundSchema` instead. */ + export const outboundSchema = + DeleteEnvByApplicationUuidRequest$outboundSchema; + /** @deprecated use `DeleteEnvByApplicationUuidRequest$Outbound` instead. */ + export type Outbound = DeleteEnvByApplicationUuidRequest$Outbound; +} + +export function deleteEnvByApplicationUuidRequestToJSON( + deleteEnvByApplicationUuidRequest: DeleteEnvByApplicationUuidRequest, +): string { + return JSON.stringify( + DeleteEnvByApplicationUuidRequest$outboundSchema.parse( + deleteEnvByApplicationUuidRequest, + ), + ); +} + +export function deleteEnvByApplicationUuidRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteEnvByApplicationUuidRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteEnvByApplicationUuidRequest' from JSON`, + ); +} + +/** @internal */ +export const DeleteEnvByApplicationUuidResponseBody$inboundSchema: z.ZodType< + DeleteEnvByApplicationUuidResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + message: z.string().optional(), +}); + +/** @internal */ +export type DeleteEnvByApplicationUuidResponseBody$Outbound = { + message?: string | undefined; +}; + +/** @internal */ +export const DeleteEnvByApplicationUuidResponseBody$outboundSchema: z.ZodType< + DeleteEnvByApplicationUuidResponseBody$Outbound, + z.ZodTypeDef, + DeleteEnvByApplicationUuidResponseBody +> = z.object({ + message: 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 DeleteEnvByApplicationUuidResponseBody$ { + /** @deprecated use `DeleteEnvByApplicationUuidResponseBody$inboundSchema` instead. */ + export const inboundSchema = + DeleteEnvByApplicationUuidResponseBody$inboundSchema; + /** @deprecated use `DeleteEnvByApplicationUuidResponseBody$outboundSchema` instead. */ + export const outboundSchema = + DeleteEnvByApplicationUuidResponseBody$outboundSchema; + /** @deprecated use `DeleteEnvByApplicationUuidResponseBody$Outbound` instead. */ + export type Outbound = DeleteEnvByApplicationUuidResponseBody$Outbound; +} + +export function deleteEnvByApplicationUuidResponseBodyToJSON( + deleteEnvByApplicationUuidResponseBody: + DeleteEnvByApplicationUuidResponseBody, +): string { + return JSON.stringify( + DeleteEnvByApplicationUuidResponseBody$outboundSchema.parse( + deleteEnvByApplicationUuidResponseBody, + ), + ); +} + +export function deleteEnvByApplicationUuidResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + DeleteEnvByApplicationUuidResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteEnvByApplicationUuidResponseBody' from JSON`, + ); +} diff --git a/src/models/operations/deleteenvbyserviceuuid.ts b/src/models/operations/deleteenvbyserviceuuid.ts new file mode 100644 index 0000000..0a68b39 --- /dev/null +++ b/src/models/operations/deleteenvbyserviceuuid.ts @@ -0,0 +1,152 @@ +/* + * 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 DeleteEnvByServiceUuidRequest = { + /** + * UUID of the service. + */ + uuid: string; + /** + * UUID of the environment variable. + */ + envUuid: string; +}; + +/** + * Environment variable deleted. + */ +export type DeleteEnvByServiceUuidResponseBody = { + message?: string | undefined; +}; + +/** @internal */ +export const DeleteEnvByServiceUuidRequest$inboundSchema: z.ZodType< + DeleteEnvByServiceUuidRequest, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string(), + env_uuid: z.string(), +}).transform((v) => { + return remap$(v, { + "env_uuid": "envUuid", + }); +}); + +/** @internal */ +export type DeleteEnvByServiceUuidRequest$Outbound = { + uuid: string; + env_uuid: string; +}; + +/** @internal */ +export const DeleteEnvByServiceUuidRequest$outboundSchema: z.ZodType< + DeleteEnvByServiceUuidRequest$Outbound, + z.ZodTypeDef, + DeleteEnvByServiceUuidRequest +> = z.object({ + uuid: z.string(), + envUuid: z.string(), +}).transform((v) => { + return remap$(v, { + envUuid: "env_uuid", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteEnvByServiceUuidRequest$ { + /** @deprecated use `DeleteEnvByServiceUuidRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteEnvByServiceUuidRequest$inboundSchema; + /** @deprecated use `DeleteEnvByServiceUuidRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteEnvByServiceUuidRequest$outboundSchema; + /** @deprecated use `DeleteEnvByServiceUuidRequest$Outbound` instead. */ + export type Outbound = DeleteEnvByServiceUuidRequest$Outbound; +} + +export function deleteEnvByServiceUuidRequestToJSON( + deleteEnvByServiceUuidRequest: DeleteEnvByServiceUuidRequest, +): string { + return JSON.stringify( + DeleteEnvByServiceUuidRequest$outboundSchema.parse( + deleteEnvByServiceUuidRequest, + ), + ); +} + +export function deleteEnvByServiceUuidRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteEnvByServiceUuidRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteEnvByServiceUuidRequest' from JSON`, + ); +} + +/** @internal */ +export const DeleteEnvByServiceUuidResponseBody$inboundSchema: z.ZodType< + DeleteEnvByServiceUuidResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + message: z.string().optional(), +}); + +/** @internal */ +export type DeleteEnvByServiceUuidResponseBody$Outbound = { + message?: string | undefined; +}; + +/** @internal */ +export const DeleteEnvByServiceUuidResponseBody$outboundSchema: z.ZodType< + DeleteEnvByServiceUuidResponseBody$Outbound, + z.ZodTypeDef, + DeleteEnvByServiceUuidResponseBody +> = z.object({ + message: 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 DeleteEnvByServiceUuidResponseBody$ { + /** @deprecated use `DeleteEnvByServiceUuidResponseBody$inboundSchema` instead. */ + export const inboundSchema = DeleteEnvByServiceUuidResponseBody$inboundSchema; + /** @deprecated use `DeleteEnvByServiceUuidResponseBody$outboundSchema` instead. */ + export const outboundSchema = + DeleteEnvByServiceUuidResponseBody$outboundSchema; + /** @deprecated use `DeleteEnvByServiceUuidResponseBody$Outbound` instead. */ + export type Outbound = DeleteEnvByServiceUuidResponseBody$Outbound; +} + +export function deleteEnvByServiceUuidResponseBodyToJSON( + deleteEnvByServiceUuidResponseBody: DeleteEnvByServiceUuidResponseBody, +): string { + return JSON.stringify( + DeleteEnvByServiceUuidResponseBody$outboundSchema.parse( + deleteEnvByServiceUuidResponseBody, + ), + ); +} + +export function deleteEnvByServiceUuidResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + DeleteEnvByServiceUuidResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteEnvByServiceUuidResponseBody' from JSON`, + ); +} diff --git a/src/models/operations/deleteprivatekeybyuuid.ts b/src/models/operations/deleteprivatekeybyuuid.ts new file mode 100644 index 0000000..bdb78b3 --- /dev/null +++ b/src/models/operations/deleteprivatekeybyuuid.ts @@ -0,0 +1,136 @@ +/* + * 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 DeletePrivateKeyByUuidRequest = { + /** + * Private Key UUID + */ + uuid: string; +}; + +/** + * Private Key deleted. + */ +export type DeletePrivateKeyByUuidResponseBody = { + message?: string | undefined; +}; + +/** @internal */ +export const DeletePrivateKeyByUuidRequest$inboundSchema: z.ZodType< + DeletePrivateKeyByUuidRequest, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string(), +}); + +/** @internal */ +export type DeletePrivateKeyByUuidRequest$Outbound = { + uuid: string; +}; + +/** @internal */ +export const DeletePrivateKeyByUuidRequest$outboundSchema: z.ZodType< + DeletePrivateKeyByUuidRequest$Outbound, + z.ZodTypeDef, + DeletePrivateKeyByUuidRequest +> = z.object({ + uuid: 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 DeletePrivateKeyByUuidRequest$ { + /** @deprecated use `DeletePrivateKeyByUuidRequest$inboundSchema` instead. */ + export const inboundSchema = DeletePrivateKeyByUuidRequest$inboundSchema; + /** @deprecated use `DeletePrivateKeyByUuidRequest$outboundSchema` instead. */ + export const outboundSchema = DeletePrivateKeyByUuidRequest$outboundSchema; + /** @deprecated use `DeletePrivateKeyByUuidRequest$Outbound` instead. */ + export type Outbound = DeletePrivateKeyByUuidRequest$Outbound; +} + +export function deletePrivateKeyByUuidRequestToJSON( + deletePrivateKeyByUuidRequest: DeletePrivateKeyByUuidRequest, +): string { + return JSON.stringify( + DeletePrivateKeyByUuidRequest$outboundSchema.parse( + deletePrivateKeyByUuidRequest, + ), + ); +} + +export function deletePrivateKeyByUuidRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeletePrivateKeyByUuidRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeletePrivateKeyByUuidRequest' from JSON`, + ); +} + +/** @internal */ +export const DeletePrivateKeyByUuidResponseBody$inboundSchema: z.ZodType< + DeletePrivateKeyByUuidResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + message: z.string().optional(), +}); + +/** @internal */ +export type DeletePrivateKeyByUuidResponseBody$Outbound = { + message?: string | undefined; +}; + +/** @internal */ +export const DeletePrivateKeyByUuidResponseBody$outboundSchema: z.ZodType< + DeletePrivateKeyByUuidResponseBody$Outbound, + z.ZodTypeDef, + DeletePrivateKeyByUuidResponseBody +> = z.object({ + message: 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 DeletePrivateKeyByUuidResponseBody$ { + /** @deprecated use `DeletePrivateKeyByUuidResponseBody$inboundSchema` instead. */ + export const inboundSchema = DeletePrivateKeyByUuidResponseBody$inboundSchema; + /** @deprecated use `DeletePrivateKeyByUuidResponseBody$outboundSchema` instead. */ + export const outboundSchema = + DeletePrivateKeyByUuidResponseBody$outboundSchema; + /** @deprecated use `DeletePrivateKeyByUuidResponseBody$Outbound` instead. */ + export type Outbound = DeletePrivateKeyByUuidResponseBody$Outbound; +} + +export function deletePrivateKeyByUuidResponseBodyToJSON( + deletePrivateKeyByUuidResponseBody: DeletePrivateKeyByUuidResponseBody, +): string { + return JSON.stringify( + DeletePrivateKeyByUuidResponseBody$outboundSchema.parse( + deletePrivateKeyByUuidResponseBody, + ), + ); +} + +export function deletePrivateKeyByUuidResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + DeletePrivateKeyByUuidResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeletePrivateKeyByUuidResponseBody' from JSON`, + ); +} diff --git a/src/models/operations/deleteprojectbyuuid.ts b/src/models/operations/deleteprojectbyuuid.ts new file mode 100644 index 0000000..bda53da --- /dev/null +++ b/src/models/operations/deleteprojectbyuuid.ts @@ -0,0 +1,132 @@ +/* + * 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 DeleteProjectByUuidRequest = { + /** + * UUID of the application. + */ + uuid: string; +}; + +/** + * Project deleted. + */ +export type DeleteProjectByUuidResponseBody = { + message?: string | undefined; +}; + +/** @internal */ +export const DeleteProjectByUuidRequest$inboundSchema: z.ZodType< + DeleteProjectByUuidRequest, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string(), +}); + +/** @internal */ +export type DeleteProjectByUuidRequest$Outbound = { + uuid: string; +}; + +/** @internal */ +export const DeleteProjectByUuidRequest$outboundSchema: z.ZodType< + DeleteProjectByUuidRequest$Outbound, + z.ZodTypeDef, + DeleteProjectByUuidRequest +> = z.object({ + uuid: 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 DeleteProjectByUuidRequest$ { + /** @deprecated use `DeleteProjectByUuidRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteProjectByUuidRequest$inboundSchema; + /** @deprecated use `DeleteProjectByUuidRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteProjectByUuidRequest$outboundSchema; + /** @deprecated use `DeleteProjectByUuidRequest$Outbound` instead. */ + export type Outbound = DeleteProjectByUuidRequest$Outbound; +} + +export function deleteProjectByUuidRequestToJSON( + deleteProjectByUuidRequest: DeleteProjectByUuidRequest, +): string { + return JSON.stringify( + DeleteProjectByUuidRequest$outboundSchema.parse(deleteProjectByUuidRequest), + ); +} + +export function deleteProjectByUuidRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteProjectByUuidRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteProjectByUuidRequest' from JSON`, + ); +} + +/** @internal */ +export const DeleteProjectByUuidResponseBody$inboundSchema: z.ZodType< + DeleteProjectByUuidResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + message: z.string().optional(), +}); + +/** @internal */ +export type DeleteProjectByUuidResponseBody$Outbound = { + message?: string | undefined; +}; + +/** @internal */ +export const DeleteProjectByUuidResponseBody$outboundSchema: z.ZodType< + DeleteProjectByUuidResponseBody$Outbound, + z.ZodTypeDef, + DeleteProjectByUuidResponseBody +> = z.object({ + message: 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 DeleteProjectByUuidResponseBody$ { + /** @deprecated use `DeleteProjectByUuidResponseBody$inboundSchema` instead. */ + export const inboundSchema = DeleteProjectByUuidResponseBody$inboundSchema; + /** @deprecated use `DeleteProjectByUuidResponseBody$outboundSchema` instead. */ + export const outboundSchema = DeleteProjectByUuidResponseBody$outboundSchema; + /** @deprecated use `DeleteProjectByUuidResponseBody$Outbound` instead. */ + export type Outbound = DeleteProjectByUuidResponseBody$Outbound; +} + +export function deleteProjectByUuidResponseBodyToJSON( + deleteProjectByUuidResponseBody: DeleteProjectByUuidResponseBody, +): string { + return JSON.stringify( + DeleteProjectByUuidResponseBody$outboundSchema.parse( + deleteProjectByUuidResponseBody, + ), + ); +} + +export function deleteProjectByUuidResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteProjectByUuidResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteProjectByUuidResponseBody' from JSON`, + ); +} diff --git a/src/models/operations/deleteserverbyuuid.ts b/src/models/operations/deleteserverbyuuid.ts new file mode 100644 index 0000000..4a88bc3 --- /dev/null +++ b/src/models/operations/deleteserverbyuuid.ts @@ -0,0 +1,132 @@ +/* + * 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 DeleteServerByUuidRequest = { + /** + * UUID of the server. + */ + uuid: string; +}; + +/** + * Server deleted. + */ +export type DeleteServerByUuidResponseBody = { + message?: string | undefined; +}; + +/** @internal */ +export const DeleteServerByUuidRequest$inboundSchema: z.ZodType< + DeleteServerByUuidRequest, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string(), +}); + +/** @internal */ +export type DeleteServerByUuidRequest$Outbound = { + uuid: string; +}; + +/** @internal */ +export const DeleteServerByUuidRequest$outboundSchema: z.ZodType< + DeleteServerByUuidRequest$Outbound, + z.ZodTypeDef, + DeleteServerByUuidRequest +> = z.object({ + uuid: 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 DeleteServerByUuidRequest$ { + /** @deprecated use `DeleteServerByUuidRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteServerByUuidRequest$inboundSchema; + /** @deprecated use `DeleteServerByUuidRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteServerByUuidRequest$outboundSchema; + /** @deprecated use `DeleteServerByUuidRequest$Outbound` instead. */ + export type Outbound = DeleteServerByUuidRequest$Outbound; +} + +export function deleteServerByUuidRequestToJSON( + deleteServerByUuidRequest: DeleteServerByUuidRequest, +): string { + return JSON.stringify( + DeleteServerByUuidRequest$outboundSchema.parse(deleteServerByUuidRequest), + ); +} + +export function deleteServerByUuidRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteServerByUuidRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteServerByUuidRequest' from JSON`, + ); +} + +/** @internal */ +export const DeleteServerByUuidResponseBody$inboundSchema: z.ZodType< + DeleteServerByUuidResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + message: z.string().optional(), +}); + +/** @internal */ +export type DeleteServerByUuidResponseBody$Outbound = { + message?: string | undefined; +}; + +/** @internal */ +export const DeleteServerByUuidResponseBody$outboundSchema: z.ZodType< + DeleteServerByUuidResponseBody$Outbound, + z.ZodTypeDef, + DeleteServerByUuidResponseBody +> = z.object({ + message: 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 DeleteServerByUuidResponseBody$ { + /** @deprecated use `DeleteServerByUuidResponseBody$inboundSchema` instead. */ + export const inboundSchema = DeleteServerByUuidResponseBody$inboundSchema; + /** @deprecated use `DeleteServerByUuidResponseBody$outboundSchema` instead. */ + export const outboundSchema = DeleteServerByUuidResponseBody$outboundSchema; + /** @deprecated use `DeleteServerByUuidResponseBody$Outbound` instead. */ + export type Outbound = DeleteServerByUuidResponseBody$Outbound; +} + +export function deleteServerByUuidResponseBodyToJSON( + deleteServerByUuidResponseBody: DeleteServerByUuidResponseBody, +): string { + return JSON.stringify( + DeleteServerByUuidResponseBody$outboundSchema.parse( + deleteServerByUuidResponseBody, + ), + ); +} + +export function deleteServerByUuidResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteServerByUuidResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteServerByUuidResponseBody' from JSON`, + ); +} diff --git a/src/models/operations/deleteservicebyuuid.ts b/src/models/operations/deleteservicebyuuid.ts new file mode 100644 index 0000000..b40bcc9 --- /dev/null +++ b/src/models/operations/deleteservicebyuuid.ts @@ -0,0 +1,175 @@ +/* + * 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 DeleteServiceByUuidRequest = { + /** + * Service UUID + */ + uuid: string; + /** + * Delete configurations. + */ + deleteConfigurations?: boolean | undefined; + /** + * Delete volumes. + */ + deleteVolumes?: boolean | undefined; + /** + * Run docker cleanup. + */ + dockerCleanup?: boolean | undefined; + /** + * Delete connected networks. + */ + deleteConnectedNetworks?: boolean | undefined; +}; + +/** + * Delete a service by UUID + */ +export type DeleteServiceByUuidResponseBody = { + message?: string | undefined; +}; + +/** @internal */ +export const DeleteServiceByUuidRequest$inboundSchema: z.ZodType< + DeleteServiceByUuidRequest, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string(), + delete_configurations: z.boolean().default(true), + delete_volumes: z.boolean().default(true), + docker_cleanup: z.boolean().default(true), + delete_connected_networks: z.boolean().default(true), +}).transform((v) => { + return remap$(v, { + "delete_configurations": "deleteConfigurations", + "delete_volumes": "deleteVolumes", + "docker_cleanup": "dockerCleanup", + "delete_connected_networks": "deleteConnectedNetworks", + }); +}); + +/** @internal */ +export type DeleteServiceByUuidRequest$Outbound = { + uuid: string; + delete_configurations: boolean; + delete_volumes: boolean; + docker_cleanup: boolean; + delete_connected_networks: boolean; +}; + +/** @internal */ +export const DeleteServiceByUuidRequest$outboundSchema: z.ZodType< + DeleteServiceByUuidRequest$Outbound, + z.ZodTypeDef, + DeleteServiceByUuidRequest +> = z.object({ + uuid: z.string(), + deleteConfigurations: z.boolean().default(true), + deleteVolumes: z.boolean().default(true), + dockerCleanup: z.boolean().default(true), + deleteConnectedNetworks: z.boolean().default(true), +}).transform((v) => { + return remap$(v, { + deleteConfigurations: "delete_configurations", + deleteVolumes: "delete_volumes", + dockerCleanup: "docker_cleanup", + deleteConnectedNetworks: "delete_connected_networks", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteServiceByUuidRequest$ { + /** @deprecated use `DeleteServiceByUuidRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteServiceByUuidRequest$inboundSchema; + /** @deprecated use `DeleteServiceByUuidRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteServiceByUuidRequest$outboundSchema; + /** @deprecated use `DeleteServiceByUuidRequest$Outbound` instead. */ + export type Outbound = DeleteServiceByUuidRequest$Outbound; +} + +export function deleteServiceByUuidRequestToJSON( + deleteServiceByUuidRequest: DeleteServiceByUuidRequest, +): string { + return JSON.stringify( + DeleteServiceByUuidRequest$outboundSchema.parse(deleteServiceByUuidRequest), + ); +} + +export function deleteServiceByUuidRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteServiceByUuidRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteServiceByUuidRequest' from JSON`, + ); +} + +/** @internal */ +export const DeleteServiceByUuidResponseBody$inboundSchema: z.ZodType< + DeleteServiceByUuidResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + message: z.string().optional(), +}); + +/** @internal */ +export type DeleteServiceByUuidResponseBody$Outbound = { + message?: string | undefined; +}; + +/** @internal */ +export const DeleteServiceByUuidResponseBody$outboundSchema: z.ZodType< + DeleteServiceByUuidResponseBody$Outbound, + z.ZodTypeDef, + DeleteServiceByUuidResponseBody +> = z.object({ + message: 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 DeleteServiceByUuidResponseBody$ { + /** @deprecated use `DeleteServiceByUuidResponseBody$inboundSchema` instead. */ + export const inboundSchema = DeleteServiceByUuidResponseBody$inboundSchema; + /** @deprecated use `DeleteServiceByUuidResponseBody$outboundSchema` instead. */ + export const outboundSchema = DeleteServiceByUuidResponseBody$outboundSchema; + /** @deprecated use `DeleteServiceByUuidResponseBody$Outbound` instead. */ + export type Outbound = DeleteServiceByUuidResponseBody$Outbound; +} + +export function deleteServiceByUuidResponseBodyToJSON( + deleteServiceByUuidResponseBody: DeleteServiceByUuidResponseBody, +): string { + return JSON.stringify( + DeleteServiceByUuidResponseBody$outboundSchema.parse( + deleteServiceByUuidResponseBody, + ), + ); +} + +export function deleteServiceByUuidResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteServiceByUuidResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteServiceByUuidResponseBody' from JSON`, + ); +} diff --git a/src/models/operations/deploybytagoruuid.ts b/src/models/operations/deploybytagoruuid.ts new file mode 100644 index 0000000..f06d1be --- /dev/null +++ b/src/models/operations/deploybytagoruuid.ts @@ -0,0 +1,219 @@ +/* + * 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 DeployByTagOrUuidRequest = { + /** + * Tag name(s). Comma separated list is also accepted. + */ + tag?: string | undefined; + /** + * Resource UUID(s). Comma separated list is also accepted. + */ + uuid?: string | undefined; + /** + * Force rebuild (without cache) + */ + force?: boolean | undefined; +}; + +export type Deployments = { + message?: string | undefined; + resourceUuid?: string | undefined; + deploymentUuid?: string | undefined; +}; + +/** + * Get deployment(s) UUID's + */ +export type DeployByTagOrUuidResponseBody = { + deployments?: Array | undefined; +}; + +/** @internal */ +export const DeployByTagOrUuidRequest$inboundSchema: z.ZodType< + DeployByTagOrUuidRequest, + z.ZodTypeDef, + unknown +> = z.object({ + tag: z.string().optional(), + uuid: z.string().optional(), + force: z.boolean().optional(), +}); + +/** @internal */ +export type DeployByTagOrUuidRequest$Outbound = { + tag?: string | undefined; + uuid?: string | undefined; + force?: boolean | undefined; +}; + +/** @internal */ +export const DeployByTagOrUuidRequest$outboundSchema: z.ZodType< + DeployByTagOrUuidRequest$Outbound, + z.ZodTypeDef, + DeployByTagOrUuidRequest +> = z.object({ + tag: z.string().optional(), + uuid: z.string().optional(), + force: z.boolean().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeployByTagOrUuidRequest$ { + /** @deprecated use `DeployByTagOrUuidRequest$inboundSchema` instead. */ + export const inboundSchema = DeployByTagOrUuidRequest$inboundSchema; + /** @deprecated use `DeployByTagOrUuidRequest$outboundSchema` instead. */ + export const outboundSchema = DeployByTagOrUuidRequest$outboundSchema; + /** @deprecated use `DeployByTagOrUuidRequest$Outbound` instead. */ + export type Outbound = DeployByTagOrUuidRequest$Outbound; +} + +export function deployByTagOrUuidRequestToJSON( + deployByTagOrUuidRequest: DeployByTagOrUuidRequest, +): string { + return JSON.stringify( + DeployByTagOrUuidRequest$outboundSchema.parse(deployByTagOrUuidRequest), + ); +} + +export function deployByTagOrUuidRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeployByTagOrUuidRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeployByTagOrUuidRequest' from JSON`, + ); +} + +/** @internal */ +export const Deployments$inboundSchema: z.ZodType< + Deployments, + z.ZodTypeDef, + unknown +> = z.object({ + message: z.string().optional(), + resource_uuid: z.string().optional(), + deployment_uuid: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "resource_uuid": "resourceUuid", + "deployment_uuid": "deploymentUuid", + }); +}); + +/** @internal */ +export type Deployments$Outbound = { + message?: string | undefined; + resource_uuid?: string | undefined; + deployment_uuid?: string | undefined; +}; + +/** @internal */ +export const Deployments$outboundSchema: z.ZodType< + Deployments$Outbound, + z.ZodTypeDef, + Deployments +> = z.object({ + message: z.string().optional(), + resourceUuid: z.string().optional(), + deploymentUuid: z.string().optional(), +}).transform((v) => { + return remap$(v, { + resourceUuid: "resource_uuid", + deploymentUuid: "deployment_uuid", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Deployments$ { + /** @deprecated use `Deployments$inboundSchema` instead. */ + export const inboundSchema = Deployments$inboundSchema; + /** @deprecated use `Deployments$outboundSchema` instead. */ + export const outboundSchema = Deployments$outboundSchema; + /** @deprecated use `Deployments$Outbound` instead. */ + export type Outbound = Deployments$Outbound; +} + +export function deploymentsToJSON(deployments: Deployments): string { + return JSON.stringify(Deployments$outboundSchema.parse(deployments)); +} + +export function deploymentsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Deployments$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Deployments' from JSON`, + ); +} + +/** @internal */ +export const DeployByTagOrUuidResponseBody$inboundSchema: z.ZodType< + DeployByTagOrUuidResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + deployments: z.array(z.lazy(() => Deployments$inboundSchema)).optional(), +}); + +/** @internal */ +export type DeployByTagOrUuidResponseBody$Outbound = { + deployments?: Array | undefined; +}; + +/** @internal */ +export const DeployByTagOrUuidResponseBody$outboundSchema: z.ZodType< + DeployByTagOrUuidResponseBody$Outbound, + z.ZodTypeDef, + DeployByTagOrUuidResponseBody +> = z.object({ + deployments: z.array(z.lazy(() => Deployments$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 DeployByTagOrUuidResponseBody$ { + /** @deprecated use `DeployByTagOrUuidResponseBody$inboundSchema` instead. */ + export const inboundSchema = DeployByTagOrUuidResponseBody$inboundSchema; + /** @deprecated use `DeployByTagOrUuidResponseBody$outboundSchema` instead. */ + export const outboundSchema = DeployByTagOrUuidResponseBody$outboundSchema; + /** @deprecated use `DeployByTagOrUuidResponseBody$Outbound` instead. */ + export type Outbound = DeployByTagOrUuidResponseBody$Outbound; +} + +export function deployByTagOrUuidResponseBodyToJSON( + deployByTagOrUuidResponseBody: DeployByTagOrUuidResponseBody, +): string { + return JSON.stringify( + DeployByTagOrUuidResponseBody$outboundSchema.parse( + deployByTagOrUuidResponseBody, + ), + ); +} + +export function deployByTagOrUuidResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeployByTagOrUuidResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeployByTagOrUuidResponseBody' from JSON`, + ); +} diff --git a/src/models/operations/disableapi.ts b/src/models/operations/disableapi.ts new file mode 100644 index 0000000..c9da316 --- /dev/null +++ b/src/models/operations/disableapi.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"; + +/** + * Disable API. + */ +export type DisableApiResponseBody = { + message?: string | undefined; +}; + +/** @internal */ +export const DisableApiResponseBody$inboundSchema: z.ZodType< + DisableApiResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + message: z.string().optional(), +}); + +/** @internal */ +export type DisableApiResponseBody$Outbound = { + message?: string | undefined; +}; + +/** @internal */ +export const DisableApiResponseBody$outboundSchema: z.ZodType< + DisableApiResponseBody$Outbound, + z.ZodTypeDef, + DisableApiResponseBody +> = z.object({ + message: 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 DisableApiResponseBody$ { + /** @deprecated use `DisableApiResponseBody$inboundSchema` instead. */ + export const inboundSchema = DisableApiResponseBody$inboundSchema; + /** @deprecated use `DisableApiResponseBody$outboundSchema` instead. */ + export const outboundSchema = DisableApiResponseBody$outboundSchema; + /** @deprecated use `DisableApiResponseBody$Outbound` instead. */ + export type Outbound = DisableApiResponseBody$Outbound; +} + +export function disableApiResponseBodyToJSON( + disableApiResponseBody: DisableApiResponseBody, +): string { + return JSON.stringify( + DisableApiResponseBody$outboundSchema.parse(disableApiResponseBody), + ); +} + +export function disableApiResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DisableApiResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DisableApiResponseBody' from JSON`, + ); +} diff --git a/src/models/operations/enableapi.ts b/src/models/operations/enableapi.ts new file mode 100644 index 0000000..2dbc6e8 --- /dev/null +++ b/src/models/operations/enableapi.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"; + +/** + * Enable API. + */ +export type EnableApiResponseBody = { + message?: string | undefined; +}; + +/** @internal */ +export const EnableApiResponseBody$inboundSchema: z.ZodType< + EnableApiResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + message: z.string().optional(), +}); + +/** @internal */ +export type EnableApiResponseBody$Outbound = { + message?: string | undefined; +}; + +/** @internal */ +export const EnableApiResponseBody$outboundSchema: z.ZodType< + EnableApiResponseBody$Outbound, + z.ZodTypeDef, + EnableApiResponseBody +> = z.object({ + message: 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 EnableApiResponseBody$ { + /** @deprecated use `EnableApiResponseBody$inboundSchema` instead. */ + export const inboundSchema = EnableApiResponseBody$inboundSchema; + /** @deprecated use `EnableApiResponseBody$outboundSchema` instead. */ + export const outboundSchema = EnableApiResponseBody$outboundSchema; + /** @deprecated use `EnableApiResponseBody$Outbound` instead. */ + export type Outbound = EnableApiResponseBody$Outbound; +} + +export function enableApiResponseBodyToJSON( + enableApiResponseBody: EnableApiResponseBody, +): string { + return JSON.stringify( + EnableApiResponseBody$outboundSchema.parse(enableApiResponseBody), + ); +} + +export function enableApiResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => EnableApiResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'EnableApiResponseBody' from JSON`, + ); +} diff --git a/src/models/operations/executecommandapplication.ts b/src/models/operations/executecommandapplication.ts new file mode 100644 index 0000000..7d43e0b --- /dev/null +++ b/src/models/operations/executecommandapplication.ts @@ -0,0 +1,228 @@ +/* + * 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"; + +/** + * Command to execute. + */ +export type ExecuteCommandApplicationRequestBody = { + /** + * Command to execute. + */ + command?: string | undefined; +}; + +export type ExecuteCommandApplicationRequest = { + /** + * UUID of the application. + */ + uuid: string; + /** + * Command to execute. + */ + requestBody: ExecuteCommandApplicationRequestBody; +}; + +/** + * Execute a command on the application's current container. + */ +export type ExecuteCommandApplicationResponseBody = { + message?: string | undefined; + response?: string | undefined; +}; + +/** @internal */ +export const ExecuteCommandApplicationRequestBody$inboundSchema: z.ZodType< + ExecuteCommandApplicationRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + command: z.string().optional(), +}); + +/** @internal */ +export type ExecuteCommandApplicationRequestBody$Outbound = { + command?: string | undefined; +}; + +/** @internal */ +export const ExecuteCommandApplicationRequestBody$outboundSchema: z.ZodType< + ExecuteCommandApplicationRequestBody$Outbound, + z.ZodTypeDef, + ExecuteCommandApplicationRequestBody +> = z.object({ + command: 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 ExecuteCommandApplicationRequestBody$ { + /** @deprecated use `ExecuteCommandApplicationRequestBody$inboundSchema` instead. */ + export const inboundSchema = + ExecuteCommandApplicationRequestBody$inboundSchema; + /** @deprecated use `ExecuteCommandApplicationRequestBody$outboundSchema` instead. */ + export const outboundSchema = + ExecuteCommandApplicationRequestBody$outboundSchema; + /** @deprecated use `ExecuteCommandApplicationRequestBody$Outbound` instead. */ + export type Outbound = ExecuteCommandApplicationRequestBody$Outbound; +} + +export function executeCommandApplicationRequestBodyToJSON( + executeCommandApplicationRequestBody: ExecuteCommandApplicationRequestBody, +): string { + return JSON.stringify( + ExecuteCommandApplicationRequestBody$outboundSchema.parse( + executeCommandApplicationRequestBody, + ), + ); +} + +export function executeCommandApplicationRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + ExecuteCommandApplicationRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ExecuteCommandApplicationRequestBody' from JSON`, + ); +} + +/** @internal */ +export const ExecuteCommandApplicationRequest$inboundSchema: z.ZodType< + ExecuteCommandApplicationRequest, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string(), + RequestBody: z.lazy(() => ExecuteCommandApplicationRequestBody$inboundSchema), +}).transform((v) => { + return remap$(v, { + "RequestBody": "requestBody", + }); +}); + +/** @internal */ +export type ExecuteCommandApplicationRequest$Outbound = { + uuid: string; + RequestBody: ExecuteCommandApplicationRequestBody$Outbound; +}; + +/** @internal */ +export const ExecuteCommandApplicationRequest$outboundSchema: z.ZodType< + ExecuteCommandApplicationRequest$Outbound, + z.ZodTypeDef, + ExecuteCommandApplicationRequest +> = z.object({ + uuid: z.string(), + requestBody: z.lazy(() => + ExecuteCommandApplicationRequestBody$outboundSchema + ), +}).transform((v) => { + return remap$(v, { + requestBody: "RequestBody", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ExecuteCommandApplicationRequest$ { + /** @deprecated use `ExecuteCommandApplicationRequest$inboundSchema` instead. */ + export const inboundSchema = ExecuteCommandApplicationRequest$inboundSchema; + /** @deprecated use `ExecuteCommandApplicationRequest$outboundSchema` instead. */ + export const outboundSchema = ExecuteCommandApplicationRequest$outboundSchema; + /** @deprecated use `ExecuteCommandApplicationRequest$Outbound` instead. */ + export type Outbound = ExecuteCommandApplicationRequest$Outbound; +} + +export function executeCommandApplicationRequestToJSON( + executeCommandApplicationRequest: ExecuteCommandApplicationRequest, +): string { + return JSON.stringify( + ExecuteCommandApplicationRequest$outboundSchema.parse( + executeCommandApplicationRequest, + ), + ); +} + +export function executeCommandApplicationRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ExecuteCommandApplicationRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ExecuteCommandApplicationRequest' from JSON`, + ); +} + +/** @internal */ +export const ExecuteCommandApplicationResponseBody$inboundSchema: z.ZodType< + ExecuteCommandApplicationResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + message: z.string().optional(), + response: z.string().optional(), +}); + +/** @internal */ +export type ExecuteCommandApplicationResponseBody$Outbound = { + message?: string | undefined; + response?: string | undefined; +}; + +/** @internal */ +export const ExecuteCommandApplicationResponseBody$outboundSchema: z.ZodType< + ExecuteCommandApplicationResponseBody$Outbound, + z.ZodTypeDef, + ExecuteCommandApplicationResponseBody +> = z.object({ + message: z.string().optional(), + response: 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 ExecuteCommandApplicationResponseBody$ { + /** @deprecated use `ExecuteCommandApplicationResponseBody$inboundSchema` instead. */ + export const inboundSchema = + ExecuteCommandApplicationResponseBody$inboundSchema; + /** @deprecated use `ExecuteCommandApplicationResponseBody$outboundSchema` instead. */ + export const outboundSchema = + ExecuteCommandApplicationResponseBody$outboundSchema; + /** @deprecated use `ExecuteCommandApplicationResponseBody$Outbound` instead. */ + export type Outbound = ExecuteCommandApplicationResponseBody$Outbound; +} + +export function executeCommandApplicationResponseBodyToJSON( + executeCommandApplicationResponseBody: ExecuteCommandApplicationResponseBody, +): string { + return JSON.stringify( + ExecuteCommandApplicationResponseBody$outboundSchema.parse( + executeCommandApplicationResponseBody, + ), + ); +} + +export function executeCommandApplicationResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + ExecuteCommandApplicationResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ExecuteCommandApplicationResponseBody' from JSON`, + ); +} diff --git a/src/models/operations/getapplicationbyuuid.ts b/src/models/operations/getapplicationbyuuid.ts new file mode 100644 index 0000000..c03d02b --- /dev/null +++ b/src/models/operations/getapplicationbyuuid.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 GetApplicationByUuidRequest = { + /** + * UUID of the application. + */ + uuid: string; +}; + +/** @internal */ +export const GetApplicationByUuidRequest$inboundSchema: z.ZodType< + GetApplicationByUuidRequest, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string(), +}); + +/** @internal */ +export type GetApplicationByUuidRequest$Outbound = { + uuid: string; +}; + +/** @internal */ +export const GetApplicationByUuidRequest$outboundSchema: z.ZodType< + GetApplicationByUuidRequest$Outbound, + z.ZodTypeDef, + GetApplicationByUuidRequest +> = z.object({ + uuid: 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 GetApplicationByUuidRequest$ { + /** @deprecated use `GetApplicationByUuidRequest$inboundSchema` instead. */ + export const inboundSchema = GetApplicationByUuidRequest$inboundSchema; + /** @deprecated use `GetApplicationByUuidRequest$outboundSchema` instead. */ + export const outboundSchema = GetApplicationByUuidRequest$outboundSchema; + /** @deprecated use `GetApplicationByUuidRequest$Outbound` instead. */ + export type Outbound = GetApplicationByUuidRequest$Outbound; +} + +export function getApplicationByUuidRequestToJSON( + getApplicationByUuidRequest: GetApplicationByUuidRequest, +): string { + return JSON.stringify( + GetApplicationByUuidRequest$outboundSchema.parse( + getApplicationByUuidRequest, + ), + ); +} + +export function getApplicationByUuidRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetApplicationByUuidRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetApplicationByUuidRequest' from JSON`, + ); +} diff --git a/src/models/operations/getdatabasebyuuid.ts b/src/models/operations/getdatabasebyuuid.ts new file mode 100644 index 0000000..7c7808a --- /dev/null +++ b/src/models/operations/getdatabasebyuuid.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 GetDatabaseByUuidRequest = { + /** + * UUID of the database. + */ + uuid: string; +}; + +/** @internal */ +export const GetDatabaseByUuidRequest$inboundSchema: z.ZodType< + GetDatabaseByUuidRequest, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string(), +}); + +/** @internal */ +export type GetDatabaseByUuidRequest$Outbound = { + uuid: string; +}; + +/** @internal */ +export const GetDatabaseByUuidRequest$outboundSchema: z.ZodType< + GetDatabaseByUuidRequest$Outbound, + z.ZodTypeDef, + GetDatabaseByUuidRequest +> = z.object({ + uuid: 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 GetDatabaseByUuidRequest$ { + /** @deprecated use `GetDatabaseByUuidRequest$inboundSchema` instead. */ + export const inboundSchema = GetDatabaseByUuidRequest$inboundSchema; + /** @deprecated use `GetDatabaseByUuidRequest$outboundSchema` instead. */ + export const outboundSchema = GetDatabaseByUuidRequest$outboundSchema; + /** @deprecated use `GetDatabaseByUuidRequest$Outbound` instead. */ + export type Outbound = GetDatabaseByUuidRequest$Outbound; +} + +export function getDatabaseByUuidRequestToJSON( + getDatabaseByUuidRequest: GetDatabaseByUuidRequest, +): string { + return JSON.stringify( + GetDatabaseByUuidRequest$outboundSchema.parse(getDatabaseByUuidRequest), + ); +} + +export function getDatabaseByUuidRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetDatabaseByUuidRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetDatabaseByUuidRequest' from JSON`, + ); +} diff --git a/src/models/operations/getdeploymentbyuuid.ts b/src/models/operations/getdeploymentbyuuid.ts new file mode 100644 index 0000000..82bc5c7 --- /dev/null +++ b/src/models/operations/getdeploymentbyuuid.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 GetDeploymentByUuidRequest = { + /** + * Deployment UUID + */ + uuid: string; +}; + +/** @internal */ +export const GetDeploymentByUuidRequest$inboundSchema: z.ZodType< + GetDeploymentByUuidRequest, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string(), +}); + +/** @internal */ +export type GetDeploymentByUuidRequest$Outbound = { + uuid: string; +}; + +/** @internal */ +export const GetDeploymentByUuidRequest$outboundSchema: z.ZodType< + GetDeploymentByUuidRequest$Outbound, + z.ZodTypeDef, + GetDeploymentByUuidRequest +> = z.object({ + uuid: 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 GetDeploymentByUuidRequest$ { + /** @deprecated use `GetDeploymentByUuidRequest$inboundSchema` instead. */ + export const inboundSchema = GetDeploymentByUuidRequest$inboundSchema; + /** @deprecated use `GetDeploymentByUuidRequest$outboundSchema` instead. */ + export const outboundSchema = GetDeploymentByUuidRequest$outboundSchema; + /** @deprecated use `GetDeploymentByUuidRequest$Outbound` instead. */ + export type Outbound = GetDeploymentByUuidRequest$Outbound; +} + +export function getDeploymentByUuidRequestToJSON( + getDeploymentByUuidRequest: GetDeploymentByUuidRequest, +): string { + return JSON.stringify( + GetDeploymentByUuidRequest$outboundSchema.parse(getDeploymentByUuidRequest), + ); +} + +export function getDeploymentByUuidRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetDeploymentByUuidRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetDeploymentByUuidRequest' from JSON`, + ); +} diff --git a/src/models/operations/getdomainsbyserveruuid.ts b/src/models/operations/getdomainsbyserveruuid.ts new file mode 100644 index 0000000..58edb30 --- /dev/null +++ b/src/models/operations/getdomainsbyserveruuid.ts @@ -0,0 +1,137 @@ +/* + * 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 GetDomainsByServerUuidRequest = { + /** + * Server's UUID + */ + uuid: string; +}; + +export type GetDomainsByServerUuidResponseBody = { + ip?: string | undefined; + domains?: Array | undefined; +}; + +/** @internal */ +export const GetDomainsByServerUuidRequest$inboundSchema: z.ZodType< + GetDomainsByServerUuidRequest, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string(), +}); + +/** @internal */ +export type GetDomainsByServerUuidRequest$Outbound = { + uuid: string; +}; + +/** @internal */ +export const GetDomainsByServerUuidRequest$outboundSchema: z.ZodType< + GetDomainsByServerUuidRequest$Outbound, + z.ZodTypeDef, + GetDomainsByServerUuidRequest +> = z.object({ + uuid: 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 GetDomainsByServerUuidRequest$ { + /** @deprecated use `GetDomainsByServerUuidRequest$inboundSchema` instead. */ + export const inboundSchema = GetDomainsByServerUuidRequest$inboundSchema; + /** @deprecated use `GetDomainsByServerUuidRequest$outboundSchema` instead. */ + export const outboundSchema = GetDomainsByServerUuidRequest$outboundSchema; + /** @deprecated use `GetDomainsByServerUuidRequest$Outbound` instead. */ + export type Outbound = GetDomainsByServerUuidRequest$Outbound; +} + +export function getDomainsByServerUuidRequestToJSON( + getDomainsByServerUuidRequest: GetDomainsByServerUuidRequest, +): string { + return JSON.stringify( + GetDomainsByServerUuidRequest$outboundSchema.parse( + getDomainsByServerUuidRequest, + ), + ); +} + +export function getDomainsByServerUuidRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetDomainsByServerUuidRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetDomainsByServerUuidRequest' from JSON`, + ); +} + +/** @internal */ +export const GetDomainsByServerUuidResponseBody$inboundSchema: z.ZodType< + GetDomainsByServerUuidResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + ip: z.string().optional(), + domains: z.array(z.string()).optional(), +}); + +/** @internal */ +export type GetDomainsByServerUuidResponseBody$Outbound = { + ip?: string | undefined; + domains?: Array | undefined; +}; + +/** @internal */ +export const GetDomainsByServerUuidResponseBody$outboundSchema: z.ZodType< + GetDomainsByServerUuidResponseBody$Outbound, + z.ZodTypeDef, + GetDomainsByServerUuidResponseBody +> = z.object({ + ip: z.string().optional(), + domains: z.array(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 GetDomainsByServerUuidResponseBody$ { + /** @deprecated use `GetDomainsByServerUuidResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetDomainsByServerUuidResponseBody$inboundSchema; + /** @deprecated use `GetDomainsByServerUuidResponseBody$outboundSchema` instead. */ + export const outboundSchema = + GetDomainsByServerUuidResponseBody$outboundSchema; + /** @deprecated use `GetDomainsByServerUuidResponseBody$Outbound` instead. */ + export type Outbound = GetDomainsByServerUuidResponseBody$Outbound; +} + +export function getDomainsByServerUuidResponseBodyToJSON( + getDomainsByServerUuidResponseBody: GetDomainsByServerUuidResponseBody, +): string { + return JSON.stringify( + GetDomainsByServerUuidResponseBody$outboundSchema.parse( + getDomainsByServerUuidResponseBody, + ), + ); +} + +export function getDomainsByServerUuidResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + GetDomainsByServerUuidResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetDomainsByServerUuidResponseBody' from JSON`, + ); +} diff --git a/src/models/operations/getenvironmentbyname.ts b/src/models/operations/getenvironmentbyname.ts new file mode 100644 index 0000000..a09f17e --- /dev/null +++ b/src/models/operations/getenvironmentbyname.ts @@ -0,0 +1,87 @@ +/* + * 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 GetEnvironmentByNameRequest = { + /** + * Project UUID + */ + uuid: string; + /** + * Environment name + */ + environmentName: string; +}; + +/** @internal */ +export const GetEnvironmentByNameRequest$inboundSchema: z.ZodType< + GetEnvironmentByNameRequest, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string(), + environment_name: z.string(), +}).transform((v) => { + return remap$(v, { + "environment_name": "environmentName", + }); +}); + +/** @internal */ +export type GetEnvironmentByNameRequest$Outbound = { + uuid: string; + environment_name: string; +}; + +/** @internal */ +export const GetEnvironmentByNameRequest$outboundSchema: z.ZodType< + GetEnvironmentByNameRequest$Outbound, + z.ZodTypeDef, + GetEnvironmentByNameRequest +> = z.object({ + uuid: z.string(), + environmentName: z.string(), +}).transform((v) => { + return remap$(v, { + environmentName: "environment_name", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetEnvironmentByNameRequest$ { + /** @deprecated use `GetEnvironmentByNameRequest$inboundSchema` instead. */ + export const inboundSchema = GetEnvironmentByNameRequest$inboundSchema; + /** @deprecated use `GetEnvironmentByNameRequest$outboundSchema` instead. */ + export const outboundSchema = GetEnvironmentByNameRequest$outboundSchema; + /** @deprecated use `GetEnvironmentByNameRequest$Outbound` instead. */ + export type Outbound = GetEnvironmentByNameRequest$Outbound; +} + +export function getEnvironmentByNameRequestToJSON( + getEnvironmentByNameRequest: GetEnvironmentByNameRequest, +): string { + return JSON.stringify( + GetEnvironmentByNameRequest$outboundSchema.parse( + getEnvironmentByNameRequest, + ), + ); +} + +export function getEnvironmentByNameRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetEnvironmentByNameRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetEnvironmentByNameRequest' from JSON`, + ); +} diff --git a/src/models/operations/getmembersbyteamid.ts b/src/models/operations/getmembersbyteamid.ts new file mode 100644 index 0000000..de65959 --- /dev/null +++ b/src/models/operations/getmembersbyteamid.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 GetMembersByTeamIdRequest = { + /** + * Team ID + */ + id: number; +}; + +/** @internal */ +export const GetMembersByTeamIdRequest$inboundSchema: z.ZodType< + GetMembersByTeamIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int(), +}); + +/** @internal */ +export type GetMembersByTeamIdRequest$Outbound = { + id: number; +}; + +/** @internal */ +export const GetMembersByTeamIdRequest$outboundSchema: z.ZodType< + GetMembersByTeamIdRequest$Outbound, + z.ZodTypeDef, + GetMembersByTeamIdRequest +> = z.object({ + id: z.number().int(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetMembersByTeamIdRequest$ { + /** @deprecated use `GetMembersByTeamIdRequest$inboundSchema` instead. */ + export const inboundSchema = GetMembersByTeamIdRequest$inboundSchema; + /** @deprecated use `GetMembersByTeamIdRequest$outboundSchema` instead. */ + export const outboundSchema = GetMembersByTeamIdRequest$outboundSchema; + /** @deprecated use `GetMembersByTeamIdRequest$Outbound` instead. */ + export type Outbound = GetMembersByTeamIdRequest$Outbound; +} + +export function getMembersByTeamIdRequestToJSON( + getMembersByTeamIdRequest: GetMembersByTeamIdRequest, +): string { + return JSON.stringify( + GetMembersByTeamIdRequest$outboundSchema.parse(getMembersByTeamIdRequest), + ); +} + +export function getMembersByTeamIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetMembersByTeamIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetMembersByTeamIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/getprivatekeybyuuid.ts b/src/models/operations/getprivatekeybyuuid.ts new file mode 100644 index 0000000..3065c7d --- /dev/null +++ b/src/models/operations/getprivatekeybyuuid.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 GetPrivateKeyByUuidRequest = { + /** + * Private Key UUID + */ + uuid: string; +}; + +/** @internal */ +export const GetPrivateKeyByUuidRequest$inboundSchema: z.ZodType< + GetPrivateKeyByUuidRequest, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string(), +}); + +/** @internal */ +export type GetPrivateKeyByUuidRequest$Outbound = { + uuid: string; +}; + +/** @internal */ +export const GetPrivateKeyByUuidRequest$outboundSchema: z.ZodType< + GetPrivateKeyByUuidRequest$Outbound, + z.ZodTypeDef, + GetPrivateKeyByUuidRequest +> = z.object({ + uuid: 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 GetPrivateKeyByUuidRequest$ { + /** @deprecated use `GetPrivateKeyByUuidRequest$inboundSchema` instead. */ + export const inboundSchema = GetPrivateKeyByUuidRequest$inboundSchema; + /** @deprecated use `GetPrivateKeyByUuidRequest$outboundSchema` instead. */ + export const outboundSchema = GetPrivateKeyByUuidRequest$outboundSchema; + /** @deprecated use `GetPrivateKeyByUuidRequest$Outbound` instead. */ + export type Outbound = GetPrivateKeyByUuidRequest$Outbound; +} + +export function getPrivateKeyByUuidRequestToJSON( + getPrivateKeyByUuidRequest: GetPrivateKeyByUuidRequest, +): string { + return JSON.stringify( + GetPrivateKeyByUuidRequest$outboundSchema.parse(getPrivateKeyByUuidRequest), + ); +} + +export function getPrivateKeyByUuidRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetPrivateKeyByUuidRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetPrivateKeyByUuidRequest' from JSON`, + ); +} diff --git a/src/models/operations/getprojectbyuuid.ts b/src/models/operations/getprojectbyuuid.ts new file mode 100644 index 0000000..8894145 --- /dev/null +++ b/src/models/operations/getprojectbyuuid.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 GetProjectByUuidRequest = { + /** + * Project UUID + */ + uuid: string; +}; + +/** @internal */ +export const GetProjectByUuidRequest$inboundSchema: z.ZodType< + GetProjectByUuidRequest, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string(), +}); + +/** @internal */ +export type GetProjectByUuidRequest$Outbound = { + uuid: string; +}; + +/** @internal */ +export const GetProjectByUuidRequest$outboundSchema: z.ZodType< + GetProjectByUuidRequest$Outbound, + z.ZodTypeDef, + GetProjectByUuidRequest +> = z.object({ + uuid: 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 GetProjectByUuidRequest$ { + /** @deprecated use `GetProjectByUuidRequest$inboundSchema` instead. */ + export const inboundSchema = GetProjectByUuidRequest$inboundSchema; + /** @deprecated use `GetProjectByUuidRequest$outboundSchema` instead. */ + export const outboundSchema = GetProjectByUuidRequest$outboundSchema; + /** @deprecated use `GetProjectByUuidRequest$Outbound` instead. */ + export type Outbound = GetProjectByUuidRequest$Outbound; +} + +export function getProjectByUuidRequestToJSON( + getProjectByUuidRequest: GetProjectByUuidRequest, +): string { + return JSON.stringify( + GetProjectByUuidRequest$outboundSchema.parse(getProjectByUuidRequest), + ); +} + +export function getProjectByUuidRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetProjectByUuidRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetProjectByUuidRequest' from JSON`, + ); +} diff --git a/src/models/operations/getresourcesbyserveruuid.ts b/src/models/operations/getresourcesbyserveruuid.ts new file mode 100644 index 0000000..5784536 --- /dev/null +++ b/src/models/operations/getresourcesbyserveruuid.ts @@ -0,0 +1,160 @@ +/* + * 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 GetResourcesByServerUuidRequest = { + /** + * Server's UUID + */ + uuid: string; +}; + +export type ResponseBody = { + id?: number | undefined; + uuid?: string | undefined; + name?: string | undefined; + type?: string | undefined; + createdAt?: string | undefined; + updatedAt?: string | undefined; + status?: string | undefined; +}; + +/** @internal */ +export const GetResourcesByServerUuidRequest$inboundSchema: z.ZodType< + GetResourcesByServerUuidRequest, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string(), +}); + +/** @internal */ +export type GetResourcesByServerUuidRequest$Outbound = { + uuid: string; +}; + +/** @internal */ +export const GetResourcesByServerUuidRequest$outboundSchema: z.ZodType< + GetResourcesByServerUuidRequest$Outbound, + z.ZodTypeDef, + GetResourcesByServerUuidRequest +> = z.object({ + uuid: 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 GetResourcesByServerUuidRequest$ { + /** @deprecated use `GetResourcesByServerUuidRequest$inboundSchema` instead. */ + export const inboundSchema = GetResourcesByServerUuidRequest$inboundSchema; + /** @deprecated use `GetResourcesByServerUuidRequest$outboundSchema` instead. */ + export const outboundSchema = GetResourcesByServerUuidRequest$outboundSchema; + /** @deprecated use `GetResourcesByServerUuidRequest$Outbound` instead. */ + export type Outbound = GetResourcesByServerUuidRequest$Outbound; +} + +export function getResourcesByServerUuidRequestToJSON( + getResourcesByServerUuidRequest: GetResourcesByServerUuidRequest, +): string { + return JSON.stringify( + GetResourcesByServerUuidRequest$outboundSchema.parse( + getResourcesByServerUuidRequest, + ), + ); +} + +export function getResourcesByServerUuidRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetResourcesByServerUuidRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetResourcesByServerUuidRequest' from JSON`, + ); +} + +/** @internal */ +export const ResponseBody$inboundSchema: z.ZodType< + ResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + uuid: z.string().optional(), + name: z.string().optional(), + type: z.string().optional(), + created_at: z.string().optional(), + updated_at: z.string().optional(), + status: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "created_at": "createdAt", + "updated_at": "updatedAt", + }); +}); + +/** @internal */ +export type ResponseBody$Outbound = { + id?: number | undefined; + uuid?: string | undefined; + name?: string | undefined; + type?: string | undefined; + created_at?: string | undefined; + updated_at?: string | undefined; + status?: string | undefined; +}; + +/** @internal */ +export const ResponseBody$outboundSchema: z.ZodType< + ResponseBody$Outbound, + z.ZodTypeDef, + ResponseBody +> = z.object({ + id: z.number().int().optional(), + uuid: z.string().optional(), + name: z.string().optional(), + type: z.string().optional(), + createdAt: z.string().optional(), + updatedAt: z.string().optional(), + status: z.string().optional(), +}).transform((v) => { + return remap$(v, { + createdAt: "created_at", + updatedAt: "updated_at", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ResponseBody$ { + /** @deprecated use `ResponseBody$inboundSchema` instead. */ + export const inboundSchema = ResponseBody$inboundSchema; + /** @deprecated use `ResponseBody$outboundSchema` instead. */ + export const outboundSchema = ResponseBody$outboundSchema; + /** @deprecated use `ResponseBody$Outbound` instead. */ + export type Outbound = ResponseBody$Outbound; +} + +export function responseBodyToJSON(responseBody: ResponseBody): string { + return JSON.stringify(ResponseBody$outboundSchema.parse(responseBody)); +} + +export function responseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ResponseBody' from JSON`, + ); +} diff --git a/src/models/operations/getserverbyuuid.ts b/src/models/operations/getserverbyuuid.ts new file mode 100644 index 0000000..7c48de8 --- /dev/null +++ b/src/models/operations/getserverbyuuid.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 GetServerByUuidRequest = { + /** + * Server's UUID + */ + uuid: string; +}; + +/** @internal */ +export const GetServerByUuidRequest$inboundSchema: z.ZodType< + GetServerByUuidRequest, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string(), +}); + +/** @internal */ +export type GetServerByUuidRequest$Outbound = { + uuid: string; +}; + +/** @internal */ +export const GetServerByUuidRequest$outboundSchema: z.ZodType< + GetServerByUuidRequest$Outbound, + z.ZodTypeDef, + GetServerByUuidRequest +> = z.object({ + uuid: 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 GetServerByUuidRequest$ { + /** @deprecated use `GetServerByUuidRequest$inboundSchema` instead. */ + export const inboundSchema = GetServerByUuidRequest$inboundSchema; + /** @deprecated use `GetServerByUuidRequest$outboundSchema` instead. */ + export const outboundSchema = GetServerByUuidRequest$outboundSchema; + /** @deprecated use `GetServerByUuidRequest$Outbound` instead. */ + export type Outbound = GetServerByUuidRequest$Outbound; +} + +export function getServerByUuidRequestToJSON( + getServerByUuidRequest: GetServerByUuidRequest, +): string { + return JSON.stringify( + GetServerByUuidRequest$outboundSchema.parse(getServerByUuidRequest), + ); +} + +export function getServerByUuidRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetServerByUuidRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetServerByUuidRequest' from JSON`, + ); +} diff --git a/src/models/operations/getservicebyuuid.ts b/src/models/operations/getservicebyuuid.ts new file mode 100644 index 0000000..cf232ee --- /dev/null +++ b/src/models/operations/getservicebyuuid.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 GetServiceByUuidRequest = { + /** + * Service UUID + */ + uuid: string; +}; + +/** @internal */ +export const GetServiceByUuidRequest$inboundSchema: z.ZodType< + GetServiceByUuidRequest, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string(), +}); + +/** @internal */ +export type GetServiceByUuidRequest$Outbound = { + uuid: string; +}; + +/** @internal */ +export const GetServiceByUuidRequest$outboundSchema: z.ZodType< + GetServiceByUuidRequest$Outbound, + z.ZodTypeDef, + GetServiceByUuidRequest +> = z.object({ + uuid: 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 GetServiceByUuidRequest$ { + /** @deprecated use `GetServiceByUuidRequest$inboundSchema` instead. */ + export const inboundSchema = GetServiceByUuidRequest$inboundSchema; + /** @deprecated use `GetServiceByUuidRequest$outboundSchema` instead. */ + export const outboundSchema = GetServiceByUuidRequest$outboundSchema; + /** @deprecated use `GetServiceByUuidRequest$Outbound` instead. */ + export type Outbound = GetServiceByUuidRequest$Outbound; +} + +export function getServiceByUuidRequestToJSON( + getServiceByUuidRequest: GetServiceByUuidRequest, +): string { + return JSON.stringify( + GetServiceByUuidRequest$outboundSchema.parse(getServiceByUuidRequest), + ); +} + +export function getServiceByUuidRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetServiceByUuidRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetServiceByUuidRequest' from JSON`, + ); +} diff --git a/src/models/operations/getteambyid.ts b/src/models/operations/getteambyid.ts new file mode 100644 index 0000000..d73942f --- /dev/null +++ b/src/models/operations/getteambyid.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 GetTeamByIdRequest = { + /** + * Team ID + */ + id: number; +}; + +/** @internal */ +export const GetTeamByIdRequest$inboundSchema: z.ZodType< + GetTeamByIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int(), +}); + +/** @internal */ +export type GetTeamByIdRequest$Outbound = { + id: number; +}; + +/** @internal */ +export const GetTeamByIdRequest$outboundSchema: z.ZodType< + GetTeamByIdRequest$Outbound, + z.ZodTypeDef, + GetTeamByIdRequest +> = z.object({ + id: z.number().int(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetTeamByIdRequest$ { + /** @deprecated use `GetTeamByIdRequest$inboundSchema` instead. */ + export const inboundSchema = GetTeamByIdRequest$inboundSchema; + /** @deprecated use `GetTeamByIdRequest$outboundSchema` instead. */ + export const outboundSchema = GetTeamByIdRequest$outboundSchema; + /** @deprecated use `GetTeamByIdRequest$Outbound` instead. */ + export type Outbound = GetTeamByIdRequest$Outbound; +} + +export function getTeamByIdRequestToJSON( + getTeamByIdRequest: GetTeamByIdRequest, +): string { + return JSON.stringify( + GetTeamByIdRequest$outboundSchema.parse(getTeamByIdRequest), + ); +} + +export function getTeamByIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetTeamByIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetTeamByIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/index.ts b/src/models/operations/index.ts new file mode 100644 index 0000000..18a6180 --- /dev/null +++ b/src/models/operations/index.ts @@ -0,0 +1,69 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export * from "./createdatabaseclickhouse.js"; +export * from "./createdatabasedragonfly.js"; +export * from "./createdatabasekeydb.js"; +export * from "./createdatabasemariadb.js"; +export * from "./createdatabasemongodb.js"; +export * from "./createdatabasemysql.js"; +export * from "./createdatabasepostgresql.js"; +export * from "./createdatabaseredis.js"; +export * from "./createdockercomposeapplication.js"; +export * from "./createdockerfileapplication.js"; +export * from "./createdockerimageapplication.js"; +export * from "./createenvbyapplicationuuid.js"; +export * from "./createenvbyserviceuuid.js"; +export * from "./createprivatedeploykeyapplication.js"; +export * from "./createprivategithubappapplication.js"; +export * from "./createprivatekey.js"; +export * from "./createproject.js"; +export * from "./createpublicapplication.js"; +export * from "./createserver.js"; +export * from "./createservice.js"; +export * from "./deleteapplicationbyuuid.js"; +export * from "./deletedatabasebyuuid.js"; +export * from "./deleteenvbyapplicationuuid.js"; +export * from "./deleteenvbyserviceuuid.js"; +export * from "./deleteprivatekeybyuuid.js"; +export * from "./deleteprojectbyuuid.js"; +export * from "./deleteserverbyuuid.js"; +export * from "./deleteservicebyuuid.js"; +export * from "./deploybytagoruuid.js"; +export * from "./disableapi.js"; +export * from "./enableapi.js"; +export * from "./executecommandapplication.js"; +export * from "./getapplicationbyuuid.js"; +export * from "./getdatabasebyuuid.js"; +export * from "./getdeploymentbyuuid.js"; +export * from "./getdomainsbyserveruuid.js"; +export * from "./getenvironmentbyname.js"; +export * from "./getmembersbyteamid.js"; +export * from "./getprivatekeybyuuid.js"; +export * from "./getprojectbyuuid.js"; +export * from "./getresourcesbyserveruuid.js"; +export * from "./getserverbyuuid.js"; +export * from "./getservicebyuuid.js"; +export * from "./getteambyid.js"; +export * from "./listenvsbyapplicationuuid.js"; +export * from "./listenvsbyserviceuuid.js"; +export * from "./restartapplicationbyuuid.js"; +export * from "./restartdatabasebyuuid.js"; +export * from "./restartservicebyuuid.js"; +export * from "./startapplicationbyuuid.js"; +export * from "./startdatabasebyuuid.js"; +export * from "./startservicebyuuid.js"; +export * from "./stopapplicationbyuuid.js"; +export * from "./stopdatabasebyuuid.js"; +export * from "./stopservicebyuuid.js"; +export * from "./updateapplicationbyuuid.js"; +export * from "./updatedatabasebyuuid.js"; +export * from "./updateenvbyapplicationuuid.js"; +export * from "./updateenvbyserviceuuid.js"; +export * from "./updateenvsbyapplicationuuid.js"; +export * from "./updateenvsbyserviceuuid.js"; +export * from "./updateprivatekey.js"; +export * from "./updateprojectbyuuid.js"; +export * from "./updateserverbyuuid.js"; +export * from "./validateserverbyuuid.js"; diff --git a/src/models/operations/listenvsbyapplicationuuid.ts b/src/models/operations/listenvsbyapplicationuuid.ts new file mode 100644 index 0000000..b0286b5 --- /dev/null +++ b/src/models/operations/listenvsbyapplicationuuid.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 ListEnvsByApplicationUuidRequest = { + /** + * UUID of the application. + */ + uuid: string; +}; + +/** @internal */ +export const ListEnvsByApplicationUuidRequest$inboundSchema: z.ZodType< + ListEnvsByApplicationUuidRequest, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string(), +}); + +/** @internal */ +export type ListEnvsByApplicationUuidRequest$Outbound = { + uuid: string; +}; + +/** @internal */ +export const ListEnvsByApplicationUuidRequest$outboundSchema: z.ZodType< + ListEnvsByApplicationUuidRequest$Outbound, + z.ZodTypeDef, + ListEnvsByApplicationUuidRequest +> = z.object({ + uuid: 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 ListEnvsByApplicationUuidRequest$ { + /** @deprecated use `ListEnvsByApplicationUuidRequest$inboundSchema` instead. */ + export const inboundSchema = ListEnvsByApplicationUuidRequest$inboundSchema; + /** @deprecated use `ListEnvsByApplicationUuidRequest$outboundSchema` instead. */ + export const outboundSchema = ListEnvsByApplicationUuidRequest$outboundSchema; + /** @deprecated use `ListEnvsByApplicationUuidRequest$Outbound` instead. */ + export type Outbound = ListEnvsByApplicationUuidRequest$Outbound; +} + +export function listEnvsByApplicationUuidRequestToJSON( + listEnvsByApplicationUuidRequest: ListEnvsByApplicationUuidRequest, +): string { + return JSON.stringify( + ListEnvsByApplicationUuidRequest$outboundSchema.parse( + listEnvsByApplicationUuidRequest, + ), + ); +} + +export function listEnvsByApplicationUuidRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListEnvsByApplicationUuidRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListEnvsByApplicationUuidRequest' from JSON`, + ); +} diff --git a/src/models/operations/listenvsbyserviceuuid.ts b/src/models/operations/listenvsbyserviceuuid.ts new file mode 100644 index 0000000..d65321b --- /dev/null +++ b/src/models/operations/listenvsbyserviceuuid.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 ListEnvsByServiceUuidRequest = { + /** + * UUID of the service. + */ + uuid: string; +}; + +/** @internal */ +export const ListEnvsByServiceUuidRequest$inboundSchema: z.ZodType< + ListEnvsByServiceUuidRequest, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string(), +}); + +/** @internal */ +export type ListEnvsByServiceUuidRequest$Outbound = { + uuid: string; +}; + +/** @internal */ +export const ListEnvsByServiceUuidRequest$outboundSchema: z.ZodType< + ListEnvsByServiceUuidRequest$Outbound, + z.ZodTypeDef, + ListEnvsByServiceUuidRequest +> = z.object({ + uuid: 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 ListEnvsByServiceUuidRequest$ { + /** @deprecated use `ListEnvsByServiceUuidRequest$inboundSchema` instead. */ + export const inboundSchema = ListEnvsByServiceUuidRequest$inboundSchema; + /** @deprecated use `ListEnvsByServiceUuidRequest$outboundSchema` instead. */ + export const outboundSchema = ListEnvsByServiceUuidRequest$outboundSchema; + /** @deprecated use `ListEnvsByServiceUuidRequest$Outbound` instead. */ + export type Outbound = ListEnvsByServiceUuidRequest$Outbound; +} + +export function listEnvsByServiceUuidRequestToJSON( + listEnvsByServiceUuidRequest: ListEnvsByServiceUuidRequest, +): string { + return JSON.stringify( + ListEnvsByServiceUuidRequest$outboundSchema.parse( + listEnvsByServiceUuidRequest, + ), + ); +} + +export function listEnvsByServiceUuidRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListEnvsByServiceUuidRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListEnvsByServiceUuidRequest' from JSON`, + ); +} diff --git a/src/models/operations/restartapplicationbyuuid.ts b/src/models/operations/restartapplicationbyuuid.ts new file mode 100644 index 0000000..40fe5fd --- /dev/null +++ b/src/models/operations/restartapplicationbyuuid.ts @@ -0,0 +1,153 @@ +/* + * 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 RestartApplicationByUuidRequest = { + /** + * UUID of the application. + */ + uuid: string; +}; + +/** + * Restart application. + */ +export type RestartApplicationByUuidResponseBody = { + message?: string | undefined; + /** + * UUID of the deployment. + */ + deploymentUuid?: string | undefined; +}; + +/** @internal */ +export const RestartApplicationByUuidRequest$inboundSchema: z.ZodType< + RestartApplicationByUuidRequest, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string(), +}); + +/** @internal */ +export type RestartApplicationByUuidRequest$Outbound = { + uuid: string; +}; + +/** @internal */ +export const RestartApplicationByUuidRequest$outboundSchema: z.ZodType< + RestartApplicationByUuidRequest$Outbound, + z.ZodTypeDef, + RestartApplicationByUuidRequest +> = z.object({ + uuid: 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 RestartApplicationByUuidRequest$ { + /** @deprecated use `RestartApplicationByUuidRequest$inboundSchema` instead. */ + export const inboundSchema = RestartApplicationByUuidRequest$inboundSchema; + /** @deprecated use `RestartApplicationByUuidRequest$outboundSchema` instead. */ + export const outboundSchema = RestartApplicationByUuidRequest$outboundSchema; + /** @deprecated use `RestartApplicationByUuidRequest$Outbound` instead. */ + export type Outbound = RestartApplicationByUuidRequest$Outbound; +} + +export function restartApplicationByUuidRequestToJSON( + restartApplicationByUuidRequest: RestartApplicationByUuidRequest, +): string { + return JSON.stringify( + RestartApplicationByUuidRequest$outboundSchema.parse( + restartApplicationByUuidRequest, + ), + ); +} + +export function restartApplicationByUuidRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RestartApplicationByUuidRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RestartApplicationByUuidRequest' from JSON`, + ); +} + +/** @internal */ +export const RestartApplicationByUuidResponseBody$inboundSchema: z.ZodType< + RestartApplicationByUuidResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + message: z.string().optional(), + deployment_uuid: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "deployment_uuid": "deploymentUuid", + }); +}); + +/** @internal */ +export type RestartApplicationByUuidResponseBody$Outbound = { + message?: string | undefined; + deployment_uuid?: string | undefined; +}; + +/** @internal */ +export const RestartApplicationByUuidResponseBody$outboundSchema: z.ZodType< + RestartApplicationByUuidResponseBody$Outbound, + z.ZodTypeDef, + RestartApplicationByUuidResponseBody +> = z.object({ + message: z.string().optional(), + deploymentUuid: z.string().optional(), +}).transform((v) => { + return remap$(v, { + deploymentUuid: "deployment_uuid", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RestartApplicationByUuidResponseBody$ { + /** @deprecated use `RestartApplicationByUuidResponseBody$inboundSchema` instead. */ + export const inboundSchema = + RestartApplicationByUuidResponseBody$inboundSchema; + /** @deprecated use `RestartApplicationByUuidResponseBody$outboundSchema` instead. */ + export const outboundSchema = + RestartApplicationByUuidResponseBody$outboundSchema; + /** @deprecated use `RestartApplicationByUuidResponseBody$Outbound` instead. */ + export type Outbound = RestartApplicationByUuidResponseBody$Outbound; +} + +export function restartApplicationByUuidResponseBodyToJSON( + restartApplicationByUuidResponseBody: RestartApplicationByUuidResponseBody, +): string { + return JSON.stringify( + RestartApplicationByUuidResponseBody$outboundSchema.parse( + restartApplicationByUuidResponseBody, + ), + ); +} + +export function restartApplicationByUuidResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + RestartApplicationByUuidResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RestartApplicationByUuidResponseBody' from JSON`, + ); +} diff --git a/src/models/operations/restartdatabasebyuuid.ts b/src/models/operations/restartdatabasebyuuid.ts new file mode 100644 index 0000000..5f7ffaf --- /dev/null +++ b/src/models/operations/restartdatabasebyuuid.ts @@ -0,0 +1,135 @@ +/* + * 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 RestartDatabaseByUuidRequest = { + /** + * UUID of the database. + */ + uuid: string; +}; + +/** + * Restart database. + */ +export type RestartDatabaseByUuidResponseBody = { + message?: string | undefined; +}; + +/** @internal */ +export const RestartDatabaseByUuidRequest$inboundSchema: z.ZodType< + RestartDatabaseByUuidRequest, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string(), +}); + +/** @internal */ +export type RestartDatabaseByUuidRequest$Outbound = { + uuid: string; +}; + +/** @internal */ +export const RestartDatabaseByUuidRequest$outboundSchema: z.ZodType< + RestartDatabaseByUuidRequest$Outbound, + z.ZodTypeDef, + RestartDatabaseByUuidRequest +> = z.object({ + uuid: 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 RestartDatabaseByUuidRequest$ { + /** @deprecated use `RestartDatabaseByUuidRequest$inboundSchema` instead. */ + export const inboundSchema = RestartDatabaseByUuidRequest$inboundSchema; + /** @deprecated use `RestartDatabaseByUuidRequest$outboundSchema` instead. */ + export const outboundSchema = RestartDatabaseByUuidRequest$outboundSchema; + /** @deprecated use `RestartDatabaseByUuidRequest$Outbound` instead. */ + export type Outbound = RestartDatabaseByUuidRequest$Outbound; +} + +export function restartDatabaseByUuidRequestToJSON( + restartDatabaseByUuidRequest: RestartDatabaseByUuidRequest, +): string { + return JSON.stringify( + RestartDatabaseByUuidRequest$outboundSchema.parse( + restartDatabaseByUuidRequest, + ), + ); +} + +export function restartDatabaseByUuidRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RestartDatabaseByUuidRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RestartDatabaseByUuidRequest' from JSON`, + ); +} + +/** @internal */ +export const RestartDatabaseByUuidResponseBody$inboundSchema: z.ZodType< + RestartDatabaseByUuidResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + message: z.string().optional(), +}); + +/** @internal */ +export type RestartDatabaseByUuidResponseBody$Outbound = { + message?: string | undefined; +}; + +/** @internal */ +export const RestartDatabaseByUuidResponseBody$outboundSchema: z.ZodType< + RestartDatabaseByUuidResponseBody$Outbound, + z.ZodTypeDef, + RestartDatabaseByUuidResponseBody +> = z.object({ + message: 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 RestartDatabaseByUuidResponseBody$ { + /** @deprecated use `RestartDatabaseByUuidResponseBody$inboundSchema` instead. */ + export const inboundSchema = RestartDatabaseByUuidResponseBody$inboundSchema; + /** @deprecated use `RestartDatabaseByUuidResponseBody$outboundSchema` instead. */ + export const outboundSchema = + RestartDatabaseByUuidResponseBody$outboundSchema; + /** @deprecated use `RestartDatabaseByUuidResponseBody$Outbound` instead. */ + export type Outbound = RestartDatabaseByUuidResponseBody$Outbound; +} + +export function restartDatabaseByUuidResponseBodyToJSON( + restartDatabaseByUuidResponseBody: RestartDatabaseByUuidResponseBody, +): string { + return JSON.stringify( + RestartDatabaseByUuidResponseBody$outboundSchema.parse( + restartDatabaseByUuidResponseBody, + ), + ); +} + +export function restartDatabaseByUuidResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RestartDatabaseByUuidResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RestartDatabaseByUuidResponseBody' from JSON`, + ); +} diff --git a/src/models/operations/restartservicebyuuid.ts b/src/models/operations/restartservicebyuuid.ts new file mode 100644 index 0000000..4c4db44 --- /dev/null +++ b/src/models/operations/restartservicebyuuid.ts @@ -0,0 +1,134 @@ +/* + * 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 RestartServiceByUuidRequest = { + /** + * UUID of the service. + */ + uuid: string; +}; + +/** + * Restart service. + */ +export type RestartServiceByUuidResponseBody = { + message?: string | undefined; +}; + +/** @internal */ +export const RestartServiceByUuidRequest$inboundSchema: z.ZodType< + RestartServiceByUuidRequest, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string(), +}); + +/** @internal */ +export type RestartServiceByUuidRequest$Outbound = { + uuid: string; +}; + +/** @internal */ +export const RestartServiceByUuidRequest$outboundSchema: z.ZodType< + RestartServiceByUuidRequest$Outbound, + z.ZodTypeDef, + RestartServiceByUuidRequest +> = z.object({ + uuid: 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 RestartServiceByUuidRequest$ { + /** @deprecated use `RestartServiceByUuidRequest$inboundSchema` instead. */ + export const inboundSchema = RestartServiceByUuidRequest$inboundSchema; + /** @deprecated use `RestartServiceByUuidRequest$outboundSchema` instead. */ + export const outboundSchema = RestartServiceByUuidRequest$outboundSchema; + /** @deprecated use `RestartServiceByUuidRequest$Outbound` instead. */ + export type Outbound = RestartServiceByUuidRequest$Outbound; +} + +export function restartServiceByUuidRequestToJSON( + restartServiceByUuidRequest: RestartServiceByUuidRequest, +): string { + return JSON.stringify( + RestartServiceByUuidRequest$outboundSchema.parse( + restartServiceByUuidRequest, + ), + ); +} + +export function restartServiceByUuidRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RestartServiceByUuidRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RestartServiceByUuidRequest' from JSON`, + ); +} + +/** @internal */ +export const RestartServiceByUuidResponseBody$inboundSchema: z.ZodType< + RestartServiceByUuidResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + message: z.string().optional(), +}); + +/** @internal */ +export type RestartServiceByUuidResponseBody$Outbound = { + message?: string | undefined; +}; + +/** @internal */ +export const RestartServiceByUuidResponseBody$outboundSchema: z.ZodType< + RestartServiceByUuidResponseBody$Outbound, + z.ZodTypeDef, + RestartServiceByUuidResponseBody +> = z.object({ + message: 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 RestartServiceByUuidResponseBody$ { + /** @deprecated use `RestartServiceByUuidResponseBody$inboundSchema` instead. */ + export const inboundSchema = RestartServiceByUuidResponseBody$inboundSchema; + /** @deprecated use `RestartServiceByUuidResponseBody$outboundSchema` instead. */ + export const outboundSchema = RestartServiceByUuidResponseBody$outboundSchema; + /** @deprecated use `RestartServiceByUuidResponseBody$Outbound` instead. */ + export type Outbound = RestartServiceByUuidResponseBody$Outbound; +} + +export function restartServiceByUuidResponseBodyToJSON( + restartServiceByUuidResponseBody: RestartServiceByUuidResponseBody, +): string { + return JSON.stringify( + RestartServiceByUuidResponseBody$outboundSchema.parse( + restartServiceByUuidResponseBody, + ), + ); +} + +export function restartServiceByUuidResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RestartServiceByUuidResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RestartServiceByUuidResponseBody' from JSON`, + ); +} diff --git a/src/models/operations/startapplicationbyuuid.ts b/src/models/operations/startapplicationbyuuid.ts new file mode 100644 index 0000000..44eb35c --- /dev/null +++ b/src/models/operations/startapplicationbyuuid.ts @@ -0,0 +1,177 @@ +/* + * 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 StartApplicationByUuidRequest = { + /** + * UUID of the application. + */ + uuid: string; + /** + * Force rebuild. + */ + force?: boolean | undefined; + /** + * Instant deploy (skip queuing). + */ + instantDeploy?: boolean | undefined; +}; + +/** + * Start application. + */ +export type StartApplicationByUuidResponseBody = { + /** + * Message. + */ + message?: string | undefined; + /** + * UUID of the deployment. + */ + deploymentUuid?: string | undefined; +}; + +/** @internal */ +export const StartApplicationByUuidRequest$inboundSchema: z.ZodType< + StartApplicationByUuidRequest, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string(), + force: z.boolean().default(false), + instant_deploy: z.boolean().default(false), +}).transform((v) => { + return remap$(v, { + "instant_deploy": "instantDeploy", + }); +}); + +/** @internal */ +export type StartApplicationByUuidRequest$Outbound = { + uuid: string; + force: boolean; + instant_deploy: boolean; +}; + +/** @internal */ +export const StartApplicationByUuidRequest$outboundSchema: z.ZodType< + StartApplicationByUuidRequest$Outbound, + z.ZodTypeDef, + StartApplicationByUuidRequest +> = z.object({ + uuid: z.string(), + force: z.boolean().default(false), + instantDeploy: z.boolean().default(false), +}).transform((v) => { + return remap$(v, { + instantDeploy: "instant_deploy", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace StartApplicationByUuidRequest$ { + /** @deprecated use `StartApplicationByUuidRequest$inboundSchema` instead. */ + export const inboundSchema = StartApplicationByUuidRequest$inboundSchema; + /** @deprecated use `StartApplicationByUuidRequest$outboundSchema` instead. */ + export const outboundSchema = StartApplicationByUuidRequest$outboundSchema; + /** @deprecated use `StartApplicationByUuidRequest$Outbound` instead. */ + export type Outbound = StartApplicationByUuidRequest$Outbound; +} + +export function startApplicationByUuidRequestToJSON( + startApplicationByUuidRequest: StartApplicationByUuidRequest, +): string { + return JSON.stringify( + StartApplicationByUuidRequest$outboundSchema.parse( + startApplicationByUuidRequest, + ), + ); +} + +export function startApplicationByUuidRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => StartApplicationByUuidRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'StartApplicationByUuidRequest' from JSON`, + ); +} + +/** @internal */ +export const StartApplicationByUuidResponseBody$inboundSchema: z.ZodType< + StartApplicationByUuidResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + message: z.string().optional(), + deployment_uuid: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "deployment_uuid": "deploymentUuid", + }); +}); + +/** @internal */ +export type StartApplicationByUuidResponseBody$Outbound = { + message?: string | undefined; + deployment_uuid?: string | undefined; +}; + +/** @internal */ +export const StartApplicationByUuidResponseBody$outboundSchema: z.ZodType< + StartApplicationByUuidResponseBody$Outbound, + z.ZodTypeDef, + StartApplicationByUuidResponseBody +> = z.object({ + message: z.string().optional(), + deploymentUuid: z.string().optional(), +}).transform((v) => { + return remap$(v, { + deploymentUuid: "deployment_uuid", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace StartApplicationByUuidResponseBody$ { + /** @deprecated use `StartApplicationByUuidResponseBody$inboundSchema` instead. */ + export const inboundSchema = StartApplicationByUuidResponseBody$inboundSchema; + /** @deprecated use `StartApplicationByUuidResponseBody$outboundSchema` instead. */ + export const outboundSchema = + StartApplicationByUuidResponseBody$outboundSchema; + /** @deprecated use `StartApplicationByUuidResponseBody$Outbound` instead. */ + export type Outbound = StartApplicationByUuidResponseBody$Outbound; +} + +export function startApplicationByUuidResponseBodyToJSON( + startApplicationByUuidResponseBody: StartApplicationByUuidResponseBody, +): string { + return JSON.stringify( + StartApplicationByUuidResponseBody$outboundSchema.parse( + startApplicationByUuidResponseBody, + ), + ); +} + +export function startApplicationByUuidResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + StartApplicationByUuidResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'StartApplicationByUuidResponseBody' from JSON`, + ); +} diff --git a/src/models/operations/startdatabasebyuuid.ts b/src/models/operations/startdatabasebyuuid.ts new file mode 100644 index 0000000..8d2115d --- /dev/null +++ b/src/models/operations/startdatabasebyuuid.ts @@ -0,0 +1,132 @@ +/* + * 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 StartDatabaseByUuidRequest = { + /** + * UUID of the database. + */ + uuid: string; +}; + +/** + * Start database. + */ +export type StartDatabaseByUuidResponseBody = { + message?: string | undefined; +}; + +/** @internal */ +export const StartDatabaseByUuidRequest$inboundSchema: z.ZodType< + StartDatabaseByUuidRequest, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string(), +}); + +/** @internal */ +export type StartDatabaseByUuidRequest$Outbound = { + uuid: string; +}; + +/** @internal */ +export const StartDatabaseByUuidRequest$outboundSchema: z.ZodType< + StartDatabaseByUuidRequest$Outbound, + z.ZodTypeDef, + StartDatabaseByUuidRequest +> = z.object({ + uuid: 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 StartDatabaseByUuidRequest$ { + /** @deprecated use `StartDatabaseByUuidRequest$inboundSchema` instead. */ + export const inboundSchema = StartDatabaseByUuidRequest$inboundSchema; + /** @deprecated use `StartDatabaseByUuidRequest$outboundSchema` instead. */ + export const outboundSchema = StartDatabaseByUuidRequest$outboundSchema; + /** @deprecated use `StartDatabaseByUuidRequest$Outbound` instead. */ + export type Outbound = StartDatabaseByUuidRequest$Outbound; +} + +export function startDatabaseByUuidRequestToJSON( + startDatabaseByUuidRequest: StartDatabaseByUuidRequest, +): string { + return JSON.stringify( + StartDatabaseByUuidRequest$outboundSchema.parse(startDatabaseByUuidRequest), + ); +} + +export function startDatabaseByUuidRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => StartDatabaseByUuidRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'StartDatabaseByUuidRequest' from JSON`, + ); +} + +/** @internal */ +export const StartDatabaseByUuidResponseBody$inboundSchema: z.ZodType< + StartDatabaseByUuidResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + message: z.string().optional(), +}); + +/** @internal */ +export type StartDatabaseByUuidResponseBody$Outbound = { + message?: string | undefined; +}; + +/** @internal */ +export const StartDatabaseByUuidResponseBody$outboundSchema: z.ZodType< + StartDatabaseByUuidResponseBody$Outbound, + z.ZodTypeDef, + StartDatabaseByUuidResponseBody +> = z.object({ + message: 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 StartDatabaseByUuidResponseBody$ { + /** @deprecated use `StartDatabaseByUuidResponseBody$inboundSchema` instead. */ + export const inboundSchema = StartDatabaseByUuidResponseBody$inboundSchema; + /** @deprecated use `StartDatabaseByUuidResponseBody$outboundSchema` instead. */ + export const outboundSchema = StartDatabaseByUuidResponseBody$outboundSchema; + /** @deprecated use `StartDatabaseByUuidResponseBody$Outbound` instead. */ + export type Outbound = StartDatabaseByUuidResponseBody$Outbound; +} + +export function startDatabaseByUuidResponseBodyToJSON( + startDatabaseByUuidResponseBody: StartDatabaseByUuidResponseBody, +): string { + return JSON.stringify( + StartDatabaseByUuidResponseBody$outboundSchema.parse( + startDatabaseByUuidResponseBody, + ), + ); +} + +export function startDatabaseByUuidResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => StartDatabaseByUuidResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'StartDatabaseByUuidResponseBody' from JSON`, + ); +} diff --git a/src/models/operations/startservicebyuuid.ts b/src/models/operations/startservicebyuuid.ts new file mode 100644 index 0000000..c19c85d --- /dev/null +++ b/src/models/operations/startservicebyuuid.ts @@ -0,0 +1,132 @@ +/* + * 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 StartServiceByUuidRequest = { + /** + * UUID of the service. + */ + uuid: string; +}; + +/** + * Start service. + */ +export type StartServiceByUuidResponseBody = { + message?: string | undefined; +}; + +/** @internal */ +export const StartServiceByUuidRequest$inboundSchema: z.ZodType< + StartServiceByUuidRequest, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string(), +}); + +/** @internal */ +export type StartServiceByUuidRequest$Outbound = { + uuid: string; +}; + +/** @internal */ +export const StartServiceByUuidRequest$outboundSchema: z.ZodType< + StartServiceByUuidRequest$Outbound, + z.ZodTypeDef, + StartServiceByUuidRequest +> = z.object({ + uuid: 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 StartServiceByUuidRequest$ { + /** @deprecated use `StartServiceByUuidRequest$inboundSchema` instead. */ + export const inboundSchema = StartServiceByUuidRequest$inboundSchema; + /** @deprecated use `StartServiceByUuidRequest$outboundSchema` instead. */ + export const outboundSchema = StartServiceByUuidRequest$outboundSchema; + /** @deprecated use `StartServiceByUuidRequest$Outbound` instead. */ + export type Outbound = StartServiceByUuidRequest$Outbound; +} + +export function startServiceByUuidRequestToJSON( + startServiceByUuidRequest: StartServiceByUuidRequest, +): string { + return JSON.stringify( + StartServiceByUuidRequest$outboundSchema.parse(startServiceByUuidRequest), + ); +} + +export function startServiceByUuidRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => StartServiceByUuidRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'StartServiceByUuidRequest' from JSON`, + ); +} + +/** @internal */ +export const StartServiceByUuidResponseBody$inboundSchema: z.ZodType< + StartServiceByUuidResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + message: z.string().optional(), +}); + +/** @internal */ +export type StartServiceByUuidResponseBody$Outbound = { + message?: string | undefined; +}; + +/** @internal */ +export const StartServiceByUuidResponseBody$outboundSchema: z.ZodType< + StartServiceByUuidResponseBody$Outbound, + z.ZodTypeDef, + StartServiceByUuidResponseBody +> = z.object({ + message: 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 StartServiceByUuidResponseBody$ { + /** @deprecated use `StartServiceByUuidResponseBody$inboundSchema` instead. */ + export const inboundSchema = StartServiceByUuidResponseBody$inboundSchema; + /** @deprecated use `StartServiceByUuidResponseBody$outboundSchema` instead. */ + export const outboundSchema = StartServiceByUuidResponseBody$outboundSchema; + /** @deprecated use `StartServiceByUuidResponseBody$Outbound` instead. */ + export type Outbound = StartServiceByUuidResponseBody$Outbound; +} + +export function startServiceByUuidResponseBodyToJSON( + startServiceByUuidResponseBody: StartServiceByUuidResponseBody, +): string { + return JSON.stringify( + StartServiceByUuidResponseBody$outboundSchema.parse( + startServiceByUuidResponseBody, + ), + ); +} + +export function startServiceByUuidResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => StartServiceByUuidResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'StartServiceByUuidResponseBody' from JSON`, + ); +} diff --git a/src/models/operations/stopapplicationbyuuid.ts b/src/models/operations/stopapplicationbyuuid.ts new file mode 100644 index 0000000..18de490 --- /dev/null +++ b/src/models/operations/stopapplicationbyuuid.ts @@ -0,0 +1,135 @@ +/* + * 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 StopApplicationByUuidRequest = { + /** + * UUID of the application. + */ + uuid: string; +}; + +/** + * Stop application. + */ +export type StopApplicationByUuidResponseBody = { + message?: string | undefined; +}; + +/** @internal */ +export const StopApplicationByUuidRequest$inboundSchema: z.ZodType< + StopApplicationByUuidRequest, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string(), +}); + +/** @internal */ +export type StopApplicationByUuidRequest$Outbound = { + uuid: string; +}; + +/** @internal */ +export const StopApplicationByUuidRequest$outboundSchema: z.ZodType< + StopApplicationByUuidRequest$Outbound, + z.ZodTypeDef, + StopApplicationByUuidRequest +> = z.object({ + uuid: 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 StopApplicationByUuidRequest$ { + /** @deprecated use `StopApplicationByUuidRequest$inboundSchema` instead. */ + export const inboundSchema = StopApplicationByUuidRequest$inboundSchema; + /** @deprecated use `StopApplicationByUuidRequest$outboundSchema` instead. */ + export const outboundSchema = StopApplicationByUuidRequest$outboundSchema; + /** @deprecated use `StopApplicationByUuidRequest$Outbound` instead. */ + export type Outbound = StopApplicationByUuidRequest$Outbound; +} + +export function stopApplicationByUuidRequestToJSON( + stopApplicationByUuidRequest: StopApplicationByUuidRequest, +): string { + return JSON.stringify( + StopApplicationByUuidRequest$outboundSchema.parse( + stopApplicationByUuidRequest, + ), + ); +} + +export function stopApplicationByUuidRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => StopApplicationByUuidRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'StopApplicationByUuidRequest' from JSON`, + ); +} + +/** @internal */ +export const StopApplicationByUuidResponseBody$inboundSchema: z.ZodType< + StopApplicationByUuidResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + message: z.string().optional(), +}); + +/** @internal */ +export type StopApplicationByUuidResponseBody$Outbound = { + message?: string | undefined; +}; + +/** @internal */ +export const StopApplicationByUuidResponseBody$outboundSchema: z.ZodType< + StopApplicationByUuidResponseBody$Outbound, + z.ZodTypeDef, + StopApplicationByUuidResponseBody +> = z.object({ + message: 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 StopApplicationByUuidResponseBody$ { + /** @deprecated use `StopApplicationByUuidResponseBody$inboundSchema` instead. */ + export const inboundSchema = StopApplicationByUuidResponseBody$inboundSchema; + /** @deprecated use `StopApplicationByUuidResponseBody$outboundSchema` instead. */ + export const outboundSchema = + StopApplicationByUuidResponseBody$outboundSchema; + /** @deprecated use `StopApplicationByUuidResponseBody$Outbound` instead. */ + export type Outbound = StopApplicationByUuidResponseBody$Outbound; +} + +export function stopApplicationByUuidResponseBodyToJSON( + stopApplicationByUuidResponseBody: StopApplicationByUuidResponseBody, +): string { + return JSON.stringify( + StopApplicationByUuidResponseBody$outboundSchema.parse( + stopApplicationByUuidResponseBody, + ), + ); +} + +export function stopApplicationByUuidResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => StopApplicationByUuidResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'StopApplicationByUuidResponseBody' from JSON`, + ); +} diff --git a/src/models/operations/stopdatabasebyuuid.ts b/src/models/operations/stopdatabasebyuuid.ts new file mode 100644 index 0000000..6352fd5 --- /dev/null +++ b/src/models/operations/stopdatabasebyuuid.ts @@ -0,0 +1,132 @@ +/* + * 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 StopDatabaseByUuidRequest = { + /** + * UUID of the database. + */ + uuid: string; +}; + +/** + * Stop database. + */ +export type StopDatabaseByUuidResponseBody = { + message?: string | undefined; +}; + +/** @internal */ +export const StopDatabaseByUuidRequest$inboundSchema: z.ZodType< + StopDatabaseByUuidRequest, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string(), +}); + +/** @internal */ +export type StopDatabaseByUuidRequest$Outbound = { + uuid: string; +}; + +/** @internal */ +export const StopDatabaseByUuidRequest$outboundSchema: z.ZodType< + StopDatabaseByUuidRequest$Outbound, + z.ZodTypeDef, + StopDatabaseByUuidRequest +> = z.object({ + uuid: 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 StopDatabaseByUuidRequest$ { + /** @deprecated use `StopDatabaseByUuidRequest$inboundSchema` instead. */ + export const inboundSchema = StopDatabaseByUuidRequest$inboundSchema; + /** @deprecated use `StopDatabaseByUuidRequest$outboundSchema` instead. */ + export const outboundSchema = StopDatabaseByUuidRequest$outboundSchema; + /** @deprecated use `StopDatabaseByUuidRequest$Outbound` instead. */ + export type Outbound = StopDatabaseByUuidRequest$Outbound; +} + +export function stopDatabaseByUuidRequestToJSON( + stopDatabaseByUuidRequest: StopDatabaseByUuidRequest, +): string { + return JSON.stringify( + StopDatabaseByUuidRequest$outboundSchema.parse(stopDatabaseByUuidRequest), + ); +} + +export function stopDatabaseByUuidRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => StopDatabaseByUuidRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'StopDatabaseByUuidRequest' from JSON`, + ); +} + +/** @internal */ +export const StopDatabaseByUuidResponseBody$inboundSchema: z.ZodType< + StopDatabaseByUuidResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + message: z.string().optional(), +}); + +/** @internal */ +export type StopDatabaseByUuidResponseBody$Outbound = { + message?: string | undefined; +}; + +/** @internal */ +export const StopDatabaseByUuidResponseBody$outboundSchema: z.ZodType< + StopDatabaseByUuidResponseBody$Outbound, + z.ZodTypeDef, + StopDatabaseByUuidResponseBody +> = z.object({ + message: 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 StopDatabaseByUuidResponseBody$ { + /** @deprecated use `StopDatabaseByUuidResponseBody$inboundSchema` instead. */ + export const inboundSchema = StopDatabaseByUuidResponseBody$inboundSchema; + /** @deprecated use `StopDatabaseByUuidResponseBody$outboundSchema` instead. */ + export const outboundSchema = StopDatabaseByUuidResponseBody$outboundSchema; + /** @deprecated use `StopDatabaseByUuidResponseBody$Outbound` instead. */ + export type Outbound = StopDatabaseByUuidResponseBody$Outbound; +} + +export function stopDatabaseByUuidResponseBodyToJSON( + stopDatabaseByUuidResponseBody: StopDatabaseByUuidResponseBody, +): string { + return JSON.stringify( + StopDatabaseByUuidResponseBody$outboundSchema.parse( + stopDatabaseByUuidResponseBody, + ), + ); +} + +export function stopDatabaseByUuidResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => StopDatabaseByUuidResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'StopDatabaseByUuidResponseBody' from JSON`, + ); +} diff --git a/src/models/operations/stopservicebyuuid.ts b/src/models/operations/stopservicebyuuid.ts new file mode 100644 index 0000000..c2ecf8f --- /dev/null +++ b/src/models/operations/stopservicebyuuid.ts @@ -0,0 +1,132 @@ +/* + * 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 StopServiceByUuidRequest = { + /** + * UUID of the service. + */ + uuid: string; +}; + +/** + * Stop service. + */ +export type StopServiceByUuidResponseBody = { + message?: string | undefined; +}; + +/** @internal */ +export const StopServiceByUuidRequest$inboundSchema: z.ZodType< + StopServiceByUuidRequest, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string(), +}); + +/** @internal */ +export type StopServiceByUuidRequest$Outbound = { + uuid: string; +}; + +/** @internal */ +export const StopServiceByUuidRequest$outboundSchema: z.ZodType< + StopServiceByUuidRequest$Outbound, + z.ZodTypeDef, + StopServiceByUuidRequest +> = z.object({ + uuid: 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 StopServiceByUuidRequest$ { + /** @deprecated use `StopServiceByUuidRequest$inboundSchema` instead. */ + export const inboundSchema = StopServiceByUuidRequest$inboundSchema; + /** @deprecated use `StopServiceByUuidRequest$outboundSchema` instead. */ + export const outboundSchema = StopServiceByUuidRequest$outboundSchema; + /** @deprecated use `StopServiceByUuidRequest$Outbound` instead. */ + export type Outbound = StopServiceByUuidRequest$Outbound; +} + +export function stopServiceByUuidRequestToJSON( + stopServiceByUuidRequest: StopServiceByUuidRequest, +): string { + return JSON.stringify( + StopServiceByUuidRequest$outboundSchema.parse(stopServiceByUuidRequest), + ); +} + +export function stopServiceByUuidRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => StopServiceByUuidRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'StopServiceByUuidRequest' from JSON`, + ); +} + +/** @internal */ +export const StopServiceByUuidResponseBody$inboundSchema: z.ZodType< + StopServiceByUuidResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + message: z.string().optional(), +}); + +/** @internal */ +export type StopServiceByUuidResponseBody$Outbound = { + message?: string | undefined; +}; + +/** @internal */ +export const StopServiceByUuidResponseBody$outboundSchema: z.ZodType< + StopServiceByUuidResponseBody$Outbound, + z.ZodTypeDef, + StopServiceByUuidResponseBody +> = z.object({ + message: 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 StopServiceByUuidResponseBody$ { + /** @deprecated use `StopServiceByUuidResponseBody$inboundSchema` instead. */ + export const inboundSchema = StopServiceByUuidResponseBody$inboundSchema; + /** @deprecated use `StopServiceByUuidResponseBody$outboundSchema` instead. */ + export const outboundSchema = StopServiceByUuidResponseBody$outboundSchema; + /** @deprecated use `StopServiceByUuidResponseBody$Outbound` instead. */ + export type Outbound = StopServiceByUuidResponseBody$Outbound; +} + +export function stopServiceByUuidResponseBodyToJSON( + stopServiceByUuidResponseBody: StopServiceByUuidResponseBody, +): string { + return JSON.stringify( + StopServiceByUuidResponseBody$outboundSchema.parse( + stopServiceByUuidResponseBody, + ), + ); +} + +export function stopServiceByUuidResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => StopServiceByUuidResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'StopServiceByUuidResponseBody' from JSON`, + ); +} diff --git a/src/models/operations/updateapplicationbyuuid.ts b/src/models/operations/updateapplicationbyuuid.ts new file mode 100644 index 0000000..85bd414 --- /dev/null +++ b/src/models/operations/updateapplicationbyuuid.ts @@ -0,0 +1,835 @@ +/* + * 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"; + +/** + * The build pack type. + */ +export const UpdateApplicationByUuidBuildPack = { + Nixpacks: "nixpacks", + Static: "static", + Dockerfile: "dockerfile", + Dockercompose: "dockercompose", +} as const; +/** + * The build pack type. + */ +export type UpdateApplicationByUuidBuildPack = ClosedEnum< + typeof UpdateApplicationByUuidBuildPack +>; + +/** + * How to set redirect with Traefik / Caddy. www<->non-www. + */ +export const UpdateApplicationByUuidRedirect = { + Www: "www", + NonWww: "non-www", + Both: "both", +} as const; +/** + * How to set redirect with Traefik / Caddy. www<->non-www. + */ +export type UpdateApplicationByUuidRedirect = ClosedEnum< + typeof UpdateApplicationByUuidRedirect +>; + +/** + * Application updated. + */ +export type UpdateApplicationByUuidRequestBody = { + /** + * The project UUID. + */ + projectUuid?: string | undefined; + /** + * The server UUID. + */ + serverUuid?: string | undefined; + /** + * The environment name. + */ + environmentName?: string | undefined; + /** + * The Github App UUID. + */ + githubAppUuid?: string | undefined; + /** + * The git repository URL. + */ + gitRepository?: string | undefined; + /** + * The git branch. + */ + gitBranch?: string | undefined; + /** + * The ports to expose. + */ + portsExposes?: string | undefined; + /** + * The destination UUID. + */ + destinationUuid?: string | undefined; + /** + * The build pack type. + */ + buildPack?: UpdateApplicationByUuidBuildPack | undefined; + /** + * The application name. + */ + name?: string | undefined; + /** + * The application description. + */ + description?: string | undefined; + /** + * The application domains. + */ + domains?: string | undefined; + /** + * The git commit SHA. + */ + gitCommitSha?: string | undefined; + /** + * The docker registry image name. + */ + dockerRegistryImageName?: string | undefined; + /** + * The docker registry image tag. + */ + dockerRegistryImageTag?: string | undefined; + /** + * The flag to indicate if the application is static. + */ + isStatic?: boolean | undefined; + /** + * The install command. + */ + installCommand?: string | undefined; + /** + * The build command. + */ + buildCommand?: string | undefined; + /** + * The start command. + */ + startCommand?: string | undefined; + /** + * The ports mappings. + */ + portsMappings?: string | undefined; + /** + * The base directory for all commands. + */ + baseDirectory?: string | undefined; + /** + * The publish directory. + */ + publishDirectory?: string | undefined; + /** + * Health check enabled. + */ + healthCheckEnabled?: boolean | undefined; + /** + * Health check path. + */ + healthCheckPath?: string | undefined; + /** + * Health check port. + */ + healthCheckPort?: string | null | undefined; + /** + * Health check host. + */ + healthCheckHost?: string | null | undefined; + /** + * Health check method. + */ + healthCheckMethod?: string | undefined; + /** + * Health check return code. + */ + healthCheckReturnCode?: number | undefined; + /** + * Health check scheme. + */ + healthCheckScheme?: string | undefined; + /** + * Health check response text. + */ + healthCheckResponseText?: string | null | undefined; + /** + * Health check interval in seconds. + */ + healthCheckInterval?: number | undefined; + /** + * Health check timeout in seconds. + */ + healthCheckTimeout?: number | undefined; + /** + * Health check retries count. + */ + healthCheckRetries?: number | undefined; + /** + * Health check start period in seconds. + */ + healthCheckStartPeriod?: number | undefined; + /** + * Memory limit. + */ + limitsMemory?: string | undefined; + /** + * Memory swap limit. + */ + limitsMemorySwap?: string | undefined; + /** + * Memory swappiness. + */ + limitsMemorySwappiness?: number | undefined; + /** + * Memory reservation. + */ + limitsMemoryReservation?: string | undefined; + /** + * CPU limit. + */ + limitsCpus?: string | undefined; + /** + * CPU set. + */ + limitsCpuset?: string | null | undefined; + /** + * CPU shares. + */ + limitsCpuShares?: number | undefined; + /** + * Custom labels. + */ + customLabels?: string | undefined; + /** + * Custom docker run options. + */ + customDockerRunOptions?: string | undefined; + /** + * Post deployment command. + */ + postDeploymentCommand?: string | undefined; + /** + * Post deployment command container. + */ + postDeploymentCommandContainer?: string | undefined; + /** + * Pre deployment command. + */ + preDeploymentCommand?: string | undefined; + /** + * Pre deployment command container. + */ + preDeploymentCommandContainer?: string | undefined; + /** + * Manual webhook secret for Github. + */ + manualWebhookSecretGithub?: string | undefined; + /** + * Manual webhook secret for Gitlab. + */ + manualWebhookSecretGitlab?: string | undefined; + /** + * Manual webhook secret for Bitbucket. + */ + manualWebhookSecretBitbucket?: string | undefined; + /** + * Manual webhook secret for Gitea. + */ + manualWebhookSecretGitea?: string | undefined; + /** + * How to set redirect with Traefik / Caddy. www<->non-www. + */ + redirect?: UpdateApplicationByUuidRedirect | null | undefined; + /** + * The flag to indicate if the application should be deployed instantly. + */ + instantDeploy?: boolean | undefined; + /** + * The Dockerfile content. + */ + dockerfile?: string | undefined; + /** + * The Docker Compose location. + */ + dockerComposeLocation?: string | undefined; + /** + * The Docker Compose raw content. + */ + dockerComposeRaw?: string | undefined; + /** + * The Docker Compose custom start command. + */ + dockerComposeCustomStartCommand?: string | undefined; + /** + * The Docker Compose custom build command. + */ + dockerComposeCustomBuildCommand?: string | undefined; + /** + * The Docker Compose domains. + */ + dockerComposeDomains?: Array | undefined; + /** + * The watch paths. + */ + watchPaths?: string | undefined; + /** + * Use build server. + */ + useBuildServer?: boolean | null | undefined; +}; + +export type UpdateApplicationByUuidRequest = { + /** + * UUID of the application. + */ + uuid: string; + /** + * Application updated. + */ + requestBody: UpdateApplicationByUuidRequestBody; +}; + +/** + * Application updated. + */ +export type UpdateApplicationByUuidResponseBody = { + uuid?: string | undefined; +}; + +/** @internal */ +export const UpdateApplicationByUuidBuildPack$inboundSchema: z.ZodNativeEnum< + typeof UpdateApplicationByUuidBuildPack +> = z.nativeEnum(UpdateApplicationByUuidBuildPack); + +/** @internal */ +export const UpdateApplicationByUuidBuildPack$outboundSchema: z.ZodNativeEnum< + typeof UpdateApplicationByUuidBuildPack +> = UpdateApplicationByUuidBuildPack$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateApplicationByUuidBuildPack$ { + /** @deprecated use `UpdateApplicationByUuidBuildPack$inboundSchema` instead. */ + export const inboundSchema = UpdateApplicationByUuidBuildPack$inboundSchema; + /** @deprecated use `UpdateApplicationByUuidBuildPack$outboundSchema` instead. */ + export const outboundSchema = UpdateApplicationByUuidBuildPack$outboundSchema; +} + +/** @internal */ +export const UpdateApplicationByUuidRedirect$inboundSchema: z.ZodNativeEnum< + typeof UpdateApplicationByUuidRedirect +> = z.nativeEnum(UpdateApplicationByUuidRedirect); + +/** @internal */ +export const UpdateApplicationByUuidRedirect$outboundSchema: z.ZodNativeEnum< + typeof UpdateApplicationByUuidRedirect +> = UpdateApplicationByUuidRedirect$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateApplicationByUuidRedirect$ { + /** @deprecated use `UpdateApplicationByUuidRedirect$inboundSchema` instead. */ + export const inboundSchema = UpdateApplicationByUuidRedirect$inboundSchema; + /** @deprecated use `UpdateApplicationByUuidRedirect$outboundSchema` instead. */ + export const outboundSchema = UpdateApplicationByUuidRedirect$outboundSchema; +} + +/** @internal */ +export const UpdateApplicationByUuidRequestBody$inboundSchema: z.ZodType< + UpdateApplicationByUuidRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + project_uuid: z.string().optional(), + server_uuid: z.string().optional(), + environment_name: z.string().optional(), + github_app_uuid: z.string().optional(), + git_repository: z.string().optional(), + git_branch: z.string().optional(), + ports_exposes: z.string().optional(), + destination_uuid: z.string().optional(), + build_pack: UpdateApplicationByUuidBuildPack$inboundSchema.optional(), + name: z.string().optional(), + description: z.string().optional(), + domains: z.string().optional(), + git_commit_sha: z.string().optional(), + docker_registry_image_name: z.string().optional(), + docker_registry_image_tag: z.string().optional(), + is_static: z.boolean().optional(), + install_command: z.string().optional(), + build_command: z.string().optional(), + start_command: z.string().optional(), + ports_mappings: z.string().optional(), + base_directory: z.string().optional(), + publish_directory: z.string().optional(), + health_check_enabled: z.boolean().optional(), + health_check_path: z.string().optional(), + health_check_port: z.nullable(z.string()).optional(), + health_check_host: z.nullable(z.string()).optional(), + health_check_method: z.string().optional(), + health_check_return_code: z.number().int().optional(), + health_check_scheme: z.string().optional(), + health_check_response_text: z.nullable(z.string()).optional(), + health_check_interval: z.number().int().optional(), + health_check_timeout: z.number().int().optional(), + health_check_retries: z.number().int().optional(), + health_check_start_period: z.number().int().optional(), + limits_memory: z.string().optional(), + limits_memory_swap: z.string().optional(), + limits_memory_swappiness: z.number().int().optional(), + limits_memory_reservation: z.string().optional(), + limits_cpus: z.string().optional(), + limits_cpuset: z.nullable(z.string()).optional(), + limits_cpu_shares: z.number().int().optional(), + custom_labels: z.string().optional(), + custom_docker_run_options: z.string().optional(), + post_deployment_command: z.string().optional(), + post_deployment_command_container: z.string().optional(), + pre_deployment_command: z.string().optional(), + pre_deployment_command_container: z.string().optional(), + manual_webhook_secret_github: z.string().optional(), + manual_webhook_secret_gitlab: z.string().optional(), + manual_webhook_secret_bitbucket: z.string().optional(), + manual_webhook_secret_gitea: z.string().optional(), + redirect: z.nullable(UpdateApplicationByUuidRedirect$inboundSchema) + .optional(), + instant_deploy: z.boolean().optional(), + dockerfile: z.string().optional(), + docker_compose_location: z.string().optional(), + docker_compose_raw: z.string().optional(), + docker_compose_custom_start_command: z.string().optional(), + docker_compose_custom_build_command: z.string().optional(), + docker_compose_domains: z.array(z.any()).optional(), + watch_paths: z.string().optional(), + use_build_server: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + "project_uuid": "projectUuid", + "server_uuid": "serverUuid", + "environment_name": "environmentName", + "github_app_uuid": "githubAppUuid", + "git_repository": "gitRepository", + "git_branch": "gitBranch", + "ports_exposes": "portsExposes", + "destination_uuid": "destinationUuid", + "build_pack": "buildPack", + "git_commit_sha": "gitCommitSha", + "docker_registry_image_name": "dockerRegistryImageName", + "docker_registry_image_tag": "dockerRegistryImageTag", + "is_static": "isStatic", + "install_command": "installCommand", + "build_command": "buildCommand", + "start_command": "startCommand", + "ports_mappings": "portsMappings", + "base_directory": "baseDirectory", + "publish_directory": "publishDirectory", + "health_check_enabled": "healthCheckEnabled", + "health_check_path": "healthCheckPath", + "health_check_port": "healthCheckPort", + "health_check_host": "healthCheckHost", + "health_check_method": "healthCheckMethod", + "health_check_return_code": "healthCheckReturnCode", + "health_check_scheme": "healthCheckScheme", + "health_check_response_text": "healthCheckResponseText", + "health_check_interval": "healthCheckInterval", + "health_check_timeout": "healthCheckTimeout", + "health_check_retries": "healthCheckRetries", + "health_check_start_period": "healthCheckStartPeriod", + "limits_memory": "limitsMemory", + "limits_memory_swap": "limitsMemorySwap", + "limits_memory_swappiness": "limitsMemorySwappiness", + "limits_memory_reservation": "limitsMemoryReservation", + "limits_cpus": "limitsCpus", + "limits_cpuset": "limitsCpuset", + "limits_cpu_shares": "limitsCpuShares", + "custom_labels": "customLabels", + "custom_docker_run_options": "customDockerRunOptions", + "post_deployment_command": "postDeploymentCommand", + "post_deployment_command_container": "postDeploymentCommandContainer", + "pre_deployment_command": "preDeploymentCommand", + "pre_deployment_command_container": "preDeploymentCommandContainer", + "manual_webhook_secret_github": "manualWebhookSecretGithub", + "manual_webhook_secret_gitlab": "manualWebhookSecretGitlab", + "manual_webhook_secret_bitbucket": "manualWebhookSecretBitbucket", + "manual_webhook_secret_gitea": "manualWebhookSecretGitea", + "instant_deploy": "instantDeploy", + "docker_compose_location": "dockerComposeLocation", + "docker_compose_raw": "dockerComposeRaw", + "docker_compose_custom_start_command": "dockerComposeCustomStartCommand", + "docker_compose_custom_build_command": "dockerComposeCustomBuildCommand", + "docker_compose_domains": "dockerComposeDomains", + "watch_paths": "watchPaths", + "use_build_server": "useBuildServer", + }); +}); + +/** @internal */ +export type UpdateApplicationByUuidRequestBody$Outbound = { + project_uuid?: string | undefined; + server_uuid?: string | undefined; + environment_name?: string | undefined; + github_app_uuid?: string | undefined; + git_repository?: string | undefined; + git_branch?: string | undefined; + ports_exposes?: string | undefined; + destination_uuid?: string | undefined; + build_pack?: string | undefined; + name?: string | undefined; + description?: string | undefined; + domains?: string | undefined; + git_commit_sha?: string | undefined; + docker_registry_image_name?: string | undefined; + docker_registry_image_tag?: string | undefined; + is_static?: boolean | undefined; + install_command?: string | undefined; + build_command?: string | undefined; + start_command?: string | undefined; + ports_mappings?: string | undefined; + base_directory?: string | undefined; + publish_directory?: string | undefined; + health_check_enabled?: boolean | undefined; + health_check_path?: string | undefined; + health_check_port?: string | null | undefined; + health_check_host?: string | null | undefined; + health_check_method?: string | undefined; + health_check_return_code?: number | undefined; + health_check_scheme?: string | undefined; + health_check_response_text?: string | null | undefined; + health_check_interval?: number | undefined; + health_check_timeout?: number | undefined; + health_check_retries?: number | undefined; + health_check_start_period?: number | undefined; + limits_memory?: string | undefined; + limits_memory_swap?: string | undefined; + limits_memory_swappiness?: number | undefined; + limits_memory_reservation?: string | undefined; + limits_cpus?: string | undefined; + limits_cpuset?: string | null | undefined; + limits_cpu_shares?: number | undefined; + custom_labels?: string | undefined; + custom_docker_run_options?: string | undefined; + post_deployment_command?: string | undefined; + post_deployment_command_container?: string | undefined; + pre_deployment_command?: string | undefined; + pre_deployment_command_container?: string | undefined; + manual_webhook_secret_github?: string | undefined; + manual_webhook_secret_gitlab?: string | undefined; + manual_webhook_secret_bitbucket?: string | undefined; + manual_webhook_secret_gitea?: string | undefined; + redirect?: string | null | undefined; + instant_deploy?: boolean | undefined; + dockerfile?: string | undefined; + docker_compose_location?: string | undefined; + docker_compose_raw?: string | undefined; + docker_compose_custom_start_command?: string | undefined; + docker_compose_custom_build_command?: string | undefined; + docker_compose_domains?: Array | undefined; + watch_paths?: string | undefined; + use_build_server?: boolean | null | undefined; +}; + +/** @internal */ +export const UpdateApplicationByUuidRequestBody$outboundSchema: z.ZodType< + UpdateApplicationByUuidRequestBody$Outbound, + z.ZodTypeDef, + UpdateApplicationByUuidRequestBody +> = z.object({ + projectUuid: z.string().optional(), + serverUuid: z.string().optional(), + environmentName: z.string().optional(), + githubAppUuid: z.string().optional(), + gitRepository: z.string().optional(), + gitBranch: z.string().optional(), + portsExposes: z.string().optional(), + destinationUuid: z.string().optional(), + buildPack: UpdateApplicationByUuidBuildPack$outboundSchema.optional(), + name: z.string().optional(), + description: z.string().optional(), + domains: z.string().optional(), + gitCommitSha: z.string().optional(), + dockerRegistryImageName: z.string().optional(), + dockerRegistryImageTag: z.string().optional(), + isStatic: z.boolean().optional(), + installCommand: z.string().optional(), + buildCommand: z.string().optional(), + startCommand: z.string().optional(), + portsMappings: z.string().optional(), + baseDirectory: z.string().optional(), + publishDirectory: z.string().optional(), + healthCheckEnabled: z.boolean().optional(), + healthCheckPath: z.string().optional(), + healthCheckPort: z.nullable(z.string()).optional(), + healthCheckHost: z.nullable(z.string()).optional(), + healthCheckMethod: z.string().optional(), + healthCheckReturnCode: z.number().int().optional(), + healthCheckScheme: z.string().optional(), + healthCheckResponseText: z.nullable(z.string()).optional(), + healthCheckInterval: z.number().int().optional(), + healthCheckTimeout: z.number().int().optional(), + healthCheckRetries: z.number().int().optional(), + healthCheckStartPeriod: z.number().int().optional(), + limitsMemory: z.string().optional(), + limitsMemorySwap: z.string().optional(), + limitsMemorySwappiness: z.number().int().optional(), + limitsMemoryReservation: z.string().optional(), + limitsCpus: z.string().optional(), + limitsCpuset: z.nullable(z.string()).optional(), + limitsCpuShares: z.number().int().optional(), + customLabels: z.string().optional(), + customDockerRunOptions: z.string().optional(), + postDeploymentCommand: z.string().optional(), + postDeploymentCommandContainer: z.string().optional(), + preDeploymentCommand: z.string().optional(), + preDeploymentCommandContainer: z.string().optional(), + manualWebhookSecretGithub: z.string().optional(), + manualWebhookSecretGitlab: z.string().optional(), + manualWebhookSecretBitbucket: z.string().optional(), + manualWebhookSecretGitea: z.string().optional(), + redirect: z.nullable(UpdateApplicationByUuidRedirect$outboundSchema) + .optional(), + instantDeploy: z.boolean().optional(), + dockerfile: z.string().optional(), + dockerComposeLocation: z.string().optional(), + dockerComposeRaw: z.string().optional(), + dockerComposeCustomStartCommand: z.string().optional(), + dockerComposeCustomBuildCommand: z.string().optional(), + dockerComposeDomains: z.array(z.any()).optional(), + watchPaths: z.string().optional(), + useBuildServer: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + projectUuid: "project_uuid", + serverUuid: "server_uuid", + environmentName: "environment_name", + githubAppUuid: "github_app_uuid", + gitRepository: "git_repository", + gitBranch: "git_branch", + portsExposes: "ports_exposes", + destinationUuid: "destination_uuid", + buildPack: "build_pack", + gitCommitSha: "git_commit_sha", + dockerRegistryImageName: "docker_registry_image_name", + dockerRegistryImageTag: "docker_registry_image_tag", + isStatic: "is_static", + installCommand: "install_command", + buildCommand: "build_command", + startCommand: "start_command", + portsMappings: "ports_mappings", + baseDirectory: "base_directory", + publishDirectory: "publish_directory", + healthCheckEnabled: "health_check_enabled", + healthCheckPath: "health_check_path", + healthCheckPort: "health_check_port", + healthCheckHost: "health_check_host", + healthCheckMethod: "health_check_method", + healthCheckReturnCode: "health_check_return_code", + healthCheckScheme: "health_check_scheme", + healthCheckResponseText: "health_check_response_text", + healthCheckInterval: "health_check_interval", + healthCheckTimeout: "health_check_timeout", + healthCheckRetries: "health_check_retries", + healthCheckStartPeriod: "health_check_start_period", + limitsMemory: "limits_memory", + limitsMemorySwap: "limits_memory_swap", + limitsMemorySwappiness: "limits_memory_swappiness", + limitsMemoryReservation: "limits_memory_reservation", + limitsCpus: "limits_cpus", + limitsCpuset: "limits_cpuset", + limitsCpuShares: "limits_cpu_shares", + customLabels: "custom_labels", + customDockerRunOptions: "custom_docker_run_options", + postDeploymentCommand: "post_deployment_command", + postDeploymentCommandContainer: "post_deployment_command_container", + preDeploymentCommand: "pre_deployment_command", + preDeploymentCommandContainer: "pre_deployment_command_container", + manualWebhookSecretGithub: "manual_webhook_secret_github", + manualWebhookSecretGitlab: "manual_webhook_secret_gitlab", + manualWebhookSecretBitbucket: "manual_webhook_secret_bitbucket", + manualWebhookSecretGitea: "manual_webhook_secret_gitea", + instantDeploy: "instant_deploy", + dockerComposeLocation: "docker_compose_location", + dockerComposeRaw: "docker_compose_raw", + dockerComposeCustomStartCommand: "docker_compose_custom_start_command", + dockerComposeCustomBuildCommand: "docker_compose_custom_build_command", + dockerComposeDomains: "docker_compose_domains", + watchPaths: "watch_paths", + useBuildServer: "use_build_server", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateApplicationByUuidRequestBody$ { + /** @deprecated use `UpdateApplicationByUuidRequestBody$inboundSchema` instead. */ + export const inboundSchema = UpdateApplicationByUuidRequestBody$inboundSchema; + /** @deprecated use `UpdateApplicationByUuidRequestBody$outboundSchema` instead. */ + export const outboundSchema = + UpdateApplicationByUuidRequestBody$outboundSchema; + /** @deprecated use `UpdateApplicationByUuidRequestBody$Outbound` instead. */ + export type Outbound = UpdateApplicationByUuidRequestBody$Outbound; +} + +export function updateApplicationByUuidRequestBodyToJSON( + updateApplicationByUuidRequestBody: UpdateApplicationByUuidRequestBody, +): string { + return JSON.stringify( + UpdateApplicationByUuidRequestBody$outboundSchema.parse( + updateApplicationByUuidRequestBody, + ), + ); +} + +export function updateApplicationByUuidRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + UpdateApplicationByUuidRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateApplicationByUuidRequestBody' from JSON`, + ); +} + +/** @internal */ +export const UpdateApplicationByUuidRequest$inboundSchema: z.ZodType< + UpdateApplicationByUuidRequest, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string(), + RequestBody: z.lazy(() => UpdateApplicationByUuidRequestBody$inboundSchema), +}).transform((v) => { + return remap$(v, { + "RequestBody": "requestBody", + }); +}); + +/** @internal */ +export type UpdateApplicationByUuidRequest$Outbound = { + uuid: string; + RequestBody: UpdateApplicationByUuidRequestBody$Outbound; +}; + +/** @internal */ +export const UpdateApplicationByUuidRequest$outboundSchema: z.ZodType< + UpdateApplicationByUuidRequest$Outbound, + z.ZodTypeDef, + UpdateApplicationByUuidRequest +> = z.object({ + uuid: z.string(), + requestBody: z.lazy(() => UpdateApplicationByUuidRequestBody$outboundSchema), +}).transform((v) => { + return remap$(v, { + requestBody: "RequestBody", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateApplicationByUuidRequest$ { + /** @deprecated use `UpdateApplicationByUuidRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateApplicationByUuidRequest$inboundSchema; + /** @deprecated use `UpdateApplicationByUuidRequest$outboundSchema` instead. */ + export const outboundSchema = UpdateApplicationByUuidRequest$outboundSchema; + /** @deprecated use `UpdateApplicationByUuidRequest$Outbound` instead. */ + export type Outbound = UpdateApplicationByUuidRequest$Outbound; +} + +export function updateApplicationByUuidRequestToJSON( + updateApplicationByUuidRequest: UpdateApplicationByUuidRequest, +): string { + return JSON.stringify( + UpdateApplicationByUuidRequest$outboundSchema.parse( + updateApplicationByUuidRequest, + ), + ); +} + +export function updateApplicationByUuidRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateApplicationByUuidRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateApplicationByUuidRequest' from JSON`, + ); +} + +/** @internal */ +export const UpdateApplicationByUuidResponseBody$inboundSchema: z.ZodType< + UpdateApplicationByUuidResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string().optional(), +}); + +/** @internal */ +export type UpdateApplicationByUuidResponseBody$Outbound = { + uuid?: string | undefined; +}; + +/** @internal */ +export const UpdateApplicationByUuidResponseBody$outboundSchema: z.ZodType< + UpdateApplicationByUuidResponseBody$Outbound, + z.ZodTypeDef, + UpdateApplicationByUuidResponseBody +> = z.object({ + uuid: 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 UpdateApplicationByUuidResponseBody$ { + /** @deprecated use `UpdateApplicationByUuidResponseBody$inboundSchema` instead. */ + export const inboundSchema = + UpdateApplicationByUuidResponseBody$inboundSchema; + /** @deprecated use `UpdateApplicationByUuidResponseBody$outboundSchema` instead. */ + export const outboundSchema = + UpdateApplicationByUuidResponseBody$outboundSchema; + /** @deprecated use `UpdateApplicationByUuidResponseBody$Outbound` instead. */ + export type Outbound = UpdateApplicationByUuidResponseBody$Outbound; +} + +export function updateApplicationByUuidResponseBodyToJSON( + updateApplicationByUuidResponseBody: UpdateApplicationByUuidResponseBody, +): string { + return JSON.stringify( + UpdateApplicationByUuidResponseBody$outboundSchema.parse( + updateApplicationByUuidResponseBody, + ), + ); +} + +export function updateApplicationByUuidResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + UpdateApplicationByUuidResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateApplicationByUuidResponseBody' from JSON`, + ); +} diff --git a/src/models/operations/updatedatabasebyuuid.ts b/src/models/operations/updatedatabasebyuuid.ts new file mode 100644 index 0000000..87f5053 --- /dev/null +++ b/src/models/operations/updatedatabasebyuuid.ts @@ -0,0 +1,488 @@ +/* + * 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"; + +/** + * Database data + */ +export type UpdateDatabaseByUuidRequestBody = { + /** + * Name of the database + */ + name?: string | undefined; + /** + * Description of the database + */ + description?: string | undefined; + /** + * Docker Image of the database + */ + image?: string | undefined; + /** + * Is the database public? + */ + isPublic?: boolean | undefined; + /** + * Public port of the database + */ + publicPort?: number | undefined; + /** + * Memory limit of the database + */ + limitsMemory?: string | undefined; + /** + * Memory swap limit of the database + */ + limitsMemorySwap?: string | undefined; + /** + * Memory swappiness of the database + */ + limitsMemorySwappiness?: number | undefined; + /** + * Memory reservation of the database + */ + limitsMemoryReservation?: string | undefined; + /** + * CPU limit of the database + */ + limitsCpus?: string | undefined; + /** + * CPU set of the database + */ + limitsCpuset?: string | undefined; + /** + * CPU shares of the database + */ + limitsCpuShares?: number | undefined; + /** + * PostgreSQL user + */ + postgresUser?: string | undefined; + /** + * PostgreSQL password + */ + postgresPassword?: string | undefined; + /** + * PostgreSQL database + */ + postgresDb?: string | undefined; + /** + * PostgreSQL initdb args + */ + postgresInitdbArgs?: string | undefined; + /** + * PostgreSQL host auth method + */ + postgresHostAuthMethod?: string | undefined; + /** + * PostgreSQL conf + */ + postgresConf?: string | undefined; + /** + * Clickhouse admin user + */ + clickhouseAdminUser?: string | undefined; + /** + * Clickhouse admin password + */ + clickhouseAdminPassword?: string | undefined; + /** + * DragonFly password + */ + dragonflyPassword?: string | undefined; + /** + * Redis password + */ + redisPassword?: string | undefined; + /** + * Redis conf + */ + redisConf?: string | undefined; + /** + * KeyDB password + */ + keydbPassword?: string | undefined; + /** + * KeyDB conf + */ + keydbConf?: string | undefined; + /** + * MariaDB conf + */ + mariadbConf?: string | undefined; + /** + * MariaDB root password + */ + mariadbRootPassword?: string | undefined; + /** + * MariaDB user + */ + mariadbUser?: string | undefined; + /** + * MariaDB password + */ + mariadbPassword?: string | undefined; + /** + * MariaDB database + */ + mariadbDatabase?: string | undefined; + /** + * Mongo conf + */ + mongoConf?: string | undefined; + /** + * Mongo initdb root username + */ + mongoInitdbRootUsername?: string | undefined; + /** + * Mongo initdb root password + */ + mongoInitdbRootPassword?: string | undefined; + /** + * Mongo initdb init database + */ + mongoInitdbInitDatabase?: string | undefined; + /** + * MySQL root password + */ + mysqlRootPassword?: string | undefined; + /** + * MySQL user + */ + mysqlUser?: string | undefined; + /** + * MySQL database + */ + mysqlDatabase?: string | undefined; + /** + * MySQL conf + */ + mysqlConf?: string | undefined; +}; + +export type UpdateDatabaseByUuidRequest = { + /** + * UUID of the database. + */ + uuid: string; + /** + * Database data + */ + requestBody: UpdateDatabaseByUuidRequestBody; +}; + +/** @internal */ +export const UpdateDatabaseByUuidRequestBody$inboundSchema: z.ZodType< + UpdateDatabaseByUuidRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string().optional(), + description: z.string().optional(), + image: z.string().optional(), + is_public: z.boolean().optional(), + public_port: z.number().int().optional(), + limits_memory: z.string().optional(), + limits_memory_swap: z.string().optional(), + limits_memory_swappiness: z.number().int().optional(), + limits_memory_reservation: z.string().optional(), + limits_cpus: z.string().optional(), + limits_cpuset: z.string().optional(), + limits_cpu_shares: z.number().int().optional(), + postgres_user: z.string().optional(), + postgres_password: z.string().optional(), + postgres_db: z.string().optional(), + postgres_initdb_args: z.string().optional(), + postgres_host_auth_method: z.string().optional(), + postgres_conf: z.string().optional(), + clickhouse_admin_user: z.string().optional(), + clickhouse_admin_password: z.string().optional(), + dragonfly_password: z.string().optional(), + redis_password: z.string().optional(), + redis_conf: z.string().optional(), + keydb_password: z.string().optional(), + keydb_conf: z.string().optional(), + mariadb_conf: z.string().optional(), + mariadb_root_password: z.string().optional(), + mariadb_user: z.string().optional(), + mariadb_password: z.string().optional(), + mariadb_database: z.string().optional(), + mongo_conf: z.string().optional(), + mongo_initdb_root_username: z.string().optional(), + mongo_initdb_root_password: z.string().optional(), + mongo_initdb_init_database: z.string().optional(), + mysql_root_password: z.string().optional(), + mysql_user: z.string().optional(), + mysql_database: z.string().optional(), + mysql_conf: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "is_public": "isPublic", + "public_port": "publicPort", + "limits_memory": "limitsMemory", + "limits_memory_swap": "limitsMemorySwap", + "limits_memory_swappiness": "limitsMemorySwappiness", + "limits_memory_reservation": "limitsMemoryReservation", + "limits_cpus": "limitsCpus", + "limits_cpuset": "limitsCpuset", + "limits_cpu_shares": "limitsCpuShares", + "postgres_user": "postgresUser", + "postgres_password": "postgresPassword", + "postgres_db": "postgresDb", + "postgres_initdb_args": "postgresInitdbArgs", + "postgres_host_auth_method": "postgresHostAuthMethod", + "postgres_conf": "postgresConf", + "clickhouse_admin_user": "clickhouseAdminUser", + "clickhouse_admin_password": "clickhouseAdminPassword", + "dragonfly_password": "dragonflyPassword", + "redis_password": "redisPassword", + "redis_conf": "redisConf", + "keydb_password": "keydbPassword", + "keydb_conf": "keydbConf", + "mariadb_conf": "mariadbConf", + "mariadb_root_password": "mariadbRootPassword", + "mariadb_user": "mariadbUser", + "mariadb_password": "mariadbPassword", + "mariadb_database": "mariadbDatabase", + "mongo_conf": "mongoConf", + "mongo_initdb_root_username": "mongoInitdbRootUsername", + "mongo_initdb_root_password": "mongoInitdbRootPassword", + "mongo_initdb_init_database": "mongoInitdbInitDatabase", + "mysql_root_password": "mysqlRootPassword", + "mysql_user": "mysqlUser", + "mysql_database": "mysqlDatabase", + "mysql_conf": "mysqlConf", + }); +}); + +/** @internal */ +export type UpdateDatabaseByUuidRequestBody$Outbound = { + name?: string | undefined; + description?: string | undefined; + image?: string | undefined; + is_public?: boolean | undefined; + public_port?: number | undefined; + limits_memory?: string | undefined; + limits_memory_swap?: string | undefined; + limits_memory_swappiness?: number | undefined; + limits_memory_reservation?: string | undefined; + limits_cpus?: string | undefined; + limits_cpuset?: string | undefined; + limits_cpu_shares?: number | undefined; + postgres_user?: string | undefined; + postgres_password?: string | undefined; + postgres_db?: string | undefined; + postgres_initdb_args?: string | undefined; + postgres_host_auth_method?: string | undefined; + postgres_conf?: string | undefined; + clickhouse_admin_user?: string | undefined; + clickhouse_admin_password?: string | undefined; + dragonfly_password?: string | undefined; + redis_password?: string | undefined; + redis_conf?: string | undefined; + keydb_password?: string | undefined; + keydb_conf?: string | undefined; + mariadb_conf?: string | undefined; + mariadb_root_password?: string | undefined; + mariadb_user?: string | undefined; + mariadb_password?: string | undefined; + mariadb_database?: string | undefined; + mongo_conf?: string | undefined; + mongo_initdb_root_username?: string | undefined; + mongo_initdb_root_password?: string | undefined; + mongo_initdb_init_database?: string | undefined; + mysql_root_password?: string | undefined; + mysql_user?: string | undefined; + mysql_database?: string | undefined; + mysql_conf?: string | undefined; +}; + +/** @internal */ +export const UpdateDatabaseByUuidRequestBody$outboundSchema: z.ZodType< + UpdateDatabaseByUuidRequestBody$Outbound, + z.ZodTypeDef, + UpdateDatabaseByUuidRequestBody +> = z.object({ + name: z.string().optional(), + description: z.string().optional(), + image: z.string().optional(), + isPublic: z.boolean().optional(), + publicPort: z.number().int().optional(), + limitsMemory: z.string().optional(), + limitsMemorySwap: z.string().optional(), + limitsMemorySwappiness: z.number().int().optional(), + limitsMemoryReservation: z.string().optional(), + limitsCpus: z.string().optional(), + limitsCpuset: z.string().optional(), + limitsCpuShares: z.number().int().optional(), + postgresUser: z.string().optional(), + postgresPassword: z.string().optional(), + postgresDb: z.string().optional(), + postgresInitdbArgs: z.string().optional(), + postgresHostAuthMethod: z.string().optional(), + postgresConf: z.string().optional(), + clickhouseAdminUser: z.string().optional(), + clickhouseAdminPassword: z.string().optional(), + dragonflyPassword: z.string().optional(), + redisPassword: z.string().optional(), + redisConf: z.string().optional(), + keydbPassword: z.string().optional(), + keydbConf: z.string().optional(), + mariadbConf: z.string().optional(), + mariadbRootPassword: z.string().optional(), + mariadbUser: z.string().optional(), + mariadbPassword: z.string().optional(), + mariadbDatabase: z.string().optional(), + mongoConf: z.string().optional(), + mongoInitdbRootUsername: z.string().optional(), + mongoInitdbRootPassword: z.string().optional(), + mongoInitdbInitDatabase: z.string().optional(), + mysqlRootPassword: z.string().optional(), + mysqlUser: z.string().optional(), + mysqlDatabase: z.string().optional(), + mysqlConf: z.string().optional(), +}).transform((v) => { + return remap$(v, { + isPublic: "is_public", + publicPort: "public_port", + limitsMemory: "limits_memory", + limitsMemorySwap: "limits_memory_swap", + limitsMemorySwappiness: "limits_memory_swappiness", + limitsMemoryReservation: "limits_memory_reservation", + limitsCpus: "limits_cpus", + limitsCpuset: "limits_cpuset", + limitsCpuShares: "limits_cpu_shares", + postgresUser: "postgres_user", + postgresPassword: "postgres_password", + postgresDb: "postgres_db", + postgresInitdbArgs: "postgres_initdb_args", + postgresHostAuthMethod: "postgres_host_auth_method", + postgresConf: "postgres_conf", + clickhouseAdminUser: "clickhouse_admin_user", + clickhouseAdminPassword: "clickhouse_admin_password", + dragonflyPassword: "dragonfly_password", + redisPassword: "redis_password", + redisConf: "redis_conf", + keydbPassword: "keydb_password", + keydbConf: "keydb_conf", + mariadbConf: "mariadb_conf", + mariadbRootPassword: "mariadb_root_password", + mariadbUser: "mariadb_user", + mariadbPassword: "mariadb_password", + mariadbDatabase: "mariadb_database", + mongoConf: "mongo_conf", + mongoInitdbRootUsername: "mongo_initdb_root_username", + mongoInitdbRootPassword: "mongo_initdb_root_password", + mongoInitdbInitDatabase: "mongo_initdb_init_database", + mysqlRootPassword: "mysql_root_password", + mysqlUser: "mysql_user", + mysqlDatabase: "mysql_database", + mysqlConf: "mysql_conf", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateDatabaseByUuidRequestBody$ { + /** @deprecated use `UpdateDatabaseByUuidRequestBody$inboundSchema` instead. */ + export const inboundSchema = UpdateDatabaseByUuidRequestBody$inboundSchema; + /** @deprecated use `UpdateDatabaseByUuidRequestBody$outboundSchema` instead. */ + export const outboundSchema = UpdateDatabaseByUuidRequestBody$outboundSchema; + /** @deprecated use `UpdateDatabaseByUuidRequestBody$Outbound` instead. */ + export type Outbound = UpdateDatabaseByUuidRequestBody$Outbound; +} + +export function updateDatabaseByUuidRequestBodyToJSON( + updateDatabaseByUuidRequestBody: UpdateDatabaseByUuidRequestBody, +): string { + return JSON.stringify( + UpdateDatabaseByUuidRequestBody$outboundSchema.parse( + updateDatabaseByUuidRequestBody, + ), + ); +} + +export function updateDatabaseByUuidRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateDatabaseByUuidRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateDatabaseByUuidRequestBody' from JSON`, + ); +} + +/** @internal */ +export const UpdateDatabaseByUuidRequest$inboundSchema: z.ZodType< + UpdateDatabaseByUuidRequest, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string(), + RequestBody: z.lazy(() => UpdateDatabaseByUuidRequestBody$inboundSchema), +}).transform((v) => { + return remap$(v, { + "RequestBody": "requestBody", + }); +}); + +/** @internal */ +export type UpdateDatabaseByUuidRequest$Outbound = { + uuid: string; + RequestBody: UpdateDatabaseByUuidRequestBody$Outbound; +}; + +/** @internal */ +export const UpdateDatabaseByUuidRequest$outboundSchema: z.ZodType< + UpdateDatabaseByUuidRequest$Outbound, + z.ZodTypeDef, + UpdateDatabaseByUuidRequest +> = z.object({ + uuid: z.string(), + requestBody: z.lazy(() => UpdateDatabaseByUuidRequestBody$outboundSchema), +}).transform((v) => { + return remap$(v, { + requestBody: "RequestBody", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateDatabaseByUuidRequest$ { + /** @deprecated use `UpdateDatabaseByUuidRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateDatabaseByUuidRequest$inboundSchema; + /** @deprecated use `UpdateDatabaseByUuidRequest$outboundSchema` instead. */ + export const outboundSchema = UpdateDatabaseByUuidRequest$outboundSchema; + /** @deprecated use `UpdateDatabaseByUuidRequest$Outbound` instead. */ + export type Outbound = UpdateDatabaseByUuidRequest$Outbound; +} + +export function updateDatabaseByUuidRequestToJSON( + updateDatabaseByUuidRequest: UpdateDatabaseByUuidRequest, +): string { + return JSON.stringify( + UpdateDatabaseByUuidRequest$outboundSchema.parse( + updateDatabaseByUuidRequest, + ), + ); +} + +export function updateDatabaseByUuidRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateDatabaseByUuidRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateDatabaseByUuidRequest' from JSON`, + ); +} diff --git a/src/models/operations/updateenvbyapplicationuuid.ts b/src/models/operations/updateenvbyapplicationuuid.ts new file mode 100644 index 0000000..9fecb3a --- /dev/null +++ b/src/models/operations/updateenvbyapplicationuuid.ts @@ -0,0 +1,286 @@ +/* + * 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"; + +/** + * Env updated. + */ +export type UpdateEnvByApplicationUuidRequestBody = { + /** + * The key of the environment variable. + */ + key: string; + /** + * The value of the environment variable. + */ + value: string; + /** + * The flag to indicate if the environment variable is used in preview deployments. + */ + isPreview?: boolean | undefined; + /** + * The flag to indicate if the environment variable is used in build time. + */ + isBuildTime?: boolean | undefined; + /** + * The flag to indicate if the environment variable is a literal, nothing espaced. + */ + isLiteral?: boolean | undefined; + /** + * The flag to indicate if the environment variable is multiline. + */ + isMultiline?: boolean | undefined; + /** + * The flag to indicate if the environment variable's value is shown on the UI. + */ + isShownOnce?: boolean | undefined; +}; + +export type UpdateEnvByApplicationUuidRequest = { + /** + * UUID of the application. + */ + uuid: string; + /** + * Env updated. + */ + requestBody: UpdateEnvByApplicationUuidRequestBody; +}; + +/** + * Environment variable updated. + */ +export type UpdateEnvByApplicationUuidResponseBody = { + message?: string | undefined; +}; + +/** @internal */ +export const UpdateEnvByApplicationUuidRequestBody$inboundSchema: z.ZodType< + UpdateEnvByApplicationUuidRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + key: z.string(), + value: z.string(), + is_preview: z.boolean().optional(), + is_build_time: z.boolean().optional(), + is_literal: z.boolean().optional(), + is_multiline: z.boolean().optional(), + is_shown_once: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + "is_preview": "isPreview", + "is_build_time": "isBuildTime", + "is_literal": "isLiteral", + "is_multiline": "isMultiline", + "is_shown_once": "isShownOnce", + }); +}); + +/** @internal */ +export type UpdateEnvByApplicationUuidRequestBody$Outbound = { + key: string; + value: string; + is_preview?: boolean | undefined; + is_build_time?: boolean | undefined; + is_literal?: boolean | undefined; + is_multiline?: boolean | undefined; + is_shown_once?: boolean | undefined; +}; + +/** @internal */ +export const UpdateEnvByApplicationUuidRequestBody$outboundSchema: z.ZodType< + UpdateEnvByApplicationUuidRequestBody$Outbound, + z.ZodTypeDef, + UpdateEnvByApplicationUuidRequestBody +> = z.object({ + key: z.string(), + value: z.string(), + isPreview: z.boolean().optional(), + isBuildTime: z.boolean().optional(), + isLiteral: z.boolean().optional(), + isMultiline: z.boolean().optional(), + isShownOnce: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + isPreview: "is_preview", + isBuildTime: "is_build_time", + isLiteral: "is_literal", + isMultiline: "is_multiline", + isShownOnce: "is_shown_once", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateEnvByApplicationUuidRequestBody$ { + /** @deprecated use `UpdateEnvByApplicationUuidRequestBody$inboundSchema` instead. */ + export const inboundSchema = + UpdateEnvByApplicationUuidRequestBody$inboundSchema; + /** @deprecated use `UpdateEnvByApplicationUuidRequestBody$outboundSchema` instead. */ + export const outboundSchema = + UpdateEnvByApplicationUuidRequestBody$outboundSchema; + /** @deprecated use `UpdateEnvByApplicationUuidRequestBody$Outbound` instead. */ + export type Outbound = UpdateEnvByApplicationUuidRequestBody$Outbound; +} + +export function updateEnvByApplicationUuidRequestBodyToJSON( + updateEnvByApplicationUuidRequestBody: UpdateEnvByApplicationUuidRequestBody, +): string { + return JSON.stringify( + UpdateEnvByApplicationUuidRequestBody$outboundSchema.parse( + updateEnvByApplicationUuidRequestBody, + ), + ); +} + +export function updateEnvByApplicationUuidRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + UpdateEnvByApplicationUuidRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateEnvByApplicationUuidRequestBody' from JSON`, + ); +} + +/** @internal */ +export const UpdateEnvByApplicationUuidRequest$inboundSchema: z.ZodType< + UpdateEnvByApplicationUuidRequest, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string(), + RequestBody: z.lazy(() => + UpdateEnvByApplicationUuidRequestBody$inboundSchema + ), +}).transform((v) => { + return remap$(v, { + "RequestBody": "requestBody", + }); +}); + +/** @internal */ +export type UpdateEnvByApplicationUuidRequest$Outbound = { + uuid: string; + RequestBody: UpdateEnvByApplicationUuidRequestBody$Outbound; +}; + +/** @internal */ +export const UpdateEnvByApplicationUuidRequest$outboundSchema: z.ZodType< + UpdateEnvByApplicationUuidRequest$Outbound, + z.ZodTypeDef, + UpdateEnvByApplicationUuidRequest +> = z.object({ + uuid: z.string(), + requestBody: z.lazy(() => + UpdateEnvByApplicationUuidRequestBody$outboundSchema + ), +}).transform((v) => { + return remap$(v, { + requestBody: "RequestBody", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateEnvByApplicationUuidRequest$ { + /** @deprecated use `UpdateEnvByApplicationUuidRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateEnvByApplicationUuidRequest$inboundSchema; + /** @deprecated use `UpdateEnvByApplicationUuidRequest$outboundSchema` instead. */ + export const outboundSchema = + UpdateEnvByApplicationUuidRequest$outboundSchema; + /** @deprecated use `UpdateEnvByApplicationUuidRequest$Outbound` instead. */ + export type Outbound = UpdateEnvByApplicationUuidRequest$Outbound; +} + +export function updateEnvByApplicationUuidRequestToJSON( + updateEnvByApplicationUuidRequest: UpdateEnvByApplicationUuidRequest, +): string { + return JSON.stringify( + UpdateEnvByApplicationUuidRequest$outboundSchema.parse( + updateEnvByApplicationUuidRequest, + ), + ); +} + +export function updateEnvByApplicationUuidRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateEnvByApplicationUuidRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateEnvByApplicationUuidRequest' from JSON`, + ); +} + +/** @internal */ +export const UpdateEnvByApplicationUuidResponseBody$inboundSchema: z.ZodType< + UpdateEnvByApplicationUuidResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + message: z.string().optional(), +}); + +/** @internal */ +export type UpdateEnvByApplicationUuidResponseBody$Outbound = { + message?: string | undefined; +}; + +/** @internal */ +export const UpdateEnvByApplicationUuidResponseBody$outboundSchema: z.ZodType< + UpdateEnvByApplicationUuidResponseBody$Outbound, + z.ZodTypeDef, + UpdateEnvByApplicationUuidResponseBody +> = z.object({ + message: 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 UpdateEnvByApplicationUuidResponseBody$ { + /** @deprecated use `UpdateEnvByApplicationUuidResponseBody$inboundSchema` instead. */ + export const inboundSchema = + UpdateEnvByApplicationUuidResponseBody$inboundSchema; + /** @deprecated use `UpdateEnvByApplicationUuidResponseBody$outboundSchema` instead. */ + export const outboundSchema = + UpdateEnvByApplicationUuidResponseBody$outboundSchema; + /** @deprecated use `UpdateEnvByApplicationUuidResponseBody$Outbound` instead. */ + export type Outbound = UpdateEnvByApplicationUuidResponseBody$Outbound; +} + +export function updateEnvByApplicationUuidResponseBodyToJSON( + updateEnvByApplicationUuidResponseBody: + UpdateEnvByApplicationUuidResponseBody, +): string { + return JSON.stringify( + UpdateEnvByApplicationUuidResponseBody$outboundSchema.parse( + updateEnvByApplicationUuidResponseBody, + ), + ); +} + +export function updateEnvByApplicationUuidResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + UpdateEnvByApplicationUuidResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateEnvByApplicationUuidResponseBody' from JSON`, + ); +} diff --git a/src/models/operations/updateenvbyserviceuuid.ts b/src/models/operations/updateenvbyserviceuuid.ts new file mode 100644 index 0000000..8a26a99 --- /dev/null +++ b/src/models/operations/updateenvbyserviceuuid.ts @@ -0,0 +1,277 @@ +/* + * 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"; + +/** + * Env updated. + */ +export type UpdateEnvByServiceUuidRequestBody = { + /** + * The key of the environment variable. + */ + key: string; + /** + * The value of the environment variable. + */ + value: string; + /** + * The flag to indicate if the environment variable is used in preview deployments. + */ + isPreview?: boolean | undefined; + /** + * The flag to indicate if the environment variable is used in build time. + */ + isBuildTime?: boolean | undefined; + /** + * The flag to indicate if the environment variable is a literal, nothing espaced. + */ + isLiteral?: boolean | undefined; + /** + * The flag to indicate if the environment variable is multiline. + */ + isMultiline?: boolean | undefined; + /** + * The flag to indicate if the environment variable's value is shown on the UI. + */ + isShownOnce?: boolean | undefined; +}; + +export type UpdateEnvByServiceUuidRequest = { + /** + * UUID of the service. + */ + uuid: string; + /** + * Env updated. + */ + requestBody: UpdateEnvByServiceUuidRequestBody; +}; + +/** + * Environment variable updated. + */ +export type UpdateEnvByServiceUuidResponseBody = { + message?: string | undefined; +}; + +/** @internal */ +export const UpdateEnvByServiceUuidRequestBody$inboundSchema: z.ZodType< + UpdateEnvByServiceUuidRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + key: z.string(), + value: z.string(), + is_preview: z.boolean().optional(), + is_build_time: z.boolean().optional(), + is_literal: z.boolean().optional(), + is_multiline: z.boolean().optional(), + is_shown_once: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + "is_preview": "isPreview", + "is_build_time": "isBuildTime", + "is_literal": "isLiteral", + "is_multiline": "isMultiline", + "is_shown_once": "isShownOnce", + }); +}); + +/** @internal */ +export type UpdateEnvByServiceUuidRequestBody$Outbound = { + key: string; + value: string; + is_preview?: boolean | undefined; + is_build_time?: boolean | undefined; + is_literal?: boolean | undefined; + is_multiline?: boolean | undefined; + is_shown_once?: boolean | undefined; +}; + +/** @internal */ +export const UpdateEnvByServiceUuidRequestBody$outboundSchema: z.ZodType< + UpdateEnvByServiceUuidRequestBody$Outbound, + z.ZodTypeDef, + UpdateEnvByServiceUuidRequestBody +> = z.object({ + key: z.string(), + value: z.string(), + isPreview: z.boolean().optional(), + isBuildTime: z.boolean().optional(), + isLiteral: z.boolean().optional(), + isMultiline: z.boolean().optional(), + isShownOnce: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + isPreview: "is_preview", + isBuildTime: "is_build_time", + isLiteral: "is_literal", + isMultiline: "is_multiline", + isShownOnce: "is_shown_once", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateEnvByServiceUuidRequestBody$ { + /** @deprecated use `UpdateEnvByServiceUuidRequestBody$inboundSchema` instead. */ + export const inboundSchema = UpdateEnvByServiceUuidRequestBody$inboundSchema; + /** @deprecated use `UpdateEnvByServiceUuidRequestBody$outboundSchema` instead. */ + export const outboundSchema = + UpdateEnvByServiceUuidRequestBody$outboundSchema; + /** @deprecated use `UpdateEnvByServiceUuidRequestBody$Outbound` instead. */ + export type Outbound = UpdateEnvByServiceUuidRequestBody$Outbound; +} + +export function updateEnvByServiceUuidRequestBodyToJSON( + updateEnvByServiceUuidRequestBody: UpdateEnvByServiceUuidRequestBody, +): string { + return JSON.stringify( + UpdateEnvByServiceUuidRequestBody$outboundSchema.parse( + updateEnvByServiceUuidRequestBody, + ), + ); +} + +export function updateEnvByServiceUuidRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateEnvByServiceUuidRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateEnvByServiceUuidRequestBody' from JSON`, + ); +} + +/** @internal */ +export const UpdateEnvByServiceUuidRequest$inboundSchema: z.ZodType< + UpdateEnvByServiceUuidRequest, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string(), + RequestBody: z.lazy(() => UpdateEnvByServiceUuidRequestBody$inboundSchema), +}).transform((v) => { + return remap$(v, { + "RequestBody": "requestBody", + }); +}); + +/** @internal */ +export type UpdateEnvByServiceUuidRequest$Outbound = { + uuid: string; + RequestBody: UpdateEnvByServiceUuidRequestBody$Outbound; +}; + +/** @internal */ +export const UpdateEnvByServiceUuidRequest$outboundSchema: z.ZodType< + UpdateEnvByServiceUuidRequest$Outbound, + z.ZodTypeDef, + UpdateEnvByServiceUuidRequest +> = z.object({ + uuid: z.string(), + requestBody: z.lazy(() => UpdateEnvByServiceUuidRequestBody$outboundSchema), +}).transform((v) => { + return remap$(v, { + requestBody: "RequestBody", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateEnvByServiceUuidRequest$ { + /** @deprecated use `UpdateEnvByServiceUuidRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateEnvByServiceUuidRequest$inboundSchema; + /** @deprecated use `UpdateEnvByServiceUuidRequest$outboundSchema` instead. */ + export const outboundSchema = UpdateEnvByServiceUuidRequest$outboundSchema; + /** @deprecated use `UpdateEnvByServiceUuidRequest$Outbound` instead. */ + export type Outbound = UpdateEnvByServiceUuidRequest$Outbound; +} + +export function updateEnvByServiceUuidRequestToJSON( + updateEnvByServiceUuidRequest: UpdateEnvByServiceUuidRequest, +): string { + return JSON.stringify( + UpdateEnvByServiceUuidRequest$outboundSchema.parse( + updateEnvByServiceUuidRequest, + ), + ); +} + +export function updateEnvByServiceUuidRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateEnvByServiceUuidRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateEnvByServiceUuidRequest' from JSON`, + ); +} + +/** @internal */ +export const UpdateEnvByServiceUuidResponseBody$inboundSchema: z.ZodType< + UpdateEnvByServiceUuidResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + message: z.string().optional(), +}); + +/** @internal */ +export type UpdateEnvByServiceUuidResponseBody$Outbound = { + message?: string | undefined; +}; + +/** @internal */ +export const UpdateEnvByServiceUuidResponseBody$outboundSchema: z.ZodType< + UpdateEnvByServiceUuidResponseBody$Outbound, + z.ZodTypeDef, + UpdateEnvByServiceUuidResponseBody +> = z.object({ + message: 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 UpdateEnvByServiceUuidResponseBody$ { + /** @deprecated use `UpdateEnvByServiceUuidResponseBody$inboundSchema` instead. */ + export const inboundSchema = UpdateEnvByServiceUuidResponseBody$inboundSchema; + /** @deprecated use `UpdateEnvByServiceUuidResponseBody$outboundSchema` instead. */ + export const outboundSchema = + UpdateEnvByServiceUuidResponseBody$outboundSchema; + /** @deprecated use `UpdateEnvByServiceUuidResponseBody$Outbound` instead. */ + export type Outbound = UpdateEnvByServiceUuidResponseBody$Outbound; +} + +export function updateEnvByServiceUuidResponseBodyToJSON( + updateEnvByServiceUuidResponseBody: UpdateEnvByServiceUuidResponseBody, +): string { + return JSON.stringify( + UpdateEnvByServiceUuidResponseBody$outboundSchema.parse( + updateEnvByServiceUuidResponseBody, + ), + ); +} + +export function updateEnvByServiceUuidResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + UpdateEnvByServiceUuidResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateEnvByServiceUuidResponseBody' from JSON`, + ); +} diff --git a/src/models/operations/updateenvsbyapplicationuuid.ts b/src/models/operations/updateenvsbyapplicationuuid.ts new file mode 100644 index 0000000..175f14b --- /dev/null +++ b/src/models/operations/updateenvsbyapplicationuuid.ts @@ -0,0 +1,341 @@ +/* + * 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 Data = { + /** + * The key of the environment variable. + */ + key?: string | undefined; + /** + * The value of the environment variable. + */ + value?: string | undefined; + /** + * The flag to indicate if the environment variable is used in preview deployments. + */ + isPreview?: boolean | undefined; + /** + * The flag to indicate if the environment variable is used in build time. + */ + isBuildTime?: boolean | undefined; + /** + * The flag to indicate if the environment variable is a literal, nothing espaced. + */ + isLiteral?: boolean | undefined; + /** + * The flag to indicate if the environment variable is multiline. + */ + isMultiline?: boolean | undefined; + /** + * The flag to indicate if the environment variable's value is shown on the UI. + */ + isShownOnce?: boolean | undefined; +}; + +/** + * Bulk envs updated. + */ +export type UpdateEnvsByApplicationUuidRequestBody = { + data: Array; +}; + +export type UpdateEnvsByApplicationUuidRequest = { + /** + * UUID of the application. + */ + uuid: string; + /** + * Bulk envs updated. + */ + requestBody: UpdateEnvsByApplicationUuidRequestBody; +}; + +/** + * Environment variables updated. + */ +export type UpdateEnvsByApplicationUuidResponseBody = { + message?: string | undefined; +}; + +/** @internal */ +export const Data$inboundSchema: z.ZodType = z + .object({ + key: z.string().optional(), + value: z.string().optional(), + is_preview: z.boolean().optional(), + is_build_time: z.boolean().optional(), + is_literal: z.boolean().optional(), + is_multiline: z.boolean().optional(), + is_shown_once: z.boolean().optional(), + }).transform((v) => { + return remap$(v, { + "is_preview": "isPreview", + "is_build_time": "isBuildTime", + "is_literal": "isLiteral", + "is_multiline": "isMultiline", + "is_shown_once": "isShownOnce", + }); + }); + +/** @internal */ +export type Data$Outbound = { + key?: string | undefined; + value?: string | undefined; + is_preview?: boolean | undefined; + is_build_time?: boolean | undefined; + is_literal?: boolean | undefined; + is_multiline?: boolean | undefined; + is_shown_once?: boolean | undefined; +}; + +/** @internal */ +export const Data$outboundSchema: z.ZodType = + z.object({ + key: z.string().optional(), + value: z.string().optional(), + isPreview: z.boolean().optional(), + isBuildTime: z.boolean().optional(), + isLiteral: z.boolean().optional(), + isMultiline: z.boolean().optional(), + isShownOnce: z.boolean().optional(), + }).transform((v) => { + return remap$(v, { + isPreview: "is_preview", + isBuildTime: "is_build_time", + isLiteral: "is_literal", + isMultiline: "is_multiline", + isShownOnce: "is_shown_once", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Data$ { + /** @deprecated use `Data$inboundSchema` instead. */ + export const inboundSchema = Data$inboundSchema; + /** @deprecated use `Data$outboundSchema` instead. */ + export const outboundSchema = Data$outboundSchema; + /** @deprecated use `Data$Outbound` instead. */ + export type Outbound = Data$Outbound; +} + +export function dataToJSON(data: Data): string { + return JSON.stringify(Data$outboundSchema.parse(data)); +} + +export function dataFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Data$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Data' from JSON`, + ); +} + +/** @internal */ +export const UpdateEnvsByApplicationUuidRequestBody$inboundSchema: z.ZodType< + UpdateEnvsByApplicationUuidRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + data: z.array(z.lazy(() => Data$inboundSchema)), +}); + +/** @internal */ +export type UpdateEnvsByApplicationUuidRequestBody$Outbound = { + data: Array; +}; + +/** @internal */ +export const UpdateEnvsByApplicationUuidRequestBody$outboundSchema: z.ZodType< + UpdateEnvsByApplicationUuidRequestBody$Outbound, + z.ZodTypeDef, + UpdateEnvsByApplicationUuidRequestBody +> = z.object({ + data: z.array(z.lazy(() => Data$outboundSchema)), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateEnvsByApplicationUuidRequestBody$ { + /** @deprecated use `UpdateEnvsByApplicationUuidRequestBody$inboundSchema` instead. */ + export const inboundSchema = + UpdateEnvsByApplicationUuidRequestBody$inboundSchema; + /** @deprecated use `UpdateEnvsByApplicationUuidRequestBody$outboundSchema` instead. */ + export const outboundSchema = + UpdateEnvsByApplicationUuidRequestBody$outboundSchema; + /** @deprecated use `UpdateEnvsByApplicationUuidRequestBody$Outbound` instead. */ + export type Outbound = UpdateEnvsByApplicationUuidRequestBody$Outbound; +} + +export function updateEnvsByApplicationUuidRequestBodyToJSON( + updateEnvsByApplicationUuidRequestBody: + UpdateEnvsByApplicationUuidRequestBody, +): string { + return JSON.stringify( + UpdateEnvsByApplicationUuidRequestBody$outboundSchema.parse( + updateEnvsByApplicationUuidRequestBody, + ), + ); +} + +export function updateEnvsByApplicationUuidRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + UpdateEnvsByApplicationUuidRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateEnvsByApplicationUuidRequestBody' from JSON`, + ); +} + +/** @internal */ +export const UpdateEnvsByApplicationUuidRequest$inboundSchema: z.ZodType< + UpdateEnvsByApplicationUuidRequest, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string(), + RequestBody: z.lazy(() => + UpdateEnvsByApplicationUuidRequestBody$inboundSchema + ), +}).transform((v) => { + return remap$(v, { + "RequestBody": "requestBody", + }); +}); + +/** @internal */ +export type UpdateEnvsByApplicationUuidRequest$Outbound = { + uuid: string; + RequestBody: UpdateEnvsByApplicationUuidRequestBody$Outbound; +}; + +/** @internal */ +export const UpdateEnvsByApplicationUuidRequest$outboundSchema: z.ZodType< + UpdateEnvsByApplicationUuidRequest$Outbound, + z.ZodTypeDef, + UpdateEnvsByApplicationUuidRequest +> = z.object({ + uuid: z.string(), + requestBody: z.lazy(() => + UpdateEnvsByApplicationUuidRequestBody$outboundSchema + ), +}).transform((v) => { + return remap$(v, { + requestBody: "RequestBody", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateEnvsByApplicationUuidRequest$ { + /** @deprecated use `UpdateEnvsByApplicationUuidRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateEnvsByApplicationUuidRequest$inboundSchema; + /** @deprecated use `UpdateEnvsByApplicationUuidRequest$outboundSchema` instead. */ + export const outboundSchema = + UpdateEnvsByApplicationUuidRequest$outboundSchema; + /** @deprecated use `UpdateEnvsByApplicationUuidRequest$Outbound` instead. */ + export type Outbound = UpdateEnvsByApplicationUuidRequest$Outbound; +} + +export function updateEnvsByApplicationUuidRequestToJSON( + updateEnvsByApplicationUuidRequest: UpdateEnvsByApplicationUuidRequest, +): string { + return JSON.stringify( + UpdateEnvsByApplicationUuidRequest$outboundSchema.parse( + updateEnvsByApplicationUuidRequest, + ), + ); +} + +export function updateEnvsByApplicationUuidRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + UpdateEnvsByApplicationUuidRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateEnvsByApplicationUuidRequest' from JSON`, + ); +} + +/** @internal */ +export const UpdateEnvsByApplicationUuidResponseBody$inboundSchema: z.ZodType< + UpdateEnvsByApplicationUuidResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + message: z.string().optional(), +}); + +/** @internal */ +export type UpdateEnvsByApplicationUuidResponseBody$Outbound = { + message?: string | undefined; +}; + +/** @internal */ +export const UpdateEnvsByApplicationUuidResponseBody$outboundSchema: z.ZodType< + UpdateEnvsByApplicationUuidResponseBody$Outbound, + z.ZodTypeDef, + UpdateEnvsByApplicationUuidResponseBody +> = z.object({ + message: 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 UpdateEnvsByApplicationUuidResponseBody$ { + /** @deprecated use `UpdateEnvsByApplicationUuidResponseBody$inboundSchema` instead. */ + export const inboundSchema = + UpdateEnvsByApplicationUuidResponseBody$inboundSchema; + /** @deprecated use `UpdateEnvsByApplicationUuidResponseBody$outboundSchema` instead. */ + export const outboundSchema = + UpdateEnvsByApplicationUuidResponseBody$outboundSchema; + /** @deprecated use `UpdateEnvsByApplicationUuidResponseBody$Outbound` instead. */ + export type Outbound = UpdateEnvsByApplicationUuidResponseBody$Outbound; +} + +export function updateEnvsByApplicationUuidResponseBodyToJSON( + updateEnvsByApplicationUuidResponseBody: + UpdateEnvsByApplicationUuidResponseBody, +): string { + return JSON.stringify( + UpdateEnvsByApplicationUuidResponseBody$outboundSchema.parse( + updateEnvsByApplicationUuidResponseBody, + ), + ); +} + +export function updateEnvsByApplicationUuidResponseBodyFromJSON( + jsonString: string, +): SafeParseResult< + UpdateEnvsByApplicationUuidResponseBody, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + UpdateEnvsByApplicationUuidResponseBody$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'UpdateEnvsByApplicationUuidResponseBody' from JSON`, + ); +} diff --git a/src/models/operations/updateenvsbyserviceuuid.ts b/src/models/operations/updateenvsbyserviceuuid.ts new file mode 100644 index 0000000..0f95cc9 --- /dev/null +++ b/src/models/operations/updateenvsbyserviceuuid.ts @@ -0,0 +1,339 @@ +/* + * 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 UpdateEnvsByServiceUuidData = { + /** + * The key of the environment variable. + */ + key?: string | undefined; + /** + * The value of the environment variable. + */ + value?: string | undefined; + /** + * The flag to indicate if the environment variable is used in preview deployments. + */ + isPreview?: boolean | undefined; + /** + * The flag to indicate if the environment variable is used in build time. + */ + isBuildTime?: boolean | undefined; + /** + * The flag to indicate if the environment variable is a literal, nothing espaced. + */ + isLiteral?: boolean | undefined; + /** + * The flag to indicate if the environment variable is multiline. + */ + isMultiline?: boolean | undefined; + /** + * The flag to indicate if the environment variable's value is shown on the UI. + */ + isShownOnce?: boolean | undefined; +}; + +/** + * Bulk envs updated. + */ +export type UpdateEnvsByServiceUuidRequestBody = { + data: Array; +}; + +export type UpdateEnvsByServiceUuidRequest = { + /** + * UUID of the service. + */ + uuid: string; + /** + * Bulk envs updated. + */ + requestBody: UpdateEnvsByServiceUuidRequestBody; +}; + +/** + * Environment variables updated. + */ +export type UpdateEnvsByServiceUuidResponseBody = { + message?: string | undefined; +}; + +/** @internal */ +export const UpdateEnvsByServiceUuidData$inboundSchema: z.ZodType< + UpdateEnvsByServiceUuidData, + z.ZodTypeDef, + unknown +> = z.object({ + key: z.string().optional(), + value: z.string().optional(), + is_preview: z.boolean().optional(), + is_build_time: z.boolean().optional(), + is_literal: z.boolean().optional(), + is_multiline: z.boolean().optional(), + is_shown_once: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + "is_preview": "isPreview", + "is_build_time": "isBuildTime", + "is_literal": "isLiteral", + "is_multiline": "isMultiline", + "is_shown_once": "isShownOnce", + }); +}); + +/** @internal */ +export type UpdateEnvsByServiceUuidData$Outbound = { + key?: string | undefined; + value?: string | undefined; + is_preview?: boolean | undefined; + is_build_time?: boolean | undefined; + is_literal?: boolean | undefined; + is_multiline?: boolean | undefined; + is_shown_once?: boolean | undefined; +}; + +/** @internal */ +export const UpdateEnvsByServiceUuidData$outboundSchema: z.ZodType< + UpdateEnvsByServiceUuidData$Outbound, + z.ZodTypeDef, + UpdateEnvsByServiceUuidData +> = z.object({ + key: z.string().optional(), + value: z.string().optional(), + isPreview: z.boolean().optional(), + isBuildTime: z.boolean().optional(), + isLiteral: z.boolean().optional(), + isMultiline: z.boolean().optional(), + isShownOnce: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + isPreview: "is_preview", + isBuildTime: "is_build_time", + isLiteral: "is_literal", + isMultiline: "is_multiline", + isShownOnce: "is_shown_once", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateEnvsByServiceUuidData$ { + /** @deprecated use `UpdateEnvsByServiceUuidData$inboundSchema` instead. */ + export const inboundSchema = UpdateEnvsByServiceUuidData$inboundSchema; + /** @deprecated use `UpdateEnvsByServiceUuidData$outboundSchema` instead. */ + export const outboundSchema = UpdateEnvsByServiceUuidData$outboundSchema; + /** @deprecated use `UpdateEnvsByServiceUuidData$Outbound` instead. */ + export type Outbound = UpdateEnvsByServiceUuidData$Outbound; +} + +export function updateEnvsByServiceUuidDataToJSON( + updateEnvsByServiceUuidData: UpdateEnvsByServiceUuidData, +): string { + return JSON.stringify( + UpdateEnvsByServiceUuidData$outboundSchema.parse( + updateEnvsByServiceUuidData, + ), + ); +} + +export function updateEnvsByServiceUuidDataFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateEnvsByServiceUuidData$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateEnvsByServiceUuidData' from JSON`, + ); +} + +/** @internal */ +export const UpdateEnvsByServiceUuidRequestBody$inboundSchema: z.ZodType< + UpdateEnvsByServiceUuidRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + data: z.array(z.lazy(() => UpdateEnvsByServiceUuidData$inboundSchema)), +}); + +/** @internal */ +export type UpdateEnvsByServiceUuidRequestBody$Outbound = { + data: Array; +}; + +/** @internal */ +export const UpdateEnvsByServiceUuidRequestBody$outboundSchema: z.ZodType< + UpdateEnvsByServiceUuidRequestBody$Outbound, + z.ZodTypeDef, + UpdateEnvsByServiceUuidRequestBody +> = z.object({ + data: z.array(z.lazy(() => UpdateEnvsByServiceUuidData$outboundSchema)), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateEnvsByServiceUuidRequestBody$ { + /** @deprecated use `UpdateEnvsByServiceUuidRequestBody$inboundSchema` instead. */ + export const inboundSchema = UpdateEnvsByServiceUuidRequestBody$inboundSchema; + /** @deprecated use `UpdateEnvsByServiceUuidRequestBody$outboundSchema` instead. */ + export const outboundSchema = + UpdateEnvsByServiceUuidRequestBody$outboundSchema; + /** @deprecated use `UpdateEnvsByServiceUuidRequestBody$Outbound` instead. */ + export type Outbound = UpdateEnvsByServiceUuidRequestBody$Outbound; +} + +export function updateEnvsByServiceUuidRequestBodyToJSON( + updateEnvsByServiceUuidRequestBody: UpdateEnvsByServiceUuidRequestBody, +): string { + return JSON.stringify( + UpdateEnvsByServiceUuidRequestBody$outboundSchema.parse( + updateEnvsByServiceUuidRequestBody, + ), + ); +} + +export function updateEnvsByServiceUuidRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + UpdateEnvsByServiceUuidRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateEnvsByServiceUuidRequestBody' from JSON`, + ); +} + +/** @internal */ +export const UpdateEnvsByServiceUuidRequest$inboundSchema: z.ZodType< + UpdateEnvsByServiceUuidRequest, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string(), + RequestBody: z.lazy(() => UpdateEnvsByServiceUuidRequestBody$inboundSchema), +}).transform((v) => { + return remap$(v, { + "RequestBody": "requestBody", + }); +}); + +/** @internal */ +export type UpdateEnvsByServiceUuidRequest$Outbound = { + uuid: string; + RequestBody: UpdateEnvsByServiceUuidRequestBody$Outbound; +}; + +/** @internal */ +export const UpdateEnvsByServiceUuidRequest$outboundSchema: z.ZodType< + UpdateEnvsByServiceUuidRequest$Outbound, + z.ZodTypeDef, + UpdateEnvsByServiceUuidRequest +> = z.object({ + uuid: z.string(), + requestBody: z.lazy(() => UpdateEnvsByServiceUuidRequestBody$outboundSchema), +}).transform((v) => { + return remap$(v, { + requestBody: "RequestBody", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateEnvsByServiceUuidRequest$ { + /** @deprecated use `UpdateEnvsByServiceUuidRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateEnvsByServiceUuidRequest$inboundSchema; + /** @deprecated use `UpdateEnvsByServiceUuidRequest$outboundSchema` instead. */ + export const outboundSchema = UpdateEnvsByServiceUuidRequest$outboundSchema; + /** @deprecated use `UpdateEnvsByServiceUuidRequest$Outbound` instead. */ + export type Outbound = UpdateEnvsByServiceUuidRequest$Outbound; +} + +export function updateEnvsByServiceUuidRequestToJSON( + updateEnvsByServiceUuidRequest: UpdateEnvsByServiceUuidRequest, +): string { + return JSON.stringify( + UpdateEnvsByServiceUuidRequest$outboundSchema.parse( + updateEnvsByServiceUuidRequest, + ), + ); +} + +export function updateEnvsByServiceUuidRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateEnvsByServiceUuidRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateEnvsByServiceUuidRequest' from JSON`, + ); +} + +/** @internal */ +export const UpdateEnvsByServiceUuidResponseBody$inboundSchema: z.ZodType< + UpdateEnvsByServiceUuidResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + message: z.string().optional(), +}); + +/** @internal */ +export type UpdateEnvsByServiceUuidResponseBody$Outbound = { + message?: string | undefined; +}; + +/** @internal */ +export const UpdateEnvsByServiceUuidResponseBody$outboundSchema: z.ZodType< + UpdateEnvsByServiceUuidResponseBody$Outbound, + z.ZodTypeDef, + UpdateEnvsByServiceUuidResponseBody +> = z.object({ + message: 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 UpdateEnvsByServiceUuidResponseBody$ { + /** @deprecated use `UpdateEnvsByServiceUuidResponseBody$inboundSchema` instead. */ + export const inboundSchema = + UpdateEnvsByServiceUuidResponseBody$inboundSchema; + /** @deprecated use `UpdateEnvsByServiceUuidResponseBody$outboundSchema` instead. */ + export const outboundSchema = + UpdateEnvsByServiceUuidResponseBody$outboundSchema; + /** @deprecated use `UpdateEnvsByServiceUuidResponseBody$Outbound` instead. */ + export type Outbound = UpdateEnvsByServiceUuidResponseBody$Outbound; +} + +export function updateEnvsByServiceUuidResponseBodyToJSON( + updateEnvsByServiceUuidResponseBody: UpdateEnvsByServiceUuidResponseBody, +): string { + return JSON.stringify( + UpdateEnvsByServiceUuidResponseBody$outboundSchema.parse( + updateEnvsByServiceUuidResponseBody, + ), + ); +} + +export function updateEnvsByServiceUuidResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + UpdateEnvsByServiceUuidResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateEnvsByServiceUuidResponseBody' from JSON`, + ); +} diff --git a/src/models/operations/updateprivatekey.ts b/src/models/operations/updateprivatekey.ts new file mode 100644 index 0000000..95dee6d --- /dev/null +++ b/src/models/operations/updateprivatekey.ts @@ -0,0 +1,148 @@ +/* + * 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 UpdatePrivateKeyRequestBody = { + name?: string | undefined; + description?: string | undefined; + privateKey: string; +}; + +/** + * The updated private key's UUID. + */ +export type UpdatePrivateKeyResponseBody = { + uuid?: string | undefined; +}; + +/** @internal */ +export const UpdatePrivateKeyRequestBody$inboundSchema: z.ZodType< + UpdatePrivateKeyRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string().optional(), + description: z.string().optional(), + private_key: z.string(), +}).transform((v) => { + return remap$(v, { + "private_key": "privateKey", + }); +}); + +/** @internal */ +export type UpdatePrivateKeyRequestBody$Outbound = { + name?: string | undefined; + description?: string | undefined; + private_key: string; +}; + +/** @internal */ +export const UpdatePrivateKeyRequestBody$outboundSchema: z.ZodType< + UpdatePrivateKeyRequestBody$Outbound, + z.ZodTypeDef, + UpdatePrivateKeyRequestBody +> = z.object({ + name: z.string().optional(), + description: z.string().optional(), + privateKey: z.string(), +}).transform((v) => { + return remap$(v, { + privateKey: "private_key", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdatePrivateKeyRequestBody$ { + /** @deprecated use `UpdatePrivateKeyRequestBody$inboundSchema` instead. */ + export const inboundSchema = UpdatePrivateKeyRequestBody$inboundSchema; + /** @deprecated use `UpdatePrivateKeyRequestBody$outboundSchema` instead. */ + export const outboundSchema = UpdatePrivateKeyRequestBody$outboundSchema; + /** @deprecated use `UpdatePrivateKeyRequestBody$Outbound` instead. */ + export type Outbound = UpdatePrivateKeyRequestBody$Outbound; +} + +export function updatePrivateKeyRequestBodyToJSON( + updatePrivateKeyRequestBody: UpdatePrivateKeyRequestBody, +): string { + return JSON.stringify( + UpdatePrivateKeyRequestBody$outboundSchema.parse( + updatePrivateKeyRequestBody, + ), + ); +} + +export function updatePrivateKeyRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdatePrivateKeyRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdatePrivateKeyRequestBody' from JSON`, + ); +} + +/** @internal */ +export const UpdatePrivateKeyResponseBody$inboundSchema: z.ZodType< + UpdatePrivateKeyResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string().optional(), +}); + +/** @internal */ +export type UpdatePrivateKeyResponseBody$Outbound = { + uuid?: string | undefined; +}; + +/** @internal */ +export const UpdatePrivateKeyResponseBody$outboundSchema: z.ZodType< + UpdatePrivateKeyResponseBody$Outbound, + z.ZodTypeDef, + UpdatePrivateKeyResponseBody +> = z.object({ + uuid: 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 UpdatePrivateKeyResponseBody$ { + /** @deprecated use `UpdatePrivateKeyResponseBody$inboundSchema` instead. */ + export const inboundSchema = UpdatePrivateKeyResponseBody$inboundSchema; + /** @deprecated use `UpdatePrivateKeyResponseBody$outboundSchema` instead. */ + export const outboundSchema = UpdatePrivateKeyResponseBody$outboundSchema; + /** @deprecated use `UpdatePrivateKeyResponseBody$Outbound` instead. */ + export type Outbound = UpdatePrivateKeyResponseBody$Outbound; +} + +export function updatePrivateKeyResponseBodyToJSON( + updatePrivateKeyResponseBody: UpdatePrivateKeyResponseBody, +): string { + return JSON.stringify( + UpdatePrivateKeyResponseBody$outboundSchema.parse( + updatePrivateKeyResponseBody, + ), + ); +} + +export function updatePrivateKeyResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdatePrivateKeyResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdatePrivateKeyResponseBody' from JSON`, + ); +} diff --git a/src/models/operations/updateprojectbyuuid.ts b/src/models/operations/updateprojectbyuuid.ts new file mode 100644 index 0000000..2a95385 --- /dev/null +++ b/src/models/operations/updateprojectbyuuid.ts @@ -0,0 +1,229 @@ +/* + * 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"; + +/** + * Project updated. + */ +export type UpdateProjectByUuidRequestBody = { + /** + * The name of the project. + */ + name?: string | undefined; + /** + * The description of the project. + */ + description?: string | undefined; +}; + +export type UpdateProjectByUuidRequest = { + /** + * UUID of the application. + */ + uuid: string; + /** + * Project updated. + */ + requestBody: UpdateProjectByUuidRequestBody; +}; + +/** + * Project updated. + */ +export type UpdateProjectByUuidResponseBody = { + uuid?: string | undefined; + name?: string | undefined; + description?: string | undefined; +}; + +/** @internal */ +export const UpdateProjectByUuidRequestBody$inboundSchema: z.ZodType< + UpdateProjectByUuidRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string().optional(), + description: z.string().optional(), +}); + +/** @internal */ +export type UpdateProjectByUuidRequestBody$Outbound = { + name?: string | undefined; + description?: string | undefined; +}; + +/** @internal */ +export const UpdateProjectByUuidRequestBody$outboundSchema: z.ZodType< + UpdateProjectByUuidRequestBody$Outbound, + z.ZodTypeDef, + UpdateProjectByUuidRequestBody +> = z.object({ + name: z.string().optional(), + description: 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 UpdateProjectByUuidRequestBody$ { + /** @deprecated use `UpdateProjectByUuidRequestBody$inboundSchema` instead. */ + export const inboundSchema = UpdateProjectByUuidRequestBody$inboundSchema; + /** @deprecated use `UpdateProjectByUuidRequestBody$outboundSchema` instead. */ + export const outboundSchema = UpdateProjectByUuidRequestBody$outboundSchema; + /** @deprecated use `UpdateProjectByUuidRequestBody$Outbound` instead. */ + export type Outbound = UpdateProjectByUuidRequestBody$Outbound; +} + +export function updateProjectByUuidRequestBodyToJSON( + updateProjectByUuidRequestBody: UpdateProjectByUuidRequestBody, +): string { + return JSON.stringify( + UpdateProjectByUuidRequestBody$outboundSchema.parse( + updateProjectByUuidRequestBody, + ), + ); +} + +export function updateProjectByUuidRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateProjectByUuidRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateProjectByUuidRequestBody' from JSON`, + ); +} + +/** @internal */ +export const UpdateProjectByUuidRequest$inboundSchema: z.ZodType< + UpdateProjectByUuidRequest, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string(), + RequestBody: z.lazy(() => UpdateProjectByUuidRequestBody$inboundSchema), +}).transform((v) => { + return remap$(v, { + "RequestBody": "requestBody", + }); +}); + +/** @internal */ +export type UpdateProjectByUuidRequest$Outbound = { + uuid: string; + RequestBody: UpdateProjectByUuidRequestBody$Outbound; +}; + +/** @internal */ +export const UpdateProjectByUuidRequest$outboundSchema: z.ZodType< + UpdateProjectByUuidRequest$Outbound, + z.ZodTypeDef, + UpdateProjectByUuidRequest +> = z.object({ + uuid: z.string(), + requestBody: z.lazy(() => UpdateProjectByUuidRequestBody$outboundSchema), +}).transform((v) => { + return remap$(v, { + requestBody: "RequestBody", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateProjectByUuidRequest$ { + /** @deprecated use `UpdateProjectByUuidRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateProjectByUuidRequest$inboundSchema; + /** @deprecated use `UpdateProjectByUuidRequest$outboundSchema` instead. */ + export const outboundSchema = UpdateProjectByUuidRequest$outboundSchema; + /** @deprecated use `UpdateProjectByUuidRequest$Outbound` instead. */ + export type Outbound = UpdateProjectByUuidRequest$Outbound; +} + +export function updateProjectByUuidRequestToJSON( + updateProjectByUuidRequest: UpdateProjectByUuidRequest, +): string { + return JSON.stringify( + UpdateProjectByUuidRequest$outboundSchema.parse(updateProjectByUuidRequest), + ); +} + +export function updateProjectByUuidRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateProjectByUuidRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateProjectByUuidRequest' from JSON`, + ); +} + +/** @internal */ +export const UpdateProjectByUuidResponseBody$inboundSchema: z.ZodType< + UpdateProjectByUuidResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string().optional(), + name: z.string().optional(), + description: z.string().optional(), +}); + +/** @internal */ +export type UpdateProjectByUuidResponseBody$Outbound = { + uuid?: string | undefined; + name?: string | undefined; + description?: string | undefined; +}; + +/** @internal */ +export const UpdateProjectByUuidResponseBody$outboundSchema: z.ZodType< + UpdateProjectByUuidResponseBody$Outbound, + z.ZodTypeDef, + UpdateProjectByUuidResponseBody +> = z.object({ + uuid: z.string().optional(), + name: z.string().optional(), + description: 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 UpdateProjectByUuidResponseBody$ { + /** @deprecated use `UpdateProjectByUuidResponseBody$inboundSchema` instead. */ + export const inboundSchema = UpdateProjectByUuidResponseBody$inboundSchema; + /** @deprecated use `UpdateProjectByUuidResponseBody$outboundSchema` instead. */ + export const outboundSchema = UpdateProjectByUuidResponseBody$outboundSchema; + /** @deprecated use `UpdateProjectByUuidResponseBody$Outbound` instead. */ + export type Outbound = UpdateProjectByUuidResponseBody$Outbound; +} + +export function updateProjectByUuidResponseBodyToJSON( + updateProjectByUuidResponseBody: UpdateProjectByUuidResponseBody, +): string { + return JSON.stringify( + UpdateProjectByUuidResponseBody$outboundSchema.parse( + updateProjectByUuidResponseBody, + ), + ); +} + +export function updateProjectByUuidResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateProjectByUuidResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateProjectByUuidResponseBody' from JSON`, + ); +} diff --git a/src/models/operations/updateserverbyuuid.ts b/src/models/operations/updateserverbyuuid.ts new file mode 100644 index 0000000..edb0523 --- /dev/null +++ b/src/models/operations/updateserverbyuuid.ts @@ -0,0 +1,258 @@ +/* + * 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"; + +/** + * The proxy type. + */ +export const UpdateServerByUuidProxyType = { + Traefik: "traefik", + Caddy: "caddy", + None: "none", +} as const; +/** + * The proxy type. + */ +export type UpdateServerByUuidProxyType = ClosedEnum< + typeof UpdateServerByUuidProxyType +>; + +/** + * Server updated. + */ +export type UpdateServerByUuidRequestBody = { + /** + * The name of the server. + */ + name?: string | undefined; + /** + * The description of the server. + */ + description?: string | undefined; + /** + * The IP of the server. + */ + ip?: string | undefined; + /** + * The port of the server. + */ + port?: number | undefined; + /** + * The user of the server. + */ + user?: string | undefined; + /** + * The UUID of the private key. + */ + privateKeyUuid?: string | undefined; + /** + * Is build server. + */ + isBuildServer?: boolean | undefined; + /** + * Instant validate. + */ + instantValidate?: boolean | undefined; + /** + * The proxy type. + */ + proxyType?: UpdateServerByUuidProxyType | undefined; +}; + +export type UpdateServerByUuidRequest = { + /** + * Server's UUID + */ + uuid: string; + /** + * Server updated. + */ + requestBody: UpdateServerByUuidRequestBody; +}; + +/** @internal */ +export const UpdateServerByUuidProxyType$inboundSchema: z.ZodNativeEnum< + typeof UpdateServerByUuidProxyType +> = z.nativeEnum(UpdateServerByUuidProxyType); + +/** @internal */ +export const UpdateServerByUuidProxyType$outboundSchema: z.ZodNativeEnum< + typeof UpdateServerByUuidProxyType +> = UpdateServerByUuidProxyType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateServerByUuidProxyType$ { + /** @deprecated use `UpdateServerByUuidProxyType$inboundSchema` instead. */ + export const inboundSchema = UpdateServerByUuidProxyType$inboundSchema; + /** @deprecated use `UpdateServerByUuidProxyType$outboundSchema` instead. */ + export const outboundSchema = UpdateServerByUuidProxyType$outboundSchema; +} + +/** @internal */ +export const UpdateServerByUuidRequestBody$inboundSchema: z.ZodType< + UpdateServerByUuidRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string().optional(), + description: z.string().optional(), + ip: z.string().optional(), + port: z.number().int().optional(), + user: z.string().optional(), + private_key_uuid: z.string().optional(), + is_build_server: z.boolean().optional(), + instant_validate: z.boolean().optional(), + proxy_type: UpdateServerByUuidProxyType$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "private_key_uuid": "privateKeyUuid", + "is_build_server": "isBuildServer", + "instant_validate": "instantValidate", + "proxy_type": "proxyType", + }); +}); + +/** @internal */ +export type UpdateServerByUuidRequestBody$Outbound = { + name?: string | undefined; + description?: string | undefined; + ip?: string | undefined; + port?: number | undefined; + user?: string | undefined; + private_key_uuid?: string | undefined; + is_build_server?: boolean | undefined; + instant_validate?: boolean | undefined; + proxy_type?: string | undefined; +}; + +/** @internal */ +export const UpdateServerByUuidRequestBody$outboundSchema: z.ZodType< + UpdateServerByUuidRequestBody$Outbound, + z.ZodTypeDef, + UpdateServerByUuidRequestBody +> = z.object({ + name: z.string().optional(), + description: z.string().optional(), + ip: z.string().optional(), + port: z.number().int().optional(), + user: z.string().optional(), + privateKeyUuid: z.string().optional(), + isBuildServer: z.boolean().optional(), + instantValidate: z.boolean().optional(), + proxyType: UpdateServerByUuidProxyType$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + privateKeyUuid: "private_key_uuid", + isBuildServer: "is_build_server", + instantValidate: "instant_validate", + proxyType: "proxy_type", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateServerByUuidRequestBody$ { + /** @deprecated use `UpdateServerByUuidRequestBody$inboundSchema` instead. */ + export const inboundSchema = UpdateServerByUuidRequestBody$inboundSchema; + /** @deprecated use `UpdateServerByUuidRequestBody$outboundSchema` instead. */ + export const outboundSchema = UpdateServerByUuidRequestBody$outboundSchema; + /** @deprecated use `UpdateServerByUuidRequestBody$Outbound` instead. */ + export type Outbound = UpdateServerByUuidRequestBody$Outbound; +} + +export function updateServerByUuidRequestBodyToJSON( + updateServerByUuidRequestBody: UpdateServerByUuidRequestBody, +): string { + return JSON.stringify( + UpdateServerByUuidRequestBody$outboundSchema.parse( + updateServerByUuidRequestBody, + ), + ); +} + +export function updateServerByUuidRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateServerByUuidRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateServerByUuidRequestBody' from JSON`, + ); +} + +/** @internal */ +export const UpdateServerByUuidRequest$inboundSchema: z.ZodType< + UpdateServerByUuidRequest, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string(), + RequestBody: z.lazy(() => UpdateServerByUuidRequestBody$inboundSchema), +}).transform((v) => { + return remap$(v, { + "RequestBody": "requestBody", + }); +}); + +/** @internal */ +export type UpdateServerByUuidRequest$Outbound = { + uuid: string; + RequestBody: UpdateServerByUuidRequestBody$Outbound; +}; + +/** @internal */ +export const UpdateServerByUuidRequest$outboundSchema: z.ZodType< + UpdateServerByUuidRequest$Outbound, + z.ZodTypeDef, + UpdateServerByUuidRequest +> = z.object({ + uuid: z.string(), + requestBody: z.lazy(() => UpdateServerByUuidRequestBody$outboundSchema), +}).transform((v) => { + return remap$(v, { + requestBody: "RequestBody", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateServerByUuidRequest$ { + /** @deprecated use `UpdateServerByUuidRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateServerByUuidRequest$inboundSchema; + /** @deprecated use `UpdateServerByUuidRequest$outboundSchema` instead. */ + export const outboundSchema = UpdateServerByUuidRequest$outboundSchema; + /** @deprecated use `UpdateServerByUuidRequest$Outbound` instead. */ + export type Outbound = UpdateServerByUuidRequest$Outbound; +} + +export function updateServerByUuidRequestToJSON( + updateServerByUuidRequest: UpdateServerByUuidRequest, +): string { + return JSON.stringify( + UpdateServerByUuidRequest$outboundSchema.parse(updateServerByUuidRequest), + ); +} + +export function updateServerByUuidRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateServerByUuidRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateServerByUuidRequest' from JSON`, + ); +} diff --git a/src/models/operations/validateserverbyuuid.ts b/src/models/operations/validateserverbyuuid.ts new file mode 100644 index 0000000..0136e3d --- /dev/null +++ b/src/models/operations/validateserverbyuuid.ts @@ -0,0 +1,134 @@ +/* + * 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 ValidateServerByUuidRequest = { + /** + * Server UUID + */ + uuid: string; +}; + +/** + * Server validation started. + */ +export type ValidateServerByUuidResponseBody = { + message?: string | undefined; +}; + +/** @internal */ +export const ValidateServerByUuidRequest$inboundSchema: z.ZodType< + ValidateServerByUuidRequest, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string(), +}); + +/** @internal */ +export type ValidateServerByUuidRequest$Outbound = { + uuid: string; +}; + +/** @internal */ +export const ValidateServerByUuidRequest$outboundSchema: z.ZodType< + ValidateServerByUuidRequest$Outbound, + z.ZodTypeDef, + ValidateServerByUuidRequest +> = z.object({ + uuid: 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 ValidateServerByUuidRequest$ { + /** @deprecated use `ValidateServerByUuidRequest$inboundSchema` instead. */ + export const inboundSchema = ValidateServerByUuidRequest$inboundSchema; + /** @deprecated use `ValidateServerByUuidRequest$outboundSchema` instead. */ + export const outboundSchema = ValidateServerByUuidRequest$outboundSchema; + /** @deprecated use `ValidateServerByUuidRequest$Outbound` instead. */ + export type Outbound = ValidateServerByUuidRequest$Outbound; +} + +export function validateServerByUuidRequestToJSON( + validateServerByUuidRequest: ValidateServerByUuidRequest, +): string { + return JSON.stringify( + ValidateServerByUuidRequest$outboundSchema.parse( + validateServerByUuidRequest, + ), + ); +} + +export function validateServerByUuidRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ValidateServerByUuidRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ValidateServerByUuidRequest' from JSON`, + ); +} + +/** @internal */ +export const ValidateServerByUuidResponseBody$inboundSchema: z.ZodType< + ValidateServerByUuidResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + message: z.string().optional(), +}); + +/** @internal */ +export type ValidateServerByUuidResponseBody$Outbound = { + message?: string | undefined; +}; + +/** @internal */ +export const ValidateServerByUuidResponseBody$outboundSchema: z.ZodType< + ValidateServerByUuidResponseBody$Outbound, + z.ZodTypeDef, + ValidateServerByUuidResponseBody +> = z.object({ + message: 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 ValidateServerByUuidResponseBody$ { + /** @deprecated use `ValidateServerByUuidResponseBody$inboundSchema` instead. */ + export const inboundSchema = ValidateServerByUuidResponseBody$inboundSchema; + /** @deprecated use `ValidateServerByUuidResponseBody$outboundSchema` instead. */ + export const outboundSchema = ValidateServerByUuidResponseBody$outboundSchema; + /** @deprecated use `ValidateServerByUuidResponseBody$Outbound` instead. */ + export type Outbound = ValidateServerByUuidResponseBody$Outbound; +} + +export function validateServerByUuidResponseBodyToJSON( + validateServerByUuidResponseBody: ValidateServerByUuidResponseBody, +): string { + return JSON.stringify( + ValidateServerByUuidResponseBody$outboundSchema.parse( + validateServerByUuidResponseBody, + ), + ); +} + +export function validateServerByUuidResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ValidateServerByUuidResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ValidateServerByUuidResponseBody' from JSON`, + ); +} diff --git a/src/sdk/api.ts b/src/sdk/api.ts new file mode 100644 index 0000000..7473378 --- /dev/null +++ b/src/sdk/api.ts @@ -0,0 +1,41 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { apiDisable } from "../funcs/apiDisable.js"; +import { apiEnable } from "../funcs/apiEnable.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Api extends ClientSDK { + /** + * Enable API + * + * @remarks + * Enable API (only with root permissions). + */ + async enable( + options?: RequestOptions, + ): Promise { + return unwrapAsync(apiEnable( + this, + options, + )); + } + + /** + * Disable API + * + * @remarks + * Disable API (only with root permissions). + */ + async disable( + options?: RequestOptions, + ): Promise { + return unwrapAsync(apiDisable( + this, + options, + )); + } +} diff --git a/src/sdk/applications.ts b/src/sdk/applications.ts new file mode 100644 index 0000000..e844364 --- /dev/null +++ b/src/sdk/applications.ts @@ -0,0 +1,350 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { applicationsCreateDockerCompose } from "../funcs/applicationsCreateDockerCompose.js"; +import { applicationsCreateDockerfile } from "../funcs/applicationsCreateDockerfile.js"; +import { applicationsCreateDockerImage } from "../funcs/applicationsCreateDockerImage.js"; +import { applicationsCreateEnv } from "../funcs/applicationsCreateEnv.js"; +import { applicationsCreatePrivateDeployKey } from "../funcs/applicationsCreatePrivateDeployKey.js"; +import { applicationsCreatePrivateGithubApp } from "../funcs/applicationsCreatePrivateGithubApp.js"; +import { applicationsCreatePublic } from "../funcs/applicationsCreatePublic.js"; +import { applicationsDelete } from "../funcs/applicationsDelete.js"; +import { applicationsDeleteEnv } from "../funcs/applicationsDeleteEnv.js"; +import { applicationsExecuteCommand } from "../funcs/applicationsExecuteCommand.js"; +import { applicationsGet } from "../funcs/applicationsGet.js"; +import { applicationsList } from "../funcs/applicationsList.js"; +import { applicationsListEnvs } from "../funcs/applicationsListEnvs.js"; +import { applicationsRestart } from "../funcs/applicationsRestart.js"; +import { applicationsStart } from "../funcs/applicationsStart.js"; +import { applicationsStop } from "../funcs/applicationsStop.js"; +import { applicationsUpdate } from "../funcs/applicationsUpdate.js"; +import { applicationsUpdateEnv } from "../funcs/applicationsUpdateEnv.js"; +import { applicationsUpdateEnvsBulk } from "../funcs/applicationsUpdateEnvsBulk.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as components from "../models/components/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Applications extends ClientSDK { + /** + * List + * + * @remarks + * List all applications. + */ + async list( + options?: RequestOptions, + ): Promise> { + return unwrapAsync(applicationsList( + this, + options, + )); + } + + /** + * Create (Public) + * + * @remarks + * Create new application based on a public git repository. + */ + async createPublic( + request: operations.CreatePublicApplicationRequestBody, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationsCreatePublic( + this, + request, + options, + )); + } + + /** + * Create (Private - GH App) + * + * @remarks + * Create new application based on a private repository through a Github App. + */ + async createPrivateGithubApp( + request: operations.CreatePrivateGithubAppApplicationRequestBody, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationsCreatePrivateGithubApp( + this, + request, + options, + )); + } + + /** + * Create (Private - Deploy Key) + * + * @remarks + * Create new application based on a private repository through a Deploy Key. + */ + async createPrivateDeployKey( + request: operations.CreatePrivateDeployKeyApplicationRequestBody, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationsCreatePrivateDeployKey( + this, + request, + options, + )); + } + + /** + * Create (Dockerfile) + * + * @remarks + * Create new application based on a simple Dockerfile. + */ + async createDockerfile( + request: operations.CreateDockerfileApplicationRequestBody, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationsCreateDockerfile( + this, + request, + options, + )); + } + + /** + * Create (Docker Image) + * + * @remarks + * Create new application based on a prebuilt docker image + */ + async createDockerImage( + request: operations.CreateDockerimageApplicationRequestBody, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationsCreateDockerImage( + this, + request, + options, + )); + } + + /** + * Create (Docker Compose) + * + * @remarks + * Create new application based on a docker-compose file. + */ + async createDockerCompose( + request: operations.CreateDockercomposeApplicationRequestBody, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationsCreateDockerCompose( + this, + request, + options, + )); + } + + /** + * Get + * + * @remarks + * Get application by UUID. + */ + async get( + request: operations.GetApplicationByUuidRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationsGet( + this, + request, + options, + )); + } + + /** + * Delete + * + * @remarks + * Delete application by UUID. + */ + async delete( + request: operations.DeleteApplicationByUuidRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationsDelete( + this, + request, + options, + )); + } + + /** + * Update + * + * @remarks + * Update application by UUID. + */ + async update( + request: operations.UpdateApplicationByUuidRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationsUpdate( + this, + request, + options, + )); + } + + /** + * List Envs + * + * @remarks + * List all envs by application UUID. + */ + async listEnvs( + request: operations.ListEnvsByApplicationUuidRequest, + options?: RequestOptions, + ): Promise> { + return unwrapAsync(applicationsListEnvs( + this, + request, + options, + )); + } + + /** + * Create Env + * + * @remarks + * Create env by application UUID. + */ + async createEnv( + request: operations.CreateEnvByApplicationUuidRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationsCreateEnv( + this, + request, + options, + )); + } + + /** + * Update Env + * + * @remarks + * Update env by application UUID. + */ + async updateEnv( + request: operations.UpdateEnvByApplicationUuidRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationsUpdateEnv( + this, + request, + options, + )); + } + + /** + * Update Envs (Bulk) + * + * @remarks + * Update multiple envs by application UUID. + */ + async updateEnvsBulk( + request: operations.UpdateEnvsByApplicationUuidRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationsUpdateEnvsBulk( + this, + request, + options, + )); + } + + /** + * Delete Env + * + * @remarks + * Delete env by UUID. + */ + async deleteEnv( + request: operations.DeleteEnvByApplicationUuidRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationsDeleteEnv( + this, + request, + options, + )); + } + + /** + * Start + * + * @remarks + * Start application. `Post` request is also accepted. + */ + async start( + request: operations.StartApplicationByUuidRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationsStart( + this, + request, + options, + )); + } + + /** + * Stop + * + * @remarks + * Stop application. `Post` request is also accepted. + */ + async stop( + request: operations.StopApplicationByUuidRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationsStop( + this, + request, + options, + )); + } + + /** + * Restart + * + * @remarks + * Restart application. `Post` request is also accepted. + */ + async restart( + request: operations.RestartApplicationByUuidRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationsRestart( + this, + request, + options, + )); + } + + /** + * Execute Command + * + * @remarks + * Execute a command on the application's current container. + */ + async executeCommand( + request: operations.ExecuteCommandApplicationRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationsExecuteCommand( + this, + request, + options, + )); + } +} diff --git a/src/sdk/databases.ts b/src/sdk/databases.ts new file mode 100644 index 0000000..6096053 --- /dev/null +++ b/src/sdk/databases.ts @@ -0,0 +1,277 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { databasesCreateClickhouse } from "../funcs/databasesCreateClickhouse.js"; +import { databasesCreateDragonfly } from "../funcs/databasesCreateDragonfly.js"; +import { databasesCreateKeydb } from "../funcs/databasesCreateKeydb.js"; +import { databasesCreateMariadb } from "../funcs/databasesCreateMariadb.js"; +import { databasesCreateMongodb } from "../funcs/databasesCreateMongodb.js"; +import { databasesCreateMysql } from "../funcs/databasesCreateMysql.js"; +import { databasesCreatePostgresql } from "../funcs/databasesCreatePostgresql.js"; +import { databasesCreateRedis } from "../funcs/databasesCreateRedis.js"; +import { databasesDelete } from "../funcs/databasesDelete.js"; +import { databasesGet } from "../funcs/databasesGet.js"; +import { databasesList } from "../funcs/databasesList.js"; +import { databasesRestart } from "../funcs/databasesRestart.js"; +import { databasesStart } from "../funcs/databasesStart.js"; +import { databasesStop } from "../funcs/databasesStop.js"; +import { databasesUpdate } from "../funcs/databasesUpdate.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Databases extends ClientSDK { + /** + * List + * + * @remarks + * List all databases. + */ + async list( + options?: RequestOptions, + ): Promise { + return unwrapAsync(databasesList( + this, + options, + )); + } + + /** + * Get + * + * @remarks + * Get database by UUID. + */ + async get( + request: operations.GetDatabaseByUuidRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(databasesGet( + this, + request, + options, + )); + } + + /** + * Delete + * + * @remarks + * Delete database by UUID. + */ + async delete( + request: operations.DeleteDatabaseByUuidRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(databasesDelete( + this, + request, + options, + )); + } + + /** + * Update + * + * @remarks + * Update database by UUID. + */ + async update( + request: operations.UpdateDatabaseByUuidRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(databasesUpdate( + this, + request, + options, + )); + } + + /** + * Create (PostgreSQL) + * + * @remarks + * Create a new PostgreSQL database. + */ + async createPostgresql( + request: operations.CreateDatabasePostgresqlRequestBody, + options?: RequestOptions, + ): Promise { + return unwrapAsync(databasesCreatePostgresql( + this, + request, + options, + )); + } + + /** + * Create (Clickhouse) + * + * @remarks + * Create a new Clickhouse database. + */ + async createClickhouse( + request: operations.CreateDatabaseClickhouseRequestBody, + options?: RequestOptions, + ): Promise { + return unwrapAsync(databasesCreateClickhouse( + this, + request, + options, + )); + } + + /** + * Create (DragonFly) + * + * @remarks + * Create a new DragonFly database. + */ + async createDragonfly( + request: operations.CreateDatabaseDragonflyRequestBody, + options?: RequestOptions, + ): Promise { + return unwrapAsync(databasesCreateDragonfly( + this, + request, + options, + )); + } + + /** + * Create (Redis) + * + * @remarks + * Create a new Redis database. + */ + async createRedis( + request: operations.CreateDatabaseRedisRequestBody, + options?: RequestOptions, + ): Promise { + return unwrapAsync(databasesCreateRedis( + this, + request, + options, + )); + } + + /** + * Create (KeyDB) + * + * @remarks + * Create a new KeyDB database. + */ + async createKeydb( + request: operations.CreateDatabaseKeydbRequestBody, + options?: RequestOptions, + ): Promise { + return unwrapAsync(databasesCreateKeydb( + this, + request, + options, + )); + } + + /** + * Create (MariaDB) + * + * @remarks + * Create a new MariaDB database. + */ + async createMariadb( + request: operations.CreateDatabaseMariadbRequestBody, + options?: RequestOptions, + ): Promise { + return unwrapAsync(databasesCreateMariadb( + this, + request, + options, + )); + } + + /** + * Create (MySQL) + * + * @remarks + * Create a new MySQL database. + */ + async createMysql( + request: operations.CreateDatabaseMysqlRequestBody, + options?: RequestOptions, + ): Promise { + return unwrapAsync(databasesCreateMysql( + this, + request, + options, + )); + } + + /** + * Create (MongoDB) + * + * @remarks + * Create a new MongoDB database. + */ + async createMongodb( + request: operations.CreateDatabaseMongodbRequestBody, + options?: RequestOptions, + ): Promise { + return unwrapAsync(databasesCreateMongodb( + this, + request, + options, + )); + } + + /** + * Start + * + * @remarks + * Start database. `Post` request is also accepted. + */ + async start( + request: operations.StartDatabaseByUuidRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(databasesStart( + this, + request, + options, + )); + } + + /** + * Stop + * + * @remarks + * Stop database. `Post` request is also accepted. + */ + async stop( + request: operations.StopDatabaseByUuidRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(databasesStop( + this, + request, + options, + )); + } + + /** + * Restart + * + * @remarks + * Restart database. `Post` request is also accepted. + */ + async restart( + request: operations.RestartDatabaseByUuidRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(databasesRestart( + this, + request, + options, + )); + } +} diff --git a/src/sdk/deployments.ts b/src/sdk/deployments.ts new file mode 100644 index 0000000..24a5154 --- /dev/null +++ b/src/sdk/deployments.ts @@ -0,0 +1,62 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { deploymentsDeployByTagOrUuid } from "../funcs/deploymentsDeployByTagOrUuid.js"; +import { deploymentsGet } from "../funcs/deploymentsGet.js"; +import { deploymentsList } from "../funcs/deploymentsList.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as components from "../models/components/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Deployments extends ClientSDK { + /** + * List + * + * @remarks + * List currently running deployments + */ + async list( + options?: RequestOptions, + ): Promise> { + return unwrapAsync(deploymentsList( + this, + options, + )); + } + + /** + * Get + * + * @remarks + * Get deployment by UUID. + */ + async get( + request: operations.GetDeploymentByUuidRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(deploymentsGet( + this, + request, + options, + )); + } + + /** + * Deploy + * + * @remarks + * Deploy by tag or uuid. `Post` request also accepted. + */ + async deployByTagOrUuid( + request: operations.DeployByTagOrUuidRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(deploymentsDeployByTagOrUuid( + this, + request, + options, + )); + } +} diff --git a/src/sdk/health.ts b/src/sdk/health.ts new file mode 100644 index 0000000..24a7e3a --- /dev/null +++ b/src/sdk/health.ts @@ -0,0 +1,24 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { healthCheck } from "../funcs/healthCheck.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Health extends ClientSDK { + /** + * Healthcheck + * + * @remarks + * Healthcheck endpoint. + */ + async check( + options?: RequestOptions, + ): Promise { + return unwrapAsync(healthCheck( + this, + 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/privatekeys.ts b/src/sdk/privatekeys.ts new file mode 100644 index 0000000..a26ad4d --- /dev/null +++ b/src/sdk/privatekeys.ts @@ -0,0 +1,98 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { privateKeysCreate } from "../funcs/privateKeysCreate.js"; +import { privateKeysDelete } from "../funcs/privateKeysDelete.js"; +import { privateKeysGet } from "../funcs/privateKeysGet.js"; +import { privateKeysList } from "../funcs/privateKeysList.js"; +import { privateKeysUpdate } from "../funcs/privateKeysUpdate.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as components from "../models/components/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class PrivateKeys extends ClientSDK { + /** + * List + * + * @remarks + * List all private keys. + */ + async list( + options?: RequestOptions, + ): Promise> { + return unwrapAsync(privateKeysList( + this, + options, + )); + } + + /** + * Create + * + * @remarks + * Create a new private key. + */ + async create( + request: operations.CreatePrivateKeyRequestBody, + options?: RequestOptions, + ): Promise { + return unwrapAsync(privateKeysCreate( + this, + request, + options, + )); + } + + /** + * Update + * + * @remarks + * Update a private key. + */ + async update( + request: operations.UpdatePrivateKeyRequestBody, + options?: RequestOptions, + ): Promise { + return unwrapAsync(privateKeysUpdate( + this, + request, + options, + )); + } + + /** + * Get + * + * @remarks + * Get key by UUID. + */ + async get( + request: operations.GetPrivateKeyByUuidRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(privateKeysGet( + this, + request, + options, + )); + } + + /** + * Delete + * + * @remarks + * Delete a private key. + */ + async delete( + request: operations.DeletePrivateKeyByUuidRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(privateKeysDelete( + this, + request, + options, + )); + } +} diff --git a/src/sdk/projects.ts b/src/sdk/projects.ts new file mode 100644 index 0000000..5fa2ff5 --- /dev/null +++ b/src/sdk/projects.ts @@ -0,0 +1,116 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { projectsCreate } from "../funcs/projectsCreate.js"; +import { projectsDelete } from "../funcs/projectsDelete.js"; +import { projectsGet } from "../funcs/projectsGet.js"; +import { projectsGetEnvironment } from "../funcs/projectsGetEnvironment.js"; +import { projectsList } from "../funcs/projectsList.js"; +import { projectsUpdate } from "../funcs/projectsUpdate.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as components from "../models/components/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Projects extends ClientSDK { + /** + * List + * + * @remarks + * List projects. + */ + async list( + options?: RequestOptions, + ): Promise> { + return unwrapAsync(projectsList( + this, + options, + )); + } + + /** + * Create + * + * @remarks + * Create Project. + */ + async create( + request: operations.CreateProjectRequestBody, + options?: RequestOptions, + ): Promise { + return unwrapAsync(projectsCreate( + this, + request, + options, + )); + } + + /** + * Get + * + * @remarks + * Get project by UUID. + */ + async get( + request: operations.GetProjectByUuidRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(projectsGet( + this, + request, + options, + )); + } + + /** + * Delete + * + * @remarks + * Delete project by UUID. + */ + async delete( + request: operations.DeleteProjectByUuidRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(projectsDelete( + this, + request, + options, + )); + } + + /** + * Update + * + * @remarks + * Update Project. + */ + async update( + request: operations.UpdateProjectByUuidRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(projectsUpdate( + this, + request, + options, + )); + } + + /** + * Environment + * + * @remarks + * Get environment by name. + */ + async getEnvironment( + request: operations.GetEnvironmentByNameRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(projectsGetEnvironment( + this, + request, + options, + )); + } +} diff --git a/src/sdk/resources.ts b/src/sdk/resources.ts new file mode 100644 index 0000000..4c0430c --- /dev/null +++ b/src/sdk/resources.ts @@ -0,0 +1,24 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { resourcesList } from "../funcs/resourcesList.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Resources extends ClientSDK { + /** + * List + * + * @remarks + * Get all resources. + */ + async list( + options?: RequestOptions, + ): Promise { + return unwrapAsync(resourcesList( + this, + options, + )); + } +} diff --git a/src/sdk/sdk.ts b/src/sdk/sdk.ts new file mode 100644 index 0000000..78c618e --- /dev/null +++ b/src/sdk/sdk.ts @@ -0,0 +1,79 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ClientSDK } from "../lib/sdks.js"; +import { Api } from "./api.js"; +import { Applications } from "./applications.js"; +import { Databases } from "./databases.js"; +import { Deployments } from "./deployments.js"; +import { Health } from "./health.js"; +import { PrivateKeys } from "./privatekeys.js"; +import { Projects } from "./projects.js"; +import { Resources } from "./resources.js"; +import { Servers } from "./servers.js"; +import { Services } from "./services.js"; +import { Teams } from "./teams.js"; +import { Version } from "./version.js"; + +export class Coolify extends ClientSDK { + private _applications?: Applications; + get applications(): Applications { + return (this._applications ??= new Applications(this._options)); + } + + private _databases?: Databases; + get databases(): Databases { + return (this._databases ??= new Databases(this._options)); + } + + private _deployments?: Deployments; + get deployments(): Deployments { + return (this._deployments ??= new Deployments(this._options)); + } + + private _version?: Version; + get version(): Version { + return (this._version ??= new Version(this._options)); + } + + private _api?: Api; + get api(): Api { + return (this._api ??= new Api(this._options)); + } + + private _health?: Health; + get health(): Health { + return (this._health ??= new Health(this._options)); + } + + private _projects?: Projects; + get projects(): Projects { + return (this._projects ??= new Projects(this._options)); + } + + private _resources?: Resources; + get resources(): Resources { + return (this._resources ??= new Resources(this._options)); + } + + private _privateKeys?: PrivateKeys; + get privateKeys(): PrivateKeys { + return (this._privateKeys ??= new PrivateKeys(this._options)); + } + + private _servers?: Servers; + get servers(): Servers { + return (this._servers ??= new Servers(this._options)); + } + + private _services?: Services; + get services(): Services { + return (this._services ??= new Services(this._options)); + } + + private _teams?: Teams; + get teams(): Teams { + return (this._teams ??= new Teams(this._options)); + } +} diff --git a/src/sdk/servers.ts b/src/sdk/servers.ts new file mode 100644 index 0000000..a281558 --- /dev/null +++ b/src/sdk/servers.ts @@ -0,0 +1,152 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { serversCreate } from "../funcs/serversCreate.js"; +import { serversDelete } from "../funcs/serversDelete.js"; +import { serversGet } from "../funcs/serversGet.js"; +import { serversGetDomains } from "../funcs/serversGetDomains.js"; +import { serversGetResources } from "../funcs/serversGetResources.js"; +import { serversList } from "../funcs/serversList.js"; +import { serversUpdate } from "../funcs/serversUpdate.js"; +import { serversValidate } from "../funcs/serversValidate.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as components from "../models/components/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Servers extends ClientSDK { + /** + * List + * + * @remarks + * List all servers. + */ + async list( + options?: RequestOptions, + ): Promise> { + return unwrapAsync(serversList( + this, + options, + )); + } + + /** + * Create + * + * @remarks + * Create Server. + */ + async create( + request: operations.CreateServerRequestBody, + options?: RequestOptions, + ): Promise { + return unwrapAsync(serversCreate( + this, + request, + options, + )); + } + + /** + * Get + * + * @remarks + * Get server by UUID. + */ + async get( + request: operations.GetServerByUuidRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(serversGet( + this, + request, + options, + )); + } + + /** + * Delete + * + * @remarks + * Delete server by UUID. + */ + async delete( + request: operations.DeleteServerByUuidRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(serversDelete( + this, + request, + options, + )); + } + + /** + * Update + * + * @remarks + * Update Server. + */ + async update( + request: operations.UpdateServerByUuidRequest, + options?: RequestOptions, + ): Promise> { + return unwrapAsync(serversUpdate( + this, + request, + options, + )); + } + + /** + * Resources + * + * @remarks + * Get resources by server. + */ + async getResources( + request: operations.GetResourcesByServerUuidRequest, + options?: RequestOptions, + ): Promise> { + return unwrapAsync(serversGetResources( + this, + request, + options, + )); + } + + /** + * Domains + * + * @remarks + * Get domains by server. + */ + async getDomains( + request: operations.GetDomainsByServerUuidRequest, + options?: RequestOptions, + ): Promise> { + return unwrapAsync(serversGetDomains( + this, + request, + options, + )); + } + + /** + * Validate + * + * @remarks + * Validate server by UUID. + */ + async validate( + request: operations.ValidateServerByUuidRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(serversValidate( + this, + request, + options, + )); + } +} diff --git a/src/sdk/services.ts b/src/sdk/services.ts new file mode 100644 index 0000000..82b5454 --- /dev/null +++ b/src/sdk/services.ts @@ -0,0 +1,224 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { servicesCreate } from "../funcs/servicesCreate.js"; +import { servicesCreateEnv } from "../funcs/servicesCreateEnv.js"; +import { servicesDelete } from "../funcs/servicesDelete.js"; +import { servicesDeleteEnv } from "../funcs/servicesDeleteEnv.js"; +import { servicesGet } from "../funcs/servicesGet.js"; +import { servicesList } from "../funcs/servicesList.js"; +import { servicesListEnvs } from "../funcs/servicesListEnvs.js"; +import { servicesRestart } from "../funcs/servicesRestart.js"; +import { servicesStart } from "../funcs/servicesStart.js"; +import { servicesStop } from "../funcs/servicesStop.js"; +import { servicesUpdateEnv } from "../funcs/servicesUpdateEnv.js"; +import { servicesUpdateEnvsBulk } from "../funcs/servicesUpdateEnvsBulk.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as components from "../models/components/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Services extends ClientSDK { + /** + * List + * + * @remarks + * List all services. + */ + async list( + options?: RequestOptions, + ): Promise> { + return unwrapAsync(servicesList( + this, + options, + )); + } + + /** + * Create + * + * @remarks + * Create a one-click service + */ + async create( + request: operations.CreateServiceRequestBody, + options?: RequestOptions, + ): Promise { + return unwrapAsync(servicesCreate( + this, + request, + options, + )); + } + + /** + * Get + * + * @remarks + * Get service by UUID. + */ + async get( + request: operations.GetServiceByUuidRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(servicesGet( + this, + request, + options, + )); + } + + /** + * Delete + * + * @remarks + * Delete service by UUID. + */ + async delete( + request: operations.DeleteServiceByUuidRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(servicesDelete( + this, + request, + options, + )); + } + + /** + * List Envs + * + * @remarks + * List all envs by service UUID. + */ + async listEnvs( + request: operations.ListEnvsByServiceUuidRequest, + options?: RequestOptions, + ): Promise> { + return unwrapAsync(servicesListEnvs( + this, + request, + options, + )); + } + + /** + * Create Env + * + * @remarks + * Create env by service UUID. + */ + async createEnv( + request: operations.CreateEnvByServiceUuidRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(servicesCreateEnv( + this, + request, + options, + )); + } + + /** + * Update Env + * + * @remarks + * Update env by service UUID. + */ + async updateEnv( + request: operations.UpdateEnvByServiceUuidRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(servicesUpdateEnv( + this, + request, + options, + )); + } + + /** + * Update Envs (Bulk) + * + * @remarks + * Update multiple envs by service UUID. + */ + async updateEnvsBulk( + request: operations.UpdateEnvsByServiceUuidRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(servicesUpdateEnvsBulk( + this, + request, + options, + )); + } + + /** + * Delete Env + * + * @remarks + * Delete env by UUID. + */ + async deleteEnv( + request: operations.DeleteEnvByServiceUuidRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(servicesDeleteEnv( + this, + request, + options, + )); + } + + /** + * Start + * + * @remarks + * Start service. `Post` request is also accepted. + */ + async start( + request: operations.StartServiceByUuidRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(servicesStart( + this, + request, + options, + )); + } + + /** + * Stop + * + * @remarks + * Stop service. `Post` request is also accepted. + */ + async stop( + request: operations.StopServiceByUuidRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(servicesStop( + this, + request, + options, + )); + } + + /** + * Restart + * + * @remarks + * Restart service. `Post` request is also accepted. + */ + async restart( + request: operations.RestartServiceByUuidRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(servicesRestart( + this, + request, + options, + )); + } +} diff --git a/src/sdk/teams.ts b/src/sdk/teams.ts new file mode 100644 index 0000000..586ea2f --- /dev/null +++ b/src/sdk/teams.ts @@ -0,0 +1,94 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { teamsGet } from "../funcs/teamsGet.js"; +import { teamsGetCurrent } from "../funcs/teamsGetCurrent.js"; +import { teamsGetCurrentMembers } from "../funcs/teamsGetCurrentMembers.js"; +import { teamsGetMembers } from "../funcs/teamsGetMembers.js"; +import { teamsList } from "../funcs/teamsList.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as components from "../models/components/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Teams extends ClientSDK { + /** + * List + * + * @remarks + * Get all teams. + */ + async list( + options?: RequestOptions, + ): Promise> { + return unwrapAsync(teamsList( + this, + options, + )); + } + + /** + * Get + * + * @remarks + * Get team by TeamId. + */ + async get( + request: operations.GetTeamByIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(teamsGet( + this, + request, + options, + )); + } + + /** + * Members + * + * @remarks + * Get members by TeamId. + */ + async getMembers( + request: operations.GetMembersByTeamIdRequest, + options?: RequestOptions, + ): Promise> { + return unwrapAsync(teamsGetMembers( + this, + request, + options, + )); + } + + /** + * Authenticated Team + * + * @remarks + * Get currently authenticated team. + */ + async getCurrent( + options?: RequestOptions, + ): Promise { + return unwrapAsync(teamsGetCurrent( + this, + options, + )); + } + + /** + * Authenticated Team Members + * + * @remarks + * Get currently authenticated team members. + */ + async getCurrentMembers( + options?: RequestOptions, + ): Promise> { + return unwrapAsync(teamsGetCurrentMembers( + this, + options, + )); + } +} diff --git a/src/sdk/version.ts b/src/sdk/version.ts new file mode 100644 index 0000000..e1436ea --- /dev/null +++ b/src/sdk/version.ts @@ -0,0 +1,24 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { versionGet } from "../funcs/versionGet.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Version extends ClientSDK { + /** + * Version + * + * @remarks + * Get Coolify version. + */ + async get( + options?: RequestOptions, + ): Promise { + return unwrapAsync(versionGet( + this, + options, + )); + } +} 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..c0a4409 --- /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 equivelant 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..0952f6f --- /dev/null +++ b/src/types/operations.ts @@ -0,0 +1,99 @@ +/* + * 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; +}; + +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>>, +): Promise> { + const resultIter = await iteratorPromise; + + if (!resultIter.ok) { + throw resultIter.error; + } + + return { + ...resultIter.value, + next: unwrapPaginator(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; + }); + }; +} 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..7a86d2d --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,40 @@ +{ + "compilerOptions": { + "incremental": true, + "tsBuildInfoFile": ".tsbuildinfo", + "target": "ES2018", + "lib": ["ES2022", "DOM", "DOM.Iterable"], + + "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"] +}