@roxyapi/sdk 1.0.4 → 1.1.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/AGENTS.md ADDED
@@ -0,0 +1,151 @@
1
+ # @roxyapi/sdk — Agent Guide
2
+
3
+ TypeScript SDK for RoxyAPI. Multi-domain spiritual and metaphysical intelligence API. One API key, fully typed, zero runtime dependencies.
4
+
5
+ > Before writing any code with this SDK, read `docs/llms-full.txt` in this package for the complete method reference with examples.
6
+
7
+ ## Install and initialize
8
+
9
+ ```bash
10
+ npm install @roxyapi/sdk
11
+ ```
12
+
13
+ ```typescript
14
+ import { createRoxy } from '@roxyapi/sdk';
15
+
16
+ const roxy = createRoxy(process.env.ROXY_API_KEY!);
17
+ ```
18
+
19
+ `createRoxy` sets the base URL (`https://roxyapi.com/api/v2`) and auth header automatically. Every method returns `{ data, error, response }`.
20
+
21
+ ## Domains
22
+
23
+ Type `roxy.` to see all available namespaces. Type `roxy.{domain}.` to see every method in that domain.
24
+
25
+ | Namespace | What it covers |
26
+ |-----------|----------------|
27
+ | `roxy.astrology` | Western astrology: natal charts, horoscopes, synastry, moon phases, transits, compatibility |
28
+ | `roxy.vedicAstrology` | Vedic/Jyotish: birth charts, dashas, nakshatras, panchang, KP system, doshas, yogas |
29
+ | `roxy.tarot` | Rider-Waite-Smith deck: spreads, daily pulls, yes/no, Celtic Cross, custom layouts |
30
+ | `roxy.numerology` | Life path, expression, soul urge, personal year, karmic analysis, compatibility |
31
+ | `roxy.crystals` | Crystal healing properties, zodiac/chakra pairings, birthstones, search |
32
+ | `roxy.iching` | I Ching: hexagrams, trigrams, coin casting, daily readings |
33
+ | `roxy.angelNumbers` | Angel number meanings, pattern analysis, daily guidance |
34
+ | `roxy.dreams` | Dream symbol dictionary and interpretations |
35
+ | `roxy.location` | City geocoding for birth chart coordinates |
36
+ | `roxy.usage` | API usage stats and subscription info |
37
+
38
+ ## Critical patterns
39
+
40
+ ### GET endpoints — use `path` for URL parameters
41
+
42
+ ```typescript
43
+ const { data } = await roxy.astrology.getDailyHoroscope({
44
+ path: { sign: 'aries' },
45
+ });
46
+
47
+ const { data } = await roxy.crystals.getCrystal({
48
+ path: { slug: 'amethyst' },
49
+ });
50
+ ```
51
+
52
+ ### POST endpoints — use `body` for request data
53
+
54
+ Most valuable endpoints (charts, spreads, calculations) are POST:
55
+
56
+ ```typescript
57
+ // Birth chart — requires date, time, coordinates
58
+ const { data } = await roxy.astrology.generateNatalChart({
59
+ body: {
60
+ date: '1990-01-15',
61
+ time: '14:30:00',
62
+ latitude: 28.6139,
63
+ longitude: 77.209,
64
+ },
65
+ });
66
+
67
+ // Tarot spread
68
+ const { data } = await roxy.tarot.castCelticCross({
69
+ body: { question: 'What should I focus on?' },
70
+ });
71
+
72
+ // Numerology
73
+ const { data } = await roxy.numerology.calculateLifePath({
74
+ body: { year: 1990, month: 1, day: 15 },
75
+ });
76
+ ```
77
+
78
+ ### Query parameters
79
+
80
+ ```typescript
81
+ const { data } = await roxy.crystals.searchCrystals({
82
+ query: { q: 'amethyst' },
83
+ });
84
+ ```
85
+
86
+ ### Error handling
87
+
88
+ ```typescript
89
+ const { data, error, response } = await roxy.astrology.getDailyHoroscope({
90
+ path: { sign: 'aries' },
91
+ });
92
+
93
+ if (error) {
94
+ // error is { error: string } on 4xx/5xx
95
+ console.error('Status:', response?.status, 'Error:', error);
96
+ return;
97
+ }
98
+ // data is fully typed after error check
99
+ console.log(data.sign, data.overview);
100
+ ```
101
+
102
+ Common error codes: `401` invalid/missing API key, `403` subscription expired or limit reached, `429` rate limited, `404` resource not found.
103
+
104
+ ## Common tasks
105
+
106
+ | Task | Code |
107
+ |------|------|
108
+ | Daily horoscope | `roxy.astrology.getDailyHoroscope({ path: { sign } })` |
109
+ | Birth chart (Western) | `roxy.astrology.generateNatalChart({ body: { date, time, latitude, longitude } })` |
110
+ | Birth chart (Vedic) | `roxy.vedicAstrology.generateBirthChart({ body: { date, time, latitude, longitude } })` |
111
+ | Compatibility score | `roxy.astrology.calculateCompatibility({ body: { person1, person2 } })` |
112
+ | Tarot daily card | `roxy.tarot.getDailyCard({ body: { date } })` |
113
+ | Celtic Cross reading | `roxy.tarot.castCelticCross({ body: { question } })` |
114
+ | Life Path number | `roxy.numerology.calculateLifePath({ body: { year, month, day } })` |
115
+ | Full numerology chart | `roxy.numerology.generateNumerologyChart({ body: { date, name } })` |
116
+ | Crystal by zodiac | `roxy.crystals.getCrystalsByZodiac({ path: { sign } })` |
117
+ | I Ching reading | `roxy.iching.castReading()` |
118
+ | Angel number meaning | `roxy.angelNumbers.getAngelNumber({ path: { number: '1111' } })` |
119
+ | Dream symbol lookup | `roxy.dreams.getDreamSymbol({ path: { id: 'flying' } })` |
120
+ | Find city coordinates | `roxy.location.searchCities({ query: { q: 'Mumbai' } })` |
121
+ | Check API usage | `roxy.usage.getUsageStats()` |
122
+
123
+ ## Location helper
124
+
125
+ Most chart endpoints need `latitude` and `longitude`. Use the location API to geocode:
126
+
127
+ ```typescript
128
+ const { data: cities } = await roxy.location.searchCities({
129
+ query: { q: 'Mumbai, India' },
130
+ });
131
+ const city = cities[0];
132
+ // Use city.latitude and city.longitude in chart requests
133
+ ```
134
+
135
+ ## Gotchas
136
+
137
+ - **Parameters are objects, not positional.** Always `{ path: {...} }`, `{ body: {...} }`, or `{ query: {...} }` — never positional arguments.
138
+ - **Do not guess method names.** Type `roxy.domain.` and let autocomplete show available methods. Method names come from `operationId` in the OpenAPI spec, not URL paths.
139
+ - **Do not use raw `fetch`.** The SDK handles auth headers, base URL, and typed responses.
140
+ - **Do not expose API keys client-side.** Call Roxy from server code, API routes, or server components only.
141
+ - **Chart endpoints need coordinates.** Use `roxy.location.searchCities()` to get latitude/longitude before calling any birth chart or panchang method.
142
+ - **Date format is `YYYY-MM-DD`, time is `HH:MM:SS`.** Both are strings. Timezone is optional (IANA format like `America/New_York`).
143
+ - **All list endpoints may return paginated objects** (e.g. `{ items: [...], total: N }`) rather than raw arrays. Check the type.
144
+ - **`data` and `error` are mutually exclusive.** If `error` is set, `data` is `undefined` and vice versa.
145
+
146
+ ## Links
147
+
148
+ - Full method reference: `docs/llms-full.txt` (bundled in this package)
149
+ - Interactive API docs: https://roxyapi.com/api-reference
150
+ - Pricing and API keys: https://roxyapi.com/pricing
151
+ - MCP for AI agents: https://roxyapi.com/docs/mcp
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  [![API Reference](https://img.shields.io/badge/api%20reference-roxyapi.com-blue)](https://roxyapi.com/api-reference)
6
6
  [![Pricing](https://img.shields.io/badge/pricing-roxyapi.com-blue)](https://roxyapi.com/pricing)
7
7
 
8
- TypeScript SDK for [RoxyAPI](https://roxyapi.com). 8 domains, 120+ endpoints, one API key.
8
+ TypeScript SDK for [RoxyAPI](https://roxyapi.com). Multiple domains, fully typed endpoints, one API key.
9
9
 
10
10
  Build astrology apps, tarot platforms, birth chart generators, and compatibility tools without writing a single calculation.
11
11
 
@@ -107,7 +107,18 @@ if (error) {
107
107
 
108
108
  ## TypeScript
109
109
 
110
- Every request and response is fully typed. IDE autocomplete shows available methods per domain and exact parameter shapes:no docs tab needed.
110
+ Every request and response is fully typed. IDE autocomplete shows available methods per domain and exact parameter shapesno docs tab needed.
111
+
112
+ ## AI agents (Cursor, Claude Code, Copilot, Codex)
113
+
114
+ This package ships with bundled documentation that AI coding agents can read directly from `node_modules/`:
115
+
116
+ - **`AGENTS.md`** — Quick start, patterns, gotchas, and a common tasks reference table
117
+ - **`docs/llms-full.txt`** — Complete method reference with code examples for every domain
118
+
119
+ AI agents that support `AGENTS.md` (Claude Code, Cursor, GitHub Copilot, OpenAI Codex, Gemini CLI) will read it automatically. For other tools, point your agent to `node_modules/@roxyapi/sdk/AGENTS.md`.
120
+
121
+ Also available: [MCP server](https://roxyapi.com/docs/mcp) for AI agents that support the Model Context Protocol.
111
122
 
112
123
  ## Links
113
124
 
package/dist/factory.cjs CHANGED
@@ -2674,7 +2674,7 @@ var Roxy = class _Roxy extends HeyApiClient {
2674
2674
  };
2675
2675
 
2676
2676
  // src/version.ts
2677
- var VERSION = "1.0.4";
2677
+ var VERSION = "1.1.0";
2678
2678
 
2679
2679
  // src/factory.ts
2680
2680
  function createRoxy(auth) {
package/dist/factory.js CHANGED
@@ -1840,7 +1840,7 @@ var Roxy = class _Roxy extends HeyApiClient {
1840
1840
  };
1841
1841
 
1842
1842
  // src/version.ts
1843
- var VERSION = "1.0.4";
1843
+ var VERSION = "1.1.0";
1844
1844
 
1845
1845
  // src/factory.ts
1846
1846
  function createRoxy(auth) {
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.0.4";
1
+ export declare const VERSION = "1.1.0";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -0,0 +1,690 @@
1
+ # @roxyapi/sdk — Complete Method Reference
2
+
3
+ > TypeScript SDK for RoxyAPI. Multi-domain spiritual and metaphysical intelligence API. Fully typed, zero runtime dependencies. Install: `npm install @roxyapi/sdk`
4
+
5
+ Every method returns `{ data, error, response }`. Parameters use `{ path }` for URL segments, `{ body }` for POST data, `{ query }` for query strings.
6
+
7
+ ```typescript
8
+ import { createRoxy } from '@roxyapi/sdk';
9
+ const roxy = createRoxy(process.env.ROXY_API_KEY!);
10
+ ```
11
+
12
+ ---
13
+
14
+ ## Astrology (Western) — `roxy.astrology`
15
+
16
+ Tropical zodiac, Placidus houses, NASA JPL DE405 validated positions.
17
+
18
+ ### Horoscopes
19
+
20
+ ```typescript
21
+ // Daily horoscope for one sign
22
+ const { data } = await roxy.astrology.getDailyHoroscope({
23
+ path: { sign: 'aries' },
24
+ });
25
+ // Returns: { sign, date, overview, love, career, health, finance, advice, luckyNumber, luckyColor, compatibleSigns }
26
+
27
+ // All 12 daily horoscopes
28
+ const { data } = await roxy.astrology.getAllDailyHoroscopes();
29
+
30
+ // Weekly horoscope
31
+ const { data } = await roxy.astrology.getWeeklyHoroscope({ path: { sign: 'aries' } });
32
+
33
+ // Monthly horoscope
34
+ const { data } = await roxy.astrology.getMonthlyHoroscope({ path: { sign: 'aries' } });
35
+ ```
36
+
37
+ Valid signs: `aries`, `taurus`, `gemini`, `cancer`, `leo`, `virgo`, `libra`, `scorpio`, `sagittarius`, `capricorn`, `aquarius`, `pisces`
38
+
39
+ ### Zodiac Signs and Planets
40
+
41
+ ```typescript
42
+ // All 12 zodiac signs
43
+ const { data } = await roxy.astrology.listZodiacSigns();
44
+
45
+ // Single sign details (personality, compatibility, traits)
46
+ const { data } = await roxy.astrology.getZodiacSign({ path: { identifier: 'aries' } });
47
+
48
+ // All 10 planet meanings
49
+ const { data } = await roxy.astrology.listPlanetMeanings();
50
+
51
+ // Single planet details
52
+ const { data } = await roxy.astrology.getPlanetMeaning({ path: { identifier: 'venus' } });
53
+ ```
54
+
55
+ ### Birth Charts and Calculations
56
+
57
+ All POST. Body requires: `date` (YYYY-MM-DD), `time` (HH:MM:SS), `latitude`, `longitude`. Optional: `timezone` (IANA, e.g. "America/New_York").
58
+
59
+ ```typescript
60
+ // Natal chart — 10 planets, 12 houses, aspects
61
+ const { data } = await roxy.astrology.generateNatalChart({
62
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
63
+ });
64
+
65
+ // Planetary positions (ephemeris)
66
+ const { data } = await roxy.astrology.getPlanetaryPositions({
67
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
68
+ });
69
+
70
+ // House cusps (Placidus, Whole Sign, Equal, Koch)
71
+ const { data } = await roxy.astrology.calculateHouses({
72
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209, houseSystem: 'placidus' },
73
+ });
74
+
75
+ // Planetary aspects
76
+ const { data } = await roxy.astrology.calculateAspects({
77
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
78
+ });
79
+
80
+ // Transits (current planets vs natal)
81
+ const { data } = await roxy.astrology.calculateTransits({
82
+ body: { date: '2026-03-27', time: '12:00:00', latitude: 28.6139, longitude: 77.209 },
83
+ });
84
+
85
+ // Transit aspects with interpretations
86
+ const { data } = await roxy.astrology.calculateTransitAspects({
87
+ body: { date: '2026-03-27', time: '12:00:00', latitude: 28.6139, longitude: 77.209 },
88
+ });
89
+ ```
90
+
91
+ ### Compatibility and Returns
92
+
93
+ ```typescript
94
+ // Compatibility score (0-100 with category breakdown)
95
+ const { data } = await roxy.astrology.calculateCompatibility({
96
+ body: {
97
+ person1: { date: '1990-01-15', time: '14:30:00', latitude: 28.61, longitude: 77.20 },
98
+ person2: { date: '1992-06-20', time: '09:00:00', latitude: 19.07, longitude: 72.87 },
99
+ },
100
+ });
101
+
102
+ // Synastry (relationship aspects between two charts)
103
+ const { data } = await roxy.astrology.calculateSynastry({
104
+ body: {
105
+ person1: { date: '1990-01-15', time: '14:30:00', latitude: 28.61, longitude: 77.20 },
106
+ person2: { date: '1992-06-20', time: '09:00:00', latitude: 19.07, longitude: 72.87 },
107
+ },
108
+ });
109
+
110
+ // Composite chart (midpoint relationship chart)
111
+ const { data } = await roxy.astrology.generateCompositeChart({
112
+ body: {
113
+ person1: { date: '1990-01-15', time: '14:30:00', latitude: 28.61, longitude: 77.20 },
114
+ person2: { date: '1992-06-20', time: '09:00:00', latitude: 19.07, longitude: 72.87 },
115
+ },
116
+ });
117
+
118
+ // Solar return (annual birthday chart)
119
+ const { data } = await roxy.astrology.generateSolarReturn({
120
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.61, longitude: 77.20 },
121
+ });
122
+
123
+ // Lunar return (monthly emotional forecast)
124
+ const { data } = await roxy.astrology.generateLunarReturn({
125
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.61, longitude: 77.20 },
126
+ });
127
+
128
+ // Planetary return (Mercury, Venus, Mars, Jupiter, Saturn)
129
+ const { data } = await roxy.astrology.generatePlanetaryReturn({
130
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.61, longitude: 77.20 },
131
+ });
132
+ ```
133
+
134
+ ### Moon Phases
135
+
136
+ ```typescript
137
+ // Current moon phase
138
+ const { data } = await roxy.astrology.getCurrentMoonPhase();
139
+ // Returns: { date, phase, illumination, age, sign, degree, distance, meaning }
140
+
141
+ // Upcoming phase transitions
142
+ const { data } = await roxy.astrology.getUpcomingMoonPhases();
143
+
144
+ // Monthly moon calendar
145
+ const { data } = await roxy.astrology.getMoonCalendar({ path: { year: 2026, month: 3 } });
146
+ ```
147
+
148
+ ---
149
+
150
+ ## Vedic Astrology — `roxy.vedicAstrology`
151
+
152
+ Sidereal zodiac (Lahiri ayanamsa), Placidus houses, KP system support.
153
+
154
+ ### Birth Charts
155
+
156
+ ```typescript
157
+ // Rashi chart (D1)
158
+ const { data } = await roxy.vedicAstrology.generateBirthChart({
159
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
160
+ });
161
+
162
+ // Navamsa (D9 — marriage compatibility)
163
+ const { data } = await roxy.vedicAstrology.generateNavamsa({
164
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
165
+ });
166
+
167
+ // Any divisional chart (D2-D60)
168
+ const { data } = await roxy.vedicAstrology.generateDivisionalChart({
169
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209, division: 9 },
170
+ });
171
+ ```
172
+
173
+ ### Planetary Positions
174
+
175
+ ```typescript
176
+ // Sidereal positions (9 planets + Lagna)
177
+ const { data } = await roxy.vedicAstrology.getPlanetPositions({
178
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
179
+ });
180
+
181
+ // Monthly ephemeris (daily positions for a month)
182
+ const { data } = await roxy.vedicAstrology.getMonthlyEphemeris({
183
+ body: { date: '2026-03-01', time: '00:00:00', latitude: 28.6139, longitude: 77.209 },
184
+ });
185
+ ```
186
+
187
+ ### Dasha System
188
+
189
+ ```typescript
190
+ // Current Mahadasha/Antardasha/Pratyantardasha
191
+ const { data } = await roxy.vedicAstrology.getCurrentDasha({
192
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
193
+ });
194
+
195
+ // All 9 Mahadasha periods (120-year Vimshottari cycle)
196
+ const { data } = await roxy.vedicAstrology.getMajorDashas({
197
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
198
+ });
199
+
200
+ // Sub-dashas within a Mahadasha
201
+ const { data } = await roxy.vedicAstrology.getSubDashas({
202
+ path: { mahadasha: 'Venus' },
203
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
204
+ });
205
+ ```
206
+
207
+ ### Panchang
208
+
209
+ ```typescript
210
+ // Basic (Tithi, Nakshatra, Yoga, Karana)
211
+ const { data } = await roxy.vedicAstrology.getBasicPanchang({
212
+ body: { date: '2026-03-27', time: '06:00:00', latitude: 28.6139, longitude: 77.209 },
213
+ });
214
+
215
+ // Detailed (all 5 limbs + sunrise/sunset/moonrise)
216
+ const { data } = await roxy.vedicAstrology.getDetailedPanchang({
217
+ body: { date: '2026-03-27', time: '06:00:00', latitude: 28.6139, longitude: 77.209 },
218
+ });
219
+
220
+ // Choghadiya muhurta
221
+ const { data } = await roxy.vedicAstrology.getChoghadiya({
222
+ body: { date: '2026-03-27', latitude: 28.6139, longitude: 77.209 },
223
+ });
224
+
225
+ // Hora (planetary hours)
226
+ const { data } = await roxy.vedicAstrology.getHora({
227
+ body: { date: '2026-03-27', latitude: 28.6139, longitude: 77.209 },
228
+ });
229
+ ```
230
+
231
+ ### Doshas
232
+
233
+ ```typescript
234
+ // Manglik dosha
235
+ const { data } = await roxy.vedicAstrology.checkManglikDosha({
236
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
237
+ });
238
+
239
+ // Kalsarpa dosha
240
+ const { data } = await roxy.vedicAstrology.checkKalsarpaDosha({
241
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
242
+ });
243
+
244
+ // Sadhesati (Saturn transit)
245
+ const { data } = await roxy.vedicAstrology.checkSadhesati({
246
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
247
+ });
248
+ ```
249
+
250
+ ### Compatibility
251
+
252
+ ```typescript
253
+ // Gun Milan (Ashtakoot matching)
254
+ const { data } = await roxy.vedicAstrology.calculateGunMilan({
255
+ body: {
256
+ person1: { date: '1990-01-15', time: '14:30:00', latitude: 28.61, longitude: 77.20 },
257
+ person2: { date: '1992-06-20', time: '09:00:00', latitude: 19.07, longitude: 72.87 },
258
+ },
259
+ });
260
+ ```
261
+
262
+ ### KP (Krishnamurti Paddhati) System
263
+
264
+ ```typescript
265
+ // KP Ayanamsa value
266
+ const { data } = await roxy.vedicAstrology.getKpAyanamsa();
267
+
268
+ // KP planet positions with star/sub lords
269
+ const { data } = await roxy.vedicAstrology.getKpPlanets({
270
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
271
+ });
272
+
273
+ // KP house cusps with ruling lords
274
+ const { data } = await roxy.vedicAstrology.getKpCusps({
275
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
276
+ });
277
+
278
+ // Complete KP chart
279
+ const { data } = await roxy.vedicAstrology.generateKpChart({
280
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
281
+ });
282
+
283
+ // KP ruling planets (horary)
284
+ const { data } = await roxy.vedicAstrology.getKpRulingPlanets({
285
+ body: { date: '2026-03-27', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
286
+ });
287
+
288
+ // KP ruling planets at intervals
289
+ const { data } = await roxy.vedicAstrology.getKpRulingInterval({
290
+ body: { date: '2026-03-27', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
291
+ });
292
+
293
+ // KP sublord boundary changes
294
+ const { data } = await roxy.vedicAstrology.getKpSublordChanges({
295
+ body: { date: '2026-03-27', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
296
+ });
297
+
298
+ // KP rasi (sign) changes
299
+ const { data } = await roxy.vedicAstrology.getKpRasiChanges({
300
+ body: { date: '2026-03-27', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
301
+ });
302
+
303
+ // KP planets at time intervals
304
+ const { data } = await roxy.vedicAstrology.getKpPlanetsInterval({
305
+ body: { date: '2026-03-27', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
306
+ });
307
+ ```
308
+
309
+ ### Aspects, Transits, Parallels
310
+
311
+ ```typescript
312
+ // Planetary aspects (Drishti)
313
+ const { data } = await roxy.vedicAstrology.calculateDrishti({
314
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
315
+ });
316
+
317
+ // Monthly aspect events
318
+ const { data } = await roxy.vedicAstrology.getMonthlyAspects({
319
+ body: { date: '2026-03-01', time: '00:00:00', latitude: 28.6139, longitude: 77.209 },
320
+ });
321
+
322
+ // Lunar aspects for a month
323
+ const { data } = await roxy.vedicAstrology.getLunarAspects({
324
+ body: { date: '2026-03-01', time: '00:00:00', latitude: 28.6139, longitude: 77.209 },
325
+ });
326
+
327
+ // Transit (Gochar) vs natal
328
+ const { data } = await roxy.vedicAstrology.calculateTransit({
329
+ body: { date: '2026-03-27', time: '12:00:00', latitude: 28.6139, longitude: 77.209 },
330
+ });
331
+
332
+ // Monthly sign changes
333
+ const { data } = await roxy.vedicAstrology.getMonthlyTransits({
334
+ body: { date: '2026-03-01', time: '00:00:00', latitude: 28.6139, longitude: 77.209 },
335
+ });
336
+
337
+ // Declination parallels
338
+ const { data } = await roxy.vedicAstrology.calculateParallels({
339
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
340
+ });
341
+
342
+ // Monthly parallels
343
+ const { data } = await roxy.vedicAstrology.getMonthlyParallels({
344
+ body: { date: '2026-03-01', time: '00:00:00', latitude: 28.6139, longitude: 77.209 },
345
+ });
346
+
347
+ // Ecliptic crossings
348
+ const { data } = await roxy.vedicAstrology.getEclipticCrossings({
349
+ body: { date: '2026-03-01', time: '00:00:00', latitude: 28.6139, longitude: 77.209 },
350
+ });
351
+ ```
352
+
353
+ ### Reference Data
354
+
355
+ ```typescript
356
+ // All 12 rashis (Vedic signs)
357
+ const { data } = await roxy.vedicAstrology.listRashis();
358
+ const { data } = await roxy.vedicAstrology.getRashi({ path: { id: 1 } });
359
+
360
+ // All 27 nakshatras
361
+ const { data } = await roxy.vedicAstrology.listNakshatras();
362
+ const { data } = await roxy.vedicAstrology.getNakshatra({ path: { id: 1 } });
363
+
364
+ // 300+ yogas
365
+ const { data } = await roxy.vedicAstrology.listYogas();
366
+ const { data } = await roxy.vedicAstrology.getYoga({ path: { id: 1 } });
367
+ ```
368
+
369
+ ### Strength Analysis
370
+
371
+ ```typescript
372
+ // Upagraha (sub-planet) positions
373
+ const { data } = await roxy.vedicAstrology.getUpagrahaPositions({
374
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
375
+ });
376
+
377
+ // Ashtakavarga (8-fold strength)
378
+ const { data } = await roxy.vedicAstrology.calculateAshtakavarga({
379
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
380
+ });
381
+
382
+ // Shadbala (6-fold strength per BPHS)
383
+ const { data } = await roxy.vedicAstrology.calculateShadbala({
384
+ body: { date: '1990-01-15', time: '14:30:00', latitude: 28.6139, longitude: 77.209 },
385
+ });
386
+ ```
387
+
388
+ ---
389
+
390
+ ## Tarot — `roxy.tarot`
391
+
392
+ 78-card Rider-Waite-Smith deck (22 Major Arcana, 56 Minor Arcana).
393
+
394
+ ```typescript
395
+ // List all 78 cards
396
+ const { data } = await roxy.tarot.listCards();
397
+
398
+ // Single card details
399
+ const { data } = await roxy.tarot.getCard({ path: { id: 0 } }); // 0 = The Fool
400
+
401
+ // Draw random cards (1-78)
402
+ const { data } = await roxy.tarot.drawCards({ body: { count: 3 } });
403
+
404
+ // Daily guidance card
405
+ const { data } = await roxy.tarot.getDailyCard({ body: { date: '2026-03-27' } });
406
+
407
+ // Yes/No answer
408
+ const { data } = await roxy.tarot.castYesNo({ body: { question: 'Should I take this job?' } });
409
+
410
+ // Three-card spread (Past, Present, Future)
411
+ const { data } = await roxy.tarot.castThreeCard({ body: { question: 'My career path' } });
412
+
413
+ // Celtic Cross (10 cards, comprehensive)
414
+ const { data } = await roxy.tarot.castCelticCross({ body: { question: 'What should I focus on?' } });
415
+
416
+ // Love spread (5 cards)
417
+ const { data } = await roxy.tarot.castLoveSpread({ body: { question: 'My relationship' } });
418
+
419
+ // Career spread (7 cards, SWOT analysis)
420
+ const { data } = await roxy.tarot.castCareerSpread({ body: { question: 'My career' } });
421
+
422
+ // Custom spread (1-10 cards with named positions)
423
+ const { data } = await roxy.tarot.castCustomSpread({
424
+ body: { positions: ['Current energy', 'Challenge', 'Outcome'] },
425
+ });
426
+ ```
427
+
428
+ ---
429
+
430
+ ## Numerology — `roxy.numerology`
431
+
432
+ Pythagorean system.
433
+
434
+ ```typescript
435
+ // Life Path number
436
+ const { data } = await roxy.numerology.calculateLifePath({
437
+ body: { year: 1990, month: 1, day: 15 },
438
+ });
439
+ // Returns: { number, calculation, type, hasKarmicDebt, meaning }
440
+
441
+ // Expression (Destiny) number
442
+ const { data } = await roxy.numerology.calculateExpression({ body: { name: 'John Smith' } });
443
+
444
+ // Soul Urge (Heart's Desire) number
445
+ const { data } = await roxy.numerology.calculateSoulUrge({ body: { name: 'John Smith' } });
446
+
447
+ // Personality number
448
+ const { data } = await roxy.numerology.calculatePersonality({ body: { name: 'John Smith' } });
449
+
450
+ // Birth Day number
451
+ const { data } = await roxy.numerology.calculateBirthDay({ body: { day: 15 } });
452
+
453
+ // Maturity number (Life Path + Expression)
454
+ const { data } = await roxy.numerology.calculateMaturity({
455
+ body: { date: '1990-01-15', name: 'John Smith' },
456
+ });
457
+
458
+ // Karmic lessons (missing numbers)
459
+ const { data } = await roxy.numerology.analyzeKarmicLessons({ body: { name: 'John Smith' } });
460
+
461
+ // Karmic debt check (13, 14, 16, 19)
462
+ const { data } = await roxy.numerology.checkKarmicDebt({
463
+ body: { date: '1990-01-15', name: 'John Smith' },
464
+ });
465
+
466
+ // Personal year cycle
467
+ const { data } = await roxy.numerology.calculatePersonalYear({
468
+ body: { date: '1990-01-15', currentYear: 2026 },
469
+ });
470
+
471
+ // Compatibility between two people
472
+ const { data } = await roxy.numerology.calculateNumCompatibility({
473
+ body: {
474
+ person1Date: '1990-01-15', person1Name: 'John Smith',
475
+ person2Date: '1992-06-20', person2Name: 'Jane Doe',
476
+ },
477
+ });
478
+
479
+ // Full numerology chart (all numbers combined)
480
+ const { data } = await roxy.numerology.generateNumerologyChart({
481
+ body: { date: '1990-01-15', name: 'John Smith' },
482
+ });
483
+
484
+ // Number meaning (1-9, 11, 22, 33)
485
+ const { data } = await roxy.numerology.getNumberMeaning({ path: { number: 7 } });
486
+
487
+ // Daily numerology number
488
+ const { data } = await roxy.numerology.getDailyNumber({ body: { date: '2026-03-27' } });
489
+ ```
490
+
491
+ ---
492
+
493
+ ## Crystals — `roxy.crystals`
494
+
495
+ Healing properties, zodiac/chakra associations, birthstones.
496
+
497
+ ```typescript
498
+ // All crystals (paginated)
499
+ const { data } = await roxy.crystals.listCrystals();
500
+
501
+ // Single crystal details
502
+ const { data } = await roxy.crystals.getCrystal({ path: { slug: 'amethyst' } });
503
+
504
+ // Search by keyword
505
+ const { data } = await roxy.crystals.searchCrystals({ query: { q: 'love' } });
506
+
507
+ // By zodiac sign
508
+ const { data } = await roxy.crystals.getCrystalsByZodiac({ path: { sign: 'pisces' } });
509
+
510
+ // By chakra
511
+ const { data } = await roxy.crystals.getCrystalsByChakra({ path: { chakra: 'heart' } });
512
+
513
+ // By element
514
+ const { data } = await roxy.crystals.getCrystalsByElement({ path: { element: 'water' } });
515
+
516
+ // Birthstones by month
517
+ const { data } = await roxy.crystals.getBirthstones({ path: { month: 3 } });
518
+
519
+ // Crystal pairings
520
+ const { data } = await roxy.crystals.getCrystalPairings({ path: { slug: 'amethyst' } });
521
+
522
+ // Daily crystal
523
+ const { data } = await roxy.crystals.getDailyCrystal();
524
+
525
+ // Random crystal
526
+ const { data } = await roxy.crystals.getRandomCrystal();
527
+
528
+ // All crystal colors
529
+ const { data } = await roxy.crystals.listCrystalColors();
530
+
531
+ // All planetary associations
532
+ const { data } = await roxy.crystals.listCrystalPlanets();
533
+ ```
534
+
535
+ ---
536
+
537
+ ## I Ching — `roxy.iching`
538
+
539
+ 64 hexagrams, 8 trigrams, traditional coin casting.
540
+
541
+ ```typescript
542
+ // Cast a reading (3-coin method)
543
+ const { data } = await roxy.iching.castReading();
544
+ // Returns: { hexagram, lines, changingLinePositions, resultingHexagram }
545
+
546
+ // Daily hexagram
547
+ const { data } = await roxy.iching.getDailyHexagram({ body: { date: '2026-03-27' } });
548
+
549
+ // Daily reading with changing lines
550
+ const { data } = await roxy.iching.castDailyReading({ body: { date: '2026-03-27' } });
551
+
552
+ // All 64 hexagrams
553
+ const { data } = await roxy.iching.listHexagrams();
554
+
555
+ // Single hexagram by King Wen number (1-64)
556
+ const { data } = await roxy.iching.getHexagram({ path: { number: 1 } });
557
+
558
+ // Random hexagram
559
+ const { data } = await roxy.iching.getRandomHexagram();
560
+
561
+ // Lookup by binary line pattern
562
+ const { data } = await roxy.iching.lookupHexagram({ query: { lines: '111111' } });
563
+
564
+ // All 8 trigrams
565
+ const { data } = await roxy.iching.listTrigrams();
566
+
567
+ // Single trigram
568
+ const { data } = await roxy.iching.getTrigram({ path: { identifier: 'heaven' } });
569
+ ```
570
+
571
+ ---
572
+
573
+ ## Angel Numbers — `roxy.angelNumbers`
574
+
575
+ Angel numbers with spiritual meanings and pattern analysis.
576
+
577
+ ```typescript
578
+ // All angel numbers
579
+ const { data } = await roxy.angelNumbers.listAngelNumbers();
580
+
581
+ // Single angel number meaning
582
+ const { data } = await roxy.angelNumbers.getAngelNumber({ path: { number: '1111' } });
583
+
584
+ // Analyze any number sequence
585
+ const { data } = await roxy.angelNumbers.analyzeNumberSequence({ query: { number: '1234' } });
586
+
587
+ // Daily angel number
588
+ const { data } = await roxy.angelNumbers.getDailyAngelNumber();
589
+ ```
590
+
591
+ ---
592
+
593
+ ## Dreams — `roxy.dreams`
594
+
595
+ Dream symbol dictionary and interpretations.
596
+
597
+ ```typescript
598
+ // Search symbols
599
+ const { data } = await roxy.dreams.searchDreamSymbols({ query: { q: 'flying' } });
600
+
601
+ // Random symbols
602
+ const { data } = await roxy.dreams.getRandomSymbols();
603
+
604
+ // Letter counts (A-Z index)
605
+ const { data } = await roxy.dreams.getSymbolLetterCounts();
606
+
607
+ // Single symbol interpretation
608
+ const { data } = await roxy.dreams.getDreamSymbol({ path: { id: 'flying' } });
609
+
610
+ // Daily dream symbol
611
+ const { data } = await roxy.dreams.getDailyDreamSymbol({ body: { date: '2026-03-27' } });
612
+ ```
613
+
614
+ ---
615
+
616
+ ## Location — `roxy.location`
617
+
618
+ Geocoding helper for birth chart coordinates.
619
+
620
+ ```typescript
621
+ // Search cities (autocomplete)
622
+ const { data } = await roxy.location.searchCities({ query: { q: 'Mumbai' } });
623
+ // Returns array: [{ name, country, latitude, longitude, timezone, ... }]
624
+
625
+ // All 227 countries
626
+ const { data } = await roxy.location.listCountries();
627
+
628
+ // Cities in a country
629
+ const { data } = await roxy.location.getCitiesByCountry({ path: { iso2: 'IN' } });
630
+ ```
631
+
632
+ ---
633
+
634
+ ## Usage — `roxy.usage`
635
+
636
+ Check your API usage and subscription.
637
+
638
+ ```typescript
639
+ const { data } = await roxy.usage.getUsageStats();
640
+ // Returns: { plan, usedThisMonth, requestsPerMonth, remainingThisMonth, email, status, endDate }
641
+ ```
642
+
643
+ ---
644
+
645
+ ## Error Handling
646
+
647
+ Every method returns `{ data, error, response }`:
648
+
649
+ ```typescript
650
+ const { data, error, response } = await roxy.astrology.getDailyHoroscope({
651
+ path: { sign: 'aries' },
652
+ });
653
+
654
+ if (error) {
655
+ console.error('API error:', error);
656
+ console.error('Status:', response?.status);
657
+ return;
658
+ }
659
+
660
+ // data is fully typed after error check
661
+ console.log(data.sign, data.overview);
662
+ ```
663
+
664
+ Common errors:
665
+ - `401` — Invalid or missing API key
666
+ - `403` — Subscription expired or limit reached
667
+ - `404` — Resource not found (invalid sign, id, etc.)
668
+ - `429` — Rate limited
669
+
670
+ ## Advanced Client Configuration
671
+
672
+ ```typescript
673
+ import { Roxy } from '@roxyapi/sdk';
674
+ import { createClient, createConfig } from '@roxyapi/sdk/client';
675
+
676
+ const client = createClient(
677
+ createConfig({
678
+ baseUrl: 'https://roxyapi.com/api/v2',
679
+ auth: process.env.ROXY_API_KEY,
680
+ }),
681
+ );
682
+ const roxy = new Roxy({ client });
683
+ ```
684
+
685
+ ## Links
686
+
687
+ - Interactive API docs: https://roxyapi.com/api-reference
688
+ - Pricing and API keys: https://roxyapi.com/pricing
689
+ - MCP for AI agents: https://roxyapi.com/docs/mcp
690
+ - Source: https://github.com/RoxyAPI/sdk-typescript
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@roxyapi/sdk",
3
- "version": "1.0.4",
3
+ "version": "1.1.0",
4
4
  "description": "TypeScript SDK for Roxy — the multi-domain spiritual intelligence API",
5
5
  "type": "module",
6
6
  "exports": {
@@ -20,7 +20,9 @@
20
20
  "types": "./dist/factory.d.ts",
21
21
  "files": [
22
22
  "dist",
23
- "src"
23
+ "src",
24
+ "docs",
25
+ "AGENTS.md"
24
26
  ],
25
27
  "scripts": {
26
28
  "generate": "bun run scripts/generate.ts",
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '1.0.4';
1
+ export const VERSION = '1.1.0';