2020-01-24 09:54:40 +00:00
|
|
|
import { RestAction } from "api/ActionAPI";
|
|
|
|
|
|
2020-02-18 18:13:19 +00:00
|
|
|
export const HTTP_METHODS = ["GET", "POST", "PUT", "DELETE", "PATCH"];
|
2019-10-21 15:12:45 +00:00
|
|
|
|
|
|
|
|
export const HTTP_METHOD_OPTIONS = HTTP_METHODS.map(method => ({
|
|
|
|
|
label: method,
|
|
|
|
|
value: method,
|
|
|
|
|
}));
|
|
|
|
|
|
2020-04-14 12:34:14 +00:00
|
|
|
export const REST_PLUGIN_PACKAGE_NAME = "restapi-plugin";
|
2020-04-28 06:52:53 +00:00
|
|
|
|
2020-01-24 09:54:40 +00:00
|
|
|
export const DEFAULT_API_ACTION: Partial<RestAction> = {
|
|
|
|
|
actionConfiguration: {
|
|
|
|
|
httpMethod: HTTP_METHODS[0],
|
|
|
|
|
},
|
|
|
|
|
};
|
2020-04-14 12:34:14 +00:00
|
|
|
|
|
|
|
|
export const DEFAULT_PROVIDER_OPTION = "Business Software";
|
|
|
|
|
export const POST_BODY_FORMATS = ["application/json", "x-www-form-urlencoded"];
|
|
|
|
|
|
|
|
|
|
export const POST_BODY_FORMAT_OPTIONS = POST_BODY_FORMATS.map(method => ({
|
|
|
|
|
label: method,
|
|
|
|
|
value: method,
|
|
|
|
|
}));
|