UNPKG

n8n-nodes-base

Version:

Base nodes of n8n

29 lines (27 loc) 1.56 kB
/** * GitLab Node - Version 1 - Zod Schema * Discriminator: resource=file, operation=list * * 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('file'), operation: z.literal('list'), authentication: z.union([z.literal('accessToken'), z.literal('oAuth2'), expressionSchema]).optional(), owner: stringOrExpression.optional(), repository: stringOrExpression.optional(), returnAll: booleanOrExpression.optional(), limit: resolveSchema({ parameters, schema: numberOrExpression, required: false, displayOptions: {"show":{"returnAll":[false]}}, defaults: {"returnAll":false} }), filePath: stringOrExpression.optional(), page: resolveSchema({ parameters, schema: numberOrExpression, required: false, displayOptions: {"show":{"returnAll":[false]}}, defaults: {"returnAll":false} }), additionalParameters: z.object({ ref: stringOrExpression.optional(), recursive: booleanOrExpression.optional() }).optional(), }).optional(), }); };