export type BetConstructSSOCoreEntitiesMailJetConfiguration = {id?: number | undefined, name?: (string | null) | undefined, senderEmail?: (string | null) | undefined, senderName?: (string | null) | undefined, apiKey?: (string | null) | undefined, apiSecret?: (string | null) | undefined}; export type UpdateApiV1MailJetConfigurationsIdArgs = {id: number, body: BetConstructSSOCoreEntitiesMailJetConfiguration}; export type UpdateApiV1MailJetConfigurationsIdOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * PUT /V1/mailJetConfigurations/{id} */ export const updateApiV1MailJetConfigurationsId = async (args: UpdateApiV1MailJetConfigurationsIdArgs, options: UpdateApiV1MailJetConfigurationsIdOptions) => { 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/mailJetConfigurations/${encodeURIComponent(String(args.id))}${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 };