UNPKG

862 BTypeScriptView Raw
1import * as winston from "winston";
2export declare namespace Security {
3 /**
4 * Creates a unique snowflake
5 */
6 function snowflake(): Promise<string>;
7 /**
8 * Creates a secure random string of a given length
9 * @param length the length
10 */
11 function random(length: number): Promise<string>;
12}
13export declare namespace Miscellaneous {
14 /**
15 * Returns an object with a promise and a callback
16 */
17 function callbackPromise(): {
18 cb: () => void;
19 promise: Promise<void>;
20 };
21 function sortNumbersInObject(obj: {
22 [key: string]: number;
23 }): [string, number][];
24}
25export declare const Logger: winston.LoggerInstance;
26/**
27 * Computes the inheritence-based role list
28 */
29export declare function calculateInclusiveRoles(): {
30 moderator: string[];
31 admin: string[];
32 root: string[];
33};