UNPKG

@cocalc/database

Version:

CoCalc: code for working with our PostgreSQL database

23 lines (22 loc) 988 B
import { PostgreSQL } from "./types"; export declare function is_paying_customer(db: PostgreSQL, account_id: string): Promise<boolean>; interface SetAccountFields { db: PostgreSQL; account_id: string; email_address?: string | undefined; first_name?: string | undefined; last_name?: string | undefined; } export declare function set_account_info_if_not_set(opts: SetAccountFields): Promise<void>; export declare function set_account_info_if_different(opts: SetAccountFields, overwrite?: boolean): Promise<void>; export declare function set_account(db: PostgreSQL, account_id: string, set: { [field: string]: any; }): Promise<void>; export declare function get_account(db: PostgreSQL, account_id: string, columns: string[]): Promise<void>; interface SetEmailAddressVerifiedOpts { db: PostgreSQL; account_id: string; email_address: string; } export declare function set_email_address_verified(opts: SetEmailAddressVerifiedOpts): Promise<void>; export {};