@invinite-org/invinite-data-cli 0.5.0 → 0.5.2
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 +3 -1
- package/claude-plugin/skills/invinite-data-cli/SKILL.md +65 -65
- package/dist/src/client/api-client.js +12 -6
- package/dist/src/client/api-client.js.map +1 -1
- package/dist/src/client/pagination.d.ts +13 -0
- package/dist/src/client/pagination.js +36 -7
- package/dist/src/client/pagination.js.map +1 -1
- package/dist/src/generated/cli-manifest.json +424 -3
- package/dist/src/shared/errors.d.ts +7 -1
- package/dist/src/shared/errors.js +15 -1
- package/dist/src/shared/errors.js.map +1 -1
- package/dist/src/spec-commands.d.ts +1 -1
- package/dist/src/spec-commands.js +26 -6
- package/dist/src/spec-commands.js.map +1 -1
- package/dist/src/spec-manifest.d.ts +44 -0
- package/dist/src/spec-manifest.js +12 -1
- package/dist/src/spec-manifest.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -401,7 +401,9 @@ invd financials income-statement -i AAPL -p annual --json | jq '.companies[0]'
|
|
|
401
401
|
|
|
402
402
|
Paginated commands take `-l, --limit` and `--offset`, or `--all` to follow every page (`next_url`; per-company commands
|
|
403
403
|
merge each company's pages). A command whose operation does not paginate refuses `--all` by name. Without `--limit`
|
|
404
|
-
the API's own page size applies.
|
|
404
|
+
the API's own page size applies. A page the API refuses with 429 (its admission limit) or 503 is retried up to five
|
|
405
|
+
times after the answer's `Retry-After` (else 1 s, 2 s, 4 s, …, at most 30 s), so a long walk slows down instead of
|
|
406
|
+
losing the pages it already fetched.
|
|
405
407
|
|
|
406
408
|
```bash
|
|
407
409
|
# Results 20-30
|
|
@@ -157,22 +157,22 @@ Company search, details, fiscal periods, dividends and splits
|
|
|
157
157
|
|
|
158
158
|
```bash
|
|
159
159
|
# Company details
|
|
160
|
-
invd company details -i
|
|
160
|
+
invd company details -i AAPL --json
|
|
161
161
|
|
|
162
162
|
# Company dividends (optional: --start-date, --end-date, --sort, --limit, --offset, --all)
|
|
163
|
-
invd company dividends -i
|
|
163
|
+
invd company dividends -i AAPL --json
|
|
164
164
|
|
|
165
165
|
# Company fiscal periods (optional: --sort, --limit, --offset, --all)
|
|
166
|
-
invd company fiscal-periods -i
|
|
166
|
+
invd company fiscal-periods -i AAPL --json
|
|
167
167
|
|
|
168
168
|
# List available companies
|
|
169
169
|
invd company list --json
|
|
170
170
|
|
|
171
171
|
# Search companies (optional: --limit, --offset, --all)
|
|
172
|
-
invd company search -q
|
|
172
|
+
invd company search -q apple --json
|
|
173
173
|
|
|
174
174
|
# Stock splits (optional: --sort, --limit, --offset, --all)
|
|
175
|
-
invd company splits -i
|
|
175
|
+
invd company splits -i AAPL --json
|
|
176
176
|
```
|
|
177
177
|
|
|
178
178
|
### config
|
|
@@ -192,61 +192,61 @@ Earnings calls: calendar, transcripts, Q&A, extractions, media, search and webho
|
|
|
192
192
|
|
|
193
193
|
```bash
|
|
194
194
|
# Analysts of a company (optional: --limit, --offset, --all)
|
|
195
|
-
invd earnings analysts -i
|
|
195
|
+
invd earnings analysts -i MSFT --json
|
|
196
196
|
|
|
197
197
|
# Earnings call calendar (optional: --from, --to, --status, --session, --exchange, --event-type, --sort, --limit, --offset, --all)
|
|
198
198
|
invd earnings calendar --json
|
|
199
199
|
|
|
200
200
|
# Call-over-call diff (optional: --event-id, --identifier, --year, --quarter, --date, --event-type, --vs)
|
|
201
|
-
invd earnings diff --json
|
|
201
|
+
invd earnings diff --event-id cfbcf4f8-6d4d-41ef-9197-1c91ff2aef8c --json
|
|
202
202
|
|
|
203
203
|
# Search investor documents (optional: --identifier, --kind, --section, --year, --table, --limit)
|
|
204
|
-
invd earnings document-search -q
|
|
204
|
+
invd earnings document-search -q "Azure growth" -i MSFT --json
|
|
205
205
|
|
|
206
206
|
# Earnings call by ID (optional: --include)
|
|
207
|
-
invd earnings event --event-id
|
|
207
|
+
invd earnings event --event-id cfbcf4f8-6d4d-41ef-9197-1c91ff2aef8c --json
|
|
208
208
|
|
|
209
209
|
# Event history of a company (optional: --from, --to, --include, --event-type, --sort, --limit, --offset, --all)
|
|
210
|
-
invd earnings events -i
|
|
210
|
+
invd earnings events -i MSFT --json
|
|
211
211
|
|
|
212
212
|
# Guidance and KPI extractions (optional: --event-id, --identifier, --year, --quarter, --date, --event-type, --kind, --review, --limit, --offset, --all)
|
|
213
|
-
invd earnings extractions --json
|
|
213
|
+
invd earnings extractions --event-id cfbcf4f8-6d4d-41ef-9197-1c91ff2aef8c --json
|
|
214
214
|
|
|
215
215
|
# Guidance history (optional: --period-kind, --basis, --limit)
|
|
216
|
-
invd earnings guidance-history -i
|
|
216
|
+
invd earnings guidance-history -i MSFT --metric revenue --json
|
|
217
217
|
|
|
218
218
|
# Live earnings calls
|
|
219
219
|
invd earnings live --json
|
|
220
220
|
|
|
221
221
|
# Earnings call metrics (optional: --event-id, --identifier, --year, --quarter, --date, --event-type)
|
|
222
|
-
invd earnings metrics --json
|
|
222
|
+
invd earnings metrics --event-id cfbcf4f8-6d4d-41ef-9197-1c91ff2aef8c --json
|
|
223
223
|
|
|
224
224
|
# Earnings call participants (optional: --event-id, --identifier, --year, --quarter, --date, --event-type, --include)
|
|
225
|
-
invd earnings participants --json
|
|
225
|
+
invd earnings participants --event-id cfbcf4f8-6d4d-41ef-9197-1c91ff2aef8c --json
|
|
226
226
|
|
|
227
227
|
# Person across earnings calls (optional: --limit, --offset, --all)
|
|
228
|
-
invd earnings person --person-id
|
|
228
|
+
invd earnings person --person-id 9b135e05-d7c2-4d23-9c89-728501ad8e58 --json
|
|
229
229
|
|
|
230
230
|
# Price moves during a call (optional: --event-id, --identifier, --year, --quarter, --date, --event-type)
|
|
231
|
-
invd earnings price-attribution --json
|
|
231
|
+
invd earnings price-attribution --event-id dd04abe1-f83f-4e92-8ddf-1f8864e7db30 --json
|
|
232
232
|
|
|
233
233
|
# Speaker prosody (optional: --event-id, --identifier, --year, --quarter, --date, --event-type, --section)
|
|
234
|
-
invd earnings prosody --json
|
|
234
|
+
invd earnings prosody --event-id cfbcf4f8-6d4d-41ef-9197-1c91ff2aef8c --json
|
|
235
235
|
|
|
236
236
|
# Earnings call Q&A (optional: --event-id, --identifier, --year, --quarter, --date, --event-type, --limit, --offset, --include, --all)
|
|
237
|
-
invd earnings qa --json
|
|
237
|
+
invd earnings qa --event-id cfbcf4f8-6d4d-41ef-9197-1c91ff2aef8c --json
|
|
238
238
|
|
|
239
239
|
# Search earnings calls (optional: --event-id, --identifier, --from, --to, --type, --event-type, --limit)
|
|
240
|
-
invd earnings search -q
|
|
240
|
+
invd earnings search -q "Azure growth" -i MSFT --json
|
|
241
241
|
|
|
242
242
|
# Live audio stream URL (optional: --event-id, --identifier, --year, --quarter, --date, --event-type)
|
|
243
|
-
invd earnings stream --json
|
|
243
|
+
invd earnings stream --event-id cfbcf4f8-6d4d-41ef-9197-1c91ff2aef8c --json
|
|
244
244
|
|
|
245
245
|
# Transcript version diff (optional: --event-id, --identifier, --year, --quarter, --date, --event-type, --to)
|
|
246
|
-
invd earnings transcript-diff --
|
|
246
|
+
invd earnings transcript-diff --event-id cfbcf4f8-6d4d-41ef-9197-1c91ff2aef8c --from 3 --json
|
|
247
247
|
|
|
248
248
|
# Transcript versions (optional: --event-id, --identifier, --year, --quarter, --date, --event-type)
|
|
249
|
-
invd earnings versions --json
|
|
249
|
+
invd earnings versions --event-id cfbcf4f8-6d4d-41ef-9197-1c91ff2aef8c --json
|
|
250
250
|
```
|
|
251
251
|
|
|
252
252
|
<!-- invd:hand:earnings transcript -->
|
|
@@ -315,13 +315,13 @@ SEC filings, their parsed sections and natural-language filing search
|
|
|
315
315
|
invd filings form-types --json
|
|
316
316
|
|
|
317
317
|
# SEC filings (optional: --form-type, --sort, --limit, --offset, --all)
|
|
318
|
-
invd filings list -i
|
|
318
|
+
invd filings list -i AAPL --json
|
|
319
319
|
|
|
320
320
|
# Search SEC filings (optional: --identifier, --accession-number)
|
|
321
|
-
invd filings search -r
|
|
321
|
+
invd filings search -r "What are Apple's main risk factors?" -i AAPL --json
|
|
322
322
|
|
|
323
323
|
# SEC filing sections (optional: --section-id, --accession-number, --fiscal-year, --fiscal-quarter)
|
|
324
|
-
invd filings sections -i
|
|
324
|
+
invd filings sections -i AAPL --form-type 10-K --fiscal-year 2025 --json
|
|
325
325
|
```
|
|
326
326
|
|
|
327
327
|
### financials
|
|
@@ -330,76 +330,76 @@ Financial statements (standardized & as-reported)
|
|
|
330
330
|
|
|
331
331
|
```bash
|
|
332
332
|
# As-reported balance sheet (optional: --sort, --limit, --offset, --all)
|
|
333
|
-
invd financials as-reported-balance-sheet -i
|
|
333
|
+
invd financials as-reported-balance-sheet -i AAPL -p annual --json
|
|
334
334
|
|
|
335
335
|
# As-reported balance sheet (detailed) (optional: --sort, --limit, --offset, --with-formula, --all)
|
|
336
|
-
invd financials as-reported-balance-sheet-detailed -i
|
|
336
|
+
invd financials as-reported-balance-sheet-detailed -i AAPL -p annual --json
|
|
337
337
|
|
|
338
338
|
# As-reported balance sheet (presentation) (optional: --sort, --limit, --offset, --all)
|
|
339
|
-
invd financials as-reported-balance-sheet-presentation -i
|
|
339
|
+
invd financials as-reported-balance-sheet-presentation -i AAPL -p annual --json
|
|
340
340
|
|
|
341
341
|
# As-reported cash flow statement (optional: --sort, --limit, --offset, --all)
|
|
342
|
-
invd financials as-reported-cash-flow -i
|
|
342
|
+
invd financials as-reported-cash-flow -i AAPL -p annual --json
|
|
343
343
|
|
|
344
344
|
# As-reported cash flow statement (detailed) (optional: --sort, --limit, --offset, --with-formula, --all)
|
|
345
|
-
invd financials as-reported-cash-flow-detailed -i
|
|
345
|
+
invd financials as-reported-cash-flow-detailed -i AAPL -p annual --json
|
|
346
346
|
|
|
347
347
|
# As-reported cash flow statement (presentation) (optional: --sort, --limit, --offset, --all)
|
|
348
|
-
invd financials as-reported-cash-flow-presentation -i
|
|
348
|
+
invd financials as-reported-cash-flow-presentation -i AAPL -p annual --json
|
|
349
349
|
|
|
350
350
|
# As-reported income statement (optional: --sort, --limit, --offset, --all)
|
|
351
|
-
invd financials as-reported-income-statement -i
|
|
351
|
+
invd financials as-reported-income-statement -i AAPL -p annual --json
|
|
352
352
|
|
|
353
353
|
# As-reported income statement (detailed) (optional: --sort, --limit, --offset, --with-formula, --all)
|
|
354
|
-
invd financials as-reported-income-statement-detailed -i
|
|
354
|
+
invd financials as-reported-income-statement-detailed -i AAPL -p annual --json
|
|
355
355
|
|
|
356
356
|
# As-reported income statement (presentation) (optional: --sort, --limit, --offset, --all)
|
|
357
|
-
invd financials as-reported-income-statement-presentation -i
|
|
357
|
+
invd financials as-reported-income-statement-presentation -i AAPL -p annual --json
|
|
358
358
|
|
|
359
359
|
# As-reported snapshot (optional: --calendar-year, --calendar-quarter)
|
|
360
|
-
invd financials as-reported-snapshot -i
|
|
360
|
+
invd financials as-reported-snapshot -i AAPL,MSFT -p annual --json
|
|
361
361
|
|
|
362
362
|
# As-reported snapshot (detailed) (optional: --calendar-year, --calendar-quarter, --with-formula)
|
|
363
|
-
invd financials as-reported-snapshot-detailed -i
|
|
363
|
+
invd financials as-reported-snapshot-detailed -i AAPL,MSFT -p annual --json
|
|
364
364
|
|
|
365
365
|
# As-reported snapshot (presentation) (optional: --calendar-year, --calendar-quarter)
|
|
366
|
-
invd financials as-reported-snapshot-presentation -i
|
|
366
|
+
invd financials as-reported-snapshot-presentation -i AAPL,MSFT -p annual --json
|
|
367
367
|
|
|
368
368
|
# Standardized balance sheet (optional: --sort, --limit, --offset, --all)
|
|
369
|
-
invd financials balance-sheet -i
|
|
369
|
+
invd financials balance-sheet -i AAPL -p annual --json
|
|
370
370
|
|
|
371
371
|
# Standardized balance sheet (detailed) (optional: --sort, --limit, --offset, --with-formula, --all)
|
|
372
|
-
invd financials balance-sheet-detailed -i
|
|
372
|
+
invd financials balance-sheet-detailed -i AAPL -p annual --json
|
|
373
373
|
|
|
374
374
|
# Standardized balance sheet (presentation) (optional: --sort, --limit, --offset, --all)
|
|
375
|
-
invd financials balance-sheet-presentation -i
|
|
375
|
+
invd financials balance-sheet-presentation -i AAPL -p annual --json
|
|
376
376
|
|
|
377
377
|
# Standardized cash flow statement (optional: --sort, --limit, --offset, --all)
|
|
378
|
-
invd financials cash-flow -i
|
|
378
|
+
invd financials cash-flow -i AAPL -p annual --json
|
|
379
379
|
|
|
380
380
|
# Standardized cash flow statement (detailed) (optional: --sort, --limit, --offset, --with-formula, --all)
|
|
381
|
-
invd financials cash-flow-detailed -i
|
|
381
|
+
invd financials cash-flow-detailed -i AAPL -p annual --json
|
|
382
382
|
|
|
383
383
|
# Standardized cash flow statement (presentation) (optional: --sort, --limit, --offset, --all)
|
|
384
|
-
invd financials cash-flow-presentation -i
|
|
384
|
+
invd financials cash-flow-presentation -i AAPL -p annual --json
|
|
385
385
|
|
|
386
386
|
# Standardized income statement (optional: --sort, --limit, --offset, --all)
|
|
387
|
-
invd financials income-statement -i
|
|
387
|
+
invd financials income-statement -i AAPL -p annual --json
|
|
388
388
|
|
|
389
389
|
# Standardized income statement (detailed) (optional: --sort, --limit, --offset, --with-formula, --all)
|
|
390
|
-
invd financials income-statement-detailed -i
|
|
390
|
+
invd financials income-statement-detailed -i AAPL -p annual --json
|
|
391
391
|
|
|
392
392
|
# Standardized income statement (presentation) (optional: --sort, --limit, --offset, --all)
|
|
393
|
-
invd financials income-statement-presentation -i
|
|
393
|
+
invd financials income-statement-presentation -i AAPL -p annual --json
|
|
394
394
|
|
|
395
395
|
# Standardized snapshot (optional: --calendar-year, --calendar-quarter)
|
|
396
|
-
invd financials snapshot -i
|
|
396
|
+
invd financials snapshot -i AAPL,MSFT -p annual --json
|
|
397
397
|
|
|
398
398
|
# Standardized snapshot (detailed) (optional: --calendar-year, --calendar-quarter, --with-formula)
|
|
399
|
-
invd financials snapshot-detailed -i
|
|
399
|
+
invd financials snapshot-detailed -i AAPL,MSFT -p annual --json
|
|
400
400
|
|
|
401
401
|
# Standardized snapshot (presentation) (optional: --calendar-year, --calendar-quarter)
|
|
402
|
-
invd financials snapshot-presentation -i
|
|
402
|
+
invd financials snapshot-presentation -i AAPL,MSFT -p annual --json
|
|
403
403
|
```
|
|
404
404
|
|
|
405
405
|
### health
|
|
@@ -417,7 +417,7 @@ Insider transactions of a company
|
|
|
417
417
|
|
|
418
418
|
```bash
|
|
419
419
|
# Insider trades (optional: --start-date, --end-date, --acquired-disposed, --sort, --limit, --offset, --all)
|
|
420
|
-
invd insider-trades list -i
|
|
420
|
+
invd insider-trades list -i AAPL --json
|
|
421
421
|
```
|
|
422
422
|
|
|
423
423
|
### ipos
|
|
@@ -472,13 +472,13 @@ Ratios, growth and CAGR derived from the statements
|
|
|
472
472
|
|
|
473
473
|
```bash
|
|
474
474
|
# CAGR metrics (optional: --period-years, --sort, --limit, --offset, --all)
|
|
475
|
-
invd metrics cagr -i
|
|
475
|
+
invd metrics cagr -i AAPL --json
|
|
476
476
|
|
|
477
477
|
# Growth metrics (optional: --growth-type, --sort, --limit, --offset, --all)
|
|
478
|
-
invd metrics growth -i
|
|
478
|
+
invd metrics growth -i AAPL -p annual --json
|
|
479
479
|
|
|
480
480
|
# Financial ratios (optional: --category, --sort, --limit, --offset, --all)
|
|
481
|
-
invd metrics ratios -i
|
|
481
|
+
invd metrics ratios -i AAPL -p annual --json
|
|
482
482
|
```
|
|
483
483
|
|
|
484
484
|
### ownership
|
|
@@ -487,16 +487,16 @@ invd metrics ratios -i <identifier> -p quarterly --json
|
|
|
487
487
|
|
|
488
488
|
```bash
|
|
489
489
|
# Holdings by company (optional: --min-value, --sort, --limit, --offset, --all)
|
|
490
|
-
invd ownership holdings-by-company -i
|
|
490
|
+
invd ownership holdings-by-company -i AAPL --json
|
|
491
491
|
|
|
492
492
|
# Holdings by investor (optional: --sort, --limit, --offset, --all)
|
|
493
|
-
invd ownership holdings-by-investor --cik
|
|
493
|
+
invd ownership holdings-by-investor --cik 1067983 --json
|
|
494
494
|
|
|
495
495
|
# List institutional investors (optional: --ciks, --limit, --offset, --sort, --all)
|
|
496
496
|
invd ownership institutions --json
|
|
497
497
|
|
|
498
498
|
# Institutional transactions (optional: --cik, --identifier, --start-date, --end-date, --type, --calendar-year, --calendar-quarter, --sort, --limit, --offset, --all)
|
|
499
|
-
invd ownership transactions --json
|
|
499
|
+
invd ownership transactions --cik 1067983 --json
|
|
500
500
|
```
|
|
501
501
|
|
|
502
502
|
### plugin
|
|
@@ -514,10 +514,10 @@ Financial facts broken down by business and geographic segment
|
|
|
514
514
|
|
|
515
515
|
```bash
|
|
516
516
|
# Segmented financials (optional: --segment-id, --sort, --limit, --offset, --all)
|
|
517
|
-
invd segments list -i
|
|
517
|
+
invd segments list -i AAPL -p annual --json
|
|
518
518
|
|
|
519
519
|
# Segmented financials (detailed) (optional: --segment-id, --sort, --limit, --offset, --all)
|
|
520
|
-
invd segments list-detailed -i
|
|
520
|
+
invd segments list-detailed -i AAPL -p annual --json
|
|
521
521
|
```
|
|
522
522
|
|
|
523
523
|
### status
|
|
@@ -547,25 +547,25 @@ Earnings-call webhook subscriptions (PRO): signed POSTs of the call lifecycle
|
|
|
547
547
|
|
|
548
548
|
```bash
|
|
549
549
|
# Create a webhook (optional: --body-file)
|
|
550
|
-
invd webhooks create --body '
|
|
550
|
+
invd webhooks create --body '{"url":"https://hooks.example.com/invinite","events":["earnings_call.transcript_ready","earnings_call.ended"],"filters":{"ciks":["0000789019","0000320193"]}}' --json
|
|
551
551
|
|
|
552
552
|
# Delete a webhook
|
|
553
|
-
invd webhooks delete --id
|
|
553
|
+
invd webhooks delete --id js7a2c9xq4m8v1k6t3w5r0n2b8gnd4fh --json
|
|
554
554
|
|
|
555
555
|
# Webhook delivery attempts
|
|
556
|
-
invd webhooks deliveries --id
|
|
556
|
+
invd webhooks deliveries --id js7a2c9xq4m8v1k6t3w5r0n2b8gnd4fh --json
|
|
557
557
|
|
|
558
558
|
# List webhooks
|
|
559
559
|
invd webhooks list --json
|
|
560
560
|
|
|
561
561
|
# Rotate a webhook signing secret
|
|
562
|
-
invd webhooks rotate-secret --id
|
|
562
|
+
invd webhooks rotate-secret --id js7a2c9xq4m8v1k6t3w5r0n2b8gnd4fh --json
|
|
563
563
|
|
|
564
564
|
# Send a test delivery
|
|
565
|
-
invd webhooks test --id
|
|
565
|
+
invd webhooks test --id js7a2c9xq4m8v1k6t3w5r0n2b8gnd4fh --json
|
|
566
566
|
|
|
567
567
|
# Update a webhook (optional: --body, --body-file)
|
|
568
|
-
invd webhooks update --id
|
|
568
|
+
invd webhooks update --id js7a2c9xq4m8v1k6t3w5r0n2b8gnd4fh --body '{"events":["earnings_call.transcript_ready"],"active":true}' --json
|
|
569
569
|
```
|
|
570
570
|
|
|
571
571
|
### ws
|
|
@@ -595,7 +595,7 @@ invd ws listen --all-live --keywords tariffs --json
|
|
|
595
595
|
Paginated commands (the `--all` ones above) take:
|
|
596
596
|
- `-l, --limit <n>` — max results per page
|
|
597
597
|
- `--offset <n>` — pagination offset
|
|
598
|
-
- `--all` — auto-paginate all results (follows `next_url`; per-company commands merge each company's pages)
|
|
598
|
+
- `--all` — auto-paginate all results (follows `next_url`; per-company commands merge each company's pages; a page refused with 429 / 503 is retried up to 5 times after the API's `Retry-After`)
|
|
599
599
|
- `-s, --sort <dir>` — `asc` or `desc` (where the operation supports it)
|
|
600
600
|
|
|
601
601
|
## Common Patterns
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getApiKey } from '../config/auth.js';
|
|
2
2
|
import { getBaseUrl } from '../config/config-manager.js';
|
|
3
|
-
import { ApiError } from '../shared/errors.js';
|
|
3
|
+
import { ApiError, parseRetryAfter } from '../shared/errors.js';
|
|
4
4
|
import { createSpinner } from '../shared/spinner.js';
|
|
5
5
|
function buildUrl(path, params) {
|
|
6
6
|
const base = getBaseUrl().replace(/\/+$/, '');
|
|
@@ -16,20 +16,26 @@ function buildUrl(path, params) {
|
|
|
16
16
|
}
|
|
17
17
|
return url.toString();
|
|
18
18
|
}
|
|
19
|
+
const stringField = (body, key) => {
|
|
20
|
+
if (typeof body !== 'object' || body === null)
|
|
21
|
+
return undefined;
|
|
22
|
+
const value = Reflect.get(body, key);
|
|
23
|
+
return typeof value === 'string' && value !== '' ? value : undefined;
|
|
24
|
+
};
|
|
19
25
|
async function apiErrorFrom(response) {
|
|
20
26
|
const body = await response.json().catch(() => null);
|
|
21
|
-
return new ApiError(response.status, body
|
|
27
|
+
return new ApiError(response.status, stringField(body, 'error') ?? (response.statusText || 'Unknown Error'), stringField(body, 'message') ?? `Request failed with status ${response.status}`, parseRetryAfter(response.headers?.get('Retry-After')));
|
|
22
28
|
}
|
|
23
29
|
let creditUsage = null;
|
|
24
30
|
function recordCredits(response) {
|
|
25
|
-
const charged = response.headers?.get('X-Credits-Charged');
|
|
26
|
-
const remaining = response.headers?.get('X-Credits-Included-Remaining');
|
|
27
|
-
if (charged
|
|
31
|
+
const charged = response.headers?.get('X-Credits-Charged') ?? null;
|
|
32
|
+
const remaining = response.headers?.get('X-Credits-Included-Remaining') ?? null;
|
|
33
|
+
if (charged === null && remaining === null)
|
|
28
34
|
return;
|
|
29
35
|
const chargedCredits = Number(charged) || 0;
|
|
30
36
|
creditUsage = {
|
|
31
37
|
charged: (creditUsage?.charged ?? 0) + chargedCredits,
|
|
32
|
-
includedRemaining: remaining
|
|
38
|
+
includedRemaining: remaining === null
|
|
33
39
|
? creditUsage?.includedRemaining ?? null
|
|
34
40
|
: Math.max(0, (Number(remaining) || 0) - chargedCredits),
|
|
35
41
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-client.js","sourceRoot":"","sources":["../../../src/client/api-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"api-client.js","sourceRoot":"","sources":["../../../src/client/api-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,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;IACpD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QACxB,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -1,4 +1,17 @@
|
|
|
1
|
+
import { ApiError } from '../shared/errors.js';
|
|
1
2
|
type NextUrlExtractor<T> = (data: T) => string | undefined;
|
|
3
|
+
/**
|
|
4
|
+
* How `--all` waits out a refused page instead of dropping the pages it already holds: a 429 (the API's admission
|
|
5
|
+
* limit) or 503 is retried up to `retries` times, each after the answer's `Retry-After`, else `baseDelayMs * 2^n`,
|
|
6
|
+
* never longer than `maxDelayMs`. Any other error, or the last refusal, ends the walk.
|
|
7
|
+
*/
|
|
8
|
+
export declare const PAGE_RETRY: {
|
|
9
|
+
readonly retries: 5;
|
|
10
|
+
readonly baseDelayMs: 1000;
|
|
11
|
+
readonly maxDelayMs: 30000;
|
|
12
|
+
};
|
|
13
|
+
/** The wait before retry number `retry` (0-based) of a refused page. */
|
|
14
|
+
export declare function pageRetryDelayMs(error: ApiError, retry: number): number;
|
|
2
15
|
export declare function fetchAllPages<T>(initialData: T, extractNextUrl: NextUrlExtractor<T>, mergeResults: (accumulated: T, page: T) => T): Promise<T>;
|
|
3
16
|
/**
|
|
4
17
|
* `--all` over a response that pages with a top-level `next_url`: every `itemsPaths` array is concatenated across
|
|
@@ -1,20 +1,49 @@
|
|
|
1
1
|
import { apiGet } from './api-client.js';
|
|
2
|
+
import { ApiError } from '../shared/errors.js';
|
|
2
3
|
import { createSpinner } from '../shared/spinner.js';
|
|
3
4
|
import { pick } from '../formatters/flatten.js';
|
|
5
|
+
/**
|
|
6
|
+
* How `--all` waits out a refused page instead of dropping the pages it already holds: a 429 (the API's admission
|
|
7
|
+
* limit) or 503 is retried up to `retries` times, each after the answer's `Retry-After`, else `baseDelayMs * 2^n`,
|
|
8
|
+
* never longer than `maxDelayMs`. Any other error, or the last refusal, ends the walk.
|
|
9
|
+
*/
|
|
10
|
+
export const PAGE_RETRY = { retries: 5, baseDelayMs: 1_000, maxDelayMs: 30_000 };
|
|
11
|
+
const isRetryable = (error) => error instanceof ApiError && (error.statusCode === 429 || error.statusCode === 503);
|
|
12
|
+
/** The wait before retry number `retry` (0-based) of a refused page. */
|
|
13
|
+
export function pageRetryDelayMs(error, retry) {
|
|
14
|
+
return Math.min(PAGE_RETRY.maxDelayMs, error.retryAfterMs ?? PAGE_RETRY.baseDelayMs * 2 ** retry);
|
|
15
|
+
}
|
|
16
|
+
const sleep = (ms) => new Promise(done => setTimeout(done, ms));
|
|
17
|
+
async function fetchPage(nextUrl, onWait) {
|
|
18
|
+
// nextUrl is absolute: re-issue its path + query against the configured base URL. Repeated keys
|
|
19
|
+
// (`status=a&status=b`) stay repeated.
|
|
20
|
+
const url = new URL(nextUrl);
|
|
21
|
+
const params = {};
|
|
22
|
+
url.searchParams.forEach((v, k) => { (params[k] ??= []).push(v); });
|
|
23
|
+
for (let retry = 0;; retry += 1) {
|
|
24
|
+
try {
|
|
25
|
+
return await apiGet({ path: url.pathname, params, silent: true });
|
|
26
|
+
}
|
|
27
|
+
catch (error) {
|
|
28
|
+
if (!isRetryable(error) || retry >= PAGE_RETRY.retries)
|
|
29
|
+
throw error;
|
|
30
|
+
const delay = pageRetryDelayMs(error, retry);
|
|
31
|
+
onWait(Math.ceil(delay / 1000), retry + 1);
|
|
32
|
+
await sleep(delay);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
4
36
|
export async function fetchAllPages(initialData, extractNextUrl, mergeResults) {
|
|
5
37
|
let result = initialData;
|
|
6
38
|
let nextUrl = extractNextUrl(result);
|
|
7
39
|
let page = 1;
|
|
8
40
|
while (nextUrl) {
|
|
9
|
-
page
|
|
41
|
+
page += 1;
|
|
10
42
|
const spinner = createSpinner(`Fetching page ${page}...`);
|
|
11
43
|
try {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const params = {};
|
|
16
|
-
url.searchParams.forEach((v, k) => { (params[k] ??= []).push(v); });
|
|
17
|
-
const pageData = await apiGet({ path: url.pathname, params, silent: true });
|
|
44
|
+
const pageData = await fetchPage(nextUrl, (seconds, retry) => {
|
|
45
|
+
spinner.text = `Page ${page} refused (rate limit) — retry ${retry}/${PAGE_RETRY.retries} in ${seconds}s...`;
|
|
46
|
+
});
|
|
18
47
|
result = mergeResults(result, pageData);
|
|
19
48
|
nextUrl = extractNextUrl(pageData);
|
|
20
49
|
spinner.succeed(`Page ${page} fetched`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.js","sourceRoot":"","sources":["../../../src/client/pagination.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAIhD,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"pagination.js","sourceRoot":"","sources":["../../../src/client/pagination.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAIhD;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,OAAO,EAAE,CAAC,EAAE,WAAW,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,EAAW,CAAC;AAE1F,MAAM,WAAW,GAAG,CAAC,KAAc,EAAqB,EAAE,CACxD,KAAK,YAAY,QAAQ,IAAI,CAAC,KAAK,CAAC,UAAU,KAAK,GAAG,IAAI,KAAK,CAAC,UAAU,KAAK,GAAG,CAAC,CAAC;AAEtF,wEAAwE;AACxE,MAAM,UAAU,gBAAgB,CAA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