///
import { Entity } from '../core/models';
import * as moment from 'moment';
import Moment = moment.Moment;
export interface User extends Entity {
firstName: string;
lastName: string;
icon: string;
joined: Moment;
lastOn: Moment;
groups: {
[id: string]: {
name: string;
role: 'admin' | 'representative' | 'citizen';
district?: {
id: string;
name: string;
};
};
};
}
export declare type UserAddress = {
line1: string;
line2?: string;
city: string;
state: string;
zip: string;
};
export interface SessionUser extends User {
email: string;
address: UserAddress;
votes: {
[id: string]: string;
};
comments: {
[id: string]: string;
};
following: string[];
superuser: boolean;
isVerified: boolean;
}
export declare type EmailSignupData = {
[P in 'firstName' | 'lastName' | 'address' | 'email' | 'superuser']: SessionUser[P];
} & {
password: string;
};
export declare function parseUser(data: Partial | any): User;
export declare const parseSessionUser: (data: Partial | any) => SessionUser;
export declare function userDistrict(user: User, groupId: string): string | null;
export declare function isConstituent(user: User, groupId: string): boolean;
export declare function usersEqual(x: User, y: User): boolean;