@devopness/sdk-js 2.9.0 → 2.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/DevopnessApiClient.d.ts +0 -2
  2. package/dist/DevopnessApiClient.js +0 -2
  3. package/dist/api/generated/apis/pipelines-steps-api.d.ts +6 -6
  4. package/dist/api/generated/apis/pipelines-steps-api.js +18 -18
  5. package/dist/api/generated/apis/servers-api.d.ts +0 -8
  6. package/dist/api/generated/apis/servers-api.js +0 -21
  7. package/dist/api/generated/apis/teams-api.d.ts +3 -3
  8. package/dist/api/generated/apis/teams-api.js +5 -5
  9. package/dist/api/generated/models/index.d.ts +1 -3
  10. package/dist/api/generated/models/index.js +1 -3
  11. package/dist/api/generated/models/pipeline-step-update.d.ts +6 -0
  12. package/dist/api/generated/models/pipeline-step.d.ts +24 -6
  13. package/dist/api/generated/models/pipeline.d.ts +7 -0
  14. package/dist/api/generated/models/team-update.d.ts +36 -0
  15. package/dist/api/generated/models/{script-create.js → team-update.js} +0 -0
  16. package/dist/services/ApplicationService.d.ts +1 -2
  17. package/dist/services/ApplicationService.js +0 -2
  18. package/package.json +1 -1
  19. package/dist/api/generated/apis/applications-scripts-api.d.ts +0 -35
  20. package/dist/api/generated/apis/applications-scripts-api.js +0 -78
  21. package/dist/api/generated/apis/scripts-api.d.ts +0 -39
  22. package/dist/api/generated/apis/scripts-api.js +0 -85
  23. package/dist/api/generated/models/script-create.d.ts +0 -50
  24. package/dist/api/generated/models/script-update.d.ts +0 -74
  25. package/dist/api/generated/models/script-update.js +0 -14
  26. package/dist/api/generated/models/script.d.ts +0 -93
  27. package/dist/api/generated/models/script.js +0 -14
  28. package/dist/services/ScriptService.d.ts +0 -3
  29. package/dist/services/ScriptService.js +0 -7
@@ -4,7 +4,6 @@ import { DaemonService } from './services/DaemonService';
4
4
  import { EnvironmentService } from './services/EnvironmentService';
5
5
  import { NetworkRuleService } from './services/NetworkRuleService';
6
6
  import { ProjectService } from './services/ProjectService';
7
- import { ScriptService } from './services/ScriptService';
8
7
  import { ServerService } from './services/ServerService';
9
8
  import { ServiceService } from './services/ServiceService';
10
9
  import { SourceProviderService } from './services/SourceProviderService';
