lifeastroapi 0.5.0 → 0.7.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 CHANGED
@@ -138,7 +138,9 @@ await client.chart.planets({ ...birth, ayanamsa: "krishnamurti", houseSystem: "p
138
138
  `milan.summary`) return ids and numbers, no prose: planet ids `sun` … `ketu`, `sign_index`
139
139
  0-based (0 = Aries), `house` 1-based whole-sign from the lagna, nakshatra index 0-based
140
140
  (0 = Ashwini), every instant as `*_local` (RFC 3339) plus `*_jd` (Julian Day, UT), and a
141
- `skipped` object naming anything that could not be computed. Map ids to names in your app.
141
+ `skipped` object naming anything that could not be computed. Map ids to names in your app
142
+ (`chart.kundliFacts` and `milan.summary` also take `lang`: term fields such as avastha
143
+ names and koota details follow it).
142
144
 
143
145
  ```ts
144
146
  const facts = await client.chart.kundliFacts({ ...birth, include: "all" });
@@ -146,6 +148,54 @@ const sadeSati = await client.transit.sadeSatiWindows({ birth, years: 30 });
146
148
  const match = await client.milan.summary({ boy: birth, girl: { date: "1992-03-20", time: "08:15", tz: "Asia/Kolkata", lat: 28.6139, lon: 77.209 } });
147
149
  ```
148
150
 
151
+ ## Languages
152
+
153
+ Every Vedic method whose response carries names or text takes an optional `lang`.
154
+ The same fields come back in that language; ids, dates, numbers and explicit
155
+ `*_en` / `*_hi` fields do not change.
156
+
157
+ ```ts
158
+ const day = await client.panchang.basic({
159
+ lat: 19.076, lon: 72.8777, tz: "Asia/Kolkata", date: "2027-01-15",
160
+ lang: "gu",
161
+ });
162
+ // tithi, nakshatra, yoga, karana and vara names are in Gujarati
163
+
164
+ const chart = await client.chart.planets({
165
+ date: "1990-01-15", time: "10:30", tz: "Asia/Kolkata", lat: 19.076, lon: 72.8777,
166
+ lang: "ta",
167
+ });
168
+ ```
169
+
170
+ | `lang` | Language | Coverage |
171
+ |--------|----------|----------|
172
+ | `en` | English (default) | complete |
173
+ | `hi` | Hindi | complete |
174
+ | `mr` | Marathi | complete |
175
+ | `te` | Telugu | complete |
176
+ | `ta` | Tamil | complete |
177
+ | `kn` | Kannada | complete |
178
+ | `ml` | Malayalam | complete |
179
+ | `gu` | Gujarati | complete |
180
+ | `bn` | Bengali | names and terms; longer prose is still English |
181
+ | `pa` | Punjabi | names and terms; longer prose is still English |
182
+
183
+ - **Where it works:** `panchang`, `calendar`, `festivals`, `eclipses`, `planetMoments`,
184
+ `transit`, `milan`, `muhurta`, `chart`, `prashna`, `numerology`, `dasha`, `varshaphal`,
185
+ `ashtakavarga`, `lalkitab`, `horoscope`, `reports`, `narrative` and `remedies`.
186
+ The `Locale` type lists the values. `festivals.*`, `panchang.monthly` and some
187
+ `remedies.*` methods also still accept the older `locale` input; `lang` wins when
188
+ both are given.
189
+ - **Methods without `lang`:** those that return only times, numbers or ids, such as
190
+ `panchang.rahuKaal`, `panchang.sunriseSunset`, `chart.yogas`, `chart.doshas`,
191
+ `transit.windows` and `milan.overlay`. There is nothing in them to translate.
192
+ - **English only:** `western.*`, `tarot.*`, `geo.*` and `meta.*`. The
193
+ `western.narrative.*` methods take `lang` for `en`, `hi` and `mr`.
194
+ - **Stable keys under a language.** Muhurta `factors[]` items carry an English `id`
195
+ (`Tithi`, `RahuKaal`, …) next to the localized `name`, so match on `id`.
196
+ `panchang.panchaka` returns `avoidance` (ids, comma-separated) and `avoidance_text`
197
+ (the same list as reader text in `lang`).
198
+
149
199
  ## Namespaces
150
200
 
151
201
  `client.<namespace>.<method>(input)` — every method returns the response payload.
@@ -164,13 +214,13 @@ const match = await client.milan.summary({ boy: birth, girl: { date: "1992-03-20
164
214
  | `prashna` | horary answer, chart, arudha, significators |
165
215
  | `eclipses` | solar / lunar / all (date range, optional visibility) |
166
216
  | `calendar` | Hindu month, ritu, samvatsara, adhik-maas |
167
- | `festivals` | full Hindu festival calendar by month / on a date — location-aware, `locale`, `monthSystem` (amanta/purnimanta); `panchang.monthly({ include: "sheet" })` returns a complete printable calendar page |
217
+ | `festivals` | full Hindu festival calendar by month / on a date — location-aware, `lang`, `monthSystem` (amanta/purnimanta); `panchang.monthly({ include: "sheet" })` returns a complete printable calendar page |
168
218
  | `planetMoments` | retrograde windows, ingress, combustion window, speed |
169
219
  | `ashtakavarga` | sarva, bhinna (per planet), kaksha, transit-score |
170
220
  | `geo` | place search, reverse geocode, timezone, place by id |
171
221
  | `tarot` | cards, single card, daily, spread, yes/no |
172
222
  | `reports` | kundli (lite/detailed/brihad), match-making, mangal-dosha, sade-sati, varshaphal, numerology, horoscopes |
173
- | `narrative` | authored Vedic interpretations (lagna, planets, yogas, doshas, dasha-phal, transit-phal, prashna, outlooks, …) in `en/hi/mr/bn/kn/ta/te/gu` |
223
+ | `narrative` | authored Vedic interpretations (lagna, planets, yogas, doshas, dasha-phal, transit-phal, prashna, outlooks, …) in `en/hi/mr/te/ta/kn/ml/gu` (see [Languages](#languages)) |
174
224
  | `remedies` | remedies by rule id; `forGraha` (by graha and reason); mantra / pooja / vrat / daan / rudraksha / yantra detail; Lal Kitab remedies |
175
225
  | `lalkitab` | Lal Kitab chart and dasha |
176
226
  | `meta` | free catalogs: `endpoints` (credit cost of every route), `ayanamsas`, `vedicYogas`, `vedicDoshas`, `vedicLocales`, `version` |
@@ -344,8 +394,9 @@ Each report has a `render*Html` and a `*Pdf` form:
344
394
  | Varshaphal | `reports.varshaphal` | `renderVarshaphalHtml` | `varshaphalPdf` |
345
395
  | Horoscope (daily / weekly / monthly) | `reports.horoscopeDaily` … | `renderHoroscopeHtml` | `horoscopePdf` |
346
396
 
347
- All render in `en`, `hi` and `mr` (and other locales where the report data carries
348
- them) — pass `lang` when you request the report.
397
+ All render in `en`, `hi`, `mr`, `te`, `ta`, `kn`, `ml` and `gu` — pass `lang` when you
398
+ request the report. Each script needs its Noto font on the machine that renders the
399
+ PDF (see [Fonts](#fonts)).
349
400
 
350
401
  **Brihad Kundli** is the large one (well over 100 pages). `kundliBrihadPdf` renders
351
402
  it twice so the table of contents shows real page numbers, adds a running header