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
28 lines
1.1 KiB
TypeScript
28 lines
1.1 KiB
TypeScript
import { queryOptions } from '@tanstack/react-query'
|
|
import { api } from '@/lib/api-client'
|
|
import type { ProcessorLink } from '@/types/account'
|
|
import type { PaginatedResponse, PaginationInput } from '@lunarfront/shared/schemas'
|
|
|
|
export const processorLinkKeys = {
|
|
all: (accountId: string) => ['accounts', accountId, 'processor-links'] as const,
|
|
list: (accountId: string, params: PaginationInput) => [...processorLinkKeys.all(accountId), params] as const,
|
|
}
|
|
|
|
export function processorLinkListOptions(accountId: string, params: PaginationInput) {
|
|
return queryOptions({
|
|
queryKey: processorLinkKeys.list(accountId, params),
|
|
queryFn: () => api.get<PaginatedResponse<ProcessorLink>>(`/v1/accounts/${accountId}/processor-links`, params),
|
|
})
|
|
}
|
|
|
|
export const processorLinkMutations = {
|
|
create: (accountId: string, data: Record<string, unknown>) =>
|
|
api.post<ProcessorLink>(`/v1/accounts/${accountId}/processor-links`, data),
|
|
|
|
update: (id: string, data: Record<string, unknown>) =>
|
|
api.patch<ProcessorLink>(`/v1/processor-links/${id}`, data),
|
|
|
|
delete: (id: string) =>
|
|
api.del<ProcessorLink>(`/v1/processor-links/${id}`),
|
|
}
|