export type DeleteApiV1DataDiscoveryDataStoresDataStoreIdFieldsFieldIdArgs = {dataStoreId: string, fieldId: string}; export type DeleteApiV1DataDiscoveryDataStoresDataStoreIdFieldsFieldIdOptions = {baseUrl?: string | undefined, ApiKeyAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete Data Store Field * * DELETE /v1/data-discovery/data-stores/{dataStoreId}/fields/{fieldId} */ export const deleteApiV1DataDiscoveryDataStoresDataStoreIdFieldsFieldId = async (args: DeleteApiV1DataDiscoveryDataStoresDataStoreIdFieldsFieldIdArgs, options?: DeleteApiV1DataDiscoveryDataStoresDataStoreIdFieldsFieldIdOptions) => { const {baseUrl = "https://api.osano.com", fetch: fetchFn = fetch, ApiKeyAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (ApiKeyAuth !== undefined) headers.set("x-osano-api-key", ApiKeyAuth) const url = `${baseUrl.replace(/\/+$/, '')}/v1/data-discovery/data-stores/${encodeURIComponent(String(args.dataStoreId))}/fields/${encodeURIComponent(String(args.fieldId))}${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 };