export type DeleteApiRewardTablesIdEntriesEntryIdArgs = {id: string, entry_id: string}; export type DeleteApiRewardTablesIdEntriesEntryIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete Reward Table Entry * * DELETE /reward-tables/{id}/entries/{entry_id}/ */ export const deleteApiRewardTablesIdEntriesEntryId = async (args: DeleteApiRewardTablesIdEntriesEntryIdArgs, options?: DeleteApiRewardTablesIdEntriesEntryIdOptions) => { const {baseUrl = "https://cf-blast.livelikecdn.com/api/v1", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "application/json") const url = `${baseUrl.replace(/\/+$/, '')}/reward-tables/${encodeURIComponent(String(args.id))}/entries/${encodeURIComponent(String(args.entry_id))}/${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return (await res.json()) as unknown };