@zodic/shared 0.0.322 → 0.0.323

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.
@@ -106,6 +106,13 @@
106
106
  "when": 1744920245024,
107
107
  "tag": "0014_green_marvel_apes",
108
108
  "breakpoints": true
109
+ },
110
+ {
111
+ "idx": 15,
112
+ "version": "6",
113
+ "when": 1745556069821,
114
+ "tag": "0015_zippy_sersi",
115
+ "breakpoints": true
109
116
  }
110
117
  ]
111
118
  }
package/db/schema.ts CHANGED
@@ -383,21 +383,18 @@ export const userArtifacts = sqliteTable(
383
383
  userConceptId: text('user_concept_id')
384
384
  .notNull()
385
385
  .references(() => userConcepts.id, { onDelete: 'cascade' }),
386
+ conceptId: text('concept_id')
387
+ .notNull()
388
+ .references(() => concepts.id, { onDelete: 'cascade' }), // New: Direct reference to concepts table
386
389
  artifactId: text('artifact_id')
387
390
  .notNull()
388
391
  .references(() => artifacts.id, { onDelete: 'cascade' }),
389
- gender: text('gender').notNull(), // Gender of the user or chosen archetype
390
- archetypeIndex: text('archetype_index').notNull(), // Chosen archetype for the artifact
391
392
  archetypeDataId: text('archetype_data_id').references(
392
393
  () => archetypesData.id,
393
394
  { onDelete: 'cascade' }
394
- ), // New: References archetypesData.id, nullable
395
- postImageId: text('post_image_id'), // URL for the Instagram post image
396
- reelImageId: text('reel_image_id'), // URL for the Instagram reels/TikTok image
397
- postImageUrl: text('post_image_url'), // URL for the Instagram post image
398
- reelImageUrl: text('reel_image_url'), // URL for the Instagram reels/TikTok image
399
- postGenerationId: text('post_generation_id'), // Leonardo's generation ID for the post image
400
- reelGenerationId: text('reel_generation_id'), // Leonardo's generation ID for the reel image
395
+ ), // References archetypesData.id, nullable
396
+ postImages: text('post_images'), // Stringified JSON array of { id: string, url: string } for up to 6 post images
397
+ reelImages: text('reel_images'), // Stringified JSON array of { id: string, url: string } for up to 6 reel images (if used)
401
398
  status: text('status')
402
399
  .default('pending') // Possible statuses: 'pending', 'post_ready', 'reel_ready', 'completed'
403
400
  .notNull(),
@@ -408,6 +405,7 @@ export const userArtifacts = sqliteTable(
408
405
  index('user_artifacts_artifact_id_idx').on(t.artifactId),
409
406
  index('user_artifacts_status_idx').on(t.status),
410
407
  index('user_artifacts_archetype_data_id_idx').on(t.archetypeDataId),
408
+ index('user_artifacts_concept_id_idx').on(t.conceptId), // New index for conceptId
411
409
  ]
412
410
  );
413
411
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zodic/shared",
3
- "version": "0.0.322",
3
+ "version": "0.0.323",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "publishConfig": {