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.

369 lines 20.2 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 BrandVoiceDescription_1 = require("./descriptions/BrandVoiceDescription"); const BuyingTriggerDescription_1 = require("./descriptions/BuyingTriggerDescription"); 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 ResourceDescription_1 = require("./descriptions/ResourceDescription"); const SolutionDescription_1 = require("./descriptions/SolutionDescription"); const ServiceDescription_1 = require("./descriptions/ServiceDescription"); 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 WorkflowDescription_1 = require("./descriptions/WorkflowDescription"); const buildWorkspace_operation_1 = require("./actions/agent/buildWorkspace.operation"); const callPrep_operation_1 = require("./actions/agent/callPrep.operation"); const create_operation_1 = require("./actions/agent/create.operation"); const delete_operation_1 = require("./actions/agent/delete.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 get_operation_1 = require("./actions/agent/get.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 runContext_operation_1 = require("./actions/agent/runContext.operation"); const runProspector_operation_1 = require("./actions/agent/runProspector.operation"); const runSequence_operation_1 = require("./actions/agent/runSequence.operation"); const update_operation_1 = require("./actions/agent/update.operation"); const create_operation_2 = require("./actions/playbook/create.operation"); const get_operation_2 = require("./actions/playbook/get.operation"); const list_operation_2 = require("./actions/playbook/list.operation"); const update_operation_2 = require("./actions/playbook/update.operation"); const get_operation_3 = require("./actions/product/get.operation"); const list_operation_3 = require("./actions/product/list.operation"); const create_operation_3 = require("./actions/product/create.operation"); const update_operation_3 = require("./actions/product/update.operation"); const generate_operation_1 = require("./actions/product/generate.operation"); const get_operation_4 = require("./actions/persona/get.operation"); const list_operation_4 = require("./actions/persona/list.operation"); const create_operation_4 = require("./actions/persona/create.operation"); const update_operation_4 = require("./actions/persona/update.operation"); const generate_operation_2 = require("./actions/persona/generate.operation"); const create_operation_5 = require("./actions/reference/create.operation"); const get_operation_5 = require("./actions/reference/get.operation"); const list_operation_5 = require("./actions/reference/list.operation"); const update_operation_5 = require("./actions/reference/update.operation"); const generate_operation_3 = require("./actions/reference/generate.operation"); const get_operation_6 = require("./actions/useCase/get.operation"); const list_operation_6 = require("./actions/useCase/list.operation"); const create_operation_6 = require("./actions/useCase/create.operation"); const update_operation_6 = require("./actions/useCase/update.operation"); const generate_operation_4 = require("./actions/useCase/generate.operation"); const runAgent_operation_1 = require("./actions/async/runAgent.operation"); const runAgentStatus_operation_1 = require("./actions/async/runAgentStatus.operation"); const get_operation_7 = require("./actions/competitor/get.operation"); const list_operation_7 = require("./actions/competitor/list.operation"); const create_operation_7 = require("./actions/competitor/create.operation"); const update_operation_7 = require("./actions/competitor/update.operation"); const generate_operation_5 = require("./actions/competitor/generate.operation"); const get_operation_8 = require("./actions/segment/get.operation"); const list_operation_8 = require("./actions/segment/list.operation"); const create_operation_8 = require("./actions/segment/create.operation"); const update_operation_8 = require("./actions/segment/update.operation"); const generate_operation_6 = require("./actions/segment/generate.operation"); const create_operation_9 = require("./actions/experiment/create.operation"); const create_operation_10 = require("./actions/proofPoint/create.operation"); const get_operation_9 = require("./actions/proofPoint/get.operation"); const list_operation_9 = require("./actions/proofPoint/list.operation"); const update_operation_9 = require("./actions/proofPoint/update.operation"); const generate_operation_7 = require("./actions/proofPoint/generate.operation"); const list_operation_10 = require("./actions/brandVoice/list.operation"); const get_operation_10 = require("./actions/brandVoice/get.operation"); const create_operation_11 = require("./actions/brandVoice/create.operation"); const update_operation_10 = require("./actions/brandVoice/update.operation"); const generate_operation_8 = require("./actions/brandVoice/generate.operation"); const apply_operation_1 = require("./actions/brandVoice/apply.operation"); const toggleDefault_operation_1 = require("./actions/brandVoice/toggleDefault.operation"); const list_operation_11 = require("./actions/buyingTrigger/list.operation"); const get_operation_11 = require("./actions/buyingTrigger/get.operation"); const create_operation_12 = require("./actions/buyingTrigger/create.operation"); const update_operation_11 = require("./actions/buyingTrigger/update.operation"); const generate_operation_9 = require("./actions/buyingTrigger/generate.operation"); const delete_operation_2 = require("./actions/buyingTrigger/delete.operation"); const list_operation_12 = require("./actions/solution/list.operation"); const get_operation_12 = require("./actions/solution/get.operation"); const create_operation_13 = require("./actions/solution/create.operation"); const update_operation_12 = require("./actions/solution/update.operation"); const generate_operation_10 = require("./actions/solution/generate.operation"); const delete_operation_3 = require("./actions/solution/delete.operation"); const list_operation_13 = require("./actions/service/list.operation"); const get_operation_13 = require("./actions/service/get.operation"); const create_operation_14 = require("./actions/service/create.operation"); const update_operation_13 = require("./actions/service/update.operation"); const generate_operation_11 = require("./actions/service/generate.operation"); const delete_operation_4 = require("./actions/service/delete.operation"); const list_operation_14 = require("./actions/resource/list.operation"); const get_operation_14 = require("./actions/resource/get.operation"); const create_operation_15 = require("./actions/resource/create.operation"); const delete_operation_5 = require("./actions/resource/delete.operation"); const search_operation_1 = require("./actions/resource/search.operation"); const status_operation_1 = require("./actions/resource/status.operation"); const run_operation_1 = require("./actions/workflow/run.operation"); const runStatus_operation_1 = require("./actions/workflow/runStatus.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: 'Brand Voice', value: 'brandVoice', }, { name: 'Buying Trigger', value: 'buyingTrigger', }, { 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: 'Resource', value: 'resource', }, { name: 'Segment', value: 'segment', }, { name: 'Service', value: 'service', }, { name: 'Solution', value: 'solution', }, { name: 'Use Case', value: 'useCase', }, { name: 'Workflow', value: 'workflow', }, ], 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, ...BrandVoiceDescription_1.brandVoiceOperations, ...BuyingTriggerDescription_1.buyingTriggerOperations, ...SolutionDescription_1.solutionOperations, ...ServiceDescription_1.serviceOperations, ...ResourceDescription_1.resourceOperations, ...WorkflowDescription_1.workflowOperations, ...list_operation_1.exportedProperties, ...get_operation_1.exportedProperties, ...create_operation_1.exportedProperties, ...update_operation_1.exportedProperties, ...delete_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, ...runContext_operation_1.exportedProperties, ...qualifyCompany_operation_1.exportedProperties, ...qualifyPerson_operation_1.exportedProperties, ...list_operation_2.exportedProperties, ...get_operation_2.exportedProperties, ...create_operation_2.exportedProperties, ...update_operation_2.exportedProperties, ...list_operation_3.exportedProperties, ...get_operation_3.exportedProperties, ...create_operation_3.exportedProperties, ...update_operation_3.exportedProperties, ...generate_operation_1.exportedProperties, ...list_operation_4.exportedProperties, ...get_operation_4.exportedProperties, ...create_operation_4.exportedProperties, ...update_operation_4.exportedProperties, ...generate_operation_2.exportedProperties, ...list_operation_5.exportedProperties, ...get_operation_5.exportedProperties, ...create_operation_5.exportedProperties, ...update_operation_5.exportedProperties, ...generate_operation_3.exportedProperties, ...list_operation_6.exportedProperties, ...get_operation_6.exportedProperties, ...create_operation_6.exportedProperties, ...update_operation_6.exportedProperties, ...generate_operation_4.exportedProperties, ...runAgent_operation_1.exportedProperties, ...runAgentStatus_operation_1.exportedProperties, ...list_operation_7.exportedProperties, ...get_operation_7.exportedProperties, ...create_operation_7.exportedProperties, ...update_operation_7.exportedProperties, ...generate_operation_5.exportedProperties, ...list_operation_8.exportedProperties, ...get_operation_8.exportedProperties, ...create_operation_8.exportedProperties, ...update_operation_8.exportedProperties, ...generate_operation_6.exportedProperties, ...create_operation_9.exportedProperties, ...list_operation_9.exportedProperties, ...get_operation_9.exportedProperties, ...create_operation_10.exportedProperties, ...update_operation_9.exportedProperties, ...generate_operation_7.exportedProperties, ...list_operation_10.exportedProperties, ...get_operation_10.exportedProperties, ...create_operation_11.exportedProperties, ...update_operation_10.exportedProperties, ...generate_operation_8.exportedProperties, ...apply_operation_1.exportedProperties, ...toggleDefault_operation_1.exportedProperties, ...list_operation_11.exportedProperties, ...get_operation_11.exportedProperties, ...create_operation_12.exportedProperties, ...update_operation_11.exportedProperties, ...generate_operation_9.exportedProperties, ...delete_operation_2.exportedProperties, ...list_operation_12.exportedProperties, ...get_operation_12.exportedProperties, ...create_operation_13.exportedProperties, ...update_operation_12.exportedProperties, ...generate_operation_10.exportedProperties, ...delete_operation_3.exportedProperties, ...list_operation_13.exportedProperties, ...get_operation_13.exportedProperties, ...create_operation_14.exportedProperties, ...update_operation_13.exportedProperties, ...generate_operation_11.exportedProperties, ...delete_operation_4.exportedProperties, ...list_operation_14.exportedProperties, ...get_operation_14.exportedProperties, ...create_operation_15.exportedProperties, ...delete_operation_5.exportedProperties, ...search_operation_1.exportedProperties, ...status_operation_1.exportedProperties, ...run_operation_1.exportedProperties, ...runStatus_operation_1.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) { const executionData = this.helpers.constructExecutionMetaData(result[0], { itemData: { item: i } }); returnData.push(...executionData); } } 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: { item: i } }); continue; } throw error; } } return [returnData]; } } exports.Octave = Octave; //# sourceMappingURL=Octave.node.js.map