| 4 | type AxiosResponse = import("axios").AxiosResponse; |
| 5 | |
| 6 | export interface SessionInterface { |
| 7 | /** |
| 8 | * このセッションを用いてGETリクエストを発行する。 |
| 9 | * @param url リクエスト先のURL |
| 10 | * @param options |
| 11 | */ |
| 12 | get(url: string, options?: AxiosRequestConfig): Promise<SessionResponseInterface>; |
| 13 | /** |
| 14 | * このセッションを用いてPOSTリクエストを発行する。 |
| 15 | * @param url リクエスト先のURL |
| 16 | * @param data リクエストボディに含めるデータ。 |
| 17 | * @param options |
| 18 | */ |
| 19 | post(url: string, data?: any, options?: AxiosRequestConfig): Promise<SessionResponseInterface>; |
| 20 | /** |
| 21 | * トランザクションを実行する。 |
| 22 | * コールバック中に保存されたセッションはトランザクションが成功して終了するまで保存されない。 |
| 23 | */ |
| 24 | transaction<R>(callback: () => Promise<R>): Promise<R> |
| 25 | /** |
| 26 | * 現在のセッション情報を破棄します |
| 27 | */ |
| 28 | removeSession(): Promise<void>; |
| 29 | } |
| 30 | |
| 31 | export interface SessionResponseInterface { |
| 32 | /** |
no outgoing calls
no test coverage detected