@5minds/processcube_engine_sdk 4.0.0-develop-73fc50-llmatqfe → 4.0.0-develop-dc773a-llmfml5y

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.
@@ -1,8 +1,11 @@
1
1
  /**
2
+ * @deprecated This feature is no longer officially supported, since this is more of an App SDK Feature.
3
+ * Therefore, this functionality will soon be moved to the App SDK entirely.
2
4
  * @swagger
3
5
  * components:
4
6
  * schemas:
5
7
  * UserMetadata:
8
+ * deprecated: true
6
9
  * description: The user metadata
7
10
  * type: object
8
11
  * required:
@@ -34,10 +37,13 @@ export type UserMetadata<TKey extends string, TPIScope extends string, TFIScope
34
37
  flowNodeInstanceScope?: TFIScope;
35
38
  };
36
39
  /**
40
+ * @deprecated This feature is no longer officially supported, since this is more of an App SDK Feature.
41
+ * Therefore, this functionality will soon be moved to the App SDK entirely.
37
42
  * @swagger
38
43
  * components:
39
44
  * schemas:
40
45
  * UserMetadataObject:
46
+ * deprecated: true
41
47
  * description: A list of user metadata
42
48
  * type: object
43
49
  * required:
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
- registerHttpRoute(httpRoute: string, method: 'get' | 'post' | 'put' | 'delete', routeHandler: CustomHttpRouteHandler): void;
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@5minds/processcube_engine_sdk",
3
- "version": "4.0.0-develop-73fc50-llmatqfe",
3
+ "version": "4.0.0-develop-dc773a-llmfml5y",
4
4
  "description": "Software development kit for the Engine.",
5
5
  "main": "dist/commonjs/index.js",
6
6
  "types": "dist/index.d.ts",