@devopness/sdk-js 2.49.0 → 2.51.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 (23) hide show
  1. package/dist/api/generated/apis/resource-events-api.d.ts +2 -1
  2. package/dist/api/generated/apis/resource-links-api.d.ts +9 -0
  3. package/dist/api/generated/apis/resource-links-api.js +28 -0
  4. package/dist/api/generated/models/action-relation.d.ts +3 -3
  5. package/dist/api/generated/models/{resource.d.ts → action-resource.d.ts} +7 -7
  6. package/dist/api/generated/models/action-retry-response.d.ts +3 -3
  7. package/dist/api/generated/models/action.d.ts +3 -3
  8. package/dist/api/generated/models/cloud-aws-ec2-settings.d.ts +3 -3
  9. package/dist/api/generated/models/cloud-digital-ocean-droplet-settings.d.ts +3 -3
  10. package/dist/api/generated/models/{operating-system-supported-versions.d.ts → cloud-os-version-code.d.ts} +7 -9
  11. package/dist/api/generated/models/cloud-os-version-code.js +27 -0
  12. package/dist/api/generated/models/index.d.ts +4 -3
  13. package/dist/api/generated/models/index.js +4 -3
  14. package/dist/api/generated/models/linked-resource-data.d.ts +1 -1
  15. package/dist/api/generated/models/operating-system-version.d.ts +61 -0
  16. package/dist/api/generated/models/operating-system.d.ts +4 -4
  17. package/dist/api/generated/models/resource-event.d.ts +37 -0
  18. package/dist/api/generated/models/subscription.d.ts +0 -6
  19. package/package.json +1 -1
  20. package/dist/api/generated/models/cloud-os.d.ts +0 -30
  21. /package/dist/api/generated/models/{cloud-os.js → action-resource.js} +0 -0
  22. /package/dist/api/generated/models/{operating-system-supported-versions.js → operating-system-version.js} +0 -0
  23. /package/dist/api/generated/models/{resource.js → resource-event.js} +0 -0
@@ -11,6 +11,7 @@
11
11
  */
12
12
  import { ApiBaseService } from "../../../services/ApiBaseService";
13
13
  import { ApiResponse } from "../../../common/ApiResponse";
14
+ import { ResourceEvent } from '../../generated/models';
14
15
  import { ResourceEventRelation } from '../../generated/models';
15
16
  /**
16
17
  * ResourceEventsApiService - Auto-generated
@@ -22,7 +23,7 @@ export declare class ResourceEventsApiService extends ApiBaseService {
22
23
  * @param {string} resourceId The resource ID.
23
24
  * @param {string} resourceType The resource type to create events for.
24
25
  */
25
- addResourceEvent(resourceId: string, resourceType: string): Promise<ApiResponse<void>>;
26
+ addResourceEvent(resourceId: string, resourceType: string): Promise<ApiResponse<ResourceEvent>>;
26
27
  /**
27
28
  *
28
29
  * @summary List events of a resource type
@@ -16,6 +16,15 @@ import { ResourceLinkRelation } from '../../generated/models';
16
16
  * ResourceLinksApiService - Auto-generated
17
17
  */
