Skip to content

Latest commit

 

History

History
117 lines (101 loc) · 3.54 KB

File metadata and controls

117 lines (101 loc) · 3.54 KB

API Report File for "@codemonger-io/cdk-rest-api-with-spec"

Do not edit this file. It is a report generated by API Extractor.

import { aws_apigateway } from 'aws-cdk-lib';
import { BaseParameterObject } from 'openapi3-ts';
import { Construct } from 'constructs';
import { InfoObject } from 'openapi3-ts';
import { SecuritySchemeObject } from 'openapi3-ts';

// @beta
export function augmentAuthorizer(authorizer: aws_apigateway.IAuthorizer, securitySchemeObject: SecuritySchemeObject): IAuthorizerWithSpec;

// @beta
export interface IAuthorizerWithSpec extends aws_apigateway.IAuthorizer {
    securitySchemeObject?: SecuritySchemeObject;
}

// @beta
export interface IResourceWithSpec extends aws_apigateway.Resource {
    addMethod(httpMethod: string, target?: aws_apigateway.Integration, options?: MethodOptionsWithSpec): aws_apigateway.Method;
    addResource(pathPart: string, options?: ResourceOptionsWithSpec): IResourceWithSpec;
    defaultMethodOptions?: MethodOptionsWithSpec;
    parentResource?: IResourceWithSpec;
}

// @beta
export interface IRestApiWithSpec extends aws_apigateway.IRestApi {
    addModel(id: string, props: ModelOptionsWithSpec): aws_apigateway.Model;
    readonly root: IResourceWithSpec;
}

// @beta
export interface JsonSchemaEx extends aws_apigateway.JsonSchema {
    additionalItems?: boolean | JsonSchemaEx;
    additionalProperties?: boolean | JsonSchemaEx;
    allOf?: JsonSchemaEx[];
    anyOf?: JsonSchemaEx[];
    contains?: JsonSchemaEx | JsonSchemaEx[];
    definitions?: {
        [k: string]: JsonSchemaEx;
    };
    dependencies?: {
        [k: string]: JsonSchemaEx | string[];
    };
    example?: any;
    items?: JsonSchemaEx | JsonSchemaEx[];
    modelRef?: aws_apigateway.IModel;
    not?: JsonSchemaEx;
    oneOf?: JsonSchemaEx[];
    patternProperties?: {
        [k: string]: JsonSchemaEx;
    };
    properties?: {
        [k: string]: JsonSchemaEx;
    };
    propertyNames?: JsonSchemaEx;
}

// @beta
export interface MethodOptionsWithSpec extends aws_apigateway.MethodOptions {
    authorizer?: IAuthorizerWithSpec;
    description?: string;
    methodResponses?: MethodResponseWithSpec[];
    requestParameterSchemas?: {
        [key: string]: BaseParameterObject;
    };
    summary?: string;
}

// @beta
export interface MethodResponseWithSpec extends aws_apigateway.MethodResponse {
    description?: string;
}

// @beta
export interface ModelOptionsWithSpec extends aws_apigateway.ModelOptions {
    schema: JsonSchemaEx;
}

// @beta
export class ParameterKey {
    constructor(
    direction: 'request' | 'response',
    name: string,
    location: 'path' | 'query' | 'header',
    explode: boolean);
    readonly direction: 'request' | 'response';
    readonly explode: boolean;
    readonly location: 'path' | 'query' | 'header';
    readonly name: string;
    static parseParameterKey(key: string): ParameterKey;
}

// @beta
export interface ResourceOptionsWithSpec extends aws_apigateway.ResourceOptions {
    defaultMethodOptions?: MethodOptionsWithSpec;
}

// @beta
export class RestApiWithSpec extends aws_apigateway.RestApi implements IRestApiWithSpec {
    constructor(scope: Construct, id: string, props: RestApiWithSpecProps);
    addModel(id: string, props: ModelOptionsWithSpec): aws_apigateway.Model;
    // (undocumented)
    readonly props: RestApiWithSpecProps;
    readonly root: IResourceWithSpec;
}

// @beta
export interface RestApiWithSpecProps extends aws_apigateway.RestApiProps {
    openApiInfo: Partial<InfoObject> & Pick<InfoObject, 'version'>;
    openApiOutputPath: string;
}