@devopness/sdk-js 3.5.4 → 3.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,6 +12,8 @@
12
12
  import { ApiBaseService } from "../../../services/ApiBaseService";
13
13
  import { ApiResponse } from "../../../common/ApiResponse";
14
14
  import { Application } from '../../generated/models';
15
+ import { ApplicationApplyTemplateResponse } from '../../generated/models';
16
+ import { ApplicationEnvironmentApplyTemplate } from '../../generated/models';
15
17
  import { ApplicationEnvironmentCreate } from '../../generated/models';
16
18
  import { ApplicationRelation } from '../../generated/models';
17
19
  import { ApplicationUpdate } from '../../generated/models';
@@ -29,11 +31,18 @@ export declare class ApplicationsApiService extends ApiBaseService {
29
31
  addApplicationDeployment(applicationId: number, deploymentApplicationCreate: DeploymentApplicationCreate): Promise<ApiResponse<void>>;
30
32
  /**
31
33
  *
32
- * @summary Create a new application
34
+ * @summary Create an application
33
35
  * @param {number} environmentId The ID of the environment.
34
36
  * @param {ApplicationEnvironmentCreate} applicationEnvironmentCreate A JSON object containing the resource data
35
37
  */
36
38
  addEnvironmentApplication(environmentId: number, applicationEnvironmentCreate: ApplicationEnvironmentCreate): Promise<ApiResponse<Application>>;
39
+ /**
40
+ *
41
+ * @summary Create applications from a template
42
+ * @param {number} environmentId The ID of the environment.
43
+ * @param {ApplicationEnvironmentApplyTemplate} applicationEnvironmentApplyTemplate A JSON object containing the resource data
44
+ */
45
+ applyTemplateEnvironmentApplication(environmentId: number, applicationEnvironmentApplyTemplate: ApplicationEnvironmentApplyTemplate): Promise<ApiResponse<ApplicationApplyTemplateResponse>>;
37
46
  /**
38
47
  *
39
48
  * @summary Delete a given application
@@ -48,7 +57,7 @@ export declare class ApplicationsApiService extends ApiBaseService {
48
57
  getApplication(applicationId: number): Promise<ApiResponse<Application>>;
49
58
  /**
50
59
  *
51
- * @summary Return a list of all Applications belonging to an environment
60
+ * @summary List applications in an environment
52
61
  * @param {number} environmentId The ID of the environment.
53
62
  * @param {number} [page] Number of the page to be retrieved
54
63
  * @param {number} [perPage] Number of items returned per page
@@ -51,7 +51,7 @@ class ApplicationsApiService extends ApiBaseService_1.ApiBaseService {
51
51
  }
52
52
  /**
53
53
  *
54
- * @summary Create a new application
54
+ * @summary Create an application
55
55
  * @param {number} environmentId The ID of the environment.
56
56
  * @param {ApplicationEnvironmentCreate} applicationEnvironmentCreate A JSON object containing the resource data
57
57
  */
@@ -69,6 +69,26 @@ class ApplicationsApiService extends ApiBaseService_1.ApiBaseService {
69
69
  return new ApiResponse_1.ApiResponse(response);
70
70
  });
71
71
  }
