@umituz/react-native-ai-creations 1.4.4 → 1.4.5

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-creations",
3
- "version": "1.4.4",
3
+ "version": "1.4.5",
4
4
  "description": "AI-generated creations gallery with filtering, sharing, and management for React Native apps",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -3,26 +3,16 @@
3
3
  * Fetches user's creations from repository
4
4
  */
5
5
 
6
- import { useQuery } from "@tanstack/react-query";
7
- import type { ICreationsRepository } from "../../domain/repositories/ICreationsRepository";
6
+ import type { Creation } from "../../domain/entities/Creation";
8
7
 
9
- const CACHE_CONFIG = {
10
- staleTime: 5 * 60 * 1000, // 5 minutes - use cache invalidation on mutations
11
- gcTime: 30 * 60 * 1000,
12
- };
13
-
14
- interface UseCreationsProps {
15
- readonly userId: string | null;
16
- readonly repository: ICreationsRepository;
17
- readonly enabled?: boolean;
18
- }
8
+ // ...
19
9
 
20
10
  export function useCreations({
21
11
  userId,
22
12
  repository,
23
13
  enabled = true,
24
14
  }: UseCreationsProps) {
25
- return useQuery({
15
+ return useQuery<Creation[]>({
26
16
  queryKey: ["creations", userId ?? ""],
27
17
  queryFn: () => repository.getAll(userId!),
28
18
  enabled: !!userId && enabled,