@xcpcio/types 0.58.0 → 0.59.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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2020 - PRESENT XCPCIO
3
+ Copyright (c) 2020 - PRESENT Dup4 <https://github.com/Dup4>
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/dist/index.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- const VERSION = "0.58.0";
4
- const GITHUB_URL = "https://github.com/xcpcio/xcpcio";
5
- const GITHUB_SHA = "fc7b50c5bf";
3
+ const VERSION = "0.59.0";
4
+ const GITHUB_URL = "https://xcpcio.com";
5
+ const GITHUB_SHA = "086a9ce557";
6
6
  const XCPCIO_HOME = "https://xcpcio.com";
7
7
 
8
8
  var ContestState = /* @__PURE__ */ ((ContestState2) => {
package/dist/index.d.cts CHANGED
@@ -69,6 +69,7 @@ type Text = string | I18NStringSet;
69
69
  type Contributor = string;
70
70
  type Base64 = string;
71
71
  type LinkString = string;
72
+ type ImagePreset = "ICPC" | "CCPC" | "HUNAN_CPC";
72
73
  interface Link {
73
74
  link: LinkString;
74
75
  title?: string;
@@ -77,7 +78,7 @@ interface Image {
77
78
  url?: string;
78
79
  base64?: Base64;
79
80
  type?: "png" | "svg" | "jpg" | "jpeg";
80
- preset?: string;
81
+ preset?: ImagePreset;
81
82
  [key: string]: string | undefined;
82
83
  }
83
84
  interface StatusTimeDisplay {
@@ -87,9 +88,9 @@ interface StatusTimeDisplay {
87
88
  }
88
89
  type TimeUnit = "second" | "millisecond" | "microsecond" | "nanosecond";
89
90
 
90
- declare const VERSION = "0.58.0";
91
- declare const GITHUB_URL = "https://github.com/xcpcio/xcpcio";
92
- declare const GITHUB_SHA = "fc7b50c5bf";
91
+ declare const VERSION = "0.59.0";
92
+ declare const GITHUB_URL = "https://xcpcio.com";
93
+ declare const GITHUB_SHA = "086a9ce557";
93
94
  declare const XCPCIO_HOME = "https://xcpcio.com";
94
95
 
95
96
  interface Problem {
@@ -123,9 +124,9 @@ interface Contest {
123
124
  contest_name: string;
124
125
  start_time: number | DateTimeISO8601String;
125
126
  end_time: number | DateTimeISO8601String;
127
+ penalty: number;
126
128
  freeze_time?: number | DateTimeISO8601String;
127
129
  frozen_time?: number;
128
- penalty: number;
129
130
  problems?: Array<Problem>;
130
131
  problem_id?: Array<string>;
131
132
  organization?: string;
@@ -274,4 +275,4 @@ interface Team {
274
275
  type Teams = Array<Team> | Record<string, Team>;
275
276
 
276
277
  export { ContestState, GITHUB_SHA, GITHUB_URL, SubmissionStatus, SubmissionStatusToSimpleString, SubmissionStatusToString, VERSION, XCPCIO_HOME };
277
- export type { BalloonColor, BannerMode, Base64, CalculationOfPenalty, Color, ColorHEX, ColorRGB, ColorRGBA, Contest, ContestIndex, ContestIndexConfig, ContestOptions, Contributor, DateTimeISO8601String, I18NStringSet, IPerson, IPersons, IRating, IRatingHistory, IRatingIndex, IRatingUser, Image, Lang, Link, LinkString, MedalPreset, Problem, Problems, StatusTimeDisplay, Style, Submission, SubmissionReaction, Submissions, Team, Teams, Text, ThemeColor, TimeUnit };
278
+ export type { BalloonColor, BannerMode, Base64, CalculationOfPenalty, Color, ColorHEX, ColorRGB, ColorRGBA, Contest, ContestIndex, ContestIndexConfig, ContestOptions, Contributor, DateTimeISO8601String, I18NStringSet, IPerson, IPersons, IRating, IRatingHistory, IRatingIndex, IRatingUser, Image, ImagePreset, Lang, Link, LinkString, MedalPreset, Problem, Problems, StatusTimeDisplay, Style, Submission, SubmissionReaction, Submissions, Team, Teams, Text, ThemeColor, TimeUnit };
package/dist/index.d.mts CHANGED
@@ -69,6 +69,7 @@ type Text = string | I18NStringSet;
69
69
  type Contributor = string;
70
70
  type Base64 = string;
71
71
  type LinkString = string;
72
+ type ImagePreset = "ICPC" | "CCPC" | "HUNAN_CPC";
72
73
  interface Link {
73
74
  link: LinkString;
74
75
  title?: string;
@@ -77,7 +78,7 @@ interface Image {
77
78
  url?: string;
78
79
  base64?: Base64;
79
80
  type?: "png" | "svg" | "jpg" | "jpeg";
80
- preset?: string;
81
+ preset?: ImagePreset;
81
82
  [key: string]: string | undefined;
82
83
  }
83
84
  interface StatusTimeDisplay {
@@ -87,9 +88,9 @@ interface StatusTimeDisplay {
87
88
  }
88
89
  type TimeUnit = "second" | "millisecond" | "microsecond" | "nanosecond";
89
90
 
90
- declare const VERSION = "0.58.0";
91
- declare const GITHUB_URL = "https://github.com/xcpcio/xcpcio";
92
- declare const GITHUB_SHA = "fc7b50c5bf";
91
+ declare const VERSION = "0.59.0";
92
+ declare const GITHUB_URL = "https://xcpcio.com";
93
+ declare const GITHUB_SHA = "086a9ce557";
93
94
  declare const XCPCIO_HOME = "https://xcpcio.com";
94
95
 
95
96
  interface Problem {
@@ -123,9 +124,9 @@ interface Contest {
123
124
  contest_name: string;
124
125
  start_time: number | DateTimeISO8601String;
125
126
  end_time: number | DateTimeISO8601String;
127
+ penalty: number;
126
128
  freeze_time?: number | DateTimeISO8601String;
127
129
  frozen_time?: number;
128
- penalty: number;
129
130
  problems?: Array<Problem>;
130
131
  problem_id?: Array<string>;
131
132
  organization?: string;
@@ -274,4 +275,4 @@ interface Team {
274
275
  type Teams = Array<Team> | Record<string, Team>;
275
276
 
276
277
  export { ContestState, GITHUB_SHA, GITHUB_URL, SubmissionStatus, SubmissionStatusToSimpleString, SubmissionStatusToString, VERSION, XCPCIO_HOME };
277
- export type { BalloonColor, BannerMode, Base64, CalculationOfPenalty, Color, ColorHEX, ColorRGB, ColorRGBA, Contest, ContestIndex, ContestIndexConfig, ContestOptions, Contributor, DateTimeISO8601String, I18NStringSet, IPerson, IPersons, IRating, IRatingHistory, IRatingIndex, IRatingUser, Image, Lang, Link, LinkString, MedalPreset, Problem, Problems, StatusTimeDisplay, Style, Submission, SubmissionReaction, Submissions, Team, Teams, Text, ThemeColor, TimeUnit };
278
+ export type { BalloonColor, BannerMode, Base64, CalculationOfPenalty, Color, ColorHEX, ColorRGB, ColorRGBA, Contest, ContestIndex, ContestIndexConfig, ContestOptions, Contributor, DateTimeISO8601String, I18NStringSet, IPerson, IPersons, IRating, IRatingHistory, IRatingIndex, IRatingUser, Image, ImagePreset, Lang, Link, LinkString, MedalPreset, Problem, Problems, StatusTimeDisplay, Style, Submission, SubmissionReaction, Submissions, Team, Teams, Text, ThemeColor, TimeUnit };
package/dist/index.d.ts CHANGED
@@ -69,6 +69,7 @@ type Text = string | I18NStringSet;
69
69
  type Contributor = string;
70
70
  type Base64 = string;
71
71
  type LinkString = string;
72
+ type ImagePreset = "ICPC" | "CCPC" | "HUNAN_CPC";
72
73
  interface Link {
73
74
  link: LinkString;
74
75
  title?: string;
@@ -77,7 +78,7 @@ interface Image {
77
78
  url?: string;
78
79
  base64?: Base64;
79
80
  type?: "png" | "svg" | "jpg" | "jpeg";
80
- preset?: string;
81
+ preset?: ImagePreset;
81
82
  [key: string]: string | undefined;
82
83
  }
83
84
  interface StatusTimeDisplay {
@@ -87,9 +88,9 @@ interface StatusTimeDisplay {
87
88
  }
88
89
  type TimeUnit = "second" | "millisecond" | "microsecond" | "nanosecond";
89
90
 
90
- declare const VERSION = "0.58.0";
91
- declare const GITHUB_URL = "https://github.com/xcpcio/xcpcio";
92
- declare const GITHUB_SHA = "fc7b50c5bf";
91
+ declare const VERSION = "0.59.0";
92
+ declare const GITHUB_URL = "https://xcpcio.com";
93
+ declare const GITHUB_SHA = "086a9ce557";
93
94
  declare const XCPCIO_HOME = "https://xcpcio.com";
94
95
 
95
96
  interface Problem {
@@ -123,9 +124,9 @@ interface Contest {
123
124
  contest_name: string;
124
125
  start_time: number | DateTimeISO8601String;
125
126
  end_time: number | DateTimeISO8601String;
127
+ penalty: number;
126
128
  freeze_time?: number | DateTimeISO8601String;
127
129
  frozen_time?: number;
128
- penalty: number;
129
130
  problems?: Array<Problem>;
130
131
  problem_id?: Array<string>;
131
132
  organization?: string;
@@ -274,4 +275,4 @@ interface Team {
274
275
  type Teams = Array<Team> | Record<string, Team>;
275
276
 
276
277
  export { ContestState, GITHUB_SHA, GITHUB_URL, SubmissionStatus, SubmissionStatusToSimpleString, SubmissionStatusToString, VERSION, XCPCIO_HOME };
277
- export type { BalloonColor, BannerMode, Base64, CalculationOfPenalty, Color, ColorHEX, ColorRGB, ColorRGBA, Contest, ContestIndex, ContestIndexConfig, ContestOptions, Contributor, DateTimeISO8601String, I18NStringSet, IPerson, IPersons, IRating, IRatingHistory, IRatingIndex, IRatingUser, Image, Lang, Link, LinkString, MedalPreset, Problem, Problems, StatusTimeDisplay, Style, Submission, SubmissionReaction, Submissions, Team, Teams, Text, ThemeColor, TimeUnit };
278
+ export type { BalloonColor, BannerMode, Base64, CalculationOfPenalty, Color, ColorHEX, ColorRGB, ColorRGBA, Contest, ContestIndex, ContestIndexConfig, ContestOptions, Contributor, DateTimeISO8601String, I18NStringSet, IPerson, IPersons, IRating, IRatingHistory, IRatingIndex, IRatingUser, Image, ImagePreset, Lang, Link, LinkString, MedalPreset, Problem, Problems, StatusTimeDisplay, Style, Submission, SubmissionReaction, Submissions, Team, Teams, Text, ThemeColor, TimeUnit };
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
- const VERSION = "0.58.0";
2
- const GITHUB_URL = "https://github.com/xcpcio/xcpcio";
3
- const GITHUB_SHA = "fc7b50c5bf";
1
+ const VERSION = "0.59.0";
2
+ const GITHUB_URL = "https://xcpcio.com";
3
+ const GITHUB_SHA = "086a9ce557";
4
4
  const XCPCIO_HOME = "https://xcpcio.com";
5
5
 
6
6
  var ContestState = /* @__PURE__ */ ((ContestState2) => {
package/package.json CHANGED
@@ -1,13 +1,16 @@
1
1
  {
2
2
  "name": "@xcpcio/types",
3
- "version": "0.58.0",
4
- "description": "XCPCIO Types",
5
- "author": "Dup4 <lyuzhi.pan@gmail.com>",
3
+ "type": "module",
4
+ "version": "0.59.0",
5
+ "description": "Types for XCPCIO",
6
+ "author": "Dup4 <hi@dup4.com>",
6
7
  "license": "MIT",
7
- "homepage": "https://github.com/xcpcio/xcpcio",
8
+ "funding": "https://github.com/sponsors/Dup4",
9
+ "homepage": "https://xcpcio.com",
8
10
  "repository": {
9
11
  "type": "git",
10
- "url": "git+https://github.com/xcpcio/xcpcio.git"
12
+ "url": "git+https://github.com/xcpcio/xcpcio.git",
13
+ "directory": "packages/libs/types"
11
14
  },
12
15
  "bugs": {
13
16
  "url": "https://github.com/xcpcio/xcpcio/issues"
@@ -19,25 +22,14 @@
19
22
  "sideEffects": false,
20
23
  "exports": {
21
24
  ".": {
22
- "types": "./dist/index.d.ts",
23
25
  "import": "./dist/index.mjs",
24
26
  "require": "./dist/index.cjs"
25
27
  }
26
28
  },
27
- "main": "./dist/index.mjs",
28
- "module": "./dist/index.mjs",
29
- "types": "./dist/index.d.ts",
30
- "typesVersions": {
31
- "*": {
32
- "*": [
33
- "./dist/*",
34
- "./dist/index.d.ts"
35
- ]
36
- }
37
- },
29
+ "main": "dist/index.cjs",
30
+ "module": "dist/index.mjs",
38
31
  "files": [
39
- "dist",
40
- "src"
32
+ "dist"
41
33
  ],
42
34
  "devDependencies": {
43
35
  "@babel/types": "^7.28.4",
@@ -58,10 +50,6 @@
58
50
  },
59
51
  "scripts": {
60
52
  "build": "unbuild",
61
- "dev": "unbuild --stub",
62
- "start": "esmo src/index.ts",
63
- "test": "vitest",
64
- "lint": "run-p lint:*",
65
- "lint:build": "# tsc --noEmit"
53
+ "dev": "unbuild --stub"
66
54
  }
67
55
  }
@@ -1,107 +0,0 @@
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
- export type DateTimeISO8601String = string;
9
-
10
- /**
11
- * Color HEX.
12
- * @example
13
- * '#FFFFFF'
14
- */
15
- export type ColorHEX = string;
16
-
17
- /**
18
- * Color RGB.
19
- * @example
20
- * 'rgb(255, 255, 255)'
21
- */
22
- export type ColorRGB = string;
23
-
24
- /**
25
- * Color RGBA.
26
- * @example
27
- * 'rgba(255, 255, 255, 0.75)'
28
- */
29
- export type ColorRGBA = string;
30
-
31
- /** General color format. */
32
- export type Color = ColorHEX | ColorRGB | ColorRGBA;
33
-
34
- export type ThemeColor
35
- = | Color
36
- | {
37
- light: Color;
38
- dark: Color;
39
- };
40
-
41
- export interface Style {
42
- /**
43
- * Text color.
44
- * @defaultValue Determined by renderer.
45
- */
46
- text_color?: ThemeColor;
47
-
48
- /**
49
- * Background color.
50
- * @defaultValue Determined by renderer.
51
- */
52
- background_color?: ThemeColor;
53
- }
54
-
55
- export interface BalloonColor {
56
- color: Color;
57
- background_color: Color;
58
- }
59
-
60
- /**
61
- * i18n string set.
62
- * @example
63
- * { "en-US": 'English', "zh-CN": '中文', fallback: 'English' }
64
- */
65
- export interface I18NStringSet {
66
- /** The fallback string if renderer cannot determine the language to use. */
67
- fallback: string;
68
- /** The key is the IETF BCP 47 language tag, and the value is the string for this language tag. */
69
- [key: string]: string;
70
- }
71
-
72
- /**
73
- * Text (i18n supported).
74
- */
75
- export type Text = string | I18NStringSet;
76
-
77
- /**
78
- * Contributor field. The email and url are optional.
79
- * @example
80
- * 'bLue <mail@example.com> (https://example.com/)'
81
- */
82
- export type Contributor = string;
83
-
84
- export type Base64 = string;
85
-
86
- export type LinkString = string;
87
-
88
- export interface Link {
89
- link: LinkString;
90
- title?: string;
91
- }
92
-
93
- export interface Image {
94
- url?: string;
95
- base64?: Base64;
96
- type?: "png" | "svg" | "jpg" | "jpeg";
97
- preset?: string;
98
- [key: string]: string | undefined;
99
- }
100
-
101
- export interface StatusTimeDisplay {
102
- correct: boolean;
103
- incorrect: boolean;
104
- pending: boolean;
105
- }
106
-
107
- export type TimeUnit = "second" | "millisecond" | "microsecond" | "nanosecond";
package/src/constant.ts DELETED
@@ -1,4 +0,0 @@
1
- export const VERSION = "import.meta.package.version";
2
- export const GITHUB_URL = "import.meta.package.homepage";
3
- export const GITHUB_SHA = "import.meta.git.repo.abbreviatedSha";
4
- export const XCPCIO_HOME = "https://xcpcio.com";
@@ -1,14 +0,0 @@
1
- import type { Image } from "./basic-types";
2
-
3
- export interface ContestIndexConfig {
4
- contest_name: string;
5
- start_time: number;
6
- end_time: number;
7
- frozen_time: number;
8
- logo: Image;
9
- }
10
-
11
- export interface ContestIndex {
12
- config: ContestIndexConfig;
13
- board_link: string;
14
- }
package/src/contest.ts DELETED
@@ -1,64 +0,0 @@
1
- import type { BalloonColor, DateTimeISO8601String, Image, TimeUnit } from "./basic-types";
2
- import type { Problem } from "./problem";
3
-
4
- export enum ContestState {
5
- PENDING = "PENDING",
6
- RUNNING = "RUNNING",
7
- FROZEN = "FROZEN",
8
- FINISHED = "FINISHED",
9
- PAUSED = "PAUSED",
10
- }
11
-
12
- export type CalculationOfPenalty = "in_minutes"
13
- | "in_seconds"
14
- | "accumulate_in_seconds_and_finally_to_the_minute";
15
-
16
- export interface ContestOptions {
17
- calculation_of_penalty?: CalculationOfPenalty;
18
- submission_timestamp_unit?: TimeUnit;
19
-
20
- // deprecated, please use has_reaction_videos instead
21
- submission_has_reaction?: boolean;
22
-
23
- has_reaction_videos?: boolean;
24
-
25
- // example: https://your.video.cdn/wf/2025/${submission_id}.mp4
26
- // ${submission_id} will be replaced with the submission id
27
- reaction_video_url_template?: string;
28
- }
29
-
30
- export type MedalPreset = "ccpc" | "icpc";
31
- export type BannerMode = "ONLY_BANNER" | "ALL";
32
-
33
- export interface Contest {
34
- contest_name: string;
35
-
36
- start_time: number | DateTimeISO8601String;
37
- end_time: number | DateTimeISO8601String;
38
- freeze_time?: number | DateTimeISO8601String;
39
-
40
- frozen_time?: number; // unit: seconds
41
- penalty: number; // unit: seconds
42
-
43
- problems?: Array<Problem>;
44
- problem_id?: Array<string>;
45
-
46
- organization?: string;
47
- status_time_display?: Record<string, boolean>;
48
-
49
- badge?: string;
50
- medal?: Record<string, Record<string, number>> | MedalPreset;
51
- balloon_color?: Array<BalloonColor>;
52
-
53
- group?: Record<string, string>;
54
- tag?: Record<string, string>;
55
-
56
- logo?: Image;
57
- banner?: Image;
58
- banner_mode?: BannerMode;
59
- board_link?: string;
60
-
61
- version?: string;
62
-
63
- options?: ContestOptions;
64
- }
package/src/index.ts DELETED
@@ -1,11 +0,0 @@
1
- export * from "./basic-types";
2
- export * from "./constant";
3
- export * from "./contest";
4
- export * from "./contest-index";
5
- export * from "./lang";
6
- export * from "./person";
7
- export * from "./problem";
8
- export * from "./rating";
9
- export * from "./submission";
10
- export * from "./submission-status";
11
- export * from "./team";
package/src/lang.ts DELETED
@@ -1 +0,0 @@
1
- export type Lang = "en" | "zh-CN";
package/src/person.ts DELETED
@@ -1,5 +0,0 @@
1
- export interface IPerson {
2
- name: string;
3
- }
4
-
5
- export type IPersons = Array<IPerson>;
package/src/problem.ts DELETED
@@ -1,15 +0,0 @@
1
- import type { BalloonColor } from "./basic-types";
2
-
3
- export interface Problem {
4
- id: string;
5
- label: string;
6
-
7
- name?: string;
8
-
9
- time_limit?: string;
10
- memory_limit?: string;
11
-
12
- balloon_color?: BalloonColor;
13
- }
14
-
15
- export type Problems = Array<Problem>;
package/src/rating.ts DELETED
@@ -1,46 +0,0 @@
1
- import type { IPersons } from "./person";
2
-
3
- export interface IRatingIndex {
4
- id: string;
5
- name: string;
6
- }
7
-
8
- export interface IRatingHistory {
9
- rank: number;
10
- rating: number;
11
-
12
- teamName: string;
13
- organization: string;
14
-
15
- members: IPersons;
16
- coaches: IPersons;
17
-
18
- contestID: string;
19
- contestName: string;
20
- contestLink: string;
21
- contestTime: Date;
22
- }
23
-
24
- export interface IRatingUser {
25
- id: string;
26
- name: string;
27
- organization: string;
28
-
29
- members: IPersons;
30
- coaches: IPersons;
31
-
32
- rating: number;
33
- minRating: number;
34
- maxRating: number;
35
-
36
- ratingHistories: IRatingHistory[];
37
- }
38
-
39
- export interface IRating {
40
- id: string;
41
- name: string;
42
- baseRating: number;
43
-
44
- contestIDs: string[];
45
- users: IRatingUser[];
46
- }
@@ -1,128 +0,0 @@
1
- export enum SubmissionStatus {
2
- PENDING = "PENDING",
3
- WAITING = "WAITING",
4
- PREPARING = "PREPARING",
5
- COMPILING = "COMPILING",
6
- RUNNING = "RUNNING",
7
- JUDGING = "JUDGING",
8
- FROZEN = "FROZEN",
9
-
10
- ACCEPTED = "ACCEPTED",
11
- CORRECT = "CORRECT",
12
- PARTIALLY_CORRECT = "PARTIALLY_CORRECT",
13
-
14
- REJECTED = "REJECTED",
15
- WRONG_ANSWER = "WRONG_ANSWER",
16
-
17
- NO_OUTPUT = "NO_OUTPUT",
18
-
19
- COMPILATION_ERROR = "COMPILATION_ERROR",
20
- PRESENTATION_ERROR = "PRESENTATION_ERROR",
21
-
22
- RUNTIME_ERROR = "RUNTIME_ERROR",
23
- TIME_LIMIT_EXCEEDED = "TIME_LIMIT_EXCEEDED",
24
- MEMORY_LIMIT_EXCEEDED = "MEMORY_LIMIT_EXCEEDED",
25
- OUTPUT_LIMIT_EXCEEDED = "OUTPUT_LIMIT_EXCEEDED",
26
- IDLENESS_LIMIT_EXCEEDED = "IDLENESS_LIMIT_EXCEEDED",
27
-
28
- HACKED = "HACKED",
29
-
30
- JUDGEMENT_FAILED = "JUDGEMENT_FAILED",
31
- CONFIGURATION_ERROR = "CONFIGURATION_ERROR",
32
- FILE_ERROR = "FILE_ERROR",
33
- SYSTEM_ERROR = "SYSTEM_ERROR",
34
- CANCELED = "CANCELED",
35
- SKIPPED = "SKIPPED",
36
-
37
- SECURITY_VIOLATED = "SECURITY_VIOLATED",
38
- DENIAL_OF_JUDGEMENT = "DENIAL_OF_JUDGEMENT",
39
-
40
- UNKNOWN = "UNKNOWN",
41
- UNDEFINED = "UNDEFINED",
42
- }
43
-
44
- export const SubmissionStatusToString: { [key in SubmissionStatus]: string } = {
45
- [SubmissionStatus.PENDING]: "Pending",
46
- [SubmissionStatus.WAITING]: "Waiting",
47
- [SubmissionStatus.PREPARING]: "Preparing",
48
- [SubmissionStatus.COMPILING]: "Compiling",
49
- [SubmissionStatus.RUNNING]: "Running",
50
- [SubmissionStatus.JUDGING]: "Judging",
51
- [SubmissionStatus.FROZEN]: "Frozen",
52
-
53
- [SubmissionStatus.ACCEPTED]: "Accepted",
54
- [SubmissionStatus.CORRECT]: "Correct",
55
- [SubmissionStatus.PARTIALLY_CORRECT]: "Partially Correct",
56
-
57
- [SubmissionStatus.REJECTED]: "Rejected",
58
- [SubmissionStatus.WRONG_ANSWER]: "Wrong Answer",
59
-
60
- [SubmissionStatus.NO_OUTPUT]: "No Output",
61
-
62
- [SubmissionStatus.COMPILATION_ERROR]: "Compilation Error",
63
- [SubmissionStatus.PRESENTATION_ERROR]: "Presentation Error",
64
-
65
- [SubmissionStatus.RUNTIME_ERROR]: "Runtime Error",
66
- [SubmissionStatus.TIME_LIMIT_EXCEEDED]: "Time Limit Exceeded",
67
- [SubmissionStatus.MEMORY_LIMIT_EXCEEDED]: "Memory Limit Exceeded",
68
- [SubmissionStatus.OUTPUT_LIMIT_EXCEEDED]: "Output Limit Exceeded",
69
- [SubmissionStatus.IDLENESS_LIMIT_EXCEEDED]: "Idleness Limit Exceeded",
70
-
71
- [SubmissionStatus.HACKED]: "Hacked",
72
-
73
- [SubmissionStatus.JUDGEMENT_FAILED]: "Judgement Failed",
74
- [SubmissionStatus.CONFIGURATION_ERROR]: "Configuration Error",
75
- [SubmissionStatus.FILE_ERROR]: "File Error",
76
- [SubmissionStatus.SYSTEM_ERROR]: "System Error",
77
- [SubmissionStatus.CANCELED]: "Canceled",
78
- [SubmissionStatus.SKIPPED]: "Skipped",
79
-
80
- [SubmissionStatus.SECURITY_VIOLATED]: "Security Violated",
81
- [SubmissionStatus.DENIAL_OF_JUDGEMENT]: "Denial Of Judgement",
82
-
83
- [SubmissionStatus.UNKNOWN]: "Unknown",
84
- [SubmissionStatus.UNDEFINED]: "Undefined",
85
- };
86
-
87
- export const SubmissionStatusToSimpleString: { [key in SubmissionStatus]: string } = {
88
- [SubmissionStatus.PENDING]: "PD",
89
- [SubmissionStatus.WAITING]: "PD",
90
- [SubmissionStatus.PREPARING]: "PD",
91
- [SubmissionStatus.COMPILING]: "PD",
92
- [SubmissionStatus.RUNNING]: "PD",
93
- [SubmissionStatus.JUDGING]: "PD",
94
- [SubmissionStatus.FROZEN]: "?",
95
-
96
- [SubmissionStatus.ACCEPTED]: "AC",
97
- [SubmissionStatus.CORRECT]: "AC",
98
- [SubmissionStatus.PARTIALLY_CORRECT]: "RJ",
99
-
100
- [SubmissionStatus.REJECTED]: "RJ",
101
- [SubmissionStatus.WRONG_ANSWER]: "WA",
102
-
103
- [SubmissionStatus.NO_OUTPUT]: "NO",
104
-
105
- [SubmissionStatus.COMPILATION_ERROR]: "CE",
106
- [SubmissionStatus.PRESENTATION_ERROR]: "PE",
107
-
108
- [SubmissionStatus.RUNTIME_ERROR]: "RTE",
109
- [SubmissionStatus.TIME_LIMIT_EXCEEDED]: "TLE",
110
- [SubmissionStatus.MEMORY_LIMIT_EXCEEDED]: "MLE",
111
- [SubmissionStatus.OUTPUT_LIMIT_EXCEEDED]: "OLE",
112
- [SubmissionStatus.IDLENESS_LIMIT_EXCEEDED]: "ILE",
113
-
114
- [SubmissionStatus.HACKED]: "RJ",
115
-
116
- [SubmissionStatus.JUDGEMENT_FAILED]: "RJ",
117
- [SubmissionStatus.CONFIGURATION_ERROR]: "RJ",
118
- [SubmissionStatus.FILE_ERROR]: "RJ",
119
- [SubmissionStatus.SYSTEM_ERROR]: "RJ",
120
- [SubmissionStatus.CANCELED]: "RJ",
121
- [SubmissionStatus.SKIPPED]: "RJ",
122
-
123
- [SubmissionStatus.SECURITY_VIOLATED]: "RJ",
124
- [SubmissionStatus.DENIAL_OF_JUDGEMENT]: "RJ",
125
-
126
- [SubmissionStatus.UNKNOWN]: "RJ",
127
- [SubmissionStatus.UNDEFINED]: "RJ",
128
- };
package/src/submission.ts DELETED
@@ -1,24 +0,0 @@
1
- import type { SubmissionStatus } from "./submission-status";
2
-
3
- export interface SubmissionReaction {
4
- url: string;
5
- }
6
-
7
- export interface Submission {
8
- id?: string;
9
- submission_id?: string;
10
-
11
- team_id: string;
12
- problem_id: number | string;
13
- timestamp: number; // unit: seconds
14
- status: SubmissionStatus | string;
15
-
16
- time?: number;
17
- language?: string;
18
-
19
- is_ignore?: boolean;
20
-
21
- reaction?: SubmissionReaction;
22
- }
23
-
24
- export type Submissions = Array<Submission> | Record<string, Submission>;
package/src/team.ts DELETED
@@ -1,27 +0,0 @@
1
- import type { Image } from "./basic-types";
2
-
3
- export interface Team {
4
- id?: string;
5
- team_id?: string;
6
-
7
- name?: string;
8
- team_name?: string;
9
-
10
- organization?: string;
11
- group?: Array<string>;
12
- tag?: Array<string>;
13
-
14
- coach?: string | Array<string>;
15
- members?: string | Array<string>;
16
-
17
- official?: boolean;
18
- unofficial?: boolean;
19
- girl?: boolean;
20
-
21
- badge?: Image;
22
-
23
- location?: string;
24
- icpc_id?: string;
25
- }
26
-
27
- export type Teams = Array<Team> | Record<string, Team>;