@xcpcio/types 0.26.1 → 0.28.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 CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const VERSION = "0.26.1";
5
+ const VERSION = "0.28.0";
6
6
  const GITHUB_URL = "https://github.com/xcpcio/xcpcio";
7
- const GITHUB_SHA = "c1868899d3";
7
+ const GITHUB_SHA = "b617b16ba5";
8
8
 
9
9
  var ContestState = /* @__PURE__ */ ((ContestState2) => {
10
10
  ContestState2["PENDING"] = "PENDING";
package/dist/index.d.ts CHANGED
@@ -85,10 +85,11 @@ interface StatusTimeDisplay {
85
85
  incorrect: boolean;
86
86
  pending: boolean;
87
87
  }
88
+ type TimeUnit = "second" | "millisecond" | "microsecond" | "nanosecond";
88
89
 
89
- declare const VERSION = "0.26.1";
90
+ declare const VERSION = "0.28.0";
90
91
  declare const GITHUB_URL = "https://github.com/xcpcio/xcpcio";
91
- declare const GITHUB_SHA = "c1868899d3";
92
+ declare const GITHUB_SHA = "b617b16ba5";
92
93
 
93
94
  interface ContestIndexConfig {
94
95
  contest_name: string;
@@ -122,6 +123,7 @@ declare enum ContestState {
122
123
  type CalculationOfPenalty = "in_minutes" | "in_seconds" | "accumulate_in_seconds_and_finally_to_the_minute";
123
124
  interface ContestOptions {
124
125
  calculation_of_penalty?: CalculationOfPenalty;
126
+ submission_timestamp_unit?: TimeUnit;
125
127
  }
126
128
  interface Contest {
127
129
  contest_name: string;
@@ -191,6 +193,8 @@ interface Submission {
191
193
  problem_id: number | string;
192
194
  timestamp: number;
193
195
  status: SubmissionStatus | string;
196
+ time?: number;
197
+ language?: string;
194
198
  is_ignore?: boolean;
195
199
  }
196
200
  type Submissions = Array<Submission> | Record<string, Submission>;
@@ -213,4 +217,4 @@ interface Team {
213
217
  }
214
218
  type Teams = Array<Team> | Record<string, Team>;
215
219
 
216
- export { BalloonColor, Base64, CalculationOfPenalty, Color, ColorHEX, ColorRGB, ColorRGBA, Contest, ContestIndex, ContestIndexConfig, ContestOptions, ContestState, Contributor, DateTimeISO8601String, GITHUB_SHA, GITHUB_URL, I18NStringSet, Image, Lang, Link, LinkString, Problem, Problems, StatusTimeDisplay, Style, Submission, SubmissionStatus, SubmissionStatusToString, Submissions, Team, Teams, Text, ThemeColor, VERSION };
220
+ export { BalloonColor, Base64, CalculationOfPenalty, Color, ColorHEX, ColorRGB, ColorRGBA, Contest, ContestIndex, ContestIndexConfig, ContestOptions, ContestState, Contributor, DateTimeISO8601String, GITHUB_SHA, GITHUB_URL, I18NStringSet, Image, Lang, Link, LinkString, Problem, Problems, StatusTimeDisplay, Style, Submission, SubmissionStatus, SubmissionStatusToString, Submissions, Team, Teams, Text, ThemeColor, TimeUnit, VERSION };
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
- const VERSION = "0.26.1";
1
+ const VERSION = "0.28.0";
2
2
  const GITHUB_URL = "https://github.com/xcpcio/xcpcio";
3
- const GITHUB_SHA = "c1868899d3";
3
+ const GITHUB_SHA = "b617b16ba5";
4
4
 
5
5
  var ContestState = /* @__PURE__ */ ((ContestState2) => {
6
6
  ContestState2["PENDING"] = "PENDING";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xcpcio/types",
3
- "version": "0.26.1",
3
+ "version": "0.28.0",
4
4
  "description": "XCPCIO Types",
5
5
  "author": "Dup4 <lyuzhi.pan@gmail.com>",
6
6
  "license": "MIT",
@@ -103,3 +103,5 @@ export interface StatusTimeDisplay {
103
103
  incorrect: boolean;
104
104
  pending: boolean;
105
105
  }
106
+
107
+ export type TimeUnit = "second" | "millisecond" | "microsecond" | "nanosecond";
package/src/contest.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { BalloonColor, DateTimeISO8601String, Image } from "./basic-types";
1
+ import type { BalloonColor, DateTimeISO8601String, Image, TimeUnit } from "./basic-types";
2
2
  import type { Problem } from "./problem";
3
3
 
4
4
  export enum ContestState {
@@ -15,6 +15,7 @@ export type CalculationOfPenalty = "in_minutes"
15
15
 
16
16
  export interface ContestOptions {
17
17
  calculation_of_penalty?: CalculationOfPenalty;
18
+ submission_timestamp_unit?: TimeUnit;
18
19
  }
19
20
 
20
21
  export interface Contest {
package/src/submission.ts CHANGED
@@ -9,6 +9,9 @@ export interface Submission {
9
9
  timestamp: number; // unit: seconds
10
10
  status: SubmissionStatus | string;
11
11
 
12
+ time?: number;
13
+ language?: string;
14
+
12
15
  is_ignore?: boolean;
13
16
  }
14
17