validateEventInput
function validateEventInput(input, options?): ValidationResult;Defined in: src/validation.ts:112
Validate the structure of a record input (not the action’s metadata schema).
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
input |
unknown |
options? |
{ basePath?: string; maxEventBytes?: number; } |
options.basePath? |
string |
options.maxEventBytes? |
number |
Returns
Section titled “Returns”ValidationResult
Example
Section titled “Example”import { validateEventInput } from "@xtandard/audit";
validateEventInput({ tenant: "acme", action: "invoice.paid", actor: { id: "u_1" } }).valid; // true