import { queryOptions } from '@tanstack/react-query' import { api } from '@/lib/api-client' import type { MemberIdentifier } from '@/types/account' import type { PaginatedResponse } from '@lunarfront/shared/schemas' export const identifierKeys = { all: (memberId: string) => ['members', memberId, 'identifiers'] as const, } export function identifierListOptions(memberId: string) { return queryOptions({ queryKey: identifierKeys.all(memberId), queryFn: () => api.get>(`/v1/members/${memberId}/identifiers`, { page: 1, limit: 100, order: 'asc' }), }) } export const identifierMutations = { create: (memberId: string, data: Record) => api.post(`/v1/members/${memberId}/identifiers`, data), update: (id: string, data: Record) => api.patch(`/v1/identifiers/${id}`, data), delete: (id: string) => api.del(`/v1/identifiers/${id}`), }