Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,15 @@ export namespace Http {
operationContext: unknown;
};
};
version: string;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not appropriate place for these fields, since http.Event describes regular direct request to cloud function. These fields structure should be described as new type in apigateway folder like it is done for authorizer requests (https://github.com/yandex-cloud/function-ts-types/blob/master/src/api-gateway/authorizer.ts). I would suggest to create new module http inside and declare types new module with namespace Http and types Event and Context there. Those type should extend regular Event and Context of course.

resource: string;
path: string;
pathParameters: Record<string, string>;
body: string;
isBase64Encoded: boolean;
parameters: Record<string, string>;
multiValueParameters: Record<string, string[]>;
operationId: string;
}

export type RequestContext = {
Expand Down