export interface ConnectionListProps { children?: any; cols: ('provider' | 'tenant' | 'product' | 'type' | 'status' | 'actions')[]; tableCaption?: string; idpEntityID?: string; isSettingsView?: boolean; getConnectionsUrl: string; handleListFetchComplete?: (connections: ConnectionData[]) => void; handleActionClick: (action: 'edit', connection: ConnectionData) => void; /** * Classnames for each inner components that make up the component. */ classNames?: { container?: string; formControl?: string; tableContainer?: string; table?: string; tableCaption?: string; thead?: string; tr?: string; th?: string; connectionListContainer?: string; td?: string; tableData?: string; spanIcon?: string; icon?: string; }; } export interface CreateConnectionProps { errorCallback?: (errMessage: string) => void; successCallback?: () => void; cancelCallback?: () => void; variant?: 'basic' | 'advanced'; excludeFields?: Array; urls: { save: string; }; /** * Classnames for each inner components that make up the component. */ classNames?: { form?: string; container?: string; input?: string; radioContainer?: string; label?: string; fieldContainer?: string; }; /** Use this boolean to toggle the header display on/off. Useful when using the connection component standalone */ displayHeader?: boolean; } export interface CreateSSOConnectionProps { setupLinkToken?: string; idpEntityID?: string; /** * Classnames for each inner components that make up the component. */ classNames?: { container?: string; formControl?: string; selectSSO?: string; idpId?: string; radio?: string; span?: string; label?: string; }; componentProps: { saml: Partial; oidc: Partial; }; } export type ApiSuccess = { data: T; pageToken?: string; }; export interface ApiError extends Error { info?: string; status: number; } export type ApiResponse = ApiSuccess | { error: ApiError; }; type FormObjValues = string | boolean | string[]; export type FormObj = Record>; export interface MtlsEndpointAliases { token_endpoint?: string; userinfo_endpoint?: string; revocation_endpoint?: string; introspection_endpoint?: string; device_authorization_endpoint?: string; } export interface IssuerMetadata { issuer: string; authorization_endpoint?: string; token_endpoint?: string; jwks_uri?: string; userinfo_endpoint?: string; revocation_endpoint?: string; end_session_endpoint?: string; registration_endpoint?: string; token_endpoint_auth_methods_supported?: string[]; token_endpoint_auth_signing_alg_values_supported?: string[]; introspection_endpoint_auth_methods_supported?: string[]; introspection_endpoint_auth_signing_alg_values_supported?: string[]; revocation_endpoint_auth_methods_supported?: string[]; revocation_endpoint_auth_signing_alg_values_supported?: string[]; request_object_signing_alg_values_supported?: string[]; mtls_endpoint_aliases?: MtlsEndpointAliases; [key: string]: unknown; } interface SSOConnection { defaultRedirectUrl: string; redirectUrl: string[] | string; tenant: string; product: string; name?: string; description?: string; } export interface SAMLSSOConnection extends SSOConnection { forceAuthn?: boolean | string; rawMetadata?: string; metadataUrl?: string; } export interface OIDCSSOConnection extends SSOConnection { oidcDiscoveryUrl?: string; oidcMetadata?: IssuerMetadata; oidcClientId?: string; oidcClientSecret?: string; } export interface SAMLSSORecord extends SAMLSSOConnection { clientID: string; clientSecret: string; metadataUrl?: string; redirectUrl: string[]; idpMetadata: { entityID: string; loginType?: string; provider: string | 'Unknown'; friendlyProviderName: string | null; slo: { postUrl?: string; redirectUrl?: string; }; sso: { postUrl?: string; redirectUrl?: string; }; thumbprint?: string; validTo?: string; }; deactivated?: boolean; } export interface OIDCSSORecord extends SSOConnection { clientID: string; clientSecret: string; redirectUrl: string[]; oidcProvider: { provider?: string; discoveryUrl?: string; metadata?: IssuerMetadata; clientId?: string; clientSecret?: string; }; deactivated?: boolean; } export type ConnectionData = T & { isSystemSSO?: boolean; }; declare namespace classNames { type Value = string | number | boolean | undefined | null; type Mapping = Record; interface ArgumentArray extends Array { } type Argument = Value | Mapping | ArgumentArray; } /** * A simple JavaScript utility for conditionally joining classNames together. */ export declare function classNames(...args: classNames.ArgumentArray): string; export interface ToggleConnectionStatusProps { connection: SAMLSSORecord | OIDCSSORecord; urls: { patch: string; }; translation?: any; errorCallback: (errMsg: string) => void; successCallback: (successMsg: string) => void; classNames?: { container?: string; heading?: string; toggle?: string; toggleTransition?: string; displayMessage?: string; confirmBtn?: string; cancelBtn?: string; }; } export interface EditConnectionProps { connection: SAMLSSORecord | OIDCSSORecord; editConnectionUrls: { save: string; delete: string; }; toggleConnectionUrls: { save: string; }; translation?: any; errorCallback: (errMsg: string) => void; successCallback: (successMsg: string) => void; } export interface EditOIDCConnectionProps { connection: OIDCSSORecord; variant: 'basic' | 'advanced'; excludeFields?: Array; errorCallback: (errMessage: string) => void; successCallback: () => void; cancelCallback?: () => void; copyDoneCallback: () => void; urls: { delete: string; patch: string; }; classNames?: { container?: string; formDiv?: string; fieldsContainer?: string; fieldsDiv?: string; label?: string; input?: string; section?: string; }; } export interface EditSAMLConnectionProps { connection: SAMLSSORecord; variant: 'basic' | 'advanced'; excludeFields?: Array; errorCallback: (errMessage: string) => void; successCallback: () => void; cancelCallback?: () => void; copyDoneCallback: () => void; urls: { delete: string; patch: string; }; classNames?: { formDiv?: string; label?: string; input?: string; section?: string; }; } export interface ConnectionsWrapperProp { classNames?: { button?: string; }; copyDoneCallback: () => void; componentProps: { connectionList: Omit; createSSOConnection: Partial; editOIDCConnection: Partial; editSAMLConnection: Partial; }; urls?: { spMetadata?: string; }; } export {};