@5minds/processcube_app_sdk 0.0.1-feature-e5b363-ll0wo3zi → 0.0.1-feature-edd5ca-ll2c5qrl
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/client/components/NotificationIcon.d.ts +9 -0
- package/client/index.cjs +1 -1
- package/client/index.d.ts +1 -0
- package/client/index.mjs +1 -1
- package/package.json +6 -2
- package/server/index.cjs +1 -1
- package/server/index.mjs +1 -1
- package/server/lib/ProcessInstanceFunctions.d.ts +1 -7
- package/server/lib/UserTaskFunctions.d.ts +15 -17
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react/experimental" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export declare const NotificationIcon: ({ onTaskClick, newTasksApiUrl, refreshInterval, loadingComponent, errorComponent, }: {
|
|
4
|
+
onTaskClick: (taskId: string) => void;
|
|
5
|
+
newTasksApiUrl: string;
|
|
6
|
+
refreshInterval?: number | undefined;
|
|
7
|
+
loadingComponent?: React.ReactNode;
|
|
8
|
+
errorComponent?: React.ReactNode;
|
|
9
|
+
}) => string | number | true | import("react/jsx-runtime").JSX.Element | Iterable<React.ReactNode> | React.PromiseLikeOfReactNode;
|
package/client/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";"use client";var
|
|
1
|
+
"use strict";"use client";var N=Object.create;var f=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var T=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty;var C=(t,n)=>{for(var s in n)f(t,s,{get:n[s],enumerable:!0})},g=(t,n,s,i)=>{if(n&&typeof n=="object"||typeof n=="function")for(let a of v(n))!P.call(t,a)&&a!==s&&f(t,a,{get:()=>n[a],enumerable:!(i=S(n,a))||i.enumerable});return t};var B=(t,n,s)=>(s=t!=null?N(T(t)):{},g(n||!t||!t.__esModule?f(s,"default",{value:t,enumerable:!0}):s,t)),A=t=>g(f({},"__esModule",{value:!0}),t);var W={};C(W,{DynamicLink:()=>R,NotificationIcon:()=>D});module.exports=A(W);var z=require("client-only");var u=require("next/navigation"),I=require("react/jsx-runtime");function R({href:t,children:n}){let s=(0,u.useRouter)();return(0,I.jsx)("a",{href:t,onClick:i=>{i.preventDefault(),s.replace(t),s.refresh()},children:n})}var m=require("react"),h=require("react-icons/fi"),e=require("@chakra-ui/react"),w=B(require("swr"),1),o=require("react/jsx-runtime"),k=t=>fetch(t).then(n=>n.json()),D=({onTaskClick:t,newTasksApiUrl:n,refreshInterval:s=5e3,loadingComponent:i=null,errorComponent:a=null})=>{let[d,p]=(0,m.useState)([]);Notification.requestPermission().then(r=>{});let c=new Set(JSON.parse(localStorage.getItem("shownTaskIds"))||[]),{data:b,error:x}=(0,w.default)(n,k,{refreshInterval:s,refreshWhenHidden:!0,onSuccess:r=>{p(r),r.forEach(l=>{if(!c.has(l.flowNodeInstanceId)){c.add(l.flowNodeInstanceId);let y=new Notification(l.processModelId,{body:l.flowNodeName,tag:l.flowNodeInstanceId});y.onclose=()=>{c.delete(l.flowNodeInstanceId),t(l.flowNodeInstanceId)}}}),localStorage.setItem("shownTaskIds",JSON.stringify([...c]))}});return x&&a?a:!b&&i?i:(0,o.jsx)(e.ChakraProvider,{children:(0,o.jsx)(e.Box,{children:(0,o.jsxs)(e.Popover,{placement:"right-end",closeOnBlur:!1,children:[(0,o.jsx)(e.PopoverTrigger,{children:(0,o.jsxs)(e.Flex,{position:"relative",align:"center",children:[(0,o.jsx)(e.IconButton,{icon:(0,o.jsx)(h.FiBell,{fontSize:"1.25rem"}),"aria-label":"Settings",bg:"gray.300"}),d.length>0&&(0,o.jsx)(e.Box,{bg:"red",w:"20px",h:"20px",borderRadius:"50%",position:"absolute",top:"-10px",right:"-10px",display:"flex",justifyContent:"center",alignItems:"center",fontSize:"0.8rem",color:"white",children:d.length})]})}),(0,o.jsxs)(e.PopoverContent,{color:"black",bg:"gray.100",borderColor:"blue.800",children:[d.length===0&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(e.PopoverHeader,{pt:4,fontWeight:"bold",border:"0",children:"Keine neuen Aufgaben"}),(0,o.jsx)(e.PopoverArrow,{bg:"blue.800"}),(0,o.jsx)(e.PopoverCloseButton,{})]}),d.length>0&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(e.PopoverHeader,{pt:4,fontWeight:"bold",border:"0",children:"Neue Aufgaben"}),(0,o.jsx)(e.PopoverArrow,{bg:"blue.800"}),(0,o.jsx)(e.PopoverCloseButton,{}),(0,o.jsx)(e.PopoverBody,{children:(0,o.jsx)(e.Center,{maxW:"sm",mx:"auto",py:{base:"4",md:"8"},children:(0,o.jsx)(e.Stack,{spacing:"5",flex:"1",children:(0,o.jsx)(e.List,{listStyleType:"none",children:(0,o.jsx)(e.Stack,{spacing:"3",width:"full",children:d.map(r=>r?(0,o.jsx)(e.ListItem,{value:r.flowNodeInstanceId,backgroundColor:"white",p:"4",boxShadow:"sm",position:"relative",borderRadius:"lg",children:(0,o.jsxs)(e.Stack,{shouldWrapChildren:!0,spacing:"4",children:[(0,o.jsxs)(e.Flex,{justify:"space-between",alignItems:"center",children:[(0,o.jsx)(e.Text,{textStyle:"sm",fontWeight:"medium",color:"fg.emphasized",children:r.processModelId}),(0,o.jsx)(e.Button,{size:"xs",colorScheme:"blue",onClick:()=>{t(r.flowNodeInstanceId),c.delete(r.flowNodeInstanceId),p(d.filter(l=>l.flowNodeInstanceId!==r.flowNodeInstanceId))},children:"X"})]}),(0,o.jsxs)(e.Flex,{justify:"space-between",alignItems:"center",children:[(0,o.jsx)(e.Text,{textStyle:"xs",color:"fg.subtle",fontWeight:"medium",children:r.flowNodeName}),r.startedAt&&(0,o.jsx)(e.Text,{textStyle:"xs",color:"gray.500",textAlign:"right",children:new Date(r.startedAt).toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})})]})]})},r.flowNodeInstanceId):null)})})})})})]})]})]})})})};0&&(module.exports={DynamicLink,NotificationIcon});
|
package/client/index.d.ts
CHANGED
package/client/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import"client-only";import{useRouter as
|
|
1
|
+
"use client";import"client-only";import{useRouter as S}from"next/navigation";import{jsx as v}from"react/jsx-runtime";function U({href:r,children:l}){let i=S();return v("a",{href:r,onClick:d=>{d.preventDefault(),i.replace(r),i.refresh()},children:l})}import{useState as T}from"react";import{FiBell as P}from"react-icons/fi";import{IconButton as C,Box as I,Flex as c,Popover as B,Button as A,PopoverHeader as m,PopoverContent as R,PopoverArrow as h,PopoverCloseButton as w,PopoverBody as k,PopoverTrigger as D,ChakraProvider as W,ListItem as F,Text as f,Center as L,List as M,Stack as p}from"@chakra-ui/react";import O from"swr";import{Fragment as b,jsx as e,jsxs as n}from"react/jsx-runtime";var z=r=>fetch(r).then(l=>l.json()),Q=({onTaskClick:r,newTasksApiUrl:l,refreshInterval:i=5e3,loadingComponent:d=null,errorComponent:g=null})=>{let[s,u]=T([]);Notification.requestPermission().then(o=>{});let a=new Set(JSON.parse(localStorage.getItem("shownTaskIds"))||[]),{data:x,error:y}=O(l,z,{refreshInterval:i,refreshWhenHidden:!0,onSuccess:o=>{u(o),o.forEach(t=>{if(!a.has(t.flowNodeInstanceId)){a.add(t.flowNodeInstanceId);let N=new Notification(t.processModelId,{body:t.flowNodeName,tag:t.flowNodeInstanceId});N.onclose=()=>{a.delete(t.flowNodeInstanceId),r(t.flowNodeInstanceId)}}}),localStorage.setItem("shownTaskIds",JSON.stringify([...a]))}});return y&&g?g:!x&&d?d:e(W,{children:e(I,{children:n(B,{placement:"right-end",closeOnBlur:!1,children:[e(D,{children:n(c,{position:"relative",align:"center",children:[e(C,{icon:e(P,{fontSize:"1.25rem"}),"aria-label":"Settings",bg:"gray.300"}),s.length>0&&e(I,{bg:"red",w:"20px",h:"20px",borderRadius:"50%",position:"absolute",top:"-10px",right:"-10px",display:"flex",justifyContent:"center",alignItems:"center",fontSize:"0.8rem",color:"white",children:s.length})]})}),n(R,{color:"black",bg:"gray.100",borderColor:"blue.800",children:[s.length===0&&n(b,{children:[e(m,{pt:4,fontWeight:"bold",border:"0",children:"Keine neuen Aufgaben"}),e(h,{bg:"blue.800"}),e(w,{})]}),s.length>0&&n(b,{children:[e(m,{pt:4,fontWeight:"bold",border:"0",children:"Neue Aufgaben"}),e(h,{bg:"blue.800"}),e(w,{}),e(k,{children:e(L,{maxW:"sm",mx:"auto",py:{base:"4",md:"8"},children:e(p,{spacing:"5",flex:"1",children:e(M,{listStyleType:"none",children:e(p,{spacing:"3",width:"full",children:s.map(o=>o?e(F,{value:o.flowNodeInstanceId,backgroundColor:"white",p:"4",boxShadow:"sm",position:"relative",borderRadius:"lg",children:n(p,{shouldWrapChildren:!0,spacing:"4",children:[n(c,{justify:"space-between",alignItems:"center",children:[e(f,{textStyle:"sm",fontWeight:"medium",color:"fg.emphasized",children:o.processModelId}),e(A,{size:"xs",colorScheme:"blue",onClick:()=>{r(o.flowNodeInstanceId),a.delete(o.flowNodeInstanceId),u(s.filter(t=>t.flowNodeInstanceId!==o.flowNodeInstanceId))},children:"X"})]}),n(c,{justify:"space-between",alignItems:"center",children:[e(f,{textStyle:"xs",color:"fg.subtle",fontWeight:"medium",children:o.flowNodeName}),o.startedAt&&e(f,{textStyle:"xs",color:"gray.500",textAlign:"right",children:new Date(o.startedAt).toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})})]})]})},o.flowNodeInstanceId):null)})})})})})]})]})]})})})};export{U as DynamicLink,Q as NotificationIcon};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@5minds/processcube_app_sdk",
|
|
3
|
-
"version": "0.0.1-feature-
|
|
3
|
+
"version": "0.0.1-feature-edd5ca-ll2c5qrl",
|
|
4
4
|
"description": "The SDK for ProcessCube Apps",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "common/index.cjs",
|
|
@@ -78,8 +78,12 @@
|
|
|
78
78
|
},
|
|
79
79
|
"dependencies": {
|
|
80
80
|
"@5minds/processcube_engine_client": "^4.3.1",
|
|
81
|
+
"@chakra-ui/pro-theme": "^0.0.66",
|
|
82
|
+
"@chakra-ui/react": "^2.6.1",
|
|
81
83
|
"client-only": "^0.0.1",
|
|
82
84
|
"jwt-decode": "^3.1.2",
|
|
83
|
-
"only-server": "^0.0.1"
|
|
85
|
+
"only-server": "^0.0.1",
|
|
86
|
+
"react-icons": "^4.10.1",
|
|
87
|
+
"swr": "^2.2.0"
|
|
84
88
|
}
|
|
85
89
|
}
|
package/server/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var d=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var U=Object.getOwnPropertyNames;var F=Object.prototype.hasOwnProperty;var S=(e,s)=>{for(var n in s)d(e,n,{get:s[n],enumerable:!0})},h=(e,s,n,r)=>{if(s&&typeof s=="object"||typeof s=="function")for(let o of U(s))!F.call(e,o)&&o!==n&&d(e,o,{get:()=>s[o],enumerable:!(r=x(s,o))||r.enumerable});return e};var C=e=>h(d({},"__esModule",{value:!0}),e);var J={};S(J,{finishUserTask:()=>v,finishUserTaskAndGetNext:()=>E,getActiveProcessInstances:()=>W,getAssignedUserTasksByIdentity:()=>R,getIdentity:()=>_,getReservedUserTasksByIdentity:()=>B,getUserTasks:()=>M,getWaitingUserTaskByCorrelationId:()=>D,getWaitingUserTaskByFlowNodeInstanceId:()=>f,getWaitingUserTasks:()=>q,getWaitingUserTasksByFlowNodeId:()=>b,hardNavigate:()=>A,startProcess:()=>G,waitForUserTask:()=>P});module.exports=C(J);var oe=require("only-server");var a=require("@5minds/processcube_engine_client");var l=require("@5minds/processcube_engine_client"),t=new l.EngineClient(process.env.PROCESSCUBE_ENGINE_URL??"http://localhost:10560");async function P(e={}){let{processInstanceId:s,flowNodeId:n}=e;return new Promise(async(r,o)=>{let w=await t.userTasks.onUserTaskWaiting(async i=>{let T=i.flowNodeInstanceId===void 0,k=s!==void 0&&i.processInstanceId!==s,g=n!==void 0&&i.flowNodeId!==n,N=s!==void 0&&n!==void 0&&i.processInstanceId!==s&&i.flowNodeId!==n;if(T||k||g||N)return;let u=await f(i.flowNodeInstanceId);return t.notification.removeSubscription(w),u===null?o(new Error(`UserTask with instance ID "${i.flowNodeInstanceId}" does not exist.`)):r(u)})})}async function E(e,s,n){await t.userTasks.finishUserTask(e,s);let r=await t.userTasks.query({flowNodeId:n,state:a.DataModels.FlowNodeInstances.FlowNodeInstanceState.suspended});return r.totalCount>0?r.userTasks[0]:null}async function M(...e){return t.userTasks.query(...e)}async function q(e){let s=await t.userTasks.query({state:a.DataModels.FlowNodeInstances.FlowNodeInstanceState.suspended},e);return s.totalCount===0?null:s.userTasks}async function b(e,s){return t.userTasks.query({flowNodeId:e,state:a.DataModels.FlowNodeInstances.FlowNodeInstanceState.suspended},s)}async function f(e,s){let n=await t.userTasks.query({flowNodeInstanceId:e,state:a.DataModels.FlowNodeInstances.FlowNodeInstanceState.suspended},s);return n.userTasks.length?n.userTasks[0]:null}async function D(e){let s=await t.userTasks.query({correlationId:e,state:a.DataModels.FlowNodeInstances.FlowNodeInstanceState.suspended});return s.totalCount==0?null:s.userTasks[0]}async function B(e,s){let r=(await t.userTasks.query({state:a.DataModels.FlowNodeInstances.FlowNodeInstanceState.suspended},{identity:e,...s})).userTasks.filter(o=>o.actualOwnerId===e.userId);return r.length?r:null}async function R(e,s){let r=(await t.userTasks.query({state:a.DataModels.FlowNodeInstances.FlowNodeInstanceState.suspended},{identity:e,...s})).userTasks.filter(o=>o.assignedUserIds?.includes(e.userId));return r.length?r:null}var c=require("next/headers"),p=require("next-auth/jwt");async function _(){let e=await(0,p.getToken)({req:{cookies:(0,c.cookies)(),headers:(0,c.headers)()}});if(!e?.accessToken||!e?.sub)throw new Error("AccessToken or Sub could not be determined!");return{token:e?.accessToken,userId:e?.sub}}var I=require("@5minds/processcube_engine_client");async function W(){let e=await t.processInstances.query({state:I.DataModels.ProcessInstances.ProcessInstanceState.running});return e.totalCount===0?null:e.processInstances}var m=require("next/cache"),y=require("next/navigation");async function A(e,s){(0,m.revalidatePath)(e),(0,y.redirect)(e,s)}async function G(...e){return await t.processModels.startProcessInstance(...e)}async function v(...e){await t.userTasks.finishUserTask(...e)}0&&(module.exports={finishUserTask,finishUserTaskAndGetNext,getActiveProcessInstances,getAssignedUserTasksByIdentity,getIdentity,getReservedUserTasksByIdentity,getUserTasks,getWaitingUserTaskByCorrelationId,getWaitingUserTaskByFlowNodeInstanceId,getWaitingUserTasks,getWaitingUserTasksByFlowNodeId,hardNavigate,startProcess,waitForUserTask});
|
package/server/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"only-server";import{DataModels as
|
|
1
|
+
import"only-server";import{DataModels as a}from"@5minds/processcube_engine_client";import{EngineClient as I}from"@5minds/processcube_engine_client";var t=new I(process.env.PROCESSCUBE_ENGINE_URL??"http://localhost:10560");async function h(e={}){let{processInstanceId:s,flowNodeId:n}=e;return new Promise(async(r,i)=>{let d=await t.userTasks.onUserTaskWaiting(async o=>{let u=o.flowNodeInstanceId===void 0,l=s!==void 0&&o.processInstanceId!==s,f=n!==void 0&&o.flowNodeId!==n,p=s!==void 0&&n!==void 0&&o.processInstanceId!==s&&o.flowNodeId!==n;if(u||l||f||p)return;let c=await m(o.flowNodeInstanceId);return t.notification.removeSubscription(d),c===null?i(new Error(`UserTask with instance ID "${o.flowNodeInstanceId}" does not exist.`)):r(c)})})}async function C(e,s,n){await t.userTasks.finishUserTask(e,s);let r=await t.userTasks.query({flowNodeId:n,state:a.FlowNodeInstances.FlowNodeInstanceState.suspended});return r.totalCount>0?r.userTasks[0]:null}async function P(...e){return t.userTasks.query(...e)}async function E(e){let s=await t.userTasks.query({state:a.FlowNodeInstances.FlowNodeInstanceState.suspended},e);return s.totalCount===0?null:s.userTasks}async function M(e,s){return t.userTasks.query({flowNodeId:e,state:a.FlowNodeInstances.FlowNodeInstanceState.suspended},s)}async function m(e,s){let n=await t.userTasks.query({flowNodeInstanceId:e,state:a.FlowNodeInstances.FlowNodeInstanceState.suspended},s);return n.userTasks.length?n.userTasks[0]:null}async function q(e){let s=await t.userTasks.query({correlationId:e,state:a.FlowNodeInstances.FlowNodeInstanceState.suspended});return s.totalCount==0?null:s.userTasks[0]}async function b(e,s){let r=(await t.userTasks.query({state:a.FlowNodeInstances.FlowNodeInstanceState.suspended},{identity:e,...s})).userTasks.filter(i=>i.actualOwnerId===e.userId);return r.length?r:null}async function D(e,s){let r=(await t.userTasks.query({state:a.FlowNodeInstances.FlowNodeInstanceState.suspended},{identity:e,...s})).userTasks.filter(i=>i.assignedUserIds?.includes(e.userId));return r.length?r:null}import{cookies as y,headers as w}from"next/headers";import{getToken as T}from"next-auth/jwt";async function W(){let e=await T({req:{cookies:y(),headers:w()}});if(!e?.accessToken||!e?.sub)throw new Error("AccessToken or Sub could not be determined!");return{token:e?.accessToken,userId:e?.sub}}import{DataModels as k}from"@5minds/processcube_engine_client";async function J(){let e=await t.processInstances.query({state:k.ProcessInstances.ProcessInstanceState.running});return e.totalCount===0?null:e.processInstances}import{revalidatePath as g}from"next/cache";import{redirect as N}from"next/navigation";async function Q(e,s){g(e),N(e,s)}async function Y(...e){return await t.processModels.startProcessInstance(...e)}async function Z(...e){await t.userTasks.finishUserTask(...e)}export{Z as finishUserTask,C as finishUserTaskAndGetNext,J as getActiveProcessInstances,D as getAssignedUserTasksByIdentity,W as getIdentity,b as getReservedUserTasksByIdentity,P as getUserTasks,q as getWaitingUserTaskByCorrelationId,m as getWaitingUserTaskByFlowNodeInstanceId,E as getWaitingUserTasks,M as getWaitingUserTasksByFlowNodeId,Q as hardNavigate,Y as startProcess,h as waitForUserTask};
|
|
@@ -1,8 +1,2 @@
|
|
|
1
1
|
import { DataModels } from '@5minds/processcube_engine_client';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
* @param options The query options of {@link Client.processInstances.query}
|
|
6
|
-
* @returns {DataModels.ProcessInstances.ProcessInstance[] | null}
|
|
7
|
-
*/
|
|
8
|
-
export declare function getActiveProcessInstances(options?: Parameters<typeof Client.processInstances.query>[1]): Promise<DataModels.ProcessInstances.ProcessInstance[] | null>;
|
|
2
|
+
export declare function getActiveProcessInstances(): Promise<DataModels.ProcessInstances.ProcessInstance[] | null>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { DataModels } from '@5minds/processcube_engine_client';
|
|
2
2
|
import { Client } from './internal/EngineClient';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
* If there is already a UserTask waiting, this function will return it.
|
|
4
|
+
* Waits for a UserTask to be created and returns it.
|
|
6
5
|
*
|
|
7
6
|
* @param filterBy Additional filter options
|
|
8
7
|
* @param filterBy.processInstanceId The ID of the ProcessInstance the UserTask belongs to
|
|
@@ -14,37 +13,36 @@ export declare function waitForUserTask(filterBy?: {
|
|
|
14
13
|
flowNodeId?: string;
|
|
15
14
|
}): Promise<DataModels.FlowNodeInstances.UserTaskInstance>;
|
|
16
15
|
export declare function finishUserTaskAndGetNext(flowNodeInstanceId: string, result: any, flowNodeId: string): Promise<DataModels.FlowNodeInstances.UserTaskInstance | null>;
|
|
17
|
-
export declare function getUserTasks(...args: Parameters<typeof Client.userTasks.query>): Promise<DataModels.FlowNodeInstances.
|
|
16
|
+
export declare function getUserTasks(...args: Parameters<typeof Client.userTasks.query>): Promise<DataModels.FlowNodeInstances.UserTaskList>;
|
|
18
17
|
/**
|
|
19
18
|
*
|
|
20
|
-
* @param options Additional options for the query e.g.
|
|
21
|
-
* @returns
|
|
19
|
+
* @param options Additional options for the query e.g. `identity` or `sortSettings`
|
|
20
|
+
* @returns DataModels.FlowNodeInstances.UserTaskList
|
|
22
21
|
*/
|
|
23
22
|
export declare function getWaitingUserTasks(options?: Parameters<typeof Client.userTasks.query>[1]): Promise<DataModels.FlowNodeInstances.UserTaskInstance[] | null>;
|
|
24
23
|
/**
|
|
25
24
|
*
|
|
26
25
|
* @param flowNodeId The UserTasks ID (BPMN)
|
|
27
|
-
* @param options Additional options for the query e.g.
|
|
28
|
-
* @returns
|
|
26
|
+
* @param options Additional options for the query e.g. `identity` or `sortSettings`
|
|
27
|
+
* @returns DataModels.FlowNodeInstances.UserTaskList
|
|
29
28
|
*/
|
|
30
|
-
export declare function getWaitingUserTasksByFlowNodeId(flowNodeId: string | string[], options?: Parameters<typeof Client.userTasks.query>[1]): Promise<DataModels.FlowNodeInstances.
|
|
29
|
+
export declare function getWaitingUserTasksByFlowNodeId(flowNodeId: string | string[], options?: Parameters<typeof Client.userTasks.query>[1]): Promise<DataModels.FlowNodeInstances.UserTaskList>;
|
|
31
30
|
/**
|
|
32
31
|
*
|
|
33
32
|
* @param flowNodeInstanceId The UserTask Instance ID
|
|
34
|
-
* @param options Additional options for the query e.g.
|
|
35
|
-
* @returns
|
|
33
|
+
* @param options Additional options for the query e.g. `identity`
|
|
34
|
+
* @returns DataModels.FlowNodeInstances.UserTaskInstance | null
|
|
36
35
|
*/
|
|
37
36
|
export declare function getWaitingUserTaskByFlowNodeInstanceId(flowNodeInstanceId: string, options?: Parameters<typeof Client.userTasks.query>[1]): Promise<DataModels.FlowNodeInstances.UserTaskInstance | null>;
|
|
38
37
|
/**
|
|
39
38
|
* @param correlationId The Correlation ID
|
|
40
|
-
* @
|
|
41
|
-
* @returns {Promise<DataModels.FlowNodeInstances.UserTaskInstance[] | null>}
|
|
39
|
+
* @returns DataModels.FlowNodeInstances.UserTaskInstance | null
|
|
42
40
|
*/
|
|
43
|
-
export declare function
|
|
41
|
+
export declare function getWaitingUserTaskByCorrelationId(correlationId: string): Promise<DataModels.FlowNodeInstances.UserTaskInstance | null>;
|
|
44
42
|
/**
|
|
45
43
|
* @param identity The identity of the user
|
|
46
|
-
* @param options Additional options for the query e.g.
|
|
47
|
-
* @returns
|
|
44
|
+
* @param options Additional options for the query e.g. `sortSettings`
|
|
45
|
+
* @returns DataModels.FlowNodeInstances.UserTaskInstance[] | null
|
|
48
46
|
*/
|
|
49
47
|
export declare function getReservedUserTasksByIdentity(identity: DataModels.Iam.Identity, options?: {
|
|
50
48
|
offset?: number;
|
|
@@ -54,8 +52,8 @@ export declare function getReservedUserTasksByIdentity(identity: DataModels.Iam.
|
|
|
54
52
|
/**
|
|
55
53
|
*
|
|
56
54
|
* @param identity The identity of the user
|
|
57
|
-
* @param options Additional options for the query e.g.
|
|
58
|
-
* @returns
|
|
55
|
+
* @param options Additional options for the query e.g. `sortSettings`
|
|
56
|
+
* @returns DataModels.FlowNodeInstances.UserTaskInstance[] | null
|
|
59
57
|
*/
|
|
60
58
|
export declare function getAssignedUserTasksByIdentity(identity: DataModels.Iam.Identity, options?: {
|
|
61
59
|
offset?: number;
|