/** * Context functions for AWS API Gateway VTL templates ($context.*) * Matches the behavior of the Java implementation */ /** * Client certificate validity context */ declare class ValidityContext { getNotBefore(): string; getNotAfter(): string; } /** * Client certificate context */ declare class ClientCertContext { getClientCertPem(): string; getSubjectDN(): string; getIssuerDN(): string; getSerialNumber(): string; getValidity(): ValidityContext; } /** * Identity context ($context.identity.*) */ declare class IdentityContext { private context; constructor(context: Record); private getIdentityMap; getAccountId(): string; getApiKey(): string | null; getApiKeyId(): string | null; getCaller(): string; getCognitoAuthenticationProvider(): string; getCognitoAuthenticationType(): string; getCognitoIdentityId(): string; getCognitoIdentityPoolId(): string; getPrincipalOrgId(): string; getSourceIp(): string; getUser(): string; getUserAgent(): string; getUserArn(): string; getVpcId(): string; getVpceId(): string; getClientCert(): ClientCertContext; } /** * Authorizer context ($context.authorizer.*) */ declare class AuthorizerContext { private context; constructor(context: Record); getPrincipalId(): string; getClaims(): null; get(property: string): string | null; } /** * Error context ($context.error.*) */ declare class ErrorContext { getMessage(): string; getMessageString(): string; getResponseType(): string; getValidationErrorString(): string; } /** * Request override header context */ declare class RequestOverrideHeaderContext { get(headerName: string): string | null; } /** * Request override path context */ declare class RequestOverridePathContext { get(pathName: string): string | null; } /** * Request override querystring context */ declare class RequestOverrideQuerystringContext { get(querystringName: string): string | null; } /** * Request override context ($context.requestOverride.*) */ declare class RequestOverrideContext { getHeader(): RequestOverrideHeaderContext; getPath(): RequestOverridePathContext; getQuerystring(): RequestOverrideQuerystringContext; } /** * Response override header context */ declare class ResponseOverrideHeaderContext { get(headerName: string): string | null; } /** * Response override context ($context.responseOverride.*) */ declare class ResponseOverrideContext { getStatus(): string; getHeader(): ResponseOverrideHeaderContext; } /** * Main context functions class */ export declare class ContextFunctions { private context; constructor(context: Record); getAccountId(): string; getApiId(): string; getRequestId(): string; getExtendedRequestId(): string; getAwsEndpointRequestId(): string; getHttpMethod(): string; getStage(): string; getDeploymentId(): string; getDomainName(): string; getDomainPrefix(): string; getPath(): string; getProtocol(): string; getResourceId(): string; getResourcePath(): string; getRequestTime(): string; getRequestTimeEpoch(): number; getIsCanaryRequest(): boolean; getWafResponseCode(): string; getWebaclArn(): string; getIdentity(): IdentityContext; getAuthorizer(): AuthorizerContext; getError(): ErrorContext; getRequestOverride(): RequestOverrideContext; getResponseOverride(): ResponseOverrideContext; } export {}; //# sourceMappingURL=ContextFunctions.d.ts.map