export type PendyUserComunityDTO = {activated?: boolean | undefined, comunityType: 'PENY_PAY' | 'PENDY_SHOP' | 'AYRIA', createdDate?: string | undefined, faveriteContact?: boolean | undefined, id?: number | undefined, mobile: string, name?: string | undefined, userId?: number | undefined, userLogin?: string | undefined}; export type UpdateApiApiPendyUserComunitiesArgs = {body: PendyUserComunityDTO}; export type UpdateApiApiPendyUserComunitiesOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * updatePendyUserComunity * * PUT /api/pendy-user-comunities */ export const updateApiApiPendyUserComunities = async (args: UpdateApiApiPendyUserComunitiesArgs, options: UpdateApiApiPendyUserComunitiesOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") headers.set('accept', "*/*") const url = `${baseUrl.replace(/\/+$/, '')}/api/pendy-user-comunities${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 res.blob() };