UNPKG

@apify/n8n-nodes-apify

Version:
24 lines 1.02 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getUserRunsList = getUserRunsList; const n8n_workflow_1 = require("n8n-workflow"); const genericFunctions_1 = require("../../../resources/genericFunctions"); async function getUserRunsList(i) { var _a, _b; const offset = this.getNodeParameter('offset', i, 0); const limit = this.getNodeParameter('limit', i, 50); const desc = this.getNodeParameter('desc', i); const status = this.getNodeParameter('status', i); try { const apiResult = await genericFunctions_1.apiRequest.call(this, { method: 'GET', uri: '/v2/actor-runs', qs: { limit, offset, desc, status }, }); return this.helpers.returnJsonArray((_b = (_a = apiResult.data) === null || _a === void 0 ? void 0 : _a.items) !== null && _b !== void 0 ? _b : []); } catch (error) { throw new n8n_workflow_1.NodeApiError(this.getNode(), error); } } //# sourceMappingURL=execute.js.map