n8n-nodes-base
Version:
Base nodes of n8n
153 lines • 6.22 kB
JavaScript
;
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.Databricks = void 0;
const n8n_workflow_1 = require("n8n-workflow");
const resources_1 = require("./resources");
const router_1 = require("./actions/router");
const listSearch = __importStar(require("./methods/listSearch"));
class Databricks {
description = {
displayName: 'Databricks',
name: 'databricks',
icon: 'file:databricks.svg',
group: ['transform'],
version: 1,
usableAsTool: true,
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
description: 'Interact with Databricks API',
documentationUrl: 'https://docs.databricks.com/aws/en',
defaults: {
name: 'Databricks',
},
inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
credentials: [
{
name: 'databricksApi',
required: true,
displayOptions: {
show: {
authentication: ['accessToken'],
},
},
},
{
name: 'databricksOAuth2Api',
required: true,
displayOptions: {
show: {
authentication: ['oAuth2'],
},
},
},
],
properties: [
{
displayName: 'Authentication',
name: 'authentication',
type: 'options',
options: [
{
name: 'Access Token',
value: 'accessToken',
},
{
name: 'OAuth2',
value: 'oAuth2',
},
],
default: 'accessToken',
},
{
displayName: 'Resource',
name: 'resource',
type: 'options',
noDataExpression: true,
options: [
{
name: 'Databricks SQL',
value: 'databricksSql',
description: 'Execute SQL queries on data warehouses. <a href="https://docs.databricks.com/sql/index.html" target="_blank">Learn more</a>.',
},
{
name: 'File',
value: 'files',
description: 'Manage files in Unity Catalog volumes. <a href="https://docs.databricks.com/api/workspace/files" target="_blank">Learn more</a>.',
},
{
name: 'Genie',
value: 'genie',
description: 'AI-powered data assistant. <a href="https://docs.databricks.com/genie/index.html" target="_blank">Learn more</a>.',
},
{
name: 'Model Serving',
value: 'modelServing',
description: 'Deploy and query ML models. <a href="https://docs.databricks.com/machine-learning/model-serving/index.html" target="_blank">Learn more</a>.',
},
{
name: 'Unity Catalog',
value: 'unityCatalog',
description: 'Unified governance for data and AI. <a href="https://docs.databricks.com/data-governance/unity-catalog/index.html" target="_blank">Learn more</a>.',
},
{
name: 'Vector Search',
value: 'vectorSearch',
description: 'Semantic search with vector embeddings. <a href="https://docs.databricks.com/generative-ai/vector-search.html" target="_blank">Learn more</a>.',
},
],
default: 'databricksSql',
},
resources_1.filesOperations,
resources_1.genieOperations,
resources_1.unityCatalogOperations,
resources_1.databricksSqlOperations,
resources_1.modelServingOperations,
resources_1.vectorSearchOperations,
...resources_1.filesParameters,
...resources_1.genieParameters,
...resources_1.unityCatalogParameters,
...resources_1.databricksSqlParameters,
...resources_1.modelServingParameters,
...resources_1.vectorSearchParameters,
],
};
methods = { listSearch };
async execute() {
return await router_1.router.call(this);
}
}
exports.Databricks = Databricks;
//# sourceMappingURL=Databricks.node.js.map