@devopness/sdk-js
Advanced tools
Comparing version 1.23.0 to 1.24.0
@@ -35,3 +35,3 @@ /** | ||
* @summary Update a given environment | ||
* @param {number} environmentId Unique ID of the environment to delete | ||
* @param {number} environmentId Unique ID of the environment to update | ||
* @param {EnvironmentUpdate} environmentUpdate A JSON object containing environment data | ||
@@ -38,0 +38,0 @@ */ |
@@ -63,3 +63,3 @@ "use strict"; | ||
* @summary Update a given environment | ||
* @param {number} environmentId Unique ID of the environment to delete | ||
* @param {number} environmentId Unique ID of the environment to update | ||
* @param {EnvironmentUpdate} environmentUpdate A JSON object containing environment data | ||
@@ -66,0 +66,0 @@ */ |
@@ -15,2 +15,4 @@ /** | ||
import { Project } from '../../generated/models'; | ||
import { ProjectCreate } from '../../generated/models'; | ||
import { ProjectUpdate } from '../../generated/models'; | ||
/** | ||
@@ -23,5 +25,5 @@ * ProjectsApiService - Auto-generated | ||
* @summary Create a new project | ||
* @param {Project} project A JSON object containing project data | ||
* @param {ProjectCreate} projectCreate A JSON object containing project data | ||
*/ | ||
addProject(project: Project): Promise<ApiResponse<Project>>; | ||
addProject(projectCreate: ProjectCreate): Promise<ApiResponse<Project>>; | ||
/** | ||
@@ -42,5 +44,5 @@ * | ||
* @param {number} projectId Numeric ID of the project to put | ||
* @param {Project} project A JSON object containing project data | ||
* @param {ProjectUpdate} projectUpdate A JSON object containing project data | ||
*/ | ||
updateProject(projectId: number, project: Project): Promise<ApiResponse<void>>; | ||
updateProject(projectId: number, projectUpdate: ProjectUpdate): Promise<ApiResponse<void>>; | ||
} |
@@ -35,10 +35,10 @@ "use strict"; | ||
* @summary Create a new project | ||
* @param {Project} project A JSON object containing project data | ||
* @param {ProjectCreate} projectCreate A JSON object containing project data | ||
*/ | ||
addProject(project) { | ||
addProject(projectCreate) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
if (project === null || project === undefined) { | ||
throw new Exceptions_1.ArgumentNullException('project', 'addProject'); | ||
if (projectCreate === null || projectCreate === undefined) { | ||
throw new Exceptions_1.ArgumentNullException('projectCreate', 'addProject'); | ||
} | ||
const response = yield this.post(`/projects`, project); | ||
const response = yield this.post(`/projects`, projectCreate); | ||
return new ApiResponse_1.ApiResponse(response); | ||
@@ -75,5 +75,5 @@ }); | ||
* @param {number} projectId Numeric ID of the project to put | ||
* @param {Project} project A JSON object containing project data | ||
* @param {ProjectUpdate} projectUpdate A JSON object containing project data | ||
*/ | ||
updateProject(projectId, project) { | ||
updateProject(projectId, projectUpdate) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
@@ -83,6 +83,6 @@ if (projectId === null || projectId === undefined) { | ||
} | ||
if (project === null || project === undefined) { | ||
throw new Exceptions_1.ArgumentNullException('project', 'updateProject'); | ||
if (projectUpdate === null || projectUpdate === undefined) { | ||
throw new Exceptions_1.ArgumentNullException('projectUpdate', 'updateProject'); | ||
} | ||
const response = yield this.put(`/projects/{project_id}`.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId))), project); | ||
const response = yield this.put(`/projects/{project_id}`.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId))), projectUpdate); | ||
return new ApiResponse_1.ApiResponse(response); | ||
@@ -89,0 +89,0 @@ }); |
@@ -12,3 +12,2 @@ /** | ||
*/ | ||
import { ApplicationDeploymentSettings } from './application-deployment-settings'; | ||
import { EnvironmentLinkItem } from './environment-link-item'; | ||
@@ -22,2 +21,8 @@ /** | ||
/** | ||
* Numeric ID of the source provider account where the repository is hosted. Required when the `repository` field is informed. | ||
* @type {number} | ||
* @memberof ApplicationCreate | ||
*/ | ||
source_provider_id: number; | ||
/** | ||
* A domain name that points to application main web address. Can be a naked domain or any subdomain. If app has domain names `testing.my-app.com`, `staging.my-app.com` and `www.my-app.com` a possible good candidate for the application name would be the \"naked\" domain `my-app.com` | ||
@@ -29,7 +34,7 @@ * @type {string} | ||
/** | ||
* Numeric ID of the source provider account where the repository is hosted. Required when the `repository` field is informed. | ||
* @type {number} | ||
* The sub-domain through which the application deployed with these settings will be accessed | ||
* @type {string} | ||
* @memberof ApplicationCreate | ||
*/ | ||
source_provider_id: number; | ||
domain_name?: string; | ||
/** | ||
@@ -42,2 +47,14 @@ * The full name of a repository (`repository_owner/repository_name`) containing the application source code. Required when the `source_provider_id` field is informed. | ||
/** | ||
* The version control branch that, by default, will be retrieved and deployed. This might be overriden by client apps API calls when actually triggering a new deployment. | ||
* @type {string} | ||
* @memberof ApplicationCreate | ||
*/ | ||
default_branch?: string; | ||
/** | ||
* Indicates if push to deploy webhooks are enabled for this application/environment, if so code will be deployed when commited to the default_branch | ||
* @type {boolean} | ||
* @memberof ApplicationCreate | ||
*/ | ||
push_to_deploy?: boolean; | ||
/** | ||
* The predominant programming language used in the application source code | ||
@@ -49,2 +66,8 @@ * @type {string} | ||
/** | ||
* The language runtime engine version to be used to execute this application code on the deployed servers | ||
* @type {string} | ||
* @memberof ApplicationCreate | ||
*/ | ||
engine_version?: string; | ||
/** | ||
* The base framework on top of which the application has been implemented - if any | ||
@@ -56,7 +79,7 @@ * @type {string} | ||
/** | ||
* The relative web directory where publicly accessible assets are located and the web content should be served from | ||
* The physical path of the applicaton code/artifacts on the deployed servers | ||
* @type {string} | ||
* @memberof ApplicationCreate | ||
*/ | ||
public_directory: string; | ||
app_directory?: string; | ||
/** | ||
@@ -69,8 +92,50 @@ * The relative directory where package manager\'s manifest files (`package.json`, `composer.json`, `yarn.lock`, etc) are located. It needs to be set for applications where the actual source code is not located in the top level directory of the repository. | ||
/** | ||
* The list of deployment settings for each application environment | ||
* @type {Array<ApplicationDeploymentSettings>} | ||
* The relative web directory where publicly accessible assets are located and the web content should be served from | ||
* @type {string} | ||
* @memberof ApplicationCreate | ||
*/ | ||
deployment_settings?: Array<ApplicationDeploymentSettings>; | ||
public_directory: string; | ||
/** | ||
* The entrypoint tells devopness how an application should be started and has basically two forms: 1) `File`: if it\'s a simple file name/path an web app will be served using the entrypoint value as its index file. Example: `index.html` 2) `Command`: if a command line instruction is provided as the entrypoint value, it will be handled as the start up command that initalizes the application. It will be assumed that the user is an advanced user that knows what she/he is doing, therefore the command specified here will be run - as is - everytime the application needs to be started. | ||
* @type {string} | ||
* @memberof ApplicationCreate | ||
*/ | ||
entrypoint: string; | ||
/** | ||
* Useful, for instance, when deploying `docker` containerized applications. If the application is not initialized by `devopness` itself, the user should inform the address at which the application listens to external calls. The address can be an IP, IP:PORT, HOSTNAME, HOSTNAME:PORT or unix:PATH | ||
* @type {string} | ||
* @memberof ApplicationCreate | ||
*/ | ||
listening_address?: string; | ||
/** | ||
* The optional command that should be executed once during deployment to build the source code and get the application in a ready state. | ||
* @type {string} | ||
* @memberof ApplicationCreate | ||
*/ | ||
build_command?: string; | ||
/** | ||
* The number of deployment history, logs and artifacts to keep stored in both devopness servers and user\'s servers | ||
* @type {number} | ||
* @memberof ApplicationCreate | ||
*/ | ||
deployments_keep?: number; | ||
/** | ||
* Indicates if at deployment time we should execute package manager command to install dependencies used in development mode | ||
* @type {boolean} | ||
* @memberof ApplicationCreate | ||
*/ | ||
install_dependencies_dev?: boolean; | ||
/** | ||
* Indicates if at deployment time we should execute package manager command to install dependencies used in production mode | ||
* @type {boolean} | ||
* @memberof ApplicationCreate | ||
*/ | ||
install_dependencies_prod?: boolean; | ||
/** | ||
* Numeric ID of the project that the application belongs to | ||
* @type {number} | ||
* @memberof ApplicationCreate | ||
*/ | ||
project_id?: number; | ||
/** | ||
* | ||
@@ -77,0 +142,0 @@ * @type {Array<EnvironmentLinkItem>} |
@@ -12,3 +12,2 @@ /** | ||
*/ | ||
import { ApplicationDeploymentSettings } from './application-deployment-settings'; | ||
import { Environment } from './environment'; | ||
@@ -35,13 +34,13 @@ import { SocialAccount } from './social-account'; | ||
/** | ||
* Numeric ID of the project that the application belongs to | ||
* @type {number} | ||
* The sub-domain through which the application deployed with these settings will be accessed | ||
* @type {string} | ||
* @memberof Application | ||
*/ | ||
project_id: number; | ||
domain_name: string; | ||
/** | ||
* Numeric ID of the source provider account where the repository is hosted. Required when the `repository` field is informed. | ||
* @type {number} | ||
* | ||
* @type {SocialAccount} | ||
* @memberof Application | ||
*/ | ||
source_provider_id?: number; | ||
source_provider?: SocialAccount; | ||
/** | ||
@@ -66,2 +65,14 @@ * The full name of a repository (`repository_owner/repository_name`) containing the application source code. Required when the `source_provider_id` field is informed. | ||
/** | ||
* The version control branch that, by default, will be retrieved and deployed. This might be overriden by client apps API calls when actually triggering a new deployment. | ||
* @type {string} | ||
* @memberof Application | ||
*/ | ||
default_branch?: string; | ||
/** | ||
* Indicates if push to deploy webhooks are enabled for this application/environment, if so code will be deployed when commited to the default_branch | ||
* @type {boolean} | ||
* @memberof Application | ||
*/ | ||
push_to_deploy?: boolean; | ||
/** | ||
* The predominant programming language used in the application source code | ||
@@ -73,2 +84,8 @@ * @type {string} | ||
/** | ||
* The language runtime engine version to be used to execute this application code on the deployed servers | ||
* @type {string} | ||
* @memberof Application | ||
*/ | ||
engine_version?: string; | ||
/** | ||
* The base framework on top of which the application has been implemented - if any | ||
@@ -80,2 +97,8 @@ * @type {string} | ||
/** | ||
* The physical path of the applicaton code/artifacts on the deployed servers | ||
* @type {string} | ||
* @memberof Application | ||
*/ | ||
app_directory?: string; | ||
/** | ||
* The relative directory where package manager\'s manifest files (`package.json`, `composer.json`, `yarn.lock`, etc) are located. It needs to be set for applications where the actual source code is not located in the top level directory of the repository. | ||
@@ -93,14 +116,32 @@ * @type {string} | ||
/** | ||
* | ||
* @type {SocialAccount} | ||
* The entrypoint tells devopness how an application should be started and has basically two forms: 1) `File`: if it\'s a simple file name/path an web app will be served using the entrypoint value as its index file. Example: `index.html` 2) `Command`: if a command line instruction is provided as the entrypoint value, it will be handled as the start up command that initalizes the application. It will be assumed that the user is an advanced user that knows what she/he is doing, therefore the command specified here will be run - as is - everytime the application needs to be started. | ||
* @type {string} | ||
* @memberof Application | ||
*/ | ||
source_provider?: SocialAccount; | ||
entrypoint?: string; | ||
/** | ||
* The list of deployment settings for each application environment | ||
* @type {Array<ApplicationDeploymentSettings>} | ||
* Useful, for instance, when deploying `docker` containerized applications. If the application is not initialized by `devopness` itself, the user should inform the address at which the application listens to external calls. The address can be an IP, IP:PORT, HOSTNAME, HOSTNAME:PORT or unix:PATH | ||
* @type {string} | ||
* @memberof Application | ||
*/ | ||
deployment_settings?: Array<ApplicationDeploymentSettings>; | ||
listening_address?: string; | ||
/** | ||
* The number of deployment history, logs and artifacts to keep stored in both devopness servers and user\'s servers | ||
* @type {number} | ||
* @memberof Application | ||
*/ | ||
deployments_keep?: number; | ||
/** | ||
* Indicates if at deployment time we should execute package manager command to install dependencies used in development mode | ||
* @type {boolean} | ||
* @memberof Application | ||
*/ | ||
install_dependencies_dev?: boolean; | ||
/** | ||
* Indicates if at deployment time we should execute package manager command to install dependencies used in production mode | ||
* @type {boolean} | ||
* @memberof Application | ||
*/ | ||
install_dependencies_prod?: boolean; | ||
/** | ||
* The list of environments to which the application is linked to | ||
@@ -110,3 +151,3 @@ * @type {Array<Environment>} | ||
*/ | ||
environments?: Array<Environment>; | ||
environments: Array<Environment>; | ||
/** | ||
@@ -118,2 +159,14 @@ * Current status of deploying to remote servers the current application | ||
status?: ApplicationStatusEnum; | ||
/** | ||
* Numeric ID of the project that the application belongs to | ||
* @type {number} | ||
* @memberof Application | ||
*/ | ||
project_id: number; | ||
/** | ||
* Numeric ID of the source provider account where the repository is hosted. Required when the `repository` field is informed. | ||
* @type {number} | ||
* @memberof Application | ||
*/ | ||
source_provider_id?: number; | ||
} | ||
@@ -120,0 +173,0 @@ /** |
@@ -24,3 +24,3 @@ /** | ||
*/ | ||
id?: number; | ||
id: number; | ||
/** | ||
@@ -27,0 +27,0 @@ * The environment\'s name |
@@ -8,3 +8,2 @@ export * from './action'; | ||
export * from './application-deployment'; | ||
export * from './application-deployment-settings'; | ||
export * from './application-environment-script'; | ||
@@ -39,2 +38,4 @@ export * from './application-environment-script-create'; | ||
export * from './project'; | ||
export * from './project-create'; | ||
export * from './project-update'; | ||
export * from './repository'; | ||
@@ -41,0 +42,0 @@ export * from './repository-branch'; |
@@ -20,3 +20,2 @@ "use strict"; | ||
__exportStar(require("./application-deployment"), exports); | ||
__exportStar(require("./application-deployment-settings"), exports); | ||
__exportStar(require("./application-environment-script"), exports); | ||
@@ -51,2 +50,4 @@ __exportStar(require("./application-environment-script-create"), exports); | ||
__exportStar(require("./project"), exports); | ||
__exportStar(require("./project-create"), exports); | ||
__exportStar(require("./project-update"), exports); | ||
__exportStar(require("./repository"), exports); | ||
@@ -53,0 +54,0 @@ __exportStar(require("./repository-branch"), exports); |
{ | ||
"name": "@devopness/sdk-js", | ||
"version": "1.23.0", | ||
"version": "1.24.0", | ||
"publishConfig": { | ||
@@ -15,3 +15,3 @@ "access": "public" | ||
"build": "rm -R ./dist || true && npm run lint && tsc", | ||
"build-api-models": "JAVA_OPTS=\"${JAVA_OPTS} -Dlog.level=warn\" openapi-generator generate --template-dir ./src/api/generator/templates --skip-validate-spec --minimal-update -i ./src/api/spec.json -g typescript-axios -o ./src/api -p withSeparateModelsAndApi=true --api-package generated/apis --model-package generated/models --additional-properties supportsES6=false && npm run build", | ||
"build-api-models": "rm -R ./src/api/generated && JAVA_OPTS=\"${JAVA_OPTS} -Dlog.level=warn\" openapi-generator generate --template-dir ./src/api/generator/templates --skip-validate-spec --minimal-update -i ./src/api/spec.json -g typescript-axios -o ./src/api -p withSeparateModelsAndApi=true --api-package generated/apis --model-package generated/models --additional-properties supportsES6=false && npm run build", | ||
"lint": "eslint . --ext .ts", | ||
@@ -18,0 +18,0 @@ "prepublishOnly": "npm test", |
325213
229
8753