@5minds/processcube_engine_sdk 4.0.0-develop-73fc50-llmatqfe → 4.0.0-develop-0a059f-llmav7zc
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 +19 -1
- package/package.json +1 -1
package/dist/Engine.d.ts
CHANGED
|
@@ -167,6 +167,16 @@ 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, accessing the HTTP route will require a valid Auth Token.
|
|
176
|
+
* Defaults to 'true'.
|
|
177
|
+
*/
|
|
178
|
+
protected?: boolean;
|
|
179
|
+
};
|
|
170
180
|
export type RuntimeExpressionParameters = {
|
|
171
181
|
token?: {
|
|
172
182
|
current?: any;
|
|
@@ -363,7 +373,15 @@ export type Engine = {
|
|
|
363
373
|
anonymousSessions: IAnonymousSessionExtensionAdapter;
|
|
364
374
|
registerCustomServiceTask<TPayload extends object>(serviceTaskType: string, serviceTaskHandler: CustomServiceTaskHandler<TPayload>): void;
|
|
365
375
|
removeCustomServiceTask(serviceTaskType: string): void;
|
|
366
|
-
|
|
376
|
+
/**
|
|
377
|
+
* 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.
|
|
378
|
+
*
|
|
379
|
+
* @param path The HTTP path to use
|
|
380
|
+
* @param method The HTTP Method for the route. Currently supports GET, POST, PUT and DELETE
|
|
381
|
+
* @param routeHandler A callback for handling requests against the route
|
|
382
|
+
* @param options Additional settings for the HTTP route.
|
|
383
|
+
*/
|
|
384
|
+
registerHttpRoute(path: string, method: 'get' | 'post' | 'put' | 'delete', routeHandler: CustomHttpRouteHandler, options?: CustomHttpRouteOptions): void;
|
|
367
385
|
executeRuntimeExpression<TExpectedResult>(expression: string, params: RuntimeExpressionParameters): Promise<TExpectedResult>;
|
|
368
386
|
applicationInfo: IApplicationInfoExtensionAdapter;
|
|
369
387
|
correlations: ICorrelationExtensionAdapter;
|
package/package.json
CHANGED