codingame-api-node-ts
Version:
A CodinGame API node, that permits you to access all of the endpoints of this website. Wrote in TypeScript, so you can previsualize how the response will look like by checking the code.
132 lines (131 loc) • 3.92 kB
TypeScript
/**
* Login to CodinGame as a CodinGamer
*
* @param {string} email - Account Email
* @param {string} password - Account Password
*
*/
export declare const loginCodinGamer: (email: string, password: string) => Promise<ILoginCodinGamer>;
export interface ILoginCodinGamer {
codinGamer: codinGamer;
countryCode: string;
newFeatures: any[];
enabledNotifications: string[];
notificationConfig: notificationConfig;
activatedFeatures: string[];
actionTypes: actionTypes;
chatToken: string;
disqusSsoPayload: string;
gaveFeedbackOnCurrentCompany: boolean;
xpThresholds: xpThresholds[];
user: codinGameUser;
visitor: boolean;
admin: boolean;
languageId: number;
userId: number;
userEmail: string;
impersonated: boolean;
cookies: string;
}
declare type codinGamer = {
globalId: string;
userId: number;
email: string;
countryId: string;
publicHandle: string;
privateHandle: string;
formValues: {};
registerOrigin: string;
enable: boolean;
rank: number;
formCachedValues: {};
creationTime: number;
onlineSince: number;
hiddenFromFriendFinder: boolean;
shareAllSolutions: boolean;
level: number;
xp: number;
category: string;
privateUser: boolean;
createdCoursesCount: number;
alreadyAnsweredOptin: boolean;
};
declare type notificationConfig = {
soundEnabled: boolean;
nativeNotificationEnabled: boolean;
};
declare type actionTypes = {
deleteContribution: actionTypesData;
receiveCareerNotification: actionTypesData;
deleteComment: actionTypesData;
submitMultiContribution: actionTypesData;
sendPingEmailToAll: actionTypesData;
accessCoursesBeta: actionTypesData;
editAcceptedContribution: actionTypesData;
hideStream: actionTypesData;
updateAvatar: actionTypesData;
updateAllAvatar: actionTypesData;
accessDisabledLeaderboard: actionTypesData;
impersonate: actionTypesData;
editComment: actionTypesData;
editContribution: actionTypesData;
denyPuzzleConfirmation: actionTypesData;
sendPingEmailToOptinCodingamers: actionTypesData;
denyClashContribution: actionTypesData;
validateClashContribution: actionTypesData;
sendPrivateMessageToAll: actionTypesData;
denyContribution: actionTypesData;
editClashContribution: actionTypesData;
updateCover: actionTypesData;
editPuzzleContribution: actionTypesData;
sendPrivateMessageToOptinCodingamers: actionTypesData;
editAcceptedPuzzleContribution: actionTypesData;
updateCareerSettings: actionTypesData;
editAcceptedClashContribution: actionTypesData;
validateContribution: actionTypesData;
validatePuzzleContribution: actionTypesData;
banStreamer: actionTypesData;
updateAllCover: actionTypesData;
};
declare type actionTypesData = {
minCodinGamerCount: null | number;
authorPolicy: string;
};
declare type xpThresholds = {
level: number;
xpThreshold: number;
cumulativeXp: number;
rewardLanguages: rewardLanguages | null;
};
declare type rewardLanguages = {
"1": string;
"2": string;
};
declare type codinGameUser = {
id: number;
email: string;
languageId: number;
status: string;
properties: userProperties;
};
declare type userProperties = {
xpConfig: userXpConfig;
"privacySettings-codingame": userPrivacySettings;
abtesting: userAbtesting;
"cookiesBanner-codingame": userCookiesBanner;
};
declare type userXpConfig = {
lastTotalXp: number;
};
declare type userPrivacySettings = {
facebook: boolean;
analytics: boolean;
advertising: boolean;
};
declare type userAbtesting = {
"Quick AB 1": string;
};
declare type userCookiesBanner = {
seen: boolean;
};
export {};