UNPKG

n8n-nodes-base

Version:

Base nodes of n8n

30 lines (28 loc) 1.52 kB
/** * Databricks - Genie Resource - Zod Schema Factory * Exports a factory that unions all operation schemas for this resource. * * Schema helpers (z, expressionSchema, etc.) are passed as parameters * by the schema-validator, not imported from external files. * * @generated - CommonJS JavaScript for runtime loading */ const getCreateMessageSchema = require('./operation_create_message.schema'); const getExecuteMessageQuerySchema = require('./operation_execute_message_query.schema'); const getGetMessageSchema = require('./operation_get_message.schema'); const getGetQueryResultsSchema = require('./operation_get_query_results.schema'); const getGetSpaceSchema = require('./operation_get_space.schema'); const getStartConversationSchema = require('./operation_start_conversation.schema'); module.exports = function getSchema(helpers) { const { parameters, z } = helpers; // Apply operation default if not set const effectiveParams = parameters.operation === undefined ? { ...parameters, operation: 'listDirectory' } : parameters; return z.union([ getCreateMessageSchema({ ...helpers, parameters: effectiveParams }), getExecuteMessageQuerySchema({ ...helpers, parameters: effectiveParams }), getGetMessageSchema({ ...helpers, parameters: effectiveParams }), getGetQueryResultsSchema({ ...helpers, parameters: effectiveParams }), getGetSpaceSchema({ ...helpers, parameters: effectiveParams }), getStartConversationSchema({ ...helpers, parameters: effectiveParams }), ]); };