COMPILE Insert O4WRESTCommon

common /O4WREST/ O4WRestFl%, O4WSecTokenValue%, O4WSecTokenName%, apiInfo%, versionInfo%, routeInfo%, varInfo%, routeID%, o4wSecType%, routeAction%
common /O4WRESTSession/ ParsedParameters%

Equ END_TOKEN$ To "<END>"

Equ O4WRESTCONFIG_VERSION_DESCRIPTION$                 To 1
Equ O4WRESTCONFIG_VERSION_SERVERS$                     To 2      ;* server URLs for this api/version
Equ O4WRESTCONFIG_VERSION_SECURITY_LOC$                To 5      ;* location for security token
Equ O4WRESTCONFIG_VERSION_SECURITY_TOKEN$              To 6      ;* security token name
Equ O4WRESTCONFIG_VERSION_SECURITY_PROC$               To 7      ;* routine to process security
Equ O4WRESTCONFIG_VERSION_SECURITY_TYPE$               To 8      ;* security "scheme"

Equ O4WRESTCONFIG_VERSION_DEFAULT_HANDLER$             To 10     ;* default handler for this API (can be 'auto' for internal)
Equ O4WRESTCONFIG_VERSION_DEFAULT_RESPONSE_TYPE$       To 11     ;* default media type of response
Equ O4WRESTCONFIG_VERSION_COOKIE_SECURE$               To 15     ;* flag: are cookies secure?
Equ O4WRESTCONFIG_VERSION_COOKIE_PATH$                 To 16     ;* path for cookies
Equ O4WRESTCONFIG_VERSION_COOKIE_IGNORE_SANITY_SECURE$ To 17     ;* flag: ignore error if not https & cookie secure
Equ O4WRESTCONFIG_VERSION_COOKIE_IGNORE_SANITY_PATH$   To 18     ;* flag: ignore error if cookie path <> path

** @RM delimited parts in record **
Equ O4WRESTCONFIG_ROUTE_PATH$                          To 1
Equ O4WRESTCONFIG_ROUTE_METHOD$                        To 2
Equ O4WRESTCONFIG_ROUTE_DESCRIPTION$                   To 5
Equ O4WRESTCONFIG_ROUTE_TAGS$                          To 6           ;* "GROUP" THAT THIS ROUTE BELONGS TO
Equ O4WRESTCONFIG_ROUTE_SERVERS$                       To 7           ;* OPTIONAL OVERRIDE OF DEFAULT API SERVERS
Equ O4WRESTCONFIG_ROUTE_SECURITY$                      To 8           ;* security required for this route?
Equ O4WRESTCONFIG_ROUTE_HANDLER$                       To 9           ;* what routine will handle this (can be 'auto' for internal)
Equ O4WRESTCONFIG_ROUTE_RESPONSE_TYPE$                 To 10           ;* media type of response
Equ O4WRESTCONFIG_ROUTE_ACTION$                        To 11          ;* operationID or "standard" action (if auto)
Equ O4WRESTCONFIG_ROUTE_INCOMING_PROPERTY_NAMES$       To 20          ;* parameter names ]
Equ O4WRESTCONFIG_ROUTE_INCOMING_PROPERTY_LOCS$        To 21          ;* where the paramter comes from]
Equ O4WRESTCONFIG_ROUTE_INCOMING_PROPERTY_TYPES$       To 22          ;* type of parameter (string, boolean, schema)]
Equ O4WRESTCONFIG_ROUTE_INCOMING_PROPERTY_REQD$        To 23          ;* 1/0 parameter required?]
Equ O4WRESTCONFIG_ROUTE_INCOMING_PROPERTY_DEFAULT$     To 24          ;* default value for parameter]
Equ O4WRESTCONFIG_ROUTE_INCOMING_PROPERTY_STD_TYPES$   To 25          ;* std code for this parameter (used by wizard)]
Equ O4WRESTCONFIG_ROUTE_RESPONSE_CODES$                To 30
Equ O4WRESTCONFIG_ROUTE_RESPONSE_DETAILS$              To 31
Equ O4WRESTCONFIG_ROUTE_RESPONSE_STD_TYPES$            To 32
Equ O4WRESTCONFIG_ROUTE_RESPONSE_PROPERTY_NAMES$       To 35
Equ O4WRESTCONFIG_ROUTE_RESPONSE_PROPERTY_LOCS$        To 36
Equ O4WRESTCONFIG_ROUTE_RESPONSE_PROPERTY_TYPES$       To 37

Equ O4WRESTCONFIG_SCHEMA_DESCRIPTION$                  To 1
Equ O4WRESTCONFIG_SCHEMA_SOURCE$                       To 2
Equ O4WRESTCONFIG_SCHEMA_PARAM_NAME$                   To 5
Equ O4WRESTCONFIG_SCHEMA_PARAM_TYPE$                   To 6
Equ O4WRESTCONFIG_SCHEMA_PARAM_SOURCE_DETAILS_1$       To 10
Equ O4WRESTCONFIG_SCHEMA_PARAM_SOURCE_DETAILS_2$       To 11
Equ O4WRESTCONFIG_SCHEMA_PARAM_SOURCE_DETAILS_3$       To 12




Equ O4WRESTCONFIG_SCHEMA_SOURCE_TYPE_FILE$ To "FILE"
Equ O4WRESTCONFIG_SCHEMA_SOURCE_TYPE_PROG$ To "STPROC"


Equ stdToken_KEY$                       To "%ID%"
Equ stdToken_SEARCH_LIST_ID$            To "%LIST_ID%"
Equ stdToken_SEARCH_PAGE_NO$            To "%LIST_PAGE%"
Equ stdToken_SEARCH_NUM_PPG$            To "%LIST_PPG%"
Equ stdToken_SEARCH_PAGINATE$           To "%LIST_PAGINATE%"
Equ stdToken_SEARCH_PARAM$              To "%LIST_PARAM%"
Equ stdToken_ACTION_READ$               To "%READ_ITEM%"
Equ stdToken_ACTION_LIST$               To "%LIST%"
Equ stdToken_ACTION_CREATE$             To "%CREATE_ITEM%"
Equ stdToken_ACTION_UPDATE$             To "%UPDATE_ITEM%"
Equ stdToken_ACTION_DELETE$             To "%DELETE_ITEM%"
Equ stdToken_ACTION_PATCH$              To "%PATCH_ITEM%"
Equ stdToken_RESPONSE_SUCCESS$          To "%OK%"
Equ stdToken_RESPONSE_ERR_SECURITY$     To "%ERR_SEC%"
Equ stdToken_RESPONSE_ERR_PARAM$        To "%ERR_PARAM%"
Equ stdToken_RESPONSE_ERR_NOT_FOUND$    To "%ERR_NOTFOUND%"
Equ stdToken_RESPONSE_ERR_GENERIC$      To "%ERR%"

Equ stdResponse_SUCCESS$                To "200"
Equ stdResponse_ERR_ID$                 To "400"
Equ stdResponse_ERR_UNAUTHORIZED$       To "401"
Equ stdResponse_ERR_NOT_FOUND$          To "404"
Equ stdResponse_ERR_INPUT_INVALID$      To "405"

