export type UpdateApiV1Alpha1MintingCollectionsCollectionIdTransferableArgs = {collectionId: string, body: {value: boolean}}; export type UpdateApiV1Alpha1MintingCollectionsCollectionIdTransferableOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Set Transferability * * PUT /v1-alpha1/minting/collections/{collectionId}/transferable */ export const updateApiV1Alpha1MintingCollectionsCollectionIdTransferable = async (args: UpdateApiV1Alpha1MintingCollectionsCollectionIdTransferableArgs, options?: UpdateApiV1Alpha1MintingCollectionsCollectionIdTransferableOptions) => { const {baseUrl = "https://staging.crossmint.com/api", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") const url = `${baseUrl.replace(/\/+$/, '')}/v1-alpha1/minting/collections/${encodeURIComponent(String(args.collectionId))}/transferable${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PUT", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };