All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Fixed missing session renewal if token is no longer valid.
- Include new parameter
dictionaryKeys
forgetWorkflowExecution()
method
- The type definition of
SyshubWorkflowModel.nodeDataArray
has been fixed to also includeGraphModelCElementObject
andGraphModelWorkflowObject
as valid items.
- The module now allows the use of basic authentication without predefined access data. In this case, the
login()
method must be executed before making the first request to the Rest API (#15). - It is now possible to use the sysHUB 2024 API keys to communicate with the Rest API (#19).
- The option of basic authentication without predefined access data means that an
Error
is no longer raised if the user name and password are both empty (""
). - With basic authentication, the scope is now also checked in the Rest module, even if it is ignored by the sysHUB Rest API (#21).
- Improved scope check (#23)
- The module has been changed to allow temporary sessions. This means, that if the
login()
method is called with the third parameterkeepLoggedin
=false
, the token and session information will be stored in the browsers sessionStorage instead of the localStorage. After an user closes the browser window, the sessionStorage is cleared and though the session automatically removed. This closes the issue #2.
- Methods that are called while the OAuth token is being refreshed are postponed for a short period of time (usually less than half a second) (closes #16).
- The
logout()
method now revokes the token also in the sysHUB server by calling thewebauth/oauth/revoke_token
endpoint (closes #3).
- Documentation and Changelog have been updated
- Breaking Change: The Etag mechanism of the sysHUB Rest API has been enabled and added to each
get...()
method. An internal dictionary keeps track of the GET requests and the returned Etags. For each new request to previously called endpoints, the latest Etag is sent along. If the sysHUB server recognizes that no change has been made, it returns the HTTP status code 304/Not modified. This code is then passed on as the response. The Rest module does not transmit the cached content of the previous request, but only the code 304. It is therefore up to the application to save the data itself. The Etag functionality can be prevented per function call or globally so that the sysHUB server actually delivers the requested data.
- Breaking Change: The type definitions for connection settings have been improved. Now, you can configure either basic authentication or OAuth, but not both simultaneously. This change will break existing code, necessitating modifications to settings objects.
- Automated tests have been implemented for classes and services to improve reliability and maintainability. All future changes must pass these tests prior to being included in a new release, ensuring high-quality updates.
- Allow
agent
for workflow call or cElement to benull
orstring
- Missing readme entry for
getWorkflowModel(uuid: string)
'JobType'
as possible value ofSyshubWorkflowReference.type
- Added the new method
getWorkflowModel(uuid: string)
to retrieve a workflows graph model as defined by the workflow designer including the data types for the included chart entities
- Fixed a bug where session key in localstorage is undefined
- Fixed bug that prevented login with some special characters like
&
that break parameters in urls
- Removed debug code
- Improved error handling: In case that the server does not respond at all the Rest API returns a new error
NetworkError
. This informs the caller that the server is not available and enables it to handle this special case.
- Improved error handling: In the previous behavior, the Rest API was called even if the configured scope did not match the requirements for the endpoint and
throwErrors
was not set. Now an error object is returned. IfthrowErrors
is set, the error is still thrown. - Improved generalization: Repetitive code blocks have been moved to more generalized methods and reused.
- Changed
modifiedtime
property to typestring | number | null
forSyshubConfigItem
andSyshubPSetItem
as Rest API returns ISO string as of sysHUB 2023
- Added methods
getJobType(uuid: string)
andgetJobTypes()
- Add a token refresh after 401/Unauthorized response. If it fails, user will be logged out.
- In this case, Rest functions will return an
UnauthorizedError
. You may not show an error message in this case and wait for the refreshed toekn (or logout).
- Fixed issue with permanent token refresh.
- Update peer dependencies to Angular 17.
- Fixed
SyshubInterceptor
: In the case of FormData objects as payload, the interceptor no longer sets a Content-Type header, as this would destroy the standard browser header. - Removed
postFile()
method: Since no header is needed, the method is no longer necessary and has been removed.
- Method
uploadFileToJob(jobId: number, fileType: 'ticket' | 'source', file: File, fileName: string)
to upload a file for a sysHUB job
- Fixed url for custom endpoints that are missing the
webapi
before thecustom
- Method
deletec()
to call a custom HTTP DELETE endpoint. - Method
getc()
to call a custom HTTP GET endpoint. - Method
head()
to call a HTTP HEAD endpoint. - Method
headc()
to call a custom HTTP HEAD endpoint. - Method
options()
to call a HTTP OPTIONS endpoint. - Method
optionsc()
to call a custom HTTP OPTIONS endpoint. - Method
patchc()
to call a custom HTTP PATCH endpoint. - Method
postc()
to call a custom HTTP POST endpoint. - Method
putc()
to call a custom HTTP PUT endpoint.
- Method
getCurrentUsersPermissions()
to get a list of permission names of the current user. - Method
getCurrentUsersRoles()
to get a list of role names of the current user. - Method
getDevices(withImg: boolean = false)
to get the IPP devices. - Method
getPermissions()
to get a list of permissions. - Method
getPermissionSets()
to get a list of permissionsets. - Method
getRoles()
to get a list of roles. - Method
getUsers()
to get a list of users. - Method
getWorkflows(params: SearchParams)
to get a filtered and sorted list of workflows. - Method
getWorkflowReferences(uuid: string)
to get a list of workflow references. - Method
getWorkflowStartpoints(uuid: string)
to get the start point names of a workflow. - Method
getWorkflowVersions(uuid: string)
to get a list of workflow versions.
- Method
createCategory(category: SyshubCategory)
to create a category. - Method
createSyslogEntry(entry: SyshubSyslogEntryToCreate)
to create a syslog entry. - Method
createUserlogEntry(entry: SyshubUserlogEntryToCreate)
to create a syslog entry. - Method
deleteCategory(uuid: string)
to delete a category. - Method
deleteConfigItem(uuid: string)
to delete a config item and all its children. - Method
deletePSetItem(uuid: string)
to delete a parameterset item and all its children. - Method
getCategories()
to retrieve a list of all categories. - Method
getCategory(uuid: string)
to retrieve a category. - Method
getCategoryRefs(uuid: string, type?: 'Decision' | 'Process' | 'Jobtype' | 'Workflow' | undefined)
to retrieve a category. - Method
getClusterStatus()
to get the cluster status. - Method
getConfigChildren(uuid: string, maxDeep: number = 0)
to get all children of a config item. - Method
getConfigItem(uuid: string)
to get one item from the config tree. - Method
getConfigPath(uuid: string)
to get the path of an item from the config tree. - Method
getConnectedClients(all: boolean = true)
to get a list of connected clients. - Method
getJndiConnectionNames()
to get a list of JNDI connections. - Method
getJndiDatabaseStructure(jndi: string = 'System', native: boolean = true)
to get the structure of a JNDI connected database. - Method
getJobDir(id?: number | undefined)
to get the jobdir. - Method
getNamedSystemsForConfigPath()
to get a list of named systems for a path in the config tree. - Method
getPsetChildren(uuid: string, maxDeep: number = 0)
to get all children of a parameterset item. - Method
getPsetItem(uuid: string)
to get one item from the parameterset tree. - Method
getPsetPath(uuid: string)
to get the path of an item from the parameterset tree. - Method
getSyslogEntries(params?: SearchParams)
to retrieve a filterable and sortable list of syslog entries from the server. - Method
getSyslogEntry(id: number)
to retrieve one syslog entry from the server. - Method
getSyslogHostnames()
to retrieve a list of all hostnames used in syslog. - Method
getUserlogEntries(params?: SearchParams)
to retrieve a filterable and sortable list of userlog entries from the server. - Method
getUserlogEntry(id: number)
to retrieve one userlog entry from the server. - Method
searchConfig(search: SearchTree)
to search inside the config tree. - Method
searchPSet(search: SearchTree)
to search inside the config tree.
This is a breaking change if you upgrade from Version 1.1 or older. The methods delete()
, get()
, patch()
, post()
, postFile()
, put()
returns a new kind of object.
- Provide interface
Env
in the module to provide typechecking for apps that make use of this module. - Methods
delete()
,get()
,patch()
,post()
,postFile()
,put()
will throw anNotLoggedinError
if user is not loggedin via OAuth. In case of basic auth user counts as always logged in. - Rest API calls like
getServerInformation()
throw anMissingScopeError
if the scope configuration in the envionment is missing the correct scope. - A new configuration switch
throwErrors
has been added to the environment configuration. If set to false (default) the previous stated errors will not be thrown. - Method
backupSyshub(backupName: string, backupDescription: string, folderpath: string, includeOptions: string[])
to create a new backup. - Method
createJob(job: SyshubJob)
to create a new job. - Method
deleteJob(id: number)
to delete one job from the server. - Method
getBackupMetadata(folder: string)
to retrieve information for a created backup. - Method
getCertStoreItems()
to retrieve cert store information. - Method
getJob(id: number)
to retrieve one job from the server. - Method
getJobs(params?: SearchParams)
to retrieve a filterable and sortable list of jobs from the server. - Method
getServerInformation()
to retrieve server information like license, system and grid node name, version. - Method
getServerProperties()
to retrieve items fromserver.properties
file. - Method
getWorkflowExecution(uuid: string)
to retrieve one running workflow executions. - Method
getWorkflowExecutions()
to retrieve running workflow executions. - Method
replaceJob(id: number, job: SyshubJobToPatch)
to replace a job on the server. - Method
restoreSyshub(folderpath: string, includeOptions: string[])
to restore from a backup. - Method
runConsoleCommand(cmd: string, params: string[] = [])
to execute a console command. - Method
runConsoleCommandHelp()
to execute the console command HELP and convert the server response into a list of key-value strings where key is the command and value the description of the command. - Method
runConsoleCommandMem()
to execute the console command MEM and convert the server response into a usable object instead of string-array. - Method
runConsoleCommandP()
to execute the console command P and convert the server response into a usable object instead of string-array. - Method
runWorkflow(uuid: string, async: boolean = true, jobId?: number)
to start a workflow execution. - Method
runWorkflowAlias(alias: string, payload: any | undefined, method: 'DELETE' | 'GET' | 'POST' | 'PUT' = 'POST')
to start a workflow based on it's alias name.
- Upgrade to Angular 16
- Changed default syHUB version to 2023
- Breaking Change: Now every Rest API call (using the methods
delete()
,get()
,patch()
,post()
,postFile()
,put()
) will return an object of typeResponse
in case of success. This object contains three objects:content
: Contains the response body (normally a string)header
: The headers from the responsestatus
: The HTTP Status code of the response
- Support for sysHUB 2021 by adding a new property
version
toenvironment.syshub
. This version switch uses the enumSyshubVersion
which is content of this module. If the version switch is not provided default will be sysHUB 2022.
Initial npm release