@zodic/shared 0.0.14 → 0.0.15
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/db/migrations/0001_low_tattoo.sql +20 -0
- package/db/migrations/0002_condemned_turbo.sql +2 -0
- package/db/migrations/meta/0001_snapshot.json +1400 -0
- package/db/migrations/meta/0002_snapshot.json +1414 -0
- package/db/migrations/meta/_journal.json +14 -0
- package/db/schema.ts +37 -2
- package/package.json +1 -1
- package/types/scopes/cloudflare.ts +2 -0
|
@@ -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) => [
|
|
@@ -200,6 +200,8 @@ export const userArtifacts = sqliteTable(
|
|
|
200
200
|
.references(() => artifacts.id, { onDelete: 'cascade' }),
|
|
201
201
|
gender: text('gender').notNull(), // Gender of the user or chosen archetype
|
|
202
202
|
archetypeId: text('archetype_id').notNull(), // Chosen archetype for the artifact
|
|
203
|
+
postImageId: text('post_image_id'), // URL for the Instagram post image
|
|
204
|
+
reelImageId: text('reel_image_id'), // URL for the Instagram reels/TikTok image
|
|
203
205
|
postImageUrl: text('post_image_url'), // URL for the Instagram post image
|
|
204
206
|
reelImageUrl: text('reel_image_url'), // URL for the Instagram reels/TikTok image
|
|
205
207
|
postGenerationId: text('post_generation_id'), // Leonardo's generation ID for the post image
|
|
@@ -255,6 +257,39 @@ export const generations = sqliteTable(
|
|
|
255
257
|
]
|
|
256
258
|
);
|
|
257
259
|
|
|
260
|
+
export const artifactFaceswap = sqliteTable(
|
|
261
|
+
'artifact_faceswap',
|
|
262
|
+
{
|
|
263
|
+
id: text('id').primaryKey(), // Use FaceSwap API task ID as the primary key
|
|
264
|
+
userArtifactId: text('user_artifact_id')
|
|
265
|
+
.notNull()
|
|
266
|
+
.references(() => userArtifacts.id, { onDelete: 'cascade' }),
|
|
267
|
+
faceSwappedImageUrl: text('face_swapped_image_url'), // Final URL of the face-swapped image
|
|
268
|
+
createdAt: integer('created_at', { mode: 'timestamp' }).default(
|
|
269
|
+
sql`CURRENT_TIMESTAMP`
|
|
270
|
+
),
|
|
271
|
+
updatedAt: integer('updated_at', { mode: 'timestamp' }).default(
|
|
272
|
+
sql`CURRENT_TIMESTAMP`
|
|
273
|
+
),
|
|
274
|
+
},
|
|
275
|
+
() => []
|
|
276
|
+
);
|
|
277
|
+
|
|
278
|
+
export const artifactVideoGeneration = sqliteTable(
|
|
279
|
+
'artifact_video_generation',
|
|
280
|
+
{
|
|
281
|
+
id: text('id').primaryKey(),
|
|
282
|
+
userArtifactId: text('user_artifact_id')
|
|
283
|
+
.notNull()
|
|
284
|
+
.references(() => userArtifacts.id, { onDelete: 'cascade' }),
|
|
285
|
+
videoStatus: text('video_status').default('pending'), // Status: "pending", "completed", "failed"
|
|
286
|
+
videoUrl: text('video_url'), // URL of the final video
|
|
287
|
+
description: text('description'), // Optional description for the video
|
|
288
|
+
duration: integer('duration'), // Duration of the video in seconds
|
|
289
|
+
},
|
|
290
|
+
(t) => [index('artifact_video_generation_status_idx').on(t.videoStatus)]
|
|
291
|
+
);
|
|
292
|
+
|
|
258
293
|
export const tokens = sqliteTable(
|
|
259
294
|
'tokens',
|
|
260
295
|
{
|
package/package.json
CHANGED
|
@@ -45,6 +45,7 @@ export type CentralBindings = {
|
|
|
45
45
|
ASTROLOGY_WESTERN_API_KEY: string;
|
|
46
46
|
ASTROLOGY_PDF_USER_ID: string;
|
|
47
47
|
ASTROLOGY_PDF_API_KEY: string;
|
|
48
|
+
PIAPI_API_KEY: string;
|
|
48
49
|
|
|
49
50
|
API_BASE_URL: string;
|
|
50
51
|
PUBLIC_GOOGLE_CLIENT_ID: string;
|
|
@@ -98,6 +99,7 @@ export type BackendBindings = Env &
|
|
|
98
99
|
| 'ASTROLOGY_PDF_USER_ID'
|
|
99
100
|
| 'AI'
|
|
100
101
|
| 'KV_USER_PRODUCT_STATUS'
|
|
102
|
+
| 'PIAPI_API_KEY'
|
|
101
103
|
>;
|
|
102
104
|
|
|
103
105
|
export type BackendCtx = Context<
|