@zodic/shared 0.0.14 → 0.0.16

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.
@@ -8,6 +8,20 @@
8
8
  "when": 1737425706127,
9
9
  "tag": "0000_dusty_green_goblin",
10
10
  "breakpoints": true
11
+ },
12
+ {
13
+ "idx": 1,
14
+ "version": "6",
15
+ "when": 1737478702290,
16
+ "tag": "0001_low_tattoo",
17
+ "breakpoints": true
18
+ },
19
+ {
20
+ "idx": 2,
21
+ "version": "6",
22
+ "when": 1737480263536,
23
+ "tag": "0002_condemned_turbo",
24
+ "breakpoints": true
11
25
  }
12
26
  ]
13
27
  }
package/db/schema.ts CHANGED
@@ -130,9 +130,9 @@ export const conceptCombinations = sqliteTable(
130
130
  conceptId: text('concept_id')
131
131
  .notNull()
132
132
  .references(() => concepts.id, { onDelete: 'cascade' }),
133
- planet1Sign: text('planet1_sign').notNull(),
133
+ planet1Sign: text('planet1_sign').notNull(),
134
134
  planet2Sign: text('planet2_sign').notNull(),
135
- planet3Sign: text('planet3_sign').notNull(),
135
+ planet3Sign: text('planet3_sign').notNull(),
136
136
  combinationString: text('combination_string').notNull(), // e.g., "aries-cancer-leo"
137
137
  },
138
138
  (t) => [
@@ -169,6 +169,7 @@ export const userConcepts = sqliteTable(
169
169
  ]
170
170
  );
171
171
 
172
+
172
173
  export const artifacts = sqliteTable(
173
174
  'artifacts',
174
175
  {
@@ -200,6 +201,8 @@ export const userArtifacts = sqliteTable(
200
201
  .references(() => artifacts.id, { onDelete: 'cascade' }),
201
202
  gender: text('gender').notNull(), // Gender of the user or chosen archetype
202
203
  archetypeId: text('archetype_id').notNull(), // Chosen archetype for the artifact
204
+ postImageId: text('post_image_id'), // URL for the Instagram post image
205
+ reelImageId: text('reel_image_id'), // URL for the Instagram reels/TikTok image
203
206
  postImageUrl: text('post_image_url'), // URL for the Instagram post image
204
207
  reelImageUrl: text('reel_image_url'), // URL for the Instagram reels/TikTok image
205
208
  postGenerationId: text('post_generation_id'), // Leonardo's generation ID for the post image
@@ -255,6 +258,39 @@ export const generations = sqliteTable(
255
258
  ]
256
259
  );
257
260
 
261
+ export const artifactFaceswap = sqliteTable(
262
+ 'artifact_faceswap',
263
+ {
264
+ id: text('id').primaryKey(), // Use FaceSwap API task ID as the primary key
265
+ userArtifactId: text('user_artifact_id')
266
+ .notNull()
267
+ .references(() => userArtifacts.id, { onDelete: 'cascade' }),
268
+ faceSwappedImageUrl: text('face_swapped_image_url'), // Final URL of the face-swapped image
269
+ createdAt: integer('created_at', { mode: 'timestamp' }).default(
270
+ sql`CURRENT_TIMESTAMP`
271
+ ),
272
+ updatedAt: integer('updated_at', { mode: 'timestamp' }).default(
273
+ sql`CURRENT_TIMESTAMP`
274
+ ),
275
+ },
276
+ () => []
277
+ );
278
+
279
+ export const artifactVideoGeneration = sqliteTable(
280
+ 'artifact_video_generation',
281
+ {
282
+ id: text('id').primaryKey(),
283
+ userArtifactId: text('user_artifact_id')
284
+ .notNull()
285
+ .references(() => userArtifacts.id, { onDelete: 'cascade' }),
286
+ videoStatus: text('video_status').default('pending'), // Status: "pending", "completed", "failed"
287
+ videoUrl: text('video_url'), // URL of the final video
288
+ description: text('description'), // Optional description for the video
289
+ duration: integer('duration'), // Duration of the video in seconds
290
+ },
291
+ (t) => [index('artifact_video_generation_status_idx').on(t.videoStatus)]
292
+ );
293
+
258
294
  export const tokens = sqliteTable(
259
295
  'tokens',
260
296
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zodic/shared",
3
- "version": "0.0.14",
3
+ "version": "0.0.16",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -17,10 +17,12 @@ export type CentralBindings = {
17
17
  AKOOL_API_KEY: string;
18
18
  KV_GENERATION_MANAGEMENT: KVNamespace;
19
19
  KV_USER_GENERATIONS: KVNamespace;
20
- KV_ARCHETYPES: KVNamespace;
20
+ KV_COSMIC_MIRROR_ARCHETYPES: KVNamespace;
21
+ KV_CONCEPTS: KVNamespace;
21
22
  KV_LEONARDO_PROMPTS: KVNamespace;
22
23
  KV_TEST: KVNamespace;
23
24
  KV_USER_PRODUCT_STATUS: KVNamespace;
25
+
24
26
  PROMPT_IMAGE_DESCRIBER: string;
25
27
  PROMPT_GENERATE_ARCHETYPE: string;
26
28
  PROMPT_GENERATE_LEONARDO: string;
@@ -45,6 +47,7 @@ export type CentralBindings = {
45
47
  ASTROLOGY_WESTERN_API_KEY: string;
46
48
  ASTROLOGY_PDF_USER_ID: string;
47
49
  ASTROLOGY_PDF_API_KEY: string;
50
+ PIAPI_API_KEY: string;
48
51
 
49
52
  API_BASE_URL: string;
50
53
  PUBLIC_GOOGLE_CLIENT_ID: string;
@@ -75,7 +78,8 @@ export type BackendBindings = Env &
75
78
  | 'AKOOL_API_KEY'
76
79
  | 'KV_GENERATION_MANAGEMENT'
77
80
  | 'KV_USER_GENERATIONS'
78
- | 'KV_ARCHETYPES'
81
+ | 'KV_COSMIC_MIRROR_ARCHETYPES'
82
+ | 'KV_CONCEPTS'
79
83
  | 'KV_LEONARDO_PROMPTS'
80
84
  | 'PROMPT_IMAGE_DESCRIBER'
81
85
  | 'PROMPT_GENERATE_ARCHETYPE'
@@ -98,6 +102,7 @@ export type BackendBindings = Env &
98
102
  | 'ASTROLOGY_PDF_USER_ID'
99
103
  | 'AI'
100
104
  | 'KV_USER_PRODUCT_STATUS'
105
+ | 'PIAPI_API_KEY'
101
106
  >;
102
107
 
103
108
  export type BackendCtx = Context<
@@ -163,7 +168,7 @@ export type Bindings = Env & {
163
168
  AKOOL_API_KEY: string;
164
169
  KV_GENERATION_MANAGEMENT: KVNamespace;
165
170
  KV_USER_GENERATIONS: KVNamespace;
166
- KV_ARCHETYPES: KVNamespace;
171
+ KV_COSMIC_MIRROR_ARCHETYPES: KVNamespace;
167
172
  KV_LEONARDO_PROMPTS: KVNamespace;
168
173
  KV_TEST: KVNamespace;
169
174
  PROMPT_IMAGE_DESCRIBER: string;