@roxyapi/sdk 1.2.17 → 1.2.19

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 CHANGED
@@ -24,9 +24,12 @@ Every chart, horoscope, panchang, dasha, dosha, navamsa, KP, synastry, compatibi
24
24
 
25
25
  ```typescript
26
26
  const { data } = await roxy.location.searchCities({ query: { q: 'Mumbai' } });
27
- const { latitude, longitude, utcOffset } = data.cities[0];
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"), not what chart endpoints expect.
27
+ const { latitude, longitude, timezone } = data.cities[0];
28
+ // `timezone` is the IANA string ("Asia/Kolkata"). Pass it directly to any chart
29
+ // endpoint and the server resolves it to the DST-correct decimal offset using
30
+ // the chart's own `date`, so a January 1990 New York chart picks EST (-5) even
31
+ // when you looked the city up in July. If you prefer numbers, `utcOffset`
32
+ // (5.5, -5, 9, ...) also works and produces identical charts.
30
33
  ```
31
34
 
32
35
  ## Domains
@@ -228,7 +231,7 @@ LLMs hallucinate confidently in this category. These are the specific traps you
228
231
  - **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
232
  - **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
233
  - **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.
234
+ - **Timezone affects Western calculations more than Vedic.** Western natal charts must respect DST at the time of birth. Vedic endpoints default to IST (`5.5`) which is DST-free. Pass the IANA `timezone` string from the Location API response (`"America/New_York"`, `"Asia/Kolkata"`) directly to chart calls and the server resolves the DST-correct offset for the chart `date`. Decimal `utcOffset` (5.5, -5, ...) also works and produces an identical chart.
232
235
 
233
236
  ## MCP equivalents
234
237
 
