@devopness/sdk-js 2.92.0 → 2.93.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.
|
@@ -40,6 +40,15 @@ export declare class ActionsApiService extends ApiBaseService {
|
|
|
40
40
|
* @param {number} [perPage] Number of items returned per page
|
|
41
41
|
*/
|
|
42
42
|
listActionsByResourceType(resourceId: number, resourceType: string, page?: number, perPage?: number): Promise<ApiResponse<Array<ActionRelation>>>;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @summary List actions triggered to a given action target resource
|
|
46
|
+
* @param {number} targetResourceId The resource ID of the action target.
|
|
47
|
+
* @param {string} targetResourceType The resource type of the action target on which this action will be executed to perform operations on the action resource.
|
|
48
|
+
* @param {number} [page] Number of the page to be retrieved
|
|
49
|
+
* @param {number} [perPage] Number of items returned per page
|
|
50
|
+
*/
|
|
51
|
+
listActionsByTargetResourceType(targetResourceId: number, targetResourceType: string, page?: number, perPage?: number): Promise<ApiResponse<Array<ActionRelation>>>;
|
|
43
52
|
/**
|
|
44
53
|
*
|
|
45
54
|
* @summary Retry an action
|
|
@@ -95,6 +95,35 @@ class ActionsApiService extends ApiBaseService_1.ApiBaseService {
|
|
|
95
95
|
return new ApiResponse_1.ApiResponse(response);
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
|
+
/**
|
|
99
|
+
*
|
|
100
|
+
* @summary List actions triggered to a given action target resource
|
|
101
|
+
* @param {number} targetResourceId The resource ID of the action target.
|
|
102
|
+
* @param {string} targetResourceType The resource type of the action target on which this action will be executed to perform operations on the action resource.
|
|
103
|
+
* @param {number} [page] Number of the page to be retrieved
|
|
104
|
+
* @param {number} [perPage] Number of items returned per page
|
|
105
|
+
*/
|
|
106
|
+
listActionsByTargetResourceType(targetResourceId, targetResourceType, page, perPage) {
|
|
107
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
108
|
+
if (targetResourceId === null || targetResourceId === undefined) {
|
|
109
|
+
throw new Exceptions_1.ArgumentNullException('targetResourceId', 'listActionsByTargetResourceType');
|
|
110
|
+
}
|
|
111
|
+
if (targetResourceType === null || targetResourceType === undefined) {
|
|
112
|
+
throw new Exceptions_1.ArgumentNullException('targetResourceType', 'listActionsByTargetResourceType');
|
|
113
|
+
}
|
|
114
|
+
let queryString = '';
|
|
115
|
+
const queryParams = { page: page, per_page: perPage, };
|
|
116
|
+
for (const key in queryParams) {
|
|
117
|
+
if (queryParams[key] === undefined || queryParams[key] === null) {
|
|
118
|
+
continue;
|
|
119
|
+
}
|
|
120
|
+
queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
|
|
121
|
+
}
|
|
122
|
+
const requestUrl = '/actions/targets/{target_resource_type}/{target_resource_id}' + (queryString ? `?${queryString}` : '');
|
|
123
|
+
const response = yield this.get(requestUrl.replace(`{${"target_resource_id"}}`, encodeURIComponent(String(targetResourceId))).replace(`{${"target_resource_type"}}`, encodeURIComponent(String(targetResourceType))));
|
|
124
|
+
return new ApiResponse_1.ApiResponse(response);
|
|
125
|
+
});
|
|
126
|
+
}
|
|
98
127
|
/**
|
|
99
128
|
*
|
|
100
129
|
* @summary Retry an action
|