UNPKG

n8n-nodes-base

Version:

Base nodes of n8n

28 lines (26 loc) 1.49 kB
/** * ServiceNow Node - Version 1 - Zod Schema * Discriminator: resource=attachment, operation=getAll * * Use .parse() for strict validation or .safeParse() for error handling. * * Schema helpers (z, expressionSchema, etc.) are passed as parameters * by the schema-validator, not imported from external files. * * @generated - CommonJS JavaScript for runtime loading */ module.exports = function getSchema({ parameters, z, expressionSchema, stringOrExpression, numberOrExpression, booleanOrExpression, resourceLocatorValueSchema, resourceMapperValueSchema, filterValueSchema, assignmentCollectionValueSchema, iDataObjectSchema, resolveSchema }) { return z.object({ parameters: z.object({ resource: z.literal('attachment'), operation: z.literal('getAll'), authentication: z.union([z.literal('basicAuth'), z.literal('oAuth2'), expressionSchema]).optional(), tableName: stringOrExpression.optional(), returnAll: booleanOrExpression.optional(), limit: resolveSchema({ parameters, schema: numberOrExpression, required: false, displayOptions: {"show":{"returnAll":[false]}}, defaults: {"returnAll":false} }), download: booleanOrExpression.optional(), outputField: resolveSchema({ parameters, schema: stringOrExpression, required: false, displayOptions: {"show":{"download":[true]}}, defaults: {"download":false} }), options: z.object({ queryFilter: stringOrExpression.optional() }).optional(), }).optional(), }); };