@zodic/shared 0.0.275 → 0.0.277

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.
@@ -13,6 +13,7 @@ import {
13
13
  astroDescriptionTemplates,
14
14
  astroFeatureReports,
15
15
  astroReports,
16
+ concepts,
16
17
  conceptsData,
17
18
  houseReports,
18
19
  } from '../../db/schema';
@@ -24,7 +25,6 @@ import {
24
25
  Concept,
25
26
  ControlNetConfig,
26
27
  DescriptionTemplateRow,
27
- Languages,
28
28
  } from '../../types';
29
29
  import {
30
30
  KVConcept,
@@ -40,6 +40,21 @@ import { AppContext } from '../base/AppContext';
40
40
  export class ConceptService {
41
41
  constructor(@inject(AppContext) private context: AppContext) {}
42
42
 
43
+ async getAllConcepts() {
44
+ const drizzle = this.context.drizzle();
45
+ const conceptsList = await drizzle
46
+ .select({
47
+ slug: concepts.slug,
48
+ planet1: concepts.planet1,
49
+ planet2: concepts.planet2,
50
+ planet3: concepts.planet3,
51
+ })
52
+ .from(concepts)
53
+ .execute();
54
+
55
+ return conceptsList;
56
+ }
57
+
43
58
  /**
44
59
  * Generate basic info for a concept: name, description, and poem.
45
60
  */
@@ -870,7 +885,7 @@ export class ConceptService {
870
885
  and(
871
886
  eq(conceptsData.conceptSlug, conceptSlug),
872
887
  eq(conceptsData.combination, combinationString),
873
- eq(conceptsData.language, "en-us") // ✅ Fetch both languages
888
+ eq(conceptsData.language, 'en-us') // ✅ Fetch both languages
874
889
  )
875
890
  )
876
891
  .limit(1);
package/db/schema.ts CHANGED
@@ -61,8 +61,8 @@ export const conceptsData = sqliteTable(
61
61
  combination: text('combination').notNull(), // Zodiac combination ('aries-taurus-libra')
62
62
  name: text('name').notNull(), // Concept name
63
63
  description: text('description').notNull(), // Concept description
64
- content: text('content').default('[]'), // JSON stringified array
65
- poem: text('poem').default('[]'), // JSON stringified array
64
+ content: text('content').default('[]').notNull(), // JSON stringified array
65
+ poem: text('poem').default('[]').notNull(), // JSON stringified array
66
66
  leonardoPrompt: text('leonardo_prompt'), // Leonardo AI prompt
67
67
  postImages: text('post_images').default('[]'), // JSON stringified array
68
68
  reelImages: text('reel_images').default('[]'), // JSON stringified array
@@ -298,7 +298,7 @@ export const concepts = sqliteTable(
298
298
  slug: text('slug').notNull(), // Name of the Concept (e.g., "crown", "amulet")
299
299
  planet1: text('planet1').notNull(), // First planet (e.g., "sun")
300
300
  planet2: text('planet2').notNull(), // Second planet (e.g., "moon")
301
- planet3: text('planet3').notNull(), // Third planet (e.g., "Ascendant"), optional for some Concepts
301
+ planet3: text('planet3').notNull(), // Third planet (e.g., "ascendant")
302
302
  },
303
303
  (t) => [index('concepts_name_idx').on(t.name)]
304
304
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zodic/shared",
3
- "version": "0.0.275",
3
+ "version": "0.0.277",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "publishConfig": {