UNPKG

n8n-nodes-octavehq

Version:

Octave is the AI-powered messaging brain for B2B go-to-market teams, helping articulate product value, synthesize customer interaction data, and deploy consistent, effective messaging across all channels.

72 lines 2.26 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.exportedProperties = void 0; exports.execute = execute; const OctaveApiRequest_1 = require("../../transport/OctaveApiRequest"); const utils_1 = require("../utils"); const properties = [ { displayName: 'Text Search', name: 'text', type: 'string', default: '', description: 'Text search query', }, { displayName: 'Solution OIds', name: 'solutionOIds', type: 'string', default: '', description: 'Comma-separated list of solution OIds', }, { displayName: 'Active Only', name: 'activeOnly', type: 'boolean', default: false, description: 'Whether to return only active solutions', }, { displayName: 'Limit', name: 'limit', type: 'number', typeOptions: { minValue: 1 }, default: 50, description: 'Max number of results to return', }, { displayName: 'Offset', name: 'offset', type: 'number', default: 0, description: 'Number of results to skip', }, ]; const displayOptions = { show: { resource: ['solution'], operation: ['list'], }, }; exports.exportedProperties = (0, utils_1.applyDisplayOptions)(displayOptions, properties); async function execute(itemIndex) { const text = this.getNodeParameter('text', itemIndex); const solutionOIds = this.getNodeParameter('solutionOIds', itemIndex); const activeOnly = this.getNodeParameter('activeOnly', itemIndex); const limit = this.getNodeParameter('limit', itemIndex); const offset = this.getNodeParameter('offset', itemIndex); const qs = {}; if (text) qs.text = text; if (solutionOIds) qs.solutionOIds = solutionOIds.split(',').map(id => id.trim()); if (activeOnly) qs.activeOnly = activeOnly; if (limit) qs.limit = limit; if (offset) qs.offset = offset; const response = await OctaveApiRequest_1.octaveApiRequest.call(this, 'GET', '/api/v2/solution/list', {}, qs); return [this.helpers.returnJsonArray(response.data || [])]; } //# sourceMappingURL=list.operation.js.map