export type DeleteApiKeyFeaturesPropertyIdFeaturesFeatureIdOptions = {baseUrl?: string | undefined, yourApiToken?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete a Property Key Feature * * DELETE /key-features/{property_id}/features/{feature_id} */ export const deleteApiKeyFeaturesPropertyIdFeaturesFeatureId = async (options?: DeleteApiKeyFeaturesPropertyIdFeaturesFeatureIdOptions) => { const {baseUrl = "https://street.co.uk/open-api/v1", fetch: fetchFn = fetch, yourApiToken} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (yourApiToken !== undefined) headers.set('authorization', `Bearer ${yourApiToken}`) const url = `${baseUrl.replace(/\/+$/, '')}/key-features/${encodeURIComponent(String(args.property_id))}/features/${encodeURIComponent(String(args.feature_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 };