@roxyapi/sdk 1.2.13 → 1.2.15
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/AGENTS.md +22 -8
- package/README.md +14 -12
- package/dist/factory.cjs +268 -268
- package/dist/factory.js +268 -268
- package/dist/sdk.gen.d.ts +118 -118
- package/dist/sdk.gen.d.ts.map +1 -1
- package/dist/types.gen.d.ts +4378 -4378
- package/dist/types.gen.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/sdk.gen.ts +284 -284
- package/src/types.gen.ts +4323 -4323
- package/src/version.ts +1 -1
package/AGENTS.md
CHANGED
|
@@ -26,7 +26,7 @@ Every chart, horoscope, panchang, dasha, dosha, navamsa, KP, synastry, compatibi
|
|
|
26
26
|
const { data } = await roxy.location.searchCities({ query: { q: 'Mumbai' } });
|
|
27
27
|
const { latitude, longitude, utcOffset } = data.cities[0];
|
|
28
28
|
// Use `utcOffset` (decimal: 5.5, -5, 9, ...) as the `timezone` number on chart calls.
|
|
29
|
-
// The city's `timezone` field is the IANA string ("Asia/Kolkata")
|
|
29
|
+
// The city's `timezone` field is the IANA string ("Asia/Kolkata"), not what chart endpoints expect.
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
## Domains
|
|
@@ -38,13 +38,13 @@ Type `roxy.` to see all available namespaces. Type `roxy.{domain}.` to see every
|
|
|
38
38
|
|-----------|-----------|----------------|
|
|
39
39
|
| `roxy.astrology` | 22 | Western astrology: natal charts, horoscopes, synastry, moon phases, transits, compatibility |
|
|
40
40
|
| `roxy.vedicAstrology` | 42 | Vedic/Jyotish: birth charts, dashas, nakshatras, panchang, KP system, doshas, yogas |
|
|
41
|
-
| `roxy.tarot` | 10 | Rider-Waite-Smith deck: spreads, daily pulls, yes/no, Celtic Cross, custom layouts |
|
|
42
41
|
| `roxy.numerology` | 16 | Life path, expression, soul urge, personal year, karmic analysis, compatibility |
|
|
43
|
-
| `roxy.
|
|
44
|
-
| `roxy.
|
|
42
|
+
| `roxy.tarot` | 10 | Rider-Waite-Smith deck: spreads, daily pulls, yes/no, Celtic Cross, custom layouts |
|
|
43
|
+
| `roxy.biorhythm` | 6 | 10-cycle biorhythm readings, forecasts, critical days, compatibility, daily check-ins (wellness, dating, productivity) |
|
|
45
44
|
| `roxy.iching` | 9 | I Ching: hexagrams, trigrams, coin casting, daily readings |
|
|
46
45
|
| `roxy.crystals` | 12 | Crystal healing properties, zodiac/chakra pairings, birthstones, search |
|
|
47
|
-
| `roxy.
|
|
46
|
+
| `roxy.dreams` | 5 | Dream symbol dictionary and interpretations |
|
|
47
|
+
| `roxy.angelNumbers` | 4 | Angel number meanings, pattern analysis, daily guidance |
|
|
48
48
|
| `roxy.location` | 3 | City geocoding for birth chart coordinates |
|
|
49
49
|
| `roxy.usage` | 1 | API usage stats and subscription info |
|
|
50
50
|
<!-- END:DOMAINS -->
|
|
@@ -57,10 +57,10 @@ Type `roxy.` to see all available namespaces. Type `roxy.{domain}.` to see every
|
|
|
57
57
|
|
|
58
58
|
```typescript
|
|
59
59
|
const { data } = await roxy.location.searchCities({ query: { q: 'Delhi' } });
|
|
60
|
-
const { latitude, longitude,
|
|
60
|
+
const { latitude, longitude, timezone } = data.cities[0];
|
|
61
61
|
|
|
62
62
|
const { data: chart } = await roxy.astrology.generateNatalChart({
|
|
63
|
-
body: { date: '1990-01-15', time: '14:30:00', latitude, longitude, timezone
|
|
63
|
+
body: { date: '1990-01-15', time: '14:30:00', latitude, longitude, timezone },
|
|
64
64
|
});
|
|
65
65
|
```
|
|
66
66
|
|
|
@@ -179,7 +179,7 @@ These are the fields AI agents most often get wrong. Copy the format column exac
|
|
|
179
179
|
|
|
180
180
|
| Field | Format | Good | Bad |
|
|
181
181
|
|-------|--------|------|-----|
|
|
182
|
-
| `timezone` | Decimal hours
|
|
182
|
+
| `timezone` | Decimal hours (number) OR IANA string | `5.5`, `-5`, `0` (decimal) OR `"Asia/Kolkata"`, `"America/New_York"` (IANA, resolved to DST-correct offset for the chart date) | `"5:30"`, `"+0530"`, `"GMT-5"`, partial names |
|
|
183
183
|
| `date` | ISO date string | `"1990-01-15"` | `"Jan 15 1990"`, `new Date()`, `"15/01/1990"`, `"1990-1-15"` |
|
|
184
184
|
| `time` | 24-hour string | `"14:30:00"`, `"09:00:00"` | `"2:30 PM"`, `"14:30"` (no seconds), `"9:0:0"` (no leading zeros) |
|
|
185
185
|
| `latitude` | Decimal degrees (number) | `28.6139` (Delhi), `-33.8688` (Sydney), `40.7128` (NYC) | `"28°36'N"`, `"28 36 50"`, strings |
|
|
@@ -216,6 +216,20 @@ These are the fields AI agents most often get wrong. Copy the format column exac
|
|
|
216
216
|
|
|
217
217
|
DST matters. If the birth date falls inside a daylight-saving window, use the summer / DST offset. For Vedic endpoints this is rarely an issue (most users are in India, fixed 5.5), but Western natal charts must respect DST at the time of birth.
|
|
218
218
|
|
|
219
|
+
## Astrology domain gotchas for LLMs
|
|
220
|
+
|
|
221
|
+
LLMs hallucinate confidently in this category. These are the specific traps you will hit when writing client code:
|
|
222
|
+
|
|
223
|
+
- **Ayanamsa is server-side in Vedic.** LLMs default to tropical / Western math. Vedic endpoints apply sidereal Lahiri ayanamsa server-side. KP endpoints accept `ayanamsa` of `kp-newcomb` (default), `kp-old`, `lahiri`, or `custom`. Do not try to "correct" server output by subtracting ayanamsa in client code.
|
|
224
|
+
- **Tithi count is 30, not 2.** 15 Shukla (waxing) plus 15 Krishna (waning). Older LLM training data conflates Purnima and Amavasya as single tithis. Our panchang response carries a `paksha` field (`"Shukla"` or `"Krishna"`) plus a tithi number, so there are 30 distinct tithis in a lunar month.
|
|
225
|
+
- **Rahu and Ketu are shadow points, not planets.** They do not appear in a real ephemeris. Endpoints accept `nodeType` of `true-node` or `mean-node` to select which calculation to use.
|
|
226
|
+
- **Nakshatra count is 27.** Abhijit is sometimes treated as a 28th in some schools, but this API uses the standard 27. `roxy.vedicAstrology.listNakshatras()` returns an array of length 27.
|
|
227
|
+
- **Retrograde is per-planet, not global.** Natal chart planets and Vedic `meta` include `isRetrograde: boolean` per planet. KP planet lists use `retrograde`. Never generate "Mercury retrograde globally" UI copy, check the specific planet in the response.
|
|
228
|
+
- **Tarot reversals are a product choice.** `allowReversals: false` on a tarot draw means no reversed cards in that draw, period. It is not cosmically meaningful, it is a config flag.
|
|
229
|
+
- **Angel number lookup works for any positive integer.** Digit-root fallback covers non-canonical numbers. Do not generate validation logic that rejects anything other than `111` / `222` / `333`.
|
|
230
|
+
- **Seed-based daily endpoints are DETERMINISTIC per `(seed, date)` pair.** Same seed plus same date returns the same reading. This is by design for push-notification consistency. Do not describe it as "cached" or retry on stale responses.
|
|
231
|
+
- **Timezone affects Western calculations more than Vedic.** Western natal charts must respect DST at time of birth. Vedic endpoints default to IST (`5.5`) which is DST-free. Use `utcOffset` from the Location API response as your `timezone` value, not the user's current clock.
|
|
232
|
+
|
|
219
233
|
## MCP equivalents
|
|
220
234
|
|
|
221
235
|
Every method has a matching MCP tool. The remote MCP server per domain is at `https://roxyapi.com/mcp/{domain}` (Streamable HTTP, no stdio / no self-hosting). Tool names follow `{method}_{path_snake_case}`, for example:
|
package/README.md
CHANGED
|
@@ -28,16 +28,18 @@ const roxy = createRoxy(process.env.ROXY_API_KEY!);
|
|
|
28
28
|
const { data } = await roxy.location.searchCities({
|
|
29
29
|
query: { q: 'Mumbai, India' },
|
|
30
30
|
});
|
|
31
|
-
const { latitude, longitude,
|
|
31
|
+
const { latitude, longitude, timezone } = data.cities[0];
|
|
32
32
|
|
|
33
|
-
// Step 2: Western natal chart.
|
|
33
|
+
// Step 2: Western natal chart. `timezone` can be the IANA string from the
|
|
34
|
+
// location response — the server resolves it to the DST-correct offset for
|
|
35
|
+
// the chart's own date.
|
|
34
36
|
const { data: chart } = await roxy.astrology.generateNatalChart({
|
|
35
|
-
body: { date: '1990-01-15', time: '14:30:00', latitude, longitude, timezone
|
|
37
|
+
body: { date: '1990-01-15', time: '14:30:00', latitude, longitude, timezone },
|
|
36
38
|
});
|
|
37
39
|
|
|
38
40
|
// Vedic kundli uses the same inputs (timezone optional, defaults to 5.5 IST)
|
|
39
41
|
const { data: kundli } = await roxy.vedicAstrology.generateBirthChart({
|
|
40
|
-
body: { date: '1990-01-15', time: '14:30:00', latitude, longitude, timezone
|
|
42
|
+
body: { date: '1990-01-15', time: '14:30:00', latitude, longitude, timezone },
|
|
41
43
|
});
|
|
42
44
|
```
|
|
43
45
|
|
|
@@ -49,10 +51,10 @@ Every chart, horoscope, panchang, dasha, dosha, navamsa, KP, synastry, compatibi
|
|
|
49
51
|
|
|
50
52
|
```typescript
|
|
51
53
|
const { data } = await roxy.location.searchCities({ query: { q: 'Tokyo' } });
|
|
52
|
-
const { latitude, longitude,
|
|
53
|
-
//
|
|
54
|
-
//
|
|
55
|
-
//
|
|
54
|
+
const { latitude, longitude, timezone } = data.cities[0];
|
|
55
|
+
// `timezone` is the IANA string ("Asia/Tokyo"). Pass it straight into any
|
|
56
|
+
// chart endpoint — the server resolves it to the DST-correct offset for the
|
|
57
|
+
// chart's date. If you prefer a decimal, `data.cities[0].utcOffset` also works.
|
|
56
58
|
```
|
|
57
59
|
|
|
58
60
|
## Domains
|
|
@@ -62,13 +64,13 @@ const { latitude, longitude, utcOffset } = data.cities[0];
|
|
|
62
64
|
|-----------|-----------|----------------|
|
|
63
65
|
| `roxy.astrology` | 22 | Western astrology: natal charts, horoscopes, synastry, moon phases |
|
|
64
66
|
| `roxy.vedicAstrology` | 42 | Vedic/Jyotish: birth charts, dashas, nakshatras, panchang, KP system |
|
|
65
|
-
| `roxy.tarot` | 10 | 78-card readings: spreads, daily pulls, yes/no, Celtic Cross |
|
|
66
67
|
| `roxy.numerology` | 16 | Life path, expression, soul urge, personal year, karmic lessons |
|
|
67
|
-
| `roxy.
|
|
68
|
-
| `roxy.
|
|
68
|
+
| `roxy.tarot` | 10 | 78-card readings: spreads, daily pulls, yes/no, Celtic Cross |
|
|
69
|
+
| `roxy.biorhythm` | 6 | 10-cycle biorhythm readings, forecasts, critical days, compatibility |
|
|
69
70
|
| `roxy.iching` | 9 | I Ching hexagrams, trigrams, daily readings |
|
|
70
71
|
| `roxy.crystals` | 12 | Crystal meanings, healing properties, zodiac and chakra pairings |
|
|
71
|
-
| `roxy.
|
|
72
|
+
| `roxy.dreams` | 5 | Dream symbol dictionary: 3,000+ interpretations |
|
|
73
|
+
| `roxy.angelNumbers` | 4 | Angel number lookup, pattern analysis, daily guidance |
|
|
72
74
|
| `roxy.location` | 3 | City and country search for birth chart coordinates |
|
|
73
75
|
| `roxy.usage` | 1 | API usage stats, rate limits, subscription info |
|
|
74
76
|
<!-- END:DOMAINS -->
|