@zodic/shared 0.0.125 → 0.0.127

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.
@@ -22,6 +22,13 @@
22
22
  "when": 1739191361351,
23
23
  "tag": "0002_sparkling_madame_masque",
24
24
  "breakpoints": true
25
+ },
26
+ {
27
+ "idx": 3,
28
+ "version": "6",
29
+ "when": 1739193677404,
30
+ "tag": "0003_productive_shriek",
31
+ "breakpoints": true
25
32
  }
26
33
  ]
27
34
  }
package/db/schema.ts CHANGED
@@ -43,7 +43,7 @@ export const users = sqliteTable(
43
43
  credits_balance: integer('credits_balance').default(0).notNull(),
44
44
  totalCreditsEarned: integer('total_credits_earned').default(0).notNull(),
45
45
  lastTransactionAt: integer('last_transaction_at', { mode: 'timestamp' }), // Nullable for no transactions
46
- language: text('language'),
46
+ language: text('language').notNull(),
47
47
  ...timestampFields,
48
48
  },
49
49
  (t) => [
@@ -59,6 +59,7 @@ export const usersTemp = sqliteTable(
59
59
  email: text('email').notNull().unique(),
60
60
  name: text('name').notNull(),
61
61
  profileImage: text('profile_image'),
62
+ language: text('language').notNull(),
62
63
  oauthProvider: text('oauth_provider'), // e.g., "google", "facebook", "apple", nullable for password-based login
63
64
  oauthProviderId: text('oauth_provider_id'), // Remove .unique()
64
65
  ...timestampFields,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zodic/shared",
3
- "version": "0.0.125",
3
+ "version": "0.0.127",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -16,3 +16,10 @@ export const buildConceptKVKey = (
16
16
  ): string => {
17
17
  return `concepts:${lang}:${conceptSlug}:${combinationString}`;
18
18
  };
19
+
20
+ export const buildAstroKey = (
21
+ userId: string,
22
+ language: 'pt-br' | 'en-us'
23
+ ): string => {
24
+ return `astro:user:${userId}:${language}`;
25
+ };