@kintone/plugin-manifest-validator
Version:
[](https://badge.fury.io/js/%40kintone%2Fplugin-manifest-validator)  • 989 B
TypeScript
import type { ErrorObject } from "ajv";
type WarningObject = {
message: string;
};
type ValidateResult = {
valid: boolean | PromiseLike<any>;
errors: null | ErrorObject[];
warnings: null | WarningObject[];
};
export type RequiredObjectProperty = {
[key: string]: {
properties: string[];
};
};
export type RequiredProperties = {
items: Array<RequiredObjectProperty | string>;
warn?: boolean;
};
type ValidatorResult = boolean | {
valid: true;
} | {
valid: false;
message?: string;
};
type Options = {
relativePath?: (filePath: string) => boolean;
maxFileSize?: (maxBytes: number, filePath: string) => ValidatorResult;
fileExists?: (filePath: string) => ValidatorResult;
};
/**
* @param {Object} json
* @param {Object=} options
* @return {{valid: boolean, errors: Array<!Object>}} errors is null if valid
*/
declare const _default: (json: Record<string, any>, options?: Options) => ValidateResult;
export default _default;