@o-zone/scorer-core 0.1.4 → 0.1.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.
@@ -1,34 +1,3 @@
1
- import * as z from 'zod';
2
- export declare const Competition: z.ZodObject<{
3
- id: z.ZodNumber;
4
- name: z.ZodString;
5
- }, z.core.$loose>;
6
- export declare const CompetitionScoreRequest: z.ZodObject<{
7
- competition: z.ZodObject<{
8
- id: z.ZodNumber;
9
- name: z.ZodString;
10
- }, z.core.$loose>;
11
- classes: z.ZodArray<z.ZodObject<{
12
- id: z.ZodNumber;
13
- name: z.ZodString;
14
- short_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15
- entries: z.ZodArray<z.ZodObject<{
16
- id: z.ZodNumber;
17
- organization: z.ZodOptional<z.ZodNullable<z.ZodObject<{
18
- id: z.ZodNumber;
19
- name: z.ZodString;
20
- club_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
21
- school_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
22
- onz_region: z.ZodOptional<z.ZodNullable<z.ZodObject<{
23
- id: z.ZodString;
24
- name: z.ZodString;
25
- }, z.core.$strip>>>;
26
- }, z.core.$loose>>>;
27
- race_runs: z.ZodArray<z.ZodObject<{
28
- score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
29
- }, z.core.$loose>>;
30
- }, z.core.$loose>>;
31
- }, z.core.$loose>>;
32
- config: z.ZodRecord<z.ZodString, z.ZodAny>;
33
- }, z.core.$loose>;
1
+ export * from './request';
2
+ export * from './response';
34
3
  //# 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;AAwCzB,eAAO,MAAM,WAAW;;;iBAKd,CAAC;AAEX,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAM1B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/competition/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC"}
@@ -1,48 +1,3 @@
1
- import * as z from 'zod';
2
- const Organization = z
3
- .object({
4
- id: z.number(),
5
- name: z.string(),
6
- club_code: z.string().nullish(),
7
- school_code: z.string().nullish(),
8
- onz_region: z
9
- .object({
10
- id: z.string(),
11
- name: z.string(),
12
- })
13
- .nullish(),
14
- })
15
- .loose();
16
- const CompetitionEntry = z
17
- .object({
18
- id: z.number(),
19
- organization: Organization.nullish(),
20
- race_runs: z.array(z
21
- .object({
22
- score: z.number().nullish(),
23
- })
24
- .loose()),
25
- })
26
- .loose();
27
- const CompetitionClass = z
28
- .object({
29
- id: z.number(),
30
- name: z.string(),
31
- short_name: z.string().nullish(),
32
- entries: z.array(CompetitionEntry),
33
- })
34
- .loose();
35
- export const Competition = z
36
- .object({
37
- id: z.number(),
38
- name: z.string(),
39
- })
40
- .loose();
41
- export const CompetitionScoreRequest = z
42
- .object({
43
- competition: Competition,
44
- classes: z.array(CompetitionClass),
45
- config: z.record(z.string(), z.any()),
46
- })
47
- .loose();
1
+ export * from './request';
2
+ export * from './response';
48
3
  //# 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;AAEzB,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,OAAO,EAAE;IAC/B,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IACjC,UAAU,EAAE,CAAC;SACV,MAAM,CAAC;QACN,EAA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":"","sources":["../../src/competition/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC"}
