///
///
///
declare module ngMeteorAccounts {
class MeteorComponent {
subscribe(name: string, ...rest: any[]);
autorun(runFunc: Function, autoBind: boolean): void;
}
type AccountDetails = {
name: string;
password: string;
profile?: Object;
}
type LoginOptions = {
requestPermissions?: Array;
loginStyle: string;
};
enum AuthProvider {
FACEBOOK, GOOGLE, TWITTER, GITHUB, MEETUP, WEIBO, METEOR
}
class BasicAccountsService {
logout(): Promise;
}
class AccountsService extends BasicAccountsService {
login(usernameOrEmail: string, password: string): Promise;
register(newUser: AccountDetails): Promise;
forgotPassword(email: string): Promise;
resetPassword(token: string, newPassword: string): Promise;
changePassword(oldPassword: string, newPassword: string): Promise;
verifyEmail(token: string): Promise;
}
class AccountsSocialService extends BasicAccountsService {
loginWith(provider: string, loginOptions?: LoginOptions): Promise;
}
class InjectUserAnnotation {
propName: string;
}
interface InjectUserFactory {
new (propName?: string): InjectUserAnnotation;
(propName?: string): any;
}
var InjectUser: InjectUserFactory;
class RequireUserAnnotation {
propName: string;
}
interface RequireUserFactory {
new (): RequireUserAnnotation;
(): any;
}
var RequireUser: RequireUserFactory;
}
declare module "meteor-accounts" {
export = ngMeteorAccounts;
}