export type BetConstructSSOAuthAPIViewModelsCreateViewModelsClientSecretCreateViewModel = {description?: (string | null) | undefined, value: string}; export type BetConstructSSOAuthAPIViewModelsCreateViewModelsClientGrantTypeCreateViewModel = {grantType: string}; export type BetConstructSSOAuthAPIViewModelsCreateViewModelsClientRedirectUriCreateViewModel = {redirectUri: string, isFullUri?: boolean | undefined}; export type BetConstructSSOAuthAPIViewModelsCreateViewModelsClientPostLogoutRedirectUriCreateViewModel = {postLogoutRedirectUri: string, isFullUri?: boolean | undefined}; export type BetConstructSSOAuthAPIViewModelsCreateViewModelsClientScopeCreateViewModel = {scope: string}; export type BetConstructSSOAuthAPIViewModelsCreateViewModelsClientDomainMappingCreationViewModel = {referer: string}; export type BetConstructSSOAuthAPIViewModelsCreateViewModelsClientCreationViewModel = {enabled: boolean, clientId: string, protocolType?: (string | null) | undefined, clientSecrets?: (Array | null) | undefined, requireClientSecret?: boolean | undefined, clientName: string, description?: (string | null) | undefined, clientUri?: (string | null) | undefined, logoUri?: (string | null) | undefined, requireConsent?: boolean | undefined, allowRememberConsent?: boolean | undefined, alwaysIncludeUserClaimsInIdToken?: boolean | undefined, allowedGrantTypes?: (Array | null) | undefined, requirePkce?: boolean | undefined, allowPlainTextPkce?: boolean | undefined, allowAccessTokensViaBrowser: boolean, redirectUris?: (Array | null) | undefined, postLogoutRedirectUris?: (Array | null) | undefined, frontChannelLogoutUri?: (string | null) | undefined, frontChannelLogoutSessionRequired?: boolean | undefined, backChannelLogoutUri?: (string | null) | undefined, backChannelLogoutSessionRequired?: boolean | undefined, allowOfflineAccess: boolean, allowedScopes?: (Array | null) | undefined, identityTokenLifetime?: number | undefined, accessTokenLifetime?: number | undefined, authorizationCodeLifetime?: number | undefined, consentLifetime?: (number | null) | undefined, absoluteRefreshTokenLifetime?: number | undefined, slidingRefreshTokenLifetime?: number | undefined, refreshTokenUsage?: number | undefined, updateAccessTokenClaimsOnRefresh?: boolean | undefined, refreshTokenExpiration?: number | undefined, accessTokenType?: number | undefined, enableLocalLogin?: boolean | undefined, includeJwtId?: boolean | undefined, alwaysSendClientClaims?: boolean | undefined, clientClaimsPrefix?: (string | null) | undefined, pairWiseSubjectSalt?: (string | null) | undefined, domainMappings?: (Array | null) | undefined, userSsoLifetime?: (number | null) | undefined, userCodeType?: (string | null) | undefined, deviceCodeLifetime?: number | undefined, nonEditable?: boolean | undefined}; export type CreateApiV1ClientsArgs = {body: BetConstructSSOAuthAPIViewModelsCreateViewModelsClientCreationViewModel}; export type CreateApiV1ClientsOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * POST /V1/Clients */ export const createApiV1Clients = async (args: CreateApiV1ClientsArgs, options: CreateApiV1ClientsOptions) => { 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/Clients${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", 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 };