UNPKG

n8n-nodes-smartsuite

Version:
25 lines 1.05 kB
"use strict"; // src/nodes/SmartSuite/actions/solution/getSolution.operation.ts Object.defineProperty(exports, "__esModule", { value: true }); exports.description = void 0; exports.execute = execute; const smartSuiteApi_1 = require("../../transport/smartSuiteApi"); const validation_1 = require("../../helpers/validation"); const resourceInputs_1 = require("../../shared/resourceInputs"); exports.description = [ { ...resourceInputs_1.solutionInput, required: true, displayOptions: { show: { resource: ['solution'], operation: ['getSolution'] } }, description: 'The Solution to retrieve', }, ]; async function execute() { // 1) Validate & get solutionId const solutionId = await validation_1.getSolutionId.call(this, 0); // 2) Fetch solution data const response = (await smartSuiteApi_1.apiRequest.call(this, 'GET', `/solutions/${solutionId}/`)); // 3) Return the single solution object return this.helpers.returnJsonArray([response]); } //# sourceMappingURL=getSolution.operation.js.map