export type SystemTimeSpan = {ticks?: number | undefined, days?: number | undefined, hours?: number | undefined, milliseconds?: number | undefined, minutes?: number | undefined, seconds?: number | undefined, totalDays?: number | undefined, totalHours?: number | undefined, totalMilliseconds?: number | undefined, totalMinutes?: number | undefined, totalSeconds?: number | undefined}; export type BetConstructSSOAuthAPIViewModelsCreateViewModelsAuthPolicyCreationViewModel = {passwordMaximumAge?: SystemTimeSpan | undefined, requiredLength: number, requiredUniqueChars: number, requireNonAlphanumeric: boolean, requireLowercase: boolean, requireUppercase: boolean, requireDigit: boolean, maxFailedAccessAttempts: number, defaultLockoutTimeSpan: SystemTimeSpan, name: string, reusePasswordAfterChangeCount?: number | undefined}; export type UpdateApiV1ManagementsAuthPoliciesIdArgs = {id: number, body: BetConstructSSOAuthAPIViewModelsCreateViewModelsAuthPolicyCreationViewModel}; export type UpdateApiV1ManagementsAuthPoliciesIdOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * PUT /V1/managements/authPolicies/{id} */ export const updateApiV1ManagementsAuthPoliciesId = async (args: UpdateApiV1ManagementsAuthPoliciesIdArgs, options: UpdateApiV1ManagementsAuthPoliciesIdOptions) => { 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/authPolicies/${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 };