18
18
  export declare class ResourceLinksApiService extends ApiBaseService {
19
+ /**
20
+ *
21
+ * @summary Link the given resources
22
+ * @param {number} childId The child resource ID.
23
+ * @param {string} childType The resource type of the child resource.
24
+ * @param {number} resourceId The parent resource ID.
25
+ * @param {string} resourceType The resource type of the parent resource.
26
+ */
27
+ linkResourceLinkToResourceLink(childId: number, childType: string, resourceId: number, resourceType: string): Promise<ApiResponse<void>>;
19
28
  /**
20
29
  *
21
30
  * @summary List linked resources of the given resource
@@ -29,6 +29,34 @@ const Exceptions_1 = require("../../../common/Exceptions");
29
29
  * ResourceLinksApiService - Auto-generated
30
30
  */
31
31
  class ResourceLinksApiService extends ApiBaseService_1.ApiBaseService {
32
+ /**
33
+ *
34
+ * @summary Link the given resources
35
+ * @param {number} childId The child resource ID.
36
+ * @param {string} childType The resource type of the child resource.
37
+ * @param {number} resourceId The parent resource ID.
38
+ * @param {string} resourceType The resource type of the parent resource.
39
+ */
40
+ linkResourceLinkToResourceLink(childId, childType, resourceId, resourceType) {
41
+ return __awaiter(this, void 0, void 0, function* () {
42
+ if (childId === null || childId === undefined) {
43
+ throw new Exceptions_1.ArgumentNullException('childId', 'linkResourceLinkToResourceLink');
44
+ }
45
+ if (childType === null || childType === undefined) {
46
+ throw new Exceptions_1.ArgumentNullException('childType', 'linkResourceLinkToResourceLink');
47
+ }
48
+ if (resourceId === null || resourceId === undefined) {
49
+ throw new Exceptions_1.ArgumentNullException('resourceId', 'linkResourceLinkToResourceLink');
50
+ }
51
+ if (resourceType === null || resourceType === undefined) {
52
+ throw new Exceptions_1.ArgumentNullException('resourceType', 'linkResourceLinkToResourceLink');
53
+ }
54
+ let queryString = '';
55
+ const requestUrl = '/resource-links/{resource_type}/{resource_id}/{child_type}/{child_id}/link' + (queryString ? `?${queryString}` : '');
56
+ const response = yield this.post(requestUrl.replace(`{${"child_id"}}`, encodeURIComponent(String(childId))).replace(`{${"child_type"}}`, encodeURIComponent(String(childType))).replace(`{${"resource_id"}}`, encodeURIComponent(String(resourceId))).replace(`{${"resource_type"}}`, encodeURIComponent(String(resourceType))));
57
+ return new ApiResponse_1.ApiResponse(response);
58
+ });
59
+ }
32
60
  /**
33
61
  *
34
62
  * @summary List linked resources of the given resource
@@ -10,11 +10,11 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import { ActionData } from './action-data';
13
+ import { ActionResource } from './action-resource';
13
14
  import { ActionStatus } from './action-status';
14
15
  import { ActionSummary } from './action-summary';
15
16
  import { ActionTriggeredFrom } from './action-triggered-from';
16
17
  import { ActionType } from './action-type';
17
- import { Resource } from './resource';
18
18
  import { ServerAction } from './server-action';
19
19
  /**
20
20
  *
@@ -72,10 +72,10 @@ export interface ActionRelation {
72
72
  triggered_from: ActionTriggeredFrom;
73
73
  /**
74
74
  *
75
- * @type {Resource}
75
+ * @type {ActionResource}
76
76
  * @memberof ActionRelation
77
77
  */
78
- resource: Resource;
78
+ resource: ActionResource;
79
79
  /**
80
80
  *
81
81
  * @type {ActionSummary}
@@ -19,33 +19,33 @@ import { ServiceRelation } from './service-relation';
19
19
  import { SshKeyRelation } from './ssh-key-relation';
20
20
  import { SslCertificateRelation } from './ssl-certificate-relation';
21
21
  /**
22
- * Object containing the data of the resource and informations about it
22
+ * The resource that triggered an action
23
23
  * @export
24
- * @interface Resource
24
+ * @interface ActionResource
25
25
  */
26
- export interface Resource {
26
+ export interface ActionResource {
27
27
  /**
28
28
  * The unique id of the resource
29
29
  * @type {number}
30
- * @memberof Resource
30
+ * @memberof ActionResource
31
31
  */
32
32
  id: number;
33
33
  /**
34
34
  *
35
35
  * @type {ResourceType}
36
- * @memberof Resource
36
+ * @memberof ActionResource
37
37
  */
38
38
  type: ResourceType;
39
39
  /**
40
40
  * Human readable version of the resource type
41
41
  * @type {string}
42
- * @memberof Resource
42
+ * @memberof ActionResource
43
43
  */
44
44
  type_human_readable: string;
45
45
  /**
46
46
  * The resource data of type specified on `resource.type`
47
47
  * @type {ApplicationRelation | CronJobRelation | DaemonRelation | NetworkRuleRelation | ServerRelation | ServiceRelation | SshKeyRelation | SslCertificateRelation}
48
- * @memberof Resource
48
+ * @memberof ActionResource
49
49
  */
50
50
  data?: ApplicationRelation | CronJobRelation | DaemonRelation | NetworkRuleRelation | ServerRelation | ServiceRelation | SshKeyRelation | SslCertificateRelation | null;
51
51
  }
@@ -11,6 +11,7 @@
11
11
  */
12
12
  import { ActionData } from './action-data';
13
13
  import { ActionHookRequest } from './action-hook-request';
14
+ import { ActionResource } from './action-resource';
14
15
  import { ActionStatus } from './action-status';
15
16
  import { ActionSummary } from './action-summary';
16
17
  import { ActionTriggeredFrom } from './action-triggered-from';
@@ -18,7 +19,6 @@ import { ActionType } from './action-type';
18
19
  import { EnvironmentRelation } from './environment-relation';
19
20
  import { ProjectRelation } from './project-relation';
20
21
  import { RelatedAction } from './related-action';
21
- import { Resource } from './resource';
22
22
  import { ServerAction } from './server-action';
23
23
  import { UserRelation } from './user-relation';
24
24
  /**
@@ -101,10 +101,10 @@ export interface ActionRetryResponse {
101
101
  triggered_by_user?: UserRelation;
102
102
  /**
103
103
  *
104
- * @type {Resource}
104
+ * @type {ActionResource}
105
105
  * @memberof ActionRetryResponse
106
106
  */
107
- resource: Resource;
107
+ resource: ActionResource;
108
108
  /**
109
109
  *
110
110
  * @type {ActionSummary}
@@ -11,6 +11,7 @@
11
11
  */
12
12
  import { ActionData } from './action-data';
13
13
  import { ActionHookRequest } from './action-hook-request';
14
+ import { ActionResource } from './action-resource';
14
15
  import { ActionStatus } from './action-status';
15
16
  import { ActionSummary } from './action-summary';
16
17
  import { ActionTriggeredFrom } from './action-triggered-from';
@@ -18,7 +19,6 @@ import { ActionType } from './action-type';
18
19
  import { EnvironmentRelation } from './environment-relation';
19
20
  import { ProjectRelation } from './project-relation';
20
21
  import { RelatedAction } from './related-action';
21
- import { Resource } from './resource';
22
22
  import { ServerAction } from './server-action';
23
23
  import { UserRelation } from './user-relation';
24
24
  /**
@@ -101,10 +101,10 @@ export interface Action {
101
101
  triggered_by_user?: UserRelation;
102
102
  /**
103
103
  *
104
- * @type {Resource}
104
+ * @type {ActionResource}
105
105
  * @memberof Action
106
106
  */
107
- resource: Resource;
107
+ resource: ActionResource;
108
108
  /**
109
109
  *
110
110
  * @type {ActionSummary}
@@ -9,7 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import { CloudOs } from './cloud-os';
12
+ import { CloudOsVersionCode } from './cloud-os-version-code';
13
13
  /**
14
14
  *
15
15
  * @export
@@ -36,8 +36,8 @@ export interface CloudAwsEc2Settings {
36
36
  storage_size: number;
37
37
  /**
38
38
  *
39
- * @type {CloudOs}
39
+ * @type {CloudOsVersionCode}
40
40
  * @memberof CloudAwsEc2Settings
41
41
  */
42
- os: CloudOs;
42
+ os_version_code: CloudOsVersionCode | null;
43
43
  }
@@ -9,7 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import { CloudOs } from './cloud-os';
12
+ import { CloudOsVersionCode } from './cloud-os-version-code';
13
13
  /**
14
14
  *
15
15
  * @export
@@ -30,8 +30,8 @@ export interface CloudDigitalOceanDropletSettings {
30
30
  region: string;
31
31
  /**
32
32
  *
33
- * @type {CloudOs}
33
+ * @type {CloudOsVersionCode}
34
34
  * @memberof CloudDigitalOceanDropletSettings
35
35
  */
36
- os: CloudOs;
36
+ os_version_code: CloudOsVersionCode | null;
37
37
  }
@@ -10,15 +10,13 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  /**
13
- *
13
+ * Code to identify operating system and version
14
14
  * @export
15
- * @interface OperatingSystemSupportedVersions
15
+ * @enum {string}
16
16
  */
17
- export interface OperatingSystemSupportedVersions {
18
- /**
19
- * The system\'s version that is supported
20
- * @type {string}
21
- * @memberof OperatingSystemSupportedVersions
22
- */
23
- version?: string;
17
+ export declare enum CloudOsVersionCode {
18
+ Centos7 = "centos_7",
19
+ Ubuntu1804 = "ubuntu_18_04",
20
+ Ubuntu2004 = "ubuntu_20_04",
21
+ Ubuntu2204 = "ubuntu_22_04"
24
22
  }
@@ -0,0 +1,27 @@
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 });
15
+ exports.CloudOsVersionCode = void 0;
16
+ /**
17
+ * Code to identify operating system and version
18
+ * @export
19
+ * @enum {string}
20
+ */
21
+ var CloudOsVersionCode;
22
+ (function (CloudOsVersionCode) {
23
+ CloudOsVersionCode["Centos7"] = "centos_7";
24
+ CloudOsVersionCode["Ubuntu1804"] = "ubuntu_18_04";
25
+ CloudOsVersionCode["Ubuntu2004"] = "ubuntu_20_04";
26
+ CloudOsVersionCode["Ubuntu2204"] = "ubuntu_22_04";
27
+ })(CloudOsVersionCode = exports.CloudOsVersionCode || (exports.CloudOsVersionCode = {}));
@@ -5,6 +5,7 @@ export * from './action-deployment-content';
5
5
  export * from './action-deployment-data';
