export type BetConstructSSOCoreEnumsIPRuleType = 0 | 1; export type BetConstructSSOAuthAPIViewModelsUpdateViewModelAppUserUpdateViewModel = {email?: (string | null) | undefined, userName?: (string | null) | undefined, phoneNumber?: (string | null) | undefined, phoneNumberConfirmed?: boolean | undefined, givenName?: (string | null) | undefined, familyName?: (string | null) | undefined, birthDate?: (string | null) | undefined, receiveNews?: boolean | undefined, inAppNotifications?: boolean | undefined, phoneNotifications?: boolean | undefined, emailNotifications?: boolean | undefined, twoFactorEnabled?: boolean | undefined, isTwoFaUsedAfterReset?: boolean | undefined, emailConfirmed?: boolean | undefined, lockoutEnabled?: boolean | undefined, lockoutEnd?: (string | null) | undefined, lockFrom?: (string | null) | undefined, concurrencyStamp?: (string | null) | undefined, securityStamp?: (string | null) | undefined, ipRuleType?: BetConstructSSOCoreEnumsIPRuleType | undefined}; export type UpdateApiV1ManagementsUsersUserIdArgs = {userId: string, body: BetConstructSSOAuthAPIViewModelsUpdateViewModelAppUserUpdateViewModel}; export type UpdateApiV1ManagementsUsersUserIdOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * PUT /V1/managements/users/{userId} */ export const updateApiV1ManagementsUsersUserId = async (args: UpdateApiV1ManagementsUsersUserIdArgs, options: UpdateApiV1ManagementsUsersUserIdOptions) => { 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/managements/users/${encodeURIComponent(String(args.userId))}${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 };