import * as apigateway from 'aws-cdk-lib/aws-apigateway'; import * as lambda from 'aws-cdk-lib/aws-lambda'; import { Construct } from 'constructs'; import { TokenProviderTargetRule } from './target'; import { ITokenProvider, TokenProviderEndpoint } from './token-provider'; import { GitHubAppPermissions } from '../'; import { IGitHubApps } from '../apps'; export interface TokenProviderApiProps { /** * GitHub Apps configuration */ readonly apps: IGitHubApps; /** * Use this to provide the API Gateway RestApi configured to your requirements */ readonly api?: apigateway.RestApi; /** * Use this to provide the Lambda Function configured to your requirements */ readonly lambda?: lambda.Function; } export interface NewTokenProviderConfiguration { /** * Permissions */ readonly permissions: GitHubAppPermissions; /** * @default DEFAULT */ readonly endpoint?: TokenProviderEndpoint; /** * @default AT_LEAST_ONE */ readonly targetRule?: TokenProviderTargetRule; /** * @default default */ readonly app?: string; } export interface ITokenProviderApi { newTokenProvider(name: string, configuration: NewTokenProviderConfiguration): ITokenProvider; } export declare class TokenProviderApi extends Construct implements ITokenProviderApi { private readonly usedTokenProviderNames; private readonly tokenResponseModel; private readonly errorResponseModel; private readonly _lambda; private readonly _api; private readonly props; private readonly requestValidator; get lambdaFunction(): lambda.Function; get restApi(): apigateway.RestApi; constructor(scope: Construct, id: string, props: TokenProviderApiProps); newTokenProvider(name: string, configuration: NewTokenProviderConfiguration): ITokenProvider; }