n8n-nodes-base
Version:
Base nodes of n8n
25 lines (23 loc) • 990 B
JavaScript
/**
* Elastic Security Node - Version 1 - Zod Schema
* Discriminator: resource=caseComment, operation=update
*
* 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 }) {
return z.object({
parameters: z.object({
resource: z.literal('caseComment'),
operation: z.literal('update'),
caseId: stringOrExpression.optional(),
commentId: stringOrExpression.optional(),
comment: stringOrExpression.optional(),
simple: booleanOrExpression.optional(),
}).optional(),
});
};