code-share-types 0.6.0 → 0.7.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.
@@ -1,4 +1,13 @@
1
1
  import z from 'zod';
2
+ declare const CodeExecutionStatisticsSchema: z.ZodObject<{
3
+ total: z.ZodNumber;
4
+ min_ms: z.ZodNumber;
5
+ avg_ms: z.ZodNumber;
6
+ max_ms: z.ZodNumber;
7
+ }, z.core.$strip>;
8
+ type CodeExecutionStatistics = z.infer<typeof CodeExecutionStatisticsSchema>;
9
+ export type { CodeExecutionStatistics };
10
+ export { CodeExecutionStatisticsSchema };
2
11
  declare const ExecutorInformationSchema: z.ZodObject<{
3
12
  socket_id: z.ZodString;
4
13
  types_version_compatible: z.ZodBoolean;
@@ -22,6 +31,20 @@ declare const ExecutorInformationSchema: z.ZodObject<{
22
31
  FAILED: "FAILED";
23
32
  }>], null>>;
24
33
  languages_initialised: z.ZodBoolean;
34
+ execution_statistics: z.ZodObject<{
35
+ global: z.ZodObject<{
36
+ total: z.ZodNumber;
37
+ min_ms: z.ZodNumber;
38
+ avg_ms: z.ZodNumber;
39
+ max_ms: z.ZodNumber;
40
+ }, z.core.$strip>;
41
+ language_stats: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodObject<{
42
+ total: z.ZodNumber;
43
+ min_ms: z.ZodNumber;
44
+ avg_ms: z.ZodNumber;
45
+ max_ms: z.ZodNumber;
46
+ }, z.core.$strip>], null>>;
47
+ }, z.core.$strip>;
25
48
  }, z.core.$strip>;
26
49
  type ExecutorInformation = z.infer<typeof ExecutorInformationSchema>;
27
50
  export type { ExecutorInformation };
@@ -49,6 +72,20 @@ declare const ExecutorInformationListSchema: z.ZodArray<z.ZodObject<{
49
72
  FAILED: "FAILED";
50
73
  }>], null>>;
51
74
  languages_initialised: z.ZodBoolean;
75
+ execution_statistics: z.ZodObject<{
76
+ global: z.ZodObject<{
77
+ total: z.ZodNumber;
78
+ min_ms: z.ZodNumber;
79
+ avg_ms: z.ZodNumber;
80
+ max_ms: z.ZodNumber;
81
+ }, z.core.$strip>;
82
+ language_stats: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodObject<{
83
+ total: z.ZodNumber;
84
+ min_ms: z.ZodNumber;
85
+ avg_ms: z.ZodNumber;
86
+ max_ms: z.ZodNumber;
87
+ }, z.core.$strip>], null>>;
88
+ }, z.core.$strip>;
52
89
  }, z.core.$strip>>;
53
90
  type ExecutorInformationList = z.infer<typeof ExecutorInformationListSchema>;
54
91
  export type { ExecutorInformationList };
@@ -1,12 +1,23 @@
1
1
  import z from 'zod';
2
2
  import { PackageInstallStatusMapSchema } from '../../Package';
3
3
  import { LanguageExecutorDefinitionTestStatusMapSchema } from '../../Language';
4
+ const CodeExecutionStatisticsSchema = z.object({
5
+ total: z.number(),
6
+ min_ms: z.number(),
7
+ avg_ms: z.number(),
8
+ max_ms: z.number(),
9
+ });
10
+ export { CodeExecutionStatisticsSchema };
4
11
  const ExecutorInformationSchema = z.object({
5
12
  socket_id: z.string(),
6
13
  types_version_compatible: z.boolean(),
7
14
  package_install_statuses: PackageInstallStatusMapSchema,
8
15
  language_test_statuses: LanguageExecutorDefinitionTestStatusMapSchema,
9
16
  languages_initialised: z.boolean(),
17
+ execution_statistics: z.object({
18
+ global: CodeExecutionStatisticsSchema,
19
+ language_stats: z.array(z.tuple([z.string(), CodeExecutionStatisticsSchema])),
20
+ }),
10
21
  });
11
22
  export { ExecutorInformationSchema };
12
23
  const ExecutorInformationListSchema = z.array(ExecutorInformationSchema);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "code-share-types",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "files": [
5
5
  "/dist"
6
6
  ],