import { URLSearchParams } from 'url'; import { AptlyAppAuthorizeCode, AptlyAppAuthorizeToken, AptlyAppScope } from '@aptly-as/types'; import { AptlyApiOAuth2Response } from './aptly/AptlyApi.js'; import AptlyCrypto from './AptlyCrypto.js'; export interface IAptlyAppRedirectSuccessProps { code: string; redirect_uri: string; } export interface IAptlyOAuth2Props { authorizeCallbackPath?: string; installCallbackPath?: string; } export declare class AptlyOAuth2 { private APTLY_API_URL; private APP_API_URL; private client_id; private client_secret; private scope; private props; readonly header_organization = "x-aptly-organization"; readonly header_body_hmac = "x-aptly-body-sha256"; readonly crypto: AptlyCrypto; constructor(APTLY_API_URL: string, APP_API_URL: string, client_id: string, client_secret: string, scope: AptlyAppScope[], props?: IAptlyOAuth2Props); get url(): string; get authorizeCallbackPath(): string; get installCallbackPath(): string; getInstallCallbackRedirect(callback_uri: string): string; verifyInstallCallback(url: string, query: URLSearchParams | string | Record> | Iterable<[string, string]> | ReadonlyArray<[string, string]> | NodeJS.Dict): IAptlyAppRedirectSuccessProps; installAppCode(code: string): Promise; authorizeAppCode(code: string): Promise; getAuthorizeRedirect(organization: string, path: string): string; getReinstallRedirect(organization: string): string; validateAuthorizeCode(code: string): AptlyAppAuthorizeCode; verifyToken(token: string): AptlyAppAuthorizeToken; decodeToken(token: string): AptlyAppAuthorizeToken; refreshAppToken(refresh_token: string): Promise; verifyBasicAuthorization(authorization: string): string; verifyHmac(hmac: string, bodyOrQuery: object): void; private getRedirectParams; private basicAuth; }