UNPKG

@c8y/ngx-components

Version:

Angular modules for Cumulocity IoT applications

33 lines 1.27 kB
import { ContextDashboard } from '@c8y/ngx-components/context-dashboard'; import { DynamicComponentService } from '@c8y/ngx-components'; import Ajv from 'ajv'; import * as i0 from "@angular/core"; export type JSONValidationError = { message: string; path: string; }; export declare class JsonValidationService { private dynamicComponentService; ajv: Ajv; private OMIT_ERRORS; constructor(dynamicComponentService: DynamicComponentService); validateDashboard(dashboardJson: string, schemas?: any[]): Promise<JSONValidationError[]>; /** * Returns JSON schema for dashboard and all its children. * Children are referenced by their componentId. Dashboard schema is enriched with references to children schemas. * @param dashboard Context dashboard object. */ getJsonSchemas(dashboard: ContextDashboard): Promise<({ uri: string; schema: any; } | { uri: string; fileMatch: string[]; schema: any; })[]>; private getSchemaForWidget; private getWidgetSchemasReferences; static ɵfac: i0.ɵɵFactoryDeclaration<JsonValidationService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<JsonValidationService>; } //# sourceMappingURL=json-validation.service.d.ts.map