Skip to content

Commit

Permalink
Rename Request/ResponsePlugin to Request/ResponseInterceptor
Browse files Browse the repository at this point in the history
  • Loading branch information
bbert committed Oct 25, 2023
1 parent 5e3c3a1 commit 28bece2
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions lib/src/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
export type { ResourceTiming } from './request/ResourceTiming.js';
export type { CommonMediaRequest } from './request/CommonMediaRequest.js';
export type { CommonMediaResponse } from './request/CommonMediaResponse.js';
export type { RequestPlugin } from './request/RequestPlugin.js';
export type { ResponsePlugin } from './request/ResponsePlugin.js';
export type { RequestInterceptor } from './request/RequestInterceptor.js';
export type { ResponseInterceptor } from './request/ResponseInterceptor.js';
10 changes: 10 additions & 0 deletions lib/src/request/RequestInterceptor.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { CommonMediaRequest } from './CommonMediaRequest.js';

/**
* Request interceptor API.
* @param request - The request to be executed.
* @returns A promise with updated request that is resolved when the interceptor has completed the process of the request.
*
* @group Request
*/
export type RequestInterceptor = (request: CommonMediaRequest) => Promise<CommonMediaRequest>
10 changes: 0 additions & 10 deletions lib/src/request/RequestPlugin.ts

This file was deleted.

10 changes: 10 additions & 0 deletions lib/src/request/ResponseInterceptor.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { CommonMediaResponse } from './CommonMediaResponse.js';

/**
* Response interceptor API.
* @param response - The received response.
* @returns A promise with updated response that is resolved when the interceptor has completed the process of the response.
*
* @group Request
*/
export type ResponseInterceptor = (response: CommonMediaResponse) => Promise<CommonMediaResponse>
10 changes: 0 additions & 10 deletions lib/src/request/ResponsePlugin.ts

This file was deleted.

0 comments on commit 28bece2

Please sign in to comment.