@umituz/react-native-ai-generation-content 1.67.2 → 1.67.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-ai-generation-content",
3
- "version": "1.67.2",
3
+ "version": "1.67.4",
4
4
  "description": "Provider-agnostic AI generation orchestration for React Native with result preview components",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -57,10 +57,10 @@ export interface CreationDocument {
57
57
  readonly isShared: boolean;
58
58
  readonly isFavorite?: boolean;
59
59
  readonly rating?: number;
60
- readonly ratedAt?: FirebaseTimestamp | Date;
60
+ readonly ratedAt?: FirebaseTimestamp | Date | null;
61
61
  readonly createdAt: FirebaseTimestamp | Date;
62
- readonly completedAt?: FirebaseTimestamp | Date;
63
- readonly deletedAt?: FirebaseTimestamp | Date;
62
+ readonly completedAt?: FirebaseTimestamp | Date | null;
63
+ readonly deletedAt?: FirebaseTimestamp | Date | null;
64
64
  // Background job tracking - FAL queue requestId and model
65
65
  readonly requestId?: string;
66
66
  readonly model?: string;
@@ -18,6 +18,7 @@ export async function createCreation(
18
18
  type: creation.type,
19
19
  uri: creation.uri,
20
20
  createdAt: creation.createdAt,
21
+ deletedAt: null,
21
22
  metadata: creation.metadata || {},
22
23
  isShared: creation.isShared || false,
23
24
  isFavorite: creation.isFavorite || false,
@@ -54,13 +54,22 @@ export async function rateCreation(
54
54
  userId: string,
55
55
  creationId: string,
56
56
  rating: number,
57
- _description?: string
57
+ description?: string
58
58
  ): Promise<boolean> {
59
59
  const docRef = pathResolver.getDocRef(userId, creationId);
60
60
  if (!docRef) return false;
61
61
 
62
62
  try {
63
- await updateDoc(docRef, { rating, ratedAt: new Date() });
63
+ const updates: Record<string, unknown> = {
64
+ rating,
65
+ ratedAt: new Date(),
66
+ };
67
+
68
+ if (description) {
69
+ updates.ratingText = description;
70
+ }
71
+
72
+ await updateDoc(docRef, updates);
64
73
  return true;
65
74
  } catch {
66
75
  return false;