Skip to content

Commit

Permalink
Merge pull request #806 from supertokens/fix/type-check
Browse files Browse the repository at this point in the history
fix: code type check
  • Loading branch information
rishabhpoddar authored Jun 18, 2024
2 parents 5c546ac + 30f4bf0 commit a69605f
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions v2/emailpassword/serverless/with-aws-lambda/authorizer.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ Use the code below as the handler for the lambda. Remember that whenever we want
```tsx title="index.mjs"
import supertokens from "supertokens-node";
import { SessionEvent } from "supertokens-node/framework/awsLambda"; // typecheck-only, removed from output
import { APIGatewayAuthorizerEvent, PolicyDocument, Statement, AuthResponse } from "aws-lambda"; // typecheck-only, removed from output
import { APIGatewayAuthorizerEvent, PolicyDocument, Statement, AuthResponse, StatementEffect } from "aws-lambda"; // typecheck-only, removed from output
import Session from "supertokens-node/recipe/session";

// @ts-ignore
Expand Down Expand Up @@ -198,7 +198,7 @@ export const handler = async function (event__OMIT_START__: AuthorizerEvent__OMI
}

// Help function to generate an IAM policy
const generatePolicy = function (principalId__OMIT_START__: string__OMIT_END__, effect__OMIT_START__: string__OMIT_END__, resource__OMIT_START__: string__OMIT_END__, context__OMIT_START__?: any__OMIT_END__) {
const generatePolicy = function (principalId__OMIT_START__: string__OMIT_END__, effect__OMIT_START__: StatementEffect__OMIT_END__, resource__OMIT_START__: string__OMIT_END__, context__OMIT_START__?: any__OMIT_END__) {
// Required output:
const policyDocument__OMIT_START__: PolicyDocument__OMIT_END__ = {
Version: '2012-10-17',
Expand Down
4 changes: 2 additions & 2 deletions v2/passwordless/serverless/with-aws-lambda/authorizer.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ Use the code below as the handler for the lambda. Remember that whenever we want
```tsx title="index.mjs"
import supertokens from "supertokens-node";
import { SessionEvent } from "supertokens-node/framework/awsLambda"; // typecheck-only, removed from output
import { APIGatewayAuthorizerEvent, PolicyDocument, Statement, AuthResponse } from "aws-lambda"; // typecheck-only, removed from output
import { APIGatewayAuthorizerEvent, PolicyDocument, Statement, AuthResponse, StatementEffect } from "aws-lambda"; // typecheck-only, removed from output
import Session from "supertokens-node/recipe/session";

// @ts-ignore
Expand Down Expand Up @@ -198,7 +198,7 @@ export const handler = async function (event__OMIT_START__: AuthorizerEvent__OMI
}

