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.

254 lines 13.1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Octave = void 0; const router_1 = require("./actions/router"); const loadOptions_1 = require("./methods/loadOptions"); const AgentDescription_1 = require("./descriptions/AgentDescription"); const AsyncDescription_1 = require("./descriptions/AsyncDescription"); const PersonaDescription_1 = require("./descriptions/PersonaDescription"); const PlaybookDescription_1 = require("./descriptions/PlaybookDescription"); const ProductDescription_1 = require("./descriptions/ProductDescription"); const ReferenceDescription_1 = require("./descriptions/ReferenceDescription"); const UseCaseDescription_1 = require("./descriptions/UseCaseDescription"); const CompetitorDescription_1 = require("./descriptions/CompetitorDescription"); const SegmentDescription_1 = require("./descriptions/SegmentDescription"); const ExperimentDescription_1 = require("./descriptions/ExperimentDescription"); const ProofPointDescription_1 = require("./descriptions/ProofPointDescription"); const buildWorkspace_operation_1 = require("./actions/agent/buildWorkspace.operation"); const callPrep_operation_1 = require("./actions/agent/callPrep.operation"); const enrichCompany_operation_1 = require("./actions/agent/enrichCompany.operation"); const enrichPerson_operation_1 = require("./actions/agent/enrichPerson.operation"); const generateContent_operation_1 = require("./actions/agent/generateContent.operation"); const list_operation_1 = require("./actions/agent/list.operation"); const qualifyCompany_operation_1 = require("./actions/agent/qualifyCompany.operation"); const qualifyPerson_operation_1 = require("./actions/agent/qualifyPerson.operation"); const runProspector_operation_1 = require("./actions/agent/runProspector.operation"); const runSequence_operation_1 = require("./actions/agent/runSequence.operation"); const create_operation_1 = require("./actions/playbook/create.operation"); const get_operation_1 = require("./actions/playbook/get.operation"); const list_operation_2 = require("./actions/playbook/list.operation"); const update_operation_1 = require("./actions/playbook/update.operation"); const get_operation_2 = require("./actions/product/get.operation"); const list_operation_3 = require("./actions/product/list.operation"); const create_operation_2 = require("./actions/product/create.operation"); const update_operation_2 = require("./actions/product/update.operation"); const generate_operation_1 = require("./actions/product/generate.operation"); const get_operation_3 = require("./actions/persona/get.operation"); const list_operation_4 = require("./actions/persona/list.operation"); const create_operation_3 = require("./actions/persona/create.operation"); const update_operation_3 = require("./actions/persona/update.operation"); const generate_operation_2 = require("./actions/persona/generate.operation"); const create_operation_4 = require("./actions/reference/create.operation"); const get_operation_4 = require("./actions/reference/get.operation"); const list_operation_5 = require("./actions/reference/list.operation"); const update_operation_4 = require("./actions/reference/update.operation"); const generate_operation_3 = require("./actions/reference/generate.operation"); const get_operation_5 = require("./actions/useCase/get.operation"); const list_operation_6 = require("./actions/useCase/list.operation"); const create_operation_5 = require("./actions/useCase/create.operation"); const update_operation_5 = require("./actions/useCase/update.operation"); const generate_operation_4 = require("./actions/useCase/generate.operation"); const runAgent_operation_1 = require("./actions/async/runAgent.operation"); const get_operation_6 = require("./actions/competitor/get.operation"); const list_operation_7 = require("./actions/competitor/list.operation"); const create_operation_6 = require("./actions/competitor/create.operation"); const update_operation_6 = require("./actions/competitor/update.operation"); const generate_operation_5 = require("./actions/competitor/generate.operation"); const get_operation_7 = require("./actions/segment/get.operation"); const list_operation_8 = require("./actions/segment/list.operation"); const create_operation_7 = require("./actions/segment/create.operation"); const update_operation_7 = require("./actions/segment/update.operation"); const generate_operation_6 = require("./actions/segment/generate.operation"); const create_operation_8 = require("./actions/experiment/create.operation"); const create_operation_9 = require("./actions/proofPoint/create.operation"); const get_operation_8 = require("./actions/proofPoint/get.operation"); const list_operation_9 = require("./actions/proofPoint/list.operation"); const update_operation_8 = require("./actions/proofPoint/update.operation"); const generate_operation_7 = require("./actions/proofPoint/generate.operation"); class Octave { constructor() { this.description = { displayName: 'Octave', name: 'octave', icon: 'file:octave.svg', group: ['ai'], version: 1, subtitle: '={{$parameter["operation"].replace(/([A-Z])/g, " $1").replace(/^./, c => c.toUpperCase()) }}', description: 'Interact with the Octave V2 API', defaults: { name: 'Octave', }, usableAsTool: true, inputs: ["main"], outputs: ["main"], credentials: [ { name: 'octaveApi', required: true, }, ], properties: [ { displayName: 'Resource', name: 'resource', type: 'options', noDataExpression: true, options: [ { name: 'Agent', value: 'agent', }, { name: 'Async', value: 'async', }, { name: 'Competitor', value: 'competitor', }, { name: 'Experiment', value: 'experiment', }, { name: 'Persona', value: 'persona', }, { name: 'Playbook', value: 'playbook', }, { name: 'Product', value: 'product', }, { name: 'Proof Point', value: 'proofPoint', }, { name: 'Reference', value: 'reference', }, { name: 'Segment', value: 'segment', }, { name: 'Use Case', value: 'useCase', }, ], default: 'agent', }, ...AgentDescription_1.agentOperations, ...PlaybookDescription_1.playbookOperations, ...ProductDescription_1.productOperations, ...PersonaDescription_1.personaOperations, ...ProofPointDescription_1.proofPointDescription, ...ReferenceDescription_1.referenceOperations, ...UseCaseDescription_1.useCaseOperations, ...AsyncDescription_1.asyncOperations, ...CompetitorDescription_1.competitorOperations, ...SegmentDescription_1.segmentOperations, ...ExperimentDescription_1.experimentOperations, ...list_operation_1.exportedProperties, ...buildWorkspace_operation_1.exportedProperties, ...callPrep_operation_1.exportedProperties, ...enrichCompany_operation_1.exportedProperties, ...enrichPerson_operation_1.exportedProperties, ...generateContent_operation_1.exportedProperties, ...runSequence_operation_1.exportedProperties, ...runProspector_operation_1.exportedProperties, ...qualifyCompany_operation_1.exportedProperties, ...qualifyPerson_operation_1.exportedProperties, ...list_operation_2.exportedProperties, ...get_operation_1.exportedProperties, ...create_operation_1.exportedProperties, ...update_operation_1.exportedProperties, ...list_operation_3.exportedProperties, ...get_operation_2.exportedProperties, ...create_operation_2.exportedProperties, ...update_operation_2.exportedProperties, ...generate_operation_1.exportedProperties, ...list_operation_4.exportedProperties, ...get_operation_3.exportedProperties, ...create_operation_3.exportedProperties, ...update_operation_3.exportedProperties, ...generate_operation_2.exportedProperties, ...list_operation_5.exportedProperties, ...get_operation_4.exportedProperties, ...create_operation_4.exportedProperties, ...update_operation_4.exportedProperties, ...generate_operation_3.exportedProperties, ...list_operation_6.exportedProperties, ...get_operation_5.exportedProperties, ...create_operation_5.exportedProperties, ...update_operation_5.exportedProperties, ...generate_operation_4.exportedProperties, ...runAgent_operation_1.exportedProperties, ...list_operation_7.exportedProperties, ...get_operation_6.exportedProperties, ...create_operation_6.exportedProperties, ...update_operation_6.exportedProperties, ...generate_operation_5.exportedProperties, ...list_operation_8.exportedProperties, ...get_operation_7.exportedProperties, ...create_operation_7.exportedProperties, ...update_operation_7.exportedProperties, ...generate_operation_6.exportedProperties, ...create_operation_8.exportedProperties, ...list_operation_9.exportedProperties, ...get_operation_8.exportedProperties, ...create_operation_9.exportedProperties, ...update_operation_8.exportedProperties, ...generate_operation_7.exportedProperties, ], }; this.methods = { loadOptions: { getAgents: loadOptions_1.getAgents, getPlaybooks: loadOptions_1.getPlaybooks, getPersonas: loadOptions_1.getPersonas, getProducts: loadOptions_1.getProducts, }, }; } async execute() { const items = this.getInputData(); const returnData = []; for (let i = 0; i < items.length; i++) { try { const result = await router_1.router.call(this, i); if (result && result.length > 0 && result[0].length > 0) { returnData.push(...result[0]); } } catch (error) { if (this.continueOnFail()) { const errorJson = { error: error.message }; if (error.context) errorJson.context = error.context; if (error.response && error.response.body) { try { errorJson.apiResponse = typeof error.response.body === 'string' ? JSON.parse(error.response.body) : error.response.body; } catch (parseError) { errorJson.apiResponse = error.response.body; errorJson.parseError = 'Failed to parse API response body.'; } } else if (error.cause) { errorJson.cause = error.cause; } returnData.push({ json: errorJson, pairedItem: i }); continue; } throw error; } } return [returnData]; } } exports.Octave = Octave; //# sourceMappingURL=Octave.node.js.map