@zodic/shared 0.0.412 → 0.0.414

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zodic/shared",
3
- "version": "0.0.412",
3
+ "version": "0.0.414",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -5,6 +5,7 @@ import {
5
5
  KVNamespace,
6
6
  Queue,
7
7
  R2Bucket,
8
+ Service
8
9
  } from '@cloudflare/workers-types';
9
10
  import { DrizzleD1Database } from 'drizzle-orm/d1';
10
11
  import { Context, Env } from 'hono';
@@ -61,6 +62,7 @@ export type CentralBindings = {
61
62
 
62
63
  API_BASE_URL: string;
63
64
  ASTRO_API: Fetcher;
65
+ ASTRO_ENGINE: Service;
64
66
  };
65
67
 
66
68
  export type Variables = {
@@ -108,6 +110,7 @@ export type BackendBindings = Env &
108
110
  | 'ASAAS_API_URL'
109
111
  | 'PAYMENT_QUEUE'
110
112
  | 'ASTRO_API'
113
+ | 'ASTRO_ENGINE'
111
114
  >;
112
115
 
113
116
  export type BackendCtx = Context<
@@ -194,7 +194,6 @@ export type Hemisphere = {
194
194
  };
195
195
 
196
196
  export type HemisphereDetail = {
197
- description: string;
198
197
  id: number;
199
198
  };
200
199
 
@@ -451,7 +450,6 @@ export interface MoonPhaseKVData {
451
450
  }
452
451
 
453
452
  export interface HemisphereKVDetail {
454
- description: string | null;
455
453
  report: string | null;
456
454
  }
457
455
 
@@ -568,7 +566,7 @@ export type UserConceptData = {
568
566
  content: any[]; // From conceptsData.content (text, JSON-stringified array, parsed)
569
567
  images: {
570
568
  post: any[]; // From conceptsData.postImages (text, JSON-stringified array, parsed)
571
- framed: string[]; // From conceptsData.framedImages (url text)
569
+ framed: string[]; // From conceptsData.framedImages (url text)
572
570
  reel: any[]; // From conceptsData.reelImages (text, JSON-stringified array, parsed)
573
571
  };
574
572
  combinationString: string; // e.g., "sagittarius-aquarius-libra"
@@ -664,7 +662,6 @@ export interface ProductLabels {
664
662
  }
665
663
 
666
664
  // types/astro-engine.ts
667
-
668
665
  export interface AstroEnginePoint {
669
666
  name: string;
670
667
  type: 'planet' | 'karmic_point' | 'arabic_part' | 'key_point';
@@ -690,11 +687,48 @@ export interface AstroEngineAspect {
690
687
  diff: number;
691
688
  }
692
689
 
693
- export interface AstroEngineResponse {
694
- meta: {
695
- is_diurnal: boolean;
696
- sun_house: number;
690
+ // Novos tipos para suportar a estrutura "features"
691
+ export interface AstroEngineStatItem {
692
+ name: string;
693
+ percentage: number;
694
+ }
695
+
696
+ export interface AstroEngineFeatures {
697
+ moon_phase: {
698
+ moon_phase_id: number;
699
+ moon_phase_name: string;
700
+ name: string; // slug, ex: "new_moon"
701
+ };
702
+ hemisphere: {
703
+ north_south: { id: number };
704
+ east_west: { id: number };
705
+ };
706
+ elements: {
707
+ elements: AstroEngineStatItem[];
708
+ dominant_element_id: number;
697
709
  };
710
+ modes: {
711
+ modes: AstroEngineStatItem[];
712
+ dominant_mode_id: number;
713
+ };
714
+ }
715
+
716
+ // Novo tipo para o AstroDraw
717
+ export interface AstroEngineWheelData {
718
+ planets: Record<string, number[]>; // Ex: { "Sun": [120.5] }
719
+ cusps: number[];
720
+ }
721
+
722
+ // Root Response
723
+ export interface AstroEngineResponse {
724
+ // 'meta' foi removido e substituído por 'features' e props na raiz
725
+ features: AstroEngineFeatures;
726
+
727
+ is_diurnal: boolean;
728
+
729
+ wheel_data: AstroEngineWheelData;
730
+ wheel_svg: string | null; // Mantemos opcional caso volte a usar no futuro
731
+
698
732
  points: Record<string, AstroEnginePoint>;
699
733
  houses: AstroEngineHouse[];
700
734
  aspects: AstroEngineAspect[];
@@ -706,4 +740,5 @@ export interface AstroEngineInput {
706
740
  time: string; // "HH:MM" (UTC)
707
741
  lat: number;
708
742
  lon: number;
709
- }
743
+ generate_wheel: boolean;
744
+ }