@@ -249,7 +252,7 @@ Use the SDK for typed TypeScript apps. Use MCP for AI agents (Claude Desktop, Cu
249
252
  - **Do not use raw `fetch`.** The SDK handles auth, base URL, and typed responses.
250
253
  - **Do not expose API keys client-side.** Call Roxy from server code, API routes, or server components only.
251
254
  - **Date format is `YYYY-MM-DD`, time is `HH:MM:SS`.** Both are strings.
252
- - **Western `timezone` is required** (decimal hours, `-5` for EST, `5.5` for IST, `0` for UTC). Vedic endpoints accept an optional `timezone` that defaults to `5.5` (IST).
255
+ - **Western `timezone` is required** and accepts either a decimal (`-5` for EST, `5.5` for IST, `0` for UTC) or an IANA string (`"America/New_York"`, `"Asia/Kolkata"`, `"UTC"`). IANA is resolved to the DST-correct offset for the request `date`. Vedic endpoints accept an optional `timezone` that defaults to `5.5` (IST).
253
256
  - **`data` and `error` are mutually exclusive.** If `error` is set, `data` is `undefined` and vice versa.
254
257
  - **Switch on `error.code`, not `error.error`.** The message may change; the code is stable.
255
258
  - **List endpoints may return paginated objects** (`{ items, total }`) instead of raw arrays. Check the type.
package/README.md CHANGED
@@ -5,9 +5,11 @@
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
- The TypeScript SDK for [Roxy](https://roxyapi.com), the multi-domain spiritual intelligence API. One key, ten domains, fully typed. Western astrology API, Vedic astrology API, numerology API, tarot API, biorhythm API, I Ching API, crystals API, dream interpretation API, and angel numbers API behind a single subscription.
8
+ TypeScript SDK for astrology, Vedic astrology, tarot, numerology, and more.
9
9
 
10
- Build a natal chart app, a kundli matching product, a daily horoscope feature, a tarot reading app, a numerology life path calculator, or a spiritual AI agent without writing a single calculation. Calculations are verified against NASA JPL Horizons; interpretations ship in eight languages.
10
+ One API key. Fully typed. Verified against NASA JPL Horizons.
11
+
12
+ The fastest way to add natal charts, kundli matching, daily horoscopes, tarot readings, and spiritual insights to Node.js apps, backends, and AI agents. Ten domains behind a single [Roxy](https://roxyapi.com) subscription, interpretations in eight languages.
11
13
 
12
14
  ## Install
13
15
 
@@ -17,6 +19,21 @@ npm install @roxyapi/sdk
17
19
  bun add @roxyapi/sdk
18
20
  ```
19
21
 
22
+ ## Start with one call
23
+
24
+ Get real product value with a single typed call. No setup beyond your API key.
25
+
26
+ ```typescript
27
+ import { createRoxy } from '@roxyapi/sdk';
28
+
29
+ const roxy = createRoxy(process.env.ROXY_API_KEY!);
30
+
31
+ const { data } = await roxy.astrology.getDailyHoroscope({ path: { sign: 'aries' } });
32
+ console.log(data.overview, data.love, data.luckyNumber);
33
+ ```
34
+
35
+ Then expand into charts, compatibility, tarot, numerology, and more.
36
+
20
37
  ## Quick start
21
38
 
22
39
  ```typescript
@@ -31,7 +48,7 @@ const { data } = await roxy.location.searchCities({
31
48
  const { latitude, longitude, timezone } = data.cities[0];
32
49
 
33
50
  // 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
51
+ // location response. The server resolves it to the DST-correct offset for
35
52
  // the chart's own date.
36
53
  const { data: chart } = await roxy.astrology.generateNatalChart({
37
54
  body: { date: '1990-01-15', time: '14:30:00', latitude, longitude, timezone },
@@ -53,7 +70,7 @@ Every chart, horoscope, panchang, dasha, dosha, navamsa, KP, synastry, compatibi
53
70
  const { data } = await roxy.location.searchCities({ query: { q: 'Tokyo' } });
54
71
  const { latitude, longitude, timezone } = data.cities[0];
55
72
  // `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
73
+ // chart endpoint and the server resolves it to the DST-correct offset for the
57
74
  // chart's date. If you prefer a decimal, `data.cities[0].utcOffset` also works.
58
75
  ```
59
76
 
@@ -264,6 +281,22 @@ const { data: angel } = await roxy.angelNumbers.getAngelNumber({ path: { number:
264
281
  const { data: anyNumber } = await roxy.angelNumbers.analyzeNumberSequence({ query: { number: '4242' } });
265
282
  ```
266
283
 
284
+ ## Built for AI agents (Cursor, Claude Code, Copilot, Codex, Gemini CLI)
285
+
286
+ This package ships with bundled documentation that AI coding agents read directly from `node_modules/`:
287
+
288
+ - `AGENTS.md` for quick start, patterns, gotchas, common-tasks reference
289
+ - `docs/llms-full.txt` for the complete method reference with examples per domain
290
+
291
+ Agents supporting `AGENTS.md` (Claude Code, Cursor, GitHub Copilot, OpenAI Codex, Gemini CLI) will pick it up automatically. For other tools, point your agent to `node_modules/@roxyapi/sdk/AGENTS.md`.
292
+
293
+ Prefer MCP? Every domain has a [remote MCP server](https://roxyapi.com/docs/mcp) at `https://roxyapi.com/mcp/{domain}` (Streamable HTTP, no stdio, no self-hosting). One-line Claude Code setup:
294
+
295
+ ```bash
296
+ claude mcp add-json --scope user roxy-astrology \
297
+ '{"type":"http","url":"https://roxyapi.com/mcp/astrology","headers":{"X-API-Key":"YOUR_KEY"}}'
298
+ ```
299
+
267
300
  ## Authentication
268
301
 
269
302
  Get your API key at [roxyapi.com/pricing](https://roxyapi.com/pricing). Instant delivery after checkout.
@@ -335,17 +368,6 @@ if (error) {
335
368
 
336
369
  Every request and response is fully typed. IDE autocomplete shows available methods per domain and exact parameter shapes. No docs tab needed.
337
370
 
338
- ## AI agents (Cursor, Claude Code, Copilot, Codex, Gemini CLI)
339
-
340
- This package ships with bundled documentation that AI coding agents read directly from `node_modules/`:
341
-
342
- - `AGENTS.md` - quick start, patterns, gotchas, common-tasks reference
343
- - `docs/llms-full.txt` - complete method reference with code examples for every domain
344
-
345
- Agents supporting `AGENTS.md` (Claude Code, Cursor, GitHub Copilot, OpenAI Codex, Gemini CLI) will pick it up automatically. For other tools, point your agent to `node_modules/@roxyapi/sdk/AGENTS.md`.
346
-
347
- Also available: [remote MCP server](https://roxyapi.com/docs/mcp) per domain at `https://roxyapi.com/mcp/{domain}` (Streamable HTTP, no stdio / no self-hosting) for agents that speak the Model Context Protocol.
348
-
349
371
  ## Links
350
372
 
351
373
  - [Documentation](https://roxyapi.com/docs)
package/dist/factory.cjs CHANGED
@@ -2821,7 +2821,7 @@ var Roxy = class _Roxy extends HeyApiClient {
2821
2821
  };
2822
2822
 
2823
2823
  // src/version.ts
2824
- var VERSION = "1.2.17";
2824
+ var VERSION = "1.2.19";
2825
2825
 
2826
2826
  // src/factory.ts
2827
2827
  function createRoxy(auth) {
package/dist/factory.js CHANGED
@@ -1986,7 +1986,7 @@ var Roxy = class _Roxy extends HeyApiClient {
1986
1986
  };
1987
1987
 
1988
1988
  // src/version.ts
1989
- var VERSION = "1.2.17";
1989
+ var VERSION = "1.2.19";
1990
1990
 
1991
1991
  // src/factory.ts
1992
1992
  function createRoxy(auth) {
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.2.17";
1
+ export declare const VERSION = "1.2.19";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -22,7 +22,7 @@ const { data } = await roxy.astrology.getDailyHoroscope({
22
22
 
23
23
  ## Astrology (Western) — `roxy.astrology`
24
24
 
25
- Tropical zodiac, Placidus houses, NASA JPL DE405 validated positions.
25
+ Tropical zodiac, Placidus houses, positions verified against NASA JPL Horizons.
26
26
 
27
27
  ### Horoscopes
28
28
 
@@ -671,13 +671,18 @@ Geocoding helper for birth chart coordinates.
671
671
  ```typescript
672
672
  // Search cities (autocomplete)
673
673
  const { data } = await roxy.location.searchCities({ query: { q: 'Mumbai' } });
674
- // Returns array: [{ name, country, latitude, longitude, timezone, ... }]
674
+ // Returns envelope: { total, limit, offset, cities: [{ name, country, latitude, longitude, timezone, utcOffset, ... }, ...] }
675
+ // `timezone` is the IANA string ("Asia/Kolkata"), `utcOffset` is the decimal fallback (5.5).
676
+ // Pass `timezone` directly to any chart endpoint; the server resolves DST for the chart's `date`.
675
677
 
676
- // All 227 countries
677
- const { data } = await roxy.location.listCountries();
678
+ const city = data.cities[0];
679
+ const { latitude, longitude, timezone } = city;
680
+
681
+ // All countries
682
+ const { data: countries } = await roxy.location.listCountries();
678
683
 
679
684
  // Cities in a country
680
- const { data } = await roxy.location.getCitiesByCountry({ path: { iso2: 'IN' } });
685
+ const { data: indianCities } = await roxy.location.getCitiesByCountry({ path: { iso2: 'IN' } });
681
686
  ```
682
687
 
683
688
  ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@roxyapi/sdk",
3
- "version": "1.2.17",
3
+ "version": "1.2.19",
4
4
  "description": "TypeScript SDK for Roxy — the multi-domain spiritual intelligence API",
5
5
  "type": "module",
6
6
  "exports": {
@@ -35,17 +35,27 @@
35
35
  },
36
36
  "keywords": [
37
37
  "astrology",
38
+ "vedic",
38
39
  "tarot",
39
40
  "numerology",
40
- "API",
41
- "SDK",
42
- "spiritual",
43
- "roxy",
44
- "vedic",
41
+ "horoscope",
42
+ "kundli",
43
+ "birth-chart",
44
+ "natal-chart",
45
45
  "iching",
46
46
  "crystals",
47
47
  "angel-numbers",
48
- "dreams"
48
+ "dreams",
49
+ "biorhythm",
50
+ "spiritual",
51
+ "API",
52
+ "SDK",
53
+ "typescript-sdk",
54
+ "nodejs",
55
+ "ai-agent",
56
+ "mcp",
57
+ "llm",
58
+ "roxy"
49
59
  ],
50
60
  "license": "MIT",
51
61
  "repository": {
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '1.2.17';
1
+ export const VERSION = '1.2.19';