UNPKG

@xtsai/xai-utils

Version:

The xai-utils is an openai nodejs sdk compatible extension library.

57 lines (56 loc) 1.19 kB
export declare class RandomUtil { static shortId(): string; /** * random 5~6 length string * @returns state */ static randomState(): string; /** * Client * @param prefix xaim * @returns string */ static clientUUID(prefix?: string): string; /** * url * @param prefix xbot * @returns string */ static createChatid(prefix?: string): string; /** * random base time * @returns reqid string */ static createReqid(prefix?: string): string; /** * * @returns string */ static createMsgid(): string; /** * base time random key part * @returns string */ static genRandomCacheKey(): string; /** * * @param len * @returns */ static randomNumberCode(len?: number): string; /** * which need an random id base on current time * * @param prifixSize min 2 max 4 * @returns randomNo contains no & value */ static randomNo36BaseTime(prifixSize?: number): RandomNoType; } /** * no : base36 string * value: number string */ export type RandomNoType = { no: string; value: string; };