@openinc/parse-server-opendash
Version:
Parse Server Cloud Code for open.INC Stack.
15 lines (14 loc) • 695 B
TypeScript
import { Core_Token } from "../types";
interface TokenPayload {
type: "verify-email" | "password-reset";
userId: string;
}
export declare function createToken(type: TokenPayload["type"], userId: string, url: string): Promise<{
token: string;
url: string;
}>;
export declare function createUrl(url: string, token: string): string;
export declare function consumeToken(type: TokenPayload["type"], key: string, doNotConsume?: boolean): Promise<TokenPayload>;
export declare function isExpired(token: Core_Token): boolean;
export declare function createSessionToken(user: Parse.User, installationId: string | undefined, createdWith: Record<string, any>): Promise<string>;
export {};