UNPKG

@platform/cell.schema

Version:

URI and database schemas for the `cell.os`.

37 lines (36 loc) 1.25 kB
import { t } from '../common'; declare type AllowPattern = string | ((input: string) => boolean); declare type Allow = { NS: AllowPattern[]; }; export declare const DEFAULT: { ALLOW: Allow; }; export declare class Uri { static cuid: () => string; static slug: () => string; static ALLOW: { NS: AllowPattern[]; }; static create: { ns: (id: string) => string; cell: (ns: string, key: string) => string; row: (ns: string, key: string) => string; column: (ns: string, key: string) => string; file: (ns: string, fileid: string) => string; }; static parse<D extends t.IUri>(input?: string): t.IUriParts<D>; static is: { uri: (input?: string | undefined) => boolean; type: (type: "CELL" | "NS" | "UNKNOWN" | "ROW" | "COLUMN" | "FILE", input?: string | undefined) => boolean; ns: (input?: string | undefined) => boolean; file: (input?: string | undefined) => boolean; cell: (input?: string | undefined) => boolean; row: (input?: string | undefined) => boolean; column: (input?: string | undefined) => boolean; valid: { ns(input?: string | undefined): boolean; }; }; } export {};