PromucFlow_constructor/app/client/src/constants/ApiConstants.tsx

36 lines
840 B
TypeScript
Raw Normal View History

2019-09-09 09:08:54 +00:00
export type ContentType =
| "application/json"
| "application/x-www-form-urlencoded";
export const REQUEST_TIMEOUT_MS = 20000;
2020-05-07 08:07:29 +00:00
export const DEFAULT_EXECUTE_ACTION_TIMEOUT_MS = 15000;
export const DEFAULT_TEST_DATA_SOURCE_TIMEOUT_MS = 30000;
2019-12-16 08:49:10 +00:00
export const API_REQUEST_HEADERS: APIHeaders = {
"Content-Type": "application/json",
2019-09-09 09:08:54 +00:00
};
2019-09-24 12:36:03 +00:00
export const POSTMAN = "POSTMAN";
export const CURL = "CURL";
export const Swagger = "Swagger";
2019-12-16 08:49:10 +00:00
export const OAuthURL = "/oauth2/authorization";
export const GoogleOAuthURL = `${OAuthURL}/google`;
export const GithubOAuthURL = `${OAuthURL}/github`;
2020-01-22 12:26:25 +00:00
export const LOGIN_SUBMIT_PATH = "login";
2019-12-16 08:49:10 +00:00
2019-08-29 11:22:09 +00:00
export interface APIException {
error: number;
message: string;
}
2019-09-24 12:36:03 +00:00
export interface APIHeaders {
"Content-Type": ContentType;
2019-12-16 08:49:10 +00:00
Accept?: string;
2019-09-24 12:36:03 +00:00
}
export interface APIRequest {
requestId?: string;
}