@5minds/processcube_engine_sdk 3.3.2 → 3.3.3-feature-4f1709-llkn84ts
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Engine.d.ts +17 -1
- package/package.json +1 -1
package/dist/Engine.d.ts
CHANGED
|
@@ -167,6 +167,15 @@ export type CustomHttpRouteResult = {
|
|
|
167
167
|
vary?: string | Array<string>;
|
|
168
168
|
};
|
|
169
169
|
export type CustomHttpRouteHandler = (request: CustomHttpRouteRequest) => Promise<CustomHttpRouteResult> | CustomHttpRouteResult;
|
|
170
|
+
/**
|
|
171
|
+
* Additional Settings for a Custom HTTP Route.
|
|
172
|
+
*/
|
|
173
|
+
export type CustomHttpRouteOptions = {
|
|
174
|
+
/**
|
|
175
|
+
* If set to true, accessing the HTTP route will require a valid AUth Token.
|
|
176
|
+
*/
|
|
177
|
+
protected?: boolean;
|
|
178
|
+
};
|
|
170
179
|
export type RuntimeExpressionParameters = {
|
|
171
180
|
token?: {
|
|
172
181
|
current?: any;
|
|
@@ -363,7 +372,14 @@ export type Engine = {
|
|
|
363
372
|
anonymousSessions: IAnonymousSessionExtensionAdapter;
|
|
364
373
|
registerCustomServiceTask<TPayload extends object>(serviceTaskType: string, serviceTaskHandler: CustomServiceTaskHandler<TPayload>): void;
|
|
365
374
|
removeCustomServiceTask(serviceTaskType: string): void;
|
|
366
|
-
|
|
375
|
+
/**
|
|
376
|
+
* Registers a HTTP Route at the Engine Server. These routes will be hosted by the engine itself and can be used to extend the Engine's native API.
|
|
377
|
+
*
|
|
378
|
+
* @param path The HTTP path to use
|
|
379
|
+
* @param method The HTTP Method for the route. Currently supports GET, POST, PUT and DELETE
|
|
380
|
+
* @param routeHandler A callback for handling requests against the route
|
|
381
|
+
*/
|
|
382
|
+
registerHttpRoute(path: string, method: 'get' | 'post' | 'put' | 'delete', routeHandler: CustomHttpRouteHandler, options?: CustomHttpRouteOptions): void;
|
|
367
383
|
executeRuntimeExpression<TExpectedResult>(expression: string, params: RuntimeExpressionParameters): Promise<TExpectedResult>;
|
|
368
384
|
applicationInfo: IApplicationInfoExtensionAdapter;
|
|
369
385
|
correlations: ICorrelationExtensionAdapter;
|
package/package.json
CHANGED