@roxyapi/sdk 1.2.41 → 1.2.42
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 +25 -25
- package/README.md +27 -27
- package/dist/factory.cjs +1 -1
- package/dist/factory.js +1 -1
- package/dist/types.gen.d.ts +3 -3
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/types.gen.ts +3 -3
- package/src/version.ts +1 -1
package/AGENTS.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @roxyapi/sdk - Agent Guide
|
|
2
2
|
|
|
3
|
-
TypeScript SDK for RoxyAPI.
|
|
3
|
+
TypeScript SDK for RoxyAPI. 12+ domains (Western astrology, Vedic astrology, numerology, tarot, human design, forecast, biorhythm, I Ching, crystals, dreams, angel numbers, location) plus utility namespaces (usage, languages). One API key, fully typed, zero runtime dependencies.
|
|
4
4
|
|
|
5
5
|
> Before writing any code with this SDK, read `docs/llms-full.txt` in this package for the complete method reference with examples.
|
|
6
6
|
|
|
@@ -23,41 +23,41 @@ const roxy = createRoxy(process.env.ROXY_API_KEY!);
|
|
|
23
23
|
Every chart, horoscope, panchang, dasha, dosha, navamsa, KP, synastry, compatibility, and natal endpoint needs `latitude`, `longitude`, and (for Western) `timezone`. **Never ask the user for coordinates.** Always call `roxy.location.searchCities` first.
|
|
24
24
|
|
|
25
25
|
```typescript
|
|
26
|
-
const { data } = await roxy.location.searchCities({ query: { q: '
|
|
26
|
+
const { data } = await roxy.location.searchCities({ query: { q: 'New York' } });
|
|
27
27
|
const { latitude, longitude, timezone } = data.cities[0];
|
|
28
|
-
// `timezone` is the IANA string ("
|
|
28
|
+
// `timezone` is the IANA string ("America/New_York"). Pass it directly to any chart
|
|
29
29
|
// endpoint and the server resolves it to the DST-correct decimal offset using
|
|
30
30
|
// the chart's own `date`, so a January 1990 New York chart picks EST (-5) even
|
|
31
31
|
// when you looked the city up in July. If you prefer numbers, `utcOffset`
|
|
32
32
|
// (5.5, -5, 9, ...) also works and produces identical charts.
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
`q` accepts bare city (`'
|
|
35
|
+
`q` accepts bare city (`'Paris'`), city + country (`'Berlin Germany'`), or comma-qualified (`'Springfield, Illinois'`). Use the qualified form to disambiguate same-named cities.
|
|
36
36
|
|
|
37
37
|
## Domains
|
|
38
38
|
|
|
39
39
|
Type `roxy.` to see all available namespaces. Type `roxy.{domain}.` to see every method in that domain.
|
|
40
40
|
|
|
41
41
|
<!-- BEGIN:DOMAINS -->
|
|
42
|
-
| Namespace |
|
|
43
|
-
|
|
44
|
-
| `roxy.astrology` |
|
|
45
|
-
| `roxy.vedicAstrology` |
|
|
46
|
-
| `roxy.numerology` |
|
|
47
|
-
| `roxy.tarot` |
|
|
48
|
-
| `roxy.humanDesign` |
|
|
49
|
-
| `roxy.forecast` |
|
|
50
|
-
| `roxy.biorhythm` |
|
|
51
|
-
| `roxy.iching` |
|
|
52
|
-
| `roxy.crystals` |
|
|
53
|
-
| `roxy.dreams` |
|
|
54
|
-
| `roxy.angelNumbers` |
|
|
55
|
-
| `roxy.location` |
|
|
56
|
-
| `roxy.usage` |
|
|
57
|
-
| `roxy.languages` |
|
|
42
|
+
| Namespace | What it covers |
|
|
43
|
+
|-----------|----------------|
|
|
44
|
+
| `roxy.astrology` | Western astrology API for natal birth charts, daily, weekly, and monthly horoscopes with unique content per sign, syn... |
|
|
45
|
+
| `roxy.vedicAstrology` | Vedic astrology (Jyotish) and KP API for kundli generation with 15 divisional charts (D1-D60), Ashtakoot Gun Milan ku... |
|
|
46
|
+
| `roxy.numerology` | Numerology API to calculate life path, expression, soul urge, personality, and maturity numbers, with Pinnacle and Ch... |
|
|
47
|
+
| `roxy.tarot` | Tarot reading API with the complete 78-card Rider-Waite-Smith deck and card meanings for love, career, health, and sp... |
|
|
48
|
+
| `roxy.humanDesign` | Generate the full Human Design bodygraph from a birth moment: type, strategy, inner authority, profile, definition, i... |
|
|
49
|
+
| `roxy.forecast` | Merge upcoming transit aspects, sign ingresses, retrograde stations, new and full moons, biorhythm critical days, and... |
|
|
50
|
+
| `roxy.biorhythm` | The most complete biorhythm API: 10 cycle types across 3 primary (physical, emotional, intellectual), 4 secondary (in... |
|
|
51
|
+
| `roxy.iching` | I-Ching oracle API with all 64 hexagrams, 384 changing lines, 8 trigrams, and modern interpretations for love, career... |
|
|
52
|
+
| `roxy.crystals` | Crystal healing API with 80 healing crystals and gemstones and their spiritual, emotional, and physical properties |
|
|
53
|
+
| `roxy.dreams` | Dream interpretation API with a 2,000+ symbol dream dictionary and psychological meanings covering animals, objects,... |
|
|
54
|
+
| `roxy.angelNumbers` | Angel numbers API with meanings for 111, 222, 333, 444, 555, 666, 777, 888, 999, 1111, and 75+ sequences covering eve... |
|
|
55
|
+
| `roxy.location` | City search and geocoding API with 7,000+ cities across 227 countries, returning latitude, longitude, IANA timezone,... |
|
|
56
|
+
| `roxy.usage` | Monitor your API usage, check rate limits, and track request consumption |
|
|
57
|
+
| `roxy.languages` | List the response languages accepted by the `lang` query parameter on every i18n-aware endpoint |
|
|
58
58
|
<!-- END:DOMAINS -->
|
|
59
59
|
|
|
60
|
-
**Total:**
|
|
60
|
+
**Total:** 160+ endpoints across 12+ product domains plus usage and languages. The table above auto-syncs from `specs/openapi.json` at release time.
|
|
61
61
|
|
|
62
62
|
## Quality guidelines for agents
|
|
63
63
|
|
|
@@ -74,7 +74,7 @@ Five rules to follow when writing any call with this SDK. Get these right and th
|
|
|
74
74
|
### Two-step pattern for coordinate-dependent endpoints
|
|
75
75
|
|
|
76
76
|
```typescript
|
|
77
|
-
const { data } = await roxy.location.searchCities({ query: { q: '
|
|
77
|
+
const { data } = await roxy.location.searchCities({ query: { q: 'London' } });
|
|
78
78
|
const { latitude, longitude, timezone } = data.cities[0];
|
|
79
79
|
|
|
80
80
|
const { data: chart } = await roxy.astrology.generateNatalChart({
|
|
@@ -190,7 +190,7 @@ Ordered by domain priority (Western, Vedic, Numerology, Tarot, Biorhythm, I Chin
|
|
|
190
190
|
| Dream symbol lookup | `roxy.dreams.getDreamSymbol({ path: { id: 'flying' } })` |
|
|
191
191
|
| Angel number meaning | `roxy.angelNumbers.getAngelNumber({ path: { number: '1111' } })` |
|
|
192
192
|
| Universal number lookup | `roxy.angelNumbers.analyzeNumberSequence({ query: { number: '1234' } })` |
|
|
193
|
-
| Find city coordinates | `roxy.location.searchCities({ query: { q: '
|
|
193
|
+
| Find city coordinates | `roxy.location.searchCities({ query: { q: 'Berlin' } })` |
|
|
194
194
|
| Check API usage | `roxy.usage.getUsageStats()` |
|
|
195
195
|
| List supported languages | `roxy.languages.listLanguages()` |
|
|
196
196
|
|
|
@@ -203,8 +203,8 @@ These are the fields AI agents most often get wrong. Copy the format column exac
|
|
|
203
203
|
| `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 |
|
|
204
204
|
| `date` | ISO date string | `"1990-01-15"` | `"Jan 15 1990"`, `new Date()`, `"15/01/1990"`, `"1990-1-15"` |
|
|
205
205
|
| `time` | 24-hour string | `"14:30:00"`, `"09:00:00"` | `"2:30 PM"`, `"14:30"` (no seconds), `"9:0:0"` (no leading zeros) |
|
|
206
|
-
| `latitude` | Decimal degrees (number) | `
|
|
207
|
-
| `longitude` | Decimal degrees (number) |
|
|
206
|
+
| `latitude` | Decimal degrees (number) | `51.5074` (London), `-33.8688` (Sydney), `40.7128` (NYC) | `"28°36'N"`, `"28 36 50"`, strings |
|
|
207
|
+
| `longitude` | Decimal degrees (number) | `-0.1278` (London), `-74.006` (NYC), `139.6917` (Tokyo) | Same as latitude - no DMS strings |
|
|
208
208
|
| `sign` (horoscope path) | Lowercase zodiac name | `aries`, `taurus`, `gemini`, ... `pisces` | `"Aries"`, `"♈"`, `"1"`, `"ARIES"` (case-insensitive but prefer lowercase) |
|
|
209
209
|
| `chakra` (crystals path) | Title-case English name from the fixed enum | `"Root"`, `"Sacral"`, `"Solar Plexus"`, `"Heart"`, `"Throat"`, `"Third Eye"`, `"Crown"` | `"heart"`, `"third-eye"`, `"solar plexus"` - route is case-insensitive at runtime, but the generated TS enum is title-case; lowercase fails `tsc --strict`. |
|
|
210
210
|
| `fullName` (numerology) | Birth-certificate name | `"John William Smith"`, `"Priya Rajesh Sharma"` | Nickname, married name, partial name - affects all letter-based calcs |
|
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ TypeScript SDK for astrology, Vedic astrology, numerology, tarot, and more.
|
|
|
15
15
|
|
|
16
16
|
One API key. Fully typed. Verified against NASA JPL Horizons.
|
|
17
17
|
|
|
18
|
-
The fastest way to add natal charts,
|
|
18
|
+
The fastest way to add natal charts, daily horoscopes, synastry, Vedic kundli, tarot spreads, numerology, human design bodygraphs, and transit forecasts to Node.js apps, backends, and AI agents. 12+ domains behind a single [Roxy](https://roxyapi.com) subscription, interpretations in eight languages.
|
|
19
19
|
|
|
20
20
|
## Install
|
|
21
21
|
|
|
@@ -49,7 +49,7 @@ const roxy = createRoxy(process.env.ROXY_API_KEY!);
|
|
|
49
49
|
|
|
50
50
|
// Step 1: geocode the birth city (required for any chart endpoint)
|
|
51
51
|
const { data } = await roxy.location.searchCities({
|
|
52
|
-
query: { q: '
|
|
52
|
+
query: { q: 'London, UK' },
|
|
53
53
|
});
|
|
54
54
|
const { latitude, longitude, timezone } = data.cities[0];
|
|
55
55
|
|
|
@@ -83,22 +83,22 @@ const { latitude, longitude, timezone } = data.cities[0];
|
|
|
83
83
|
## Domains
|
|
84
84
|
|
|
85
85
|
<!-- BEGIN:DOMAINS -->
|
|
86
|
-
| Namespace |
|
|
87
|
-
|
|
88
|
-
| `roxy.astrology` |
|
|
89
|
-
| `roxy.vedicAstrology` |
|
|
90
|
-
| `roxy.numerology` |
|
|
91
|
-
| `roxy.tarot` |
|
|
92
|
-
| `roxy.humanDesign` |
|
|
93
|
-
| `roxy.forecast` |
|
|
94
|
-
| `roxy.biorhythm` |
|
|
95
|
-
| `roxy.iching` |
|
|
96
|
-
| `roxy.crystals` |
|
|
97
|
-
| `roxy.dreams` |
|
|
98
|
-
| `roxy.angelNumbers` |
|
|
99
|
-
| `roxy.location` |
|
|
100
|
-
| `roxy.usage` |
|
|
101
|
-
| `roxy.languages` |
|
|
86
|
+
| Namespace | What it covers |
|
|
87
|
+
|-----------|----------------|
|
|
88
|
+
| `roxy.astrology` | Western astrology API for natal birth charts, daily, weekly, and monthly horoscopes with unique content per sign, syn... |
|
|
89
|
+
| `roxy.vedicAstrology` | Vedic astrology (Jyotish) and KP API for kundli generation with 15 divisional charts (D1-D60), Ashtakoot Gun Milan ku... |
|
|
90
|
+
| `roxy.numerology` | Numerology API to calculate life path, expression, soul urge, personality, and maturity numbers, with Pinnacle and Ch... |
|
|
91
|
+
| `roxy.tarot` | Tarot reading API with the complete 78-card Rider-Waite-Smith deck and card meanings for love, career, health, and sp... |
|
|
92
|
+
| `roxy.humanDesign` | Generate the full Human Design bodygraph from a birth moment: type, strategy, inner authority, profile, definition, i... |
|
|
93
|
+
| `roxy.forecast` | Merge upcoming transit aspects, sign ingresses, retrograde stations, new and full moons, biorhythm critical days, and... |
|
|
94
|
+
| `roxy.biorhythm` | The most complete biorhythm API: 10 cycle types across 3 primary (physical, emotional, intellectual), 4 secondary (in... |
|
|
95
|
+
| `roxy.iching` | I-Ching oracle API with all 64 hexagrams, 384 changing lines, 8 trigrams, and modern interpretations for love, career... |
|
|
96
|
+
| `roxy.crystals` | Crystal healing API with 80 healing crystals and gemstones and their spiritual, emotional, and physical properties |
|
|
97
|
+
| `roxy.dreams` | Dream interpretation API with a 2,000+ symbol dream dictionary and psychological meanings covering animals, objects,... |
|
|
98
|
+
| `roxy.angelNumbers` | Angel numbers API with meanings for 111, 222, 333, 444, 555, 666, 777, 888, 999, 1111, and 75+ sequences covering eve... |
|
|
99
|
+
| `roxy.location` | City search and geocoding API with 7,000+ cities across 227 countries, returning latitude, longitude, IANA timezone,... |
|
|
100
|
+
| `roxy.usage` | Monitor your API usage, check rate limits, and track request consumption |
|
|
101
|
+
| `roxy.languages` | List the response languages accepted by the `lang` query parameter on every i18n-aware endpoint |
|
|
102
102
|
<!-- END:DOMAINS -->
|
|
103
103
|
|
|
104
104
|
## Most-used endpoints
|
|
@@ -112,7 +112,7 @@ The global astrology app market is $6.27B and almost entirely Western. These end
|
|
|
112
112
|
```typescript
|
|
113
113
|
// Natal chart. The #1 Western query, called on every onboarding.
|
|
114
114
|
const { data: natal } = await roxy.astrology.generateNatalChart({
|
|
115
|
-
body: { date: '1990-01-15', time: '14:30:00', latitude:
|
|
115
|
+
body: { date: '1990-01-15', time: '14:30:00', latitude: 40.7128, longitude: -74.006, timezone: -5 },
|
|
116
116
|
});
|
|
117
117
|
|
|
118
118
|
// Daily horoscope. Highest per-user call frequency in the catalog, drives DAUs and push.
|
|
@@ -122,8 +122,8 @@ const { data: horoscope } = await roxy.astrology.getDailyHoroscope({ path: { sig
|
|
|
122
122
|
// Synastry. The dating-app pro-tier feature, full inter-aspect analysis between two charts.
|
|
123
123
|
const { data: synastry } = await roxy.astrology.calculateSynastry({
|
|
124
124
|
body: {
|
|
125
|
-
person1: { date: '1990-01-15', time: '14:30:00', latitude:
|
|
126
|
-
person2: { date: '1992-07-22', time: '09:00:00', latitude:
|
|
125
|
+
person1: { date: '1990-01-15', time: '14:30:00', latitude: 40.71, longitude: -74.01, timezone: -5 },
|
|
126
|
+
person2: { date: '1992-07-22', time: '09:00:00', latitude: 51.51, longitude: -0.13, timezone: 1 },
|
|
127
127
|
},
|
|
128
128
|
});
|
|
129
129
|
// synastry.compatibilityScore, synastry.interAspects, synastry.analysis.strengths
|
|
@@ -227,9 +227,9 @@ const { data: hd } = await roxy.humanDesign.generateBodygraph({
|
|
|
227
227
|
body: {
|
|
228
228
|
date: '1990-07-04',
|
|
229
229
|
time: '10:12:00',
|
|
230
|
-
latitude:
|
|
231
|
-
longitude:
|
|
232
|
-
timezone:
|
|
230
|
+
latitude: 40.7128,
|
|
231
|
+
longitude: -74.006,
|
|
232
|
+
timezone: -4,
|
|
233
233
|
},
|
|
234
234
|
});
|
|
235
235
|
// hd.type, hd.strategy, hd.profile, hd.definition
|
|
@@ -247,9 +247,9 @@ const { data: timeline } = await roxy.forecast.generateTimeline({
|
|
|
247
247
|
birthData: {
|
|
248
248
|
date: '1990-07-04',
|
|
249
249
|
time: '10:12:00',
|
|
250
|
-
latitude:
|
|
251
|
-
longitude:
|
|
252
|
-
timezone:
|
|
250
|
+
latitude: 40.7128,
|
|
251
|
+
longitude: -74.006,
|
|
252
|
+
timezone: -4,
|
|
253
253
|
},
|
|
254
254
|
startDate: '2026-06-01',
|
|
255
255
|
endDate: '2026-06-30',
|
package/dist/factory.cjs
CHANGED
package/dist/factory.js
CHANGED
package/dist/types.gen.d.ts
CHANGED
|
@@ -14596,7 +14596,7 @@ export type PostVedicAstrologyPanchangDetailedResponses = {
|
|
|
14596
14596
|
*/
|
|
14597
14597
|
panchaka: {
|
|
14598
14598
|
/**
|
|
14599
|
-
*
|
|
14599
|
+
* True when Panchaka is in effect on this date, whether it is already running at sunrise or begins later in the day, in which case startsAt and endsAt give the window. False only when no Panchaka touches this date.
|
|
14600
14600
|
*/
|
|
14601
14601
|
active: boolean;
|
|
14602
14602
|
/**
|
|
@@ -14613,11 +14613,11 @@ export type PostVedicAstrologyPanchangDetailedResponses = {
|
|
|
14613
14613
|
endsAt: string;
|
|
14614
14614
|
};
|
|
14615
14615
|
/**
|
|
14616
|
-
* Bhadra (Vishti Karana), the 7th movable karana, avoided for all auspicious activities. Bhadra recurs roughly every 3 to 5 days and lasts about half a tithi
|
|
14616
|
+
* Bhadra (Vishti Karana), the 7th movable karana, avoided for all auspicious activities. Bhadra recurs roughly every 3 to 5 days and lasts about half a tithi. active is true whenever a Bhadra is attributed to this date; startsAt and endsAt give the window, which may end on the next calendar day.
|
|
14617
14617
|
*/
|
|
14618
14618
|
bhadra: {
|
|
14619
14619
|
/**
|
|
14620
|
-
*
|
|
14620
|
+
* True when a Bhadra (Vishti Karana) occurs on this date, in which case startsAt and endsAt give its window. False only when no Bhadra begins on this date.
|
|
14621
14621
|
*/
|
|
14622
14622
|
active: boolean;
|
|
14623
14623
|
/**
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.2.
|
|
1
|
+
export declare const VERSION = "1.2.42";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
package/src/types.gen.ts
CHANGED
|
@@ -14898,7 +14898,7 @@ export type PostVedicAstrologyPanchangDetailedResponses = {
|
|
|
14898
14898
|
*/
|
|
14899
14899
|
panchaka: {
|
|
14900
14900
|
/**
|
|
14901
|
-
*
|
|
14901
|
+
* True when Panchaka is in effect on this date, whether it is already running at sunrise or begins later in the day, in which case startsAt and endsAt give the window. False only when no Panchaka touches this date.
|
|
14902
14902
|
*/
|
|
14903
14903
|
active: boolean;
|
|
14904
14904
|
/**
|
|
@@ -14915,11 +14915,11 @@ export type PostVedicAstrologyPanchangDetailedResponses = {
|
|
|
14915
14915
|
endsAt: string;
|
|
14916
14916
|
};
|
|
14917
14917
|
/**
|
|
14918
|
-
* Bhadra (Vishti Karana), the 7th movable karana, avoided for all auspicious activities. Bhadra recurs roughly every 3 to 5 days and lasts about half a tithi
|
|
14918
|
+
* Bhadra (Vishti Karana), the 7th movable karana, avoided for all auspicious activities. Bhadra recurs roughly every 3 to 5 days and lasts about half a tithi. active is true whenever a Bhadra is attributed to this date; startsAt and endsAt give the window, which may end on the next calendar day.
|
|
14919
14919
|
*/
|
|
14920
14920
|
bhadra: {
|
|
14921
14921
|
/**
|
|
14922
|
-
*
|
|
14922
|
+
* True when a Bhadra (Vishti Karana) occurs on this date, in which case startsAt and endsAt give its window. False only when no Bhadra begins on this date.
|
|
14923
14923
|
*/
|
|
14924
14924
|
active: boolean;
|
|
14925
14925
|
/**
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '1.2.
|
|
1
|
+
export const VERSION = '1.2.42';
|