export type DeleteApiAppAppIdBuiltinLicenseFieldFieldNameArgs = {app_id: string, field_name: string}; export type DeleteApiAppAppIdBuiltinLicenseFieldFieldNameOptions = {baseUrl?: string | undefined, apiKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete a builtin license field override for a given app and named field. * * DELETE /app/{app_id}/builtin-license-field/{field_name} */ export const deleteApiAppAppIdBuiltinLicenseFieldFieldName = async (args: DeleteApiAppAppIdBuiltinLicenseFieldFieldNameArgs, options?: DeleteApiAppAppIdBuiltinLicenseFieldFieldNameOptions) => { const {baseUrl = "https://api.replicated.com/vendor/v3", fetch: fetchFn = fetch, apiKey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (apiKey !== undefined) headers.set("Authorization", apiKey) const url = `${baseUrl.replace(/\/+$/, '')}/app/${encodeURIComponent(String(args.app_id))}/builtin-license-field/${encodeURIComponent(String(args.field_name))}${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 };