export type OrgEventsAppDomainApiProductEventSpeakerDtosSpeakerRequest = {firstName: string, lastName: string, company?: string | undefined, designation?: string | undefined, bio?: string | undefined, linkedInProfile?: string | undefined, twitterProfile?: string | undefined, facebookProfile?: string | undefined, websiteUrl?: string | undefined, externalRefId?: string | undefined}; export type UpdateApiV1EventsEventIdSpeakersSpeakerIdArgs = {eventId: string, speakerId: string, body: OrgEventsAppDomainApiProductEventSpeakerDtosSpeakerRequest}; export type UpdateApiV1EventsEventIdSpeakersSpeakerIdOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Update an existing speaker * * PUT /v1/events/{eventId}/speakers/{speakerId} */ export const updateApiV1EventsEventIdSpeakersSpeakerId = async (args: UpdateApiV1EventsEventIdSpeakersSpeakerIdArgs, options: UpdateApiV1EventsEventIdSpeakersSpeakerIdOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") const url = `${baseUrl.replace(/\/+$/, '')}/v1/events/${encodeURIComponent(String(args.eventId))}/speakers/${encodeURIComponent(String(args.speakerId))}${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 };