(method: string, args: Record<string, any>, projection?: any)
| 4 | import { openDB } from './db'; |
| 5 | |
| 6 | export async function api(method: string, args: Record<string, any>, projection?: any) { |
| 7 | const res = await request.post(`/d/${UiContext.domainId}/api/${encodeURIComponent(method)}`, { args, projection }); |
| 8 | if (res.error) throw new Error(res.error); |
| 9 | return res; |
| 10 | } |
| 11 | |
| 12 | interface DomainInfoCache { |
| 13 | id: string; |
no test coverage detected