{"size": 1001, "ext": "js", "max_stars_repo_path": "src/types.js", "max_stars_repo_name": "hossamnasser938/api-request-biolerplate-actions", "max_stars_repo_stars_event_min_datetime": "2021-11-15T11:34:21.000Z", "max_stars_repo_stars_event_max_datetime": "2021-11-15T11:34:21.000Z", "max_issues_repo_path": "src/types.js", "max_issues_repo_name": "hossamnasser938/api-request-boilerplate-actions", "max_issues_repo_issues_event_min_datetime": "2021-05-10T21:01:17.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-10T21:22:53.000Z", "max_forks_repo_path": "src/types.js", "max_forks_repo_name": "hossamnasser938/api-request-boilerplate-actions", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": 2, "max_forks_count": null, "avg_line_length": 22.2444444444, "max_line_length": 62, "alphanum_fraction": 0.7422577423}
import type {
  AxiosRequestConfig,
  AxiosResponse,
  AxiosError,
  Method
} from "axios";

export type ErrorHandler = string => void;

// redux stuff
export type Action = any;
export type State = any;
export type Dispatch = (action: Action) => any;
export type Reducer = (state: State, action: Action) => State;

export type RequestEndPoint = string | RegExp;

export type ApiRequestConfigObject = {|
  requestEndPoint: RequestEndPoint,
  requestMethod: Method,
  baseActionType: string,
  errorMessage?: string,
  noStart?: boolean,
  noStop?: boolean,
  noSuccess?: boolean,
  noError?: boolean
|};

// axios stuff
export type RequestOnFullfilledInterceptor = (
  config: AxiosRequestConfig
) => AxiosRequestConfig;

export type RequestOnRejectedInterceptor = (
  error: AxiosError
) => Promise<AxiosError>;

export type ResponseOnFullfilledInterceptor = (
  response: AxiosResponse
) => AxiosResponse;

export type ResponseOnRejectedInterceptor = (
  error: AxiosError
) => ?Promise<AxiosError>;
