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.
42 lines • 1.33 kB
JavaScript
;
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: '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: ['brandVoice'],
operation: ['list'],
},
};
exports.exportedProperties = (0, utils_1.applyDisplayOptions)(displayOptions, properties);
async function execute(itemIndex) {
const limit = this.getNodeParameter('limit', itemIndex);
const offset = this.getNodeParameter('offset', itemIndex);
const qs = {};
if (limit)
qs.limit = limit;
if (offset)
qs.offset = offset;
const response = await OctaveApiRequest_1.octaveApiRequest.call(this, 'GET', '/api/v2/brand-voice/list', {}, qs);
return [this.helpers.returnJsonArray(response.data || [])];
}
//# sourceMappingURL=list.operation.js.map