@xcpcio/types 0.52.0 → 0.53.0
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 -4
- package/dist/index.d.cts +274 -0
- package/dist/index.d.mts +274 -0
- package/dist/index.d.ts +15 -15
- package/dist/index.mjs +2 -2
- package/package.json +17 -17
- package/src/contest.ts +2 -2
- package/src/index.ts +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const VERSION = "0.52.0";
|
|
3
|
+
const VERSION = "0.53.0";
|
|
6
4
|
const GITHUB_URL = "https://github.com/xcpcio/xcpcio";
|
|
7
|
-
const GITHUB_SHA = "
|
|
5
|
+
const GITHUB_SHA = "c3526b5e37";
|
|
8
6
|
const XCPCIO_HOME = "https://xcpcio.com";
|
|
9
7
|
|
|
10
8
|
var ContestState = /* @__PURE__ */ ((ContestState2) => {
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ISO8601 String.
|
|
3
|
+
* @example
|
|
4
|
+
* '2019-01-01T00:00:00Z'
|
|
5
|
+
* '2019-01-01T08:00:00+08:00'
|
|
6
|
+
* '2019-01-01T00:00:00.000Z'
|
|
7
|
+
*/
|
|
8
|
+
type DateTimeISO8601String = string;
|
|
9
|
+
/**
|
|
10
|
+
* Color HEX.
|
|
11
|
+
* @example
|
|
12
|
+
* '#FFFFFF'
|
|
13
|
+
*/
|
|
14
|
+
type ColorHEX = string;
|
|
15
|
+
/**
|
|
16
|
+
* Color RGB.
|
|
17
|
+
* @example
|
|
18
|
+
* 'rgb(255, 255, 255)'
|
|
19
|
+
*/
|
|
20
|
+
type ColorRGB = string;
|
|
21
|
+
/**
|
|
22
|
+
* Color RGBA.
|
|
23
|
+
* @example
|
|
24
|
+
* 'rgba(255, 255, 255, 0.75)'
|
|
25
|
+
*/
|
|
26
|
+
type ColorRGBA = string;
|
|
27
|
+
/** General color format. */
|
|
28
|
+
type Color = ColorHEX | ColorRGB | ColorRGBA;
|
|
29
|
+
type ThemeColor = Color | {
|
|
30
|
+
light: Color;
|
|
31
|
+
dark: Color;
|
|
32
|
+
};
|
|
33
|
+
interface Style {
|
|
34
|
+
/**
|
|
35
|
+
* Text color.
|
|
36
|
+
* @defaultValue Determined by renderer.
|
|
37
|
+
*/
|
|
38
|
+
text_color?: ThemeColor;
|
|
39
|
+
/**
|
|
40
|
+
* Background color.
|
|
41
|
+
* @defaultValue Determined by renderer.
|
|
42
|
+
*/
|
|
43
|
+
background_color?: ThemeColor;
|
|
44
|
+
}
|
|
45
|
+
interface BalloonColor {
|
|
46
|
+
color: Color;
|
|
47
|
+
background_color: Color;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* i18n string set.
|
|
51
|
+
* @example
|
|
52
|
+
* { "en-US": 'English', "zh-CN": '中文', fallback: 'English' }
|
|
53
|
+
*/
|
|
54
|
+
interface I18NStringSet {
|
|
55
|
+
/** The fallback string if renderer cannot determine the language to use. */
|
|
56
|
+
fallback: string;
|
|
57
|
+
/** The key is the IETF BCP 47 language tag, and the value is the string for this language tag. */
|
|
58
|
+
[key: string]: string;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Text (i18n supported).
|
|
62
|
+
*/
|
|
63
|
+
type Text = string | I18NStringSet;
|
|
64
|
+
/**
|
|
65
|
+
* Contributor field. The email and url are optional.
|
|
66
|
+
* @example
|
|
67
|
+
* 'bLue <mail@example.com> (https://example.com/)'
|
|
68
|
+
*/
|
|
69
|
+
type Contributor = string;
|
|
70
|
+
type Base64 = string;
|
|
71
|
+
type LinkString = string;
|
|
72
|
+
interface Link {
|
|
73
|
+
link: LinkString;
|
|
74
|
+
title?: string;
|
|
75
|
+
}
|
|
76
|
+
interface Image {
|
|
77
|
+
url?: string;
|
|
78
|
+
base64?: Base64;
|
|
79
|
+
type?: "png" | "svg" | "jpg" | "jpeg";
|
|
80
|
+
preset?: string;
|
|
81
|
+
[key: string]: string | undefined;
|
|
82
|
+
}
|
|
83
|
+
interface StatusTimeDisplay {
|
|
84
|
+
correct: boolean;
|
|
85
|
+
incorrect: boolean;
|
|
86
|
+
pending: boolean;
|
|
87
|
+
}
|
|
88
|
+
type TimeUnit = "second" | "millisecond" | "microsecond" | "nanosecond";
|
|
89
|
+
|
|
90
|
+
declare const VERSION = "0.53.0";
|
|
91
|
+
declare const GITHUB_URL = "https://github.com/xcpcio/xcpcio";
|
|
92
|
+
declare const GITHUB_SHA = "c3526b5e37";
|
|
93
|
+
declare const XCPCIO_HOME = "https://xcpcio.com";
|
|
94
|
+
|
|
95
|
+
interface Problem {
|
|
96
|
+
id: string;
|
|
97
|
+
label: string;
|
|
98
|
+
name?: string;
|
|
99
|
+
time_limit?: string;
|
|
100
|
+
memory_limit?: string;
|
|
101
|
+
balloon_color?: BalloonColor;
|
|
102
|
+
}
|
|
103
|
+
type Problems = Array<Problem>;
|
|
104
|
+
|
|
105
|
+
declare enum ContestState {
|
|
106
|
+
PENDING = "PENDING",
|
|
107
|
+
RUNNING = "RUNNING",
|
|
108
|
+
FROZEN = "FROZEN",
|
|
109
|
+
FINISHED = "FINISHED",
|
|
110
|
+
PAUSED = "PAUSED"
|
|
111
|
+
}
|
|
112
|
+
type CalculationOfPenalty = "in_minutes" | "in_seconds" | "accumulate_in_seconds_and_finally_to_the_minute";
|
|
113
|
+
interface ContestOptions {
|
|
114
|
+
calculation_of_penalty?: CalculationOfPenalty;
|
|
115
|
+
submission_timestamp_unit?: TimeUnit;
|
|
116
|
+
submission_has_reaction?: boolean;
|
|
117
|
+
}
|
|
118
|
+
type MedalPreset = "ccpc" | "icpc";
|
|
119
|
+
type BannerMode = "ONLY_BANNER" | "ALL";
|
|
120
|
+
interface Contest {
|
|
121
|
+
contest_name: string;
|
|
122
|
+
start_time: number | DateTimeISO8601String;
|
|
123
|
+
end_time: number | DateTimeISO8601String;
|
|
124
|
+
freeze_time?: number | DateTimeISO8601String;
|
|
125
|
+
frozen_time?: number;
|
|
126
|
+
penalty: number;
|
|
127
|
+
problems?: Array<Problem>;
|
|
128
|
+
problem_id?: Array<string>;
|
|
129
|
+
organization?: string;
|
|
130
|
+
status_time_display?: Record<string, boolean>;
|
|
131
|
+
badge?: string;
|
|
132
|
+
medal?: Record<string, Record<string, number>> | MedalPreset;
|
|
133
|
+
balloon_color?: Array<BalloonColor>;
|
|
134
|
+
group?: Record<string, string>;
|
|
135
|
+
tag?: Record<string, string>;
|
|
136
|
+
logo?: Image;
|
|
137
|
+
banner?: Image;
|
|
138
|
+
banner_mode?: BannerMode;
|
|
139
|
+
board_link?: string;
|
|
140
|
+
version?: string;
|
|
141
|
+
options?: ContestOptions;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
interface ContestIndexConfig {
|
|
145
|
+
contest_name: string;
|
|
146
|
+
start_time: number;
|
|
147
|
+
end_time: number;
|
|
148
|
+
frozen_time: number;
|
|
149
|
+
logo: Image;
|
|
150
|
+
}
|
|
151
|
+
interface ContestIndex {
|
|
152
|
+
config: ContestIndexConfig;
|
|
153
|
+
board_link: string;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
type Lang = "en" | "zh-CN";
|
|
157
|
+
|
|
158
|
+
interface IPerson {
|
|
159
|
+
name: string;
|
|
160
|
+
}
|
|
161
|
+
type IPersons = Array<IPerson>;
|
|
162
|
+
|
|
163
|
+
interface IRatingIndex {
|
|
164
|
+
id: string;
|
|
165
|
+
name: string;
|
|
166
|
+
}
|
|
167
|
+
interface IRatingHistory {
|
|
168
|
+
rank: number;
|
|
169
|
+
rating: number;
|
|
170
|
+
teamName: string;
|
|
171
|
+
organization: string;
|
|
172
|
+
members: IPersons;
|
|
173
|
+
coaches: IPersons;
|
|
174
|
+
contestID: string;
|
|
175
|
+
contestName: string;
|
|
176
|
+
contestLink: string;
|
|
177
|
+
contestTime: Date;
|
|
178
|
+
}
|
|
179
|
+
interface IRatingUser {
|
|
180
|
+
id: string;
|
|
181
|
+
name: string;
|
|
182
|
+
organization: string;
|
|
183
|
+
members: IPersons;
|
|
184
|
+
coaches: IPersons;
|
|
185
|
+
rating: number;
|
|
186
|
+
minRating: number;
|
|
187
|
+
maxRating: number;
|
|
188
|
+
ratingHistories: IRatingHistory[];
|
|
189
|
+
}
|
|
190
|
+
interface IRating {
|
|
191
|
+
id: string;
|
|
192
|
+
name: string;
|
|
193
|
+
baseRating: number;
|
|
194
|
+
contestIDs: string[];
|
|
195
|
+
users: IRatingUser[];
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
declare enum SubmissionStatus {
|
|
199
|
+
PENDING = "PENDING",
|
|
200
|
+
WAITING = "WAITING",
|
|
201
|
+
PREPARING = "PREPARING",
|
|
202
|
+
COMPILING = "COMPILING",
|
|
203
|
+
RUNNING = "RUNNING",
|
|
204
|
+
JUDGING = "JUDGING",
|
|
205
|
+
FROZEN = "FROZEN",
|
|
206
|
+
ACCEPTED = "ACCEPTED",
|
|
207
|
+
CORRECT = "CORRECT",
|
|
208
|
+
PARTIALLY_CORRECT = "PARTIALLY_CORRECT",
|
|
209
|
+
REJECTED = "REJECTED",
|
|
210
|
+
WRONG_ANSWER = "WRONG_ANSWER",
|
|
211
|
+
NO_OUTPUT = "NO_OUTPUT",
|
|
212
|
+
COMPILATION_ERROR = "COMPILATION_ERROR",
|
|
213
|
+
PRESENTATION_ERROR = "PRESENTATION_ERROR",
|
|
214
|
+
RUNTIME_ERROR = "RUNTIME_ERROR",
|
|
215
|
+
TIME_LIMIT_EXCEEDED = "TIME_LIMIT_EXCEEDED",
|
|
216
|
+
MEMORY_LIMIT_EXCEEDED = "MEMORY_LIMIT_EXCEEDED",
|
|
217
|
+
OUTPUT_LIMIT_EXCEEDED = "OUTPUT_LIMIT_EXCEEDED",
|
|
218
|
+
IDLENESS_LIMIT_EXCEEDED = "IDLENESS_LIMIT_EXCEEDED",
|
|
219
|
+
HACKED = "HACKED",
|
|
220
|
+
JUDGEMENT_FAILED = "JUDGEMENT_FAILED",
|
|
221
|
+
CONFIGURATION_ERROR = "CONFIGURATION_ERROR",
|
|
222
|
+
FILE_ERROR = "FILE_ERROR",
|
|
223
|
+
SYSTEM_ERROR = "SYSTEM_ERROR",
|
|
224
|
+
CANCELED = "CANCELED",
|
|
225
|
+
SKIPPED = "SKIPPED",
|
|
226
|
+
SECURITY_VIOLATED = "SECURITY_VIOLATED",
|
|
227
|
+
DENIAL_OF_JUDGEMENT = "DENIAL_OF_JUDGEMENT",
|
|
228
|
+
UNKNOWN = "UNKNOWN",
|
|
229
|
+
UNDEFINED = "UNDEFINED"
|
|
230
|
+
}
|
|
231
|
+
declare const SubmissionStatusToString: {
|
|
232
|
+
[key in SubmissionStatus]: string;
|
|
233
|
+
};
|
|
234
|
+
declare const SubmissionStatusToSimpleString: {
|
|
235
|
+
[key in SubmissionStatus]: string;
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
interface SubmissionReaction {
|
|
239
|
+
url: string;
|
|
240
|
+
}
|
|
241
|
+
interface Submission {
|
|
242
|
+
id?: string;
|
|
243
|
+
submission_id?: string;
|
|
244
|
+
team_id: string;
|
|
245
|
+
problem_id: number | string;
|
|
246
|
+
timestamp: number;
|
|
247
|
+
status: SubmissionStatus | string;
|
|
248
|
+
time?: number;
|
|
249
|
+
language?: string;
|
|
250
|
+
is_ignore?: boolean;
|
|
251
|
+
reaction?: SubmissionReaction;
|
|
252
|
+
}
|
|
253
|
+
type Submissions = Array<Submission> | Record<string, Submission>;
|
|
254
|
+
|
|
255
|
+
interface Team {
|
|
256
|
+
id?: string;
|
|
257
|
+
team_id?: string;
|
|
258
|
+
name?: string;
|
|
259
|
+
team_name?: string;
|
|
260
|
+
organization?: string;
|
|
261
|
+
group?: Array<string>;
|
|
262
|
+
tag?: Array<string>;
|
|
263
|
+
coach?: string | Array<string>;
|
|
264
|
+
members?: string | Array<string>;
|
|
265
|
+
official?: boolean;
|
|
266
|
+
unofficial?: boolean;
|
|
267
|
+
girl?: boolean;
|
|
268
|
+
badge?: Image;
|
|
269
|
+
location?: string;
|
|
270
|
+
icpc_id?: string;
|
|
271
|
+
}
|
|
272
|
+
type Teams = Array<Team> | Record<string, Team>;
|
|
273
|
+
|
|
274
|
+
export { type BalloonColor, type BannerMode, type Base64, type CalculationOfPenalty, type Color, type ColorHEX, type ColorRGB, type ColorRGBA, type Contest, type ContestIndex, type ContestIndexConfig, type ContestOptions, ContestState, type Contributor, type DateTimeISO8601String, GITHUB_SHA, GITHUB_URL, type I18NStringSet, type IPerson, type IPersons, type IRating, type IRatingHistory, type IRatingIndex, type IRatingUser, type Image, type Lang, type Link, type LinkString, type MedalPreset, type Problem, type Problems, type StatusTimeDisplay, type Style, type Submission, type SubmissionReaction, SubmissionStatus, SubmissionStatusToSimpleString, SubmissionStatusToString, type Submissions, type Team, type Teams, type Text, type ThemeColor, type TimeUnit, VERSION, XCPCIO_HOME };
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ISO8601 String.
|
|
3
|
+
* @example
|
|
4
|
+
* '2019-01-01T00:00:00Z'
|
|
5
|
+
* '2019-01-01T08:00:00+08:00'
|
|
6
|
+
* '2019-01-01T00:00:00.000Z'
|
|
7
|
+
*/
|
|
8
|
+
type DateTimeISO8601String = string;
|
|
9
|
+
/**
|
|
10
|
+
* Color HEX.
|
|
11
|
+
* @example
|
|
12
|
+
* '#FFFFFF'
|
|
13
|
+
*/
|
|
14
|
+
type ColorHEX = string;
|
|
15
|
+
/**
|
|
16
|
+
* Color RGB.
|
|
17
|
+
* @example
|
|
18
|
+
* 'rgb(255, 255, 255)'
|
|
19
|
+
*/
|
|
20
|
+
type ColorRGB = string;
|
|
21
|
+
/**
|
|
22
|
+
* Color RGBA.
|
|
23
|
+
* @example
|
|
24
|
+
* 'rgba(255, 255, 255, 0.75)'
|
|
25
|
+
*/
|
|
26
|
+
type ColorRGBA = string;
|
|
27
|
+
/** General color format. */
|
|
28
|
+
type Color = ColorHEX | ColorRGB | ColorRGBA;
|
|
29
|
+
type ThemeColor = Color | {
|
|
30
|
+
light: Color;
|
|
31
|
+
dark: Color;
|
|
32
|
+
};
|
|
33
|
+
interface Style {
|
|
34
|
+
/**
|
|
35
|
+
* Text color.
|
|
36
|
+
* @defaultValue Determined by renderer.
|
|
37
|
+
*/
|
|
38
|
+
text_color?: ThemeColor;
|
|
39
|
+
/**
|
|
40
|
+
* Background color.
|
|
41
|
+
* @defaultValue Determined by renderer.
|
|
42
|
+
*/
|
|
43
|
+
background_color?: ThemeColor;
|
|
44
|
+
}
|
|
45
|
+
interface BalloonColor {
|
|
46
|
+
color: Color;
|
|
47
|
+
background_color: Color;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* i18n string set.
|
|
51
|
+
* @example
|
|
52
|
+
* { "en-US": 'English', "zh-CN": '中文', fallback: 'English' }
|
|
53
|
+
*/
|
|
54
|
+
interface I18NStringSet {
|
|
55
|
+
/** The fallback string if renderer cannot determine the language to use. */
|
|
56
|
+
fallback: string;
|
|
57
|
+
/** The key is the IETF BCP 47 language tag, and the value is the string for this language tag. */
|
|
58
|
+
[key: string]: string;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Text (i18n supported).
|
|
62
|
+
*/
|
|
63
|
+
type Text = string | I18NStringSet;
|
|
64
|
+
/**
|
|
65
|
+
* Contributor field. The email and url are optional.
|
|
66
|
+
* @example
|
|
67
|
+
* 'bLue <mail@example.com> (https://example.com/)'
|
|
68
|
+
*/
|
|
69
|
+
type Contributor = string;
|
|
70
|
+
type Base64 = string;
|
|
71
|
+
type LinkString = string;
|
|
72
|
+
interface Link {
|
|
73
|
+
link: LinkString;
|
|
74
|
+
title?: string;
|
|
75
|
+
}
|
|
76
|
+
interface Image {
|
|
77
|
+
url?: string;
|
|
78
|
+
base64?: Base64;
|
|
79
|
+
type?: "png" | "svg" | "jpg" | "jpeg";
|
|
80
|
+
preset?: string;
|
|
81
|
+
[key: string]: string | undefined;
|
|
82
|
+
}
|
|
83
|
+
interface StatusTimeDisplay {
|
|
84
|
+
correct: boolean;
|
|
85
|
+
incorrect: boolean;
|
|
86
|
+
pending: boolean;
|
|
87
|
+
}
|
|
88
|
+
type TimeUnit = "second" | "millisecond" | "microsecond" | "nanosecond";
|
|
89
|
+
|
|
90
|
+
declare const VERSION = "0.53.0";
|
|
91
|
+
declare const GITHUB_URL = "https://github.com/xcpcio/xcpcio";
|
|
92
|
+
declare const GITHUB_SHA = "c3526b5e37";
|
|
93
|
+
declare const XCPCIO_HOME = "https://xcpcio.com";
|
|
94
|
+
|
|
95
|
+
interface Problem {
|
|
96
|
+
id: string;
|
|
97
|
+
label: string;
|
|
98
|
+
name?: string;
|
|
99
|
+
time_limit?: string;
|
|
100
|
+
memory_limit?: string;
|
|
101
|
+
balloon_color?: BalloonColor;
|
|
102
|
+
}
|
|
103
|
+
type Problems = Array<Problem>;
|
|
104
|
+
|
|
105
|
+
declare enum ContestState {
|
|
106
|
+
PENDING = "PENDING",
|
|
107
|
+
RUNNING = "RUNNING",
|
|
108
|
+
FROZEN = "FROZEN",
|
|
109
|
+
FINISHED = "FINISHED",
|
|
110
|
+
PAUSED = "PAUSED"
|
|
111
|
+
}
|
|
112
|
+
type CalculationOfPenalty = "in_minutes" | "in_seconds" | "accumulate_in_seconds_and_finally_to_the_minute";
|
|
113
|
+
interface ContestOptions {
|
|
114
|
+
calculation_of_penalty?: CalculationOfPenalty;
|
|
115
|
+
submission_timestamp_unit?: TimeUnit;
|
|
116
|
+
submission_has_reaction?: boolean;
|
|
117
|
+
}
|
|
118
|
+
type MedalPreset = "ccpc" | "icpc";
|
|
119
|
+
type BannerMode = "ONLY_BANNER" | "ALL";
|
|
120
|
+
interface Contest {
|
|
121
|
+
contest_name: string;
|
|
122
|
+
start_time: number | DateTimeISO8601String;
|
|
123
|
+
end_time: number | DateTimeISO8601String;
|
|
124
|
+
freeze_time?: number | DateTimeISO8601String;
|
|
125
|
+
frozen_time?: number;
|
|
126
|
+
penalty: number;
|
|
127
|
+
problems?: Array<Problem>;
|
|
128
|
+
problem_id?: Array<string>;
|
|
129
|
+
organization?: string;
|
|
130
|
+
status_time_display?: Record<string, boolean>;
|
|
131
|
+
badge?: string;
|
|
132
|
+
medal?: Record<string, Record<string, number>> | MedalPreset;
|
|
133
|
+
balloon_color?: Array<BalloonColor>;
|
|
134
|
+
group?: Record<string, string>;
|
|
135
|
+
tag?: Record<string, string>;
|
|
136
|
+
logo?: Image;
|
|
137
|
+
banner?: Image;
|
|
138
|
+
banner_mode?: BannerMode;
|
|
139
|
+
board_link?: string;
|
|
140
|
+
version?: string;
|
|
141
|
+
options?: ContestOptions;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
interface ContestIndexConfig {
|
|
145
|
+
contest_name: string;
|
|
146
|
+
start_time: number;
|
|
147
|
+
end_time: number;
|
|
148
|
+
frozen_time: number;
|
|
149
|
+
logo: Image;
|
|
150
|
+
}
|
|
151
|
+
interface ContestIndex {
|
|
152
|
+
config: ContestIndexConfig;
|
|
153
|
+
board_link: string;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
type Lang = "en" | "zh-CN";
|
|
157
|
+
|
|
158
|
+
interface IPerson {
|
|
159
|
+
name: string;
|
|
160
|
+
}
|
|
161
|
+
type IPersons = Array<IPerson>;
|
|
162
|
+
|
|
163
|
+
interface IRatingIndex {
|
|
164
|
+
id: string;
|
|
165
|
+
name: string;
|
|
166
|
+
}
|
|
167
|
+
interface IRatingHistory {
|
|
168
|
+
rank: number;
|
|
169
|
+
rating: number;
|
|
170
|
+
teamName: string;
|
|
171
|
+
organization: string;
|
|
172
|
+
members: IPersons;
|
|
173
|
+
coaches: IPersons;
|
|
174
|
+
contestID: string;
|
|
175
|
+
contestName: string;
|
|
176
|
+
contestLink: string;
|
|
177
|
+
contestTime: Date;
|
|
178
|
+
}
|
|
179
|
+
interface IRatingUser {
|
|
180
|
+
id: string;
|
|
181
|
+
name: string;
|
|
182
|
+
organization: string;
|
|
183
|
+
members: IPersons;
|
|
184
|
+
coaches: IPersons;
|
|
185
|
+
rating: number;
|
|
186
|
+
minRating: number;
|
|
187
|
+
maxRating: number;
|
|
188
|
+
ratingHistories: IRatingHistory[];
|
|
189
|
+
}
|
|
190
|
+
interface IRating {
|
|
191
|
+
id: string;
|
|
192
|
+
name: string;
|
|
193
|
+
baseRating: number;
|
|
194
|
+
contestIDs: string[];
|
|
195
|
+
users: IRatingUser[];
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
declare enum SubmissionStatus {
|
|
199
|
+
PENDING = "PENDING",
|
|
200
|
+
WAITING = "WAITING",
|
|
201
|
+
PREPARING = "PREPARING",
|
|
202
|
+
COMPILING = "COMPILING",
|
|
203
|
+
RUNNING = "RUNNING",
|
|
204
|
+
JUDGING = "JUDGING",
|
|
205
|
+
FROZEN = "FROZEN",
|
|
206
|
+
ACCEPTED = "ACCEPTED",
|
|
207
|
+
CORRECT = "CORRECT",
|
|
208
|
+
PARTIALLY_CORRECT = "PARTIALLY_CORRECT",
|
|
209
|
+
REJECTED = "REJECTED",
|
|
210
|
+
WRONG_ANSWER = "WRONG_ANSWER",
|
|
211
|
+
NO_OUTPUT = "NO_OUTPUT",
|
|
212
|
+
COMPILATION_ERROR = "COMPILATION_ERROR",
|
|
213
|
+
PRESENTATION_ERROR = "PRESENTATION_ERROR",
|
|
214
|
+
RUNTIME_ERROR = "RUNTIME_ERROR",
|
|
215
|
+
TIME_LIMIT_EXCEEDED = "TIME_LIMIT_EXCEEDED",
|
|
216
|
+
MEMORY_LIMIT_EXCEEDED = "MEMORY_LIMIT_EXCEEDED",
|
|
217
|
+
OUTPUT_LIMIT_EXCEEDED = "OUTPUT_LIMIT_EXCEEDED",
|
|
218
|
+
IDLENESS_LIMIT_EXCEEDED = "IDLENESS_LIMIT_EXCEEDED",
|
|
219
|
+
HACKED = "HACKED",
|
|
220
|
+
JUDGEMENT_FAILED = "JUDGEMENT_FAILED",
|
|
221
|
+
CONFIGURATION_ERROR = "CONFIGURATION_ERROR",
|
|
222
|
+
FILE_ERROR = "FILE_ERROR",
|
|
223
|
+
SYSTEM_ERROR = "SYSTEM_ERROR",
|
|
224
|
+
CANCELED = "CANCELED",
|
|
225
|
+
SKIPPED = "SKIPPED",
|
|
226
|
+
SECURITY_VIOLATED = "SECURITY_VIOLATED",
|
|
227
|
+
DENIAL_OF_JUDGEMENT = "DENIAL_OF_JUDGEMENT",
|
|
228
|
+
UNKNOWN = "UNKNOWN",
|
|
229
|
+
UNDEFINED = "UNDEFINED"
|
|
230
|
+
}
|
|
231
|
+
declare const SubmissionStatusToString: {
|
|
232
|
+
[key in SubmissionStatus]: string;
|
|
233
|
+
};
|
|
234
|
+
declare const SubmissionStatusToSimpleString: {
|
|
235
|
+
[key in SubmissionStatus]: string;
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
interface SubmissionReaction {
|
|
239
|
+
url: string;
|
|
240
|
+
}
|
|
241
|
+
interface Submission {
|
|
242
|
+
id?: string;
|
|
243
|
+
submission_id?: string;
|
|
244
|
+
team_id: string;
|
|
245
|
+
problem_id: number | string;
|
|
246
|
+
timestamp: number;
|
|
247
|
+
status: SubmissionStatus | string;
|
|
248
|
+
time?: number;
|
|
249
|
+
language?: string;
|
|
250
|
+
is_ignore?: boolean;
|
|
251
|
+
reaction?: SubmissionReaction;
|
|
252
|
+
}
|
|
253
|
+
type Submissions = Array<Submission> | Record<string, Submission>;
|
|
254
|
+
|
|
255
|
+
interface Team {
|
|
256
|
+
id?: string;
|
|
257
|
+
team_id?: string;
|
|
258
|
+
name?: string;
|
|
259
|
+
team_name?: string;
|
|
260
|
+
organization?: string;
|
|
261
|
+
group?: Array<string>;
|
|
262
|
+
tag?: Array<string>;
|
|
263
|
+
coach?: string | Array<string>;
|
|
264
|
+
members?: string | Array<string>;
|
|
265
|
+
official?: boolean;
|
|
266
|
+
unofficial?: boolean;
|
|
267
|
+
girl?: boolean;
|
|
268
|
+
badge?: Image;
|
|
269
|
+
location?: string;
|
|
270
|
+
icpc_id?: string;
|
|
271
|
+
}
|
|
272
|
+
type Teams = Array<Team> | Record<string, Team>;
|
|
273
|
+
|
|
274
|
+
export { type BalloonColor, type BannerMode, type Base64, type CalculationOfPenalty, type Color, type ColorHEX, type ColorRGB, type ColorRGBA, type Contest, type ContestIndex, type ContestIndexConfig, type ContestOptions, ContestState, type Contributor, type DateTimeISO8601String, GITHUB_SHA, GITHUB_URL, type I18NStringSet, type IPerson, type IPersons, type IRating, type IRatingHistory, type IRatingIndex, type IRatingUser, type Image, type Lang, type Link, type LinkString, type MedalPreset, type Problem, type Problems, type StatusTimeDisplay, type Style, type Submission, type SubmissionReaction, SubmissionStatus, SubmissionStatusToSimpleString, SubmissionStatusToString, type Submissions, type Team, type Teams, type Text, type ThemeColor, type TimeUnit, VERSION, XCPCIO_HOME };
|
package/dist/index.d.ts
CHANGED
|
@@ -87,23 +87,11 @@ interface StatusTimeDisplay {
|
|
|
87
87
|
}
|
|
88
88
|
type TimeUnit = "second" | "millisecond" | "microsecond" | "nanosecond";
|
|
89
89
|
|
|
90
|
-
declare const VERSION = "0.
|
|
90
|
+
declare const VERSION = "0.53.0";
|
|
91
91
|
declare const GITHUB_URL = "https://github.com/xcpcio/xcpcio";
|
|
92
|
-
declare const GITHUB_SHA = "
|
|
92
|
+
declare const GITHUB_SHA = "c3526b5e37";
|
|
93
93
|
declare const XCPCIO_HOME = "https://xcpcio.com";
|
|
94
94
|
|
|
95
|
-
interface ContestIndexConfig {
|
|
96
|
-
contest_name: string;
|
|
97
|
-
start_time: number;
|
|
98
|
-
end_time: number;
|
|
99
|
-
frozen_time: number;
|
|
100
|
-
logo: Image;
|
|
101
|
-
}
|
|
102
|
-
interface ContestIndex {
|
|
103
|
-
config: ContestIndexConfig;
|
|
104
|
-
board_link: string;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
95
|
interface Problem {
|
|
108
96
|
id: string;
|
|
109
97
|
label: string;
|
|
@@ -153,6 +141,18 @@ interface Contest {
|
|
|
153
141
|
options?: ContestOptions;
|
|
154
142
|
}
|
|
155
143
|
|
|
144
|
+
interface ContestIndexConfig {
|
|
145
|
+
contest_name: string;
|
|
146
|
+
start_time: number;
|
|
147
|
+
end_time: number;
|
|
148
|
+
frozen_time: number;
|
|
149
|
+
logo: Image;
|
|
150
|
+
}
|
|
151
|
+
interface ContestIndex {
|
|
152
|
+
config: ContestIndexConfig;
|
|
153
|
+
board_link: string;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
156
|
type Lang = "en" | "zh-CN";
|
|
157
157
|
|
|
158
158
|
interface IPerson {
|
|
@@ -271,4 +271,4 @@ interface Team {
|
|
|
271
271
|
}
|
|
272
272
|
type Teams = Array<Team> | Record<string, Team>;
|
|
273
273
|
|
|
274
|
-
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, IRatingIndex, IRatingUser, Image, Lang, Link, LinkString, MedalPreset, Problem, Problems, StatusTimeDisplay, Style, Submission, SubmissionReaction, SubmissionStatus, SubmissionStatusToSimpleString, SubmissionStatusToString, Submissions, Team, Teams, Text, ThemeColor, TimeUnit, VERSION, XCPCIO_HOME };
|
|
274
|
+
export { type BalloonColor, type BannerMode, type Base64, type CalculationOfPenalty, type Color, type ColorHEX, type ColorRGB, type ColorRGBA, type Contest, type ContestIndex, type ContestIndexConfig, type ContestOptions, ContestState, type Contributor, type DateTimeISO8601String, GITHUB_SHA, GITHUB_URL, type I18NStringSet, type IPerson, type IPersons, type IRating, type IRatingHistory, type IRatingIndex, type IRatingUser, type Image, type Lang, type Link, type LinkString, type MedalPreset, type Problem, type Problems, type StatusTimeDisplay, type Style, type Submission, type SubmissionReaction, SubmissionStatus, SubmissionStatusToSimpleString, SubmissionStatusToString, type Submissions, type Team, type Teams, type Text, type ThemeColor, type TimeUnit, VERSION, XCPCIO_HOME };
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const VERSION = "0.
|
|
1
|
+
const VERSION = "0.53.0";
|
|
2
2
|
const GITHUB_URL = "https://github.com/xcpcio/xcpcio";
|
|
3
|
-
const GITHUB_SHA = "
|
|
3
|
+
const GITHUB_SHA = "c3526b5e37";
|
|
4
4
|
const XCPCIO_HOME = "https://xcpcio.com";
|
|
5
5
|
|
|
6
6
|
var ContestState = /* @__PURE__ */ ((ContestState2) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xcpcio/types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.53.0",
|
|
4
4
|
"description": "XCPCIO Types",
|
|
5
5
|
"author": "Dup4 <lyuzhi.pan@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"exports": {
|
|
21
21
|
".": {
|
|
22
22
|
"types": "./dist/index.d.ts",
|
|
23
|
-
"
|
|
24
|
-
"
|
|
23
|
+
"import": "./dist/index.mjs",
|
|
24
|
+
"require": "./dist/index.cjs"
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
"main": "./dist/index.mjs",
|
|
@@ -36,24 +36,24 @@
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
"files": [
|
|
39
|
-
"
|
|
40
|
-
"
|
|
39
|
+
"dist",
|
|
40
|
+
"src"
|
|
41
41
|
],
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@babel/types": "^7.25.
|
|
44
|
-
"@types/node": "^18.19.
|
|
45
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
46
|
-
"@typescript-eslint/parser": "^
|
|
47
|
-
"bumpp": "^7.
|
|
48
|
-
"eslint": "^
|
|
49
|
-
"esmo": "^
|
|
43
|
+
"@babel/types": "^7.25.7",
|
|
44
|
+
"@types/node": "^18.19.55",
|
|
45
|
+
"@typescript-eslint/eslint-plugin": "^8.8.1",
|
|
46
|
+
"@typescript-eslint/parser": "^8.8.1",
|
|
47
|
+
"bumpp": "^9.7.1",
|
|
48
|
+
"eslint": "^9.12.0",
|
|
49
|
+
"esmo": "^4.8.0",
|
|
50
50
|
"git-repo-info": "^2.1.1",
|
|
51
51
|
"npm-run-all": "^4.1.5",
|
|
52
|
-
"pnpm": "^
|
|
53
|
-
"taze": "^0.
|
|
54
|
-
"typescript": "^
|
|
55
|
-
"unbuild": "^0.
|
|
56
|
-
"vite": "^4.
|
|
52
|
+
"pnpm": "^9.12.1",
|
|
53
|
+
"taze": "^0.17.2",
|
|
54
|
+
"typescript": "^5.6.3",
|
|
55
|
+
"unbuild": "^2.0.0",
|
|
56
|
+
"vite": "^5.4.8",
|
|
57
57
|
"vitest": "^2.1.2"
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|
package/src/contest.ts
CHANGED
|
@@ -10,8 +10,8 @@ export enum ContestState {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export type CalculationOfPenalty = "in_minutes"
|
|
13
|
-
| "in_seconds"
|
|
14
|
-
| "accumulate_in_seconds_and_finally_to_the_minute";
|
|
13
|
+
| "in_seconds"
|
|
14
|
+
| "accumulate_in_seconds_and_finally_to_the_minute";
|
|
15
15
|
|
|
16
16
|
export interface ContestOptions {
|
|
17
17
|
calculation_of_penalty?: CalculationOfPenalty;
|
package/src/index.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export * from "./basic-types";
|
|
2
2
|
export * from "./constant";
|
|
3
|
-
export * from "./contest-index";
|
|
4
3
|
export * from "./contest";
|
|
4
|
+
export * from "./contest-index";
|
|
5
5
|
export * from "./lang";
|
|
6
6
|
export * from "./person";
|
|
7
7
|
export * from "./problem";
|
|
8
8
|
export * from "./rating";
|
|
9
|
-
export * from "./submission-status";
|
|
10
9
|
export * from "./submission";
|
|
10
|
+
export * from "./submission-status";
|
|
11
11
|
export * from "./team";
|