// Help function to generate an IAM policy
const generatePolicy = function (principalId__OMIT_START__: string__OMIT_END__, effect__OMIT_START__: string__OMIT_END__, resource__OMIT_START__: string__OMIT_END__, context__OMIT_START__?: any__OMIT_END__) {
const generatePolicy = function (principalId__OMIT_START__: string__OMIT_END__, effect__OMIT_START__: StatementEffect__OMIT_END__, resource__OMIT_START__: string__OMIT_END__, context__OMIT_START__?: any__OMIT_END__) {
// Required output:
const policyDocument__OMIT_START__: PolicyDocument__OMIT_END__ = {
Version: '2012-10-17',
Expand Down
4 changes: 2 additions & 2 deletions v2/session/serverless/with-aws-lambda/authorizer.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ Use the code below as the handler for the lambda. Remember that whenever we want
```tsx title="index.mjs"
import supertokens from "supertokens-node";
import { SessionEvent } from "supertokens-node/framework/awsLambda"; // typecheck-only, removed from output
import { APIGatewayAuthorizerEvent, PolicyDocument, Statement, AuthResponse } from "aws-lambda"; // typecheck-only, removed from output
import { APIGatewayAuthorizerEvent, PolicyDocument, Statement, AuthResponse, StatementEffect } from "aws-lambda"; // typecheck-only, removed from output
import Session from "supertokens-node/recipe/session";

// @ts-ignore
Expand Down Expand Up @@ -198,7 +198,7 @@ export const handler = async function (event__OMIT_START__: AuthorizerEvent__OMI
}

// Help function to generate an IAM policy
const generatePolicy = function (principalId__OMIT_START__: string__OMIT_END__, effect__OMIT_START__: string__OMIT_END__, resource__OMIT_START__: string__OMIT_END__, context__OMIT_START__?: any__OMIT_END__) {
const generatePolicy = function (principalId__OMIT_START__: string__OMIT_END__, effect__OMIT_START__: StatementEffect__OMIT_END__, resource__OMIT_START__: string__OMIT_END__, context__OMIT_START__?: any__OMIT_END__) {
// Required output:
const policyDocument__OMIT_START__: PolicyDocument__OMIT_END__ = {
Version: '2012-10-17',
Expand Down
4 changes: 2 additions & 2 deletions v2/thirdparty/serverless/with-aws-lambda/authorizer.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ Use the code below as the handler for the lambda. Remember that whenever we want
```tsx title="index.mjs"
import supertokens from "supertokens-node";
import { SessionEvent } from "supertokens-node/framework/awsLambda"; // typecheck-only, removed from output
import { APIGatewayAuthorizerEvent, PolicyDocument, Statement, AuthResponse } from "aws-lambda"; // typecheck-only, removed from output
import { APIGatewayAuthorizerEvent, PolicyDocument, Statement, AuthResponse, StatementEffect } from "aws-lambda"; // typecheck-only, removed from output
import Session from "supertokens-node/recipe/session";

// @ts-ignore
Expand Down Expand Up @@ -198,7 +198,7 @@ export const handler = async function (event__OMIT_START__: AuthorizerEvent__OMI
}

// Help function to generate an IAM policy
const generatePolicy = function (principalId__OMIT_START__: string__OMIT_END__, effect__OMIT_START__: string__OMIT_END__, resource__OMIT_START__: string__OMIT_END__, context__OMIT_START__?: any__OMIT_END__) {
const generatePolicy = function (principalId__OMIT_START__: string__OMIT_END__, effect__OMIT_START__: StatementEffect__OMIT_END__, resource__OMIT_START__: string__OMIT_END__, context__OMIT_START__?: any__OMIT_END__) {
// Required output:
const policyDocument__OMIT_START__: PolicyDocument__OMIT_END__ = {
Version: '2012-10-17',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ Use the code below as the handler for the lambda. Remember that whenever we want
```tsx title="index.mjs"
import supertokens from "supertokens-node";
import { SessionEvent } from "supertokens-node/framework/awsLambda"; // typecheck-only, removed from output
import { APIGatewayAuthorizerEvent, PolicyDocument, Statement, AuthResponse } from "aws-lambda"; // typecheck-only, removed from output
import { APIGatewayAuthorizerEvent, PolicyDocument, Statement, AuthResponse, StatementEffect } from "aws-lambda"; // typecheck-only, removed from output
import Session from "supertokens-node/recipe/session";

// @ts-ignore
Expand Down Expand Up @@ -198,7 +198,7 @@ export const handler = async function (event__OMIT_START__: AuthorizerEvent__OMI
}

// Help function to generate an IAM policy
const generatePolicy = function (principalId__OMIT_START__: string__OMIT_END__, effect__OMIT_START__: string__OMIT_END__, resource__OMIT_START__: string__OMIT_END__, context__OMIT_START__?: any__OMIT_END__) {
const generatePolicy = function (principalId__OMIT_START__: string__OMIT_END__, effect__OMIT_START__: StatementEffect__OMIT_END__, resource__OMIT_START__: string__OMIT_END__, context__OMIT_START__?: any__OMIT_END__) {
// Required output:
const policyDocument__OMIT_START__: PolicyDocument__OMIT_END__ = {
Version: '2012-10-17',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ Use the code below as the handler for the lambda. Remember that whenever we want
```tsx title="index.mjs"
import supertokens from "supertokens-node";
import { SessionEvent } from "supertokens-node/framework/awsLambda"; // typecheck-only, removed from output
import { APIGatewayAuthorizerEvent, PolicyDocument, Statement, AuthResponse } from "aws-lambda"; // typecheck-only, removed from output
import { APIGatewayAuthorizerEvent, PolicyDocument, Statement, AuthResponse, StatementEffect } from "aws-lambda"; // typecheck-only, removed from output
import Session from "supertokens-node/recipe/session";

// @ts-ignore
Expand Down Expand Up @@ -198,7 +198,7 @@ export const handler = async function (event__OMIT_START__: AuthorizerEvent__OMI
}

// Help function to generate an IAM policy
const generatePolicy = function (principalId__OMIT_START__: string__OMIT_END__, effect__OMIT_START__: string__OMIT_END__, resource__OMIT_START__: string__OMIT_END__, context__OMIT_START__?: any__OMIT_END__) {
const generatePolicy = function (principalId__OMIT_START__: string__OMIT_END__, effect__OMIT_START__: StatementEffect__OMIT_END__, resource__OMIT_START__: string__OMIT_END__, context__OMIT_START__?: any__OMIT_END__) {
// Required output:
const policyDocument__OMIT_START__: PolicyDocument__OMIT_END__ = {
Version: '2012-10-17',
Expand Down

0 comments on commit a69605f

Please sign in to comment.