tbarequest 0.0.3 → 0.1.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.
Files changed (35) hide show
  1. package/README.md +0 -4
  2. package/dist/index.d.ts +1 -2
  3. package/dist/index.js +5 -4
  4. package/dist/types/endpoints/districts.d.ts +137 -149
  5. package/dist/types/endpoints/districts.js +23 -23
  6. package/dist/types/endpoints/events.d.ts +1435 -13300
  7. package/dist/types/endpoints/events.js +86 -82
  8. package/dist/types/endpoints/index.d.ts +10 -11
  9. package/dist/types/endpoints/index.js +11 -11
  10. package/dist/types/endpoints/insights.d.ts +23 -28
  11. package/dist/types/endpoints/insights.js +5 -5
  12. package/dist/types/endpoints/matches.d.ts +1079 -12936
  13. package/dist/types/endpoints/matches.js +3 -3
  14. package/dist/types/endpoints/regionalAdvancements.d.ts +27 -31
  15. package/dist/types/endpoints/regionalAdvancements.js +6 -5
  16. package/dist/types/endpoints/status.d.ts +14 -29
  17. package/dist/types/endpoints/status.js +7 -7
  18. package/dist/types/endpoints/teams.d.ts +2614 -26376
  19. package/dist/types/endpoints/teams.js +67 -65
  20. package/dist/types/index.d.ts +4 -3
  21. package/dist/types/schemas/districts.d.ts +22 -23
  22. package/dist/types/schemas/districts.js +23 -23
  23. package/dist/types/schemas/events.d.ts +176 -223
  24. package/dist/types/schemas/events.js +93 -93
  25. package/dist/types/schemas/insights.d.ts +19 -24
  26. package/dist/types/schemas/insights.js +20 -20
  27. package/dist/types/schemas/matches.d.ts +2602 -14850
  28. package/dist/types/schemas/matches.js +483 -526
  29. package/dist/types/schemas/regionalAdvancements.d.ts +20 -27
  30. package/dist/types/schemas/regionalAdvancements.js +21 -21
  31. package/dist/types/schemas/status.d.ts +3 -4
  32. package/dist/types/schemas/status.js +4 -4
  33. package/dist/types/schemas/teams.d.ts +46 -45
  34. package/dist/types/schemas/teams.js +35 -35
  35. package/package.json +3 -3
