|
9 | 9 | - [ApiKeyRestClient](#ApiKeyRestClient)
|
10 | 10 | - [CookieRestClient](#CookieRestClient)
|
11 | 11 | - [OAuth2AuthorizationCodeRestClient](#OAuth2AuthorizationCodeRestClient)
|
| 12 | + - [PlatformApiRestClient](#PlatformApiRestClient) |
| 13 | + - [PlatformApiLogicClient](#PlatformApiLogicClient) |
12 | 14 | - [JSON Schema Converter](#JSON-Schema-Converter)
|
13 | 15 | - [JSON Transformation](#JSON-Transformation)
|
14 | 16 | - [Attachment Processor](#Attachment-Processor)
|
@@ -135,6 +137,49 @@ Handles both V1 and V2 of the NTLM Protocol.
|
135 | 137 | const Client = new NtlmRestClient(emitter, cfg);
|
136 | 138 | ```
|
137 | 139 |
|
| 140 | +### PlatformApiRestClient |
| 141 | +[PlatformApiRestClient](https://github.com/elasticio/component-commons-library/blob/master/lib/authentication/PlatformApiRestClient.ts) |
| 142 | +class extends [BasicAuthRestClient](#BasicAuthRestClient) class. |
| 143 | +Implements method for checking of response correctness (like containment of status code, correct JSON content type of headers end other expected response fields). |
| 144 | + |
| 145 | +#### constructor(emitter, cfg) |
| 146 | +- emitter - EIO emitting context. |
| 147 | +- cfg - configuration of EIO component object. |
| 148 | + |
| 149 | +``` |
| 150 | +const Client = new PlatformApiRestClient(emitter, cfg); |
| 151 | +``` |
| 152 | + |
| 153 | +### PlatformApiLogicClient |
| 154 | +[PlatformApiLogicClient](https://github.com/elasticio/component-commons-library/blob/master/lib/authentication/PlatformApiLogicClient.ts) |
| 155 | +class extends [PlatformApiRestClient](#PlatformApiRestClient) class. |
| 156 | +Contains useful methods to manipulate flow's state to set it either to active running or to inactive stopped, searching flows, workspaces, credentials and more. |
| 157 | + |
| 158 | +#### constructor(emitter, cfg) |
| 159 | +- emitter - EIO emitting context. |
| 160 | +- cfg - configuration of EIO component object. |
| 161 | + |
| 162 | +``` |
| 163 | +const Client = new PlatformApiLogicClient(emitter, cfg); |
| 164 | +``` |
| 165 | + |
| 166 | +#### List of methods |
| 167 | +- fetchAllFlowsForWorkspace(options) - Fetch all flows for a given workspace |
| 168 | +- fetchAllCredentialsForWorkspace(options) - Fetch all credentials for a given workspace |
| 169 | +- fetchComponentsAccessibleFromContract(options) - Fetch All Components Accessible From a Given Workspace |
| 170 | +- splitParallelization(maxParallelization, splitFactor) - Helping method to calculate right number of parallel calls |
| 171 | +- fetchFlowList(options) - Fetches a list of flows |
| 172 | +- fetchWorkspaceList(options) - Fetch a list of all workspaces across all contracts for a user |
| 173 | +- fetchWorkspaceId(workspaceUniqueCriteria) - Given a set of unique criteria, find the workspace that matches |
| 174 | +- removeNonWritableProperties(flow, includeDataSamples) - Given a flow, remove the properties of the flow that are regularly changed by the system such as last executed time |
| 175 | +- fetchFlowId(flowUniqueCriteria) - Fetch flow bu it's unique criteria |
| 176 | +- fetchFlowById(id) - Fetch flow bu it's id |
| 177 | +- fetchFlowByNameAndWorkspaceId(flowName, workspaceId) - |
| 178 | +- changeFlowState(options) - Given a flow, change the flow to a given state (running, stopped, etc) |
| 179 | +- startFlow(flowId, options = {}) - sets the flow to active running state |
| 180 | +- stopFlow(flowId, options = {}) - sets the flow to inactive stopped state |
| 181 | +- hydrateFlow(options) - Hydrates the flow using removeNonWritableProperties method, but additionally enriches the flow with all data samples, credential names, command and component Id fields. |
| 182 | + |
138 | 183 | ## JSON Schema Converter
|
139 | 184 | Contains tools for JSON metadata generation
|
140 | 185 |
|
|
0 commit comments