@devopness/sdk-js 2.70.0 → 2.71.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 { Action } from '../../generated/models';
15
15
  import { ActionPipelineCreate } from '../../generated/models';
16
+ import { ActionRelation } from '../../generated/models';
16
17
  /**
17
18
  * PipelinesActionsApiService - Auto-generated
18
19
  */
@@ -24,4 +25,12 @@ export declare class PipelinesActionsApiService extends ApiBaseService {
24
25
  * @param {ActionPipelineCreate} actionPipelineCreate A JSON object containing the resource data
25
26
  */
26
27
  addPipelineAction(pipelineId: number, actionPipelineCreate: ActionPipelineCreate): Promise<ApiResponse<Action>>;
28
+ /**
29
+ *
30
+ * @summary Return a list of pipeline\'s actions
31
+ * @param {number} pipelineId The ID of the pipeline.
32
+ * @param {number} [page] Number of the page to be retrieved
33
+ * @param {number} [perPage] Number of items returned per page
34
+ */
35
+ listPipelineActions(pipelineId: number, page?: number, perPage?: number): Promise<ApiResponse<Array<ActionRelation>>>;
27
36
  }
@@ -49,5 +49,30 @@ class PipelinesActionsApiService extends ApiBaseService_1.ApiBaseService {
49
49
  return new ApiResponse_1.ApiResponse(response);
50
50
  });
51
51
  }
52
+ /**
53
+ *
54
+ * @summary Return a list of pipeline\'s actions
55
+ * @param {number} pipelineId The ID of the pipeline.
56
+ * @param {number} [page] Number of the page to be retrieved
57
+ * @param {number} [perPage] Number of items returned per page
58
+ */
59
+ listPipelineActions(pipelineId, page, perPage) {
60
+ return __awaiter(this, void 0, void 0, function* () {
61
+ if (pipelineId === null || pipelineId === undefined) {
62
+ throw new Exceptions_1.ArgumentNullException('pipelineId', 'listPipelineActions');
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 = '/pipelines/{pipeline_id}/actions' + (queryString ? `?${queryString}` : '');
73
+ const response = yield this.get(requestUrl.replace(`{${"pipeline_id"}}`, encodeURIComponent(String(pipelineId))));
74
+ return new ApiResponse_1.ApiResponse(response);
75
+ });
76
+ }
52
77
  }
53
78
  exports.PipelinesActionsApiService = PipelinesActionsApiService;
@@ -63,7 +63,7 @@ export interface ActionRelation {
63
63
  * @type {ActionData}
64
64
  * @memberof ActionRelation
65
65
  */
66
- action_data: ActionData | null;
66
+ action_data: ActionData;
67
67
  /**
68
68
  *
69
69
  * @type {ActionTriggeredFrom}
@@ -80,7 +80,7 @@ export interface ActionRetryResponse {
80
80
  * @type {ActionData}
81
81
  * @memberof ActionRetryResponse
82
82
  */
83
- action_data: ActionData | null;
83
+ action_data: ActionData;
84
84
  /**
85
85
  *
86
86
  * @type {ActionTriggeredFrom}
@@ -16,15 +16,16 @@
16
16
  */
17
17
  export declare enum ActionType {
18
18
  Add = "add",
19
- Remove = "remove",
20
19
  Deploy = "deploy",
20
+ Disable = "disable",
21
+ Enable = "enable",
22
+ GetStatus = "get-status",
21
23
  Redeploy = "redeploy",
22
- Rollback = "rollback",
23
24
  Reload = "reload",
25
+ Remove = "remove",
24
26
  Restart = "restart",
27
+ Rollback = "rollback",
25
28
  Start = "start",
26
29
  Status = "status",
27
- Stop = "stop",
28
- Enable = "enable",
29
- Disable = "disable"
30
+ Stop = "stop"
30
31
  }
@@ -21,15 +21,16 @@ exports.ActionType = void 0;
21
21
  var ActionType;
22
22
  (function (ActionType) {
23
23
  ActionType["Add"] = "add";
24
- ActionType["Remove"] = "remove";
25
24
  ActionType["Deploy"] = "deploy";
25
+ ActionType["Disable"] = "disable";
26
+ ActionType["Enable"] = "enable";
27
+ ActionType["GetStatus"] = "get-status";
26
28
  ActionType["Redeploy"] = "redeploy";
27
- ActionType["Rollback"] = "rollback";
28
29
  ActionType["Reload"] = "reload";
30
+ ActionType["Remove"] = "remove";
29
31
  ActionType["Restart"] = "restart";
32
+ ActionType["Rollback"] = "rollback";
30
33
  ActionType["Start"] = "start";
31
34
  ActionType["Status"] = "status";
32
35
  ActionType["Stop"] = "stop";
33
- ActionType["Enable"] = "enable";
34
- ActionType["Disable"] = "disable";
35
36
  })(ActionType = exports.ActionType || (exports.ActionType = {}));
@@ -80,7 +80,7 @@ export interface Action {
80
80
  * @type {ActionData}
81
81
  * @memberof Action
82
82
  */
83
- action_data: ActionData | null;
83
+ action_data: ActionData;
84
84
  /**
85
85
  *
86
86
  * @type {ActionTriggeredFrom}
@@ -17,5 +17,6 @@
17
17
  export declare enum CloudProviderServiceCode {
18
18
  AwsEc2 = "aws-ec2",
19
19
  DigitaloceanDroplet = "digitalocean-droplet",
20
- GcpGce = "gcp-gce"
20
+ GcpGce = "gcp-gce",
21
+ SelfHostedCustom = "self-hosted-custom"
21
22
  }
@@ -23,4 +23,5 @@ var CloudProviderServiceCode;
23
23
  CloudProviderServiceCode["AwsEc2"] = "aws-ec2";
24
24
  CloudProviderServiceCode["DigitaloceanDroplet"] = "digitalocean-droplet";
25
25
  CloudProviderServiceCode["GcpGce"] = "gcp-gce";
26
+ CloudProviderServiceCode["SelfHostedCustom"] = "self-hosted-custom";
26
27
  })(CloudProviderServiceCode = exports.CloudProviderServiceCode || (exports.CloudProviderServiceCode = {}));
@@ -22,13 +22,13 @@ export interface ServerUpdate {
22
22
  */
23
23
  id: number;
24
24
  /**
25
- * Public ipv4 address for server access. This field is required when <code>provision_settings.self_hosted</code> is <code>true</code>.
25
+ * Public ipv4 address for server access.
26
26
  * @type {string}
27
27
  * @memberof ServerUpdate
28
28
  */
29
29
  ip_address?: string;
30
30
  /**
31
- * The network port to which the SSH daemon is listening to SSH connections on the server. This field is required when <code>provision_settings.self_hosted</code> is <code>true</code>. Must be between 22 and 65535.
31
+ * The network port to which the SSH daemon is listening to SSH connections on the server. Must be between 0 and 65535.
32
32
  * @type {number}
33
33
  * @memberof ServerUpdate
34
34
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devopness/sdk-js",
3
- "version": "2.70.0",
3
+ "version": "2.71.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },