UNPKG

@design-sdk/figma-oauth

Version:
25 lines (24 loc) 1.04 kB
import { FigmaOAuthUrlParam, FigmaOAuthTokenRequestParam, FigmaOAuthTokenRefreshParam } from "./types"; /** * example: * * `https://www.figma.com/api/oauth/token?` * - `client_id=:client_id&` * - `client_secret=:client_secret&` * - `redirect_uri=:callback&` * - `code=:code&` * - `grant_type=authorization_code` * * will return : https://accounts.grida.co/callback/figma-app-oauth?code=K3p9uhqlntNDrbLe2HMPAFgwf&state= */ export declare function oauthBrowserUrl({ client_id, redirect_uri, state, scope, response_type, }: FigmaOAuthUrlParam): string; /** * */ export declare function oauthTokenRequestUrl({ client_id, client_secret, grant_type, redirect_uri, code, }: FigmaOAuthTokenRequestParam): string; export declare function oauthTokenRefreshUrl({ client_id, client_secret, refresh_token, }: FigmaOAuthTokenRefreshParam): string; export declare const urls: { oauth_token_request_url: typeof oauthTokenRequestUrl; oauth_token_refresh_url: typeof oauthTokenRefreshUrl; oauth_browser_url: typeof oauthBrowserUrl; };