72
+ /**
73
+ *
74
+ * @summary Create applications from a template
75
+ * @param {number} environmentId The ID of the environment.
76
+ * @param {ApplicationEnvironmentApplyTemplate} applicationEnvironmentApplyTemplate A JSON object containing the resource data
77
+ */
78
+ applyTemplateEnvironmentApplication(environmentId, applicationEnvironmentApplyTemplate) {
79
+ return __awaiter(this, void 0, void 0, function* () {
80
+ if (environmentId === null || environmentId === undefined) {
81
+ throw new Exceptions_1.ArgumentNullException('environmentId', 'applyTemplateEnvironmentApplication');
82
+ }
83
+ if (applicationEnvironmentApplyTemplate === null || applicationEnvironmentApplyTemplate === undefined) {
84
+ throw new Exceptions_1.ArgumentNullException('applicationEnvironmentApplyTemplate', 'applyTemplateEnvironmentApplication');
85
+ }
86
+ let queryString = '';
87
+ const requestUrl = '/environments/{environment_id}/applications/apply-template' + (queryString ? `?${queryString}` : '');
88
+ const response = yield this.post(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))), applicationEnvironmentApplyTemplate);
89
+ return new ApiResponse_1.ApiResponse(response);
90
+ });
91
+ }
72
92
  /**
73
93
  *
74
94
  * @summary Delete a given application
@@ -103,7 +123,7 @@ class ApplicationsApiService extends ApiBaseService_1.ApiBaseService {
103
123
  }
104
124
  /**
105
125
  *
106
- * @summary Return a list of all Applications belonging to an environment
126
+ * @summary List applications in an environment
107
127
  * @param {number} environmentId The ID of the environment.
108
128
  * @param {number} [page] Number of the page to be retrieved
109
129
  * @param {number} [perPage] Number of items returned per page
@@ -0,0 +1,201 @@
1
+ /**
2
+ * devopness API
3
+ * Devopness API - Painless essential DevOps to everyone
4
+ *
5
+ * The version of the OpenAPI document: latest
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { ApplicationLastDeployments } from './application-last-deployments';
13
+ import { CredentialRelation } from './credential-relation';
14
+ import { CronJobRelation } from './cron-job-relation';
15
+ import { DaemonRelation } from './daemon-relation';
16
+ import { EnvironmentRelation } from './environment-relation';
17
+ import { ServerRelation } from './server-relation';
18
+ import { ServiceRelation } from './service-relation';
19
+ import { UserRelation } from './user-relation';
20
+ import { VirtualHostRelation } from './virtual-host-relation';
21
+ /**
22
+ *
23
+ * @export
24
+ * @interface ApplicationApplyTemplateResponse
25
+ */
26
+ export interface ApplicationApplyTemplateResponse {
27
+ /**
28
+ * Unique ID of the application
29
+ * @type {number}
30
+ * @memberof ApplicationApplyTemplateResponse
31
+ */
32
+ id: number;
33
+ /**
34
+ * Numeric ID of the project to which the application belongs to
35
+ * @type {number}
36
+ * @memberof ApplicationApplyTemplateResponse
37
+ */
38
+ project_id: number;
39
+ /**
40
+ * Numeric ID of the environment to which the application belongs to
41
+ * @type {number}
42
+ * @memberof ApplicationApplyTemplateResponse
43
+ */
44
+ environment_id: number;
45
+ /**
46
+ * The id of the user who created the application and to whom the application belongs
47
+ * @type {number}
48
+ * @memberof ApplicationApplyTemplateResponse
49
+ */
50
+ created_by: number;
51
+ /**
52
+ * The application\'s unique name
53
+ * @type {string}
54
+ * @memberof ApplicationApplyTemplateResponse
55
+ */
56
+ name: string;
57
+ /**
58
+ * The full name of a repository (`repository_owner/repository_name`) containing the application source code.
59
+ * @type {string}
60
+ * @memberof ApplicationApplyTemplateResponse
61
+ */
62
+ repository: string;
63
+ /**
64
+ * The name part of a repository full name (`repository_owner/repository_name`)
65
+ * @type {string}
66
+ * @memberof ApplicationApplyTemplateResponse
67
+ */
68
+ repository_name: string;
69
+ /**
70
+ * The owner part of a repository full name (`repository_owner/repository_name`)
71
+ * @type {string}
72
+ * @memberof ApplicationApplyTemplateResponse
73
+ */
74
+ repository_owner: string;
75
+ /**
76
+ * The version control branch that, by default, will be used when a deployment is triggered and no other branch name is informed.
77
+ * @type {string}
78
+ * @memberof ApplicationApplyTemplateResponse
79
+ */
80
+ default_branch: string;
81
+ /**
82
+ * The programming language runtime environment to be used to serve the application. E.g.: if a front-end web app is developed using Node.js, but should be served statically (a SPA application, for instance) then this field value should be `html`.
83
+ * @type {string}
84
+ * @memberof ApplicationApplyTemplateResponse
85
+ */
86
+ programming_language: string;
87
+ /**
88
+ * The human readable version of the programming language of the application.
89
+ * @type {string}
90
+ * @memberof ApplicationApplyTemplateResponse
91
+ */
92
+ programming_language_human_readable: string;
93
+ /**
94
+ * The language runtime engine version to be used to execute this application on the deployed servers
95
+ * @type {string}
96
+ * @memberof ApplicationApplyTemplateResponse
97
+ */
98
+ engine_version: string;
99
+ /**
100
+ * The base framework on top of which the application has been implemented - it might have impact on the steps to be performed during application deployment
101
+ * @type {string}
102
+ * @memberof ApplicationApplyTemplateResponse
103
+ */
104
+ framework: string;
105
+ /**
106
+ * The human readable version of the framework of the application.
107
+ * @type {string}
108
+ * @memberof ApplicationApplyTemplateResponse
109
+ */
110
+ framework_human_readable: string;
111
+ /**
112
+ * 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.
113
+ * @type {string}
114
+ * @memberof ApplicationApplyTemplateResponse
115
+ */
116
+ root_directory: string;
117
+ /**
118
+ * The number of deployment history, logs and artifacts to keep stored in both devopness servers and user\'s servers. OR The number of deployment artifacts to be retained in the user\'s servers, making it easier and faster to rollback to previous versions
119
+ * @type {number}
120
+ * @memberof ApplicationApplyTemplateResponse
121
+ */
122
+ deployments_keep: number;
123
+ /**
124
+ * Indicates command that Devopness must execute to install application dependencies
125
+ * @type {string}
126
+ * @memberof ApplicationApplyTemplateResponse
127
+ */
128
+ install_dependencies_command: string | null;
129
+ /**
130
+ * The optional command that should be executed once during deployment to build the source code and get the application in a ready state
131
+ * @type {string}
132
+ * @memberof ApplicationApplyTemplateResponse
133
+ */
134
+ build_command: string | null;
135
+ /**
136
+ *
137
+ * @type {UserRelation}
138
+ * @memberof ApplicationApplyTemplateResponse
139
+ */
140
+ created_by_user: UserRelation | null;
141
+ /**
142
+ *
143
+ * @type {ApplicationLastDeployments}
144
+ * @memberof ApplicationApplyTemplateResponse
145
+ */
146
+ last_deployments: ApplicationLastDeployments;
147
+ /**
148
+ *
149
+ * @type {EnvironmentRelation}
150
+ * @memberof ApplicationApplyTemplateResponse
151
+ */
152
+ environment: EnvironmentRelation | null;
153
+ /**
154
+ *
155
+ * @type {Array<ServerRelation>}
156
+ * @memberof ApplicationApplyTemplateResponse
157
+ */
158
+ servers: Array<ServerRelation>;
159
+ /**
160
+ *
161
+ * @type {CredentialRelation}
162
+ * @memberof ApplicationApplyTemplateResponse
163
+ */
164
+ credential: CredentialRelation | null;
165
+ /**
166
+ *
167
+ * @type {Array<ServiceRelation>}
168
+ * @memberof ApplicationApplyTemplateResponse
169
+ */
170
+ services: Array<ServiceRelation>;
171
+ /**
172
+ *
173
+ * @type {Array<CronJobRelation>}
174
+ * @memberof ApplicationApplyTemplateResponse
175
+ */
176
+ cronjobs: Array<CronJobRelation>;
177
+ /**
178
+ *
179
+ * @type {Array<VirtualHostRelation>}
180
+ * @memberof ApplicationApplyTemplateResponse
181
+ */
182
+ virtual_hosts: Array<VirtualHostRelation>;
183
+ /**
184
+ *
185
+ * @type {Array<DaemonRelation>}
186
+ * @memberof ApplicationApplyTemplateResponse
187
+ */
188
+ daemons: Array<DaemonRelation>;
189
+ /**
190
+ * The date and time when the record was created
191
+ * @type {string}
192
+ * @memberof ApplicationApplyTemplateResponse
193
+ */
194
+ created_at: string;
195
+ /**
196
+ * The date and time when the record was last updated
197
+ * @type {string}
198
+ * @memberof ApplicationApplyTemplateResponse
199
+ */
200
+ updated_at: string;
201
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ /* eslint-disable */
3
+ /**
4
+ * devopness API
5
+ * Devopness API - Painless essential DevOps to everyone
6
+ *
7
+ * The version of the OpenAPI document: latest
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,32 @@
1
+ /**
2
+ * devopness API
3
+ * Devopness API - Painless essential DevOps to everyone
4
+ *
5
+ * The version of the OpenAPI document: latest
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface ApplicationEnvironmentApplyTemplate
16
+ */
17
+ export interface ApplicationEnvironmentApplyTemplate {
18
+ /**
19
+ * Template to use when creating the application group.
20
+ * @type {string}
21
+ * @memberof ApplicationEnvironmentApplyTemplate
22
+ */
23
+ template: string;
24
+ /**
25
+ * Key/value pairs used to fill template placeholders before an application is created. Each template decides which inputs it accepts.
26
+ * @type {{ [key: string]: object; }}
27
+ * @memberof ApplicationEnvironmentApplyTemplate
28
+ */
29
+ template_inputs: {
30
+ [key: string]: object;
31
+ };
32
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ /* eslint-disable */
3
+ /**
4
+ * devopness API
5
+ * Devopness API - Painless essential DevOps to everyone
6
+ *
7
+ * The version of the OpenAPI document: latest
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -65,7 +65,7 @@ export interface ApplicationEnvironmentCreate {
65
65
  */
66
66
  credential_id: number;
67
67
  /**
68
- * 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. Must start with one of <code>/</code>.
68
+ * 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. Must start with one of <code>/</code> Must not be greater than 255 characters.
69
69
  * @type {string}
70
70
  * @memberof ApplicationEnvironmentCreate
71
71
  */
@@ -88,18 +88,4 @@ export interface ApplicationEnvironmentCreate {
88
88
  * @memberof ApplicationEnvironmentCreate
89
89
  */
90
90
  install_dependencies_command?: string;
91
- /**
92
- * Optional template to use when creating the application. Leave empty to create the application directly without using a template.
93
- * @type {string}
94
- * @memberof ApplicationEnvironmentCreate
95
- */
96
- template?: string;
97
- /**
98
- * Key/value pairs used to fill template placeholders before an application is created. Each template decides which inputs it accepts.
99
- * @type {{ [key: string]: object; }}
100
- * @memberof ApplicationEnvironmentCreate
101
- */
102
- template_inputs?: {
103
- [key: string]: object;
104
- };
105
91
  }
@@ -64,7 +64,7 @@ export interface ApplicationUpdate {
64
64
  */
65
65
  credential_id?: number;
66
66
  /**
67
- * 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. Must start with one of <code>/</code>.
67
+ * 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. Must start with one of <code>/</code> Must not be greater than 255 characters.
68
68
  * @type {string}
69
69
  * @memberof ApplicationUpdate
70
70
  */
@@ -35,6 +35,8 @@ export * from './api-token-status';
35
35
  export * from './api-token-type';
36
36
  export * from './api-token-type-prefix';
37
37
  export * from './application';
38
+ export * from './application-apply-template-response';
39
+ export * from './application-environment-apply-template';
38
40
  export * from './application-environment-create';
39
41
  export * from './application-last-deployments';
40
42
  export * from './application-options';
@@ -51,6 +51,8 @@ __exportStar(require("./api-token-status"), exports);
51
51
  __exportStar(require("./api-token-type"), exports);
52
52
  __exportStar(require("./api-token-type-prefix"), exports);
53
53
  __exportStar(require("./application"), exports);
54
+ __exportStar(require("./application-apply-template-response"), exports);
55
+ __exportStar(require("./application-environment-apply-template"), exports);
54
56
  __exportStar(require("./application-environment-create"), exports);
55
57
  __exportStar(require("./application-last-deployments"), exports);
56
58
  __exportStar(require("./application-options"), exports);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@devopness/sdk-js",
4
- "version": "3.5.4",
4
+ "version": "3.5.5",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -61,10 +61,10 @@
61
61
  "node": "^20.19.0 || ^22.13.0 || >=24"
62
62
  },
63
63
  "devDependencies": {
64
- "@openapitools/openapi-generator-cli": "^2.40.0",
64
+ "@openapitools/openapi-generator-cli": "^2.40.1",
65
65
  "axios-mock-adapter": "^2.1.0",
66
66
  "husky": "9.1.7",
67
- "vite-plus": "0.2.5",
67
+ "vite-plus": "0.2.6",
68
68
  "typescript": "^7.0.2",
69
69
  "typedoc": "^0.28.20"
70
70
  },