tbarequest 0.2.0 → 1.0.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 (37) hide show
  1. package/package.json +6 -6
  2. package/dist/index.d.ts +0 -3
  3. package/dist/index.js +0 -69
  4. package/dist/types/endpoints/districts.d.ts +0 -161
  5. package/dist/types/endpoints/districts.js +0 -50
  6. package/dist/types/endpoints/events.d.ts +0 -1500
  7. package/dist/types/endpoints/events.js +0 -153
  8. package/dist/types/endpoints/index.d.ts +0 -25
  9. package/dist/types/endpoints/index.js +0 -25
  10. package/dist/types/endpoints/insights.d.ts +0 -29
  11. package/dist/types/endpoints/insights.js +0 -12
  12. package/dist/types/endpoints/matches.d.ts +0 -1101
  13. package/dist/types/endpoints/matches.js +0 -20
  14. package/dist/types/endpoints/regionalAdvancements.d.ts +0 -32
  15. package/dist/types/endpoints/regionalAdvancements.js +0 -12
  16. package/dist/types/endpoints/status.d.ts +0 -19
  17. package/dist/types/endpoints/status.js +0 -16
  18. package/dist/types/endpoints/teams.d.ts +0 -2713
  19. package/dist/types/endpoints/teams.js +0 -162
  20. package/dist/types/index.d.ts +0 -11
  21. package/dist/types/index.js +0 -1
  22. package/dist/types/schemas/districts.d.ts +0 -25
  23. package/dist/types/schemas/districts.js +0 -26
  24. package/dist/types/schemas/events.d.ts +0 -186
  25. package/dist/types/schemas/events.js +0 -107
  26. package/dist/types/schemas/insights.d.ts +0 -21
  27. package/dist/types/schemas/insights.js +0 -22
  28. package/dist/types/schemas/matches.d.ts +0 -2649
  29. package/dist/types/schemas/matches.js +0 -540
  30. package/dist/types/schemas/regionalAdvancements.d.ts +0 -22
  31. package/dist/types/schemas/regionalAdvancements.js +0 -23
  32. package/dist/types/schemas/status.d.ts +0 -4
  33. package/dist/types/schemas/status.js +0 -5
  34. package/dist/types/schemas/teams.d.ts +0 -52
  35. package/dist/types/schemas/teams.js +0 -41
  36. package/dist/utils.d.ts +0 -11
  37. package/dist/utils.js +0 -9
@@ -1,41 +0,0 @@
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
- });
11
- export const Team = Team_Simple.and({
12
- postal_code: "string | null",
13
- "website?": "string | null",
14
- rookie_year: "number | null",
15
- });
16
- export const Award_Recipient = type({
17
- team_key: "string | null",
18
- awardee: "string | null",
19
- });
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
- });
27
- export const Team_Robot = type({
28
- year: "number",
29
- robot_name: "string",
30
- key: "string",
31
- team_key: "string",
32
- });
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
- });
package/dist/utils.d.ts DELETED
@@ -1,11 +0,0 @@
1
- type Success<T> = {
2
- data: T;
3
- error: null;
4
- };
5
- type Failure<E> = {
6
- data: null;
7
- error: E;
8
- };
9
- export type Result<T, E = Error> = Success<T> | Failure<E>;
10
- export declare function tryCatch<T, E = Error>(promise: Promise<T>): Promise<Result<T, E>>;
11
- export {};
package/dist/utils.js DELETED
@@ -1,9 +0,0 @@
1
- export async function tryCatch(promise) {
2
- try {
3
- const data = await promise;
4
- return { data, error: null };
5
- }
6
- catch (error) {
7
- return { data: null, error: error };
8
- }
9
- }