openplanter 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.
- package/README.md +210 -0
- package/dist/builder.d.ts +11 -0
- package/dist/builder.d.ts.map +1 -0
- package/dist/builder.js +179 -0
- package/dist/builder.js.map +1 -0
- package/dist/cli.d.ts +9 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +548 -0
- package/dist/cli.js.map +1 -0
- package/dist/config.d.ts +51 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +114 -0
- package/dist/config.js.map +1 -0
- package/dist/credentials.d.ts +52 -0
- package/dist/credentials.d.ts.map +1 -0
- package/dist/credentials.js +371 -0
- package/dist/credentials.js.map +1 -0
- package/dist/demo.d.ts +26 -0
- package/dist/demo.d.ts.map +1 -0
- package/dist/demo.js +95 -0
- package/dist/demo.js.map +1 -0
- package/dist/engine.d.ts +91 -0
- package/dist/engine.d.ts.map +1 -0
- package/dist/engine.js +1036 -0
- package/dist/engine.js.map +1 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +39 -0
- package/dist/index.js.map +1 -0
- package/dist/investigation-tools/aph-holdings.d.ts +61 -0
- package/dist/investigation-tools/aph-holdings.d.ts.map +1 -0
- package/dist/investigation-tools/aph-holdings.js +459 -0
- package/dist/investigation-tools/aph-holdings.js.map +1 -0
- package/dist/investigation-tools/asic-officer-lookup.d.ts +42 -0
- package/dist/investigation-tools/asic-officer-lookup.d.ts.map +1 -0
- package/dist/investigation-tools/asic-officer-lookup.js +197 -0
- package/dist/investigation-tools/asic-officer-lookup.js.map +1 -0
- package/dist/investigation-tools/asx-calendar-fetcher.d.ts +42 -0
- package/dist/investigation-tools/asx-calendar-fetcher.d.ts.map +1 -0
- package/dist/investigation-tools/asx-calendar-fetcher.js +271 -0
- package/dist/investigation-tools/asx-calendar-fetcher.js.map +1 -0
- package/dist/investigation-tools/asx-parser.d.ts +66 -0
- package/dist/investigation-tools/asx-parser.d.ts.map +1 -0
- package/dist/investigation-tools/asx-parser.js +314 -0
- package/dist/investigation-tools/asx-parser.js.map +1 -0
- package/dist/investigation-tools/bulk-asx-announcements.d.ts +53 -0
- package/dist/investigation-tools/bulk-asx-announcements.d.ts.map +1 -0
- package/dist/investigation-tools/bulk-asx-announcements.js +204 -0
- package/dist/investigation-tools/bulk-asx-announcements.js.map +1 -0
- package/dist/investigation-tools/entity-resolver.d.ts +77 -0
- package/dist/investigation-tools/entity-resolver.d.ts.map +1 -0
- package/dist/investigation-tools/entity-resolver.js +346 -0
- package/dist/investigation-tools/entity-resolver.js.map +1 -0
- package/dist/investigation-tools/hotcopper-scraper.d.ts +73 -0
- package/dist/investigation-tools/hotcopper-scraper.d.ts.map +1 -0
- package/dist/investigation-tools/hotcopper-scraper.js +318 -0
- package/dist/investigation-tools/hotcopper-scraper.js.map +1 -0
- package/dist/investigation-tools/index.d.ts +15 -0
- package/dist/investigation-tools/index.d.ts.map +1 -0
- package/dist/investigation-tools/index.js +15 -0
- package/dist/investigation-tools/index.js.map +1 -0
- package/dist/investigation-tools/insider-graph.d.ts +173 -0
- package/dist/investigation-tools/insider-graph.d.ts.map +1 -0
- package/dist/investigation-tools/insider-graph.js +732 -0
- package/dist/investigation-tools/insider-graph.js.map +1 -0
- package/dist/investigation-tools/insider-suspicion-scorer.d.ts +97 -0
- package/dist/investigation-tools/insider-suspicion-scorer.d.ts.map +1 -0
- package/dist/investigation-tools/insider-suspicion-scorer.js +327 -0
- package/dist/investigation-tools/insider-suspicion-scorer.js.map +1 -0
- package/dist/investigation-tools/multi-forum-scraper.d.ts +104 -0
- package/dist/investigation-tools/multi-forum-scraper.d.ts.map +1 -0
- package/dist/investigation-tools/multi-forum-scraper.js +415 -0
- package/dist/investigation-tools/multi-forum-scraper.js.map +1 -0
- package/dist/investigation-tools/price-fetcher.d.ts +81 -0
- package/dist/investigation-tools/price-fetcher.d.ts.map +1 -0
- package/dist/investigation-tools/price-fetcher.js +268 -0
- package/dist/investigation-tools/price-fetcher.js.map +1 -0
- package/dist/investigation-tools/shared.d.ts +39 -0
- package/dist/investigation-tools/shared.d.ts.map +1 -0
- package/dist/investigation-tools/shared.js +203 -0
- package/dist/investigation-tools/shared.js.map +1 -0
- package/dist/investigation-tools/timeline-linker.d.ts +90 -0
- package/dist/investigation-tools/timeline-linker.d.ts.map +1 -0
- package/dist/investigation-tools/timeline-linker.js +219 -0
- package/dist/investigation-tools/timeline-linker.js.map +1 -0
- package/dist/investigation-tools/volume-scanner.d.ts +70 -0
- package/dist/investigation-tools/volume-scanner.d.ts.map +1 -0
- package/dist/investigation-tools/volume-scanner.js +227 -0
- package/dist/investigation-tools/volume-scanner.js.map +1 -0
- package/dist/model.d.ts +136 -0
- package/dist/model.d.ts.map +1 -0
- package/dist/model.js +1071 -0
- package/dist/model.js.map +1 -0
- package/dist/patching.d.ts +45 -0
- package/dist/patching.d.ts.map +1 -0
- package/dist/patching.js +317 -0
- package/dist/patching.js.map +1 -0
- package/dist/prompts.d.ts +15 -0
- package/dist/prompts.d.ts.map +1 -0
- package/dist/prompts.js +351 -0
- package/dist/prompts.js.map +1 -0
- package/dist/replay-log.d.ts +54 -0
- package/dist/replay-log.d.ts.map +1 -0
- package/dist/replay-log.js +94 -0
- package/dist/replay-log.js.map +1 -0
- package/dist/runtime.d.ts +53 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +259 -0
- package/dist/runtime.js.map +1 -0
- package/dist/settings.d.ts +39 -0
- package/dist/settings.d.ts.map +1 -0
- package/dist/settings.js +146 -0
- package/dist/settings.js.map +1 -0
- package/dist/tool-defs.d.ts +58 -0
- package/dist/tool-defs.d.ts.map +1 -0
- package/dist/tool-defs.js +1029 -0
- package/dist/tool-defs.js.map +1 -0
- package/dist/tools.d.ts +72 -0
- package/dist/tools.d.ts.map +1 -0
- package/dist/tools.js +1454 -0
- package/dist/tools.js.map +1 -0
- package/dist/tui.d.ts +49 -0
- package/dist/tui.d.ts.map +1 -0
- package/dist/tui.js +699 -0
- package/dist/tui.js.map +1 -0
- package/package.json +126 -0
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* asx-parser.ts – Parse ASX announcements into structured data.
|
|
3
|
+
*
|
|
4
|
+
* Supports:
|
|
5
|
+
* - Appendix 3Y (director interest changes / insider trades)
|
|
6
|
+
* - Appendix 4C (quarterly cashflow reports)
|
|
7
|
+
* - Trading halts
|
|
8
|
+
*
|
|
9
|
+
* Accepts raw text content (pre-extracted from HTML/PDF).
|
|
10
|
+
*/
|
|
11
|
+
import { formatIsoDate, isoNow } from "./shared.js";
|
|
12
|
+
// ── Constants ───────────────────────────────────────────────────
|
|
13
|
+
const AU_DATE_RE = /\b(\d{1,2})[/\-.](\d{1,2})[/\-.](\d{2,4})\b/;
|
|
14
|
+
const MONEY_RE = /[$AUD\s]*([\d,]+(?:\.\d+)?)/;
|
|
15
|
+
const TICKER_RE = /\b([A-Z0-9]{3})\b/;
|
|
16
|
+
/** Keywords used for auto-detection of Appendix 3Y announcements. */
|
|
17
|
+
const KW_3Y = [
|
|
18
|
+
"appendix 3y",
|
|
19
|
+
"change of director",
|
|
20
|
+
"director's interest",
|
|
21
|
+
"nature of interest",
|
|
22
|
+
];
|
|
23
|
+
/** Keywords used for auto-detection of Appendix 4C announcements. */
|
|
24
|
+
const KW_4C = [
|
|
25
|
+
"appendix 4c",
|
|
26
|
+
"quarterly cash flow",
|
|
27
|
+
"quarterly cashflow",
|
|
28
|
+
"net cash from",
|
|
29
|
+
];
|
|
30
|
+
/** Keywords used for auto-detection of trading halt announcements. */
|
|
31
|
+
const KW_HALT = [
|
|
32
|
+
"trading halt",
|
|
33
|
+
"voluntary suspension",
|
|
34
|
+
"expected resumption",
|
|
35
|
+
];
|
|
36
|
+
// ── Utility Helpers ─────────────────────────────────────────────
|
|
37
|
+
/** Parse the first DD/MM/YYYY style date in `text` and return ISO string, or null. */
|
|
38
|
+
function parseAuDate(text) {
|
|
39
|
+
const m = AU_DATE_RE.exec(text);
|
|
40
|
+
if (!m)
|
|
41
|
+
return null;
|
|
42
|
+
const day = m[1];
|
|
43
|
+
const month = m[2];
|
|
44
|
+
let year = m[3];
|
|
45
|
+
if (year.length === 2) {
|
|
46
|
+
year = `20${year}`;
|
|
47
|
+
}
|
|
48
|
+
const dt = new Date(parseInt(year, 10), parseInt(month, 10) - 1, parseInt(day, 10));
|
|
49
|
+
if (isNaN(dt.getTime()))
|
|
50
|
+
return null;
|
|
51
|
+
return formatIsoDate(dt);
|
|
52
|
+
}
|
|
53
|
+
/** Extract a monetary value from `text` and return as a number, or null. */
|
|
54
|
+
function parseMoney(text) {
|
|
55
|
+
const cleaned = text.replace(/,/g, "");
|
|
56
|
+
const m = MONEY_RE.exec(cleaned);
|
|
57
|
+
if (!m)
|
|
58
|
+
return null;
|
|
59
|
+
const val = parseFloat(m[1].replace(/,/g, ""));
|
|
60
|
+
return isNaN(val) ? null : val;
|
|
61
|
+
}
|
|
62
|
+
/** Collapse whitespace and strip. */
|
|
63
|
+
function clean(text) {
|
|
64
|
+
return text.replace(/\s+/g, " ").trim();
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Auto-detect announcement type from raw text content.
|
|
68
|
+
* Throws if no type can be determined.
|
|
69
|
+
*/
|
|
70
|
+
export function detectType(text) {
|
|
71
|
+
const lower = text.toLowerCase();
|
|
72
|
+
const scores = { "3y": 0, "4c": 0, halt: 0 };
|
|
73
|
+
for (const kw of KW_3Y) {
|
|
74
|
+
if (lower.includes(kw))
|
|
75
|
+
scores["3y"] += 1;
|
|
76
|
+
}
|
|
77
|
+
for (const kw of KW_4C) {
|
|
78
|
+
if (lower.includes(kw))
|
|
79
|
+
scores["4c"] += 1;
|
|
80
|
+
}
|
|
81
|
+
for (const kw of KW_HALT) {
|
|
82
|
+
if (lower.includes(kw))
|
|
83
|
+
scores["halt"] += 1;
|
|
84
|
+
}
|
|
85
|
+
let best = "3y";
|
|
86
|
+
for (const key of Object.keys(scores)) {
|
|
87
|
+
if (scores[key] > scores[best]) {
|
|
88
|
+
best = key;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
if (scores[best] === 0) {
|
|
92
|
+
throw new Error("Could not auto-detect announcement type from content.");
|
|
93
|
+
}
|
|
94
|
+
return best;
|
|
95
|
+
}
|
|
96
|
+
// ── Value Extraction ────────────────────────────────────────────
|
|
97
|
+
/**
|
|
98
|
+
* Find the value that follows `label` in `text`.
|
|
99
|
+
*
|
|
100
|
+
* Searches case-insensitively. Returns the rest of the line (or the
|
|
101
|
+
* next non-empty line if the label line itself has nothing after it).
|
|
102
|
+
*/
|
|
103
|
+
function findValueAfter(text, label) {
|
|
104
|
+
const pattern = new RegExp(label.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "i");
|
|
105
|
+
const lines = text.split("\n");
|
|
106
|
+
for (let i = 0; i < lines.length; i++) {
|
|
107
|
+
const m = pattern.exec(lines[i]);
|
|
108
|
+
if (m) {
|
|
109
|
+
const after = lines[i].slice(m.index + m[0].length).trim().replace(/^:/, "").trim();
|
|
110
|
+
if (after)
|
|
111
|
+
return clean(after);
|
|
112
|
+
// Look at subsequent lines
|
|
113
|
+
for (let j = i + 1; j < Math.min(i + 4, lines.length); j++) {
|
|
114
|
+
const candidate = lines[j].trim();
|
|
115
|
+
if (candidate)
|
|
116
|
+
return clean(candidate);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
return "";
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Return all non-empty values found after occurrences of `label`.
|
|
124
|
+
*/
|
|
125
|
+
function findAllValuesAfter(text, label) {
|
|
126
|
+
const results = [];
|
|
127
|
+
const pattern = new RegExp(label.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "i");
|
|
128
|
+
const lines = text.split("\n");
|
|
129
|
+
for (let i = 0; i < lines.length; i++) {
|
|
130
|
+
const m = pattern.exec(lines[i]);
|
|
131
|
+
if (m) {
|
|
132
|
+
const after = lines[i].slice(m.index + m[0].length).trim().replace(/^:/, "").trim();
|
|
133
|
+
if (after) {
|
|
134
|
+
results.push(clean(after));
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
for (let j = i + 1; j < Math.min(i + 3, lines.length); j++) {
|
|
138
|
+
const candidate = lines[j].trim();
|
|
139
|
+
if (candidate) {
|
|
140
|
+
results.push(clean(candidate));
|
|
141
|
+
break;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
return results;
|
|
148
|
+
}
|
|
149
|
+
// ── Parsers ─────────────────────────────────────────────────────
|
|
150
|
+
/** Parse Appendix 3Y director interest notice from raw text. */
|
|
151
|
+
export function parse3y(text) {
|
|
152
|
+
const directorName = findValueAfter(text, "Name of Director") ||
|
|
153
|
+
findValueAfter(text, "Name of director");
|
|
154
|
+
const company = findValueAfter(text, "Company Name") ||
|
|
155
|
+
findValueAfter(text, "Name of entity");
|
|
156
|
+
let ticker = findValueAfter(text, "ASX Code") ||
|
|
157
|
+
findValueAfter(text, "ABN");
|
|
158
|
+
// Try to extract a 3-letter ASX ticker from the text header area
|
|
159
|
+
if (!TICKER_RE.test(ticker)) {
|
|
160
|
+
const header = text.slice(0, 500);
|
|
161
|
+
const tm = TICKER_RE.exec(header);
|
|
162
|
+
if (tm) {
|
|
163
|
+
ticker = tm[1];
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
const dateOfChange = parseAuDate(findValueAfter(text, "Date of change") ||
|
|
167
|
+
findValueAfter(text, "Date of Change") ||
|
|
168
|
+
"");
|
|
169
|
+
const nature = findValueAfter(text, "Nature of interest") ||
|
|
170
|
+
findValueAfter(text, "Nature of change");
|
|
171
|
+
// Securities acquired / disposed
|
|
172
|
+
const acquiredRaw = findValueAfter(text, "acquired") || "";
|
|
173
|
+
const disposedRaw = findValueAfter(text, "disposed") || "";
|
|
174
|
+
const considerationRaw = findValueAfter(text, "consideration") ||
|
|
175
|
+
findValueAfter(text, "Consideration") ||
|
|
176
|
+
"";
|
|
177
|
+
const associated = findValueAfter(text, "associated entity") ||
|
|
178
|
+
findValueAfter(text, "Associated entity") ||
|
|
179
|
+
"";
|
|
180
|
+
return {
|
|
181
|
+
director_name: directorName || null,
|
|
182
|
+
company: company || null,
|
|
183
|
+
ticker: ticker || null,
|
|
184
|
+
date_of_change: dateOfChange,
|
|
185
|
+
nature_of_interest: nature || null,
|
|
186
|
+
securities_acquired: acquiredRaw || null,
|
|
187
|
+
securities_disposed: disposedRaw || null,
|
|
188
|
+
consideration: parseMoney(considerationRaw),
|
|
189
|
+
consideration_raw: considerationRaw || null,
|
|
190
|
+
associated_entity: associated || null,
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
/** Parse Appendix 4C quarterly cashflow report from raw text. */
|
|
194
|
+
export function parse4c(text) {
|
|
195
|
+
const company = findValueAfter(text, "Name of entity") ||
|
|
196
|
+
findValueAfter(text, "Company Name");
|
|
197
|
+
let ticker = findValueAfter(text, "ASX Code") || "";
|
|
198
|
+
if (!TICKER_RE.test(ticker)) {
|
|
199
|
+
const header = text.slice(0, 500);
|
|
200
|
+
const tm = TICKER_RE.exec(header);
|
|
201
|
+
if (tm) {
|
|
202
|
+
ticker = tm[1];
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
const period = findValueAfter(text, "Quarter ended") ||
|
|
206
|
+
findValueAfter(text, "Period ended") ||
|
|
207
|
+
"";
|
|
208
|
+
const periodDate = parseAuDate(period);
|
|
209
|
+
// Cashflow line items – search for keyword patterns
|
|
210
|
+
function grabCashflow(label) {
|
|
211
|
+
const vals = findAllValuesAfter(text, label);
|
|
212
|
+
for (const v of vals) {
|
|
213
|
+
let money = parseMoney(v);
|
|
214
|
+
if (money !== null) {
|
|
215
|
+
// Check for negative indicator
|
|
216
|
+
if (v.includes("(") && v.includes(")")) {
|
|
217
|
+
money = -Math.abs(money);
|
|
218
|
+
}
|
|
219
|
+
else if (v.includes("-")) {
|
|
220
|
+
money = -Math.abs(money);
|
|
221
|
+
}
|
|
222
|
+
return money;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
return null;
|
|
226
|
+
}
|
|
227
|
+
let netOperating = grabCashflow("Net cash from / (used in) operating activities");
|
|
228
|
+
if (netOperating === null)
|
|
229
|
+
netOperating = grabCashflow("net operating cash");
|
|
230
|
+
if (netOperating === null)
|
|
231
|
+
netOperating = grabCashflow("Net cash from operating");
|
|
232
|
+
let netInvesting = grabCashflow("Net cash from / (used in) investing activities");
|
|
233
|
+
if (netInvesting === null)
|
|
234
|
+
netInvesting = grabCashflow("net investing cash");
|
|
235
|
+
if (netInvesting === null)
|
|
236
|
+
netInvesting = grabCashflow("Net cash from investing");
|
|
237
|
+
let netFinancing = grabCashflow("Net cash from / (used in) financing activities");
|
|
238
|
+
if (netFinancing === null)
|
|
239
|
+
netFinancing = grabCashflow("net financing cash");
|
|
240
|
+
if (netFinancing === null)
|
|
241
|
+
netFinancing = grabCashflow("Net cash from financing");
|
|
242
|
+
let cashEnd = grabCashflow("Cash and cash equivalents at end of");
|
|
243
|
+
if (cashEnd === null)
|
|
244
|
+
cashEnd = grabCashflow("cash at end of period");
|
|
245
|
+
if (cashEnd === null)
|
|
246
|
+
cashEnd = grabCashflow("Cash at end of quarter");
|
|
247
|
+
return {
|
|
248
|
+
company: company || null,
|
|
249
|
+
ticker: ticker || null,
|
|
250
|
+
period: periodDate || period || null,
|
|
251
|
+
net_operating_cashflow: netOperating,
|
|
252
|
+
net_investing_cashflow: netInvesting,
|
|
253
|
+
net_financing_cashflow: netFinancing,
|
|
254
|
+
cash_at_end_of_period: cashEnd,
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
/** Parse trading halt / voluntary suspension notice from raw text. */
|
|
258
|
+
export function parseHalt(text) {
|
|
259
|
+
const company = findValueAfter(text, "Name of entity") ||
|
|
260
|
+
findValueAfter(text, "Company Name") ||
|
|
261
|
+
findValueAfter(text, "Security Description");
|
|
262
|
+
let ticker = findValueAfter(text, "ASX Code") || "";
|
|
263
|
+
if (!TICKER_RE.test(ticker)) {
|
|
264
|
+
const header = text.slice(0, 500);
|
|
265
|
+
const tm = TICKER_RE.exec(header);
|
|
266
|
+
if (tm) {
|
|
267
|
+
ticker = tm[1];
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
const dateRaw = findValueAfter(text, "Date of this notice") ||
|
|
271
|
+
findValueAfter(text, "Date") ||
|
|
272
|
+
"";
|
|
273
|
+
const date = parseAuDate(dateRaw);
|
|
274
|
+
const reason = findValueAfter(text, "Reason for") ||
|
|
275
|
+
findValueAfter(text, "reason for the trading halt") ||
|
|
276
|
+
findValueAfter(text, "The grounds for the trading halt") ||
|
|
277
|
+
findValueAfter(text, "grounds") ||
|
|
278
|
+
"";
|
|
279
|
+
const resumptionRaw = findValueAfter(text, "expected resumption") ||
|
|
280
|
+
findValueAfter(text, "Anticipated resumption") ||
|
|
281
|
+
findValueAfter(text, "resumption date") ||
|
|
282
|
+
"";
|
|
283
|
+
const resumptionDate = parseAuDate(resumptionRaw);
|
|
284
|
+
return {
|
|
285
|
+
company: company || null,
|
|
286
|
+
ticker: ticker || null,
|
|
287
|
+
date: date || dateRaw || null,
|
|
288
|
+
reason: reason || null,
|
|
289
|
+
expected_resumption: resumptionDate || resumptionRaw || null,
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
// ── Envelope Builder ────────────────────────────────────────────
|
|
293
|
+
/** Wrap parsed announcement data in a standard envelope. */
|
|
294
|
+
export function buildEnvelope(annType, source, data) {
|
|
295
|
+
return {
|
|
296
|
+
type: annType,
|
|
297
|
+
source,
|
|
298
|
+
parsed_at: isoNow(),
|
|
299
|
+
data,
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
// ── Convenience Dispatcher ──────────────────────────────────────
|
|
303
|
+
/** Parse raw text with an explicit or auto-detected type. */
|
|
304
|
+
export function parseAnnouncement(text, type = "auto", source = "<text>") {
|
|
305
|
+
const annType = type === "auto" ? detectType(text) : type;
|
|
306
|
+
const parsers = {
|
|
307
|
+
"3y": parse3y,
|
|
308
|
+
"4c": parse4c,
|
|
309
|
+
halt: parseHalt,
|
|
310
|
+
};
|
|
311
|
+
const data = parsers[annType](text);
|
|
312
|
+
return buildEnvelope(annType, source, data);
|
|
313
|
+
}
|
|
314
|
+
//# sourceMappingURL=asx-parser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"asx-parser.js","sourceRoot":"","sources":["../../src/investigation-tools/asx-parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAa,aAAa,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE/D,mEAAmE;AAEnE,MAAM,UAAU,GAAG,6CAA6C,CAAC;AACjE,MAAM,QAAQ,GAAG,6BAA6B,CAAC;AAC/C,MAAM,SAAS,GAAG,mBAAmB,CAAC;AAEtC,qEAAqE;AACrE,MAAM,KAAK,GAAG;IACZ,aAAa;IACb,oBAAoB;IACpB,qBAAqB;IACrB,oBAAoB;CACrB,CAAC;AAEF,qEAAqE;AACrE,MAAM,KAAK,GAAG;IACZ,aAAa;IACb,qBAAqB;IACrB,oBAAoB;IACpB,eAAe;CAChB,CAAC;AAEF,sEAAsE;AACtE,MAAM,OAAO,GAAG;IACd,cAAc;IACd,sBAAsB;IACtB,qBAAqB;CACtB,CAAC;AAiDF,mEAAmE;AAEnE,sFAAsF;AACtF,SAAS,WAAW,CAAC,IAAY;IAC/B,MAAM,CAAC,GAAG,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChC,IAAI,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IACpB,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACjB,MAAM,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACnB,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC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|
|
2
|
+
* bulk-asx-announcements.ts — Bulk ASX Announcement Fetcher
|
|
3
|
+
*
|
|
4
|
+
* Fetches recent ASX announcements (Appendix 3Y director trades, 4C cashflow
|
|
5
|
+
* reports, 3B issue of securities) for multiple tickers. Returns structured
|
|
6
|
+
* announcement records with URLs for PDF downloads.
|
|
7
|
+
*/
|
|
8
|
+
/** Recognised ASX announcement type codes for bulk filtering. */
|
|
9
|
+
export type AsxAnnouncementTypeCode = "3Y" | "4C" | "3B";
|
|
10
|
+
/** All supported type codes. */
|
|
11
|
+
export declare const ALL_TYPE_CODES: readonly AsxAnnouncementTypeCode[];
|
|
12
|
+
/** A single ASX announcement record. */
|
|
13
|
+
export interface AsxAnnouncementRecord {
|
|
14
|
+
ticker: string;
|
|
15
|
+
announcement_type: AsxAnnouncementTypeCode;
|
|
16
|
+
date: string | null;
|
|
17
|
+
title: string;
|
|
18
|
+
url: string;
|
|
19
|
+
file_size: string | null;
|
|
20
|
+
}
|
|
21
|
+
/** Options for fetching announcements for a single ticker. */
|
|
22
|
+
export interface FetchAnnouncementsOptions {
|
|
23
|
+
/** Announcement types to match (default: all). */
|
|
24
|
+
types?: AsxAnnouncementTypeCode[];
|
|
25
|
+
/** How many days back to search (default: 90). */
|
|
26
|
+
daysBack?: number;
|
|
27
|
+
/** Delay in ms between API requests (default: 1000). */
|
|
28
|
+
delayMs?: number;
|
|
29
|
+
}
|
|
30
|
+
/** Options for bulk-fetching across multiple tickers. */
|
|
31
|
+
export interface BulkFetchOptions extends FetchAnnouncementsOptions {
|
|
32
|
+
/** Callback invoked with progress info after each ticker. */
|
|
33
|
+
onProgress?: (ticker: string, found: number, total: number) => void;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Fetch announcements for a single ticker from the ASX API.
|
|
37
|
+
*
|
|
38
|
+
* Paginates up to {@link MAX_PAGES_PER_TICKER} pages and returns records
|
|
39
|
+
* whose titles match the requested types within the date window.
|
|
40
|
+
*/
|
|
41
|
+
export declare function fetchAnnouncementsForTicker(ticker: string, opts?: FetchAnnouncementsOptions): Promise<AsxAnnouncementRecord[]>;
|
|
42
|
+
/**
|
|
43
|
+
* Bulk-fetch announcements for multiple tickers.
|
|
44
|
+
*
|
|
45
|
+
* Fetches sequentially with rate-limiting between tickers to respect
|
|
46
|
+
* ASX API fair-use expectations.
|
|
47
|
+
*/
|
|
48
|
+
export declare function fetchBulkAnnouncements(tickers: string[], opts?: BulkFetchOptions): Promise<AsxAnnouncementRecord[]>;
|
|
49
|
+
/**
|
|
50
|
+
* Parse a comma-separated ticker string into an array of normalised tickers.
|
|
51
|
+
*/
|
|
52
|
+
export declare function parseTickers(raw: string): string[];
|
|
53
|
+
//# sourceMappingURL=bulk-asx-announcements.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bulk-asx-announcements.d.ts","sourceRoot":"","sources":["../../src/investigation-tools/bulk-asx-announcements.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAoBH,iEAAiE;AACjE,MAAM,MAAM,uBAAuB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEzD,gCAAgC;AAChC,eAAO,MAAM,cAAc,EAAE,SAAS,uBAAuB,EAInD,CAAC;AAgBX,wCAAwC;AACxC,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,EAAE,uBAAuB,CAAC;IAC3C,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,8DAA8D;AAC9D,MAAM,WAAW,yBAAyB;IACxC,kDAAkD;IAClD,KAAK,CAAC,EAAE,uBAAuB,EAAE,CAAC;IAClC,kDAAkD;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wDAAwD;IACxD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,yDAAyD;AACzD,MAAM,WAAW,gBAAiB,SAAQ,yBAAyB;IACjE,6DAA6D;IAC7D,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACrE;AAkFD;;;;;GAKG;AACH,wBAAsB,2BAA2B,CAC/C,MAAM,EAAE,MAAM,EACd,IAAI,GAAE,yBAA8B,GACnC,OAAO,CAAC,qBAAqB,EAAE,CAAC,CA8ElC;AAED;;;;;GAKG;AACH,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,MAAM,EAAE,EACjB,IAAI,GAAE,gBAAqB,GAC1B,OAAO,CAAC,qBAAqB,EAAE,CAAC,CA2BlC;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAMlD"}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* bulk-asx-announcements.ts — Bulk ASX Announcement Fetcher
|
|
3
|
+
*
|
|
4
|
+
* Fetches recent ASX announcements (Appendix 3Y director trades, 4C cashflow
|
|
5
|
+
* reports, 3B issue of securities) for multiple tickers. Returns structured
|
|
6
|
+
* announcement records with URLs for PDF downloads.
|
|
7
|
+
*/
|
|
8
|
+
import { fetchJson, normalizeTicker, sleep, DEFAULT_USER_AGENT, } from "./shared.js";
|
|
9
|
+
// ── Constants ───────────────────────────────────────────────────
|
|
10
|
+
const ASX_ANNOUNCEMENTS_API = "https://www.asx.com.au/asx/1/company/{ticker}/announcements";
|
|
11
|
+
const ASX_BASE_URL = "https://www.asx.com.au";
|
|
12
|
+
const REQUEST_DELAY_MS = 1000;
|
|
13
|
+
const MAX_PAGES_PER_TICKER = 10;
|
|
14
|
+
const PAGE_SIZE = 20;
|
|
15
|
+
/** All supported type codes. */
|
|
16
|
+
export const ALL_TYPE_CODES = [
|
|
17
|
+
"3Y",
|
|
18
|
+
"4C",
|
|
19
|
+
"3B",
|
|
20
|
+
];
|
|
21
|
+
/** Mapping of announcement type codes to search keywords. */
|
|
22
|
+
const TYPE_KEYWORDS = {
|
|
23
|
+
"3Y": ["appendix 3y", "change of director", "director's interest"],
|
|
24
|
+
"4C": [
|
|
25
|
+
"appendix 4c",
|
|
26
|
+
"quarterly cash flow",
|
|
27
|
+
"quarterly cashflow",
|
|
28
|
+
"quarterly activities",
|
|
29
|
+
],
|
|
30
|
+
"3B": ["appendix 3b", "issue of securities", "new issue"],
|
|
31
|
+
};
|
|
32
|
+
// ── Helpers ─────────────────────────────────────────────────────
|
|
33
|
+
/**
|
|
34
|
+
* Parse common ASX date strings into YYYY-MM-DD format.
|
|
35
|
+
* Returns the original string if no format matches.
|
|
36
|
+
*/
|
|
37
|
+
function isoDate(raw) {
|
|
38
|
+
const trimmed = raw.trim();
|
|
39
|
+
const formats = [
|
|
40
|
+
{
|
|
41
|
+
re: /^(\d{4})-(\d{2})-(\d{2})T/,
|
|
42
|
+
parse: (m) => new Date(trimmed),
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
re: /^(\d{4})-(\d{2})-(\d{2})$/,
|
|
46
|
+
parse: (m) => new Date(+m[1], +m[2] - 1, +m[3]),
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
re: /^(\d{1,2})\/(\d{1,2})\/(\d{4})$/,
|
|
50
|
+
parse: (m) => new Date(+m[3], +m[2] - 1, +m[1]),
|
|
51
|
+
},
|
|
52
|
+
];
|
|
53
|
+
for (const fmt of formats) {
|
|
54
|
+
const m = trimmed.match(fmt.re);
|
|
55
|
+
if (m) {
|
|
56
|
+
const d = fmt.parse(m);
|
|
57
|
+
if (!isNaN(d.getTime())) {
|
|
58
|
+
return d.toISOString().slice(0, 10);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return trimmed;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Return the matched type code if the announcement title contains any of
|
|
66
|
+
* the keywords for the requested types, else null.
|
|
67
|
+
*/
|
|
68
|
+
function matchAnnouncementType(title, requestedTypes) {
|
|
69
|
+
const lower = title.toLowerCase();
|
|
70
|
+
for (const typeCode of requestedTypes) {
|
|
71
|
+
const keywords = TYPE_KEYWORDS[typeCode] ?? [];
|
|
72
|
+
for (const kw of keywords) {
|
|
73
|
+
if (lower.includes(kw))
|
|
74
|
+
return typeCode;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Build the full announcement URL from the API response field.
|
|
81
|
+
* Returns the URL as-is if it is already absolute.
|
|
82
|
+
*/
|
|
83
|
+
function resolveUrl(docUrl) {
|
|
84
|
+
if (!docUrl)
|
|
85
|
+
return "";
|
|
86
|
+
if (docUrl.startsWith("http"))
|
|
87
|
+
return docUrl;
|
|
88
|
+
return ASX_BASE_URL + docUrl;
|
|
89
|
+
}
|
|
90
|
+
// ── Core Fetching ───────────────────────────────────────────────
|
|
91
|
+
/**
|
|
92
|
+
* Fetch announcements for a single ticker from the ASX API.
|
|
93
|
+
*
|
|
94
|
+
* Paginates up to {@link MAX_PAGES_PER_TICKER} pages and returns records
|
|
95
|
+
* whose titles match the requested types within the date window.
|
|
96
|
+
*/
|
|
97
|
+
export async function fetchAnnouncementsForTicker(ticker, opts = {}) {
|
|
98
|
+
const requestedTypes = opts.types ?? [...ALL_TYPE_CODES];
|
|
99
|
+
const daysBack = opts.daysBack ?? 90;
|
|
100
|
+
const delayMs = opts.delayMs ?? REQUEST_DELAY_MS;
|
|
101
|
+
const cutoff = new Date(Date.now() - daysBack * 24 * 60 * 60 * 1000);
|
|
102
|
+
const results = [];
|
|
103
|
+
const normalised = normalizeTicker(ticker);
|
|
104
|
+
const url = ASX_ANNOUNCEMENTS_API.replace("{ticker}", normalised);
|
|
105
|
+
for (let page = 1; page <= MAX_PAGES_PER_TICKER; page++) {
|
|
106
|
+
const params = new URLSearchParams({
|
|
107
|
+
count: String(PAGE_SIZE),
|
|
108
|
+
market_sensitive: "false",
|
|
109
|
+
});
|
|
110
|
+
if (page > 1) {
|
|
111
|
+
params.set("start", String((page - 1) * PAGE_SIZE));
|
|
112
|
+
}
|
|
113
|
+
const fullUrl = `${url}?${params.toString()}`;
|
|
114
|
+
let data;
|
|
115
|
+
try {
|
|
116
|
+
data = await fetchJson(fullUrl, {
|
|
117
|
+
delay: delayMs / 1000,
|
|
118
|
+
userAgent: DEFAULT_USER_AGENT,
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
catch {
|
|
122
|
+
// API error – stop paging for this ticker
|
|
123
|
+
break;
|
|
124
|
+
}
|
|
125
|
+
const announcements = Array.isArray(data)
|
|
126
|
+
? data
|
|
127
|
+
: data.data ?? [];
|
|
128
|
+
if (announcements.length === 0)
|
|
129
|
+
break;
|
|
130
|
+
let reachedCutoff = false;
|
|
131
|
+
for (const ann of announcements) {
|
|
132
|
+
const annDateRaw = ann.document_date ?? ann.date ?? "";
|
|
133
|
+
const annDate = isoDate(annDateRaw);
|
|
134
|
+
const title = ann.header ?? ann.title ?? "";
|
|
135
|
+
const docUrl = resolveUrl(ann.url ?? ann.document_url ?? "");
|
|
136
|
+
// Check date cutoff
|
|
137
|
+
const annDt = new Date(annDate);
|
|
138
|
+
if (!isNaN(annDt.getTime()) && annDt < cutoff) {
|
|
139
|
+
reachedCutoff = true;
|
|
140
|
+
break;
|
|
141
|
+
}
|
|
142
|
+
// Match type
|
|
143
|
+
const matchedType = matchAnnouncementType(title, requestedTypes);
|
|
144
|
+
if (matchedType === null)
|
|
145
|
+
continue;
|
|
146
|
+
const fileSize = ann.size ?? ann.number_of_pages ?? null;
|
|
147
|
+
results.push({
|
|
148
|
+
ticker: normalised,
|
|
149
|
+
announcement_type: matchedType,
|
|
150
|
+
date: annDate || null,
|
|
151
|
+
title,
|
|
152
|
+
url: docUrl,
|
|
153
|
+
file_size: fileSize !== null ? String(fileSize) : null,
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
if (reachedCutoff || announcements.length < PAGE_SIZE)
|
|
157
|
+
break;
|
|
158
|
+
// Rate limit between pages
|
|
159
|
+
if (page < MAX_PAGES_PER_TICKER) {
|
|
160
|
+
await sleep(delayMs);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
return results;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Bulk-fetch announcements for multiple tickers.
|
|
167
|
+
*
|
|
168
|
+
* Fetches sequentially with rate-limiting between tickers to respect
|
|
169
|
+
* ASX API fair-use expectations.
|
|
170
|
+
*/
|
|
171
|
+
export async function fetchBulkAnnouncements(tickers, opts = {}) {
|
|
172
|
+
const delayMs = opts.delayMs ?? REQUEST_DELAY_MS;
|
|
173
|
+
const allRecords = [];
|
|
174
|
+
for (let i = 0; i < tickers.length; i++) {
|
|
175
|
+
const ticker = tickers[i];
|
|
176
|
+
let records;
|
|
177
|
+
try {
|
|
178
|
+
records = await fetchAnnouncementsForTicker(ticker, opts);
|
|
179
|
+
}
|
|
180
|
+
catch {
|
|
181
|
+
records = [];
|
|
182
|
+
}
|
|
183
|
+
allRecords.push(...records);
|
|
184
|
+
if (opts.onProgress) {
|
|
185
|
+
opts.onProgress(ticker, records.length, allRecords.length);
|
|
186
|
+
}
|
|
187
|
+
// Rate limit between tickers
|
|
188
|
+
if (i < tickers.length - 1) {
|
|
189
|
+
await sleep(delayMs);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
return allRecords;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Parse a comma-separated ticker string into an array of normalised tickers.
|
|
196
|
+
*/
|
|
197
|
+
export function parseTickers(raw) {
|
|
198
|
+
return raw
|
|
199
|
+
.split(",")
|
|
200
|
+
.map((t) => t.trim())
|
|
201
|
+
.filter(Boolean)
|
|
202
|
+
.map((t) => normalizeTicker(t));
|
|
203
|
+
}
|
|
204
|
+
//# sourceMappingURL=bulk-asx-announcements.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bulk-asx-announcements.js","sourceRoot":"","sources":["../../src/investigation-tools/bulk-asx-announcements.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,SAAS,EACT,eAAe,EAEf,KAAK,EACL,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAErB,mEAAmE;AAEnE,MAAM,qBAAqB,GACzB,6DAA6D,CAAC;AAChE,MAAM,YAAY,GAAG,wBAAwB,CAAC;AAE9C,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAC9B,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAChC,MAAM,SAAS,GAAG,EAAE,CAAC;AAKrB,gCAAgC;AAChC,MAAM,CAAC,MAAM,cAAc,GAAuC;IAChE,IAAI;IACJ,IAAI;IACJ,IAAI;CACI,CAAC;AAEX,6DAA6D;AAC7D,MAAM,aAAa,GAA8C;IAC/D,IAAI,EAAE,CAAC,aAAa,EAAE,oBAAoB,EAAE,qBAAqB,CAAC;IAClE,IAAI,EAAE;QACJ,aAAa;QACb,qBAAqB;QACrB,oBAAoB;QACpB,sBAAsB;KACvB;IACD,IAAI,EAAE,CAAC,aAAa,EAAE,qBAAqB,EAAE,WAAW,CAAC;CAC1D,CAAC;AA6CF,mEAAmE;AAEnE;;;GAGG;AACH,SAAS,OAAO,CAAC,GAAW;IAC1B,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;IAC3B,MAAM,OAAO,GAAgE;QAC3E;YACE,EAAE,EAAE,2BAA2B;YAC/B,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC;SAChC;QACD;YACE,EAAE,EAAE,2BAA2B;YAC/B,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,C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