import type { Configuration, authorizationCodeGrant } from 'openid-client'; import type { ConnectionType, OAuthErrorHandlerParams, SAMLSSOConnectionWithEncodedMetadata, SAMLSSOConnectionWithRawMetadata, OIDCSSOConnectionWithDiscoveryUrl, OIDCSSOConnectionWithMetadata, Profile, SAMLSSORecord, OIDCSSORecord, Directory } from '../typings'; import type { JWK, CryptoKey } from 'jose'; export declare const GENERIC_ERR_STRING = "Something wrong happened. Please contact your administrator."; export declare const dynamicImport: (packageName: string) => Promise; export declare enum IndexNames { EntityID = "entityID", TenantProduct = "tenantProduct", SSOClientID = "SSOClientID", Product = "product", Service = "service", SetupToken = "token", ProductService = "productService", TenantProductService = "tenantProductService" } export declare const storeNamespacePrefix: { dsync: { config: string; logs: string; users: string; groups: string; members: string; providers: string; events: string; lock: string; }; saml: { config: string; }; }; export declare const relayStatePrefix = "boxyhq_jackson_"; export declare const clientIDFederatedPrefix = "fed_"; export declare const clientIDOIDCPrefix = "oidc_"; export declare const validateAbsoluteUrl: (url: any, message: any) => void; export declare const OAuthErrorResponse: ({ error, error_description, redirect_uri, state, }: OAuthErrorHandlerParams) => string; export declare function getErrorMessage(error: unknown): string; export declare const createRandomSecret: (length: number) => Promise; export declare function loadJWSPrivateKey(key: string, alg: string): Promise; export declare function isJWSKeyPairLoaded(jwsKeyPair: { private: string; public: string; }): boolean; export declare const importJWTPublicKey: (key: string, jwsAlg: string) => Promise; export declare const exportPublicKeyJWK: (key: CryptoKey) => Promise; export declare const generateJwkThumbprint: (jwk: JWK) => Promise; export declare const computeKid: (key: string, jwsAlg: string) => Promise; export declare const validateSSOConnection: (body: SAMLSSOConnectionWithRawMetadata | SAMLSSOConnectionWithEncodedMetadata | OIDCSSOConnectionWithDiscoveryUrl | OIDCSSOConnectionWithMetadata, strategy: ConnectionType) => void; export declare const validateRedirectUrl: ({ redirectUrlList, defaultRedirectUrl }: { redirectUrlList: any; defaultRedirectUrl: any; }) => void; export declare const extractRedirectUrls: (urls: string[] | string) => string[]; export declare const extractHostName: (url: string) => string | null; export type AuthorizationCodeGrantResult = Awaited>; export declare const extractOIDCUserProfile: (tokens: AuthorizationCodeGrantResult, oidcConfig: Configuration, includeTokens?: boolean) => Promise<{ claims: Partial; }>; }>; export declare const getScopeValues: (scope?: string) => string[]; export declare const getEncodedTenantProduct: (param: string) => { tenant: string | null; product: string | null; } | null; export declare const validateTenantAndProduct: (tenant: string, product: string) => void; export declare const appID: (tenant: string, product: string) => string; export declare const fedAppID: (tenant: string, product: string, type?: string) => string; declare const wellKnownProviders: { readonly 'okta.com': "Okta"; readonly 'sts.windows.net': "Entra ID"; readonly 'mocksaml.com': "MockSAML"; readonly 'onelogin.com': "OneLogin"; readonly 'keycloak.com': "Keycloak"; readonly 'jumpcloud.com': "JumpCloud"; readonly 'google.com': "Google"; readonly 'auth0.com': "Auth0"; readonly 'pingone.com': "PingOne"; }; export declare const findFriendlyProviderName: (providerName: string) => keyof typeof wellKnownProviders | null; export declare const transformConnections: (connections: Array) => (SAMLSSORecord | OIDCSSORecord)[]; export declare const transformConnection: (connection: SAMLSSORecord | OIDCSSORecord) => SAMLSSORecord | OIDCSSORecord; export declare const isLocalhost: (url: string) => boolean; export declare const isHTTPS: (url: string, allowHttp?: boolean) => boolean; export declare function validateSSOURL(ssoUrl: string): void; export declare const isConnectionActive: (connection: SAMLSSORecord | OIDCSSORecord | Directory) => boolean; export declare const validateSortOrder: (sortOrder: unknown) => void; export {};