@devopness/sdk-js 2.15.0 → 2.17.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.
@@ -19,21 +19,21 @@ import { CronJobUpdate } from '../../generated/models';
19
19
  export declare class CronJobsApiService extends ApiBaseService {
20
20
  /**
21
21
  *
22
- * @summary Delete a given CronJob
23
- * @param {number} cronJobId Numeric ID of the cron job to be deleted
22
+ * @summary Delete a given Cron Job
23
+ * @param {number} cronJobId The ID of the cron job.
24
24
  */
25
25
  deleteCronJob(cronJobId: number): Promise<ApiResponse<void>>;
26
26
  /**
27
27
  *
28
- * @summary Get a CronJob by ID
29
- * @param {number} cronJobId Numeric ID of the cron job to get
28
+ * @summary Get a Cron Job by ID
29
+ * @param {number} cronJobId The ID of the cron job.
30
30
  */
31
31
  getCronJob(cronJobId: number): Promise<ApiResponse<CronJob>>;
32
32
  /**
33
33
  *
34
- * @summary Update an existing cron job
35
- * @param {number} cronJobId Numeric ID of the cron job to update
36
- * @param {CronJobUpdate} cronJobUpdate A JSON object containing cron job data
34
+ * @summary Update an existing Cron Job
35
+ * @param {number} cronJobId The ID of the cron job.
36
+ * @param {CronJobUpdate} cronJobUpdate A JSON object containing the resource data
37
37
  */
38
38
  updateCronJob(cronJobId: number, cronJobUpdate: CronJobUpdate): Promise<ApiResponse<void>>;
39
39
  }
