export type DeleteApiV2UserCustomerStoresStoreIdSharesUserIdArgs = {storeId: unknown, userId: unknown}; export type DeleteApiV2UserCustomerStoresStoreIdSharesUserIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete a share of a store to another user * * DELETE /v2/user/customer/stores/{storeId}/shares/{userId} */ export const deleteApiV2UserCustomerStoresStoreIdSharesUserId = async (args: DeleteApiV2UserCustomerStoresStoreIdSharesUserIdArgs, options?: DeleteApiV2UserCustomerStoresStoreIdSharesUserIdOptions) => { const {baseUrl = "https://api.beezup.com", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/v2/user/customer/stores/${encodeURIComponent(String(args.storeId))}/shares/${encodeURIComponent(String(args.userId))}${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 };