6
6
  export * from './action-hook-request';
7
7
  export * from './action-relation';
8
+ export * from './action-resource';
8
9
  export * from './action-retry-response';
9
10
  export * from './action-status';
10
11
  export * from './action-step';
@@ -28,7 +29,7 @@ export * from './blueprint-service';
28
29
  export * from './cloud-aws-ec2-settings';
29
30
  export * from './cloud-digital-ocean-droplet-settings';
30
31
  export * from './cloud-instance-relation';
31
- export * from './cloud-os';
32
+ export * from './cloud-os-version-code';
32
33
  export * from './cloud-provider';
33
34
  export * from './cloud-provider-code';
34
35
  export * from './cloud-provider-credential-settings';
@@ -104,7 +105,7 @@ export * from './network-rule-relation';
104
105
  export * from './network-rule-type';
105
106
  export * from './network-rule-update';
106
107
  export * from './operating-system';
107
- export * from './operating-system-supported-versions';
108
+ export * from './operating-system-version';
108
109
  export * from './password-reset-response';
109
110
  export * from './password-user-reset';
110
111
  export * from './password-user-send-reset-link';
@@ -123,7 +124,7 @@ export * from './repository';
123
124
  export * from './repository-branch';
124
125
  export * from './repository-relation';
125
126
  export * from './request-relation';