@@ -31,8 +31,8 @@ const Exceptions_1 = require("../../../common/Exceptions");
31
31
  class CronJobsApiService extends ApiBaseService_1.ApiBaseService {
32
32
  /**
33
33
  *
34
- * @summary Delete a given CronJob
35
- * @param {number} cronJobId Numeric ID of the cron job to be deleted
34
+ * @summary Delete a given Cron Job
35
+ * @param {number} cronJobId The ID of the cron job.
36
36
  */
37
37
  deleteCronJob(cronJobId) {
38
38
  return __awaiter(this, void 0, void 0, function* () {
@@ -47,8 +47,8 @@ class CronJobsApiService extends ApiBaseService_1.ApiBaseService {
47
47
  }
48
48
  /**
49
49
  *
50
- * @summary Get a CronJob by ID
51
- * @param {number} cronJobId Numeric ID of the cron job to get
50
+ * @summary Get a Cron Job by ID
51
+ * @param {number} cronJobId The ID of the cron job.
52
52
  */
53
53
  getCronJob(cronJobId) {
54
54
  return __awaiter(this, void 0, void 0, function* () {
@@ -63,9 +63,9 @@ class CronJobsApiService extends ApiBaseService_1.ApiBaseService {
63
63
  }
64
64
  /**
65
65
  *
66
- * @summary Update an existing cron job
67
- * @param {number} cronJobId Numeric ID of the cron job to update
68
- * @param {CronJobUpdate} cronJobUpdate A JSON object containing cron job data
66
+ * @summary Update an existing Cron Job
67
+ * @param {number} cronJobId The ID of the cron job.
68
+ * @param {CronJobUpdate} cronJobUpdate A JSON object containing the resource data
69
69
  */
70
70
  updateCronJob(cronJobId, cronJobUpdate) {
71
71
  return __awaiter(this, void 0, void 0, function* () {
@@ -11,6 +11,8 @@
11
11
  */
12
12
  import { ApiBaseService } from "../../../services/ApiBaseService";
13
13
  import { ApiResponse } from "../../../common/ApiResponse";
14
+ import { CronJob } from '../../generated/models';
15
+ import { CronJobCreate } from '../../generated/models';
14
16
  import { CronJobRelation } from '../../generated/models';
15
17
  /**
16
18
  * EnvironmentsCronJobsApiService - Auto-generated
@@ -18,8 +20,15 @@ import { CronJobRelation } from '../../generated/models';
18
20
  export declare class EnvironmentsCronJobsApiService extends ApiBaseService {
19
21
  /**
20
22
  *
21
- * @summary Return a list of all Cron Jobs belonging to a environment
22
- * @param {number} environmentId Numeric ID of the environment to get cron jobs from
23
+ * @summary Add a Cron Job to the given environment
24
+ * @param {number} environmentId The ID of the environment.
25
+ * @param {CronJobCreate} cronJobCreate A JSON object containing the resource data
26
+ */
27
+ addEnvironmentCronJob(environmentId: number, cronJobCreate: CronJobCreate): Promise<ApiResponse<CronJob>>;
28
+ /**
29
+ *
30
+ * @summary Return a list of all Cron Jobs belonging to an environment
31
+ * @param {number} environmentId The ID of the environment.
23
32
  * @param {number} [page] Number of the page to be retrieved
24
33
  * @param {number} [perPage] Number of items returned per page
25
34
  */
@@ -31,8 +31,28 @@ const Exceptions_1 = require("../../../common/Exceptions");
31
31
  class EnvironmentsCronJobsApiService extends ApiBaseService_1.ApiBaseService {
32
32
  /**
33
33
  *
34
- * @summary Return a list of all Cron Jobs belonging to a environment
35
- * @param {number} environmentId Numeric ID of the environment to get cron jobs from
34
+ * @summary Add a Cron Job to the given environment
35
+ * @param {number} environmentId The ID of the environment.
36
+ * @param {CronJobCreate} cronJobCreate A JSON object containing the resource data
37
+ */
38
+ addEnvironmentCronJob(environmentId, cronJobCreate) {
39
+ return __awaiter(this, void 0, void 0, function* () {
40
+ if (environmentId === null || environmentId === undefined) {
41
+ throw new Exceptions_1.ArgumentNullException('environmentId', 'addEnvironmentCronJob');
42
+ }
43
+ if (cronJobCreate === null || cronJobCreate === undefined) {
44
+ throw new Exceptions_1.ArgumentNullException('cronJobCreate', 'addEnvironmentCronJob');
45
+ }
46
+ let queryString = '';
47
+ const requestUrl = '/environments/{environment_id}/cron-jobs' + (queryString ? `?${queryString}` : '');
48
+ const response = yield this.post(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))), cronJobCreate);
49
+ return new ApiResponse_1.ApiResponse(response);
50
+ });
51
+ }
52
+ /**
53
+ *
54
+ * @summary Return a list of all Cron Jobs belonging to an environment
55
+ * @param {number} environmentId The ID of the environment.
36
56
  * @param {number} [page] Number of the page to be retrieved
37
57
  * @param {number} [perPage] Number of items returned per page
38
58
  */
@@ -14,6 +14,7 @@ import { ApiResponse } from "../../../common/ApiResponse";
14
14
  import { EnvironmentLinkItem } from '../../generated/models';
15
15
  import { Server } from '../../generated/models';
16
16
  import { ServerCreate } from '../../generated/models';
17
+ import { ServerRelation } from '../../generated/models';
17
18
  /**
18
19
  * EnvironmentsServersApiService - Auto-generated
19
20
  */
@@ -33,6 +34,14 @@ export declare class EnvironmentsServersApiService extends ApiBaseService {
33
34
  * @param {EnvironmentLinkItem} [environmentLinkItem] A JSON object containing environment server link optional parameters
34
35
  */
35
36
  linkServerToEnvironment(environmentId: number, serverId: number, environmentLinkItem?: EnvironmentLinkItem): Promise<ApiResponse<void>>;
37
+ /**
38
+ *
39
+ * @summary Return a list of all servers belonging to a environment
40
+ * @param {number} environmentId The ID of the environment.
41
+ * @param {number} [page] Number of the page to be retrieved
42
+ * @param {number} [perPage] Number of items returned per page
43
+ */
44
+ listEnvironmentServers(environmentId: number, page?: number, perPage?: number): Promise<ApiResponse<Array<ServerRelation>>>;
36
45
  /**
37
46
  *
38
47
  * @summary Replace all linked servers by new ones. Immediately deploying all changes to previously and newly linked servers
@@ -70,6 +70,31 @@ class EnvironmentsServersApiService extends ApiBaseService_1.ApiBaseService {
70
70
  return new ApiResponse_1.ApiResponse(response);
71
71
  });
72
72
  }
73
+ /**
74
+ *
75
+ * @summary Return a list of all servers belonging to a environment
76
+ * @param {number} environmentId The ID of the environment.
77
+ * @param {number} [page] Number of the page to be retrieved
78
+ * @param {number} [perPage] Number of items returned per page
79
+ */
80
+ listEnvironmentServers(environmentId, page, perPage) {
81
+ return __awaiter(this, void 0, void 0, function* () {
82
+ if (environmentId === null || environmentId === undefined) {
83
+ throw new Exceptions_1.ArgumentNullException('environmentId', 'listEnvironmentServers');
84
+ }
85
+ let queryString = '';
86
+ const queryParams = { page: page, per_page: perPage, };
87
+ for (const key in queryParams) {
88
+ if (queryParams[key] === undefined || queryParams[key] === null) {
89
+ continue;
90
+ }
91
+ queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
92
+ }
93
+ const requestUrl = '/environments/{environment_id}/servers' + (queryString ? `?${queryString}` : '');
94
+ const response = yield this.get(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))));
95
+ return new ApiResponse_1.ApiResponse(response);
96
+ });
97
+ }
73
98
  /**
74
99
  *
75
100
  * @summary Replace all linked servers by new ones. Immediately deploying all changes to previously and newly linked servers
@@ -21,14 +21,14 @@ export declare class ProjectsCronJobsApiService extends ApiBaseService {
21
21
  /**
22
22
  *
23
23
  * @summary Add a Cron Job to the given project
24
- * @param {number} projectId The project numeric Id
25
- * @param {CronJobCreate} cronJobCreate A JSON object containing cron job data
24
+ * @param {number} projectId The ID of the project.
25
+ * @param {CronJobCreate} cronJobCreate A JSON object containing the resource data
26
26
  */
27
- addCronJobToProject(projectId: number, cronJobCreate: CronJobCreate): Promise<ApiResponse<CronJob>>;
27
+ addProjectCronJob(projectId: number, cronJobCreate: CronJobCreate): Promise<ApiResponse<CronJob>>;
28
28
  /**
29
29
  *
30
30
  * @summary Return a list of all Cron Jobs belonging to a project
31
- * @param {number} projectId Numeric ID of the project to get cron jobs from
31
+ * @param {number} projectId The ID of the project.
32
32
  * @param {number} [page] Number of the page to be retrieved
33
33
  * @param {number} [perPage] Number of items returned per page
34
34
  */
@@ -32,16 +32,16 @@ class ProjectsCronJobsApiService extends ApiBaseService_1.ApiBaseService {
32
32
  /**
33
33
  *
34
34
  * @summary Add a Cron Job to the given project
35
- * @param {number} projectId The project numeric Id
36
- * @param {CronJobCreate} cronJobCreate A JSON object containing cron job data
35
+ * @param {number} projectId The ID of the project.
36
+ * @param {CronJobCreate} cronJobCreate A JSON object containing the resource data
37
37
  */
38
- addCronJobToProject(projectId, cronJobCreate) {
38
+ addProjectCronJob(projectId, cronJobCreate) {
39
39
  return __awaiter(this, void 0, void 0, function* () {
40
40
  if (projectId === null || projectId === undefined) {
41
- throw new Exceptions_1.ArgumentNullException('projectId', 'addCronJobToProject');
41
+ throw new Exceptions_1.ArgumentNullException('projectId', 'addProjectCronJob');
42
42
  }
43
43
  if (cronJobCreate === null || cronJobCreate === undefined) {
44
- throw new Exceptions_1.ArgumentNullException('cronJobCreate', 'addCronJobToProject');
44
+ throw new Exceptions_1.ArgumentNullException('cronJobCreate', 'addProjectCronJob');
45
45
  }
46
46
  let queryString = '';
47
47
  const requestUrl = '/projects/{project_id}/cron-jobs' + (queryString ? `?${queryString}` : '');
@@ -52,7 +52,7 @@ class ProjectsCronJobsApiService extends ApiBaseService_1.ApiBaseService {
52
52
  /**
53
53
  *
54
54
  * @summary Return a list of all Cron Jobs belonging to a project
55
- * @param {number} projectId Numeric ID of the project to get cron jobs from
55
+ * @param {number} projectId The ID of the project.
56
56
  * @param {number} [page] Number of the page to be retrieved
57
57
  * @param {number} [perPage] Number of items returned per page
58
58
  */
@@ -20,20 +20,20 @@ export declare class SSHKeysApiService extends ApiBaseService {
20
20
  /**
21
21
  *
22
22
  * @summary Delete a given SSH key
23
- * @param {number} sshKeyId Numeric ID of the SSH key to be deleted
23
+ * @param {number} sshKeyId The ID of the ssh key.
24
24
  */
25
25
  deleteSshKey(sshKeyId: number): Promise<ApiResponse<void>>;
26
26
  /**
27
27
  *
28
28
  * @summary Get a SSH key by ID
29
- * @param {number} sshKeyId Numeric ID of the SSH key to get
29
+ * @param {number} sshKeyId The ID of the ssh key.
30
30
  */
31
31
  getSshKey(sshKeyId: number): Promise<ApiResponse<SshKey>>;
32
32
  /**
33
33
  *
34
34
  * @summary Update an existing SSH key
35
- * @param {number} sshKeyId Numeric ID of the SSH key to be updated
36
- * @param {SshKeyUpdate} sshKeyUpdate A JSON object containing SSH key data
35
+ * @param {number} sshKeyId The ID of the ssh key.
36
+ * @param {SshKeyUpdate} sshKeyUpdate A JSON object containing the resource data
37
37
  */
38
38
  updateSshKey(sshKeyId: number, sshKeyUpdate: SshKeyUpdate): Promise<ApiResponse<void>>;
39
39
  }
@@ -32,7 +32,7 @@ class SSHKeysApiService extends ApiBaseService_1.ApiBaseService {
32
32
  /**
33
33
  *
34
34
  * @summary Delete a given SSH key
35
- * @param {number} sshKeyId Numeric ID of the SSH key to be deleted
35
+ * @param {number} sshKeyId The ID of the ssh key.
36
36
  */
37
37
  deleteSshKey(sshKeyId) {
38
38
  return __awaiter(this, void 0, void 0, function* () {
@@ -48,7 +48,7 @@ class SSHKeysApiService extends ApiBaseService_1.ApiBaseService {
48
48
  /**
49
49
  *
50
50
  * @summary Get a SSH key by ID
51
- * @param {number} sshKeyId Numeric ID of the SSH key to get
51
+ * @param {number} sshKeyId The ID of the ssh key.
52
52
  */
53
53
  getSshKey(sshKeyId) {
54
54
  return __awaiter(this, void 0, void 0, function* () {
@@ -64,8 +64,8 @@ class SSHKeysApiService extends ApiBaseService_1.ApiBaseService {
64
64
  /**
65
65
  *
66
66
  * @summary Update an existing SSH key
67
- * @param {number} sshKeyId Numeric ID of the SSH key to be updated
68
- * @param {SshKeyUpdate} sshKeyUpdate A JSON object containing SSH key data
67
+ * @param {number} sshKeyId The ID of the ssh key.
68
+ * @param {SshKeyUpdate} sshKeyUpdate A JSON object containing the resource data
69
69
  */
70
70
  updateSshKey(sshKeyId, sshKeyUpdate) {
71
71
  return __awaiter(this, void 0, void 0, function* () {
@@ -17,41 +17,41 @@ import { EnvironmentLinkItem } from './environment-link-item';
17
17
  */
18
18
  export interface CronJobCreate {
19
19
  /**
20
- * Numeric ID of the project to which the cron job belongs to
21
- * @type {number}
22
- * @memberof CronJobCreate
23
- */
24
- project_id: number;
25
- /**
26
- * Numeric ID of the application to which the cron job belongs to
27
- * @type {number}
20
+ * A cron expression consisting of Minute, Hour, Day of Month, Month and Day of Week subexpressions.
21
+ * @type {string}
28
22
  * @memberof CronJobCreate
29
23
  */
30
- application_id?: number;
24
+ pattern: string;
31
25
  /**
32
- * The name of the cron job
26
+ * The name of the cron job. Must not be greater than 60 characters.
33
27
  * @type {string}
34
28
  * @memberof CronJobCreate
35
29
  */
36
30
  name: string;
37
31
  /**
38
- * The command line to be executed when running the cron job
32
+ * The command line to be executed when running the cron job. Must be at least 5 characters. Must not be greater than 255 characters.
39
33
  * @type {string}
40
34
  * @memberof CronJobCreate
41
35
  */
42
36
  command: string;
43
37
  /**
44
- * A cron expression consisting of Minute, Hour, Day of Month, Month and Day of Week subexpressions
38
+ * The name of the system user on behalf of which the cron job will be executed. Must not be greater than 60 characters.
45
39
  * @type {string}
46
40
  * @memberof CronJobCreate
47
41
  */
48
- pattern: string;
42
+ run_as_user: string;
49
43
  /**
50
- * The name of the system user on behalf of which the cron job will be executed
51
- * @type {string}
44
+ * Numeric ID of the application to which the cron job belongs to.
45
+ * @type {number}
52
46
  * @memberof CronJobCreate
53
47
  */
54
- run_as_user: string;
48
+ application_id?: number;
49
+ /**
50
+ * Numeric ID of the project to which the cron job belongs to.
51
+ * @type {number}
52
+ * @memberof CronJobCreate
53
+ */
54
+ project_id: number;
55
55
  /**
56
56
  *
57
57
  * @type {Array<EnvironmentLinkItem>}
@@ -0,0 +1,54 @@
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 CronJobEnvironmentCreate
16
+ */
17
+ export interface CronJobEnvironmentCreate {
18
+ /**
19
+ * The name of the cron job. Must not be greater than 60 characters.
20
+ * @type {string}
21
+ * @memberof CronJobEnvironmentCreate
22
+ */
23
+ name: string;
24
+ /**
25
+ * The command line to be executed when running the cron job. Must be at least 5 characters. Must not be greater than 255 characters.
26
+ * @type {string}
27
+ * @memberof CronJobEnvironmentCreate
28
+ */
29
+ command: string;
30
+ /**
31
+ * A cron expression consisting of Minute, Hour, Day of Month, Month and Day of Week subexpressions.
32
+ * @type {string}
33
+ * @memberof CronJobEnvironmentCreate
34
+ */
35
+ pattern: string;
36
+ /**
37
+ * The name of the system user on behalf of which the cron job will be executed. Must not be greater than 60 characters.
38
+ * @type {string}
39
+ * @memberof CronJobEnvironmentCreate
40
+ */
41
+ run_as_user: string;
42
+ /**
43
+ * Numeric ID of the application to which the cron job belongs to.
44
+ * @type {number}
45
+ * @memberof CronJobEnvironmentCreate
46
+ */
47
+ application_id?: number;
48
+ /**
49
+ * List of valid resource IDs
50
+ * @type {Array<number>}
51
+ * @memberof CronJobEnvironmentCreate
52
+ */
53
+ servers?: Array<number>;
54
+ }
@@ -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 });
@@ -12,6 +12,7 @@
12
12
  import { ActionRelation } from './action-relation';
13
13
  import { ApplicationRelation } from './application-relation';
14
14
  import { CronJobPattern } from './cron-job-pattern';
15
+ import { UserRelation } from './user-relation';
15
16
  /**
16
17
  *
17
18
  * @export
@@ -19,7 +20,7 @@ import { CronJobPattern } from './cron-job-pattern';
19
20
  */
20
21
  export interface CronJobRelation {
21
22
  /**
22
- * The Id of the given cron job
23
+ * The ID of the given cron job
23
24
  * @type {number}
24
25
  * @memberof CronJobRelation
25
26
  */
@@ -36,6 +37,12 @@ export interface CronJobRelation {
36
37
  * @memberof CronJobRelation
37
38
  */
38
39
  command: string;
40
+ /**
41
+ * The name of the Unix user on behalf of which the cron job will be executed
42
+ * @type {string}
43
+ * @memberof CronJobRelation
44
+ */
45
+ run_as_user: string;
39
46
  /**
40
47
  * A cron expression consisting of Minute, Hour, Day of Month, Month and Day of Week subexpressions
41
48
  * @type {string}
@@ -48,40 +55,40 @@ export interface CronJobRelation {
48
55
  * @memberof CronJobRelation
49
56
  */
50
57
  pattern_human_readable: CronJobPattern;
51
- /**
52
- * The name of the Unix user on behalf of which the cron job will be executed
53
- * @type {string}
54
- * @memberof CronJobRelation
55
- */
56
- run_as_user: string;
57
58
  /**
58
59
  * Indicates if the cron job was auto_generated by `devopness` itself
59
60
  * @type {boolean}
60
61
  * @memberof CronJobRelation
61
62
  */
62
- auto_generated?: boolean;
63
+ auto_generated: boolean;
63
64
  /**
64
65
  *
65
66
  * @type {ActionRelation}
66
67
  * @memberof CronJobRelation
67
68
  */
68
- last_action?: ActionRelation | null;
69
+ last_action: ActionRelation | null;
70
+ /**
71
+ *
72
+ * @type {UserRelation}
73
+ * @memberof CronJobRelation
74
+ */
75
+ created_by_user: UserRelation;
69
76
  /**
70
77
  *
71
78
  * @type {ApplicationRelation}
72
79
  * @memberof CronJobRelation
73
80
  */
74
- application?: ApplicationRelation | null;
81
+ application: ApplicationRelation | null;
75
82
  /**
76
83
  * The date and time when the record was created
77
84
  * @type {string}
78
85
  * @memberof CronJobRelation
79
86
  */
80
- created_at?: string;
87
+ created_at: string;
81
88
  /**
82
89
  * The date and time when the record was last updated
83
90
  * @type {string}
84
91
  * @memberof CronJobRelation
85
92
  */
86
- updated_at?: string;
93
+ updated_at: string;
87
94
  }
@@ -17,41 +17,41 @@ import { EnvironmentLinkItem } from './environment-link-item';
17
17
  */
18
18
  export interface CronJobUpdate {
19
19
  /**
20
- * The unique id of the given record
20
+ * The unique ID of the given cron job.
21
21
  * @type {number}
22
22
  * @memberof CronJobUpdate
23
23
  */
24
24
  id: number;
25
25
  /**
26
- * Numeric ID of the application to which the cron job belongs to
27
- * @type {number}
26
+ * A cron expression consisting of Minute, Hour, Day of Month, Month and Day of Week subexpressions.
27
+ * @type {string}
28
28
  * @memberof CronJobUpdate
29
29
  */
30
- application_id?: number;
30
+ pattern: string;
31
31
  /**
32
- * The name of the cron job
32
+ * The name of the cron job. Must not be greater than 60 characters.
33
33
  * @type {string}
34
34
  * @memberof CronJobUpdate
35
35
  */
36
36
  name: string;
37
37
  /**
38
- * The command line to be executed when running the cron job
38
+ * The command line to be executed when running the cron job. Must be at least 5 characters. Must not be greater than 255 characters.
39
39
  * @type {string}
40
40
  * @memberof CronJobUpdate
41
41
  */
42
42
  command: string;
43
43
  /**
44
- * A cron expression consisting of Minute, Hour, Day of Month, Month and Day of Week subexpressions
44
+ * The name of the system user on behalf of which the cron job will be executed. Must not be greater than 60 characters.
45
45
  * @type {string}
46
46
  * @memberof CronJobUpdate
47
47
  */
48
- pattern: string;
48
+ run_as_user: string;
49
49
  /**
50
- * The name of the system user on behalf of which the cron job will be executed
51
- * @type {string}
50
+ * Numeric ID of the application to which the cron job belongs to.
51
+ * @type {number}
52
52
  * @memberof CronJobUpdate
53
53
  */
54
- run_as_user: string;
54
+ application_id?: number;
55
55
  /**
56
56
  *
57
57
  * @type {Array<EnvironmentLinkItem>}
@@ -23,7 +23,7 @@ import { UserRelation } from './user-relation';
23
23
  */
24
24
  export interface CronJob {
25
25
  /**
26
- * The Id of the given cron job
26
+ * The ID of the given cron job
27
27
  * @type {number}
28
28
  * @memberof CronJob
29
29
  */
@@ -40,6 +40,12 @@ export interface CronJob {
40
40
  * @memberof CronJob
41
41
  */
42
42
  command: string;
43
+ /**
44
+ * The name of the Unix user on behalf of which the cron job will be executed
45
+ * @type {string}
46
+ * @memberof CronJob
47
+ */
48
+ run_as_user: string;
43
49
  /**
44
50
  * A cron expression consisting of Minute, Hour, Day of Month, Month and Day of Week subexpressions
45
51
  * @type {string}
@@ -52,12 +58,6 @@ export interface CronJob {
52
58
  * @memberof CronJob
53
59
  */
54
60
  pattern_human_readable: CronJobPattern;
55
- /**
56
- * The name of the Unix user on behalf of which the cron job will be executed
57
- * @type {string}
58
- * @memberof CronJob
59
- */
60
- run_as_user: string;
61
61
  /**
62
62
  * Indicates if the cron job was auto_generated by `devopness` itself
63
63
  * @type {boolean}
@@ -66,16 +66,10 @@ export interface CronJob {
66
66
  auto_generated: boolean;
67
67
  /**
68
68
  *
69
- * @type {ApplicationRelation}
70
- * @memberof CronJob
71
- */
72
- application: ApplicationRelation | null;
73
- /**
74
- *
75
- * @type {Array<EnvironmentRelation>}
69
+ * @type {ActionRelation}
76
70
  * @memberof CronJob
77
71
  */
78
- environments: Array<EnvironmentRelation>;
72
+ last_action: ActionRelation | null;
79
73
  /**
80
74
  *
81
75
  * @type {UserRelation}
@@ -84,16 +78,22 @@ export interface CronJob {
84
78
  created_by_user: UserRelation;
85
79
  /**
86
80
  *
87
- * @type {ActionRelation}
81
+ * @type {ApplicationRelation}
88
82
  * @memberof CronJob
89
83
  */
90
- last_action: ActionRelation | null;
84
+ application: ApplicationRelation | null;
91
85
  /**
92
86
  *
93
87
  * @type {ProjectRelation}
94
88
  * @memberof CronJob
95
89
  */
96
90
  project: ProjectRelation;
91
+ /**
92
+ *
93
+ * @type {Array<EnvironmentRelation>}
94
+ * @memberof CronJob
95
+ */
96
+ environments: Array<EnvironmentRelation>;
97
97
  /**
98
98
  *
99
99
  * @type {Array<ServerRelation>}
@@ -105,11 +105,11 @@ export interface CronJob {
105
105
  * @type {string}
106
106
  * @memberof CronJob
107
107
  */
108
- created_at?: string;
108
+ created_at: string;
109
109
  /**
110
110
  * The date and time when the record was last updated
111
111
  * @type {string}
112
112
  * @memberof CronJob
113
113
  */
114
- updated_at?: string;
114
+ updated_at: string;
115
115
  }
@@ -51,6 +51,7 @@ export * from './credential-google-cloud';
51
51
  export * from './credential-setting';
52
52
  export * from './cron-job';
53
53
  export * from './cron-job-create';
54
+ export * from './cron-job-environment-create';
54
55
  export * from './cron-job-frequency';
55
56
  export * from './cron-job-options';
56
57
  export * from './cron-job-pattern';
@@ -67,6 +67,7 @@ __exportStar(require("./credential-google-cloud"), exports);
67
67
  __exportStar(require("./credential-setting"), exports);
68
68
  __exportStar(require("./cron-job"), exports);
69
69
  __exportStar(require("./cron-job-create"), exports);
70
+ __exportStar(require("./cron-job-environment-create"), exports);
70
71
  __exportStar(require("./cron-job-frequency"), exports);
71
72
  __exportStar(require("./cron-job-options"), exports);
72
73
  __exportStar(require("./cron-job-pattern"), exports);
@@ -9,7 +9,6 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import { EnvironmentLinkItem } from './environment-link-item';
13
12
  /**
14
13
  *
15
14
  * @export
@@ -29,9 +28,9 @@ export interface SshKeyUpdate {
29
28
  */
30
29
  name: string;
31
30
  /**
32
- *
33
- * @type {Array<EnvironmentLinkItem>}
31
+ * List of valid resource IDs
32
+ * @type {Array<number>}
34
33
  * @memberof SshKeyUpdate
35
34
  */
36
- environments?: Array<EnvironmentLinkItem>;
35
+ servers?: Array<number>;
37
36
  }
@@ -15,8 +15,9 @@
15
15
  * @enum {string}
16
16
  */
17
17
  export declare enum TriggerEvent {
18
+ ActivateNewRelease = "activate-new-release",
18
19
  CheckAppEnvironment = "check-app-environment",
19
20
  GetNewRelease = "get-new-release",
20
21
  InstallDependencies = "install-dependencies",
21
- ActivateNewRelease = "activate-new-release"
22
+ RemoveOldReleases = "remove-old-releases"
22
23
  }
@@ -20,8 +20,9 @@ exports.TriggerEvent = void 0;
20
20
  */
21
21
  var TriggerEvent;
22
22
  (function (TriggerEvent) {
23
+ TriggerEvent["ActivateNewRelease"] = "activate-new-release";
23
24
  TriggerEvent["CheckAppEnvironment"] = "check-app-environment";
24
25
  TriggerEvent["GetNewRelease"] = "get-new-release";
25
26
  TriggerEvent["InstallDependencies"] = "install-dependencies";
26
- TriggerEvent["ActivateNewRelease"] = "activate-new-release";
27
+ TriggerEvent["RemoveOldReleases"] = "remove-old-releases";
27
28
  })(TriggerEvent = exports.TriggerEvent || (exports.TriggerEvent = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devopness/sdk-js",
3
- "version": "2.15.0",
3
+ "version": "2.17.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },