UNPKG

@platform/cell.schema

Version:

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

41 lines (40 loc) 1.71 kB
import { t } from '../common'; export declare class Links { static encodeKey: (input: string) => string; static decodeKey: (input: string) => string; static create: (prefix: string) => Links; private constructor(); readonly prefix: string; isKey(input?: string): boolean; static isKey(prefix: string, input?: string): boolean; total(links?: t.IUriMap): number; static total(prefix: string, links?: t.IUriMap): number; toKey(input: string): string; static toKey(prefix: string, input: string): string; toList(links?: t.IUriMap): { key: string; value: string; }[]; static toList(prefix: string, links?: t.IUriMap): { key: string; value: string; }[]; parseKey(linkKey: string): t.ILinkKey; static parseKey(prefix: string, linkKey: string): t.ILinkKey; parseValue<U extends t.IUri = t.IUri, Q extends t.ILinkQuery = t.ILinkQuery>(linkValue: string): t.ILinkValue<U, Q>; static parseValue<U extends t.IUri = t.IUri, Q extends t.ILinkQuery = t.ILinkQuery>(linkValue: string): t.ILinkValue<U, Q>; parse<U extends t.IUri = t.IUri, Q extends t.ILinkQuery = t.ILinkQuery>(linkKey: string, linkValue: string): t.ILink<U, Q>; static parseLink<U extends t.IUri = t.IUri, Q extends t.ILinkQuery = t.ILinkQuery>(prefix: string, linkKey: string, linkValue: string): t.ILink<U, Q>; find(links?: t.IUriMap): { byName(path?: string | undefined): { key: string; value: string; } | undefined; }; static find(prefix: string, links?: t.IUriMap): { byName(path?: string): { key: string; value: string; } | undefined; }; }