export function checkValidName(str: any): boolean; export namespace ACTIONS { const CREATE_DATABASE: string; const DELETE_DATABASE: string; const SCHEMA_READ_ACCESS: string; const SCHEMA_WRITE_ACCESS: string; const INSTANCE_READ_ACCESS: string; const INSTANCE_WRITE_ACCESS: string; const COMMIT_READ_ACCESS: string; const COMMIT_WRITE_ACCESS: string; const META_READ_ACCESS: string; const META_WRITE_ACCESS: string; const CLASS_FRAME: string; const BRANCH: string; const CLONE: string; const FETCH: string; const PUSH: string; const REBASE: string; } export function encodeURISegment(str: any): any; export function decodeURISegment(str: any): any; export function removeDocType(str: any): any; export const standard_urls: object; /** * Encode document payload for GET * @param {string | object} payload * @returns {string} */ export function URIEncodePayload(payload: any): string; /** * Adds an entry to the list of known standard URL prefixes * @param {string} prefix * @param {string} url */ export function addURLPrefix(prefix: string, url: string): void; /** * is the object empty? * returns true if the json object is empty * @param {object|array} [obj] * @returns {boolean} */ export function empty(obj?: any): boolean; /** * Generates a unique node id * @param {string} [base] * @returns {string} */ export function genBNID(base?: string): string; /** * Returns the shorthand version (compressed to prefix:id ) of a url or * false if there is none known for that URL * @param {object | string} link * @returns {string | boolean} */ export function getShorthand(link: any): string | boolean; /** * Compares 2 IRIs for equality by checking compressed and expanded versions of both sides * @param {string} ida * @param {string} idb * @returns {boolean} */ export function compareIDs(ida: string, idb: string): boolean; /** * Shortens a URL to its compressed format - returns the full URL if not possible * @param {string} [url] * @param {string} [prefixes] * @returns {string | undefined} */ export function shorten(url?: string, prefixes?: string): string; /** * Expands a URL to its full URL format - returns the passed string if not possible to expand * @param {string} [url] * @returns {string | undefined} */ export function unshorten(url?: string): string; /** * shortens a jsonld document to its prefixed form * @param {array|object|string} jsonld * @param {string} [prefixes] * @returns {string|array|object} */ export function json_shorten(jsonld: any, prefixes?: string): any; /** * Unshortens a jsonld document to its full form * @param {array|object|string} jsonld * @param {string} [prefixes] * @returns {string|array|object} */ export function json_unshorten(jsonld: any, prefixes?: string): any; /** * Tests a string to see if it is a valid URL - * Valid URLs are those that start with http:// or https:// */ export function validURL(str: any): boolean; /** * Tests a string to see if it is a valid URL - * Valid URLs are those that start with http:// or https:// * @param {string} str * @param {string | object} [context] * @param {boolean} [allow_shorthand] * @returns {boolean} */ export function isIRI(str: string, context?: any, allow_shorthand?: boolean): boolean; /** * Generates a text label from a URL * @param {string} url * @returns {string} */ export function labelFromURL(url: string): string; /** * Generates a text label from a URL */ export function labelFromVariable(v: any): any; /** * returns the fragment part of a URL (whether compressed or not) */ export function urlFragment(url: any): any; /** * returns the last part of a URL after the last / */ export function lastURLBit(url: any): any; /** * returns the a standard URL associated with a given prefix and extension */ export function getStdURL(pref: any, ext: any, url: any): any; export function addNamespacesToVariables(vars: any): any[]; export function addNamespaceToVariable(v: any): any; export function removeNamespaceFromVariable(mvar: any): any; export function removeNamespacesFromVariables(vars: any): any[]; export function getConfigValue(val: any, row: any): any; export namespace TypeHelper { /** * Returns true if the passed type is an xsd:string (compressed or not) */ function isStringType(stype: any): boolean; function isDatatype(stype: any): boolean; /** * Adds 3 order magnitude separators ( default ,) into big numbers for legibility */ function numberWithCommas(value: any, separator: any): any; function formatBytes(bytes: any, decimals?: number): string; const datatypes: string[]; function parseRangeValue(val: any, dividor: any): any; } export namespace DateHelper { /** * Takes an xsd time string and returns a structure {hour: HH, minute: MM, * second ss.ssssss, timezone: tz} */ function parseXsdTime(val: any): {}; /** * Takes an xsd time string and returns a structure {year: [-]YYYY, month: MM, day: dd} */ function parseXsdDate(val: any): false | { year: any; month: any; day: any; timezone: string | boolean; }; /** * Parses a date string of type ty */ function parseDate(ty: any, value: any): {}; /** * adds appropriate padding to date type for xsd rules */ function addXsdPadding(parsed: any): { year: any; month: any; day: any; hour: any; minute: any; second: any; }; /** * generates an xsd string of type ty for the passed parsed structure (year, month, day, hour, * minute, second, timezone) */ function xsdFromParsed(parsed: any, ty: any): any; /** * Converts between a unix timestamp and a parsed structure */ function convertTimestampToXsd(val: any): { year: number; month: number; day: number; hour: number; minute: number; second: number; }; /** * Parses an xsd date time into a structure */ function parseXsdDateTime(val: any): {}; /** * Extracts the timezone data from an xsd date string */ function extractXsdTimezone(val: any): false | "Z"; }