UNPKG

@cmk/fe_utils

Version:
19 lines (18 loc) 771 B
/** API DICT * @types query endpoints can be fully typed by using the generator fn returned by makeAppSpecificApiQueryGenerator * @example implementation * API.login = makeApi<{username: string, password: string},{success: true}>('/_api/_auth/login', 'POST') * usage: * const response = await API.login().query({username: 'test', password: 'test'}) */ export declare const API_DICT_EXAMPLE: { login: () => { query: (payload?: { log: string; } | undefined, overrideQueryParams?: import('./utils').QueryParamType<unknown>) => Promise<import('./utils').QueryResponseType<{ success: true; }>>; url: string; method: "GET" | "POST" | "PUT" | "DELETE" | "GET_FILE" | "POST_GET_FILE" | "PATCH"; }; };