Skip to content
This repository was archived by the owner on Mar 9, 2023. It is now read-only.

Commit 029242a

Browse files
committed
Merge remote-tracking branch 'origin/main' into extension
2 parents 341fd4c + d056d13 commit 029242a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+4471
-1734
lines changed

docs/spec/CodeCharacter-API.yml

Lines changed: 376 additions & 40 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,12 @@
4343
"react-flags-select": "^2.1.2",
4444
"react-google-recaptcha": "^2.1.0",
4545
"react-hot-toast": "^2.2.0",
46+
"react-paginate": "^8.1.0",
4647
"react-redux": "^7.2.6",
4748
"react-router-dom": "6",
4849
"react-step-progress-bar": "^1.0.3",
49-
"react-vertical-timeline-component": "^3.5.2"
50+
"react-vertical-timeline-component": "^3.5.2",
51+
"redux": "^4.1.2"
5052
},
5153
"devDependencies": {
5254
"@babel/core": "^7.16.5",
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.npmignore
22
package.json
33
README.md
4+
tsconfig.json

packages/client/.openapi-generator/FILES

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
.gitignore
2-
.npmignore
3-
package.json
42
src/apis/AuthApi.ts
53
src/apis/CodeApi.ts
64
src/apis/CurrentUserApi.ts
@@ -14,4 +12,3 @@ src/apis/index.ts
1412
src/index.ts
1513
src/models/index.ts
1614
src/runtime.ts
17-
tsconfig.json

packages/client/src/apis/MatchApi.ts

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import * as runtime from '../runtime';
1616
import { CreateMatchRequest, GenericError, Match } from '../models';
1717

1818
export interface CreateMatchOperationRequest {
19-
createMatchRequest?: CreateMatchRequest;
19+
createMatchRequest: CreateMatchRequest;
2020
}
2121

2222
/**
@@ -29,7 +29,7 @@ export interface MatchApiInterface {
2929
/**
3030
* Initiate a match by current user
3131
* @summary Create match
32-
* @param {CreateMatchRequest} [createMatchRequest]
32+
* @param {CreateMatchRequest} createMatchRequest
3333
* @param {*} [options] Override http request option.
3434
* @throws {RequiredError}
3535
* @memberof MatchApiInterface
@@ -44,7 +44,7 @@ export interface MatchApiInterface {
4444
* Create match
4545
*/
4646
createMatch(
47-
createMatchRequest?: CreateMatchRequest,
47+
createMatchRequest: CreateMatchRequest,
4848
initOverrides?: RequestInit,
4949
): Promise<void>;
5050

@@ -95,6 +95,16 @@ export class MatchApi extends runtime.BaseAPI implements MatchApiInterface {
9595
requestParameters: CreateMatchOperationRequest,
9696
initOverrides?: RequestInit,
9797
): Promise<runtime.ApiResponse<void>> {
98+
if (
99+
requestParameters.createMatchRequest === null ||
100+
requestParameters.createMatchRequest === undefined
101+
) {
102+
throw new runtime.RequiredError(
103+
'createMatchRequest',
104+
'Required parameter requestParameters.createMatchRequest was null or undefined when calling createMatch.',
105+
);
106+
}
107+
98108
const queryParameters: any = {};
99109

100110
const headerParameters: runtime.HTTPHeaders = {};
@@ -128,7 +138,7 @@ export class MatchApi extends runtime.BaseAPI implements MatchApiInterface {
128138
* Create match
129139
*/
130140
async createMatch(
131-
createMatchRequest?: CreateMatchRequest,
141+
createMatchRequest: CreateMatchRequest,
132142
initOverrides?: RequestInit,
133143
): Promise<void> {
134144
await this.createMatchRaw(

packages/client/src/apis/UserApi.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ import {
2121
} from '../models';
2222

2323
export interface ActivateUserOperationRequest {
24-
userId: number;
24+
userId: string;
2525
activateUserRequest: ActivateUserRequest;
2626
}
2727

2828
export interface GetRatingHistoryRequest {
29-
userId: number;
29+
userId: string;
3030
}
3131

3232
export interface RegisterRequest {
@@ -43,7 +43,7 @@ export interface UserApiInterface {
4343
/**
4444
* Activate user by using the token sent via email
4545
* @summary Activate user
46-
* @param {number} userId ID of the user
46+
* @param {string} userId ID of the user
4747
* @param {ActivateUserRequest} activateUserRequest
4848
* @param {*} [options] Override http request option.
4949
* @throws {RequiredError}
@@ -59,15 +59,15 @@ export interface UserApiInterface {
5959
* Activate user
6060
*/
6161
activateUser(
62-
userId: number,
62+
userId: string,
6363
activateUserRequest: ActivateUserRequest,
6464
initOverrides?: RequestInit,
6565
): Promise<void>;
6666

6767
/**
6868
* Get user rating history
6969
* @summary Get user rating history
70-
* @param {number} userId ID of the user
70+
* @param {string} userId ID of the user
7171
* @param {*} [options] Override http request option.
7272
* @throws {RequiredError}
7373
* @memberof UserApiInterface
@@ -82,7 +82,7 @@ export interface UserApiInterface {
8282
* Get user rating history
8383
*/
8484
getRatingHistory(
85-
userId: number,
85+
userId: string,
8686
initOverrides?: RequestInit,
8787
): Promise<Array<RatingHistory>>;
8888

@@ -169,7 +169,7 @@ export class UserApi extends runtime.BaseAPI implements UserApiInterface {
169169
* Activate user
170170
*/
171171
async activateUser(
172-
userId: number,
172+
userId: string,
173173
activateUserRequest: ActivateUserRequest,
174174
initOverrides?: RequestInit,
175175
): Promise<void> {
@@ -230,7 +230,7 @@ export class UserApi extends runtime.BaseAPI implements UserApiInterface {
230230
* Get user rating history
231231
*/
232232
async getRatingHistory(
233-
userId: number,
233+
userId: string,
234234
initOverrides?: RequestInit,
235235
): Promise<Array<RatingHistory>> {
236236
const response = await this.getRatingHistoryRaw(

packages/client/src/models/index.ts

Lines changed: 37 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ export interface CodeRevision {
5656
* @memberof CodeRevision
5757
*/
5858
code: string;
59+
/**
60+
*
61+
* @type {string}
62+
* @memberof CodeRevision
63+
*/
64+
message: string;
5965
/**
6066
*
6167
* @type {string}
@@ -87,6 +93,12 @@ export interface CreateCodeRevisionRequest {
8793
* @memberof CreateCodeRevisionRequest
8894
*/
8995
code: string;
96+
/**
97+
*
98+
* @type {string}
99+
* @memberof CreateCodeRevisionRequest
100+
*/
101+
message: string;
90102
/**
91103
*
92104
* @type {Language}
@@ -106,6 +118,12 @@ export interface CreateMapRevisionRequest {
106118
* @memberof CreateMapRevisionRequest
107119
*/
108120
map: string;
121+
/**
122+
*
123+
* @type {string}
124+
* @memberof CreateMapRevisionRequest
125+
*/
126+
message: string;
109127
}
110128
/**
111129
* Create match request
@@ -146,10 +164,10 @@ export interface CreateMatchRequest {
146164
export interface CurrentUserProfile {
147165
/**
148166
*
149-
* @type {number}
167+
* @type {string}
150168
* @memberof CurrentUserProfile
151169
*/
152-
id: number;
170+
id: string;
153171
/**
154172
*
155173
* @type {string}
@@ -180,12 +198,6 @@ export interface CurrentUserProfile {
180198
* @memberof CurrentUserProfile
181199
*/
182200
college: string;
183-
/**
184-
*
185-
* @type {number}
186-
* @memberof CurrentUserProfile
187-
*/
188-
currentLevel: number;
189201
/**
190202
*
191203
* @type {boolean}
@@ -240,24 +252,18 @@ export interface Game {
240252
* @memberof Game
241253
*/
242254
id: string;
243-
/**
244-
*
245-
* @type {string}
246-
* @memberof Game
247-
*/
248-
map?: string;
249255
/**
250256
*
251257
* @type {number}
252258
* @memberof Game
253259
*/
254-
points1: number;
260+
destruction: number;
255261
/**
256262
*
257263
* @type {number}
258264
* @memberof Game
259265
*/
260-
points2: number;
266+
coinsUsed: number;
261267
/**
262268
*
263269
* @type {GameStatus}
@@ -313,7 +319,19 @@ export interface GameMapRevision {
313319
* @type {string}
314320
* @memberof GameMapRevision
315321
*/
316-
parentRevision: string;
322+
parentRevision?: string;
323+
/**
324+
*
325+
* @type {Date}
326+
* @memberof GameMapRevision
327+
*/
328+
createdAt: Date;
329+
/**
330+
*
331+
* @type {string}
332+
* @memberof GameMapRevision
333+
*/
334+
message: string;
317335
}
318336
/**
319337
*
@@ -505,10 +523,10 @@ export interface PasswordLoginResponse {
505523
export interface PublicUser {
506524
/**
507525
*
508-
* @type {number}
526+
* @type {string}
509527
* @memberof PublicUser
510528
*/
511-
userId: number;
529+
userId: string;
512530
/**
513531
*
514532
* @type {string}
@@ -751,12 +769,6 @@ export interface UpdatePasswordRequest {
751769
* @interface UserStats
752770
*/
753771
export interface UserStats {
754-
/**
755-
*
756-
* @type {number}
757-
* @memberof UserStats
758-
*/
759-
currentLevel: number;
760772
/**
761773
*
762774
* @type {number}

src/assets/fakeprofile.png

3.57 KB
Loading

src/assets/trophy.png

51 KB
Loading

src/components/Auth/Auth/Alert/Alert.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { Alert } from 'react-bootstrap';
22
import styles from './alert.module.css';
3-
import 'bootstrap/dist/css/bootstrap.min.css';
43

54
interface alert {
65
err?: boolean;

0 commit comments

Comments
 (0)