@@ -43,7 +42,6 @@ export declare class DevopnessApiClient {
43
42
  projects: ProjectService;
44
43
  roles: RoleService;
45
44
  resourceEvents: ResourceEventService;
46
- scripts: ScriptService;
47
45
  servers: ServerService;
48
46
  services: ServiceService;
49
47
  socialAccounts: SocialAccountService;
@@ -7,7 +7,6 @@ const DaemonService_1 = require("./services/DaemonService");
7
7
  const EnvironmentService_1 = require("./services/EnvironmentService");
8
8
  const NetworkRuleService_1 = require("./services/NetworkRuleService");
9
9
  const ProjectService_1 = require("./services/ProjectService");
10
- const ScriptService_1 = require("./services/ScriptService");
11
10
  const ServerService_1 = require("./services/ServerService");
12
11
  const ServiceService_1 = require("./services/ServiceService");
13
12
  const SourceProviderService_1 = require("./services/SourceProviderService");
@@ -51,7 +50,6 @@ class DevopnessApiClient {
51
50
  this.projects = new ProjectService_1.ProjectService();
52
51
  this.roles = new RoleService_1.RoleService();
53
52
  this.resourceEvents = new ResourceEventService_1.ResourceEventService();
54
- this.scripts = new ScriptService_1.ScriptService();
55
53
  this.servers = new ServerService_1.ServerService();
56
54
  this.services = new ServiceService_1.ServiceService();
57
55
  this.socialAccounts = new SocialAccountService_1.SocialAccountService();
@@ -29,22 +29,22 @@ export declare class PipelinesStepsApiService extends ApiBaseService {
29
29
  *
30
30
  * @summary Link a step to a pipeline
31
31
  * @param {number} pipelineId Unique ID of the pipeline
32
- * @param {number} stepId Unique ID of the step to be linked
32
+ * @param {number} pipelineStepId Unique ID of the step to be linked
33
33
  */
34
- linkStepToPipeline(pipelineId: number, stepId: number): Promise<ApiResponse<void>>;
34
+ linkStepToPipeline(pipelineId: number, pipelineStepId: number): Promise<ApiResponse<void>>;
35
35
  /**
36
36
  *
37
37
  * @summary Unlink a step from a pipeline
38
38
  * @param {number} pipelineId Unique ID of the pipeline
39
- * @param {number} stepId Unique ID of the step to be unlinked
39
+ * @param {number} pipelineStepId Unique ID of the step to be unlinked
40
40
  */
41
- unlinkStepFromPipeline(pipelineId: number, stepId: number): Promise<ApiResponse<void>>;
41
+ unlinkStepFromPipeline(pipelineId: number, pipelineStepId: number): Promise<ApiResponse<void>>;
42
42
  /**
43
43
  *
44
44
  * @summary Update a pipeline step
45
45
  * @param {number} pipelineId Unique ID of the pipeline
46
- * @param {number} stepId Unique ID of the pipeline step to update information from
46
+ * @param {number} pipelineStepId Unique ID of the pipeline step to update information from
47
47
  * @param {PipelineStepUpdate} pipelineStepUpdate A JSON object containing pipeline step data
48
48
  */
49
- updatePipelineStep(pipelineId: number, stepId: number, pipelineStepUpdate: PipelineStepUpdate): Promise<ApiResponse<void>>;
49
+ updatePipelineStep(pipelineId: number, pipelineStepId: number, pipelineStepUpdate: PipelineStepUpdate): Promise<ApiResponse<void>>;
50
50
  }
@@ -53,19 +53,19 @@ class PipelinesStepsApiService extends ApiBaseService_1.ApiBaseService {
53
53
  *
54
54
  * @summary Link a step to a pipeline
55
55
  * @param {number} pipelineId Unique ID of the pipeline
56
- * @param {number} stepId Unique ID of the step to be linked
56
+ * @param {number} pipelineStepId Unique ID of the step to be linked
57
57
  */
58
- linkStepToPipeline(pipelineId, stepId) {
58
+ linkStepToPipeline(pipelineId, pipelineStepId) {
59
59
  return __awaiter(this, void 0, void 0, function* () {
60
60
  if (pipelineId === null || pipelineId === undefined) {
61
61
  throw new Exceptions_1.ArgumentNullException('pipelineId', 'linkStepToPipeline');
62
62
  }
63
- if (stepId === null || stepId === undefined) {
64
- throw new Exceptions_1.ArgumentNullException('stepId', 'linkStepToPipeline');
63
+ if (pipelineStepId === null || pipelineStepId === undefined) {
64
+ throw new Exceptions_1.ArgumentNullException('pipelineStepId', 'linkStepToPipeline');
65
65
  }
66
66
  let queryString = '';
67
- const requestUrl = '/pipelines/{pipeline_id}/steps/{step_id}' + (queryString ? `?${queryString}` : '');
68
- const response = yield this.post(requestUrl.replace(`{${"pipeline_id"}}`, encodeURIComponent(String(pipelineId))).replace(`{${"step_id"}}`, encodeURIComponent(String(stepId))));
67
+ const requestUrl = '/pipelines/{pipeline_id}/steps/{pipeline_step_id}' + (queryString ? `?${queryString}` : '');
68
+ const response = yield this.post(requestUrl.replace(`{${"pipeline_id"}}`, encodeURIComponent(String(pipelineId))).replace(`{${"pipeline_step_id"}}`, encodeURIComponent(String(pipelineStepId))));
69
69
  return new ApiResponse_1.ApiResponse(response);
70
70
  });
71
71
  }
@@ -73,19 +73,19 @@ class PipelinesStepsApiService extends ApiBaseService_1.ApiBaseService {
73
73
  *
74
74
  * @summary Unlink a step from a pipeline
75
75
  * @param {number} pipelineId Unique ID of the pipeline
76
- * @param {number} stepId Unique ID of the step to be unlinked
76
+ * @param {number} pipelineStepId Unique ID of the step to be unlinked
77
77
  */
78
- unlinkStepFromPipeline(pipelineId, stepId) {
78
+ unlinkStepFromPipeline(pipelineId, pipelineStepId) {
79
79
  return __awaiter(this, void 0, void 0, function* () {
80
80
  if (pipelineId === null || pipelineId === undefined) {
81
81
  throw new Exceptions_1.ArgumentNullException('pipelineId', 'unlinkStepFromPipeline');
82
82
  }
83
- if (stepId === null || stepId === undefined) {
84
- throw new Exceptions_1.ArgumentNullException('stepId', 'unlinkStepFromPipeline');
83
+ if (pipelineStepId === null || pipelineStepId === undefined) {
84
+ throw new Exceptions_1.ArgumentNullException('pipelineStepId', 'unlinkStepFromPipeline');
85
85
  }
86
86
  let queryString = '';
87
- const requestUrl = '/pipelines/{pipeline_id}/steps/{step_id}' + (queryString ? `?${queryString}` : '');
88
- const response = yield this.delete(requestUrl.replace(`{${"pipeline_id"}}`, encodeURIComponent(String(pipelineId))).replace(`{${"step_id"}}`, encodeURIComponent(String(stepId))));
87
+ const requestUrl = '/pipelines/{pipeline_id}/steps/{pipeline_step_id}' + (queryString ? `?${queryString}` : '');
88
+ const response = yield this.delete(requestUrl.replace(`{${"pipeline_id"}}`, encodeURIComponent(String(pipelineId))).replace(`{${"pipeline_step_id"}}`, encodeURIComponent(String(pipelineStepId))));
89
89
  return new ApiResponse_1.ApiResponse(response);
90
90
  });
91
91
  }
@@ -93,23 +93,23 @@ class PipelinesStepsApiService extends ApiBaseService_1.ApiBaseService {
93
93
  *
94
94
  * @summary Update a pipeline step
95
95
  * @param {number} pipelineId Unique ID of the pipeline
96
- * @param {number} stepId Unique ID of the pipeline step to update information from
96
+ * @param {number} pipelineStepId Unique ID of the pipeline step to update information from
97
97
  * @param {PipelineStepUpdate} pipelineStepUpdate A JSON object containing pipeline step data
98
98
  */
99
- updatePipelineStep(pipelineId, stepId, pipelineStepUpdate) {
99
+ updatePipelineStep(pipelineId, pipelineStepId, pipelineStepUpdate) {
100
100
  return __awaiter(this, void 0, void 0, function* () {
101
101
  if (pipelineId === null || pipelineId === undefined) {
102
102
  throw new Exceptions_1.ArgumentNullException('pipelineId', 'updatePipelineStep');
103
103
  }
104
- if (stepId === null || stepId === undefined) {
105
- throw new Exceptions_1.ArgumentNullException('stepId', 'updatePipelineStep');
104
+ if (pipelineStepId === null || pipelineStepId === undefined) {
105
+ throw new Exceptions_1.ArgumentNullException('pipelineStepId', 'updatePipelineStep');
106
106
  }
107
107
  if (pipelineStepUpdate === null || pipelineStepUpdate === undefined) {
108
108
  throw new Exceptions_1.ArgumentNullException('pipelineStepUpdate', 'updatePipelineStep');
109
109
  }
110
110
  let queryString = '';
111
- const requestUrl = '/pipelines/{pipeline_id}/steps/{step_id}' + (queryString ? `?${queryString}` : '');
112
- const response = yield this.put(requestUrl.replace(`{${"pipeline_id"}}`, encodeURIComponent(String(pipelineId))).replace(`{${"step_id"}}`, encodeURIComponent(String(stepId))), pipelineStepUpdate);
111
+ const requestUrl = '/pipelines/{pipeline_id}/steps/{pipeline_step_id}' + (queryString ? `?${queryString}` : '');
112
+ const response = yield this.put(requestUrl.replace(`{${"pipeline_id"}}`, encodeURIComponent(String(pipelineId))).replace(`{${"pipeline_step_id"}}`, encodeURIComponent(String(pipelineStepId))), pipelineStepUpdate);
113
113
  return new ApiResponse_1.ApiResponse(response);
114
114
  });
115
115
  }
@@ -14,7 +14,6 @@ import { ApiResponse } from "../../../common/ApiResponse";
14
14
  import { Server } from '../../generated/models';
15
15
  import { ServerCommands } from '../../generated/models';
16
16
  import { ServerConnect } from '../../generated/models';
17
- import { ServerRelation } from '../../generated/models';
18
17
  import { ServerUpdate } from '../../generated/models';
19
18
  /**
20
19
  * ServersApiService - Auto-generated
@@ -39,13 +38,6 @@ export declare class ServersApiService extends ApiBaseService {
39
38
  * @param {number} serverId The server numeric Id
40
39
  */
41
40
  getServerCommands(serverId: number): Promise<ApiResponse<ServerCommands>>;
42
- /**
43
- *
44
- * @summary Return a list of all servers belonging to current user
45
- * @param {number} [page] Number of the page to be retrieved
46
- * @param {number} [perPage] Number of items returned per page
47
- */
48
- listServers(page?: number, perPage?: number): Promise<ApiResponse<Array<ServerRelation>>>;
49
41
  /**
50
42
  *
51
43
  * @summary Update an existing server
@@ -81,27 +81,6 @@ class ServersApiService extends ApiBaseService_1.ApiBaseService {
81
81
  return new ApiResponse_1.ApiResponse(response);
82
82
  });
83
83
  }
84
- /**
85
- *
86
- * @summary Return a list of all servers belonging to current user
87
- * @param {number} [page] Number of the page to be retrieved
88
- * @param {number} [perPage] Number of items returned per page
89
- */
90
- listServers(page, perPage) {
91
- return __awaiter(this, void 0, void 0, function* () {
92
- let queryString = '';
93
- const queryParams = { page: page, per_page: perPage, };
94
- for (const key in queryParams) {
95
- if (queryParams[key] === undefined || queryParams[key] === null) {
96
- continue;
97
- }
98
- queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
99
- }
100
- const requestUrl = '/servers' + (queryString ? `?${queryString}` : '');
101
- const response = yield this.get(requestUrl);
102
- return new ApiResponse_1.ApiResponse(response);
103
- });
104
- }
105
84
  /**
106
85
  *
107
86
  * @summary Update an existing server
@@ -13,7 +13,7 @@ import { ApiBaseService } from "../../../services/ApiBaseService";
13
13
  import { ApiResponse } from "../../../common/ApiResponse";
14
14
  import { EnvironmentTeamLink } from '../../generated/models';
15
15
  import { Team } from '../../generated/models';
16
- import { TeamCreate } from '../../generated/models';
16
+ import { TeamUpdate } from '../../generated/models';
17
17
  /**
18
18
  * TeamsApiService - Auto-generated
19
19
  */
@@ -49,7 +49,7 @@ export declare class TeamsApiService extends ApiBaseService {
49
49
  *
50
50
  * @summary Update an existing team
51
51
  * @param {number} teamId Numeric ID of the team to be updated
52
- * @param {TeamCreate} teamCreate A JSON object containing team data
52
+ * @param {TeamUpdate} teamUpdate A JSON object containing team data
53
53
  */
54
- updateTeam(teamId: number, teamCreate: TeamCreate): Promise<ApiResponse<void>>;
54
+ updateTeam(teamId: number, teamUpdate: TeamUpdate): Promise<ApiResponse<void>>;
55
55
  }
@@ -109,19 +109,19 @@ class TeamsApiService extends ApiBaseService_1.ApiBaseService {
109
109
  *
110
110
  * @summary Update an existing team
111
111
  * @param {number} teamId Numeric ID of the team to be updated
112
- * @param {TeamCreate} teamCreate A JSON object containing team data
112
+ * @param {TeamUpdate} teamUpdate A JSON object containing team data
113
113
  */
114
- updateTeam(teamId, teamCreate) {
114
+ updateTeam(teamId, teamUpdate) {
115
115
  return __awaiter(this, void 0, void 0, function* () {
116
116
  if (teamId === null || teamId === undefined) {
117
117
  throw new Exceptions_1.ArgumentNullException('teamId', 'updateTeam');
118
118
  }
119
- if (teamCreate === null || teamCreate === undefined) {
120
- throw new Exceptions_1.ArgumentNullException('teamCreate', 'updateTeam');
119
+ if (teamUpdate === null || teamUpdate === undefined) {
120
+ throw new Exceptions_1.ArgumentNullException('teamUpdate', 'updateTeam');
121
121
  }
122
122
  let queryString = '';
123
123
  const requestUrl = '/teams/{team_id}' + (queryString ? `?${queryString}` : '');
124
- const response = yield this.put(requestUrl.replace(`{${"team_id"}}`, encodeURIComponent(String(teamId))), teamCreate);
124
+ const response = yield this.put(requestUrl.replace(`{${"team_id"}}`, encodeURIComponent(String(teamId))), teamUpdate);
125
125
  return new ApiResponse_1.ApiResponse(response);
126
126
  });
127
127
  }
@@ -140,10 +140,7 @@ export * from './resource-type';
140
140
  export * from './role';
141
141
  export * from './role-create';
142
142
  export * from './role-update';
143
- export * from './script';
144
- export * from './script-create';
145
143
  export * from './script-runner';
146
- export * from './script-update';
147
144
  export * from './server';
148
145
  export * from './server-action';
149
146
  export * from './server-action-log';
@@ -195,6 +192,7 @@ export * from './ssl-certificate-validation-level';
195
192
  export * from './team';
196
193
  export * from './team-create';
197
194
  export * from './team-relation';
195
+ export * from './team-update';
198
196
  export * from './trigger-event';
199
197
  export * from './trigger-type';
200
198
  export * from './user';
@@ -156,10 +156,7 @@ __exportStar(require("./resource-type"), exports);
156
156
  __exportStar(require("./role"), exports);
157
157
  __exportStar(require("./role-create"), exports);
158
158
  __exportStar(require("./role-update"), exports);
159
- __exportStar(require("./script"), exports);
160
- __exportStar(require("./script-create"), exports);
161
159
  __exportStar(require("./script-runner"), exports);
162
- __exportStar(require("./script-update"), exports);
163
160
  __exportStar(require("./server"), exports);
164
161
  __exportStar(require("./server-action"), exports);
165
162
  __exportStar(require("./server-action-log"), exports);
@@ -211,6 +208,7 @@ __exportStar(require("./ssl-certificate-validation-level"), exports);
211
208
  __exportStar(require("./team"), exports);
212
209
  __exportStar(require("./team-create"), exports);
213
210
  __exportStar(require("./team-relation"), exports);
211
+ __exportStar(require("./team-update"), exports);
214
212
  __exportStar(require("./trigger-event"), exports);
215
213
  __exportStar(require("./trigger-type"), exports);
216
214
  __exportStar(require("./user"), exports);
@@ -16,6 +16,12 @@ import { PipelineStepRunnerName } from './pipeline-step-runner-name';
16
16
  * @interface PipelineStepUpdate
17
17
  */
18
18
  export interface PipelineStepUpdate {
19
+ /**
20
+ * The ID of the pipeline step
21
+ * @type {number}
22
+ * @memberof PipelineStepUpdate
23
+ */
24
+ id: number;
19
25
  /**
20
26
  * Name/short description of the script
21
27
  * @type {string}
@@ -17,25 +17,31 @@ import { PipelineStepRunnerName } from './pipeline-step-runner-name';
17
17
  */
18
18
  export interface PipelineStep {
19
19
  /**
20
- * The Id of the given script
20
+ * The pipeline step\'s ID
21
21
  * @type {number}
22
22
  * @memberof PipelineStep
23
23
  */
24
24
  id: number;
25
25
  /**
26
- * The id of the user that own the script
26
+ * The script\'s ID of this pipeline step
27
27
  * @type {number}
28
28
  * @memberof PipelineStep
29
29
  */
30
- created_by: number;
30
+ script_id: number;
31
31
  /**
32
- * Name/short description of the script
32
+ * Name of the pipeline step
33
33
  * @type {string}
34
34
  * @memberof PipelineStep
35
35
  */
36
36
  name: string;
37
37
  /**
38
- * A command line or multiline bash script
38
+ * The pipeline step\'s type
39
+ * @type {string}
40
+ * @memberof PipelineStep
41
+ */
42
+ type: string;
43
+ /**
44
+ * A command line or multiline bash pipeline step
39
45
  * @type {string}
40
46
  * @memberof PipelineStep
41
47
  */
@@ -53,11 +59,23 @@ export interface PipelineStep {
53
59
  */
54
60
  run_as_user: string;
55
61
  /**
56
- * The relative order of the script execution in case the event has multiple scripts attached
62
+ * The relative order of the pipeline step execution in case the event has multiple pipeline step attached
57
63
  * @type {number}
58
64
  * @memberof PipelineStep
59
65
  */
60
66
  trigger_order: number;
67
+ /**
68
+ * True if this step is auto-generated or false if this was created by the user
69
+ * @type {boolean}
70
+ * @memberof PipelineStep
71
+ */
72
+ is_auto_generated: boolean;
73
+ /**
74
+ * True if this step is a default step of the pipeline and cannot be updated/deleted
75
+ * @type {boolean}
76
+ * @memberof PipelineStep
77
+ */
78
+ is_default_step: boolean;
61
79
  /**
62
80
  * The date and time when the record was created
63
81
  * @type {string}
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import { PipelineStep } from './pipeline-step';
12
13
  /**
13
14
  *
14
15
  * @export
@@ -51,6 +52,12 @@ export interface Pipeline {
51
52
  * @memberof Pipeline
52
53
  */
53
54
  created_by: number;
55
+ /**
56
+ *
57
+ * @type {Array<PipelineStep>}
58
+ * @memberof Pipeline
59
+ */
60
+ steps?: Array<PipelineStep>;
54
61
  /**
55
62
  * The date and time when the record was created
56
63
  * @type {string}
@@ -0,0 +1,36 @@
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 TeamUpdate
16
+ */
17
+ export interface TeamUpdate {
18
+ /**
19
+ * The unique ID of the team
20
+ * @type {number}
21
+ * @memberof TeamUpdate
22
+ */
23
+ id: number;
24
+ /**
25
+ * The name of the team
26
+ * @type {string}
27
+ * @memberof TeamUpdate
28
+ */
29
+ name: string;
30
+ /**
31
+ * The URL to team\'s image
32
+ * @type {string}
33
+ * @memberof TeamUpdate
34
+ */
35
+ photo_url?: string;
36
+ }
@@ -1,11 +1,10 @@
1
1
  import { ApiBaseService } from './ApiBaseService';
2
2
  import { ApplicationsApiService } from '../api/generated/apis/applications-api';
3
3
  import { ApplicationsDeploymentsApiService } from '../api/generated/apis/applications-deployments-api';
4
- import { ApplicationsScriptsApiService } from '../api/generated/apis/applications-scripts-api';
5
4
  import { ApplicationsSSLCertificatesApiService } from '../api/generated/apis/applications-sslcertificates-api';
6
5
  import { ApplicationsVariablesApiService } from '../api/generated/apis/applications-variables-api';
7
6
  import { ApplicationsHooksApiService } from '../api/generated/apis/applications-hooks-api';
8
7
  export declare class ApplicationService extends ApiBaseService {
9
8
  }
10
- export interface ApplicationService extends ApplicationsApiService, ApplicationsDeploymentsApiService, ApplicationsApiService, ApplicationsScriptsApiService, ApplicationsSSLCertificatesApiService, ApplicationsVariablesApiService, ApplicationsHooksApiService {
9
+ export interface ApplicationService extends ApplicationsApiService, ApplicationsDeploymentsApiService, ApplicationsApiService, ApplicationsSSLCertificatesApiService, ApplicationsVariablesApiService, ApplicationsHooksApiService {
11
10
  }
@@ -5,7 +5,6 @@ const ApiBaseService_1 = require("./ApiBaseService");
5
5
  const MergeSiblingClasses_1 = require("../common/MergeSiblingClasses");
6
6
  const applications_api_1 = require("../api/generated/apis/applications-api");
7
7
  const applications_deployments_api_1 = require("../api/generated/apis/applications-deployments-api");
8
- const applications_scripts_api_1 = require("../api/generated/apis/applications-scripts-api");
9
8
  const applications_sslcertificates_api_1 = require("../api/generated/apis/applications-sslcertificates-api");
10
9
  const applications_variables_api_1 = require("../api/generated/apis/applications-variables-api");
11
10
  const applications_hooks_api_1 = require("../api/generated/apis/applications-hooks-api");
@@ -15,7 +14,6 @@ exports.ApplicationService = ApplicationService;
15
14
  (0, MergeSiblingClasses_1.mergeSiblingClasses)(ApplicationService, [
16
15
  applications_api_1.ApplicationsApiService,
17
16
  applications_deployments_api_1.ApplicationsDeploymentsApiService,
18
- applications_scripts_api_1.ApplicationsScriptsApiService,
19
17
  applications_sslcertificates_api_1.ApplicationsSSLCertificatesApiService,
20
18
  applications_variables_api_1.ApplicationsVariablesApiService,
21
19
  applications_hooks_api_1.ApplicationsHooksApiService,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devopness/sdk-js",
3
- "version": "2.9.0",
3
+ "version": "2.11.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -1,35 +0,0 @@
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 { ApiBaseService } from "../../../services/ApiBaseService";
13
- import { ApiResponse } from "../../../common/ApiResponse";
14
- import { Script } from '../../generated/models';
15
- import { ScriptCreate } from '../../generated/models';
16
- /**
17
- * ApplicationsScriptsApiService - Auto-generated
18
- */
19
- export declare class ApplicationsScriptsApiService extends ApiBaseService {
20
- /**
21
- *
22
- * @summary Add script to application as a deployment step
23
- * @param {number} applicationId Unique ID of the application to retrieve scripts from
24
- * @param {ScriptCreate} scriptCreate A JSON object containing application script data
25
- */
26
- addScriptToApplication(applicationId: number, scriptCreate: ScriptCreate): Promise<ApiResponse<Script>>;
27
- /**
28
- *
29
- * @summary List scripts to be executed as custom deployment steps of an application
30
- * @param {number} applicationId Unique ID of the application to retrieve scripts from
31
- * @param {number} [page] Number of the page to be retrieved
32
- * @param {number} [perPage] Number of items returned per page
33
- */
34
- listApplicationScripts(applicationId: number, page?: number, perPage?: number): Promise<ApiResponse<Array<Script>>>;
35
- }
@@ -1,78 +0,0 @@
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
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
- return new (P || (P = Promise))(function (resolve, reject) {
17
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
- step((generator = generator.apply(thisArg, _arguments || [])).next());
21
- });
22
- };
23
- Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.ApplicationsScriptsApiService = void 0;
25
- const ApiBaseService_1 = require("../../../services/ApiBaseService");
26
- const ApiResponse_1 = require("../../../common/ApiResponse");
27
- const Exceptions_1 = require("../../../common/Exceptions");
28
- /**
29
- * ApplicationsScriptsApiService - Auto-generated
30
- */
31
- class ApplicationsScriptsApiService extends ApiBaseService_1.ApiBaseService {
32
- /**
33
- *
34
- * @summary Add script to application as a deployment step
35
- * @param {number} applicationId Unique ID of the application to retrieve scripts from
36
- * @param {ScriptCreate} scriptCreate A JSON object containing application script data
37
- */
38
- addScriptToApplication(applicationId, scriptCreate) {
39
- return __awaiter(this, void 0, void 0, function* () {
40
- if (applicationId === null || applicationId === undefined) {
41
- throw new Exceptions_1.ArgumentNullException('applicationId', 'addScriptToApplication');
42
- }
43
- if (scriptCreate === null || scriptCreate === undefined) {
44
- throw new Exceptions_1.ArgumentNullException('scriptCreate', 'addScriptToApplication');
45
- }
46
- let queryString = '';
47
- const requestUrl = '/applications/{application_id}/scripts' + (queryString ? `?${queryString}` : '');
48
- const response = yield this.post(requestUrl.replace(`{${"application_id"}}`, encodeURIComponent(String(applicationId))), scriptCreate);
49
- return new ApiResponse_1.ApiResponse(response);
50
- });
51
- }
52
- /**
53
- *
54
- * @summary List scripts to be executed as custom deployment steps of an application
55
- * @param {number} applicationId Unique ID of the application to retrieve scripts from
56
- * @param {number} [page] Number of the page to be retrieved
57
- * @param {number} [perPage] Number of items returned per page
58
- */
59
- listApplicationScripts(applicationId, page, perPage) {
60
- return __awaiter(this, void 0, void 0, function* () {
61
- if (applicationId === null || applicationId === undefined) {
62
- throw new Exceptions_1.ArgumentNullException('applicationId', 'listApplicationScripts');
63
- }
64
- let queryString = '';
65
- const queryParams = { page: page, per_page: perPage, };
66
- for (const key in queryParams) {
67
- if (queryParams[key] === undefined || queryParams[key] === null) {
68
- continue;
69
- }
70
- queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
71
- }
72
- const requestUrl = '/applications/{application_id}/scripts' + (queryString ? `?${queryString}` : '');
73
- const response = yield this.get(requestUrl.replace(`{${"application_id"}}`, encodeURIComponent(String(applicationId))));
74
- return new ApiResponse_1.ApiResponse(response);
75
- });
76
- }
77
- }
78
- exports.ApplicationsScriptsApiService = ApplicationsScriptsApiService;
@@ -1,39 +0,0 @@
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 { ApiBaseService } from "../../../services/ApiBaseService";
13
- import { ApiResponse } from "../../../common/ApiResponse";
14
- import { Script } from '../../generated/models';
15
- import { ScriptUpdate } from '../../generated/models';
16
- /**
17
- * ScriptsApiService - Auto-generated
18
- */
19
- export declare class ScriptsApiService extends ApiBaseService {
20
- /**
21
- *
22
- * @summary Delete a script by ID
23
- * @param {number} scriptId The id of the script
24
- */
25
- deleteScript(scriptId: number): Promise<ApiResponse<void>>;
26
- /**
27
- *
28
- * @summary Get a script by ID
29
- * @param {number} scriptId The unique id of the script
30
- */
31
- getScript(scriptId: number): Promise<ApiResponse<Script>>;
32
- /**
33
- *
34
- * @summary Update an existing script
35
- * @param {number} scriptId The unique id of the script to be updated
36
- * @param {ScriptUpdate} scriptUpdate A JSON object containing script data
37
- */
38
- updateScript(scriptId: number, scriptUpdate: ScriptUpdate): Promise<ApiResponse<void>>;
39
- }
@@ -1,85 +0,0 @@
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
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
- return new (P || (P = Promise))(function (resolve, reject) {
17
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
- step((generator = generator.apply(thisArg, _arguments || [])).next());
21
- });
22
- };
23
- Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.ScriptsApiService = void 0;
25
- const ApiBaseService_1 = require("../../../services/ApiBaseService");
26
- const ApiResponse_1 = require("../../../common/ApiResponse");
27
- const Exceptions_1 = require("../../../common/Exceptions");
28
- /**
29
- * ScriptsApiService - Auto-generated
30
- */
31
- class ScriptsApiService extends ApiBaseService_1.ApiBaseService {
32
- /**
33
- *
34
- * @summary Delete a script by ID
35
- * @param {number} scriptId The id of the script
36
- */
37
- deleteScript(scriptId) {
38
- return __awaiter(this, void 0, void 0, function* () {
39
- if (scriptId === null || scriptId === undefined) {
40
- throw new Exceptions_1.ArgumentNullException('scriptId', 'deleteScript');
41
- }
42
- let queryString = '';
43
- const requestUrl = '/scripts/{script_id}' + (queryString ? `?${queryString}` : '');
44
- const response = yield this.delete(requestUrl.replace(`{${"script_id"}}`, encodeURIComponent(String(scriptId))));
45
- return new ApiResponse_1.ApiResponse(response);
46
- });
47
- }
48
- /**
49
- *
50
- * @summary Get a script by ID
51
- * @param {number} scriptId The unique id of the script
52
- */
53
- getScript(scriptId) {
54
- return __awaiter(this, void 0, void 0, function* () {
55
- if (scriptId === null || scriptId === undefined) {
56
- throw new Exceptions_1.ArgumentNullException('scriptId', 'getScript');
57
- }
58
- let queryString = '';
59
- const requestUrl = '/scripts/{script_id}' + (queryString ? `?${queryString}` : '');
60
- const response = yield this.get(requestUrl.replace(`{${"script_id"}}`, encodeURIComponent(String(scriptId))));
61
- return new ApiResponse_1.ApiResponse(response);
62
- });
63
- }
64
- /**
65
- *
66
- * @summary Update an existing script
67
- * @param {number} scriptId The unique id of the script to be updated
68
- * @param {ScriptUpdate} scriptUpdate A JSON object containing script data
69
- */
70
- updateScript(scriptId, scriptUpdate) {
71
- return __awaiter(this, void 0, void 0, function* () {
72
- if (scriptId === null || scriptId === undefined) {
73
- throw new Exceptions_1.ArgumentNullException('scriptId', 'updateScript');
74
- }
75
- if (scriptUpdate === null || scriptUpdate === undefined) {
76
- throw new Exceptions_1.ArgumentNullException('scriptUpdate', 'updateScript');
77
- }
78
- let queryString = '';
79
- const requestUrl = '/scripts/{script_id}' + (queryString ? `?${queryString}` : '');
80
- const response = yield this.put(requestUrl.replace(`{${"script_id"}}`, encodeURIComponent(String(scriptId))), scriptUpdate);
81
- return new ApiResponse_1.ApiResponse(response);
82
- });
83
- }
84
- }
85
- exports.ScriptsApiService = ScriptsApiService;
@@ -1,50 +0,0 @@
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 { TriggerEvent } from './trigger-event';
13
- import { TriggerType } from './trigger-type';
14
- /**
15
- *
16
- * @export
17
- * @interface ScriptCreate
18
- */
19
- export interface ScriptCreate {
20
- /**
21
- * Name/short description of the script
22
- * @type {string}
23
- * @memberof ScriptCreate
24
- */
25
- name: string;
26
- /**
27
- * A command line or multiline bash script
28
- * @type {string}
29
- * @memberof ScriptCreate
30
- */
31
- source_code: string;
32
- /**
33
- *
34
- * @type {TriggerType}
35
- * @memberof ScriptCreate
36
- */
37
- trigger_type: TriggerType;
38
- /**
39
- *
40
- * @type {TriggerEvent}
41
- * @memberof ScriptCreate
42
- */
43
- trigger_event: TriggerEvent;
44
- /**
45
- * The relative order of the script execution in case the event has multiple scripts attached to it
46
- * @type {number}
47
- * @memberof ScriptCreate
48
- */
49
- trigger_order: number;
50
- }
@@ -1,74 +0,0 @@
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 { TriggerEvent } from './trigger-event';
13
- import { TriggerType } from './trigger-type';
14
- /**
15
- *
16
- * @export
17
- * @interface ScriptUpdate
18
- */
19
- export interface ScriptUpdate {
20
- /**
21
- * Script\'s unique id
22
- * @type {number}
23
- * @memberof ScriptUpdate
24
- */
25
- id: number;
26
- /**
27
- * The id of the application to be linked
28
- * @type {number}
29
- * @memberof ScriptUpdate
30
- */
31
- application_id?: number;
32
- /**
33
- * The type of the script
34
- * @type {string}
35
- * @memberof ScriptUpdate
36
- */
37
- type?: string;
38
- /**
39
- * Name/short description of the script
40
- * @type {string}
41
- * @memberof ScriptUpdate
42
- */
43
- name: string;
44
- /**
45
- * A command line or multiline bash script
46
- * @type {string}
47
- * @memberof ScriptUpdate
48
- */
49
- source_code: string;
50
- /**
51
- * The name of the Unix user on behalf of which the script will be executed
52
- * @type {string}
53
- * @memberof ScriptUpdate
54
- */
55
- run_as_user: string;
56
- /**
57
- *
58
- * @type {TriggerType}
59
- * @memberof ScriptUpdate
60
- */
61
- trigger_type: TriggerType;
62
- /**
63
- *
64
- * @type {TriggerEvent}
65
- * @memberof ScriptUpdate
66
- */
67
- trigger_event: TriggerEvent;
68
- /**
69
- * The relative order of the script execution in case the event has multiple scripts attached
70
- * @type {number}
71
- * @memberof ScriptUpdate
72
- */
73
- trigger_order: number;
74
- }
@@ -1,14 +0,0 @@
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 });
@@ -1,93 +0,0 @@
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 { ResourceType } from './resource-type';
13
- import { TriggerEvent } from './trigger-event';
14
- import { TriggerType } from './trigger-type';
15
- /**
16
- *
17
- * @export
18
- * @interface Script
19
- */
20
- export interface Script {
21
- /**
22
- * The Id of the given script
23
- * @type {number}
24
- * @memberof Script
25
- */
26
- id: number;
27
- /**
28
- *
29
- * @type {ResourceType}
30
- * @memberof Script
31
- */
32
- resource_type: ResourceType;
33
- /**
34
- * The id of the linked resource
35
- * @type {number}
36
- * @memberof Script
37
- */
38
- resource_id: number;
39
- /**
40
- * The id of the user that own the script
41
- * @type {number}
42
- * @memberof Script
43
- */
44
- created_by: number;
45
- /**
46
- * Name/short description of the script
47
- * @type {string}
48
- * @memberof Script
49
- */
50
- name: string;
51
- /**
52
- * A command line or multiline bash script
53
- * @type {string}
54
- * @memberof Script
55
- */
56
- command: string;
57
- /**
58
- * The name of the Unix user on behalf of which the script will be executed
59
- * @type {string}
60
- * @memberof Script
61
- */
62
- run_as_user: string;
63
- /**
64
- *
65
- * @type {TriggerType}
66
- * @memberof Script
67
- */
68
- trigger_type: TriggerType;
69
- /**
70
- *
71
- * @type {TriggerEvent}
72
- * @memberof Script
73
- */
74
- trigger_event: TriggerEvent;
75
- /**
76
- * The relative order of the script execution in case the event has multiple scripts attached
77
- * @type {number}
78
- * @memberof Script
79
- */
80
- trigger_order: number;
81
- /**
82
- * The date and time when the record was created
83
- * @type {string}
84
- * @memberof Script
85
- */
86
- created_at?: string;
87
- /**
88
- * The date and time when the record was last updated
89
- * @type {string}
90
- * @memberof Script
91
- */
92
- updated_at?: string;
93
- }
@@ -1,14 +0,0 @@
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 });
@@ -1,3 +0,0 @@
1
- import { ScriptsApiService } from '../api/generated/apis/scripts-api';
2
- export declare class ScriptService extends ScriptsApiService {
3
- }
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ScriptService = void 0;
4
- const scripts_api_1 = require("../api/generated/apis/scripts-api");
5
- class ScriptService extends scripts_api_1.ScriptsApiService {
6
- }
7
- exports.ScriptService = ScriptService;