-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from kwameopareasiedu/do-update-refactor
Do update refactor
- Loading branch information
Showing
12 changed files
with
838 additions
and
743 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,40 @@ | ||
export {}; | ||
interface DoFunctionArgs { | ||
/** @deprecated Use http.headers */ | ||
__ow_headers?: Record<string, any>; | ||
/** @deprecated Use http.path */ | ||
__ow_path?: string; | ||
/** @deprecated Use http.method */ | ||
__ow_method?: "get" | "post" | "put" | "patch" | "delete" | "options"; | ||
/** @deprecated Get body data from root */ | ||
__ow_body?: string | Record<string, any>; | ||
/** @deprecated Get query params from root */ | ||
__ow_query?: string; | ||
|
||
declare global { | ||
interface DoFunctionArgs { | ||
__ow_headers?: Record<string, any>; | ||
__ow_path?: string; | ||
__ow_method?: "get" | "post" | "put" | "patch" | "delete" | "options"; | ||
__ow_body?: string | Record<string, any>; | ||
__ow_query?: string; | ||
http: { | ||
path: string; | ||
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS"; | ||
headers: { | ||
accept: string; | ||
"accept-encoding": string; | ||
"content-type": string; | ||
host: string; | ||
"user-agent": string; | ||
"x-forwarded-for": string; | ||
"x-forwarded-proto": string; | ||
"x-request-id": string; | ||
[k: string]: any; | ||
}; | ||
}; | ||
|
||
[k: string]: any; | ||
} | ||
[k: string]: any; | ||
} | ||
|
||
interface DoFunctionReturn { | ||
body?: any; | ||
headers?: Record<string, any>; | ||
} | ||
interface DoFunctionReturn { | ||
body?: any; | ||
statusCode?: number; | ||
headers?: Record<string, any>; | ||
} | ||
|
||
type DoFunction = ( | ||
args: DoFunctionArgs | ||
) => Promise<DoFunctionReturn | undefined>; | ||
interface DoFunction { | ||
(args: DoFunctionArgs): Promise<DoFunctionReturn | undefined> | ||
} |
Oops, something went wrong.