SpaceNinjaServer/src/types/loginTypes.ts
Ângelo Tadeucci 84c825e8a7 Initial commit
2023-05-19 15:26:36 -03:00

49 lines
992 B
TypeScript

import { Document } from "mongoose";
export interface ILoginResponse extends Omit<IDatabaseAccountDocument, "email" | "password"> {
Groups: IGroup[];
Nonce: number;
BuildLabel: string;
MatchmakingBuildId: string;
platformCDNs: string[];
NRS: string[];
DTLS: number;
IRC: string[];
HUB: string;
}
//includes virtual id
export interface IDatabaseAccountDocument extends IDatabaseAccount {
id: string;
}
export interface IGroup {
experiment: string;
experimentGroup: string;
}
export interface IDatabaseAccount {
email: string;
password: string;
DisplayName: string;
CountryCode: string;
ClientType: string;
CrossPlatformAllowed: boolean;
ForceLogoutVersion: number;
AmazonAuthToken?: string;
AmazonRefreshToken?: string;
ConsentNeeded: boolean;
TrackedSettings: string[];
}
export interface ILoginRequest {
email: string;
password: string;
time: number;
s: string;
lang: string;
date: number;
ClientType: string;
PS: string;
}