export type DeleteApiV1Alpha1MintingCollectionsCollectionIdRoyaltiesArgs = {collectionId: string}; export type DeleteApiV1Alpha1MintingCollectionsCollectionIdRoyaltiesOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Remove Royalties * * DELETE /v1-alpha1/minting/collections/{collectionId}/royalties */ export const deleteApiV1Alpha1MintingCollectionsCollectionIdRoyalties = async (args: DeleteApiV1Alpha1MintingCollectionsCollectionIdRoyaltiesArgs, options?: DeleteApiV1Alpha1MintingCollectionsCollectionIdRoyaltiesOptions) => { const {baseUrl = "https://staging.crossmint.com/api", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/v1-alpha1/minting/collections/${encodeURIComponent(String(args.collectionId))}/royalties${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 };