126
- export * from './resource';
127
+ export * from './resource-event';
127
128
  export * from './resource-event-relation';
128
129
  export * from './resource-link-relation';
129
130
  export * from './resource-type';
@@ -21,6 +21,7 @@ __exportStar(require("./action-deployment-content"), exports);
21
21
  __exportStar(require("./action-deployment-data"), exports);
22
22
  __exportStar(require("./action-hook-request"), exports);
23
23
  __exportStar(require("./action-relation"), exports);
24
+ __exportStar(require("./action-resource"), exports);
24
25
  __exportStar(require("./action-retry-response"), exports);
25
26
  __exportStar(require("./action-status"), exports);
26
27
  __exportStar(require("./action-step"), exports);
@@ -44,7 +45,7 @@ __exportStar(require("./blueprint-service"), exports);
44
45
  __exportStar(require("./cloud-aws-ec2-settings"), exports);
45
46
  __exportStar(require("./cloud-digital-ocean-droplet-settings"), exports);
46
47
  __exportStar(require("./cloud-instance-relation"), exports);
47
- __exportStar(require("./cloud-os"), exports);
48
+ __exportStar(require("./cloud-os-version-code"), exports);
48
49
  __exportStar(require("./cloud-provider"), exports);
49
50
  __exportStar(require("./cloud-provider-code"), exports);
50
51
  __exportStar(require("./cloud-provider-credential-settings"), exports);
@@ -120,7 +121,7 @@ __exportStar(require("./network-rule-relation"), exports);
120
121
  __exportStar(require("./network-rule-type"), exports);
121
122
  __exportStar(require("./network-rule-update"), exports);
122
123
  __exportStar(require("./operating-system"), exports);
123
- __exportStar(require("./operating-system-supported-versions"), exports);
124
+ __exportStar(require("./operating-system-version"), exports);
124
125
  __exportStar(require("./password-reset-response"), exports);
125
126
  __exportStar(require("./password-user-reset"), exports);
126
127
  __exportStar(require("./password-user-send-reset-link"), exports);
@@ -139,7 +140,7 @@ __exportStar(require("./repository"), exports);
139
140
  __exportStar(require("./repository-branch"), exports);
140
141
  __exportStar(require("./repository-relation"), exports);
141
142
  __exportStar(require("./request-relation"), exports);
142
- __exportStar(require("./resource"), exports);
143
+ __exportStar(require("./resource-event"), exports);
143
144
  __exportStar(require("./resource-event-relation"), exports);
