20 lines
427 B
TypeScript
20 lines
427 B
TypeScript
import { HttpParams } from '@angular/common/http';
|
|
|
|
import { StatusCode } from '../types/status-code.type';
|
|
|
|
export interface APIRequest {
|
|
_id?: string;
|
|
}
|
|
|
|
export interface APIResponse {
|
|
_id?: string;
|
|
statusCode: StatusCode;
|
|
errorMessage: string;
|
|
}
|
|
|
|
export type APIEncoder<REQ> = (req: REQ) => HttpParams;
|
|
|
|
export type APIFormDataEncoder<REQ> = (req: REQ) => FormData;
|
|
|
|
export type APIDecoder<RES> = (res: any) => RES;
|