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.

104 lines 2.88 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.exportedProperties = void 0; exports.execute = execute; exports.exportedProperties = [ { displayName: 'Competitor OIds', name: 'oIds', type: 'string', default: '', description: 'Comma-separated list of competitor OIds to filter by', displayOptions: { show: { resource: ['competitor'], operation: ['list'], }, }, }, { displayName: 'Product OId', name: 'productOId', type: 'string', default: '', description: 'Filter by product OId', displayOptions: { show: { resource: ['competitor'], operation: ['list'], }, }, }, { displayName: 'Text Search Query', name: 'textSearchQuery', type: 'string', default: '', description: 'Text search query to filter competitors', displayOptions: { show: { resource: ['competitor'], operation: ['list'], }, }, }, { displayName: 'Limit', name: 'limit', type: 'number', typeOptions: { minValue: 1, }, default: 50, description: 'Max number of results to return', displayOptions: { show: { resource: ['competitor'], operation: ['list'], }, }, }, { displayName: 'Offset', name: 'offset', type: 'number', default: 0, description: 'Number of results to skip', displayOptions: { show: { resource: ['competitor'], operation: ['list'], }, }, }, ]; async function execute(itemIndex) { const oIds = this.getNodeParameter('oIds', itemIndex); const productOId = this.getNodeParameter('productOId', itemIndex); const textSearchQuery = this.getNodeParameter('textSearchQuery', itemIndex); const limit = this.getNodeParameter('limit', itemIndex); const offset = this.getNodeParameter('offset', itemIndex); const qs = {}; if (oIds) { qs.oIds = oIds.split(',').map((id) => id.trim()); } if (productOId) { qs.productOId = productOId; } if (textSearchQuery) { qs.textSearchQuery = textSearchQuery; } if (limit) { qs.limit = limit; } if (offset) { qs.offset = offset; } const response = await this.helpers.httpRequestWithAuthentication.call(this, 'octaveApi', { method: 'GET', url: `/api/v2/competitor/list`, qs, }); return [this.helpers.returnJsonArray(response.data || [])]; } //# sourceMappingURL=list.operation.js.map