import { OAuthTokenResponse } from "./interfaces.js"; /** OAuth 2.0 authorization endpoint documented in the public OAuth guide. */ export declare const AUTHORIZATION_ENDPOINT = "https://app.companycam.com/oauth/authorize"; /** OAuth 2.0 token endpoint documented in the public OAuth guide. */ export declare const TOKEN_ENDPOINT = "https://app.companycam.com/oauth/token"; /** Default scopes requested when none are explicitly provided by the caller. */ export declare const DEFAULT_OAUTH_SCOPES: readonly ["read", "write", "destroy"]; /** All valid OAuth scopes. */ export type OAuthScope = "read" | "write" | "destroy"; /** * Build the authorization redirect URL that initiates the OAuth 2.0 authorization-code flow. * * @param clientId Identifier issued by CompanyCam for the external integration. * @param redirectUri URI that receives the authorization response. * @param scope Optional scope override; defaults to all documented scopes when omitted. * @returns Fully prepared authorization URL ready for browser redirection. */ export declare function buildAuthorizationGrantUrl(clientId: string, redirectUri: string, scope: readonly OAuthScope[] | OAuthScope): string; /** * Exchange an authorization code for access and refresh tokens by POSTing the documented * form-encoded payload directly to the OAuth token endpoint. * * @param clientId Identifier issued by CompanyCam for the external integration. * @param clientSecret Secret paired with the client identifier. * @param code Authorization code received from the authorization grant. * @param redirectUri Redirect URI used during the authorization grant. * @returns Promise that resolves with the OAuth token response body. */ export declare function getAccessToken(clientId: string, clientSecret: string, code: string, redirectUri: string): Promise; /** * Exchange a refresh token for a brand new access token directly against the OAuth * token endpoint. Each response includes a new refresh token when the server issues one. * * @param clientId Identifier issued by CompanyCam for the external integration. * @param clientSecret Secret paired with the client identifier. * @param refreshToken Refresh token obtained from a prior token exchange. * @returns Promise that resolves with the OAuth token response body. */ export declare function refreshAccessToken(clientId: string, clientSecret: string, refreshToken: string): Promise; //# sourceMappingURL=oauth.d.ts.map