export type AttributeId = string; export type DeleteApiV1ChannelAttributeSellerAttributeIdArgs = {attributeId: AttributeId}; export type DeleteApiV1ChannelAttributeSellerAttributeIdOptions = {baseUrl?: string | undefined, ChannelAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete Seller Attribute * * DELETE /v1/channel/attribute/seller/{attributeId} */ export const deleteApiV1ChannelAttributeSellerAttributeId = async (args: DeleteApiV1ChannelAttributeSellerAttributeIdArgs, options?: DeleteApiV1ChannelAttributeSellerAttributeIdOptions) => { const {baseUrl = "https://scx-sbx.api.jtl-software.com", fetch: fetchFn = fetch, ChannelAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (ChannelAuth !== undefined) headers.set('authorization', `Bearer ${ChannelAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/v1/channel/attribute/seller/${encodeURIComponent(String(args.attributeId))}${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 };