diff --git a/platform/src/components/aws/apigateway-websocket-route.ts b/platform/src/components/aws/apigateway-websocket-route.ts index 4e36c7e30..930771067 100644 --- a/platform/src/components/aws/apigateway-websocket-route.ts +++ b/platform/src/components/aws/apigateway-websocket-route.ts @@ -1,13 +1,12 @@ import { ComponentResourceOptions, Input, - Output, all, interpolate, output, } from "@pulumi/pulumi"; import { Component, Transform, transform } from "../component"; -import { Function, FunctionArgs } from "./function"; +import { FunctionArgs } from "./function"; import { ApiGatewayWebSocketRouteArgs } from "./apigateway-websocket"; import { apigatewayv2, lambda } from "@pulumi/aws"; import { FunctionBuilder, functionBuilder } from "./helpers/function-builder"; diff --git a/platform/src/components/aws/apigateway-websocket.ts b/platform/src/components/aws/apigateway-websocket.ts index 1c1dcc73c..8bd615cff 100644 --- a/platform/src/components/aws/apigateway-websocket.ts +++ b/platform/src/components/aws/apigateway-websocket.ts @@ -531,7 +531,7 @@ export class ApiGatewayWebSocket extends Component implements Link.Linkable { */ public route( route: string, - handler: string | FunctionArgs | Input, + handler: Input, args: ApiGatewayWebSocketRouteArgs = {}, ) { const prefix = this.constructorName; diff --git a/platform/src/components/aws/apigatewayv1-lambda-route.ts b/platform/src/components/aws/apigatewayv1-lambda-route.ts index 3ceb438a4..d5a35fce7 100644 --- a/platform/src/components/aws/apigatewayv1-lambda-route.ts +++ b/platform/src/components/aws/apigatewayv1-lambda-route.ts @@ -6,7 +6,7 @@ import { output, } from "@pulumi/pulumi"; import { Component, Transform, transform } from "../component"; -import { Function, FunctionArgs } from "./function"; +import { FunctionArgs } from "./function"; import { apigateway, lambda } from "@pulumi/aws"; import { ApiGatewayV1BaseRouteArgs, diff --git a/platform/src/components/aws/apigatewayv1.ts b/platform/src/components/aws/apigatewayv1.ts index 6f9904532..970f911d2 100644 --- a/platform/src/components/aws/apigatewayv1.ts +++ b/platform/src/components/aws/apigatewayv1.ts @@ -829,7 +829,7 @@ export class ApiGatewayV1 extends Component implements Link.Linkable { */ public route( route: string, - handler: string | FunctionArgs | Input, + handler: Input, args: ApiGatewayV1RouteArgs = {}, ) { const { method, path } = this.parseRoute(route); diff --git a/platform/src/components/aws/apigatewayv2.ts b/platform/src/components/aws/apigatewayv2.ts index b1aae12f6..832bcea55 100644 --- a/platform/src/components/aws/apigatewayv2.ts +++ b/platform/src/components/aws/apigatewayv2.ts @@ -1025,7 +1025,7 @@ export class ApiGatewayV2 extends Component implements Link.Linkable { */ public route( rawRoute: string, - handler: string | FunctionArgs | Input, + handler: Input, args: ApiGatewayV2RouteArgs = {}, ) { const route = this.parseRoute(rawRoute); diff --git a/platform/src/components/aws/bucket.ts b/platform/src/components/aws/bucket.ts index 3c960a6d1..d0f101f66 100644 --- a/platform/src/components/aws/bucket.ts +++ b/platform/src/components/aws/bucket.ts @@ -644,7 +644,7 @@ export class Bucket extends Component implements Link.Linkable { * ``` */ public subscribe( - subscriber: string | FunctionArgs | Input, + subscriber: Input, args?: BucketSubscriberArgs, ) { this.ensureNotSubscribed(); @@ -707,7 +707,7 @@ export class Bucket extends Component implements Link.Linkable { */ public static subscribe( bucketArn: Input, - subscriber: string | FunctionArgs | Input, + subscriber: Input, args?: BucketSubscriberArgs, ) { return output(bucketArn).apply((bucketArn) => { @@ -726,7 +726,7 @@ export class Bucket extends Component implements Link.Linkable { name: string, bucketName: Input, bucketArn: Input, - subscriber: string | FunctionArgs | Input, + subscriber: Input, args: BucketSubscriberArgs = {}, opts: ComponentResourceOptions = {}, ) { diff --git a/platform/src/components/aws/bus.ts b/platform/src/components/aws/bus.ts index a1082ad93..8e2595107 100644 --- a/platform/src/components/aws/bus.ts +++ b/platform/src/components/aws/bus.ts @@ -254,7 +254,7 @@ export class Bus extends Component implements Link.Linkable { * ``` */ public subscribe( - subscriber: string | FunctionArgs | Input, + subscriber: Input, args: BusSubscriberArgs = {}, ) { return Bus._subscribeFunction( @@ -309,7 +309,7 @@ export class Bus extends Component implements Link.Linkable { */ public static subscribe( busArn: Input, - subscriber: string | FunctionArgs | Input, + subscriber: Input, args?: BusSubscriberArgs, ) { return output(busArn).apply((busArn) => { @@ -328,7 +328,7 @@ export class Bus extends Component implements Link.Linkable { name: string, busName: Input, busArn: string | Output, - subscriber: string | FunctionArgs | Input, + subscriber: Input, args: BusSubscriberArgs = {}, opts: ComponentResourceOptions = {}, ) { diff --git a/platform/src/components/aws/cognito-user-pool.ts b/platform/src/components/aws/cognito-user-pool.ts index d245c4883..7b211e23b 100644 --- a/platform/src/components/aws/cognito-user-pool.ts +++ b/platform/src/components/aws/cognito-user-pool.ts @@ -24,7 +24,7 @@ interface Triggers { * * Takes the handler path, the function args, or a function ARN. */ - createAuthChallenge?: string | FunctionArgs | Input; + createAuthChallenge?: Input; /** * Triggered during events like user sign-up, password recovery, email/phone number * verification, and when an admin creates a user. Use this trigger to customize the @@ -32,7 +32,7 @@ interface Triggers { * * Takes the handler path, the function args, or a function ARN. */ - customEmailSender?: string | FunctionArgs | Input; + customEmailSender?: Input; /** * Triggered during events like user sign-up, password recovery, email/phone number * verification, and when an admin creates a user. Use this trigger to customize the @@ -40,14 +40,14 @@ interface Triggers { * * Takes the handler path, the function args, or a function ARN. */ - customMessage?: string | FunctionArgs | Input; + customMessage?: Input; /** * Triggered when an SMS message needs to be sent, such as for MFA or verification codes. * Use this trigger to customize the SMS provider. * * Takes the handler path, the function args, or a function ARN. */ - customSmsSender?: string | FunctionArgs | Input; + customSmsSender?: Input; /** * Triggered after each challenge response to determine the next action. Evaluates whether the * user has completed the authentication process or if additional challenges are needed. @@ -55,14 +55,14 @@ interface Triggers { * * Takes the handler path, the function args, or a function ARN. */ - defineAuthChallenge?: string | FunctionArgs | Input; + defineAuthChallenge?: Input; /** * Triggered after a successful authentication event. Use this to perform custom actions, * such as logging or modifying user attributes, after the user is authenticated. * * Takes the handler path, the function args, or a function ARN. */ - postAuthentication?: string | FunctionArgs | Input; + postAuthentication?: Input; /** * Triggered after a user is successfully confirmed; sign-up or email/phone number * verification. Use this to perform additional actions, like sending a welcome email or @@ -70,7 +70,7 @@ interface Triggers { * * Takes the handler path, the function args, or a function ARN. */ - postConfirmation?: string | FunctionArgs | Input; + postConfirmation?: Input; /** * Triggered before the authentication process begins. Use this to implement custom * validation or checks (like checking if the user is banned) before continuing @@ -78,21 +78,21 @@ interface Triggers { * * Takes the handler path, the function args, or a function ARN. */ - preAuthentication?: string | FunctionArgs | Input; + preAuthentication?: Input; /** * Triggered before the user sign-up process completes. Use this to perform custom * validation, auto-confirm users, or auto-verify attributes based on custom logic. * * Takes the handler path, the function args, or a function ARN. */ - preSignUp?: string | FunctionArgs | Input; + preSignUp?: Input; /** * Triggered before tokens are generated in the authentication process. Use this to * customize or add claims to the tokens that will be generated and returned to the user. * * Takes the handler path, the function args, or a function ARN. */ - preTokenGeneration?: string | FunctionArgs | Input; + preTokenGeneration?: Input; /** * The version of the preTokenGeneration trigger to use. Higher versions have access to * more information that support new features. @@ -106,7 +106,7 @@ interface Triggers { * * Takes the handler path, the function args, or a function ARN. */ - userMigration?: string | FunctionArgs | Input; + userMigration?: Input; /** * Triggered after the user responds to a custom authentication challenge. Use this to * verify the user's response to the challenge and determine whether to continue @@ -114,7 +114,7 @@ interface Triggers { * * Takes the handler path, the function args, or a function ARN. */ - verifyAuthChallengeResponse?: string | FunctionArgs | Input; + verifyAuthChallengeResponse?: Input; } export interface CognitoUserPoolArgs { diff --git a/platform/src/components/aws/dynamo.ts b/platform/src/components/aws/dynamo.ts index 9f8bb891b..a843108ff 100644 --- a/platform/src/components/aws/dynamo.ts +++ b/platform/src/components/aws/dynamo.ts @@ -562,7 +562,7 @@ export class Dynamo extends Component implements Link.Linkable { * ``` */ public subscribe( - subscriber: string | FunctionArgs | Input, + subscriber: Input, args?: DynamoSubscriberArgs, ) { const sourceName = this.constructorName; @@ -632,7 +632,7 @@ export class Dynamo extends Component implements Link.Linkable { */ public static subscribe( streamArn: Input, - subscriber: string | FunctionArgs | Input, + subscriber: Input, args?: DynamoSubscriberArgs, ) { return output(streamArn).apply((streamArn) => @@ -648,7 +648,7 @@ export class Dynamo extends Component implements Link.Linkable { private static _subscribe( name: string, streamArn: string | Output, - subscriber: string | FunctionArgs | Input, + subscriber: Input, args: DynamoSubscriberArgs = {}, opts: ComponentResourceOptions = {}, ) { diff --git a/platform/src/components/aws/kinesis-stream.ts b/platform/src/components/aws/kinesis-stream.ts index 84719af1f..cd2cca895 100644 --- a/platform/src/components/aws/kinesis-stream.ts +++ b/platform/src/components/aws/kinesis-stream.ts @@ -195,7 +195,7 @@ export class KinesisStream extends Component implements Link.Linkable { * ``` */ public subscribe( - subscriber: string | FunctionArgs | Input, + subscriber: Input, args?: KinesisStreamLambdaSubscriberArgs, ) { return KinesisStream._subscribe( @@ -255,7 +255,7 @@ export class KinesisStream extends Component implements Link.Linkable { */ public static subscribe( streamArn: Input, - subscriber: string | FunctionArgs | Input, + subscriber: Input, args?: KinesisStreamLambdaSubscriberArgs, ) { return output(streamArn).apply((streamArn) => @@ -271,7 +271,7 @@ export class KinesisStream extends Component implements Link.Linkable { private static _subscribe( name: string, streamArn: Input, - subscriber: string | FunctionArgs | Input, + subscriber: Input, args: KinesisStreamLambdaSubscriberArgs = {}, opts: ComponentResourceOptions = {}, ) { diff --git a/platform/src/components/aws/queue.ts b/platform/src/components/aws/queue.ts index 5d0b32b22..ca0555a2a 100644 --- a/platform/src/components/aws/queue.ts +++ b/platform/src/components/aws/queue.ts @@ -472,7 +472,7 @@ export class Queue extends Component implements Link.Linkable { * ``` */ public subscribe( - subscriber: string | FunctionArgs | Input, + subscriber: Input, args?: QueueSubscriberArgs, opts?: ComponentResourceOptions, ) { @@ -537,7 +537,7 @@ export class Queue extends Component implements Link.Linkable { */ public static subscribe( queueArn: Input, - subscriber: string | FunctionArgs | Input, + subscriber: Input, args?: QueueSubscriberArgs, opts?: ComponentResourceOptions, ) { @@ -555,7 +555,7 @@ export class Queue extends Component implements Link.Linkable { private static _subscribeFunction( name: string, queueArn: Input, - subscriber: string | FunctionArgs | Input, + subscriber: Input, args: QueueSubscriberArgs = {}, opts?: ComponentResourceOptions, ) { diff --git a/platform/src/components/aws/realtime.ts b/platform/src/components/aws/realtime.ts index 9f28526dd..5024884b7 100644 --- a/platform/src/components/aws/realtime.ts +++ b/platform/src/components/aws/realtime.ts @@ -295,7 +295,7 @@ export class Realtime extends Component implements Link.Linkable { * ``` */ public subscribe( - subscriber: string | FunctionArgs | Input, + subscriber: Input, args: RealtimeSubscriberArgs, ) { return all([subscriber, args.filter]).apply(([subscriber, filter]) => { diff --git a/platform/src/components/aws/sns-topic.ts b/platform/src/components/aws/sns-topic.ts index 675c57360..ee986b064 100644 --- a/platform/src/components/aws/sns-topic.ts +++ b/platform/src/components/aws/sns-topic.ts @@ -253,7 +253,7 @@ export class SnsTopic extends Component implements Link.Linkable { * ``` */ public subscribe( - subscriber: string | FunctionArgs | Input, + subscriber: Input, args: SnsTopicSubscriberArgs = {}, ) { return SnsTopic._subscribeFunction( @@ -307,7 +307,7 @@ export class SnsTopic extends Component implements Link.Linkable { */ public static subscribe( topicArn: Input, - subscriber: string | FunctionArgs | Input, + subscriber: Input, args?: SnsTopicSubscriberArgs, ) { return output(topicArn).apply((topicArn) => @@ -323,7 +323,7 @@ export class SnsTopic extends Component implements Link.Linkable { private static _subscribeFunction( name: string, topicArn: string | Output, - subscriber: string | FunctionArgs | Input, + subscriber: Input, args: SnsTopicSubscriberArgs = {}, opts: $util.ComponentResourceOptions = {}, ) {