@devopness/sdk-js 2.49.0 → 2.50.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.
@@ -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}
@@ -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';
@@ -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);
@@ -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,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
+ }
@@ -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 });
@@ -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.50.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },