@xcpcio/types 0.45.1 → 0.46.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +39 -3
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
- package/src/index.ts +2 -0
- package/src/person.ts +5 -0
- package/src/rating.ts +41 -0
package/dist/index.cjs
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const VERSION = "0.
|
|
5
|
+
const VERSION = "0.46.1";
|
|
6
6
|
const GITHUB_URL = "https://github.com/xcpcio/xcpcio";
|
|
7
|
-
const GITHUB_SHA = "
|
|
7
|
+
const GITHUB_SHA = "07b4378eff";
|
|
8
8
|
|
|
9
9
|
var ContestState = /* @__PURE__ */ ((ContestState2) => {
|
|
10
10
|
ContestState2["PENDING"] = "PENDING";
|
package/dist/index.d.ts
CHANGED
|
@@ -87,9 +87,9 @@ interface StatusTimeDisplay {
|
|
|
87
87
|
}
|
|
88
88
|
type TimeUnit = "second" | "millisecond" | "microsecond" | "nanosecond";
|
|
89
89
|
|
|
90
|
-
declare const VERSION = "0.
|
|
90
|
+
declare const VERSION = "0.46.1";
|
|
91
91
|
declare const GITHUB_URL = "https://github.com/xcpcio/xcpcio";
|
|
92
|
-
declare const GITHUB_SHA = "
|
|
92
|
+
declare const GITHUB_SHA = "07b4378eff";
|
|
93
93
|
|
|
94
94
|
interface ContestIndexConfig {
|
|
95
95
|
contest_name: string;
|
|
@@ -153,6 +153,42 @@ interface Contest {
|
|
|
153
153
|
|
|
154
154
|
type Lang = "en" | "zh-CN";
|
|
155
155
|
|
|
156
|
+
interface IPerson {
|
|
157
|
+
name: string;
|
|
158
|
+
}
|
|
159
|
+
type IPersons = Array<IPerson>;
|
|
160
|
+
|
|
161
|
+
interface IRatingHistory {
|
|
162
|
+
rank: number;
|
|
163
|
+
rating: number;
|
|
164
|
+
teamName: string;
|
|
165
|
+
organization: string;
|
|
166
|
+
members: IPersons;
|
|
167
|
+
coaches: IPersons;
|
|
168
|
+
contestID: string;
|
|
169
|
+
contestName: string;
|
|
170
|
+
contestLink: string;
|
|
171
|
+
contestTime: Date;
|
|
172
|
+
}
|
|
173
|
+
interface IRatingUser {
|
|
174
|
+
id: string;
|
|
175
|
+
name: string;
|
|
176
|
+
organization: string;
|
|
177
|
+
members: IPersons;
|
|
178
|
+
coaches: IPersons;
|
|
179
|
+
rating: number;
|
|
180
|
+
minRating: number;
|
|
181
|
+
maxRating: number;
|
|
182
|
+
ratingHistories: IRatingHistory[];
|
|
183
|
+
}
|
|
184
|
+
interface IRating {
|
|
185
|
+
id: string;
|
|
186
|
+
name: string;
|
|
187
|
+
baseRating: number;
|
|
188
|
+
contestIDs: string[];
|
|
189
|
+
users: IRatingUser[];
|
|
190
|
+
}
|
|
191
|
+
|
|
156
192
|
declare enum SubmissionStatus {
|
|
157
193
|
PENDING = "PENDING",
|
|
158
194
|
WAITING = "WAITING",
|
|
@@ -225,4 +261,4 @@ interface Team {
|
|
|
225
261
|
}
|
|
226
262
|
type Teams = Array<Team> | Record<string, Team>;
|
|
227
263
|
|
|
228
|
-
export { BalloonColor, BannerMode, Base64, CalculationOfPenalty, Color, ColorHEX, ColorRGB, ColorRGBA, Contest, ContestIndex, ContestIndexConfig, ContestOptions, ContestState, Contributor, DateTimeISO8601String, GITHUB_SHA, GITHUB_URL, I18NStringSet, Image, Lang, Link, LinkString, MedalPreset, Problem, Problems, StatusTimeDisplay, Style, Submission, SubmissionStatus, SubmissionStatusToSimpleString, SubmissionStatusToString, Submissions, Team, Teams, Text, ThemeColor, TimeUnit, VERSION };
|
|
264
|
+
export { BalloonColor, BannerMode, Base64, CalculationOfPenalty, Color, ColorHEX, ColorRGB, ColorRGBA, Contest, ContestIndex, ContestIndexConfig, ContestOptions, ContestState, Contributor, DateTimeISO8601String, GITHUB_SHA, GITHUB_URL, I18NStringSet, IPerson, IPersons, IRating, IRatingHistory, IRatingUser, Image, Lang, Link, LinkString, MedalPreset, Problem, Problems, StatusTimeDisplay, Style, Submission, SubmissionStatus, SubmissionStatusToSimpleString, SubmissionStatusToString, Submissions, Team, Teams, Text, ThemeColor, TimeUnit, VERSION };
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const VERSION = "0.
|
|
1
|
+
const VERSION = "0.46.1";
|
|
2
2
|
const GITHUB_URL = "https://github.com/xcpcio/xcpcio";
|
|
3
|
-
const GITHUB_SHA = "
|
|
3
|
+
const GITHUB_SHA = "07b4378eff";
|
|
4
4
|
|
|
5
5
|
var ContestState = /* @__PURE__ */ ((ContestState2) => {
|
|
6
6
|
ContestState2["PENDING"] = "PENDING";
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -3,7 +3,9 @@ export * from "./constant";
|
|
|
3
3
|
export * from "./contest-index";
|
|
4
4
|
export * from "./contest";
|
|
5
5
|
export * from "./lang";
|
|
6
|
+
export * from "./person";
|
|
6
7
|
export * from "./problem";
|
|
8
|
+
export * from "./rating";
|
|
7
9
|
export * from "./submission-status";
|
|
8
10
|
export * from "./submission";
|
|
9
11
|
export * from "./team";
|
package/src/person.ts
ADDED
package/src/rating.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { IPersons } from "./person";
|
|
2
|
+
|
|
3
|
+
export interface IRatingHistory {
|
|
4
|
+
rank: number;
|
|
5
|
+
rating: number;
|
|
6
|
+
|
|
7
|
+
teamName: string;
|
|
8
|
+
organization: string;
|
|
9
|
+
|
|
10
|
+
members: IPersons;
|
|
11
|
+
coaches: IPersons;
|
|
12
|
+
|
|
13
|
+
contestID: string;
|
|
14
|
+
contestName: string;
|
|
15
|
+
contestLink: string;
|
|
16
|
+
contestTime: Date;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface IRatingUser {
|
|
20
|
+
id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
organization: string;
|
|
23
|
+
|
|
24
|
+
members: IPersons;
|
|
25
|
+
coaches: IPersons;
|
|
26
|
+
|
|
27
|
+
rating: number;
|
|
28
|
+
minRating: number;
|
|
29
|
+
maxRating: number;
|
|
30
|
+
|
|
31
|
+
ratingHistories: IRatingHistory[];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface IRating {
|
|
35
|
+
id: string;
|
|
36
|
+
name: string;
|
|
37
|
+
baseRating: number;
|
|
38
|
+
|
|
39
|
+
contestIDs: string[];
|
|
40
|
+
users: IRatingUser[];
|
|
41
|
+
}
|