@@ -0,0 +1,32 @@
1
+ import * as z from 'zod';
2
+ export declare const CompetitionScoreRequest: z.ZodObject<{
3
+ competition: z.ZodObject<{
4
+ id: z.ZodNumber;
5
+ name: z.ZodString;
6
+ }, z.core.$loose>;
7
+ classes: z.ZodArray<z.ZodObject<{
8
+ id: z.ZodNumber;
9
+ name: z.ZodString;
10
+ short_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
11
+ entries: z.ZodArray<z.ZodObject<{
12
+ id: z.ZodNumber;
13
+ organization: z.ZodOptional<z.ZodNullable<z.ZodObject<{
14
+ id: z.ZodNumber;
15
+ name: z.ZodString;
16
+ club_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
17
+ school_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
18
+ onz_region: z.ZodOptional<z.ZodNullable<z.ZodObject<{
19
+ id: z.ZodString;
20
+ name: z.ZodString;
21
+ }, z.core.$strip>>>;
22
+ }, z.core.$loose>>>;
23
+ race_runs: z.ZodArray<z.ZodObject<{
24
+ score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
25
+ tiebreak_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
26
+ run_id: z.ZodNumber;
27
+ }, z.core.$loose>>;
28
+ }, z.core.$loose>>;
29
+ }, z.core.$loose>>;
30
+ config: z.ZodRecord<z.ZodString, z.ZodAny>;
31
+ }, z.core.$loose>;
32
+ //# sourceMappingURL=request.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/competition/request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAiDzB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAM1B,CAAC"}
@@ -0,0 +1,50 @@
1
+ import * as z from 'zod';
2
+ const Organization = z
3
+ .object({
4
+ id: z.number(),
5
+ name: z.string(),
6
+ club_code: z.string().nullish(),
7
+ school_code: z.string().nullish(),
8
+ onz_region: z
9
+ .object({
10
+ id: z.string(),
11
+ name: z.string(),
12
+ })
13
+ .nullish(),
14
+ })
15
+ .loose();
16
+ const CompetitionEntry = z
17
+ .object({
18
+ id: z.number(),
19
+ organization: Organization.nullish(),
20
+ race_runs: z.array(z
21
+ .object({
22
+ score: z.number().nullish(),
23
+ tiebreak_score: z.number().nullish(),
24
+ run_id: z.number(),
25
+ })
26
+ .loose()),
27
+ })
28
+ .loose();
29
+ const CompetitionClass = z
30
+ .object({
31
+ id: z.number(),
32
+ name: z.string(),
33
+ short_name: z.string().nullish(),
34
+ entries: z.array(CompetitionEntry),
35
+ })
36
+ .loose();
37
+ const Competition = z
38
+ .object({
39
+ id: z.number(),
40
+ name: z.string(),
41
+ })
42
+ .loose();
43
+ export const CompetitionScoreRequest = z
44
+ .object({
45
+ competition: Competition,
46
+ classes: z.array(CompetitionClass),
47
+ config: z.record(z.string(), z.any()),
48
+ })
49
+ .loose();
50
+ //# sourceMappingURL=request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.js","sourceRoot":"","sources":["../../src/competition/request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,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,OAAO,EAAE;IAC/B,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IACjC,UAAU,EAAE,CAAC;SACV,MAAM,CAAC;QACN,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;QACd,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;KACjB,CAAC;SACD,OAAO,EAAE;C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2
+ competition_entry_id: number;
3
+ score?: number | null;
4
+ tiebreak_score?: number[] | null;
5
+ };
6
+ //# sourceMappingURL=response.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../../src/competition/response.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAAG;IAClC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;CAClC,CAAC"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response.js","sourceRoot":"","sources":["../../src/competition/response.ts"],"names":[],"mappings":""}
@@ -1,155 +1,3 @@
1
- import * as z from 'zod';
2
- export declare const Event: z.ZodObject<{
3
- id: z.ZodNumber;
4
- name: z.ZodString;
5
- classification: z.ZodEnum<{
6
- local: "local";
7
- regional: "regional";
8
- national: "national";
9
- international: "international";
10
- }>;
11
- }, z.core.$loose>;
12
- export declare const Race: z.ZodObject<{
13
- event: z.ZodObject<{
14
- id: z.ZodNumber;
15
- name: z.ZodString;
16
- classification: z.ZodEnum<{
17
- local: "local";
18
- regional: "regional";
19
- national: "national";
20
- international: "international";
21
- }>;
22
- }, z.core.$loose>;
23
- race_format: z.ZodOptional<z.ZodNullable<z.ZodObject<{
24
- name: z.ZodString;
25
- race_discipline: z.ZodEnum<{
26
- FootO: "FootO";
27
- }>;
28
- race_type: z.ZodEnum<{
29
- standard: "standard";
30
- }>;
31
- }, z.core.$strip>>>;
32
- race_class: z.ZodArray<z.ZodObject<{
33
- name: z.ZodString;
34
- course_variant_id: z.ZodNumber;
35
- race_format: z.ZodOptional<z.ZodNullable<z.ZodObject<{
36
- name: z.ZodString;
37
- race_discipline: z.ZodEnum<{
38
- FootO: "FootO";
39
- MTBO: "MTBO";
40
- Other: "Other";
41
- }>;
42
- race_type: z.ZodEnum<{
43
- standard: "standard";
44
- relay: "relay";
45
- rogaine: "rogaine";
46
- }>;
47
- }, z.core.$strip>>>;
48
- race_entry: z.ZodArray<z.ZodObject<{
49
- status: z.ZodEnum<{
50
- entered: "entered";
51
- cancelled: "cancelled";
52
- implied: "implied";
53
- "did-not-start": "did-not-start";
54
- }>;
55
- adhoc_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
56
- is_group: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
57
- athlete: z.ZodOptional<z.ZodNullable<z.ZodObject<{
58
- id: z.ZodNumber;
59
- club_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
60
- is_nz_eligible: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>;
61
- }, z.core.$loose>>>;
62
- race_run: z.ZodArray<z.ZodObject<{
63
- id: z.ZodNumber;
64
- run_status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
65
- class_position: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
66
- race_timing: z.ZodObject<{
67
- duration: z.ZodOptional<z.ZodNullable<z.ZodString>>;
68
- }, z.core.$loose>;
69
- }, z.core.$loose>>;
70
- }, z.core.$loose>>;
71
- }, z.core.$loose>>;
72
- }, z.core.$loose>;
73
- export declare const Competition: z.ZodObject<{
74
- id: z.ZodNumber;
75
- name: z.ZodString;
76
- competition_classes: z.ZodArray<z.ZodObject<{
77
- id: z.ZodNumber;
78
- name: z.ZodString;
79
- short_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
80
- }, z.core.$loose>>;
81
- }, z.core.$loose>;
82
- export declare const RaceScoreRequest: z.ZodObject<{
83
- competition: z.ZodObject<{
84
- id: z.ZodNumber;
85
- name: z.ZodString;
86
- competition_classes: z.ZodArray<z.ZodObject<{
87
- id: z.ZodNumber;
88
- name: z.ZodString;
89
- short_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
90
- }, z.core.$loose>>;
91
- }, z.core.$loose>;
92
- race: z.ZodObject<{
93
- event: z.ZodObject<{
94
- id: z.ZodNumber;
95
- name: z.ZodString;
96
- classification: z.ZodEnum<{
97
- local: "local";
98
- regional: "regional";
99
- national: "national";
100
- international: "international";
101
- }>;
102
- }, z.core.$loose>;
103
- race_format: z.ZodOptional<z.ZodNullable<z.ZodObject<{
104
- name: z.ZodString;
105
- race_discipline: z.ZodEnum<{
106
- FootO: "FootO";
107
- }>;
108
- race_type: z.ZodEnum<{
109
- standard: "standard";
110
- }>;
111
- }, z.core.$strip>>>;
112
- race_class: z.ZodArray<z.ZodObject<{
113
- name: z.ZodString;
114
- course_variant_id: z.ZodNumber;
115
- race_format: z.ZodOptional<z.ZodNullable<z.ZodObject<{
116
- name: z.ZodString;
117
- race_discipline: z.ZodEnum<{
118
- FootO: "FootO";
119
- MTBO: "MTBO";
120
- Other: "Other";
121
- }>;
122
- race_type: z.ZodEnum<{
123
- standard: "standard";
124
- relay: "relay";
125
- rogaine: "rogaine";
126
- }>;
127
- }, z.core.$strip>>>;
128
- race_entry: z.ZodArray<z.ZodObject<{
129
- status: z.ZodEnum<{
130
- entered: "entered";
131
- cancelled: "cancelled";
132
- implied: "implied";
133
- "did-not-start": "did-not-start";
134
- }>;
135
- adhoc_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
136
- is_group: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
137
- athlete: z.ZodOptional<z.ZodNullable<z.ZodObject<{
138
- id: z.ZodNumber;
139
- club_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
140
- is_nz_eligible: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>;
141
- }, z.core.$loose>>>;
142
- race_run: z.ZodArray<z.ZodObject<{
143
- id: z.ZodNumber;
144
- run_status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
145
- class_position: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
146
- race_timing: z.ZodObject<{
147
- duration: z.ZodOptional<z.ZodNullable<z.ZodString>>;
148
- }, z.core.$loose>;
149
- }, z.core.$loose>>;
150
- }, z.core.$loose>>;
151
- }, z.core.$loose>>;
152
- }, z.core.$loose>;
153
- config: z.ZodRecord<z.ZodString, z.ZodAny>;
154
- }, z.core.$loose>;
1
+ export * from './request';
2
+ export * from './response';
155
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
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,KAAK;;;;;;;;;iBAMR,CAAC;AAEX,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMP,CAAC;AAUX,eAAO,MAAM,WAAW;;;;;;;;iBAMd,CAAC;AAEX,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMnB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/race/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC"}
@@ -1,87 +1,3 @@
1
- import * as z from 'zod';
2
- const RaceFormat = z.object({
3
- name: z.string(),
4
- race_discipline: z.enum(['FootO']),
5
- race_type: z.enum(['standard']),
6
- });
7
- const RaceClassFormat = z.object({
8
- name: z.string(),
9
- race_discipline: z.enum(['FootO', 'MTBO', 'Other']),
10
- race_type: z.enum(['standard', 'relay', 'rogaine']),
11
- });
12
- const RaceTiming = z
13
- .object({
14
- duration: z
15
- .string()
16
- .regex(/^\d{2}:\d{2}:\d{2}$/)
17
- .nullish(),
18
- })
19
- .loose();
20
- const RaceRun = z
21
- .object({
22
- id: z.number(),
23
- run_status: z.string().nullish(),
24
- class_position: z.number().nullish(),
25
- race_timing: RaceTiming,
26
- })
27
- .loose();
28
- const Athlete = z
29
- .object({
30
- id: z.number(),
31
- club_id: z.number().nullish(),
32
- is_nz_eligible: z.boolean().nullish().default(true),
33
- })
34
- .loose();
35
- const RaceEntry = z
36
- .object({
37
- status: z.enum(['entered', 'cancelled', 'implied', 'did-not-start']),
38
- adhoc_name: z.string().nullish(),
39
- is_group: z.boolean().nullish(),
40
- athlete: Athlete.nullish(),
41
- race_run: z.array(RaceRun),
42
- })
43
- .loose();
44
- const RaceClass = z
45
- .object({
46
- name: z.string(),
47
- course_variant_id: z.number(),
48
- race_format: RaceClassFormat.nullish(),
49
- race_entry: z.array(RaceEntry),
50
- })
51
- .loose();
52
- export const Event = z
53
- .object({
54
- id: z.number(),
55
- name: z.string(),
56
- classification: z.enum(['local', 'regional', 'national', 'international']),
57
- })
58
- .loose();
59
- export const Race = z
60
- .object({
61
- event: Event,
62
- race_format: RaceFormat.nullish(),
63
- race_class: z.array(RaceClass),
64
- })
65
- .loose();
66
- const CompetitionClass = z
67
- .object({
68
- id: z.number(),
69
- name: z.string(),
70
- short_name: z.string().nullish(),
71
- })
72
- .loose();
73
- export const Competition = z
74
- .object({
75
- id: z.number(),
76
- name: z.string(),
77
- competition_classes: z.array(CompetitionClass),
78
- })
79
- .loose();
80
- export const RaceScoreRequest = z
81
- .object({
82
- competition: Competition,
83
- race: Race,
84
- config: z.record(z.string(), z.any()),
85
- })
86
- .loose();
1
+ export * from './request';
2
+ export * from './response';
87
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/race/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,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,CAA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AW,GAAG,CAAC;KACzB,MAAM,CAAC;IACN,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,mBAAmB,EAAE,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC;CAC/C,CAAC;KACD,KAAK,EAAE,CAAC;AAEX,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC;KAC9B,MAAM,CAAC;IACN,WAAW,EAAE,WAAW;IACxB,IAAI,EAAE,IAAI;IACV,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC;CACtC,CAAC;KACD,KAAK,EAAE,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/race/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC"}
@@ -0,0 +1,77 @@
1
+ import * as z from 'zod';
2
+ export declare const RaceScoreRequest: z.ZodObject<{
3
+ competition: z.ZodObject<{
4
+ id: z.ZodNumber;
5
+ name: z.ZodString;
6
+ competition_classes: z.ZodArray<z.ZodObject<{
7
+ id: z.ZodNumber;
8
+ name: z.ZodString;
9
+ short_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10
+ }, z.core.$loose>>;
11
+ }, z.core.$loose>;
12
+ config: z.ZodRecord<z.ZodString, z.ZodAny>;
13
+ race: z.ZodObject<{
14
+ event: z.ZodObject<{
15
+ id: z.ZodNumber;
16
+ name: z.ZodString;
17
+ classification: z.ZodEnum<{
18
+ local: "local";
19
+ regional: "regional";
20
+ national: "national";
21
+ international: "international";
22
+ }>;
23
+ }, z.core.$loose>;
24
+ race_format: z.ZodOptional<z.ZodNullable<z.ZodObject<{
25
+ name: z.ZodString;
26
+ race_discipline: z.ZodEnum<{
27
+ FootO: "FootO";
28
+ }>;
29
+ race_type: z.ZodEnum<{
30
+ standard: "standard";
31
+ }>;
32
+ }, z.core.$strip>>>;
33
+ race_class: z.ZodArray<z.ZodObject<{
34
+ name: z.ZodString;
35
+ course_variant_id: z.ZodNumber;
36
+ race_format: z.ZodOptional<z.ZodNullable<z.ZodObject<{
37
+ name: z.ZodString;
38
+ race_discipline: z.ZodEnum<{
39
+ FootO: "FootO";
40
+ MTBO: "MTBO";
41
+ Other: "Other";
42
+ }>;
43
+ race_type: z.ZodEnum<{
44
+ standard: "standard";
45
+ relay: "relay";
46
+ rogaine: "rogaine";
47
+ }>;
48
+ }, z.core.$strip>>>;
49
+ race_entry: z.ZodArray<z.ZodObject<{
50
+ status: z.ZodEnum<{
51
+ entered: "entered";
52
+ cancelled: "cancelled";
53
+ implied: "implied";
54
+ "did-not-start": "did-not-start";
55
+ }>;
56
+ adhoc_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
57
+ is_group: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
58
+ athlete: z.ZodOptional<z.ZodNullable<z.ZodObject<{
59
+ id: z.ZodNumber;
60
+ club_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
61
+ is_nz_eligible: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>>;
62
+ }, z.core.$loose>>>;
63
+ race_run: z.ZodArray<z.ZodObject<{
64
+ id: z.ZodNumber;
65
+ run_status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
66
+ class_position: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
67
+ race_timing: z.ZodObject<{
68
+ duration: z.ZodOptional<z.ZodNullable<z.ZodString>>;
69
+ }, z.core.$loose>;
70
+ }, z.core.$loose>>;
71
+ }, z.core.$loose>>;
72
+ }, z.core.$loose>>;
73
+ }, z.core.$loose>;
74
+ score: z.ZodDefault<z.ZodBoolean>;
75
+ tiebreak: z.ZodDefault<z.ZodBoolean>;
76
+ }, z.core.$loose>;
77
+ //# sourceMappingURL=request.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/race/request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AA2FzB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAQnB,CAAC"}
@@ -0,0 +1,89 @@
1
+ import * as z from 'zod';
2
+ const RaceFormat = z.object({
3
+ name: z.string(),
4
+ race_discipline: z.enum(['FootO']),
5
+ race_type: z.enum(['standard']),
6
+ });
7
+ const RaceClassFormat = z.object({
8
+ name: z.string(),
9
+ race_discipline: z.enum(['FootO', 'MTBO', 'Other']),
10
+ race_type: z.enum(['standard', 'relay', 'rogaine']),
11
+ });
12
+ const RaceTiming = z
13
+ .object({
14
+ duration: z
15
+ .string()
16
+ .regex(/^\d{2}:\d{2}:\d{2}$/)
17
+ .nullish(),
18
+ })
19
+ .loose();
20
+ const RaceRun = z
21
+ .object({
22
+ id: z.number(),
23
+ run_status: z.string().nullish(),
24
+ class_position: z.number().nullish(),
25
+ race_timing: RaceTiming,
26
+ })
27
+ .loose();
28
+ const Athlete = z
29
+ .object({
30
+ id: z.number(),
31
+ club_id: z.number().nullish(),
32
+ is_nz_eligible: z.boolean().nullish().default(true),
33
+ })
34
+ .loose();
35
+ const RaceEntry = z
36
+ .object({
37
+ status: z.enum(['entered', 'cancelled', 'implied', 'did-not-start']),
38
+ adhoc_name: z.string().nullish(),
39
+ is_group: z.boolean().nullish(),
40
+ athlete: Athlete.nullish(),
41
+ race_run: z.array(RaceRun),
42
+ })
43
+ .loose();
44
+ const RaceClass = z
45
+ .object({
46
+ name: z.string(),
47
+ course_variant_id: z.number(),
48
+ race_format: RaceClassFormat.nullish(),
49
+ race_entry: z.array(RaceEntry),
50
+ })
51
+ .loose();
52
+ const Event = z
53
+ .object({
54
+ id: z.number(),
55
+ name: z.string(),
56
+ classification: z.enum(['local', 'regional', 'national', 'international']),
57
+ })
58
+ .loose();
59
+ const Race = z
60
+ .object({
61
+ event: Event,
62
+ race_format: RaceFormat.nullish(),
63
+ race_class: z.array(RaceClass),
64
+ })
65
+ .loose();
66
+ const CompetitionClass = z
67
+ .object({
68
+ id: z.number(),
69
+ name: z.string(),
70
+ short_name: z.string().nullish(),
71
+ })
72
+ .loose();
73
+ const Competition = z
74
+ .object({
75
+ id: z.number(),
76
+ name: z.string(),
77
+ competition_classes: z.array(CompetitionClass),
78
+ })
79
+ .loose();
80
+ export const RaceScoreRequest = z
81
+ .object({
82
+ competition: Competition,
83
+ config: z.record(z.string(), z.any()),
84
+ race: Race,
85
+ score: z.boolean().default(true),
86
+ tiebreak: z.boolean().default(false),
87
+ })
88
+ .loose();
89
+ //# sourceMappingURL=request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.js","sourceRoot":"","sources":["../../src/race/request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,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,EAAE,OAAO,CAAC,CAAC;IACnD,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;CACpD,CAAC,CAAC;AAEH,MAAM,UAAU,GAAG,CAAC;KACjB,MAAM,CAAC;IACN,QAAQ,EAAE,CAAC;SACR,MAAM,EAAE;SACR,KAAK,CAAC,q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AO,CAAC,IAAI,CAAC;IAChC,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;CACrC,CAAC;KACD,KAAK,EAAE,CAAC"}
@@ -0,0 +1,11 @@
1
+ export type RaceEntryScore = {
2
+ competition_class_id: number;
3
+ athlete_id?: number;
4
+ adhoc_name?: string;
5
+ is_group?: boolean;
6
+ organization_id?: number;
7
+ race_run_id: number;
8
+ score?: number | null;
9
+ tiebreak_score?: number | null;
10
+ };
11
+ //# sourceMappingURL=response.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../../src/race/response.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG;IAC3B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC,CAAC"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response.js","sourceRoot":"","sources":["../../src/race/response.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@o-zone/scorer-core",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Orienteering scoring core library with modular exports",
5
5
  "repository": {
6
6
  "type": "git",