@finbheara/archive-client 0.24.0 → 0.26.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.
- package/README.md +116 -3
- package/dist/chunks/{index-vsk6837c.js → index-8mwx3n9j.js} +724 -20
- package/dist/cli.js +304 -2
- package/dist/index.js +13 -1
- package/dist/types/cli.d.ts +2 -0
- package/dist/types/feises.d.ts +9 -0
- package/dist/types/index.d.ts +4 -1
- package/dist/types/people.d.ts +12 -0
- package/dist/types/release.d.ts +6 -0
- package/dist/types/school-bulk.d.ts +80 -0
- package/dist/types/schools.d.ts +33 -0
- package/dist/types/tabs.d.ts +132 -0
- package/dist/types/upcoming.d.ts +138 -0
- package/package.json +1 -1
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import type { Release } from "./release.js";
|
|
2
|
+
export interface TabRow {
|
|
3
|
+
address: string;
|
|
4
|
+
competition: string;
|
|
5
|
+
card: string;
|
|
6
|
+
line: number;
|
|
7
|
+
event: string | null;
|
|
8
|
+
year: number | null;
|
|
9
|
+
tier: string | null;
|
|
10
|
+
round: string;
|
|
11
|
+
true_round: number;
|
|
12
|
+
seat_index: number;
|
|
13
|
+
section: string;
|
|
14
|
+
panel_size: number;
|
|
15
|
+
column_order: string;
|
|
16
|
+
drop_rule: string;
|
|
17
|
+
judge_name: string | null;
|
|
18
|
+
judge_name_printed: string | null;
|
|
19
|
+
judge_clrg: number | null;
|
|
20
|
+
judge_id: number | null;
|
|
21
|
+
judge_unmatched: string | null;
|
|
22
|
+
mark: number | null;
|
|
23
|
+
mark_printed: string | null;
|
|
24
|
+
place: number | null;
|
|
25
|
+
place_printed: string | null;
|
|
26
|
+
tie: number;
|
|
27
|
+
points: number | null;
|
|
28
|
+
points_printed: string | null;
|
|
29
|
+
}
|
|
30
|
+
export interface TabQuery {
|
|
31
|
+
competition?: string;
|
|
32
|
+
address?: string;
|
|
33
|
+
round?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface TabStreamQuery {
|
|
36
|
+
event?: string | string[];
|
|
37
|
+
year?: number | [number, number];
|
|
38
|
+
tier?: string[];
|
|
39
|
+
competition?: string[];
|
|
40
|
+
}
|
|
41
|
+
export interface TabAnswer {
|
|
42
|
+
tag: string;
|
|
43
|
+
asked: TabQuery;
|
|
44
|
+
rows: TabRow[];
|
|
45
|
+
}
|
|
46
|
+
export interface PanelSeat {
|
|
47
|
+
competition: string;
|
|
48
|
+
panel: string;
|
|
49
|
+
round: string;
|
|
50
|
+
seat_index: number;
|
|
51
|
+
address: string | null;
|
|
52
|
+
judge_name_printed: string | null;
|
|
53
|
+
judge_clrg: number | null;
|
|
54
|
+
judge_id: number | null;
|
|
55
|
+
judge_unmatched: string | null;
|
|
56
|
+
}
|
|
57
|
+
export interface FeisPanelSeat {
|
|
58
|
+
address: string;
|
|
59
|
+
platform: string;
|
|
60
|
+
round: string;
|
|
61
|
+
seat_index: number;
|
|
62
|
+
panel_size: number;
|
|
63
|
+
panel_kind: string;
|
|
64
|
+
judge_name_printed: string;
|
|
65
|
+
judge_state_printed: string | null;
|
|
66
|
+
judge_clrg: number | null;
|
|
67
|
+
judge_id: number | null;
|
|
68
|
+
judge_unmatched: string | null;
|
|
69
|
+
judge_basis: string | null;
|
|
70
|
+
}
|
|
71
|
+
export interface RegisterRow {
|
|
72
|
+
judge_clrg: number;
|
|
73
|
+
year: number;
|
|
74
|
+
cat: string;
|
|
75
|
+
name_printed: string;
|
|
76
|
+
country: string;
|
|
77
|
+
country_printed: string;
|
|
78
|
+
country_code: string | null;
|
|
79
|
+
region: string;
|
|
80
|
+
region_printed: string;
|
|
81
|
+
region_code: string | null;
|
|
82
|
+
geohash: string | null;
|
|
83
|
+
src: string;
|
|
84
|
+
}
|
|
85
|
+
export declare const TAB_NEEDS: readonly string[];
|
|
86
|
+
export declare class TabFinder {
|
|
87
|
+
private readonly rel;
|
|
88
|
+
constructor(rel: Release);
|
|
89
|
+
private db;
|
|
90
|
+
private sheets;
|
|
91
|
+
query(q: TabQuery): Promise<TabAnswer>;
|
|
92
|
+
stream(q?: TabStreamQuery): AsyncGenerator<TabRow>;
|
|
93
|
+
}
|
|
94
|
+
export declare class PanelFinder {
|
|
95
|
+
private readonly rel;
|
|
96
|
+
constructor(rel: Release);
|
|
97
|
+
query(q?: {
|
|
98
|
+
competition?: string;
|
|
99
|
+
}): Promise<{
|
|
100
|
+
tag: string;
|
|
101
|
+
asked: {
|
|
102
|
+
competition?: string;
|
|
103
|
+
};
|
|
104
|
+
seats: PanelSeat[];
|
|
105
|
+
}>;
|
|
106
|
+
}
|
|
107
|
+
export declare class FeisPanelFinder {
|
|
108
|
+
private readonly rel;
|
|
109
|
+
constructor(rel: Release);
|
|
110
|
+
query(q?: {
|
|
111
|
+
address?: string;
|
|
112
|
+
platform?: string;
|
|
113
|
+
}): Promise<{
|
|
114
|
+
tag: string;
|
|
115
|
+
asked: {
|
|
116
|
+
address?: string;
|
|
117
|
+
platform?: string;
|
|
118
|
+
};
|
|
119
|
+
seats: FeisPanelSeat[];
|
|
120
|
+
}>;
|
|
121
|
+
}
|
|
122
|
+
export declare function registerRows(rel: Release, q: {
|
|
123
|
+
year?: number;
|
|
124
|
+
judge_clrg?: number;
|
|
125
|
+
}): Promise<{
|
|
126
|
+
tag: string;
|
|
127
|
+
asked: {
|
|
128
|
+
year?: number;
|
|
129
|
+
judge_clrg?: number;
|
|
130
|
+
};
|
|
131
|
+
rows: RegisterRow[];
|
|
132
|
+
}>;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import type { Release } from "./release.js";
|
|
2
|
+
export type FieldState = "pending" | "results" | "passed" | "withdrawn";
|
|
3
|
+
export declare const FIELD_STATES: readonly FieldState[];
|
|
4
|
+
export type UpcomingFeisState = "upcoming" | "no-results";
|
|
5
|
+
export interface UpcomingHost {
|
|
6
|
+
source: string;
|
|
7
|
+
host_id: string;
|
|
8
|
+
feis_id: string | null;
|
|
9
|
+
series: string | null;
|
|
10
|
+
name_printed: string | null;
|
|
11
|
+
date_lo: string | null;
|
|
12
|
+
date_hi: string | null;
|
|
13
|
+
url: string | null;
|
|
14
|
+
}
|
|
15
|
+
export interface UpcomingFeis {
|
|
16
|
+
occurrence_id: string;
|
|
17
|
+
occurrence_ids: string[];
|
|
18
|
+
name_printed: string;
|
|
19
|
+
date_lo: string;
|
|
20
|
+
date_hi: string | null;
|
|
21
|
+
year: number;
|
|
22
|
+
hosts: UpcomingHost[];
|
|
23
|
+
feis_brand_id: string | null;
|
|
24
|
+
feis_instance_id: string | null;
|
|
25
|
+
series_basis: string;
|
|
26
|
+
brand_candidates: string[];
|
|
27
|
+
captured_id: string;
|
|
28
|
+
state: UpcomingFeisState;
|
|
29
|
+
}
|
|
30
|
+
export interface FieldComp {
|
|
31
|
+
arm: "unique" | "ambiguous" | "none";
|
|
32
|
+
source: string | null;
|
|
33
|
+
kind: string | null;
|
|
34
|
+
level: string | null;
|
|
35
|
+
feis_level: number | null;
|
|
36
|
+
age: string | null;
|
|
37
|
+
population: string | null;
|
|
38
|
+
title: string | null;
|
|
39
|
+
why: string | null;
|
|
40
|
+
}
|
|
41
|
+
export interface UpcomingField {
|
|
42
|
+
field_id: string;
|
|
43
|
+
feis_id: string;
|
|
44
|
+
source: string;
|
|
45
|
+
host_id: string;
|
|
46
|
+
competition_code: string | null;
|
|
47
|
+
count_only: boolean;
|
|
48
|
+
occurrence_id: string | null;
|
|
49
|
+
name_printed: string;
|
|
50
|
+
date_lo: string | null;
|
|
51
|
+
date_hi: string | null;
|
|
52
|
+
year: number;
|
|
53
|
+
feis_brand_id: string | null;
|
|
54
|
+
comp: FieldComp | null;
|
|
55
|
+
state: FieldState;
|
|
56
|
+
results_competitions: string[];
|
|
57
|
+
results_feis_ids: string[];
|
|
58
|
+
version: string;
|
|
59
|
+
versions: string[];
|
|
60
|
+
captured_date: string;
|
|
61
|
+
sha256: string;
|
|
62
|
+
limits: string[];
|
|
63
|
+
entrants: number;
|
|
64
|
+
stated_rows: number | null;
|
|
65
|
+
printed_total: unknown;
|
|
66
|
+
}
|
|
67
|
+
export interface EntrantCandidate {
|
|
68
|
+
dancer_id: number;
|
|
69
|
+
scope: string;
|
|
70
|
+
kind: string | null;
|
|
71
|
+
score: number;
|
|
72
|
+
name: string | null;
|
|
73
|
+
age: string | null;
|
|
74
|
+
school: string | null;
|
|
75
|
+
}
|
|
76
|
+
export interface UpcomingEntrant {
|
|
77
|
+
feis_id: string;
|
|
78
|
+
captured_id: string;
|
|
79
|
+
row_id: string;
|
|
80
|
+
source: string;
|
|
81
|
+
host_id: string;
|
|
82
|
+
row_kind: string;
|
|
83
|
+
count_only: boolean;
|
|
84
|
+
n: number;
|
|
85
|
+
name_printed: string | null;
|
|
86
|
+
school_printed: string | null;
|
|
87
|
+
school_id: string | null;
|
|
88
|
+
school_rung: string;
|
|
89
|
+
school_candidates: string[];
|
|
90
|
+
competitions: string[];
|
|
91
|
+
field_ids: string[];
|
|
92
|
+
level_counts: Record<string, number> | null;
|
|
93
|
+
yob: number | null;
|
|
94
|
+
asked: Record<string, unknown> | null;
|
|
95
|
+
arm: "unique" | "ambiguous" | "none" | null;
|
|
96
|
+
candidates: EntrantCandidate[];
|
|
97
|
+
flags: string[];
|
|
98
|
+
}
|
|
99
|
+
export interface UpcomingFeisQuery {
|
|
100
|
+
state?: UpcomingFeisState;
|
|
101
|
+
brand?: string;
|
|
102
|
+
from?: string;
|
|
103
|
+
to?: string;
|
|
104
|
+
}
|
|
105
|
+
export interface UpcomingFieldQuery {
|
|
106
|
+
state?: FieldState | readonly FieldState[];
|
|
107
|
+
feis?: string;
|
|
108
|
+
field_id?: string;
|
|
109
|
+
from?: string;
|
|
110
|
+
to?: string;
|
|
111
|
+
}
|
|
112
|
+
export interface UpcomingEntrantQuery {
|
|
113
|
+
field_id: string;
|
|
114
|
+
version?: string;
|
|
115
|
+
}
|
|
116
|
+
export interface UpcomingFeisAnswer {
|
|
117
|
+
tag: string;
|
|
118
|
+
feises: UpcomingFeis[];
|
|
119
|
+
}
|
|
120
|
+
export interface UpcomingFieldAnswer {
|
|
121
|
+
tag: string;
|
|
122
|
+
fields: UpcomingField[];
|
|
123
|
+
}
|
|
124
|
+
export interface UpcomingEntrantAnswer {
|
|
125
|
+
tag: string;
|
|
126
|
+
field: UpcomingField | null;
|
|
127
|
+
version: string | null;
|
|
128
|
+
entrants: UpcomingEntrant[];
|
|
129
|
+
why?: string;
|
|
130
|
+
}
|
|
131
|
+
export declare class UpcomingFinder {
|
|
132
|
+
private readonly rel;
|
|
133
|
+
constructor(rel: Release);
|
|
134
|
+
private db;
|
|
135
|
+
feises(q?: UpcomingFeisQuery): Promise<UpcomingFeisAnswer>;
|
|
136
|
+
fields(q?: UpcomingFieldQuery): Promise<UpcomingFieldAnswer>;
|
|
137
|
+
entrants(q: UpcomingEntrantQuery): Promise<UpcomingEntrantAnswer>;
|
|
138
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finbheara/archive-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0",
|
|
4
4
|
"description": "Open a versioned release of an Irish dance results archive: download, verify, decompress and cache it by tag, keep the cache, and resolve feises and schools against it",
|
|
5
5
|
"keywords": ["irish-dance", "results", "release", "cache", "sqlite"],
|
|
6
6
|
"license": "MIT",
|