export type DeleteApiV1EnterpriseEnterpriseIdTileIconsTileiconsIdArgs = {enterprise_id: string, tileicons_id: string}; export type DeleteApiV1EnterpriseEnterpriseIdTileIconsTileiconsIdOptions = {baseUrl?: string | undefined, esperCloudApiApiKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete a tile icon * * DELETE /v1/enterprise/{enterprise_id}/tile-icons/{tileicons_id}/ */ export const deleteApiV1EnterpriseEnterpriseIdTileIconsTileiconsId = async (args: DeleteApiV1EnterpriseEnterpriseIdTileIconsTileiconsIdArgs, options?: DeleteApiV1EnterpriseEnterpriseIdTileIconsTileiconsIdOptions) => { const {baseUrl = "https://develop-api.esper.cloud/api", fetch: fetchFn = fetch, esperCloudApiApiKey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (esperCloudApiApiKey !== undefined) headers.set('authorization', `Bearer ${esperCloudApiApiKey}`) const url = `${baseUrl.replace(/\/+$/, '')}/v1/enterprise/${encodeURIComponent(String(args.enterprise_id))}/tile-icons/${encodeURIComponent(String(args.tileicons_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 undefined };