@o-zone/scorer-core 0.0.4 → 0.0.6
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/common/schema.d.ts +10 -0
- package/dist/common/schema.d.ts.map +1 -0
- package/dist/common/schema.js +15 -0
- package/dist/common/schema.js.map +1 -0
- package/dist/competition/index.d.ts +31 -2
- package/dist/competition/index.d.ts.map +1 -1
- package/dist/competition/index.js +37 -1
- package/dist/competition/index.js.map +1 -1
- package/dist/race/index.d.ts +3 -6
- package/dist/race/index.d.ts.map +1 -1
- package/dist/race/index.js +2 -11
- package/dist/race/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
export declare const Competition: z.ZodObject<{
|
|
3
|
+
id: z.ZodNumber;
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
competition_class: z.ZodArray<z.ZodObject<{
|
|
6
|
+
id: z.ZodNumber;
|
|
7
|
+
short_name: z.ZodString;
|
|
8
|
+
}, z.core.$loose>>;
|
|
9
|
+
}, z.core.$loose>;
|
|
10
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/common/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AASzB,eAAO,MAAM,WAAW;;;;;;;iBAMd,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
const CompetitionClass = z
|
|
3
|
+
.object({
|
|
4
|
+
id: z.number(),
|
|
5
|
+
short_name: z.string(),
|
|
6
|
+
})
|
|
7
|
+
.loose();
|
|
8
|
+
export const Competition = z
|
|
9
|
+
.object({
|
|
10
|
+
id: z.number(),
|
|
11
|
+
name: z.string(),
|
|
12
|
+
competition_class: z.array(CompetitionClass),
|
|
13
|
+
})
|
|
14
|
+
.loose();
|
|
15
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/common/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,MAAM,gBAAgB,GAAG,CAAC;KACvB,MAAM,CAAC;IACN,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;CACvB,CAAC;KACD,KAAK,EAAE,CAAC;AAEX,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC;KACzB,MAAM,CAAC;IACN,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,iBAAiB,EAAE,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC;CAC7C,CAAC;KACD,KAAK,EAAE,CAAC"}
|
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
2
|
+
export declare const CompetitionScoreRequest: z.ZodObject<{
|
|
3
|
+
competition: z.ZodObject<{
|
|
4
|
+
id: z.ZodNumber;
|
|
5
|
+
name: z.ZodString;
|
|
6
|
+
competition_class: z.ZodArray<z.ZodObject<{
|
|
7
|
+
id: z.ZodNumber;
|
|
8
|
+
short_name: z.ZodString;
|
|
9
|
+
}, z.core.$loose>>;
|
|
10
|
+
}, z.core.$loose>;
|
|
11
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
12
|
+
id: z.ZodNumber;
|
|
13
|
+
competition_class: z.ZodNullable<z.ZodObject<{
|
|
14
|
+
id: z.ZodNumber;
|
|
15
|
+
name: z.ZodString;
|
|
16
|
+
short_name: z.ZodNullable<z.ZodString>;
|
|
17
|
+
}, z.core.$loose>>;
|
|
18
|
+
organization: z.ZodNullable<z.ZodObject<{
|
|
19
|
+
id: z.ZodNumber;
|
|
20
|
+
name: z.ZodString;
|
|
21
|
+
club_code: z.ZodNullable<z.ZodString>;
|
|
22
|
+
school_code: z.ZodNullable<z.ZodString>;
|
|
23
|
+
onz_region: z.ZodNullable<z.ZodObject<{
|
|
24
|
+
id: z.ZodNumber;
|
|
25
|
+
name: z.ZodString;
|
|
26
|
+
}, z.core.$strip>>;
|
|
27
|
+
}, z.core.$loose>>;
|
|
28
|
+
race_runs: z.ZodArray<z.ZodObject<{
|
|
29
|
+
score: z.ZodNullable<z.ZodNumber>;
|
|
30
|
+
}, z.core.$loose>>;
|
|
31
|
+
}, z.core.$loose>>;
|
|
32
|
+
config: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
4
33
|
}, z.core.$loose>;
|
|
5
34
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/competition/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/competition/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAyCzB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAM1B,CAAC"}
|
|
@@ -1,7 +1,43 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
|
-
|
|
2
|
+
import { Competition } from '../common/schema';
|
|
3
|
+
const CompetitionClass = z
|
|
3
4
|
.object({
|
|
4
5
|
id: z.number(),
|
|
6
|
+
name: z.string(),
|
|
7
|
+
short_name: z.string().nullable(),
|
|
8
|
+
})
|
|
9
|
+
.loose();
|
|
10
|
+
const Organization = z
|
|
11
|
+
.object({
|
|
12
|
+
id: z.number(),
|
|
13
|
+
name: z.string(),
|
|
14
|
+
club_code: z.string().nullable(),
|
|
15
|
+
school_code: z.string().nullable(),
|
|
16
|
+
onz_region: z
|
|
17
|
+
.object({
|
|
18
|
+
id: z.number(),
|
|
19
|
+
name: z.string(),
|
|
20
|
+
})
|
|
21
|
+
.nullable(),
|
|
22
|
+
})
|
|
23
|
+
.loose();
|
|
24
|
+
const CompetitionEntry = z
|
|
25
|
+
.object({
|
|
26
|
+
id: z.number(),
|
|
27
|
+
competition_class: CompetitionClass.nullable(),
|
|
28
|
+
organization: Organization.nullable(),
|
|
29
|
+
race_runs: z.array(z
|
|
30
|
+
.object({
|
|
31
|
+
score: z.number().nullable(),
|
|
32
|
+
})
|
|
33
|
+
.loose()),
|
|
34
|
+
})
|
|
35
|
+
.loose();
|
|
36
|
+
export const CompetitionScoreRequest = z
|
|
37
|
+
.object({
|
|
38
|
+
competition: Competition,
|
|
39
|
+
entries: z.array(CompetitionEntry),
|
|
40
|
+
config: z.record(z.string(), z.any()),
|
|
5
41
|
})
|
|
6
42
|
.loose();
|
|
7
43
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/competition/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/competition/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,MAAM,gBAAgB,GAAG,CAAC;KACvB,MAAM,CAAC;IACN,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAClC,CAAC;KACD,KAAK,EAAE,CAAC;AAEX,MAAM,YAAY,GAAG,CAAC;KACnB,MAAM,CAAC;IACN,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,UAAU,EAAE,CAAC;SACV,MAAM,CAAC;QACN,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;QACd,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;KACjB,CAAC;SACD,QAAQ,EAAE;CACd,CAAC;KACD,KAAK,EAAE,CAAC;AAEX,MAAM,gBAAgB,GAAG,CAAC;KACvB,MAAM,CAAC;IACN,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,iBAAiB,EAAE,gBAAgB,CAAC,QAAQ,EAAE;IAC9C,YAAY,EAAE,YAAY,CAAC,QAAQ,EAAE;IACrC,SAAS,EAAE,CAAC,CAAC,KAAK,CAChB,CAAC;SACE,MAAM,CAAC;QACN,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAC7B,CAAC;SACD,KAAK,EAAE,CACX;CACF,CAAC;KACD,KAAK,EAAE,CAAC;AAEX,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC;KACrC,MAAM,CAAC;IACN,WAAW,EAAE,WAAW;IACxB,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC;IAClC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC;CACtC,CAAC;KACD,KAAK,EAAE,CAAC"}
|
package/dist/race/index.d.ts
CHANGED
|
@@ -49,14 +49,10 @@ export declare const Race: z.ZodObject<{
|
|
|
49
49
|
}, z.core.$loose>>;
|
|
50
50
|
}, z.core.$loose>>;
|
|
51
51
|
}, z.core.$loose>;
|
|
52
|
-
export declare const Competition: z.ZodObject<{
|
|
53
|
-
competition_class: z.ZodArray<z.ZodObject<{
|
|
54
|
-
id: z.ZodNumber;
|
|
55
|
-
short_name: z.ZodString;
|
|
56
|
-
}, z.core.$loose>>;
|
|
57
|
-
}, z.core.$loose>;
|
|
58
52
|
export declare const RaceScoreRequest: z.ZodObject<{
|
|
59
53
|
competition: z.ZodObject<{
|
|
54
|
+
id: z.ZodNumber;
|
|
55
|
+
name: z.ZodString;
|
|
60
56
|
competition_class: z.ZodArray<z.ZodObject<{
|
|
61
57
|
id: z.ZodNumber;
|
|
62
58
|
short_name: z.ZodString;
|
|
@@ -112,5 +108,6 @@ export declare const RaceScoreRequest: z.ZodObject<{
|
|
|
112
108
|
}, z.core.$loose>>;
|
|
113
109
|
}, z.core.$loose>>;
|
|
114
110
|
}, z.core.$loose>;
|
|
111
|
+
config: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
115
112
|
}, z.core.$loose>;
|
|
116
113
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/race/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/race/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/race/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AA2DzB,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAKP,CAAC;AAEX,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMnB,CAAC"}
|
package/dist/race/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
|
+
import { Competition } from '../common/schema';
|
|
2
3
|
const RaceFormat = z.object({
|
|
3
4
|
name: z.string(),
|
|
4
5
|
race_discipline: z.enum(['FootO']),
|
|
@@ -54,21 +55,11 @@ export const Race = z
|
|
|
54
55
|
race_class: z.array(RaceClass),
|
|
55
56
|
})
|
|
56
57
|
.loose();
|
|
57
|
-
const CompetitionClass = z
|
|
58
|
-
.object({
|
|
59
|
-
id: z.number(),
|
|
60
|
-
short_name: z.string(),
|
|
61
|
-
})
|
|
62
|
-
.loose();
|
|
63
|
-
export const Competition = z
|
|
64
|
-
.object({
|
|
65
|
-
competition_class: z.array(CompetitionClass),
|
|
66
|
-
})
|
|
67
|
-
.loose();
|
|
68
58
|
export const RaceScoreRequest = z
|
|
69
59
|
.object({
|
|
70
60
|
competition: Competition,
|
|
71
61
|
race: Race,
|
|
62
|
+
config: z.record(z.string(), z.any()),
|
|
72
63
|
})
|
|
73
64
|
.loose();
|
|
74
65
|
//# sourceMappingURL=index.js.map
|
package/dist/race/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/race/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/race/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,eAAe,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC;IAClC,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,CAAC;CAChC,CAAC,CAAC;AAEH,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,eAAe,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,MAAM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