export type MappingDataSourcePropertiesIdentifier = string; export type DeleteApiV3MappingDataSourcesIdentifierValuesValueArgs = {identifier: MappingDataSourcePropertiesIdentifier, value: string}; export type DeleteApiV3MappingDataSourcesIdentifierValuesValueOptions = {baseUrl?: string | undefined, ApiKeyAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete specific data source value * * DELETE /v3/mapping_data_sources/{identifier}/values/{value} */ export const deleteApiV3MappingDataSourcesIdentifierValuesValue = async (args: DeleteApiV3MappingDataSourcesIdentifierValuesValueArgs, options?: DeleteApiV3MappingDataSourcesIdentifierValuesValueOptions) => { const {baseUrl = "https://api.affinda.com", fetch: fetchFn = fetch, ApiKeyAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (ApiKeyAuth !== undefined) headers.set('authorization', `Bearer ${ApiKeyAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/v3/mapping_data_sources/${encodeURIComponent(String(args.identifier))}/values/${encodeURIComponent(String(args.value))}${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 };