export const queryKeys = { users: { all: ['users'] as const, user: (userId: number) => ['user', userId] as const, lists: () => [...queryKeys.users.all, 'list'] as const, list: (params: unknown) => [...queryKeys.users.lists(), params] as const, details: () => [...queryKeys.users.all, 'detail'] as const, detail: (id: number | string) => [...queryKeys.users.details(), id] as const, }, posts: { all: ['posts'] as const, lists: () => [...queryKeys.posts.all, 'list'] as const, list: (params: unknown) => [...queryKeys.posts.lists(), params] as const, details: () => [...queryKeys.posts.all, 'detail'] as const, detail: (id: number | string) => [...queryKeys.posts.details(), id] as const, }, location: { all: ['location'] as const, provinces: ['location', 'provinces'] as const, cities: (provinceId: number | string) => ['location', 'cities', provinceId] as const, }, evaluations: { all: ['evaluations'] as const, lists: () => [...queryKeys.evaluations.all, 'list'] as const, list: (params: unknown) => [...queryKeys.evaluations.lists(), params] as const, details: () => [...queryKeys.evaluations.all, 'detail'] as const, detail: (id: number | string) => [...queryKeys.evaluations.details(), id] as const, items: () => [...queryKeys.evaluations.all, 'item'] as const, item: () => [...queryKeys.evaluations.items()] as const, }, referralCodes: { all: ['referralCodes'] as const, lists: () => [...queryKeys.referralCodes.all, 'list'] as const, list: (params: unknown) => [...queryKeys.referralCodes.lists(), params] as const, }, activityFields: { all: ['activityFields'] as const, }, permissions: { all: ['permissions'] as const, }, admins: { all: ['admins'] as const, lists: () => [...queryKeys.admins.all, 'list'] as const, list: (params: unknown) => [...queryKeys.admins.lists(), params] as const, details: () => [...queryKeys.admins.all, 'detail'] as const, detail: (id: number | string) => [...queryKeys.admins.details(), id] as const, }, roles: { all: ['roles'] as const, lists: () => [...queryKeys.roles.all, 'list'] as const, list: (params: unknown) => [...queryKeys.roles.lists(), params] as const, details: () => [...queryKeys.roles.all, 'detail'] as const, detail: (id: number | string) => [...queryKeys.roles.details(), id] as const, }, }