UNPKG

@0xcert/conventions

Version:

Module with implementation of all confirmed conventions.

140 lines (139 loc) 3.42 kB
export declare type XcertSchema = { [key: string]: any; $schema: 'https://conventions.0xcert.org/xcert-schema.json'; description: string; properties: { [key: string]: XcertSchemaPrimitive | XcertSchemaObject | XcertSchemaArray; }; type: 'object'; title: string; } | { [key: string]: any; $schema: 'https://conventions.0xcert.org/xcert-schema.json'; description: string; items: XcertSchemaPrimitive | XcertSchemaObject; type: 'array'; title: string; }; export interface XcertSchemaObject { [key: string]: any; description?: string; properties: { [key: string]: XcertSchemaPrimitive | XcertSchemaObject | XcertSchemaArray; }; type: 'object'; } export interface XcertSchemaArray { [key: string]: any; description?: string; items: XcertSchemaPrimitive | XcertSchemaObject; type: 'array'; } export interface XcertSchemaPrimitive { [key: string]: any; description?: string; type: 'string' | 'number' | 'boolean'; } export declare const xcertSchema: { $schema: string; title: string; definitions: { stringSchema: { type: string; properties: { type: { type: string; enum: string[]; }; }; }; numberSchema: { type: string; properties: { type: { type: string; enum: string[]; }; }; }; booleanSchema: { type: string; properties: { type: { type: string; enum: string[]; }; }; }; objectSchema: { type: string; properties: { type: { type: string; enum: string[]; }; properties: { patternProperties: { '^.*$': { anyOf: { $ref: string; }[]; }; }; }; }; }; arraySchema: { type: string; properties: { type: { type: string; enum: string[]; }; items: { anyOf: { $ref: string; }[]; }; }; }; simpleTypes: { enum: string[]; }; }; type: string[]; properties: { $schema: { type: string; format: string; }; $evidence: { type: string; format: string; }; title: { type: string; }; description: { type: string; }; type: { type: string; enum: string[]; }; items: { anyOf: { $ref: string; }[]; }; properties: { patternProperties: { '^.*$': { anyOf: { $ref: string; }[]; }; }; }; }; };