Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

Commit

Permalink
Merge pull request #308 from exoego/apply
Browse files Browse the repository at this point in the history
Re-implement apply method part2
  • Loading branch information
exoego authored Dec 23, 2021
2 parents d299ab2 + 2fbe8e5 commit 4d99e19
Show file tree
Hide file tree
Showing 35 changed files with 2,695 additions and 610 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package object literal {
type S3BatchResultResultCode = String

type MSKRecordTimestampType = String
type MSKEventEventType = String
type MSKEventEventType = "aws:kafka"

type LexEventCurrentIntentConfirmationStatus = String
type LexEventInvocationSource = String
Expand All @@ -17,4 +17,41 @@ package object literal {
type LexDialogActionCloseFulfillmentState = String

type FirehoseRecordTransformationStatus = String

type ConnectContactFlowChannel = String
type ConnectContactFlowInitiationMethod = String
type ConnectContactFlowEndpointType = "TELEPHONE_NUMBER"

type CognitoUserPoolChallengeName = String
type CognitoUserPoolUserStatus = String

type CloudFrontCustomOriginProtocol = String
type CloudFrontS3OriginAuthMethod = String
type CloudFrontRequestBodyAction = String
type CloudFrontRequestEncoding = String
type CloudFrontEventType = String

type CodeBuildStateType = String
type CodeBuildPhaseType = String
type CodeBuildPhaseStatusType = String
type CodeBuildCacheType = String
type CodeBuildSourceLocationType = String
type CodeBuildEnvironmentType = String
type CodeBuildEnvironmentPullCredentialsType = String
type CodeBuildEnvironmentComputeType = String
type CodeBuildEnvironmentVariableType = String

type CodePipelineActionCategory = String
type CodePipelineActionState = String
type CodePipelineCloudWatchActionDetailType = "CodePipeline Action Execution State Change"
type CodePipelineCloudWatchActionSource = "aws.codepipeline"
type CodePipelineCloudWatchActionDetailTypeOwner = String

type CodePipelineState = String
type CodePipelineCloudWatchPipelineDetailType = "CodePipeline Pipeline Execution State Change"
type CodePipelineCloudWatchPipelineSource = "aws.codepipeline"

type CodePipelineStageState = String
type CodePipelineCloudWatchStageDetailType = "CodePipeline Stage Execution State Change"
type CodePipelineCloudWatchStageSource = "aws.codepipeline"
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,47 @@ package object literal {
type LexDialogActionCloseFulfillmentState = "Fulfilled" | "Failed"

type FirehoseRecordTransformationStatus = "Ok" | "Dropped" | "ProcessingFailed"

type ConnectContactFlowChannel = "VOICE" | "CHAT"
type ConnectContactFlowInitiationMethod = "INBOUND" | "OUTBOUND" | "TRANSFER" | "CALLBACK" | "API"
type ConnectContactFlowEndpointType = "TELEPHONE_NUMBER"

type CognitoUserPoolChallengeName =
"PASSWORD_VERIFIER" | "SMS_MFA" | "DEVICE_SRP_AUTH" | "DEVICE_PASSWORD_VERIFIER" | "ADMIN_NO_SRP_AUTH" | "SRP_A"
type CognitoUserPoolUserStatus =
"UNCONFIRMED" | "CONFIRMED" | "ARCHIVED" | "COMPROMISED" | "UNKNOWN" | "RESET_REQUIRED" | "FORCE_CHANGE_PASSWORD"

type CloudFrontCustomOriginProtocol = "http" | "https"
type CloudFrontS3OriginAuthMethod = "origin-access-identity" | "none"
type CloudFrontRequestBodyAction = "read-only" | "replace"
type CloudFrontRequestEncoding = "base64" | "text"
type CloudFrontEventType = "origin-request" | "origin-response" | "viewer-request" | "viewer-response"

type CodeBuildStateType = "IN_PROGRESS" | "SUCCEEDED" | "FAILED" | "STOPPED"
type CodeBuildPhaseType =
"COMPLETED" | "FINALIZING" | "UPLOAD_ARTIFACTS" | "POST_BUILD" | "BUILD" | "PRE_BUILD" | "INSTALL" | "QUEUED" | "DOWNLOAD_SOURCE" | "PROVISIONING" | "SUBMITTED"
type CodeBuildPhaseStatusType = "TIMED_OUT" | "STOPPED" | "FAILED" | "SUCCEEDED" | "FAULT" | "CLIENT_ERROR"
type CodeBuildCacheType = "NO_CACHE" | "LOCAL" | "S3"
type CodeBuildSourceLocationType =
"CODECOMMIT" | "CODEPIPELINE" | "GITHUB" | "GITHUB_ENTERPRISE" | "BITBUCKET" | "S3" | "NO_SOURCE"
type CodeBuildEnvironmentType = "LINUX_CONTAINER" | "LINUX_GPU_CONTAINER" | "WINDOWS_CONTAINER" | "ARM_CONTAINER"
type CodeBuildEnvironmentPullCredentialsType = "CODEBUILD" | "SERVICE_ROLE"
type CodeBuildEnvironmentComputeType =
"BUILD_GENERAL1_SMALL" | "BUILD_GENERAL1_MEDIUM" | "BUILD_GENERAL1_LARGE" | "BUILD_GENERAL1_2XLARGE"
type CodeBuildEnvironmentVariableType = "PARAMETER_STORE" | "PLAINTEXT" | "SECRETS_MANAGER"

type CodePipelineActionCategory = "Approval" | "Build" | "Deploy" | "Invoke" | "Source" | "Test"
type CodePipelineActionState = "STARTED" | "SUCCEEDED" | "FAILED" | "CANCELED"
type CodePipelineCloudWatchActionDetailType = "CodePipeline Action Execution State Change"
type CodePipelineCloudWatchActionSource = "aws.codepipeline"
type CodePipelineCloudWatchActionDetailTypeOwner = "AWS" | "Custom" | "ThirdParty"

type CodePipelineState = "STARTED" | "SUCCEEDED" | "RESUMED" | "FAILED" | "CANCELED" | "SUPERSEDED"
type CodePipelineCloudWatchPipelineDetailType = "CodePipeline Pipeline Execution State Change"
type CodePipelineCloudWatchPipelineSource = "aws.codepipeline"

type CodePipelineStageState = "STARTED" | "SUCCEEDED" | "RESUMED" | "FAILED" | "CANCELED"
type CodePipelineCloudWatchStageDetailType = "CodePipeline Stage Execution State Change"
type CodePipelineCloudWatchStageSource = "aws.codepipeline"

}
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,23 @@ import scala.scalajs.js
import scala.scalajs.js.|

@js.native
trait APIGatewayTokenAuthorizerEvent extends js.Object {
var `type`: String = js.native
trait BaseAPIGatewayAuthorizerEvent[T <: String] extends js.Object {
var `type`: T = js.native
var methodArn: String = js.native
}

@js.native
trait APIGatewayTokenAuthorizerEvent extends BaseAPIGatewayAuthorizerEvent["TOKEN"] {
var authorizationToken: String = js.native
}

object APIGatewayTokenAuthorizerEvent {
def apply(
`type`: String,
methodArn: String,
authorizationToken: String
): APIGatewayTokenAuthorizerEvent = {
val _obj$ = js.Dynamic.literal(
"type" -> `type`.asInstanceOf[js.Any],
"type" -> "TOKEN",
"methodArn" -> methodArn.asInstanceOf[js.Any],
"authorizationToken" -> authorizationToken.asInstanceOf[js.Any]
)
Expand All @@ -26,9 +29,7 @@ object APIGatewayTokenAuthorizerEvent {
}

@js.native
trait APIGatewayRequestAuthorizerEvent extends js.Object {
var `type`: String = js.native
var methodArn: String = js.native
trait APIGatewayRequestAuthorizerEvent extends BaseAPIGatewayAuthorizerEvent["REQUEST"] {
var resource: String = js.native
var path: String = js.native
var httpMethod: String = js.native
Expand All @@ -43,7 +44,6 @@ trait APIGatewayRequestAuthorizerEvent extends js.Object {

object APIGatewayRequestAuthorizerEvent {
def apply(
`type`: String,
methodArn: String,
resource: String,
path: String,
Expand All @@ -57,7 +57,7 @@ object APIGatewayRequestAuthorizerEvent {
stageVariables: js.Dictionary[String] | Null = null
): APIGatewayRequestAuthorizerEvent = {
val _obj$ = js.Dynamic.literal(
"type" -> `type`.asInstanceOf[js.Any],
"type" -> "REQUEST",
"methodArn" -> methodArn.asInstanceOf[js.Any],
"resource" -> resource.asInstanceOf[js.Any],
"path" -> path.asInstanceOf[js.Any],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import scala.scalajs.js.|
@js.native
trait AppSyncResolverEvent[T] extends js.Object {
var arguments: T = js.native
var identity: js.UndefOr[AppSyncIdentityIAM | AppSyncIdentityCognito] = js.native
var identity: js.UndefOr[AppSyncIdentity] = js.native
var source: AppSyncResolverEvent.Source | Null = js.native
var request: AppSyncResolverEventRequest = js.native
var info: AppSyncResolverEventInfo = js.native
Expand All @@ -25,6 +25,15 @@ trait AppSyncResolverEventRequest extends js.Object {
}
object AppSyncResolverEventRequest {
type Headers = js.Dictionary[String]

def apply(
headers: AppSyncResolverEventRequest.Headers
): AppSyncResolverEventRequest = {
val _obj$ = js.Dynamic.literal(
"headers" -> headers.asInstanceOf[js.Any]
)
_obj$.asInstanceOf[AppSyncResolverEventRequest]
}
}

@js.native
Expand All @@ -35,8 +44,26 @@ trait AppSyncResolverEventInfo extends js.Object {
var fieldName: String = js.native
var variables: AppSyncResolverEventInfo.Variables = js.native
}

object AppSyncResolverEventInfo {
type Variables = js.Dictionary[js.Any]

def apply(
selectionSetList: js.Array[String],
selectionSetGraphQL: String,
parentTypeName: String,
fieldName: String,
variables: Variables
): AppSyncResolverEventInfo = {
val _obj$ = js.Dynamic.literal(
"selectionSetList" -> selectionSetList.asInstanceOf[js.Any],
"selectionSetGraphQL" -> selectionSetGraphQL.asInstanceOf[js.Any],
"parentTypeName" -> parentTypeName.asInstanceOf[js.Any],
"fieldName" -> fieldName.asInstanceOf[js.Any],
"variables" -> variables.asInstanceOf[js.Any]
)
_obj$.asInstanceOf[AppSyncResolverEventInfo]
}
}

@js.native
Expand All @@ -51,6 +78,31 @@ trait AppSyncIdentityIAM extends js.Object {
var cognitoIdentityAuthProvider: String = js.native
}

object AppSyncIdentityIAM {
def apply(
accountId: String,
cognitoIdentityPoolId: String,
cognitoIdentityId: String,
sourceIp: js.Array[String],
username: String,
userArn: String,
cognitoIdentityAuthType: String,
cognitoIdentityAuthProvider: String
): AppSyncIdentityIAM = {
val _obj$ = js.Dynamic.literal(
"accountId" -> accountId.asInstanceOf[js.Any],
"cognitoIdentityPoolId" -> cognitoIdentityPoolId.asInstanceOf[js.Any],
"cognitoIdentityId" -> cognitoIdentityId.asInstanceOf[js.Any],
"sourceIp" -> sourceIp.asInstanceOf[js.Any],
"username" -> username.asInstanceOf[js.Any],
"userArn" -> userArn.asInstanceOf[js.Any],
"cognitoIdentityAuthType" -> cognitoIdentityAuthType.asInstanceOf[js.Any],
"cognitoIdentityAuthProvider" -> cognitoIdentityAuthProvider.asInstanceOf[js.Any]
)
_obj$.asInstanceOf[AppSyncIdentityIAM]
}
}

@js.native
trait AppSyncIdentityCognito extends js.Object {
var sub: String = js.native
Expand All @@ -61,3 +113,26 @@ trait AppSyncIdentityCognito extends js.Object {
var defaultAuthStrategy: String = js.native
var groups: js.Array[String] | Null = js.native
}

object AppSyncIdentityCognito {
def apply(
sub: String,
issuer: String,
username: String,
claims: js.Any,
sourceIp: js.Array[String],
defaultAuthStrategy: String,
groups: js.Array[String] | Null = null
): AppSyncIdentityCognito = {
val _obj$ = js.Dynamic.literal(
"sub" -> sub.asInstanceOf[js.Any],
"issuer" -> issuer.asInstanceOf[js.Any],
"username" -> username.asInstanceOf[js.Any],
"claims" -> claims.asInstanceOf[js.Any],
"sourceIp" -> sourceIp.asInstanceOf[js.Any],
"defaultAuthStrategy" -> defaultAuthStrategy.asInstanceOf[js.Any],
"groups" -> groups.asInstanceOf[js.Any]
)
_obj$.asInstanceOf[AppSyncIdentityCognito]
}
}
Loading

0 comments on commit 4d99e19

Please sign in to comment.