@devopness/sdk-js 2.8.0 → 2.10.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.
@@ -13,6 +13,7 @@ import { ApiBaseService } from "../../../services/ApiBaseService";
13
13
  import { ApiResponse } from "../../../common/ApiResponse";
14
14
  import { PipelineStep } from '../../generated/models';
15
15
  import { PipelineStepCreate } from '../../generated/models';
16
+ import { PipelineStepUpdate } from '../../generated/models';
16
17
  /**
17
18
  * PipelinesStepsApiService - Auto-generated
18
19
  */
@@ -38,4 +39,12 @@ export declare class PipelinesStepsApiService extends ApiBaseService {
38
39
  * @param {number} stepId Unique ID of the step to be unlinked
39
40
  */
40
41
  unlinkStepFromPipeline(pipelineId: number, stepId: number): Promise<ApiResponse<void>>;
42
+ /**
43
+ *
44
+ * @summary Update a pipeline step
45
+ * @param {number} pipelineId Unique ID of the pipeline
46
+ * @param {number} stepId Unique ID of the pipeline step to update information from
47
+ * @param {PipelineStepUpdate} pipelineStepUpdate A JSON object containing pipeline step data
48
+ */
49
+ updatePipelineStep(pipelineId: number, stepId: number, pipelineStepUpdate: PipelineStepUpdate): Promise<ApiResponse<void>>;
41
50
  }
@@ -89,5 +89,29 @@ class PipelinesStepsApiService extends ApiBaseService_1.ApiBaseService {
89
89
  return new ApiResponse_1.ApiResponse(response);
90
90
  });
91
91
  }
92
+ /**
93
+ *
94
+ * @summary Update a pipeline step
95
+ * @param {number} pipelineId Unique ID of the pipeline
96
+ * @param {number} stepId Unique ID of the pipeline step to update information from
97
+ * @param {PipelineStepUpdate} pipelineStepUpdate A JSON object containing pipeline step data
98
+ */
99
+ updatePipelineStep(pipelineId, stepId, pipelineStepUpdate) {
100
+ return __awaiter(this, void 0, void 0, function* () {
101
+ if (pipelineId === null || pipelineId === undefined) {
102
+ throw new Exceptions_1.ArgumentNullException('pipelineId', 'updatePipelineStep');
103
+ }
104
+ if (stepId === null || stepId === undefined) {
105
+ throw new Exceptions_1.ArgumentNullException('stepId', 'updatePipelineStep');
106
+ }
107
+ if (pipelineStepUpdate === null || pipelineStepUpdate === undefined) {
108
+ throw new Exceptions_1.ArgumentNullException('pipelineStepUpdate', 'updatePipelineStep');
109
+ }
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);
113
+ return new ApiResponse_1.ApiResponse(response);
114
+ });
115
+ }
92
116
  }
93
117
  exports.PipelinesStepsApiService = PipelinesStepsApiService;
@@ -13,6 +13,7 @@ import { ApiBaseService } from "../../../services/ApiBaseService";
13
13
  import { ApiResponse } from "../../../common/ApiResponse";
14
14
  import { Team } from '../../generated/models';
15
15
  import { TeamCreate } from '../../generated/models';
16
+ import { TeamRelation } from '../../generated/models';
16
17
  /**
17
18
  * ProjectsTeamsApiService - Auto-generated
18
19
  */
@@ -24,4 +25,12 @@ export declare class ProjectsTeamsApiService extends ApiBaseService {
24
25
  * @param {TeamCreate} teamCreate A JSON object containing team data
25
26
  */
26
27
  addTeam(projectId: number, teamCreate: TeamCreate): Promise<ApiResponse<Team>>;
28
+ /**
29
+ *
30
+ * @summary Returns a list of all teams belonging to a project
31
+ * @param {number} projectId Numeric ID of the project to get teams from
32
+ * @param {number} [page] Number of the page to be retrieved
33
+ * @param {number} [perPage] Number of items returned per page
34
+ */
35
+ listProjectTeams(projectId: number, page?: number, perPage?: number): Promise<ApiResponse<Array<TeamRelation>>>;
27
36
  }
@@ -49,5 +49,30 @@ class ProjectsTeamsApiService extends ApiBaseService_1.ApiBaseService {
49
49
  return new ApiResponse_1.ApiResponse(response);
50
50
  });
51
51
  }
52
+ /**
53
+ *
54
+ * @summary Returns a list of all teams belonging to a project
55
+ * @param {number} projectId Numeric ID of the project to get teams from
56
+ * @param {number} [page] Number of the page to be retrieved
57
+ * @param {number} [perPage] Number of items returned per page
58
+ */
59
+ listProjectTeams(projectId, page, perPage) {
60
+ return __awaiter(this, void 0, void 0, function* () {
61
+ if (projectId === null || projectId === undefined) {
62
+ throw new Exceptions_1.ArgumentNullException('projectId', 'listProjectTeams');
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 = '/projects/{project_id}/teams' + (queryString ? `?${queryString}` : '');
73
+ const response = yield this.get(requestUrl.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId))));
74
+ return new ApiResponse_1.ApiResponse(response);
75
+ });
76
+ }
52
77
  }
53
78
  exports.ProjectsTeamsApiService = ProjectsTeamsApiService;
@@ -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
@@ -127,6 +127,7 @@ export * from './pipeline-create';
127
127
  export * from './pipeline-step';
128
128
  export * from './pipeline-step-create';
129
129
  export * from './pipeline-step-runner-name';
130
+ export * from './pipeline-step-update';
130
131
  export * from './project';
131
132
  export * from './project-create';
132
133
  export * from './project-relation';
@@ -143,6 +143,7 @@ __exportStar(require("./pipeline-create"), exports);
143
143
  __exportStar(require("./pipeline-step"), exports);
144
144
  __exportStar(require("./pipeline-step-create"), exports);
145
145
  __exportStar(require("./pipeline-step-runner-name"), exports);
146
+ __exportStar(require("./pipeline-step-update"), exports);
146
147
  __exportStar(require("./project"), exports);
147
148
  __exportStar(require("./project-create"), exports);
148
149
  __exportStar(require("./project-relation"), exports);
@@ -0,0 +1,49 @@
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 { PipelineStepRunnerName } from './pipeline-step-runner-name';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface PipelineStepUpdate
17
+ */
18
+ export interface PipelineStepUpdate {
19
+ /**
20
+ * Name/short description of the script
21
+ * @type {string}
22
+ * @memberof PipelineStepUpdate
23
+ */
24
+ name: string;
25
+ /**
26
+ * A command line or multiline bash script
27
+ * @type {string}
28
+ * @memberof PipelineStepUpdate
29
+ */
30
+ command: string;
31
+ /**
32
+ *
33
+ * @type {PipelineStepRunnerName}
34
+ * @memberof PipelineStepUpdate
35
+ */
36
+ runner: PipelineStepRunnerName;
37
+ /**
38
+ * The name of the Unix user on behalf of which the script will be executed
39
+ * @type {string}
40
+ * @memberof PipelineStepUpdate
41
+ */
42
+ run_as_user?: string;
43
+ /**
44
+ * Repositions the pipeline step after the step with the given `trigger_order`
45
+ * @type {number}
46
+ * @memberof PipelineStepUpdate
47
+ */
48
+ trigger_after?: number;
49
+ }
@@ -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 });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devopness/sdk-js",
3
- "version": "2.8.0",
3
+ "version": "2.10.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },