lifeastroapi 0.0.0-stage → 0.4.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/LICENSE +21 -0
- package/README.md +518 -2
- package/dist/index.cjs +2028 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1776 -0
- package/dist/index.d.ts +1776 -0
- package/dist/index.js +1991 -0
- package/dist/index.js.map +1 -0
- package/dist/pdf/index.cjs +6724 -0
- package/dist/pdf/index.cjs.map +1 -0
- package/dist/pdf/index.d.cts +1287 -0
- package/dist/pdf/index.d.ts +1287 -0
- package/dist/pdf/index.js +6671 -0
- package/dist/pdf/index.js.map +1 -0
- package/package.json +100 -4
|
@@ -0,0 +1,1287 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared building blocks for the report → HTML templates.
|
|
3
|
+
*
|
|
4
|
+
* These templates are ported from the LifeAstroAPI server-side Go templates
|
|
5
|
+
* (`internal/pdf/*.go`) so the SDK-rendered PDF looks identical to the
|
|
6
|
+
* design the API was built to produce. Each `render*Html` function consumes
|
|
7
|
+
* the JSON exactly as returned by `client.reports.*` and emits a
|
|
8
|
+
* self-contained HTML document ready to convert to PDF (see `htmlToPdf`).
|
|
9
|
+
*/
|
|
10
|
+
/** Branding overrides supplied by the SDK caller (camelCase, all optional). */
|
|
11
|
+
interface Branding {
|
|
12
|
+
companyName?: string;
|
|
13
|
+
/** Logo image URL (or a `data:` URI). Rendered at the top of the cover. */
|
|
14
|
+
logoUrl?: string;
|
|
15
|
+
/** Primary accent color (headings, table headers). */
|
|
16
|
+
primaryColor?: string;
|
|
17
|
+
/** Secondary color (meta text, footer). */
|
|
18
|
+
secondaryColor?: string;
|
|
19
|
+
/** Footer line printed on every page. */
|
|
20
|
+
footerText?: string;
|
|
21
|
+
/** Diagonal watermark text (e.g. "DRAFT", "SAMPLE"). */
|
|
22
|
+
watermarkText?: string;
|
|
23
|
+
}
|
|
24
|
+
/** Branding as it appears in the API JSON (`data.Branding`, PascalCase). */
|
|
25
|
+
interface RawBranding {
|
|
26
|
+
CompanyName?: string;
|
|
27
|
+
LogoURL?: string;
|
|
28
|
+
PrimaryColor?: string;
|
|
29
|
+
SecondaryColor?: string;
|
|
30
|
+
FooterText?: string;
|
|
31
|
+
WatermarkText?: string;
|
|
32
|
+
}
|
|
33
|
+
/** Fully resolved branding with defaults applied. */
|
|
34
|
+
interface ResolvedBranding {
|
|
35
|
+
companyName: string;
|
|
36
|
+
logoUrl: string;
|
|
37
|
+
primaryColor: string;
|
|
38
|
+
secondaryColor: string;
|
|
39
|
+
footerText: string;
|
|
40
|
+
watermarkText: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Merge caller-supplied branding over the branding embedded in the report
|
|
44
|
+
* JSON, then apply sensible defaults. Caller overrides win per-field.
|
|
45
|
+
*/
|
|
46
|
+
declare function resolveBranding(raw?: RawBranding, override?: Branding): ResolvedBranding;
|
|
47
|
+
/**
|
|
48
|
+
* Strip "AI-tell" punctuation that readers associate with machine-generated
|
|
49
|
+
* text — em-dash (—), en-dash (–) and arrows (→ ⟶ -> →) — replacing them with
|
|
50
|
+
* a natural comma. Works for ALL languages (Devanagari, Latin, etc.). Also
|
|
51
|
+
* tidies the artefacts the swap can create (double commas, comma-before-comma,
|
|
52
|
+
* spaces before commas, a trailing/leading comma).
|
|
53
|
+
*/
|
|
54
|
+
declare function humanize(text: string): string;
|
|
55
|
+
/**
|
|
56
|
+
* Make an authored narrative BODY read like a warm, second-person consumer
|
|
57
|
+
* reading instead of a clinical astrologer's note:
|
|
58
|
+
* - strips the repeated "three-levels / astrology is about guidance" filler
|
|
59
|
+
* paragraph that pads ~2000 rules and says nothing about the person;
|
|
60
|
+
* - converts the third-person clinical term ("the native" / "जातक" /
|
|
61
|
+
* "जातक") to second person ("you" / "आप").
|
|
62
|
+
* Locale-aware. Safe to run on any string (no-ops if nothing matches).
|
|
63
|
+
* Apply this to narrative bodies only (not labels/headings).
|
|
64
|
+
*/
|
|
65
|
+
declare function cleanNarrative(text: string, locale?: string): string;
|
|
66
|
+
/** HTML-escape a value (after humanizing AI-tell punctuation). `null`/`undefined` → "". */
|
|
67
|
+
declare function esc(value: unknown): string;
|
|
68
|
+
/** HTML-escape a NARRATIVE BODY: clean tone first (locale-aware), then esc. */
|
|
69
|
+
declare function escBody(value: unknown, locale?: string): string;
|
|
70
|
+
/** One authored narrative block, as it appears in report JSON (PascalCase). */
|
|
71
|
+
interface NarrativeSection {
|
|
72
|
+
Heading?: string;
|
|
73
|
+
Body?: string;
|
|
74
|
+
Bullets?: string[];
|
|
75
|
+
Citations?: string[];
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Vedic Birth Chart (Lite) report → HTML.
|
|
80
|
+
*
|
|
81
|
+
* Ported from the LifeAstroAPI server-side Go template
|
|
82
|
+
* (`internal/pdf/kundli_lite.go`). The Lite report is a deliberate subset of
|
|
83
|
+
* the Detailed Kundli: cover page, ascendant + lagna-summary block, and the
|
|
84
|
+
* 9-graha planet positions table. No per-rule narrative sections, panchang,
|
|
85
|
+
* or citations.
|
|
86
|
+
*
|
|
87
|
+
* Consumes the JSON exactly as returned by `client.reports.kundliLite()` and
|
|
88
|
+
* emits a self-contained HTML document ready to convert to PDF.
|
|
89
|
+
*/
|
|
90
|
+
|
|
91
|
+
/** A single planetary placement (PascalCase struct, snake_case JSON fields). */
|
|
92
|
+
interface KundliLitePlacement {
|
|
93
|
+
sign?: string;
|
|
94
|
+
dms_within?: string;
|
|
95
|
+
nakshatra?: string;
|
|
96
|
+
pada?: number;
|
|
97
|
+
nak_lord?: string;
|
|
98
|
+
}
|
|
99
|
+
/** One graha row in the planet table. */
|
|
100
|
+
interface KundliLitePlanet {
|
|
101
|
+
name?: string;
|
|
102
|
+
placement?: KundliLitePlacement;
|
|
103
|
+
house_num?: number;
|
|
104
|
+
retro?: boolean;
|
|
105
|
+
}
|
|
106
|
+
/** Birth subject (reused shape from the Detailed Kundli). */
|
|
107
|
+
interface KundliLiteSubject {
|
|
108
|
+
Name?: string;
|
|
109
|
+
BirthDate?: string;
|
|
110
|
+
BirthTime?: string;
|
|
111
|
+
BirthPlace?: string;
|
|
112
|
+
Lat?: number;
|
|
113
|
+
Lon?: number;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* The Lite report payload, mirroring Go's `KundliLiteReportData`.
|
|
117
|
+
* Top-level + Subject fields are PascalCase (no Go `json:` tag); nested
|
|
118
|
+
* placement fields are snake_case (tagged in KundliPlacement/KundliPlanet).
|
|
119
|
+
*/
|
|
120
|
+
interface KundliLiteData {
|
|
121
|
+
Locale?: string;
|
|
122
|
+
Branding?: RawBranding;
|
|
123
|
+
Subject?: KundliLiteSubject;
|
|
124
|
+
Ascendant?: KundliLitePlacement;
|
|
125
|
+
Planets?: KundliLitePlanet[];
|
|
126
|
+
LagnaSummary?: string;
|
|
127
|
+
GeneratedAt?: string;
|
|
128
|
+
}
|
|
129
|
+
declare function renderKundliLiteHtml(data: KundliLiteData, branding?: Branding): string;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Brihad Kundli — renderers for the deep classical sections + corpus-backed
|
|
133
|
+
* narrative chapters (the content that takes the report to 290+ pages).
|
|
134
|
+
*
|
|
135
|
+
* These consume the snake_case JSON keys emitted by the Go C-series structs
|
|
136
|
+
* (internal/pdf/brihad_csections.go) and the narrative chapters
|
|
137
|
+
* (BrihadNarrativeChapter). Kept separate from kundliBrihad.ts so the main
|
|
138
|
+
* template stays readable; the main render fn imports renderBrihadDeepSections
|
|
139
|
+
* and splices its output into the document body.
|
|
140
|
+
*/
|
|
141
|
+
|
|
142
|
+
interface BrihadNarrativeSection {
|
|
143
|
+
Heading?: string;
|
|
144
|
+
Body?: string;
|
|
145
|
+
Bullets?: string[] | null;
|
|
146
|
+
Citations?: string[] | null;
|
|
147
|
+
}
|
|
148
|
+
interface BrihadNarrativeChapter {
|
|
149
|
+
key?: string;
|
|
150
|
+
title?: string;
|
|
151
|
+
sections?: BrihadNarrativeSection[];
|
|
152
|
+
}
|
|
153
|
+
interface BrihadAvakahada {
|
|
154
|
+
paya?: string;
|
|
155
|
+
varna?: string;
|
|
156
|
+
vashya?: string;
|
|
157
|
+
yoni?: string;
|
|
158
|
+
gana?: string;
|
|
159
|
+
nadi?: string;
|
|
160
|
+
tatva?: string;
|
|
161
|
+
nakshatra_lord?: string;
|
|
162
|
+
rashi_lord?: string;
|
|
163
|
+
lagna_lord?: string;
|
|
164
|
+
}
|
|
165
|
+
interface BrihadGhata {
|
|
166
|
+
weekday?: string;
|
|
167
|
+
tithi_text?: string;
|
|
168
|
+
month?: string;
|
|
169
|
+
nakshatra?: string;
|
|
170
|
+
yoga?: string;
|
|
171
|
+
karana?: string;
|
|
172
|
+
prahar?: number;
|
|
173
|
+
ghata_rashi?: string;
|
|
174
|
+
}
|
|
175
|
+
interface BrihadChalit {
|
|
176
|
+
houses?: {
|
|
177
|
+
house?: number;
|
|
178
|
+
begin_sign?: string;
|
|
179
|
+
begin_dms?: string;
|
|
180
|
+
madhya_sign?: string;
|
|
181
|
+
madhya_dms?: string;
|
|
182
|
+
}[];
|
|
183
|
+
planets?: {
|
|
184
|
+
name?: string;
|
|
185
|
+
rashi_house?: number;
|
|
186
|
+
chalit_house?: number;
|
|
187
|
+
shifted?: boolean;
|
|
188
|
+
}[];
|
|
189
|
+
}
|
|
190
|
+
interface BrihadKP {
|
|
191
|
+
cusps?: {
|
|
192
|
+
house?: number;
|
|
193
|
+
sign?: string;
|
|
194
|
+
dms?: string;
|
|
195
|
+
star_lord?: string;
|
|
196
|
+
sub_lord?: string;
|
|
197
|
+
sub_sub_lord?: string;
|
|
198
|
+
}[];
|
|
199
|
+
planet_significators?: {
|
|
200
|
+
key?: string;
|
|
201
|
+
values?: number[];
|
|
202
|
+
}[];
|
|
203
|
+
house_significators?: {
|
|
204
|
+
house?: number;
|
|
205
|
+
planets?: string[];
|
|
206
|
+
}[];
|
|
207
|
+
ruling_planets?: Record<string, string>;
|
|
208
|
+
}
|
|
209
|
+
interface BrihadJaimini {
|
|
210
|
+
charakarakas?: {
|
|
211
|
+
karaka?: string;
|
|
212
|
+
planet?: string;
|
|
213
|
+
}[];
|
|
214
|
+
karakamsa_sign?: string;
|
|
215
|
+
swamsa_sign?: string;
|
|
216
|
+
arudha_padas?: {
|
|
217
|
+
label?: string;
|
|
218
|
+
name?: string;
|
|
219
|
+
sign?: string;
|
|
220
|
+
house?: number;
|
|
221
|
+
}[];
|
|
222
|
+
}
|
|
223
|
+
interface BrihadIshtaDevata {
|
|
224
|
+
deity?: string;
|
|
225
|
+
twelfth_sign?: string;
|
|
226
|
+
determining_graha?: string;
|
|
227
|
+
body?: string;
|
|
228
|
+
}
|
|
229
|
+
interface BrihadMaitriRow {
|
|
230
|
+
planet?: string;
|
|
231
|
+
relations?: Record<string, string>;
|
|
232
|
+
}
|
|
233
|
+
interface BrihadMaitri {
|
|
234
|
+
order?: string[];
|
|
235
|
+
naisargik?: BrihadMaitriRow[];
|
|
236
|
+
tatkalik?: BrihadMaitriRow[];
|
|
237
|
+
panchadha?: BrihadMaitriRow[];
|
|
238
|
+
}
|
|
239
|
+
interface BrihadAvastha {
|
|
240
|
+
planet?: string;
|
|
241
|
+
baladi?: string;
|
|
242
|
+
jagradadi?: string;
|
|
243
|
+
deeptadi?: string;
|
|
244
|
+
}
|
|
245
|
+
interface BrihadLalKitab {
|
|
246
|
+
planets?: {
|
|
247
|
+
name?: string;
|
|
248
|
+
house?: number;
|
|
249
|
+
sign?: string;
|
|
250
|
+
}[];
|
|
251
|
+
rins?: {
|
|
252
|
+
name?: string;
|
|
253
|
+
present?: boolean;
|
|
254
|
+
body?: string;
|
|
255
|
+
}[];
|
|
256
|
+
teva?: {
|
|
257
|
+
name?: string;
|
|
258
|
+
present?: boolean;
|
|
259
|
+
}[];
|
|
260
|
+
}
|
|
261
|
+
interface BrihadShadbalaRow {
|
|
262
|
+
planet?: string;
|
|
263
|
+
total_rupas?: number;
|
|
264
|
+
rank?: number;
|
|
265
|
+
}
|
|
266
|
+
interface BrihadBhavaBalaRow {
|
|
267
|
+
house?: number;
|
|
268
|
+
bhavadhipati?: number;
|
|
269
|
+
bhava_dig_bala?: number;
|
|
270
|
+
bhava_drsti?: number;
|
|
271
|
+
total?: number;
|
|
272
|
+
}
|
|
273
|
+
interface BrihadAshtakavarga {
|
|
274
|
+
sav?: number[];
|
|
275
|
+
sav_total?: number;
|
|
276
|
+
prastar?: {
|
|
277
|
+
planet?: string;
|
|
278
|
+
contributors?: string[];
|
|
279
|
+
grid?: number[][];
|
|
280
|
+
per_sign?: number[];
|
|
281
|
+
total?: number;
|
|
282
|
+
}[];
|
|
283
|
+
}
|
|
284
|
+
interface BrihadVarshaphalYear {
|
|
285
|
+
year?: number;
|
|
286
|
+
muntha_sign?: string;
|
|
287
|
+
muntha_house?: number;
|
|
288
|
+
varsha_lord?: string;
|
|
289
|
+
sahams?: {
|
|
290
|
+
name?: string;
|
|
291
|
+
sign?: string;
|
|
292
|
+
dms?: string;
|
|
293
|
+
lord?: string;
|
|
294
|
+
verified?: boolean;
|
|
295
|
+
}[];
|
|
296
|
+
panchavargeeya?: {
|
|
297
|
+
planet?: string;
|
|
298
|
+
vishwa?: number;
|
|
299
|
+
}[];
|
|
300
|
+
summary?: string;
|
|
301
|
+
}
|
|
302
|
+
interface BrihadRajyogaPower {
|
|
303
|
+
percent?: number;
|
|
304
|
+
yoga_count?: number;
|
|
305
|
+
planets?: string[];
|
|
306
|
+
swarnim_kaal?: {
|
|
307
|
+
lord?: string;
|
|
308
|
+
start?: string;
|
|
309
|
+
end?: string;
|
|
310
|
+
}[];
|
|
311
|
+
}
|
|
312
|
+
interface BrihadMuddaArea {
|
|
313
|
+
label?: string;
|
|
314
|
+
text?: string;
|
|
315
|
+
}
|
|
316
|
+
interface BrihadMuddaPeriod {
|
|
317
|
+
lord?: string;
|
|
318
|
+
date_from?: string;
|
|
319
|
+
date_to?: string;
|
|
320
|
+
summary?: string;
|
|
321
|
+
areas?: BrihadMuddaArea[];
|
|
322
|
+
do_label?: string;
|
|
323
|
+
do?: string;
|
|
324
|
+
avoid_label?: string;
|
|
325
|
+
avoid?: string;
|
|
326
|
+
remedy_label?: string;
|
|
327
|
+
remedy?: string;
|
|
328
|
+
}
|
|
329
|
+
interface BrihadMuddaTimeline {
|
|
330
|
+
year?: number;
|
|
331
|
+
heading?: string;
|
|
332
|
+
periods?: BrihadMuddaPeriod[];
|
|
333
|
+
}
|
|
334
|
+
/** Container of the new fields, mixed into KundliBrihadData. */
|
|
335
|
+
interface BrihadPanchang {
|
|
336
|
+
tithi?: string;
|
|
337
|
+
vara?: string;
|
|
338
|
+
nakshatra?: string;
|
|
339
|
+
yoga?: string;
|
|
340
|
+
karana?: string;
|
|
341
|
+
}
|
|
342
|
+
interface BrihadGemstone {
|
|
343
|
+
kind?: string;
|
|
344
|
+
planet?: string;
|
|
345
|
+
stone?: string;
|
|
346
|
+
reason?: string;
|
|
347
|
+
}
|
|
348
|
+
interface BrihadGems {
|
|
349
|
+
stones?: BrihadGemstone[];
|
|
350
|
+
}
|
|
351
|
+
interface BrihadDeepData {
|
|
352
|
+
schema_version?: number;
|
|
353
|
+
avakahada?: BrihadAvakahada | null;
|
|
354
|
+
panchang?: BrihadPanchang | null;
|
|
355
|
+
gems?: BrihadGems | null;
|
|
356
|
+
ghata_chakra?: BrihadGhata | null;
|
|
357
|
+
chalit?: BrihadChalit | null;
|
|
358
|
+
kp?: BrihadKP | null;
|
|
359
|
+
jaimini?: BrihadJaimini | null;
|
|
360
|
+
ishta_devata?: BrihadIshtaDevata | null;
|
|
361
|
+
maitri?: BrihadMaitri | null;
|
|
362
|
+
avasthas?: BrihadAvastha[];
|
|
363
|
+
lal_kitab?: BrihadLalKitab | null;
|
|
364
|
+
shadbala?: BrihadShadbalaRow[];
|
|
365
|
+
bhava_bala?: BrihadBhavaBalaRow[];
|
|
366
|
+
ashtakavarga?: BrihadAshtakavarga | null;
|
|
367
|
+
varshaphal?: BrihadVarshaphalYear[];
|
|
368
|
+
mudda_timeline?: BrihadMuddaTimeline | null;
|
|
369
|
+
rajyoga_power?: BrihadRajyogaPower | null;
|
|
370
|
+
narrative_chapters?: BrihadNarrativeChapter[];
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* Brihad Kundli (comprehensive premium kundli) report → HTML.
|
|
375
|
+
*
|
|
376
|
+
* Ported verbatim (design + i18n) from the server-side Go template at
|
|
377
|
+
* `internal/pdf/brihad_kundli.go`. Consumes the JSON exactly as returned by
|
|
378
|
+
* `GET /v1/reports/kundli/brihad` and emits a self-contained HTML document
|
|
379
|
+
* ready to convert to PDF.
|
|
380
|
+
*
|
|
381
|
+
* This is the flagship report. The Go template renders 10 sections (each
|
|
382
|
+
* guarded so absent data collapses to nothing):
|
|
383
|
+
* Cover, Birth Chart Summary (ascendant + planet table), Planetary Analysis,
|
|
384
|
+
* House Analysis, Yogas, Vimshottari Dasha, Remedies, Divisional Charts,
|
|
385
|
+
* Doshas, Predictions by Life Area, Classical Citations.
|
|
386
|
+
*/
|
|
387
|
+
|
|
388
|
+
/** A sign + degree pair (ascendant and every natal planet). snake_case keys. */
|
|
389
|
+
interface BrihadPlacement {
|
|
390
|
+
sign?: string;
|
|
391
|
+
dms_within?: string;
|
|
392
|
+
nakshatra?: string;
|
|
393
|
+
pada?: number;
|
|
394
|
+
nak_lord?: string;
|
|
395
|
+
}
|
|
396
|
+
/** One natal planet row. */
|
|
397
|
+
interface BrihadPlanet {
|
|
398
|
+
name?: string;
|
|
399
|
+
name_en?: string;
|
|
400
|
+
placement?: BrihadPlacement;
|
|
401
|
+
house_num?: number;
|
|
402
|
+
retro?: boolean;
|
|
403
|
+
}
|
|
404
|
+
/** Cover metadata. */
|
|
405
|
+
interface BrihadSubject {
|
|
406
|
+
Name?: string;
|
|
407
|
+
BirthDate?: string;
|
|
408
|
+
BirthTime?: string;
|
|
409
|
+
BirthPlace?: string;
|
|
410
|
+
Lat?: number;
|
|
411
|
+
Lon?: number;
|
|
412
|
+
}
|
|
413
|
+
/** One house's narrative + meta (PascalCase — no json tags in Go). */
|
|
414
|
+
interface BrihadHouseSection {
|
|
415
|
+
HouseNum?: number;
|
|
416
|
+
LordEN?: string;
|
|
417
|
+
LordHI?: string;
|
|
418
|
+
/** Lord in the request locale (any non-en locale; omitted for en). Preferred when present. */
|
|
419
|
+
LordLocal?: string;
|
|
420
|
+
LordSign?: string;
|
|
421
|
+
Body?: string;
|
|
422
|
+
}
|
|
423
|
+
/** One detected yoga (PascalCase). */
|
|
424
|
+
interface BrihadYoga {
|
|
425
|
+
NameEN?: string;
|
|
426
|
+
NameHI?: string;
|
|
427
|
+
/** Name in the request locale (any non-en locale; omitted for en). Preferred when present. */
|
|
428
|
+
NameLocal?: string;
|
|
429
|
+
Effect?: string;
|
|
430
|
+
Source?: string;
|
|
431
|
+
}
|
|
432
|
+
/** One Vimshottari Mahadasha period (PascalCase). */
|
|
433
|
+
interface BrihadDashaPeriod {
|
|
434
|
+
Lord?: string;
|
|
435
|
+
LordHI?: string;
|
|
436
|
+
/** Lord in the request locale (any non-en locale; omitted for en). Preferred when present. */
|
|
437
|
+
LordLocal?: string;
|
|
438
|
+
StartDate?: string;
|
|
439
|
+
EndDate?: string;
|
|
440
|
+
DurationY?: number;
|
|
441
|
+
Body?: string;
|
|
442
|
+
}
|
|
443
|
+
/** One inline remedy (PascalCase). */
|
|
444
|
+
interface BrihadRemedy {
|
|
445
|
+
Title?: string;
|
|
446
|
+
Description?: string;
|
|
447
|
+
Category?: string;
|
|
448
|
+
}
|
|
449
|
+
/** One planet's placement in a divisional chart (snake_case via json tags). */
|
|
450
|
+
interface BrihadDivisionalPlanet {
|
|
451
|
+
name?: string;
|
|
452
|
+
sign?: string;
|
|
453
|
+
house?: number;
|
|
454
|
+
}
|
|
455
|
+
/** One varga chart's render data (snake_case via json tags). */
|
|
456
|
+
interface BrihadDivisional {
|
|
457
|
+
varga?: string;
|
|
458
|
+
name?: string;
|
|
459
|
+
subtitle?: string;
|
|
460
|
+
lagna_sign?: string;
|
|
461
|
+
planets?: BrihadDivisionalPlanet[];
|
|
462
|
+
}
|
|
463
|
+
/** One dosha's render data (PascalCase). */
|
|
464
|
+
interface BrihadDoshaEntry {
|
|
465
|
+
NameEN?: string;
|
|
466
|
+
NameHI?: string;
|
|
467
|
+
/** Name in the request locale (any non-en locale; omitted for en). Preferred when present. */
|
|
468
|
+
NameLocal?: string;
|
|
469
|
+
Severity?: string;
|
|
470
|
+
Body?: string;
|
|
471
|
+
Source?: string;
|
|
472
|
+
}
|
|
473
|
+
/** The composite dosha block (PascalCase). Each subfield nil → absent. */
|
|
474
|
+
interface BrihadDoshas {
|
|
475
|
+
Mangal?: BrihadDoshaEntry | null;
|
|
476
|
+
KaalSarp?: BrihadDoshaEntry | null;
|
|
477
|
+
Pitra?: BrihadDoshaEntry | null;
|
|
478
|
+
}
|
|
479
|
+
/** One life-area forecast (PascalCase). */
|
|
480
|
+
interface BrihadPrediction {
|
|
481
|
+
Area?: string;
|
|
482
|
+
Body?: string;
|
|
483
|
+
}
|
|
484
|
+
/** One classical-text reference (PascalCase). */
|
|
485
|
+
interface BrihadCitation {
|
|
486
|
+
Topic?: string;
|
|
487
|
+
Source?: string;
|
|
488
|
+
Note?: string;
|
|
489
|
+
}
|
|
490
|
+
/** The full Brihad Kundli report payload. */
|
|
491
|
+
interface KundliBrihadData extends BrihadDeepData {
|
|
492
|
+
Locale?: string;
|
|
493
|
+
Branding?: RawBranding;
|
|
494
|
+
Subject?: BrihadSubject;
|
|
495
|
+
Ascendant?: BrihadPlacement;
|
|
496
|
+
Planets?: BrihadPlanet[];
|
|
497
|
+
Houses?: BrihadHouseSection[];
|
|
498
|
+
Yogas?: BrihadYoga[];
|
|
499
|
+
CurrentDasha?: BrihadDashaPeriod | null;
|
|
500
|
+
UpcomingDashas?: BrihadDashaPeriod[];
|
|
501
|
+
Remedies?: BrihadRemedy[];
|
|
502
|
+
DivisionalCharts?: BrihadDivisional[];
|
|
503
|
+
Doshas?: BrihadDoshas | null;
|
|
504
|
+
Predictions?: BrihadPrediction[];
|
|
505
|
+
Citations?: BrihadCitation[];
|
|
506
|
+
GeneratedAt?: string;
|
|
507
|
+
}
|
|
508
|
+
declare function renderKundliBrihadHtml(data: KundliBrihadData, branding?: Branding): string;
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* Detailed Kundli report → HTML.
|
|
512
|
+
*
|
|
513
|
+
* Ported from the server-side Go template `internal/pdf/kundli.go` so the
|
|
514
|
+
* SDK-rendered PDF is visually faithful to the API's own report. Consumes the
|
|
515
|
+
* JSON returned by `client.reports.kundliDetailed(...)` verbatim (PascalCase
|
|
516
|
+
* top-level keys; snake_case inside placement/panchang — see interfaces below)
|
|
517
|
+
* and returns a self-contained HTML document ready for `htmlToPdf`.
|
|
518
|
+
*
|
|
519
|
+
* The Go template's i18n helpers (signLabel/nakLabel/planetLabel/tithiLabel…)
|
|
520
|
+
* just echo the already-locale-resolved field straight back, so here we read
|
|
521
|
+
* the field directly — no client-side translation is performed.
|
|
522
|
+
*/
|
|
523
|
+
|
|
524
|
+
/** A sign + degree pair (snake_case keys, as in the API JSON). */
|
|
525
|
+
interface KundliPlacement {
|
|
526
|
+
sign?: string;
|
|
527
|
+
dms_within?: string;
|
|
528
|
+
nakshatra?: string;
|
|
529
|
+
pada?: number;
|
|
530
|
+
nak_lord?: string;
|
|
531
|
+
}
|
|
532
|
+
/** One planet row in the positions table. */
|
|
533
|
+
interface KundliPlanet {
|
|
534
|
+
name?: string;
|
|
535
|
+
placement?: KundliPlacement;
|
|
536
|
+
house_num?: number;
|
|
537
|
+
retro?: boolean;
|
|
538
|
+
}
|
|
539
|
+
/** Tithi / nakshatra / yoga / karana at the moment of birth. */
|
|
540
|
+
interface KundliPanchang {
|
|
541
|
+
tithi?: string;
|
|
542
|
+
nakshatra?: string;
|
|
543
|
+
yoga?: string;
|
|
544
|
+
karana?: string;
|
|
545
|
+
}
|
|
546
|
+
/** The birth subject metadata printed on the cover. */
|
|
547
|
+
interface KundliSubject {
|
|
548
|
+
Name?: string;
|
|
549
|
+
BirthDate?: string;
|
|
550
|
+
BirthTime?: string;
|
|
551
|
+
BirthPlace?: string;
|
|
552
|
+
Lat?: number;
|
|
553
|
+
Lon?: number;
|
|
554
|
+
}
|
|
555
|
+
/** Branding embedded in the report JSON (PascalCase). */
|
|
556
|
+
interface KundliBranding {
|
|
557
|
+
CompanyName?: string;
|
|
558
|
+
LogoURL?: string;
|
|
559
|
+
PrimaryColor?: string;
|
|
560
|
+
SecondaryColor?: string;
|
|
561
|
+
FooterText?: string;
|
|
562
|
+
WatermarkText?: string;
|
|
563
|
+
}
|
|
564
|
+
/** Full Detailed Kundli payload (exactly as returned by the API). */
|
|
565
|
+
interface KundliDetailedData {
|
|
566
|
+
Locale?: string;
|
|
567
|
+
Branding?: KundliBranding;
|
|
568
|
+
Subject?: KundliSubject;
|
|
569
|
+
Ascendant?: KundliPlacement;
|
|
570
|
+
Planets?: KundliPlanet[];
|
|
571
|
+
Panchang?: KundliPanchang;
|
|
572
|
+
GeneratedAt?: string;
|
|
573
|
+
Narratives?: NarrativeSection[];
|
|
574
|
+
CurrentDasha?: BrihadDashaPeriod;
|
|
575
|
+
UpcomingDashas?: BrihadDashaPeriod[];
|
|
576
|
+
Houses?: BrihadHouseSection[];
|
|
577
|
+
Yogas?: BrihadYoga[];
|
|
578
|
+
Doshas?: BrihadDoshas | null;
|
|
579
|
+
}
|
|
580
|
+
/**
|
|
581
|
+
* Render the Detailed Kundli report as a complete HTML document.
|
|
582
|
+
*
|
|
583
|
+
* @param data report JSON from `client.reports.kundliDetailed(...)`
|
|
584
|
+
* @param branding optional caller branding overrides (win per-field over the
|
|
585
|
+
* branding embedded in `data`)
|
|
586
|
+
*/
|
|
587
|
+
declare function renderKundliDetailedHtml(data: KundliDetailedData, branding?: Branding): string;
|
|
588
|
+
|
|
589
|
+
/**
|
|
590
|
+
* Match Making (Kundli Milan) report → HTML.
|
|
591
|
+
*
|
|
592
|
+
* Ported from the server-side Go template `internal/pdf/matchmaking.go` so the
|
|
593
|
+
* SDK-rendered PDF is visually faithful to the API's own report. Consumes the
|
|
594
|
+
* JSON returned by `client.reports.matchMaking(...)` verbatim (PascalCase
|
|
595
|
+
* top-level keys; snake_case inside the boy/girl subjects — see interfaces
|
|
596
|
+
* below) and returns a self-contained HTML document ready for `htmlToPdf`.
|
|
597
|
+
*
|
|
598
|
+
* The Go template's i18n helpers (matchNakLabel/kootaLabel/…) just echo the
|
|
599
|
+
* already-locale-resolved field straight back, so here we read the field
|
|
600
|
+
* directly — no client-side translation is performed. The koota `name` and
|
|
601
|
+
* subject `nakshatra` arrive pre-localized from the API.
|
|
602
|
+
*
|
|
603
|
+
* The verdict-description and dosha/nadi summary prose is hard-coded per
|
|
604
|
+
* locale in the Go template (conventional Ashtakoota wording, no rule corpus);
|
|
605
|
+
* it is ported here verbatim, including the Computed=false honesty guard so a
|
|
606
|
+
* Mangal Dosha check that never ran is never rendered as "no dosha".
|
|
607
|
+
*/
|
|
608
|
+
|
|
609
|
+
/**
|
|
610
|
+
* Per-person header info (name, birth, moon nakshatra). Keys are snake_case as
|
|
611
|
+
* tagged in the Go `MatchMakingSubject` struct. `nakshatra`/`sign` arrive
|
|
612
|
+
* pre-resolved to the request locale.
|
|
613
|
+
*/
|
|
614
|
+
interface MatchMakingSubject {
|
|
615
|
+
name?: string;
|
|
616
|
+
birth_date?: string;
|
|
617
|
+
birth_time?: string;
|
|
618
|
+
birth_place?: string;
|
|
619
|
+
nakshatra?: string;
|
|
620
|
+
sign?: string;
|
|
621
|
+
gana?: string;
|
|
622
|
+
nadi?: string;
|
|
623
|
+
}
|
|
624
|
+
/**
|
|
625
|
+
* One of the 8 kootas with score + max + reason. `name` and `score` are tagged
|
|
626
|
+
* (lowercase) in Go; `Max` and `Reason` have no tag → PascalCase. `Reason` is
|
|
627
|
+
* the human-readable explanation, pre-resolved to the requested locale.
|
|
628
|
+
*/
|
|
629
|
+
interface MatchMakingKoota {
|
|
630
|
+
name?: string;
|
|
631
|
+
score?: number;
|
|
632
|
+
Max?: number;
|
|
633
|
+
Reason?: string;
|
|
634
|
+
}
|
|
635
|
+
/** The full 8-koota table + total. All fields untagged → PascalCase. */
|
|
636
|
+
interface MatchMakingAshtakoota {
|
|
637
|
+
Total?: number;
|
|
638
|
+
/** Maximum possible total (36). */
|
|
639
|
+
Max?: number;
|
|
640
|
+
/** Ordered: varna, vashya, tara, yoni, graha_maitri, gana, bhakoot, nadi. */
|
|
641
|
+
Kootas?: MatchMakingKoota[];
|
|
642
|
+
/** "poor" | "fair" | "good" | "excellent". */
|
|
643
|
+
Verdict?: string;
|
|
644
|
+
}
|
|
645
|
+
/**
|
|
646
|
+
* One Mangal Dosha result for a single person. All fields untagged →
|
|
647
|
+
* PascalCase. When `Computed` is false the check never ran (no birth
|
|
648
|
+
* lat/lon) — every other field is a zero value and MUST NOT be read as a
|
|
649
|
+
* "no dosha" verdict.
|
|
650
|
+
*/
|
|
651
|
+
interface MatchMakingDosha {
|
|
652
|
+
Computed?: boolean;
|
|
653
|
+
NotComputedReason?: string;
|
|
654
|
+
HasDosha?: boolean;
|
|
655
|
+
/** "purn" | "mild" | "none". */
|
|
656
|
+
Type?: string;
|
|
657
|
+
HousesOccupied?: number[];
|
|
658
|
+
Cancelled?: boolean;
|
|
659
|
+
CancelReasons?: string[];
|
|
660
|
+
}
|
|
661
|
+
/** The Nadi Dosha verdict between the pair. All fields untagged → PascalCase. */
|
|
662
|
+
interface MatchMakingNadiDosha {
|
|
663
|
+
HasDosha?: boolean;
|
|
664
|
+
BoyNadi?: string;
|
|
665
|
+
GirlNadi?: string;
|
|
666
|
+
/** "none" | "high" | "exempted". */
|
|
667
|
+
Severity?: string;
|
|
668
|
+
Exceptions?: string[];
|
|
669
|
+
}
|
|
670
|
+
/** Branding embedded in the report JSON (PascalCase). */
|
|
671
|
+
interface MatchMakingBranding {
|
|
672
|
+
CompanyName?: string;
|
|
673
|
+
LogoURL?: string;
|
|
674
|
+
PrimaryColor?: string;
|
|
675
|
+
SecondaryColor?: string;
|
|
676
|
+
FooterText?: string;
|
|
677
|
+
WatermarkText?: string;
|
|
678
|
+
}
|
|
679
|
+
/** Full Match Making payload (exactly as returned by the API). */
|
|
680
|
+
interface MatchMakingData {
|
|
681
|
+
Locale?: string;
|
|
682
|
+
Branding?: MatchMakingBranding;
|
|
683
|
+
Boy?: MatchMakingSubject;
|
|
684
|
+
Girl?: MatchMakingSubject;
|
|
685
|
+
Ashtakoota?: MatchMakingAshtakoota;
|
|
686
|
+
MangalDoshaBoy?: MatchMakingDosha;
|
|
687
|
+
MangalDoshaGirl?: MatchMakingDosha;
|
|
688
|
+
NadiDosha?: MatchMakingNadiDosha;
|
|
689
|
+
GeneratedAt?: string;
|
|
690
|
+
/** Short summary string; falls back to a derived line from the total. */
|
|
691
|
+
FinalVerdict?: string;
|
|
692
|
+
}
|
|
693
|
+
/**
|
|
694
|
+
* Render the Match Making (Kundli Milan) report as a complete HTML document.
|
|
695
|
+
*
|
|
696
|
+
* @param data report JSON from `client.reports.matchMaking(...)`
|
|
697
|
+
* @param branding optional caller branding overrides (win per-field over the
|
|
698
|
+
* branding embedded in `data`)
|
|
699
|
+
*/
|
|
700
|
+
declare function renderMatchMakingHtml(data: MatchMakingData, branding?: Branding): string;
|
|
701
|
+
|
|
702
|
+
/**
|
|
703
|
+
* Dasha Analysis report → HTML.
|
|
704
|
+
*
|
|
705
|
+
* Ported from the server-side Go template `internal/pdf/dasha_analysis.go`
|
|
706
|
+
* (the 20-page Vimshottari deep-dive). Section render order mirrors the Go
|
|
707
|
+
* template exactly:
|
|
708
|
+
* 1. Cover
|
|
709
|
+
* 2. Currently Active Dasha Stack (5-level MD/AD/PD/SD/Prana)
|
|
710
|
+
* 3. Predictions for the active sub-periods (MD + AD prose) — suppressed
|
|
711
|
+
* entirely when there is no active path
|
|
712
|
+
* 4. All 9 Mahadashas (120-year cycle)
|
|
713
|
+
* 5. Past 20-Year Review
|
|
714
|
+
* 6. Next 10-Year Preview
|
|
715
|
+
* 7. Yogini Dasha (optional secondary system; suppressed when empty)
|
|
716
|
+
*
|
|
717
|
+
* Consumes the JSON exactly as returned by `client.reports.dashaAnalysis`.
|
|
718
|
+
*/
|
|
719
|
+
|
|
720
|
+
/**
|
|
721
|
+
* One dasha period at any depth (Mahadasha, Antardasha, or Yogini period).
|
|
722
|
+
* Mirrors the Go `DashaPeriodView` struct — all keys PascalCase (no json tags).
|
|
723
|
+
*/
|
|
724
|
+
interface DashaPeriodView {
|
|
725
|
+
/** Canonical English lord name, e.g. "Saturn". */
|
|
726
|
+
Lord?: string;
|
|
727
|
+
/** Devanagari lord name, e.g. "शनि" (used for hi/mr). */
|
|
728
|
+
LordHI?: string;
|
|
729
|
+
/** Lord in the request locale (any non-en locale; omitted for en). Preferred when present. */
|
|
730
|
+
LordLocal?: string;
|
|
731
|
+
/** Pre-formatted start date "YYYY-MM-DD". */
|
|
732
|
+
StartDate?: string;
|
|
733
|
+
/** Pre-formatted end date "YYYY-MM-DD". */
|
|
734
|
+
EndDate?: string;
|
|
735
|
+
/** Rounded year count; 0 for sub-year periods. */
|
|
736
|
+
DurationY?: number;
|
|
737
|
+
/** Exact day count for sub-year reporting. */
|
|
738
|
+
DurationD?: number;
|
|
739
|
+
/** Optional locale-resolved one-line note. */
|
|
740
|
+
Body?: string;
|
|
741
|
+
}
|
|
742
|
+
/**
|
|
743
|
+
* The active 5-level Vimshottari stack at the report's "now".
|
|
744
|
+
* Mirrors the Go `DashaActivePath` struct.
|
|
745
|
+
*/
|
|
746
|
+
interface DashaActivePath {
|
|
747
|
+
Maha?: DashaPeriodView;
|
|
748
|
+
Antar?: DashaPeriodView;
|
|
749
|
+
Pratyantar?: DashaPeriodView;
|
|
750
|
+
Sookshma?: DashaPeriodView;
|
|
751
|
+
Prana?: DashaPeriodView;
|
|
752
|
+
/** Longer-form prose summary for the Mahadasha level. */
|
|
753
|
+
MahaBody?: string;
|
|
754
|
+
/** Longer-form prose summary for the Antardasha level. */
|
|
755
|
+
AntarBody?: string;
|
|
756
|
+
}
|
|
757
|
+
/** Subject block (shared `KundliSubject` shape, PascalCase). */
|
|
758
|
+
interface DashaAnalysisSubject {
|
|
759
|
+
Name?: string;
|
|
760
|
+
BirthDate?: string;
|
|
761
|
+
BirthTime?: string;
|
|
762
|
+
BirthPlace?: string;
|
|
763
|
+
Lat?: number;
|
|
764
|
+
Lon?: number;
|
|
765
|
+
}
|
|
766
|
+
/** The Dasha Analysis report JSON (`data` from the API), PascalCase keys. */
|
|
767
|
+
interface DashaAnalysisData {
|
|
768
|
+
Locale?: string;
|
|
769
|
+
Branding?: RawBranding;
|
|
770
|
+
Subject?: DashaAnalysisSubject;
|
|
771
|
+
/** Currently-running 5-level Vimshottari stack. May be absent/null. */
|
|
772
|
+
ActivePath?: DashaActivePath | null;
|
|
773
|
+
/** All 9 Vimshottari Mahadashas, chronological. */
|
|
774
|
+
AllMahadashas?: DashaPeriodView[];
|
|
775
|
+
/** Mahadashas overlapping the last 20 years. */
|
|
776
|
+
PastReview?: DashaPeriodView[];
|
|
777
|
+
/** Antardashas overlapping the next 10 years. */
|
|
778
|
+
FuturePreview?: DashaPeriodView[];
|
|
779
|
+
/** Optional Yogini-system periods. */
|
|
780
|
+
YoginiDashas?: DashaPeriodView[];
|
|
781
|
+
/** ISO timestamp; pre-formatted on the server. */
|
|
782
|
+
GeneratedAt?: string;
|
|
783
|
+
}
|
|
784
|
+
declare function renderDashaAnalysisHtml(data: DashaAnalysisData, branding?: Branding): string;
|
|
785
|
+
|
|
786
|
+
/**
|
|
787
|
+
* Numerology Report → HTML.
|
|
788
|
+
*
|
|
789
|
+
* Ported from the server-side Go template `internal/pdf/numerology.go` so the
|
|
790
|
+
* SDK-rendered PDF matches the API's design. Consumes the JSON returned by
|
|
791
|
+
* `client.reports.numerology(...)`.
|
|
792
|
+
*
|
|
793
|
+
* The captured response (`/v1/reports/numerology`) returns the compute subset
|
|
794
|
+
* with snake_case keys: `dob`, `driver`, `conductor`, `driver_factors`,
|
|
795
|
+
* `conductor_factors`, `compatible_drivers`. The full PDF struct additionally
|
|
796
|
+
* carries soul/personality/destiny (+ their factors), subject name, branding,
|
|
797
|
+
* locale and generated timestamp — modelled here optionally so a richer
|
|
798
|
+
* payload renders the same way the Go template does.
|
|
799
|
+
*
|
|
800
|
+
* JSON key casing rule applied per field:
|
|
801
|
+
* - factor sub-fields have explicit json tags → snake/lowercase (number,
|
|
802
|
+
* planet, day, color, gemstone, deity, direction)
|
|
803
|
+
* - top-level compute keys are tagged → dob, driver, conductor,
|
|
804
|
+
* driver_factors, conductor_factors, compatible_drivers
|
|
805
|
+
* - PDF-only fields (Subject, Branding, Locale, GeneratedAt) have NO json
|
|
806
|
+
* tag in Go → PascalCase
|
|
807
|
+
*/
|
|
808
|
+
|
|
809
|
+
/** Lucky-factor block for a single number (factor sub-fields are json-tagged). */
|
|
810
|
+
interface NumerologyFactors {
|
|
811
|
+
number?: number;
|
|
812
|
+
planet?: string;
|
|
813
|
+
day?: string;
|
|
814
|
+
color?: string;
|
|
815
|
+
gemstone?: string;
|
|
816
|
+
deity?: string;
|
|
817
|
+
direction?: string;
|
|
818
|
+
}
|
|
819
|
+
/** Cover-page subject header (Go `NumerologySubject`, no json tags → PascalCase). */
|
|
820
|
+
interface NumerologySubject {
|
|
821
|
+
Name?: string;
|
|
822
|
+
DOB?: string;
|
|
823
|
+
}
|
|
824
|
+
/** Numerology report payload (exact JSON keys; optional generous). */
|
|
825
|
+
interface NumerologyData {
|
|
826
|
+
dob?: string;
|
|
827
|
+
driver?: number;
|
|
828
|
+
conductor?: number;
|
|
829
|
+
soul?: number;
|
|
830
|
+
personality?: number;
|
|
831
|
+
destiny?: number;
|
|
832
|
+
driver_factors?: NumerologyFactors;
|
|
833
|
+
conductor_factors?: NumerologyFactors;
|
|
834
|
+
soul_factors?: NumerologyFactors;
|
|
835
|
+
personality_factors?: NumerologyFactors;
|
|
836
|
+
destiny_factors?: NumerologyFactors;
|
|
837
|
+
compatible_drivers?: number[];
|
|
838
|
+
Locale?: string;
|
|
839
|
+
Branding?: RawBranding;
|
|
840
|
+
Subject?: NumerologySubject;
|
|
841
|
+
GeneratedAt?: string;
|
|
842
|
+
}
|
|
843
|
+
declare function renderNumerologyHtml(data: NumerologyData, branding?: Branding): string;
|
|
844
|
+
|
|
845
|
+
/**
|
|
846
|
+
* Sade Sati report → HTML.
|
|
847
|
+
*
|
|
848
|
+
* Ported from the server-side Go template `internal/pdf/sadesati.go`. Renders a
|
|
849
|
+
* single-subject report focused on Saturn's ~7.5-year transit through the
|
|
850
|
+
* moon-1 / moon / moon+1 sign cluster of the native's chart.
|
|
851
|
+
*
|
|
852
|
+
* Layout (mirrors the Go template):
|
|
853
|
+
* 1. Cover with subject + moon-sign badge + current status.
|
|
854
|
+
* 2. Current phase explanation block (color-coded by status).
|
|
855
|
+
* 3. Past windows table (chronological).
|
|
856
|
+
* 4. Current window highlight (when active).
|
|
857
|
+
* 5. Future windows table (chronological).
|
|
858
|
+
* 6. Remedies summary block.
|
|
859
|
+
*
|
|
860
|
+
* The Go i18n helpers (`label`, `statusLabel`, `durationLabel`,
|
|
861
|
+
* `statusDescription`, `remediesList`) and the `moon_sign`/`saturn_sign`
|
|
862
|
+
* fields are already locale-resolved by the API handler, so the strings are
|
|
863
|
+
* rendered verbatim — we only re-implement the locale-keyed label/prose tables.
|
|
864
|
+
*/
|
|
865
|
+
|
|
866
|
+
/**
|
|
867
|
+
* Cover-page header info. `MoonSign` is pre-resolved to the request locale by
|
|
868
|
+
* the handler. JSON keys are lowercase (the Go struct carries `json:` tags).
|
|
869
|
+
*/
|
|
870
|
+
interface SadeSatiSubject {
|
|
871
|
+
name?: string;
|
|
872
|
+
birth_date?: string;
|
|
873
|
+
birth_time?: string;
|
|
874
|
+
birth_place?: string;
|
|
875
|
+
moon_sign?: string;
|
|
876
|
+
}
|
|
877
|
+
/**
|
|
878
|
+
* The current at-the-moment reading. `status` is one of
|
|
879
|
+
* `"rising" | "peak" | "setting" | "clear"`. `saturn_sign` / `moon_sign` are
|
|
880
|
+
* pre-resolved to the request locale. JSON keys are lowercase (`json:` tags).
|
|
881
|
+
*/
|
|
882
|
+
interface SadeSatiStatus {
|
|
883
|
+
status?: string;
|
|
884
|
+
saturn_sign?: string;
|
|
885
|
+
moon_sign?: string;
|
|
886
|
+
}
|
|
887
|
+
/**
|
|
888
|
+
* One continuous Sade Sati period (Saturn passing through one or more affected
|
|
889
|
+
* signs). The `SadeSatiWindow` Go struct has NO `json:` tags, so every key is
|
|
890
|
+
* PascalCase. Date strings are pre-formatted by the handler.
|
|
891
|
+
*/
|
|
892
|
+
interface SadeSatiWindow {
|
|
893
|
+
StartDate?: string;
|
|
894
|
+
EndDate?: string;
|
|
895
|
+
StartPhase?: string;
|
|
896
|
+
EndPhase?: string;
|
|
897
|
+
/** Localized sign labels Saturn passed through (typically the 3-sign cluster). */
|
|
898
|
+
SignsTraversed?: string[];
|
|
899
|
+
/** "approx 7.5" for full windows, less for retrograde-truncated edges. */
|
|
900
|
+
DurationYears?: number;
|
|
901
|
+
}
|
|
902
|
+
/**
|
|
903
|
+
* Full Sade Sati report payload. Top-level `SadeSatiReportData` Go struct has
|
|
904
|
+
* NO `json:` tags, so its fields are PascalCase. `Past` may be `null`, and
|
|
905
|
+
* `Current` is `null` when no window brackets the report moment.
|
|
906
|
+
*/
|
|
907
|
+
interface SadeSatiData {
|
|
908
|
+
Locale?: string;
|
|
909
|
+
Branding?: RawBranding;
|
|
910
|
+
Subject?: SadeSatiSubject;
|
|
911
|
+
CurrentStatus?: SadeSatiStatus;
|
|
912
|
+
Past?: SadeSatiWindow[] | null;
|
|
913
|
+
Current?: SadeSatiWindow | null;
|
|
914
|
+
Future?: SadeSatiWindow[] | null;
|
|
915
|
+
GeneratedAt?: string;
|
|
916
|
+
}
|
|
917
|
+
declare function renderSadeSatiHtml(data: SadeSatiData, branding?: Branding): string;
|
|
918
|
+
|
|
919
|
+
/**
|
|
920
|
+
* Varshaphal (annual / solar-return) report → HTML.
|
|
921
|
+
*
|
|
922
|
+
* Ported from the server-side Go template `internal/pdf/varshaphal.go` so the
|
|
923
|
+
* SDK-rendered PDF is visually faithful to the API's own report. Consumes the
|
|
924
|
+
* JSON returned by `client.reports.varshaphal(...)` verbatim (PascalCase
|
|
925
|
+
* top-level keys; snake_case inside placement/muntha/varsha-lord — see
|
|
926
|
+
* interfaces below) and returns a self-contained HTML document ready for
|
|
927
|
+
* `htmlToPdf`.
|
|
928
|
+
*
|
|
929
|
+
* The Go template's i18n helpers (signLabel/nakLabel/planetLabel/
|
|
930
|
+
* munthaSignLabel/varshaLordLabel) just echo the already-locale-resolved field
|
|
931
|
+
* straight back, so here we read the field directly — no client-side
|
|
932
|
+
* translation is performed.
|
|
933
|
+
*
|
|
934
|
+
* The one exception is the Year Outlook prose: the Go template derives it
|
|
935
|
+
* client-side (`varshaOutlook`) from the muntha house + target year rather than
|
|
936
|
+
* from a JSON field, so the same band-based logic is ported below.
|
|
937
|
+
*/
|
|
938
|
+
|
|
939
|
+
/** A sign + degree pair (snake_case keys, as in the API JSON). */
|
|
940
|
+
interface VarshaphalPlacement {
|
|
941
|
+
sign?: string;
|
|
942
|
+
dms_within?: string;
|
|
943
|
+
nakshatra?: string;
|
|
944
|
+
pada?: number;
|
|
945
|
+
nak_lord?: string;
|
|
946
|
+
}
|
|
947
|
+
/** One planet row in the solar-return positions table. */
|
|
948
|
+
interface VarshaphalPlanet {
|
|
949
|
+
name?: string;
|
|
950
|
+
placement?: VarshaphalPlacement;
|
|
951
|
+
house_num?: number;
|
|
952
|
+
retro?: boolean;
|
|
953
|
+
}
|
|
954
|
+
/** The birth subject metadata printed on the cover (PascalCase, no json tags). */
|
|
955
|
+
interface VarshaphalSubject {
|
|
956
|
+
Name?: string;
|
|
957
|
+
BirthDate?: string;
|
|
958
|
+
BirthTime?: string;
|
|
959
|
+
BirthPlace?: string;
|
|
960
|
+
}
|
|
961
|
+
/** Muntha — the progressed ascendant for the year (json-tagged → snake/lower). */
|
|
962
|
+
interface VarshaphalMuntha {
|
|
963
|
+
sign?: string;
|
|
964
|
+
house?: number;
|
|
965
|
+
}
|
|
966
|
+
/** Varsha lord — the planet ruling the year's first hora (json-tagged). */
|
|
967
|
+
interface VarshaphalLord {
|
|
968
|
+
name?: string;
|
|
969
|
+
hora?: number;
|
|
970
|
+
}
|
|
971
|
+
/** Branding embedded in the report JSON (PascalCase). */
|
|
972
|
+
interface VarshaphalBranding {
|
|
973
|
+
CompanyName?: string;
|
|
974
|
+
LogoURL?: string;
|
|
975
|
+
PrimaryColor?: string;
|
|
976
|
+
SecondaryColor?: string;
|
|
977
|
+
FooterText?: string;
|
|
978
|
+
WatermarkText?: string;
|
|
979
|
+
}
|
|
980
|
+
/** Full Varshaphal payload (exactly as returned by the API). */
|
|
981
|
+
interface VarshaphalData {
|
|
982
|
+
Locale?: string;
|
|
983
|
+
Branding?: VarshaphalBranding;
|
|
984
|
+
Subject?: VarshaphalSubject;
|
|
985
|
+
TargetYear?: number;
|
|
986
|
+
/** Solar-return moment, ISO-8601, handler-formatted (e.g. "2026-06-14T21:53:59Z"). */
|
|
987
|
+
SolarReturnISO?: string;
|
|
988
|
+
Ascendant?: VarshaphalPlacement;
|
|
989
|
+
Planets?: VarshaphalPlanet[];
|
|
990
|
+
Muntha?: VarshaphalMuntha;
|
|
991
|
+
VarshaLord?: VarshaphalLord;
|
|
992
|
+
GeneratedAt?: string;
|
|
993
|
+
}
|
|
994
|
+
/**
|
|
995
|
+
* Render the Varshaphal (annual / solar-return) report as a complete HTML
|
|
996
|
+
* document.
|
|
997
|
+
*
|
|
998
|
+
* @param data report JSON from `client.reports.varshaphal(...)`
|
|
999
|
+
* @param branding optional caller branding overrides (win per-field over the
|
|
1000
|
+
* branding embedded in `data`)
|
|
1001
|
+
*/
|
|
1002
|
+
declare function renderVarshaphalHtml(data: VarshaphalData, branding?: Branding): string;
|
|
1003
|
+
|
|
1004
|
+
/**
|
|
1005
|
+
* Horoscope report (daily / weekly / monthly) → branded HTML.
|
|
1006
|
+
*
|
|
1007
|
+
* Ported to consume the exact shape `client.reports.horoscope{Daily,Weekly,Monthly}()`
|
|
1008
|
+
* returns — the raw `horoscope.Entry` (snake_case), same wire shape as
|
|
1009
|
+
* `/v1/horoscope/*`. Note: the Entry carries NO branding, so branding here
|
|
1010
|
+
* comes entirely from the caller-supplied `branding` argument.
|
|
1011
|
+
*/
|
|
1012
|
+
|
|
1013
|
+
interface HoroscopeSlowMover {
|
|
1014
|
+
planet?: string;
|
|
1015
|
+
current_sign?: string;
|
|
1016
|
+
heading?: string;
|
|
1017
|
+
body?: string;
|
|
1018
|
+
citations?: string[];
|
|
1019
|
+
}
|
|
1020
|
+
interface HoroscopePanchang {
|
|
1021
|
+
tithi?: string;
|
|
1022
|
+
paksha?: string;
|
|
1023
|
+
nakshatra?: string;
|
|
1024
|
+
yoga?: string;
|
|
1025
|
+
karana?: string;
|
|
1026
|
+
vaar?: string;
|
|
1027
|
+
rahu_kaal?: string;
|
|
1028
|
+
auspicious_window?: string;
|
|
1029
|
+
sunrise?: string;
|
|
1030
|
+
sunset?: string;
|
|
1031
|
+
}
|
|
1032
|
+
interface HoroscopeLucky {
|
|
1033
|
+
color?: string;
|
|
1034
|
+
number?: number;
|
|
1035
|
+
direction?: string;
|
|
1036
|
+
time?: string;
|
|
1037
|
+
}
|
|
1038
|
+
/** Matches the `horoscope.Entry` JSON returned by the reports/horoscope endpoints. */
|
|
1039
|
+
interface HoroscopeData {
|
|
1040
|
+
rashi?: string;
|
|
1041
|
+
rashi_label?: string;
|
|
1042
|
+
period?: "daily" | "weekly" | "monthly" | string;
|
|
1043
|
+
period_key?: string;
|
|
1044
|
+
language?: string;
|
|
1045
|
+
headline?: string;
|
|
1046
|
+
slow_movers?: HoroscopeSlowMover[];
|
|
1047
|
+
panchang?: HoroscopePanchang | null;
|
|
1048
|
+
lucky?: HoroscopeLucky | null;
|
|
1049
|
+
meta?: {
|
|
1050
|
+
generated_at?: string;
|
|
1051
|
+
source?: string;
|
|
1052
|
+
};
|
|
1053
|
+
}
|
|
1054
|
+
/** Render a horoscope report (daily/weekly/monthly) to a branded HTML document. */
|
|
1055
|
+
declare function renderHoroscopeHtml(data: HoroscopeData, branding?: Branding): string;
|
|
1056
|
+
|
|
1057
|
+
/**
|
|
1058
|
+
* Mangal Dosha (Manglik) report → HTML.
|
|
1059
|
+
*
|
|
1060
|
+
* Ported from the server-side Go template `internal/pdf/mangal_dosha.go`. A
|
|
1061
|
+
* single-subject diagnostic focused on Mars' placement from the lagna and what
|
|
1062
|
+
* it means for marriage / partnerships. The prose, remedies, and i18n labels are
|
|
1063
|
+
* hard-coded in the Go template (conventional, uniform across consultations), so
|
|
1064
|
+
* they are re-implemented here verbatim — only `Status` / `HasDosha` /
|
|
1065
|
+
* `Cancelled` / `HousesOccupied` / `MarsPlacement` / `Subject` come from the JSON.
|
|
1066
|
+
*
|
|
1067
|
+
* Layout (mirrors the Go template):
|
|
1068
|
+
* 1. Cover with subject + status badge.
|
|
1069
|
+
* 2. Diagnostic block (Mars sign / nakshatra / houses / diagnosis).
|
|
1070
|
+
* 3. Cancellation block (only when classical cancellations apply).
|
|
1071
|
+
* 4. Marriage implications prose.
|
|
1072
|
+
* 5. Recommended remedies (heavier for "purn", lighter for "mild").
|
|
1073
|
+
*/
|
|
1074
|
+
|
|
1075
|
+
/**
|
|
1076
|
+
* Cover-page header info. `ascendant_sign` is pre-resolved to the request locale
|
|
1077
|
+
* by the handler. JSON keys are lowercase (the Go struct carries `json:` tags).
|
|
1078
|
+
*/
|
|
1079
|
+
interface MangalDoshaSubject {
|
|
1080
|
+
name?: string;
|
|
1081
|
+
birth_date?: string;
|
|
1082
|
+
birth_time?: string;
|
|
1083
|
+
birth_place?: string;
|
|
1084
|
+
ascendant_sign?: string;
|
|
1085
|
+
}
|
|
1086
|
+
/**
|
|
1087
|
+
* Mars' placement (the shared `KundliPlacement` shape — snake_case `json:` tags).
|
|
1088
|
+
* `sign` / `nakshatra` are pre-resolved to the request locale by the handler.
|
|
1089
|
+
*/
|
|
1090
|
+
interface MangalDoshaPlacement {
|
|
1091
|
+
sign?: string;
|
|
1092
|
+
dms_within?: string;
|
|
1093
|
+
nakshatra?: string;
|
|
1094
|
+
pada?: number;
|
|
1095
|
+
nak_lord?: string;
|
|
1096
|
+
}
|
|
1097
|
+
/**
|
|
1098
|
+
* Full Mangal Dosha report payload. The top-level `MangalDoshaReportData` Go
|
|
1099
|
+
* struct has NO `json:` tags, so its fields are PascalCase. `Status` is one of
|
|
1100
|
+
* `"purn"` (full) | `"mild"` (partial) | `"none"`.
|
|
1101
|
+
*/
|
|
1102
|
+
interface MangalDoshaData {
|
|
1103
|
+
Locale?: string;
|
|
1104
|
+
Branding?: RawBranding;
|
|
1105
|
+
Subject?: MangalDoshaSubject;
|
|
1106
|
+
Status?: string;
|
|
1107
|
+
HasDosha?: boolean;
|
|
1108
|
+
HousesOccupied?: number[];
|
|
1109
|
+
Cancelled?: boolean;
|
|
1110
|
+
CancelReasons?: string[];
|
|
1111
|
+
MarsPlacement?: MangalDoshaPlacement;
|
|
1112
|
+
GeneratedAt?: string;
|
|
1113
|
+
}
|
|
1114
|
+
/**
|
|
1115
|
+
* Render the Mangal Dosha report as a complete, self-contained HTML document
|
|
1116
|
+
* ready to convert to PDF.
|
|
1117
|
+
*/
|
|
1118
|
+
declare function renderMangalDoshaHtml(data: MangalDoshaData, branding?: Branding): string;
|
|
1119
|
+
|
|
1120
|
+
/**
|
|
1121
|
+
* Optional HTML → PDF rendering via Puppeteer (headless Chromium).
|
|
1122
|
+
*
|
|
1123
|
+
* Puppeteer is an OPTIONAL peer dependency — the core `lifeastroapi` package
|
|
1124
|
+
* and all `render*Html` functions work with zero dependencies. Install
|
|
1125
|
+
* `puppeteer` (or pass your own via `{ puppeteer }` / a live `{ browser }`)
|
|
1126
|
+
* only if you want this module to produce PDF bytes for you.
|
|
1127
|
+
*
|
|
1128
|
+
* Chromium is the right engine here: it ships Noto fonts so Devanagari /
|
|
1129
|
+
* Tamil / Telugu / Bengali / Gujarati / Kannada render correctly, and it
|
|
1130
|
+
* handles the templates' CSS (gradients, tables, watermark, @page) faithfully.
|
|
1131
|
+
*/
|
|
1132
|
+
/** Minimal structural type for a Puppeteer page. */
|
|
1133
|
+
interface PageLike {
|
|
1134
|
+
setContent(html: string, opts?: any): Promise<void>;
|
|
1135
|
+
pdf(opts?: any): Promise<Uint8Array | Buffer>;
|
|
1136
|
+
evaluate(fn: any, ...args: any[]): Promise<any>;
|
|
1137
|
+
close(): Promise<void>;
|
|
1138
|
+
}
|
|
1139
|
+
/** Minimal structural type for a Puppeteer browser. */
|
|
1140
|
+
interface PuppeteerBrowserLike {
|
|
1141
|
+
newPage(): Promise<PageLike>;
|
|
1142
|
+
close(): Promise<void>;
|
|
1143
|
+
}
|
|
1144
|
+
/** Minimal structural type for the puppeteer module. */
|
|
1145
|
+
interface PuppeteerModuleLike {
|
|
1146
|
+
launch(opts?: any): Promise<PuppeteerBrowserLike>;
|
|
1147
|
+
}
|
|
1148
|
+
interface HtmlToPdfOptions {
|
|
1149
|
+
/** Paper size. Default "A4". */
|
|
1150
|
+
format?: "A4" | "A3" | "A5" | "Letter" | "Legal" | "Tabloid";
|
|
1151
|
+
/** Landscape orientation. Default false. */
|
|
1152
|
+
landscape?: boolean;
|
|
1153
|
+
/** Print CSS background colors/images. Default true (templates are branded). */
|
|
1154
|
+
printBackground?: boolean;
|
|
1155
|
+
/** Honour the template's own @page CSS size. Default true. */
|
|
1156
|
+
preferCSSPageSize?: boolean;
|
|
1157
|
+
/** Page margins, e.g. `{ top: "10mm" }`. */
|
|
1158
|
+
margin?: {
|
|
1159
|
+
top?: string;
|
|
1160
|
+
bottom?: string;
|
|
1161
|
+
left?: string;
|
|
1162
|
+
right?: string;
|
|
1163
|
+
};
|
|
1164
|
+
/**
|
|
1165
|
+
* Render a running header/footer in the page margin (outside the content
|
|
1166
|
+
* box, so it can never overlap body content). When true, supply
|
|
1167
|
+
* `headerTemplate` / `footerTemplate` and a `margin` large enough to hold
|
|
1168
|
+
* them. Chromium replaces `<span class="pageNumber|totalPages|title|date|url">`
|
|
1169
|
+
* inside the templates. NOTE: Chromium ignores external CSS in these
|
|
1170
|
+
* templates — use inline styles only.
|
|
1171
|
+
*/
|
|
1172
|
+
displayHeaderFooter?: boolean;
|
|
1173
|
+
/** HTML for the running header (inline styles only). */
|
|
1174
|
+
headerTemplate?: string;
|
|
1175
|
+
/** HTML for the running footer (inline styles only). */
|
|
1176
|
+
footerTemplate?: string;
|
|
1177
|
+
/** Render scale (0.1–2). */
|
|
1178
|
+
scale?: number;
|
|
1179
|
+
/** Max time to wait for the page to settle, ms. Default 30000. */
|
|
1180
|
+
timeoutMs?: number;
|
|
1181
|
+
/**
|
|
1182
|
+
* Reuse an already-launched browser (recommended for servers — launching
|
|
1183
|
+
* Chromium per call is slow). When provided, it is NOT closed for you.
|
|
1184
|
+
*/
|
|
1185
|
+
browser?: PuppeteerBrowserLike;
|
|
1186
|
+
/** Inject the puppeteer module (e.g. `puppeteer-core` + `@sparticuz/chromium` on serverless). */
|
|
1187
|
+
puppeteer?: PuppeteerModuleLike;
|
|
1188
|
+
/** Options forwarded to `puppeteer.launch()` when this module launches the browser. */
|
|
1189
|
+
launchOptions?: Record<string, unknown>;
|
|
1190
|
+
}
|
|
1191
|
+
declare function htmlToPdf(html: string, opts?: HtmlToPdfOptions): Promise<Uint8Array>;
|
|
1192
|
+
|
|
1193
|
+
/**
|
|
1194
|
+
* Zero-dependency PDF outline (bookmark) injector.
|
|
1195
|
+
*
|
|
1196
|
+
* Chromium's `page.pdf()` / `--print-to-pdf` does NOT emit a document outline
|
|
1197
|
+
* from HTML headings, so the navigable "bookmark sidebar" that professional
|
|
1198
|
+
* reports (a long kundli can carry hundreds of bookmarks) rely on is missing.
|
|
1199
|
+
*
|
|
1200
|
+
* This module appends an `/Outlines` tree to an already-rendered PDF via an
|
|
1201
|
+
* **incremental update** (ISO 32000-1 §7.5.6): we never rewrite the original
|
|
1202
|
+
* bytes — we add new objects, a new cross-reference section, and a new trailer
|
|
1203
|
+
* at the end of the file, then point the document Catalog at the new outline.
|
|
1204
|
+
* That keeps it dependency-free (no pdf-lib / pdfjs) and robust: the original
|
|
1205
|
+
* content, fonts and pages are untouched.
|
|
1206
|
+
*
|
|
1207
|
+
* Limitations (acceptable for our reports):
|
|
1208
|
+
* - Assumes the input is a standard cross-reference *table* PDF (what Chromium
|
|
1209
|
+
* emits), not a cross-reference *stream*. We parse the existing Catalog and
|
|
1210
|
+
* its `/Pages` to map page numbers → page object refs.
|
|
1211
|
+
* - Destinations use `[pageRef /Fit]` (whole-page fit) — the right behaviour
|
|
1212
|
+
* for section bookmarks.
|
|
1213
|
+
*/
|
|
1214
|
+
/** One bookmark. `level` is 1-based (1 = top); children follow their parent. */
|
|
1215
|
+
interface OutlineItem {
|
|
1216
|
+
/** Bookmark label (shown in the reader's sidebar). */
|
|
1217
|
+
title: string;
|
|
1218
|
+
/** 1-based PDF page the bookmark jumps to. */
|
|
1219
|
+
page: number;
|
|
1220
|
+
/** 1-based nesting depth (1 = top-level part, 2 = section, …). */
|
|
1221
|
+
level: number;
|
|
1222
|
+
}
|
|
1223
|
+
/**
|
|
1224
|
+
* Append a bookmark outline to a rendered PDF and return the new bytes.
|
|
1225
|
+
*
|
|
1226
|
+
* @param pdf the rendered PDF (from htmlToPdf)
|
|
1227
|
+
* @param items ordered bookmarks; `page` is 1-based, `level` is 1-based depth
|
|
1228
|
+
*/
|
|
1229
|
+
declare function addPdfOutline(pdf: Uint8Array, items: OutlineItem[]): Uint8Array;
|
|
1230
|
+
|
|
1231
|
+
/**
|
|
1232
|
+
* `lifeastroapi/pdf` — turn LifeAstroAPI report JSON into branded, print-ready
|
|
1233
|
+
* PDFs (or HTML).
|
|
1234
|
+
*
|
|
1235
|
+
* Two layers:
|
|
1236
|
+
* 1. `render*Html(data, branding?)` — pure, zero-dependency functions that
|
|
1237
|
+
* turn the JSON from `client.reports.*` into a self-contained, branded
|
|
1238
|
+
* HTML document. Run anywhere (Node, edge, browser).
|
|
1239
|
+
* 2. `htmlToPdf(html, opts?)` + the `*Pdf(...)` convenience wrappers —
|
|
1240
|
+
* produce PDF bytes via the optional `puppeteer` peer dependency.
|
|
1241
|
+
*
|
|
1242
|
+
* @example
|
|
1243
|
+
* ```ts
|
|
1244
|
+
* import { LifeAstro } from "lifeastroapi";
|
|
1245
|
+
* import { kundliDetailedPdf } from "lifeastroapi/pdf";
|
|
1246
|
+
*
|
|
1247
|
+
* const client = new LifeAstro({ apiKey: process.env.LIFEASTRO_API_KEY });
|
|
1248
|
+
* const report = await client.reports.kundliDetailed({
|
|
1249
|
+
* date: "1990-01-15", time: "10:30", tz: "Asia/Kolkata", lat: 19.07, lon: 72.87,
|
|
1250
|
+
* });
|
|
1251
|
+
* const pdf = await kundliDetailedPdf(report, {
|
|
1252
|
+
* branding: { companyName: "Acme Astro", logoUrl: "https://…/logo.png", primaryColor: "#6b21a8" },
|
|
1253
|
+
* });
|
|
1254
|
+
* ```
|
|
1255
|
+
*/
|
|
1256
|
+
|
|
1257
|
+
/** Options for the one-call `*Pdf` convenience wrappers. */
|
|
1258
|
+
type ReportPdfOptions = HtmlToPdfOptions & {
|
|
1259
|
+
/** Branding overrides (logo, colors, company name, footer, watermark). */
|
|
1260
|
+
branding?: Branding;
|
|
1261
|
+
};
|
|
1262
|
+
/** Detailed Kundli → PDF. */
|
|
1263
|
+
declare const kundliDetailedPdf: (data: Parameters<typeof renderKundliDetailedHtml>[0], opts?: ReportPdfOptions) => Promise<Uint8Array<ArrayBufferLike>>;
|
|
1264
|
+
/** Lite Kundli → PDF. */
|
|
1265
|
+
declare const kundliLitePdf: (data: Parameters<typeof renderKundliLiteHtml>[0], opts?: ReportPdfOptions) => Promise<Uint8Array<ArrayBufferLike>>;
|
|
1266
|
+
/** Brihad (comprehensive) Kundli → PDF. Uses a running header (amber page
|
|
1267
|
+
* tab + company) and footer (dotted url) rendered in the page margin so the
|
|
1268
|
+
* chrome never overlaps body content, and a generated विषय-सूची / table of
|
|
1269
|
+
* contents with accurate, color-coded page numbers (resolved via a 2-pass
|
|
1270
|
+
* render). */
|
|
1271
|
+
declare const kundliBrihadPdf: (data: Parameters<typeof renderKundliBrihadHtml>[0], opts?: ReportPdfOptions) => Promise<Uint8Array>;
|
|
1272
|
+
/** Match-making (Kundli Milan) → PDF. */
|
|
1273
|
+
declare const matchMakingPdf: (data: Parameters<typeof renderMatchMakingHtml>[0], opts?: ReportPdfOptions) => Promise<Uint8Array<ArrayBufferLike>>;
|
|
1274
|
+
/** Dasha analysis → PDF. */
|
|
1275
|
+
declare const dashaAnalysisPdf: (data: Parameters<typeof renderDashaAnalysisHtml>[0], opts?: ReportPdfOptions) => Promise<Uint8Array<ArrayBufferLike>>;
|
|
1276
|
+
/** Numerology → PDF. */
|
|
1277
|
+
declare const numerologyPdf: (data: Parameters<typeof renderNumerologyHtml>[0], opts?: ReportPdfOptions) => Promise<Uint8Array<ArrayBufferLike>>;
|
|
1278
|
+
/** Sade Sati → PDF. */
|
|
1279
|
+
declare const sadeSatiPdf: (data: Parameters<typeof renderSadeSatiHtml>[0], opts?: ReportPdfOptions) => Promise<Uint8Array<ArrayBufferLike>>;
|
|
1280
|
+
/** Varshaphal (annual) → PDF. */
|
|
1281
|
+
declare const varshaphalPdf: (data: Parameters<typeof renderVarshaphalHtml>[0], opts?: ReportPdfOptions) => Promise<Uint8Array<ArrayBufferLike>>;
|
|
1282
|
+
/** Horoscope (daily/weekly/monthly) → PDF. */
|
|
1283
|
+
declare const horoscopePdf: (data: Parameters<typeof renderHoroscopeHtml>[0], opts?: ReportPdfOptions) => Promise<Uint8Array<ArrayBufferLike>>;
|
|
1284
|
+
/** Mangal Dosha (Manglik) → PDF. */
|
|
1285
|
+
declare const mangalDoshaPdf: (data: Parameters<typeof renderMangalDoshaHtml>[0], opts?: ReportPdfOptions) => Promise<Uint8Array<ArrayBufferLike>>;
|
|
1286
|
+
|
|
1287
|
+
export { type Branding, type DashaAnalysisData, type HoroscopeData, type HtmlToPdfOptions, type KundliBrihadData, type KundliDetailedData, type KundliLiteData, type MangalDoshaData, type MatchMakingData, type NumerologyData, type OutlineItem, type PuppeteerBrowserLike, type PuppeteerModuleLike, type RawBranding, type ReportPdfOptions, type ResolvedBranding, type SadeSatiData, type VarshaphalData, addPdfOutline, cleanNarrative, dashaAnalysisPdf, esc, escBody, horoscopePdf, htmlToPdf, humanize, kundliBrihadPdf, kundliDetailedPdf, kundliLitePdf, mangalDoshaPdf, matchMakingPdf, numerologyPdf, renderDashaAnalysisHtml, renderHoroscopeHtml, renderKundliBrihadHtml, renderKundliDetailedHtml, renderKundliLiteHtml, renderMangalDoshaHtml, renderMatchMakingHtml, renderNumerologyHtml, renderSadeSatiHtml, renderVarshaphalHtml, resolveBranding, sadeSatiPdf, varshaphalPdf };
|