export type DeleteApiCreatorsCreatorUserUuidTrackingLinksUuidArgs = {'X-Fanvue-API-Version': string, creatorUserUuid: string, uuid: string}; export type DeleteApiCreatorsCreatorUserUuidTrackingLinksUuidOptions = {baseUrl?: string | undefined, BearerAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete a tracking link for a creator * * DELETE /creators/{creatorUserUuid}/tracking-links/{uuid} */ export const deleteApiCreatorsCreatorUserUuidTrackingLinksUuid = async (args: DeleteApiCreatorsCreatorUserUuidTrackingLinksUuidArgs, options?: DeleteApiCreatorsCreatorUserUuidTrackingLinksUuidOptions) => { const {baseUrl = "https://api.fanvue.com", fetch: fetchFn = fetch, BearerAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args['X-Fanvue-API-Version'] != null) headers.set("X-Fanvue-API-Version", String(args['X-Fanvue-API-Version'])) if (BearerAuth !== undefined) headers.set('authorization', `Bearer ${BearerAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/creators/${encodeURIComponent(String(args.creatorUserUuid))}/tracking-links/${encodeURIComponent(String(args.uuid))}${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 };