@@ -1,29 +1,22 @@
1
- import { z } from "zod";
2
- export declare const Regional_Advancement: z.ZodObject<{
3
- cmp: z.ZodBoolean;
4
- cmp_status: z.ZodEnum<{
5
- NotInvited: "NotInvited";
6
- PreQualified: "PreQualified";
7
- EventQualified: "EventQualified";
8
- PoolQualified: "PoolQualified";
9
- Declined: "Declined";
10
- }>;
11
- qualifying_event: z.ZodOptional<z.ZodString>;
12
- qualifying_award_name: z.ZodOptional<z.ZodString>;
13
- qualifying_pool_week: z.ZodOptional<z.ZodInt>;
1
+ export declare const Regional_Advancement: import("arktype/internal/methods/object.ts").ObjectType<{
2
+ cmp: boolean;
3
+ cmp_status: "NotInvited" | "PreQualified" | "EventQualified" | "PoolQualified" | "Declined";
4
+ qualifying_event?: string | undefined;
5
+ qualifying_award_name?: string | undefined;
6
+ qualifying_pool_week?: number | undefined;
14
7
  }, {}>;
15
- export declare const Regional_Ranking: z.ZodObject<{
16
- team_key: z.ZodString;
17
- rank: z.ZodInt;
18
- rookie_bonus: z.ZodOptional<z.ZodInt>;
19
- point_total: z.ZodNumber;
20
- single_event_bonus: z.ZodNumber;
21
- event_points: z.ZodOptional<z.ZodArray<z.ZodObject<{
22
- total: z.ZodNumber;
23
- alliance_points: z.ZodNumber;
24
- elim_points: z.ZodNumber;
25
- award_points: z.ZodNumber;
26
- event_key: z.ZodString;
27
- qual_points: z.ZodNumber;
28
- }, {}>>>;
8
+ export declare const Regional_Ranking: import("arktype/internal/methods/object.ts").ObjectType<{
9
+ team_key: string;
10
+ rank: number;
11
+ point_total: number;
12
+ event_points: {
13
+ total: number;
14
+ alliance_points: number;
15
+ elim_points: number;
16
+ award_points: number;
17
+ event_key: string;
18
+ qual_points: number;
19
+ }[];
20
+ rookie_bonus?: number | undefined;
21
+ single_event_bonus?: number | undefined;
29
22
  }, {}>;
@@ -1,23 +1,23 @@
1
- import { z } from "zod";
2
- export const Regional_Advancement = z.object({
3
- cmp: z.boolean(),
4
- cmp_status: z.enum(["NotInvited", "PreQualified", "EventQualified", "PoolQualified", "Declined"]),
5
- qualifying_event: z.string().optional(),
6
- qualifying_award_name: z.string().optional(),
7
- qualifying_pool_week: z.int().optional(),
1
+ import { type } from "arktype";
2
+ export const Regional_Advancement = type({
3
+ cmp: "boolean",
4
+ cmp_status: "'NotInvited' | 'PreQualified' | 'EventQualified' | 'PoolQualified' | 'Declined'",
5
+ qualifying_event: "string?",
6
+ qualifying_award_name: "string?",
7
+ qualifying_pool_week: "number?",
8
8
  });
9
- export const Regional_Ranking = z.object({
10
- team_key: z.string(),
11
- rank: z.int(),
12
- rookie_bonus: z.int().optional(),
13
- point_total: z.number(),
14
- single_event_bonus: z.number(),
15
- event_points: z.array(z.object({
16
- total: z.number(),
17
- alliance_points: z.number(),
18
- elim_points: z.number(),
19
- award_points: z.number(),
20
- event_key: z.string(),
21
- qual_points: z.number(),
22
- })).optional(),
9
+ export const Regional_Ranking = type({
10
+ team_key: "string",
11
+ rank: "number",
12
+ rookie_bonus: "number?",
13
+ point_total: "number",
14
+ single_event_bonus: "number?",
15
+ event_points: type({
16
+ total: "number",
17
+ alliance_points: "number",
18
+ elim_points: "number",
19
+ award_points: "number",
20
+ event_key: "string",
21
+ qual_points: "number",
22
+ }).array(),
23
23
  });
@@ -1,5 +1,4 @@
1
- import { z } from "zod";
2
- export declare const API_Status_App_Version: z.ZodObject<{
3
- min_app_version: z.ZodInt;
4
- latest_app_version: z.ZodInt;
1
+ export declare const API_Status_App_Version: import("arktype/internal/methods/object.ts").ObjectType<{
2
+ min_app_version: number;
3
+ latest_app_version: number;
5
4
  }, {}>;
@@ -1,5 +1,5 @@
1
- import { z } from "zod";
2
- export const API_Status_App_Version = z.object({
3
- min_app_version: z.int(),
4
- latest_app_version: z.int(),
1
+ import { type } from "arktype";
2
+ export const API_Status_App_Version = type({
3
+ min_app_version: "number",
4
+ latest_app_version: "number",
5
5
  });
@@ -1,51 +1,52 @@
1
- import { z } from "zod";
2
- export declare const Team_Simple: z.ZodObject<{
3
- key: z.ZodString;
4
- team_number: z.ZodInt;
5
- nickname: z.ZodString;
6
- name: z.ZodString;
7
- city: z.ZodNullable<z.ZodString>;
8
- state_prov: z.ZodNullable<z.ZodString>;
9
- country: z.ZodNullable<z.ZodString>;
1
+ export declare const Team_Simple: import("arktype/internal/methods/object.ts").ObjectType<{
2
+ key: string;
3
+ team_number: number;
4
+ nickname: string;
5
+ name: string;
6
+ city: string | null;
7
+ state_prov: string | null;
8
+ country: string | null;
10
9
  }, {}>;
11
- export declare const Team: z.ZodObject<{
12
- key: z.ZodString;
13
- team_number: z.ZodInt;
14
- nickname: z.ZodString;
15
- name: z.ZodString;
16
- city: z.ZodNullable<z.ZodString>;
17
- state_prov: z.ZodNullable<z.ZodString>;
18
- country: z.ZodNullable<z.ZodString>;
19
- postal_code: z.ZodNullable<z.ZodString>;
20
- website: z.ZodOptional<z.ZodNullable<z.ZodString>>;
21
- rookie_year: z.ZodNullable<z.ZodNumber>;
10
+ export declare const Team: import("arktype/internal/methods/object.ts").ObjectType<{
11
+ key: string;
12
+ team_number: number;
13
+ nickname: string;
14
+ name: string;
15
+ city: string | null;
16
+ state_prov: string | null;
17
+ country: string | null;
18
+ postal_code: string | null;
19
+ rookie_year: number | null;
20
+ website?: string | null | undefined;
22
21
  }, {}>;
23
- export declare const Award_Recipient: z.ZodObject<{
24
- team_key: z.ZodNullable<z.ZodString>;
25
- awardee: z.ZodNullable<z.ZodString>;
22
+ export declare const Award_Recipient: import("arktype/internal/methods/object.ts").ObjectType<{
23
+ team_key: string | null;
24
+ awardee: string | null;
26
25
  }, {}>;
27
- export declare const Award: z.ZodObject<{
28
- name: z.ZodString;
29
- award_type: z.ZodInt;
30
- event_key: z.ZodString;
31
- recipient_list: z.ZodArray<z.ZodObject<{
32
- team_key: z.ZodNullable<z.ZodString>;
33
- awardee: z.ZodNullable<z.ZodString>;
34
- }, {}>>;
35
- year: z.ZodInt;
26
+ export declare const Award: import("arktype/internal/methods/object.ts").ObjectType<{
27
+ name: string;
28
+ award_type: number;
29
+ event_key: string;
30
+ recipient_list: {
31
+ team_key: string | null;
32
+ awardee: string | null;
33
+ }[];
34
+ year: number;
36
35
  }, {}>;
37
- export declare const Team_Robot: z.ZodObject<{
38
- year: z.ZodInt;
39
- robot_name: z.ZodString;
40
- key: z.ZodString;
41
- team_key: z.ZodString;
36
+ export declare const Team_Robot: import("arktype/internal/methods/object.ts").ObjectType<{
37
+ year: number;
38
+ robot_name: string;
39
+ key: string;
40
+ team_key: string;
42
41
  }, {}>;
43
- export declare const Media: z.ZodObject<{
44
- type: z.ZodString;
45
- foreign_key: z.ZodString;
46
- details: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodAny, z.ZodAny>>>;
47
- preferred: z.ZodOptional<z.ZodBoolean>;
48
- team_keys: z.ZodArray<z.ZodString>;
49
- direct_url: z.ZodOptional<z.ZodString>;
50
- view_url: z.ZodOptional<z.ZodString>;
42
+ export declare const Media: import("arktype/internal/methods/object.ts").ObjectType<{
43
+ type: string;
44
+ foreign_key: string;
45
+ team_keys: string[];
46
+ details?: {
47
+ [x: string]: unknown;
48
+ } | undefined;
49
+ preferred?: boolean | undefined;
50
+ direct_url?: string | undefined;
51
+ view_url?: string | undefined;
51
52
  }, {}>;
@@ -1,41 +1,41 @@
1
- import { z } from "zod";
2
- export const Team_Simple = z.object({
3
- key: z.string().regex(/frc\d+/),
4
- team_number: z.int(),
5
- nickname: z.string(),
6
- name: z.string(),
7
- city: z.string().nullable(),
8
- state_prov: z.string().nullable(),
9
- country: z.string().nullable(),
1
+ import { type } from "arktype";
2
+ export const Team_Simple = type({
3
+ key: "string",
4
+ team_number: "number",
5
+ nickname: "string",
6
+ name: "string",
7
+ city: "string | null",
8
+ state_prov: "string | null",
9
+ country: "string | null",
10
10
  });
11
- export const Team = Team_Simple.extend({
12
- postal_code: z.string().nullable(),
13
- website: z.string().nullable().optional(),
14
- rookie_year: z.number().nullable(),
11
+ export const Team = Team_Simple.and({
12
+ postal_code: "string | null",
13
+ "website?": "string | null",
14
+ rookie_year: "number | null",
15
15
  });
16
- export const Award_Recipient = z.object({
17
- team_key: z.string().nullable(),
18
- awardee: z.string().nullable(),
16
+ export const Award_Recipient = type({
17
+ team_key: "string | null",
18
+ awardee: "string | null",
19
19
  });
20
- export const Award = z.object({
21
- name: z.string(),
22
- award_type: z.int(),
23
- event_key: z.string(),
24
- recipient_list: z.array(Award_Recipient),
25
- year: z.int(),
20
+ export const Award = type({
21
+ name: "string",
22
+ award_type: "number",
23
+ event_key: "string",
24
+ recipient_list: Award_Recipient.array(),
25
+ year: "number",
26
26
  });
27
- export const Team_Robot = z.object({
28
- year: z.int(),
29
- robot_name: z.string(),
30
- key: z.string(),
31
- team_key: z.string(),
27
+ export const Team_Robot = type({
28
+ year: "number",
29
+ robot_name: "string",
30
+ key: "string",
31
+ team_key: "string",
32
32
  });
33
- export const Media = z.object({
34
- type: z.string(),
35
- foreign_key: z.string(),
36
- details: z.record(z.any(), z.any()).nullable().optional(),
37
- preferred: z.boolean().optional(),
38
- team_keys: z.array(z.string()),
39
- direct_url: z.string().optional(),
40
- view_url: z.string().optional(),
33
+ export const Media = type({
34
+ type: "string",
35
+ foreign_key: "string",
36
+ "details?": type({ "[string]": "unknown" }),
37
+ preferred: "boolean?",
38
+ team_keys: "string[]",
39
+ direct_url: "string?",
40
+ view_url: "string?",
41
41
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tbarequest",
3
- "version": "0.0.3",
3
+ "version": "0.1.0",
4
4
  "description": "A wrapper to fetch data from The Blue Alliance API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -18,11 +18,11 @@
18
18
  "author": "",
19
19
  "license": "MIT",
20
20
  "dependencies": {
21
- "zod": "4.0.0-beta.20250430T185432"
21
+ "arktype": "^2.1.20"
22
22
  },
23
23
  "devDependencies": {
24
24
  "dotenv": "^16.5.0",
25
- "vitest": "^3.1.2"
25
+ "vitest": "^3.1.4"
26
26
  },
27
27
  "scripts": {
28
28
  "test": "vitest --bail 1",