Files
lunarfront-app/packages/admin/src/api/identifiers.ts
Ryan Moon 9400828f62 Rename Forte to LunarFront, generalize for any small business
Rebrand from Forte (music-store-specific) to LunarFront (any small business):
- Package namespace @forte/* → @lunarfront/*
- Database forte/forte_test → lunarfront/lunarfront_test
- Docker containers, volumes, connection strings
- UI branding, localStorage keys, test emails
- All documentation and planning docs

Generalize music-specific terminology:
- instrumentDescription → itemDescription
- instrumentCount → itemCount
- instrumentType → itemCategory (on service templates)
- New migration 0027_generalize_terminology for column renames
- Seed data updated with generic examples
- RBAC descriptions updated
2026-03-30 08:51:54 -05:00

27 lines
989 B
TypeScript

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<PaginatedResponse<MemberIdentifier>>(`/v1/members/${memberId}/identifiers`, { page: 1, limit: 100, order: 'asc' }),
})
}
export const identifierMutations = {
create: (memberId: string, data: Record<string, unknown>) =>
api.post<MemberIdentifier>(`/v1/members/${memberId}/identifiers`, data),
update: (id: string, data: Record<string, unknown>) =>
api.patch<MemberIdentifier>(`/v1/identifiers/${id}`, data),
delete: (id: string) =>
api.del<MemberIdentifier>(`/v1/identifiers/${id}`),
}