144
145
  __exportStar(require("./resource-link-relation"), exports);
145
146
  __exportStar(require("./resource-type"), exports);
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  /**
13
- * Object containing linked resource data
13
+ * Object with common attributes that identify a linked resource
14
14
  * @export
15
15
  * @interface LinkedResourceData
16
16
  */
@@ -0,0 +1,61 @@
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 { CloudOsVersionCode } from './cloud-os-version-code';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface OperatingSystemVersion
17
+ */
18
+ export interface OperatingSystemVersion {
19
+ /**
20
+ * Version name
21
+ * @type {string}
22
+ * @memberof OperatingSystemVersion
23
+ */
24
+ name: string;
25
+ /**
26
+ * The name given to the OS version while it is under development. For some OS it can be seen as a version nickname that is used to refer to that version even after official release.
27
+ * @type {string}
28
+ * @memberof OperatingSystemVersion
29
+ */
30
+ code_name: string;
31
+ /**
32
+ * Version number
33
+ * @type {string}
34
+ * @memberof OperatingSystemVersion
35
+ */
36
+ version: string;
37
+ /**
38
+ *
39
+ * @type {CloudOsVersionCode}
40
+ * @memberof OperatingSystemVersion
41
+ */
42
+ os_version_code: CloudOsVersionCode | null;
43
+ /**
44
+ * Release date
45
+ * @type {string}
46
+ * @memberof OperatingSystemVersion
47
+ */
48
+ released_at: string;
49
+ /**
50
+ * The date when this release will no longer receive updates under their LTS (Long Term Support) conditions. For details and terms of service, please refer to the documentation on the OS website.
51
+ * @type {string}
52
+ * @memberof OperatingSystemVersion
53
+ */
54
+ end_standard_support_at: string;
55
+ /**
56
+ * The date when this release will no longer receive any patches or security updates. For details and terms of service, please refer to the documentation on the OS website.
57
+ * @type {string}
58
+ * @memberof OperatingSystemVersion
59
+ */
60
+ end_of_life_at: string;
61
+ }
@@ -9,7 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import { OperatingSystemSupportedVersions } from './operating-system-supported-versions';
12
+ import { OperatingSystemVersion } from './operating-system-version';
13
13
  /**
14
14
  *
15
15
  * @export
@@ -35,9 +35,9 @@ export interface OperatingSystem {
35
35
  */
36
36
  hint: string;
37
37
  /**
38
- * List of operating system versions supported by Devopness
39
- * @type {Array<OperatingSystemSupportedVersions>}
38
+ *
39
+ * @type {Array<OperatingSystemVersion>}
40
40
  * @memberof OperatingSystem
41
41
  */
42
- supported_versions: Array<OperatingSystemSupportedVersions>;
42
+ supported_versions: Array<OperatingSystemVersion>;
43
43
  }
@@ -0,0 +1,37 @@
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 { Subscription } from './subscription';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface ResourceEvent
17
+ */
18
+ export interface ResourceEvent {
19
+ /**
20
+ * The resource type to create events for.
21
+ * @type {string}
22
+ * @memberof ResourceEvent
23
+ */
24
+ resource_type: string;
25
+ /**
26
+ * The resource ID.
27
+ * @type {string}
28
+ * @memberof ResourceEvent
29
+ */
30
+ resource_id: string;
31
+ /**
32
+ *
33
+ * @type {Subscription}
34
+ * @memberof ResourceEvent
35
+ */
36
+ resource_data: Subscription | null;
37
+ }
@@ -63,12 +63,6 @@ export interface Subscription {
63
63
  * @memberof Subscription
64
64
  */
65
65
  price_currency?: string;
66
- /**
67
- * If this subscription is a trial, this field indicates when it will end
68
- * @type {string}
69
- * @memberof Subscription
70
- */
71
- trial_ends_at?: string | null;
72
66
  /**
73
67
  * If not null, indicates the date when this subscription was cancelled
74
68
  * @type {string}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devopness/sdk-js",
3
- "version": "2.49.0",
3
+ "version": "2.51.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -1,30 +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
- /**
13
- *
14
- * @export
15
- * @interface CloudOs
16
- */
17
- export interface CloudOs {
18
- /**
19
- * The operating system\'s name
20
- * @type {string}
21
- * @memberof CloudOs
22
- */
23
- name: string;
24
- /**
25
- * The version of the operating system
26
- * @type {string}
27
- * @memberof CloudOs
28
- */
29
- version: string;
30
- }