import { AwsLambdaLayers, AwsCfFunction, AwsCfIf, AwsArn, AwsCfInstruction, AwsArnString, FunctionName, AwsSecretsManagerArnString, FilterPatterns, AwsKmsArn, AwsAlbListenerArn, AwsCfRef, AwsAlexaEventToken, AwsLogGroupName, AwsCfImport, AwsLambdaArchitecture, AwsResourceCondition, AwsResourceDependsOn, AwsLambdaEnvironment, AwsCfGetAtt, AwsCfJoin, EcrImageUri, AwsLogRetentionInDays, AwsLogDataProtectionPolicy, AwsLambdaMemorySize, AwsLambdaRole, AwsLambdaRuntime, AwsLambdaRuntimeManagement, AwsResourceTags, AwsLambdaTimeout, AwsLambdaTracing, AwsLambdaVersioning, AwsLambdaVpcConfig, AwsHttpApiPayload } from '@serverless/typescript'; type Layers = AwsLambdaLayers; type BaseEvent = { __schemaWorkaround__?: null; }; type ScheduleInput = string | { body: string; } | { [k: string]: unknown; }; type ScheduleConfig = { rate: (AwsCfFunction | string)[]; enabled?: boolean; name?: string; description?: string; input?: ScheduleInput; inputPath?: string; inputTransformer?: { inputTemplate: string; inputPathsMap?: Record; }; method?: "eventBus" | "scheduler"; timezone?: string; }; type ScheduleEvent = { schedule: string | ScheduleConfig; }; type S3Event = { s3: string | { bucket: string | AwsCfFunction | AwsCfIf; event?: string; existing?: boolean; forceDeploy?: boolean; rules?: { prefix?: string | AwsCfFunction; suffix?: string | AwsCfFunction; }[]; }; }; type HttpMethod = "GET" | "POST" | "PUT" | "PATCH" | "OPTIONS" | "HEAD" | "DELETE" | "ANY"; type HttpCors = { allowCredentials?: boolean; cacheControl?: string; headers?: string[]; maxAge?: number; methods?: HttpMethod[]; origin?: string; origins?: string[]; }; type HttpAuthorizer = { arn?: AwsArn; authorizerId?: AwsCfInstruction; claims?: string[]; identitySource?: string; identityValidationExpression?: string; managedExternally?: boolean; name?: string; resultTtlInSeconds?: number; scopes?: (string | AwsCfInstruction)[]; type?: string; }; type HttpEvent = { http: string | { async?: boolean; authorizer?: string | HttpAuthorizer; connectionId?: AwsCfInstruction; connectionType?: string; cors?: boolean | HttpCors; integration?: string; method: string; operationId?: string; path: string; private?: boolean; request?: { contentHandling?: "CONVERT_TO_BINARY" | "CONVERT_TO_TEXT"; method?: string; parameters?: { querystrings?: Record; headers?: Record; paths?: Record; }; passThrough?: "NEVER" | "WHEN_NO_MATCH" | "WHEN_NO_TEMPLATES"; schemas?: Record | string>; template?: Record; uri?: AwsCfInstruction; }; response?: { contentHandling?: "CONVERT_TO_BINARY" | "CONVERT_TO_TEXT"; headers?: Record; template?: string; statusCodes?: Record; pattern?: string; template?: string | Record; }>; }; }; }; type WebSocketEvent = { websocket: string | { route: string; routeResponseSelectionExpression?: "$default"; authorizer?: AwsArnString | FunctionName | Record; }; }; type SnsEvent = { sns: string | AwsArnString | Record; }; type StreamEvent = { stream: AwsArnString | { arn: AwsCfFunction | AwsArnString; [k: string]: unknown; }; }; type KafkaEvent = { kafka: { accessConfigurations: { vpcSubnet?: string[]; vpcSecurityGroup?: string[]; saslPlainAuth?: AwsSecretsManagerArnString[]; saslScram256Auth?: AwsSecretsManagerArnString[]; saslScram512Auth?: AwsSecretsManagerArnString[]; clientCertificateTlsAuth?: AwsSecretsManagerArnString[]; serverRootCaCertificate?: AwsSecretsManagerArnString[]; }; batchSize?: number; maximumBatchingWindow?: number; enabled?: boolean; bootstrapServers: string[]; startingPosition?: "LATEST" | "TRIM_HORIZON" | "AT_TIMESTAMP"; startingPositionTimestamp?: number; topic: string; consumerGroupId?: string; filterPatterns?: FilterPatterns; }; }; type CognitoTrigger = "PreSignUp" | "PostConfirmation" | "PreAuthentication" | "PostAuthentication" | "PreTokenGeneration" | "CustomMessage" | "DefineAuthChallenge" | "CreateAuthChallenge" | "VerifyAuthChallengeResponse" | "UserMigration" | "CustomSMSSender" | "CustomEmailSender"; type CognitoUserPoolEvent = { cognitoUserPool: { pool: string; trigger: CognitoTrigger; existing?: boolean; forceDeploy?: boolean; kmsKeyId?: AwsKmsArn; }; }; type SqsEvent = { sqs: AwsArnString | { arn: AwsArn; batchSize?: number; enabled?: boolean; maximumBatchingWindow?: number; functionResponseType?: "ReportBatchItemFailures"; filterPatterns?: FilterPatterns; maximumConcurrency?: number; }; }; type AlbEvent = { alb: { authorizer?: string[]; conditions: { header?: { name: string; values: string[]; }[] | { name: string; values: string[]; }; host?: string[]; ip?: string[]; method?: string[]; path?: string[]; query?: Record; }; healthCheck?: boolean | { healthyThresholdCount?: number; intervalSeconds?: number; matcher?: { httpCode?: string; }; path?: string; timeoutSeconds?: number; unhealthyThresholdCount?: number; }; listenerArn: AwsAlbListenerArn | AwsCfRef; multiValueHeaders?: boolean; priority: number; targetGroupName?: string; }; }; type AlexaSkillEvent = { alexaSkill: AwsAlexaEventToken | { appId: AwsAlexaEventToken; enabled?: boolean; }; }; type CloudWatchLogEvent = { cloudwatchLog: AwsLogGroupName | { logGroup: AwsLogGroupName; filter?: string; }; }; type ActiveMQEvent = { activemq: { arn: string | AwsCfImport | AwsCfRef; basicAuthArn: AwsSecretsManagerArnString | AwsCfImport | AwsCfRef; batchSize?: number; maximumBatchingWindow?: number; enabled?: boolean; queue: string; filterPatterns?: FilterPatterns; }; }; type RabbitMQEvent = { rabbitmq: { arn: string | AwsCfImport | AwsCfRef; basicAuthArn: AwsSecretsManagerArnString | AwsCfImport | AwsCfRef; batchSize?: number; maximumBatchingWindow?: number; enabled?: boolean; queue: string; virtualHost?: string; filterPatterns?: FilterPatterns; }; }; type MSKEvent = { msk: { arn: AwsArnString | AwsCfImport | AwsCfRef; batchSize?: number; maximumBatchingWindow?: number; enabled?: boolean; startingPosition?: "LATEST" | "TRIM_HORIZON" | "AT_TIMESTAMP"; startingPositionTimestamp?: number; topic: string; saslScram512?: AwsArnString; consumerGroupId?: string; filterPatterns?: FilterPatterns; }; }; type Events = (BaseEvent | ScheduleEvent | S3Event | HttpEvent | WebSocketEvent | SnsEvent | StreamEvent | KafkaEvent | CognitoUserPoolEvent | SqsEvent | AlbEvent | AlexaSkillEvent | CloudWatchLogEvent | ActiveMQEvent | RabbitMQEvent | MSKEvent)[]; type HttpRouteConfig = { name: string; events: Events; layers?: Layers; architecture?: AwsLambdaArchitecture; awsKmsKeyArn?: AwsKmsArn; condition?: AwsResourceCondition; dependsOn?: AwsResourceDependsOn; description?: string; destinations?: { onSuccess?: string | { arn: AwsCfFunction; type: "function" | "sns" | "sqs" | "eventBus"; }; onFailure?: string | { arn: AwsCfFunction; type: "function" | "sns" | "sqs" | "eventBus"; }; }; disableLogs?: boolean; environment?: AwsLambdaEnvironment; ephemeralStorageSize?: number; fileSystemConfig?: { arn: string | AwsCfGetAtt | AwsCfJoin | AwsCfImport; localMountPath: string; }; handler?: string; image?: EcrImageUri | { name?: string; uri?: EcrImageUri; workingDirectory?: string; command?: string[]; entryPoint?: string[]; }; kmsKeyArn?: AwsKmsArn; snapStart?: boolean; logRetentionInDays?: AwsLogRetentionInDays; logDataProtectionPolicy?: AwsLogDataProtectionPolicy; maximumEventAge?: number; maximumRetryAttempts?: number; memorySize?: AwsLambdaMemorySize; onError?: string | AwsCfFunction; package?: { artifact?: string; exclude?: string[]; include?: string[]; individually?: boolean; patterns?: string[]; }; provisionedConcurrency?: number | AwsCfFunction | AwsCfIf; reservedConcurrency?: number | AwsCfFunction | AwsCfIf; role?: AwsLambdaRole; runtime?: AwsLambdaRuntime; runtimeManagement?: AwsLambdaRuntimeManagement; tags?: AwsResourceTags; timeout?: AwsLambdaTimeout; tracing?: AwsLambdaTracing; url?: boolean | { authorizer?: "aws_iam"; cors?: boolean | { allowCredentials?: boolean; allowedHeaders?: string[]; allowedMethods?: string[]; allowedOrigins?: string[]; exposedResponseHeaders?: string[]; maxAge?: number; }; invokeMode?: "BUFFERED" | "RESPONSE_STREAM"; }; versionFunction?: AwsLambdaVersioning; vpc?: AwsLambdaVpcConfig; httpApi?: { payload?: AwsHttpApiPayload; }; }; export type { ActiveMQEvent, AlbEvent, AlexaSkillEvent, BaseEvent, CloudWatchLogEvent, CognitoTrigger, CognitoUserPoolEvent, Events, HttpAuthorizer, HttpCors, HttpEvent, HttpMethod, HttpRouteConfig, KafkaEvent, Layers, MSKEvent, RabbitMQEvent, S3Event, ScheduleConfig, ScheduleEvent, ScheduleInput, SnsEvent, SqsEvent, StreamEvent, WebSocketEvent };