export type NotificationDto = {provideType: 'LINK' | 'CSV', reportFreq?: ('DAILY' | 'WEEKLY' | 'MONTHLY') | undefined, reportDay?: ('MONDAY' | 'TUESDAY' | 'WEDNESDAY' | 'THURSDAY' | 'FRIDAY' | 'SATURDAY' | 'SUNDAY') | undefined, sendSummaryReport?: boolean | undefined, failureOnlyReport?: boolean | undefined}; export type ResellerUpdateDto = {resellerName: string, contactName?: string | undefined, countryCode: string, waiveSharedMailboxes?: boolean | undefined, notificationSettings?: NotificationDto | undefined}; export type UpdateApiV2DistributorsResellersResellerIdArgs = {resellerId: string, body: ResellerUpdateDto}; export type UpdateApiV2DistributorsResellersResellerIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * update reseller * * PUT /v2/distributors/resellers/{resellerId} */ export const updateApiV2DistributorsResellersResellerId = async (args: UpdateApiV2DistributorsResellersResellerIdArgs, options?: UpdateApiV2DistributorsResellersResellerIdOptions) => { const {baseUrl = "https://api.cloudally.com", 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(/\/+$/, '')}/v2/distributors/resellers/${encodeURIComponent(String(args.resellerId))}${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() };