@umituz/react-native-ai-generation-content 1.89.10 → 1.89.11
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.89.
|
|
3
|
+
"version": "1.89.11",
|
|
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",
|
|
@@ -14,6 +14,8 @@ export async function createCreation(
|
|
|
14
14
|
const docRef = pathResolver.getDocRef(userId, creation.id);
|
|
15
15
|
if (!docRef) throw new Error("Firestore not initialized");
|
|
16
16
|
|
|
17
|
+
// Build data object with only defined values (Firestore rejects undefined)
|
|
18
|
+
// Use type assertion to bypass readonly restriction for conditional fields
|
|
17
19
|
const data: CreationDocument = {
|
|
18
20
|
type: creation.type,
|
|
19
21
|
uri: creation.uri,
|
|
@@ -21,16 +23,14 @@ export async function createCreation(
|
|
|
21
23
|
metadata: creation.metadata ?? {},
|
|
22
24
|
isShared: creation.isShared ?? false,
|
|
23
25
|
isFavorite: creation.isFavorite ?? false,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
if (creation.model) data.model = creation.model;
|
|
33
|
-
if (creation.startedAt) data.startedAt = creation.startedAt;
|
|
26
|
+
...(creation.status && { status: creation.status }),
|
|
27
|
+
...(creation.output && { output: creation.output }),
|
|
28
|
+
...(creation.prompt && { prompt: creation.prompt }),
|
|
29
|
+
...(creation.provider && { provider: creation.provider }),
|
|
30
|
+
...(creation.requestId && { requestId: creation.requestId }),
|
|
31
|
+
...(creation.model && { model: creation.model }),
|
|
32
|
+
...(creation.startedAt && { startedAt: creation.startedAt }),
|
|
33
|
+
} as CreationDocument;
|
|
34
34
|
|
|
35
35
|
try {
|
|
36
36
|
await setDoc(docRef, data);
|
package/src/index.ts
CHANGED
|
@@ -84,3 +84,7 @@ export type {
|
|
|
84
84
|
UseResultActionsOptions,
|
|
85
85
|
UseResultActionsReturn,
|
|
86
86
|
} from "./domains/result-preview/presentation/types/result-hooks.types";
|
|
87
|
+
|
|
88
|
+
// Result Components
|
|
89
|
+
export { SuccessRedirectionCard } from "./presentation/components/result";
|
|
90
|
+
export type { SuccessRedirectionCardProps } from "./presentation/components/result";
|