@cubekit-cloud/cubekit-sdk-js 1.0.53 → 1.0.54
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/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/core/CubekitOrmClient.d.ts +3 -2
- package/dist/cjs/types/core/CubekitOrmClient.d.ts.map +1 -1
- package/dist/cjs/types/interfaces/Orm/Workflow/IActionGroup.d.ts +1 -1
- package/dist/cjs/types/interfaces/Orm/Workflow/IActionGroup.d.ts.map +1 -1
- package/dist/cjs/types/interfaces/Orm/Workflow/IProcessState.d.ts +7 -7
- package/dist/cjs/types/interfaces/Orm/Workflow/IProcessState.d.ts.map +1 -1
- package/dist/cjs/types/interfaces/Orm/Workflow/IWorkflowData.d.ts +80 -0
- package/dist/cjs/types/interfaces/Orm/Workflow/IWorkflowData.d.ts.map +1 -0
- package/dist/cjs/types/interfaces/Orm/Workflow/IWorkflowDefinition.d.ts +18 -0
- package/dist/cjs/types/interfaces/Orm/Workflow/IWorkflowDefinition.d.ts.map +1 -0
- package/dist/cjs/types/interfaces/Orm/Workflow/IWorkflowDocumentInfo.d.ts +12 -0
- package/dist/cjs/types/interfaces/Orm/Workflow/IWorkflowDocumentInfo.d.ts.map +1 -0
- package/dist/cjs/types/interfaces/Orm/Workflow/IWorkflowInstance.d.ts +10 -2
- package/dist/cjs/types/interfaces/Orm/Workflow/IWorkflowInstance.d.ts.map +1 -1
- package/dist/cjs/types/interfaces/Orm/Workflow/IWorkflowInstanceMeta.d.ts +4 -0
- package/dist/cjs/types/interfaces/Orm/Workflow/IWorkflowInstanceMeta.d.ts.map +1 -0
- package/dist/cjs/types/interfaces/Orm/response/IWorkflowResponse.d.ts +6 -0
- package/dist/cjs/types/interfaces/Orm/response/IWorkflowResponse.d.ts.map +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/core/CubekitOrmClient.d.ts +3 -2
- package/dist/esm/types/core/CubekitOrmClient.d.ts.map +1 -1
- package/dist/esm/types/interfaces/Orm/Workflow/IActionGroup.d.ts +1 -1
- package/dist/esm/types/interfaces/Orm/Workflow/IActionGroup.d.ts.map +1 -1
- package/dist/esm/types/interfaces/Orm/Workflow/IProcessState.d.ts +7 -7
- package/dist/esm/types/interfaces/Orm/Workflow/IProcessState.d.ts.map +1 -1
- package/dist/esm/types/interfaces/Orm/Workflow/IWorkflowData.d.ts +80 -0
- package/dist/esm/types/interfaces/Orm/Workflow/IWorkflowData.d.ts.map +1 -0
- package/dist/esm/types/interfaces/Orm/Workflow/IWorkflowDefinition.d.ts +18 -0
- package/dist/esm/types/interfaces/Orm/Workflow/IWorkflowDefinition.d.ts.map +1 -0
- package/dist/esm/types/interfaces/Orm/Workflow/IWorkflowDocumentInfo.d.ts +12 -0
- package/dist/esm/types/interfaces/Orm/Workflow/IWorkflowDocumentInfo.d.ts.map +1 -0
- package/dist/esm/types/interfaces/Orm/Workflow/IWorkflowInstance.d.ts +10 -2
- package/dist/esm/types/interfaces/Orm/Workflow/IWorkflowInstance.d.ts.map +1 -1
- package/dist/esm/types/interfaces/Orm/Workflow/IWorkflowInstanceMeta.d.ts +4 -0
- package/dist/esm/types/interfaces/Orm/Workflow/IWorkflowInstanceMeta.d.ts.map +1 -0
- package/dist/esm/types/interfaces/Orm/response/IWorkflowResponse.d.ts +6 -0
- package/dist/esm/types/interfaces/Orm/response/IWorkflowResponse.d.ts.map +1 -0
- package/dist/index.d.ts +126 -13
- package/package.json +1 -1
- package/src/core/CubekitOrmClient.ts +10 -3
- package/src/interfaces/Orm/Workflow/IActionGroup.ts +1 -1
- package/src/interfaces/Orm/Workflow/IProcessState.ts +10 -7
- package/src/interfaces/Orm/Workflow/IWorkflowData.ts +88 -0
- package/src/interfaces/Orm/Workflow/IWorkflowDefinition.ts +17 -0
- package/src/interfaces/Orm/Workflow/IWorkflowDocumentInfo.ts +11 -0
- package/src/interfaces/Orm/Workflow/IWorkflowInstance.ts +11 -2
- package/src/interfaces/Orm/Workflow/IWorkflowInstanceMeta.ts +3 -0
- package/src/interfaces/Orm/response/IWorkflowResponse.ts +6 -0
- package/src/interfaces/Orm/Workflow/IDefinition.ts +0 -5
package/dist/cjs/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e,t,s,o,r,a,i,n,p,d,u,h,l,x=require("axios");exports.RelationsModesEnum=void 0,(e=exports.RelationsModesEnum||(exports.RelationsModesEnum={})).SYNC="sync",e.ATTACH="attach",e.DETACH="detach",exports.AggregationsEnum=void 0,(t=exports.AggregationsEnum||(exports.AggregationsEnum={})).COUNT="count",t.SUM="sum",t.AVG="avg",t.MIN="min",t.MAX="max",exports.OperatorsEnum=void 0,(s=exports.OperatorsEnum||(exports.OperatorsEnum={})).EQUAL="=",s.INEQUAL="!=",s.LIKE="like",s.ILIKE="ilike",s.MORE=">",s.MORE_OR_EQUAL=">=",s.LESS="<",s.LESS_OR_EQUAL="<=",exports.FilterValueTypesEnum=void 0,(o=exports.FilterValueTypesEnum||(exports.FilterValueTypesEnum={})).POINTER="pointer",o.SCALAR="scalar",exports.FilterBooleansEnum=void 0,(r=exports.FilterBooleansEnum||(exports.FilterBooleansEnum={})).AND="and",r.OR="or",exports.FilterTypesEnum=void 0,(a=exports.FilterTypesEnum||(exports.FilterTypesEnum={})).GROUP="group",a.SINGLE="single",exports.JoinTypesEnum=void 0,(i=exports.JoinTypesEnum||(exports.JoinTypesEnum={})).LEFT="left",i.RIGHT="right",i.FULL="full",i.INNER="inner",exports.OrderDirectionsEnum=void 0,(n=exports.OrderDirectionsEnum||(exports.OrderDirectionsEnum={})).ASC="asc",n.DESC="desc",exports.OrderNullPositionsEnum=void 0,(p=exports.OrderNullPositionsEnum||(exports.OrderNullPositionsEnum={})).FIRST="first",p.LAST="last",exports.ResponseTypeEnum=void 0,(d=exports.ResponseTypeEnum||(exports.ResponseTypeEnum={})).RESOURCE="resource",d.EXPORT="export",exports.FileExportTypesEnum=void 0,(u=exports.FileExportTypesEnum||(exports.FileExportTypesEnum={})).XLSX="xlsx",u.CSV="csv",exports.ExportEncodingTypesEnum=void 0,(h=exports.ExportEncodingTypesEnum||(exports.ExportEncodingTypesEnum={})).UTF_8="utf-8",h.WINDOWS_1251="windows-1251",exports.RequestOrmMethodsEnum=void 0,(l=exports.RequestOrmMethodsEnum||(exports.RequestOrmMethodsEnum={})).SEARCH="search",l.GET_BY_ID="get_by_id",l.CREATE="create",l.UPDATE="update",l.DELETE="delete";const E="http://cubekit-workflow-runtime-server-develop.cluster.it-aces.com",c="{key}";exports.CubekitOrmClient=class{axios;constructor(e){this.axios=x.create({baseURL:e.baseUrl,withCredentials:!0,headers:{"x-api-key":e.serviceKey}})}setConfig(e){this.axios.defaults.baseURL=e.baseUrl,this.axios.defaults.headers["x-api-key"]=e.serviceKey}setAuthorizationHeader(e){this.axios.defaults.headers.Authorization=e}send(e){switch(e.method){case exports.RequestOrmMethodsEnum.GET_BY_ID:return this.getById(e);case exports.RequestOrmMethodsEnum.CREATE:return this.create(e);case exports.RequestOrmMethodsEnum.UPDATE:return this.update(e);case exports.RequestOrmMethodsEnum.DELETE:return this.delete(e);default:return this.search(e)}}preparePathWithId(e,t){return e=e.indexOf(c)>-1?e.replace(c,t):"/"===e.slice(-1)?`${e}${t}`:`${e}/${t}`}search(e){let t=e.path;const s=e.options;return s.pagination&&(t+="?",s.pagination.limit&&(t=`${t}limit=${s.pagination.limit}&`),s.pagination.page&&(t=`${t}page=${s.pagination.page}`)),delete s.pagination,this.axios.post(t,s)}getById(e){const t=e.options;return this.axios.post(this.preparePathWithId(e.path,t.id),t)}create(e){return this.axios.post(e.path,e.options)}update(e){const t=e.options;return this.axios.put(this.preparePathWithId(e.path,t.id),e.options)}delete(e){const t=e.options;return this.axios.delete(this.preparePathWithId(e.path,t.id),{data:e.options})}getProcessState(e,t){return this.axios.get(`${E}/api/v1.0/workflow/tenants/${e}/entities/${t}/widget_state`)}startProcess(e,t,s){return this.axios.post(`${E}/api/v1.0/workflow/tenants/${e}/defenitions/${t}/start/${s}`)}executeProcessAction(e,t,s){return this.axios.post(`${E}/api/v1.0/workflow/tenants/${e}/instance/${t}/actions/${s}/execute
|
|
1
|
+
"use strict";var e,t,s,o,r,a,i,n,p,d,u,h,l,x=require("axios");exports.RelationsModesEnum=void 0,(e=exports.RelationsModesEnum||(exports.RelationsModesEnum={})).SYNC="sync",e.ATTACH="attach",e.DETACH="detach",exports.AggregationsEnum=void 0,(t=exports.AggregationsEnum||(exports.AggregationsEnum={})).COUNT="count",t.SUM="sum",t.AVG="avg",t.MIN="min",t.MAX="max",exports.OperatorsEnum=void 0,(s=exports.OperatorsEnum||(exports.OperatorsEnum={})).EQUAL="=",s.INEQUAL="!=",s.LIKE="like",s.ILIKE="ilike",s.MORE=">",s.MORE_OR_EQUAL=">=",s.LESS="<",s.LESS_OR_EQUAL="<=",exports.FilterValueTypesEnum=void 0,(o=exports.FilterValueTypesEnum||(exports.FilterValueTypesEnum={})).POINTER="pointer",o.SCALAR="scalar",exports.FilterBooleansEnum=void 0,(r=exports.FilterBooleansEnum||(exports.FilterBooleansEnum={})).AND="and",r.OR="or",exports.FilterTypesEnum=void 0,(a=exports.FilterTypesEnum||(exports.FilterTypesEnum={})).GROUP="group",a.SINGLE="single",exports.JoinTypesEnum=void 0,(i=exports.JoinTypesEnum||(exports.JoinTypesEnum={})).LEFT="left",i.RIGHT="right",i.FULL="full",i.INNER="inner",exports.OrderDirectionsEnum=void 0,(n=exports.OrderDirectionsEnum||(exports.OrderDirectionsEnum={})).ASC="asc",n.DESC="desc",exports.OrderNullPositionsEnum=void 0,(p=exports.OrderNullPositionsEnum||(exports.OrderNullPositionsEnum={})).FIRST="first",p.LAST="last",exports.ResponseTypeEnum=void 0,(d=exports.ResponseTypeEnum||(exports.ResponseTypeEnum={})).RESOURCE="resource",d.EXPORT="export",exports.FileExportTypesEnum=void 0,(u=exports.FileExportTypesEnum||(exports.FileExportTypesEnum={})).XLSX="xlsx",u.CSV="csv",exports.ExportEncodingTypesEnum=void 0,(h=exports.ExportEncodingTypesEnum||(exports.ExportEncodingTypesEnum={})).UTF_8="utf-8",h.WINDOWS_1251="windows-1251",exports.RequestOrmMethodsEnum=void 0,(l=exports.RequestOrmMethodsEnum||(exports.RequestOrmMethodsEnum={})).SEARCH="search",l.GET_BY_ID="get_by_id",l.CREATE="create",l.UPDATE="update",l.DELETE="delete";const E="http://cubekit-workflow-runtime-server-develop.cluster.it-aces.com",c="{key}";exports.CubekitOrmClient=class{axios;constructor(e){this.axios=x.create({baseURL:e.baseUrl,withCredentials:!0,headers:{"x-api-key":e.serviceKey}})}setConfig(e){this.axios.defaults.baseURL=e.baseUrl,this.axios.defaults.headers["x-api-key"]=e.serviceKey}setAuthorizationHeader(e){this.axios.defaults.headers.Authorization=e}send(e){switch(e.method){case exports.RequestOrmMethodsEnum.GET_BY_ID:return this.getById(e);case exports.RequestOrmMethodsEnum.CREATE:return this.create(e);case exports.RequestOrmMethodsEnum.UPDATE:return this.update(e);case exports.RequestOrmMethodsEnum.DELETE:return this.delete(e);default:return this.search(e)}}preparePathWithId(e,t){return e=e.indexOf(c)>-1?e.replace(c,t):"/"===e.slice(-1)?`${e}${t}`:`${e}/${t}`}search(e){let t=e.path;const s=e.options;return s.pagination&&(t+="?",s.pagination.limit&&(t=`${t}limit=${s.pagination.limit}&`),s.pagination.page&&(t=`${t}page=${s.pagination.page}`)),delete s.pagination,this.axios.post(t,s)}getById(e){const t=e.options;return this.axios.post(this.preparePathWithId(e.path,t.id),t)}create(e){return this.axios.post(e.path,e.options)}update(e){const t=e.options;return this.axios.put(this.preparePathWithId(e.path,t.id),e.options)}delete(e){const t=e.options;return this.axios.delete(this.preparePathWithId(e.path,t.id),{data:e.options})}getProcessState(e,t){return this.axios.get(`${E}/api/v1.0/workflow/tenants/${e}/entities/${t}/widget_state`)}startProcess(e,t,s){return this.axios.post(`${E}/api/v1.0/workflow/tenants/${e}/defenitions/${t}/start/${s}`)}executeProcessAction(e,t,s,o){return this.axios.post(`${E}/api/v1.0/workflow/tenants/${e}/instance/${t}/actions/${s}/execute`,o)}},exports.CubekitStorageClient=class{axios;constructor(e){this.axios=x.create({baseURL:e.baseUrl,withCredentials:!0,headers:{"x-api-key":e.serviceKey}})}setConfig(e){this.axios.defaults.baseURL=e.baseUrl,this.axios.defaults.headers["x-api-key"]=e.serviceKey}setAuthorizationHeader(e){this.axios.defaults.headers.Authorization=e}getFolderTree(e){return this.axios.get(`/trees?path=${encodeURIComponent(e||"/")}`).then((e=>e.data.data))}view(e,t,s,o,r){const a=new URLSearchParams;return a.append("path",e||"/"),t&&a.append("order_by",t),s&&a.append("order",s),o&&a.append("filter_by",o),r&&a.append("filter",r),this.axios.get(`/objects?${a.toString()}`).then((e=>e.data.data))}createDirectory(e){return this.axios.put(`/objects/${encodeURIComponent(e)}`).then((e=>e.data))}delete(e){return this.axios.delete("/objects",{data:e}).then((e=>e.data))}upload(e,t,s,o){const r=new FormData;return r.append("path",e),t.forEach((e=>{r.append("files",e)})),this.axios.put("/objects",r,{onUploadProgress:s,signal:o,headers:{"Content-Type":"multipart/form-data"}}).then((e=>e.data))}resend(e){return this.axios.request(e).then((e=>e.data))}simpleUpload(e,t,s,o){const r=new FormData;return r.append("path",e),t.forEach((e=>{r.append("files",e)})),this.axios.post("/objects",r,{onUploadProgress:s,signal:o,headers:{"Content-Type":"multipart/form-data"}}).then((e=>e.data))}move(e,t){return this.axios.patch(`/objects/${encodeURIComponent(e)}`,{target:t}).then((e=>e.data))}download(e,t){return this.axios.post(`/bulkDownloads?path=${encodeURIComponent(e)}`,t,{responseType:"blob"})}};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/enums/index.ts","../../src/config/const.ts","../../src/core/CubekitOrmClient.ts","../../src/core/CubekitStorageClient.ts"],"sourcesContent":[null,null,null,null],"names":["RelationsModesEnum","AggregationsEnum","OperatorsEnum","FilterValueTypesEnum","FilterBooleansEnum","FilterTypesEnum","JoinTypesEnum","OrderDirectionsEnum","OrderNullPositionsEnum","ResponseTypeEnum","FileExportTypesEnum","ExportEncodingTypesEnum","RequestOrmMethodsEnum","WORKFLOW_URL","ID_SPOT","axios","constructor","config","this","create","baseURL","baseUrl","withCredentials","headers","serviceKey","setConfig","defaults","setAuthorizationHeader","value","send","params","method","GET_BY_ID","getById","CREATE","UPDATE","update","DELETE","delete","search","preparePathWithId","path","id","indexOf","replace","slice","url","options","pagination","limit","page","post","put","data","getProcessState","tenantId","entityId","get","startProcess","workflowDefenitionId","executeProcessAction","workflowInstanceId","actionId","getFolderTree","encodeURIComponent","then","response","view","order_by","order","filter_by","filter","searchParams","URLSearchParams","append","toString","createDirectory","paths","upload","files","onUploadProgress","signal","formData","FormData","forEach","file","resend","request","simpleUpload","move","source","target","patch","download","objects","responseType"],"mappings":"iBAAYA,EAMAC,EAQAC,EAWAC,EAKAC,EAKAC,EAKAC,EAOAC,EAKAC,EAKAC,EAKAC,EAKAC,EAKAC,qBAxEAZ,QAIXA,wBAAA,GAJWA,EAAAA,6BAAAA,QAAAA,mBAIX,CAAA,IAHG,KAAA,OACAA,EAAA,OAAA,SACAA,EAAA,OAAA,SAGQC,QAMXA,sBAAA,GANWA,EAAAA,2BAAAA,QAAAA,iBAMX,CAAA,IALG,MAAA,QACAA,EAAA,IAAA,MACAA,EAAA,IAAA,MACAA,EAAA,IAAA,MACAA,EAAA,IAAA,MAGQC,QASXA,mBAAA,GATWA,EAAAA,wBAAAA,QAAAA,cASX,CAAA,IARG,MAAA,IACAA,EAAA,QAAA,KACAA,EAAA,KAAA,OACAA,EAAA,MAAA,QACAA,EAAA,KAAA,IACAA,EAAA,cAAA,KACAA,EAAA,KAAA,IACAA,EAAA,cAAA,KAGQC,QAGXA,0BAAA,GAHWA,EAAAA,+BAAAA,QAAAA,qBAGX,CAAA,IAFG,QAAA,UACAA,EAAA,OAAA,SAGQC,QAGXA,wBAAA,GAHWA,EAAAA,6BAAAA,QAAAA,mBAGX,CAAA,IAFG,IAAA,MACAA,EAAA,GAAA,KAGQC,QAGXA,qBAAA,GAHWA,EAAAA,0BAAAA,QAAAA,gBAGX,CAAA,IAFG,MAAA,QACAA,EAAA,OAAA,SAGQC,QAKXA,mBAAA,GALWA,EAAAA,wBAAAA,QAAAA,cAKX,CAAA,IAJG,KAAA,OACAA,EAAA,MAAA,QACAA,EAAA,KAAA,OACAA,EAAA,MAAA,QAGQC,QAGXA,yBAAA,GAHWA,EAAAA,8BAAAA,QAAAA,oBAGX,CAAA,IAFG,IAAA,MACAA,EAAA,KAAA,OAGQC,QAGXA,4BAAA,GAHWA,EAAAA,iCAAAA,QAAAA,uBAGX,CAAA,IAFG,MAAA,QACAA,EAAA,KAAA,OAGQC,QAGXA,sBAAA,GAHWA,EAAAA,2BAAAA,QAAAA,iBAGX,CAAA,IAFG,SAAA,WACAA,EAAA,OAAA,SAGQC,QAGXA,yBAAA,GAHWA,EAAAA,8BAAAA,QAAAA,oBAGX,CAAA,IAFG,KAAA,OACAA,EAAA,IAAA,MAGQC,QAGXA,6BAAA,GAHWA,EAAAA,kCAAAA,QAAAA,wBAGX,CAAA,IAFG,MAAA,QACAA,EAAA,aAAA,eAGQC,QAMXA,2BAAA,GANWA,EAAAA,QAAqBA,wBAArBA,8BAMX,CAAA,IALG,OAAA,SACAA,EAAA,UAAA,YACAA,EAAA,OAAA,SACAA,EAAA,OAAA,SACAA,EAAA,OAAA,SC7EG,MAAMC,EAAe,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/enums/index.ts","../../src/config/const.ts","../../src/core/CubekitOrmClient.ts","../../src/core/CubekitStorageClient.ts"],"sourcesContent":[null,null,null,null],"names":["RelationsModesEnum","AggregationsEnum","OperatorsEnum","FilterValueTypesEnum","FilterBooleansEnum","FilterTypesEnum","JoinTypesEnum","OrderDirectionsEnum","OrderNullPositionsEnum","ResponseTypeEnum","FileExportTypesEnum","ExportEncodingTypesEnum","RequestOrmMethodsEnum","WORKFLOW_URL","ID_SPOT","axios","constructor","config","this","create","baseURL","baseUrl","withCredentials","headers","serviceKey","setConfig","defaults","setAuthorizationHeader","value","send","params","method","GET_BY_ID","getById","CREATE","UPDATE","update","DELETE","delete","search","preparePathWithId","path","id","indexOf","replace","slice","url","options","pagination","limit","page","post","put","data","getProcessState","tenantId","entityId","get","startProcess","workflowDefenitionId","executeProcessAction","workflowInstanceId","actionId","getFolderTree","encodeURIComponent","then","response","view","order_by","order","filter_by","filter","searchParams","URLSearchParams","append","toString","createDirectory","paths","upload","files","onUploadProgress","signal","formData","FormData","forEach","file","resend","request","simpleUpload","move","source","target","patch","download","objects","responseType"],"mappings":"iBAAYA,EAMAC,EAQAC,EAWAC,EAKAC,EAKAC,EAKAC,EAOAC,EAKAC,EAKAC,EAKAC,EAKAC,EAKAC,qBAxEAZ,QAIXA,wBAAA,GAJWA,EAAAA,6BAAAA,QAAAA,mBAIX,CAAA,IAHG,KAAA,OACAA,EAAA,OAAA,SACAA,EAAA,OAAA,SAGQC,QAMXA,sBAAA,GANWA,EAAAA,2BAAAA,QAAAA,iBAMX,CAAA,IALG,MAAA,QACAA,EAAA,IAAA,MACAA,EAAA,IAAA,MACAA,EAAA,IAAA,MACAA,EAAA,IAAA,MAGQC,QASXA,mBAAA,GATWA,EAAAA,wBAAAA,QAAAA,cASX,CAAA,IARG,MAAA,IACAA,EAAA,QAAA,KACAA,EAAA,KAAA,OACAA,EAAA,MAAA,QACAA,EAAA,KAAA,IACAA,EAAA,cAAA,KACAA,EAAA,KAAA,IACAA,EAAA,cAAA,KAGQC,QAGXA,0BAAA,GAHWA,EAAAA,+BAAAA,QAAAA,qBAGX,CAAA,IAFG,QAAA,UACAA,EAAA,OAAA,SAGQC,QAGXA,wBAAA,GAHWA,EAAAA,6BAAAA,QAAAA,mBAGX,CAAA,IAFG,IAAA,MACAA,EAAA,GAAA,KAGQC,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|
import IOrmRequestParameter from '../interfaces/Orm/IOrmRequestParameter';
|
|
3
3
|
import { IResponse } from '../interfaces/Orm';
|
|
4
4
|
import IProcessState from '../interfaces/Orm/Workflow/IProcessState';
|
|
5
|
+
import IWorkflowResponse from '../interfaces/Orm/response/IWorkflowResponse';
|
|
5
6
|
/**
|
|
6
7
|
* @class
|
|
7
8
|
* ```ts
|
|
@@ -70,8 +71,8 @@ declare class CubekitOrmClient {
|
|
|
70
71
|
private update;
|
|
71
72
|
private delete;
|
|
72
73
|
getProcessState(tenantId: string, entityId: string): Promise<import("axios").AxiosResponse<IResponse<IProcessState>, any>>;
|
|
73
|
-
startProcess(tenantId: string, workflowDefenitionId: string, entityId: string): Promise<import("axios").AxiosResponse<
|
|
74
|
-
executeProcessAction(tenantId: string, workflowInstanceId: string, actionId: string): Promise<import("axios").AxiosResponse<IResponse<IProcessState>, any>>;
|
|
74
|
+
startProcess(tenantId: string, workflowDefenitionId: string, entityId: string): Promise<import("axios").AxiosResponse<IWorkflowResponse, any>>;
|
|
75
|
+
executeProcessAction(tenantId: string, workflowInstanceId: string, actionId: string, data: any): Promise<import("axios").AxiosResponse<IResponse<IProcessState>, any>>;
|
|
75
76
|
}
|
|
76
77
|
export default CubekitOrmClient;
|
|
77
78
|
//# sourceMappingURL=CubekitOrmClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CubekitOrmClient.d.ts","sourceRoot":"","sources":["../../src/core/CubekitOrmClient.ts"],"names":[],"mappings":"AACA,OAAO,gBAAgB,MAAM,oCAAoC,CAAC;AAClE,OAAO,oBAAoB,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EACN,SAAS,EAKT,MAAM,mBAAmB,CAAC;AAG3B,OAAO,aAAa,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"CubekitOrmClient.d.ts","sourceRoot":"","sources":["../../src/core/CubekitOrmClient.ts"],"names":[],"mappings":"AACA,OAAO,gBAAgB,MAAM,oC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ionGroup.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/Orm/Workflow/IActionGroup.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,GAAG,GAAG,IAAI,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,EAAE,MAAM,CAAC;CACzB"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { IActionGroup } from
|
|
1
|
+
import { IActionGroup } from './IActionGroup';
|
|
2
2
|
import { IStepLink } from './IStepLink';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { IWorkflowInstance } from
|
|
3
|
+
import { IProcessHistory } from './IProcessHistory';
|
|
4
|
+
import { IStep } from './IStep';
|
|
5
|
+
import { IWorkflowDefinition } from './IWorkflowDefinition';
|
|
6
|
+
import { IWorkflowInstance } from './IWorkflowInstance';
|
|
7
7
|
export default interface IProcessState {
|
|
8
|
-
workflow_instance: IWorkflowInstance
|
|
9
|
-
definition:
|
|
8
|
+
workflow_instance: Pick<IWorkflowInstance, 'id' | 'status' | 'workflow_definition_id' | 'initiator_id' | 'initiated_at' | 'current_step_id'>;
|
|
9
|
+
definition: Pick<IWorkflowDefinition, 'id' | 'code' | 'name'>;
|
|
10
10
|
current_step: IStepLink;
|
|
11
11
|
step_actions: IStep[];
|
|
12
12
|
allowed_actions: IStep[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IProcessState.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/Orm/Workflow/IProcessState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"IProcessState.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/Orm/Workflow/IProcessState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,MAAM,CAAC,OAAO,WAAW,aAAa;IACrC,iBAAiB,EAAE,IAAI,CACtB,iBAAiB,EACjB,IAAI,GAAG,QAAQ,GAAG,wBAAwB,GAAG,cAAc,GAAG,cAAc,GAAG,iBAAiB,CAChG,CAAC;IACF,UAAU,EAAE,IAAI,CAAC,mBAAmB,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC,CAAC;IAC9D,YAAY,EAAE,SAAS,CAAC;IACxB,YAAY,EAAE,KAAK,EAAE,CAAC;IACtB,eAAe,EAAE,KAAK,EAAE,CAAC;IACzB,aAAa,EAAE,YAAY,EAAE,CAAC;IAC9B,OAAO,EAAE,eAAe,EAAE,CAAC;CAC3B"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { IActionGroup } from './IActionGroup';
|
|
2
|
+
import { IProcessHistory } from './IProcessHistory';
|
|
3
|
+
import { IWorkflowDefinition } from './IWorkflowDefinition';
|
|
4
|
+
export interface IWorkflowData {
|
|
5
|
+
definition: IWorkflowDefinition;
|
|
6
|
+
current_step_id: string;
|
|
7
|
+
steps: Record<string, WorkflowStep>;
|
|
8
|
+
history: IProcessHistory[];
|
|
9
|
+
status: string;
|
|
10
|
+
build_meta: BuildMeta;
|
|
11
|
+
document: DocumentData;
|
|
12
|
+
document_meta: DocumentMeta;
|
|
13
|
+
}
|
|
14
|
+
interface BuildMeta {
|
|
15
|
+
synced_at: string | null;
|
|
16
|
+
}
|
|
17
|
+
interface DocumentData {
|
|
18
|
+
id: string;
|
|
19
|
+
name: string;
|
|
20
|
+
price: number | null;
|
|
21
|
+
file: any | null;
|
|
22
|
+
description: string | null;
|
|
23
|
+
created_at: string;
|
|
24
|
+
updated_at: string | null;
|
|
25
|
+
deleted_at: string | null;
|
|
26
|
+
status: any | null;
|
|
27
|
+
meta: any | null;
|
|
28
|
+
}
|
|
29
|
+
interface DocumentMeta {
|
|
30
|
+
snapshot_at: string;
|
|
31
|
+
source: 'orm_http' | string;
|
|
32
|
+
}
|
|
33
|
+
interface WorkflowStep {
|
|
34
|
+
id: string;
|
|
35
|
+
name: string;
|
|
36
|
+
order: number;
|
|
37
|
+
auto_approve: boolean;
|
|
38
|
+
is_skippable_on_retry: boolean;
|
|
39
|
+
validations: any[];
|
|
40
|
+
actions: Record<string, WorkflowAction>;
|
|
41
|
+
transitions: Record<string, Transition>;
|
|
42
|
+
action_groups: IActionGroup[];
|
|
43
|
+
}
|
|
44
|
+
interface WorkflowAction {
|
|
45
|
+
build: ActionBuild;
|
|
46
|
+
state: ActionState;
|
|
47
|
+
}
|
|
48
|
+
interface ActionBuild {
|
|
49
|
+
id: string;
|
|
50
|
+
name: string;
|
|
51
|
+
label: string;
|
|
52
|
+
action_type: string;
|
|
53
|
+
assignee_type: string;
|
|
54
|
+
workflow_action_group_id: string;
|
|
55
|
+
assignee_value: string[];
|
|
56
|
+
condition_expression: ConditionExpression | any[];
|
|
57
|
+
appearance_expression: any[];
|
|
58
|
+
callback_timeout_minutes: number | null;
|
|
59
|
+
}
|
|
60
|
+
interface ConditionExpression {
|
|
61
|
+
[field: string]: string[];
|
|
62
|
+
}
|
|
63
|
+
interface ActionState {
|
|
64
|
+
status: string;
|
|
65
|
+
result: any | null;
|
|
66
|
+
timestamp: string | null;
|
|
67
|
+
user_id: string | null;
|
|
68
|
+
payload: any[];
|
|
69
|
+
errors: any[];
|
|
70
|
+
}
|
|
71
|
+
interface Transition {
|
|
72
|
+
id: string;
|
|
73
|
+
action_id: string;
|
|
74
|
+
from_step_id: string;
|
|
75
|
+
to_step_id: string;
|
|
76
|
+
is_default: boolean;
|
|
77
|
+
condition_expression: any | null;
|
|
78
|
+
}
|
|
79
|
+
export {};
|
|
80
|
+
//# sourceMappingURL=IWorkflowData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IWorkflowData.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/Orm/Workflow/IWorkflowData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,WAAW,aAAa;IAC7B,UAAU,EAAE,mBAAmB,CAAC;IAChC,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IACpC,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,SAAS,CAAC;IACtB,QAAQ,EAAE,YAAY,CAAC;IACvB,aAAa,EAAE,YAAY,CAAC;CAC5B;AAED,UAAU,SAAS;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED,UAAU,YAAY;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,EAAE,GAAG,GAAG,IAAI,CAAC;IACjB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,MAAM,EAAE,GAAG,GAAG,IAAI,CAAC;IACnB,IAAI,EAAE,GAAG,GAAG,IAAI,CAA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AAE,GAAG,EAAE,CAAC;CACd;AAED,UAAU,UAAU;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,oBAAoB,EAAE,GAAG,GAAG,IAAI,CAAC;CACjC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface IWorkflowDefinition {
|
|
2
|
+
id: string;
|
|
3
|
+
code: string;
|
|
4
|
+
name: string;
|
|
5
|
+
orm_status_field: string;
|
|
6
|
+
orm_meta_field: string;
|
|
7
|
+
orm_integration: ORMIntegration;
|
|
8
|
+
}
|
|
9
|
+
interface ORMIntegration {
|
|
10
|
+
x_api_key: string;
|
|
11
|
+
tenant_application_id: string;
|
|
12
|
+
tenant_application_name: string;
|
|
13
|
+
tenant_application_slug: string;
|
|
14
|
+
tenant_application_table: string;
|
|
15
|
+
tenant_application_model_id: string;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=IWorkflowDefinition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IWorkflowDefinition.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/Orm/Workflow/IWorkflowDefinition.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,cAAc,CAAC;CAChC;AAED,UAAU,cAAc;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,uBAAuB,EAAE,MAAM,CAAC;IAChC,uBAAuB,EAAE,MAAM,CAAC;IAChC,wBAAwB,EAAE,MAAM,CAAC;IACjC,2BAA2B,EAAE,MAAM,CAAC;CACpC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface IWorkflowDocumentInfo {
|
|
2
|
+
x_api_key: string;
|
|
3
|
+
tenant_application_id: string;
|
|
4
|
+
tenant_application_name: string;
|
|
5
|
+
tenant_application_slug: string;
|
|
6
|
+
tenant_application_table: string;
|
|
7
|
+
tenant_application_model_id: string;
|
|
8
|
+
tenant_id: string;
|
|
9
|
+
tenant_application_entity_id: string;
|
|
10
|
+
document_type: string;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=IWorkflowDocumentInfo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IWorkflowDocumentInfo.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/Orm/Workflow/IWorkflowDocumentInfo.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,qBAAqB;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,uBAAuB,EAAE,MAAM,CAAC;IAChC,uBAAuB,EAAE,MAAM,CAAC;IAChC,wBAAwB,EAAE,MAAM,CAAC;IACjC,2BAA2B,EAAE,MAAM,CAAC;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,4BAA4B,EAAE,MAAM,CAAC;IACrC,aAAa,EAAE,MAAM,CAAC;CACtB"}
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
+
import { IWorkflowData } from './IWorkflowData';
|
|
2
|
+
import { IWorkflowDocumentInfo } from './IWorkflowDocumentInfo';
|
|
3
|
+
import { IWorkflowInstanceMeta } from './IWorkflowInstanceMeta';
|
|
1
4
|
export interface IWorkflowInstance {
|
|
2
5
|
id: string;
|
|
3
|
-
status: string;
|
|
4
6
|
workflow_definition_id: string;
|
|
7
|
+
meta: IWorkflowInstanceMeta;
|
|
8
|
+
document: IWorkflowDocumentInfo;
|
|
9
|
+
status: string;
|
|
10
|
+
current_step_id: string;
|
|
5
11
|
initiator_id: string;
|
|
6
12
|
initiated_at: string;
|
|
7
|
-
|
|
13
|
+
data: IWorkflowData;
|
|
14
|
+
updated_at: string;
|
|
15
|
+
created_at: string;
|
|
8
16
|
}
|
|
9
17
|
//# sourceMappingURL=IWorkflowInstance.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IWorkflowInstance.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/Orm/Workflow/IWorkflowInstance.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,
|
|
1
|
+
{"version":3,"file":"IWorkflowInstance.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/Orm/Workflow/IWorkflowInstance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,MAAM,WAAW,iBAAiB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,sBAAsB,EAAE,MAAM,CAAC;IAC/B,IAAI,EAAE,qBAAqB,CAAC;IAC5B,QAAQ,EAAE,qBAAqB,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,aAAa,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IWorkflowInstanceMeta.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/Orm/Workflow/IWorkflowInstanceMeta.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,qBAAqB;IACrC,SAAS,EAAE,MAAM,CAAC;CAClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IWorkflowResponse.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/Orm/response/IWorkflowResponse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE,MAAM,CAAC,OAAO,WAAW,iBAAiB;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,iBAAiB,CAAC;CAC5B"}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import t from"axios";var e,a,s,i,o,n,r,p,d,h,c,u,l;!function(t){t.SYNC="sync",t.ATTACH="attach",t.DETACH="detach"}(e||(e={})),function(t){t.COUNT="count",t.SUM="sum",t.AVG="avg",t.MIN="min",t.MAX="max"}(a||(a={})),function(t){t.EQUAL="=",t.INEQUAL="!=",t.LIKE="like",t.ILIKE="ilike",t.MORE=">",t.MORE_OR_EQUAL=">=",t.LESS="<",t.LESS_OR_EQUAL="<="}(s||(s={})),function(t){t.POINTER="pointer",t.SCALAR="scalar"}(i||(i={})),function(t){t.AND="and",t.OR="or"}(o||(o={})),function(t){t.GROUP="group",t.SINGLE="single"}(n||(n={})),function(t){t.LEFT="left",t.RIGHT="right",t.FULL="full",t.INNER="inner"}(r||(r={})),function(t){t.ASC="asc",t.DESC="desc"}(p||(p={})),function(t){t.FIRST="first",t.LAST="last"}(d||(d={})),function(t){t.RESOURCE="resource",t.EXPORT="export"}(h||(h={})),function(t){t.XLSX="xlsx",t.CSV="csv"}(c||(c={})),function(t){t.UTF_8="utf-8",t.WINDOWS_1251="windows-1251"}(u||(u={})),function(t){t.SEARCH="search",t.GET_BY_ID="get_by_id",t.CREATE="create",t.UPDATE="update",t.DELETE="delete"}(l||(l={}));const f="http://cubekit-workflow-runtime-server-develop.cluster.it-aces.com",x="{key}";class E{axios;constructor(e){this.axios=t.create({baseURL:e.baseUrl,withCredentials:!0,headers:{"x-api-key":e.serviceKey}})}setConfig(t){this.axios.defaults.baseURL=t.baseUrl,this.axios.defaults.headers["x-api-key"]=t.serviceKey}setAuthorizationHeader(t){this.axios.defaults.headers.Authorization=t}send(t){switch(t.method){case l.GET_BY_ID:return this.getById(t);case l.CREATE:return this.create(t);case l.UPDATE:return this.update(t);case l.DELETE:return this.delete(t);default:return this.search(t)}}preparePathWithId(t,e){return t=t.indexOf(x)>-1?t.replace(x,e):"/"===t.slice(-1)?`${t}${e}`:`${t}/${e}`}search(t){let e=t.path;const a=t.options;return a.pagination&&(e+="?",a.pagination.limit&&(e=`${e}limit=${a.pagination.limit}&`),a.pagination.page&&(e=`${e}page=${a.pagination.page}`)),delete a.pagination,this.axios.post(e,a)}getById(t){const e=t.options;return this.axios.post(this.preparePathWithId(t.path,e.id),e)}create(t){return this.axios.post(t.path,t.options)}update(t){const e=t.options;return this.axios.put(this.preparePathWithId(t.path,e.id),t.options)}delete(t){const e=t.options;return this.axios.delete(this.preparePathWithId(t.path,e.id),{data:t.options})}getProcessState(t,e){return this.axios.get(`${f}/api/v1.0/workflow/tenants/${t}/entities/${e}/widget_state`)}startProcess(t,e,a){return this.axios.post(`${f}/api/v1.0/workflow/tenants/${t}/defenitions/${e}/start/${a}`)}executeProcessAction(t,e,a){return this.axios.post(`${f}/api/v1.0/workflow/tenants/${t}/instance/${e}/actions/${a}/execute
|
|
1
|
+
import t from"axios";var e,a,s,i,o,n,r,p,d,h,c,u,l;!function(t){t.SYNC="sync",t.ATTACH="attach",t.DETACH="detach"}(e||(e={})),function(t){t.COUNT="count",t.SUM="sum",t.AVG="avg",t.MIN="min",t.MAX="max"}(a||(a={})),function(t){t.EQUAL="=",t.INEQUAL="!=",t.LIKE="like",t.ILIKE="ilike",t.MORE=">",t.MORE_OR_EQUAL=">=",t.LESS="<",t.LESS_OR_EQUAL="<="}(s||(s={})),function(t){t.POINTER="pointer",t.SCALAR="scalar"}(i||(i={})),function(t){t.AND="and",t.OR="or"}(o||(o={})),function(t){t.GROUP="group",t.SINGLE="single"}(n||(n={})),function(t){t.LEFT="left",t.RIGHT="right",t.FULL="full",t.INNER="inner"}(r||(r={})),function(t){t.ASC="asc",t.DESC="desc"}(p||(p={})),function(t){t.FIRST="first",t.LAST="last"}(d||(d={})),function(t){t.RESOURCE="resource",t.EXPORT="export"}(h||(h={})),function(t){t.XLSX="xlsx",t.CSV="csv"}(c||(c={})),function(t){t.UTF_8="utf-8",t.WINDOWS_1251="windows-1251"}(u||(u={})),function(t){t.SEARCH="search",t.GET_BY_ID="get_by_id",t.CREATE="create",t.UPDATE="update",t.DELETE="delete"}(l||(l={}));const f="http://cubekit-workflow-runtime-server-develop.cluster.it-aces.com",x="{key}";class E{axios;constructor(e){this.axios=t.create({baseURL:e.baseUrl,withCredentials:!0,headers:{"x-api-key":e.serviceKey}})}setConfig(t){this.axios.defaults.baseURL=t.baseUrl,this.axios.defaults.headers["x-api-key"]=t.serviceKey}setAuthorizationHeader(t){this.axios.defaults.headers.Authorization=t}send(t){switch(t.method){case l.GET_BY_ID:return this.getById(t);case l.CREATE:return this.create(t);case l.UPDATE:return this.update(t);case l.DELETE:return this.delete(t);default:return this.search(t)}}preparePathWithId(t,e){return t=t.indexOf(x)>-1?t.replace(x,e):"/"===t.slice(-1)?`${t}${e}`:`${t}/${e}`}search(t){let e=t.path;const a=t.options;return a.pagination&&(e+="?",a.pagination.limit&&(e=`${e}limit=${a.pagination.limit}&`),a.pagination.page&&(e=`${e}page=${a.pagination.page}`)),delete a.pagination,this.axios.post(e,a)}getById(t){const e=t.options;return this.axios.post(this.preparePathWithId(t.path,e.id),e)}create(t){return this.axios.post(t.path,t.options)}update(t){const e=t.options;return this.axios.put(this.preparePathWithId(t.path,e.id),t.options)}delete(t){const e=t.options;return this.axios.delete(this.preparePathWithId(t.path,e.id),{data:t.options})}getProcessState(t,e){return this.axios.get(`${f}/api/v1.0/workflow/tenants/${t}/entities/${e}/widget_state`)}startProcess(t,e,a){return this.axios.post(`${f}/api/v1.0/workflow/tenants/${t}/defenitions/${e}/start/${a}`)}executeProcessAction(t,e,a,s){return this.axios.post(`${f}/api/v1.0/workflow/tenants/${t}/instance/${e}/actions/${a}/execute`,s)}}class g{axios;constructor(e){this.axios=t.create({baseURL:e.baseUrl,withCredentials:!0,headers:{"x-api-key":e.serviceKey}})}setConfig(t){this.axios.defaults.baseURL=t.baseUrl,this.axios.defaults.headers["x-api-key"]=t.serviceKey}setAuthorizationHeader(t){this.axios.defaults.headers.Authorization=t}getFolderTree(t){return this.axios.get(`/trees?path=${encodeURIComponent(t||"/")}`).then((t=>t.data.data))}view(t,e,a,s,i){const o=new URLSearchParams;return o.append("path",t||"/"),e&&o.append("order_by",e),a&&o.append("order",a),s&&o.append("filter_by",s),i&&o.append("filter",i),this.axios.get(`/objects?${o.toString()}`).then((t=>t.data.data))}createDirectory(t){return this.axios.put(`/objects/${encodeURIComponent(t)}`).then((t=>t.data))}delete(t){return this.axios.delete("/objects",{data:t}).then((t=>t.data))}upload(t,e,a,s){const i=new FormData;return i.append("path",t),e.forEach((t=>{i.append("files",t)})),this.axios.put("/objects",i,{onUploadProgress:a,signal:s,headers:{"Content-Type":"multipart/form-data"}}).then((t=>t.data))}resend(t){return this.axios.request(t).then((t=>t.data))}simpleUpload(t,e,a,s){const i=new FormData;return i.append("path",t),e.forEach((t=>{i.append("files",t)})),this.axios.post("/objects",i,{onUploadProgress:a,signal:s,headers:{"Content-Type":"multipart/form-data"}}).then((t=>t.data))}move(t,e){return this.axios.patch(`/objects/${encodeURIComponent(t)}`,{target:e}).then((t=>t.data))}download(t,e){return this.axios.post(`/bulkDownloads?path=${encodeURIComponent(t)}`,e,{responseType:"blob"})}}export{a as AggregationsEnum,E as CubekitOrmClient,g as CubekitStorageClient,u as ExportEncodingTypesEnum,c as FileExportTypesEnum,o as FilterBooleansEnum,n as FilterTypesEnum,i as FilterValueTypesEnum,r as JoinTypesEnum,s as OperatorsEnum,p as OrderDirectionsEnum,d as OrderNullPositionsEnum,e as RelationsModesEnum,l as RequestOrmMethodsEnum,h as ResponseTypeEnum};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/enums/index.ts","../../src/config/const.ts","../../src/core/CubekitOrmClient.ts","../../src/core/CubekitStorageClient.ts"],"sourcesContent":[null,null,null,null],"names":["RelationsModesEnum","AggregationsEnum","OperatorsEnum","FilterValueTypesEnum","FilterBooleansEnum","FilterTypesEnum","JoinTypesEnum","OrderDirectionsEnum","OrderNullPositionsEnum","ResponseTypeEnum","FileExportTypesEnum","ExportEncodingTypesEnum","RequestOrmMethodsEnum","WORKFLOW_URL","ID_SPOT","CubekitOrmClient","axios","constructor","config","this","create","baseURL","baseUrl","withCredentials","headers","serviceKey","setConfig","defaults","setAuthorizationHeader","value","send","params","method","GET_BY_ID","getById","CREATE","UPDATE","update","DELETE","delete","search","preparePathWithId","path","id","indexOf","replace","slice","url","options","pagination","limit","page","post","put","data","getProcessState","tenantId","entityId","get","startProcess","workflowDefenitionId","executeProcessAction","workflowInstanceId","actionId","CubekitStorageClient","getFolderTree","encodeURIComponent","then","response","view","order_by","order","filter_by","filter","searchParams","URLSearchParams","append","toString","createDirectory","paths","upload","files","onUploadProgress","signal","formData","FormData","forEach","file","resend","request","simpleUpload","move","source","target","patch","download","objects","responseType"],"mappings":"yBAAYA,EAMAC,EAQAC,EAWAC,EAKAC,EAKAC,EAKAC,EAOAC,EAKAC,EAKAC,EAKAC,EAKAC,EAKAC,GAxEZ,SAAYZ,GACRA,EAAA,KAAA,OACAA,EAAA,OAAA,SACAA,EAAA,OAAA,QACH,CAJD,CAAYA,IAAAA,EAIX,CAAA,IAED,SAAYC,GACRA,EAAA,MAAA,QACAA,EAAA,IAAA,MACAA,EAAA,IAAA,MACAA,EAAA,IAAA,MACAA,EAAA,IAAA,KACH,CAND,CAAYA,IAAAA,EAMX,CAAA,IAED,SAAYC,GACRA,EAAA,MAAA,IACAA,EAAA,QAAA,KACAA,EAAA,KAAA,OACAA,EAAA,MAAA,QACAA,EAAA,KAAA,IACAA,EAAA,cAAA,KACAA,EAAA,KAAA,IACAA,EAAA,cAAA,IACH,CATD,CAAYA,IAAAA,EASX,CAAA,IAED,SAAYC,GACRA,EAAA,QAAA,UACAA,EAAA,OAAA,QACH,CAHD,CAAYA,IAAAA,EAGX,CAAA,IAED,SAAYC,GACRA,EAAA,IAAA,MACAA,EAAA,GAAA,IACH,CAHD,CAAYA,IAAAA,EAGX,CAAA,IAED,SAAYC,GACRA,EAAA,MAAA,QACAA,EAAA,OAAA,QACH,CAHD,CAAYA,IAAAA,EAGX,CAAA,IAED,SAAYC,GACRA,EAAA,KAAA,OACAA,EAAA,MAAA,QACAA,EAAA,KAAA,OACAA,EAAA,MAAA,OACH,CALD,CAAYA,IAAAA,EAKX,CAAA,IAED,SAAYC,GACRA,EAAA,IAAA,MACAA,EAAA,KAAA,MACH,CAHD,CAAYA,IAAAA,EAGX,CAAA,IAED,SAAYC,GACRA,EAAA,MAAA,QACAA,EAAA,KAAA,MACH,CAHD,CAAYA,IAAAA,EAGX,CAAA,IAED,SAAYC,GACRA,EAAA,SAAA,WACAA,EAAA,OAAA,QACH,CAHD,CAAYA,IAAAA,EAGX,CAAA,IAED,SAAYC,GACRA,EAAA,KAAA,OACAA,EAAA,IAAA,KACH,CAHD,CAAYA,IAAAA,EAGX,CAAA,IAED,SAAYC,GACRA,EAAA,MAAA,QACAA,EAAA,aAAA,cACH,CAHD,CAAYA,IAAAA,EAGX,CAAA,IAED,SAAYC,GACRA,EAAA,OAAA,SACAA,EAAA,UAAA,YACAA,EAAA,OAAA,SACAA,EAAA,OAAA,SACAA,EAAA,OAAA,QACH,CAND,CAAYA,IAAAA,EAMX,CAAA,IC9EM,MAAMC,EAAe,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/enums/index.ts","../../src/config/const.ts","../../src/core/CubekitOrmClient.ts","../../src/core/CubekitStorageClient.ts"],"sourcesContent":[null,null,null,null],"names":["RelationsModesEnum","AggregationsEnum","OperatorsEnum","FilterValueTypesEnum","FilterBooleansEnum","FilterTypesEnum","JoinTypesEnum","OrderDirectionsEnum","OrderNullPositionsEnum","ResponseTypeEnum","FileExportTypesEnum","ExportEncodingTypesEnum","RequestOrmMethodsEnum","WORKFLOW_URL","ID_SPOT","CubekitOrmClient","axios","constructor","config","this","create","baseURL","baseUrl","withCredentials","headers","serviceKey","setConfig","defaults","setAuthorizationHeader","value","send","params","method","GET_BY_ID","getById","CREATE","UPDATE","update","DELETE","delete","search","preparePathWithId","path","id","indexOf","replace","slice","url","options","pagination","limit","page","post","put","data","getProcessState","tenantId","entityId","get","startProcess","workflowDefenitionId","executeProcessAction","workflowInstanceId","actionId","CubekitStorageClient","getFolderTree","encodeURIComponent","then","response","view","order_by","order","filter_by","filter","searchParams","URLSearchParams","append","toString","createDirectory","paths","upload","files","onUploadProgress","signal","formData","FormData","forEach","file","resend","request","simpleUpload","move","source","target","patch","download","objects","responseType"],"mappings":"yBAAYA,EAMAC,EAQAC,EAWAC,EAKAC,EAKAC,EAKAC,EAOAC,EAKAC,EAKAC,EAKAC,EAKAC,EAKAC,GAxEZ,SAAYZ,GACRA,EAAA,KAAA,OACAA,EAAA,OAAA,SACAA,EAAA,OAAA,QACH,CAJD,CAAYA,IAAAA,EAIX,CAAA,IAED,SAAYC,GACRA,EAAA,MAAA,QACAA,EAAA,IAAA,MACAA,EAAA,IAAA,MACAA,EAAA,IAAA,MACAA,EAAA,IAAA,KACH,CAND,CAAYA,IAAAA,EAMX,CAAA,IAED,SAAYC,GACRA,EAAA,MAAA,IACAA,EAAA,QAAA,KACAA,EAAA,KAAA,OACAA,EAAA,MAAA,QACAA,EAAA,KAAA,IACAA,EAAA,cAAA,KACAA,EAAA,KAAA,IACAA,EAAA,cAAA,IACH,CATD,CAAYA,IAAAA,EASX,CAAA,IAED,SAAYC,GACRA,EAAA,QAAA,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+2,7 @@ import IOrmClientConfig from '../interfaces/Orm/IOrmClientConfig';
|
|
|
2
2
|
import IOrmRequestParameter from '../interfaces/Orm/IOrmRequestParameter';
|
|
3
3
|
import { IResponse } from '../interfaces/Orm';
|
|
4
4
|
import IProcessState from '../interfaces/Orm/Workflow/IProcessState';
|
|
5
|
+
import IWorkflowResponse from '../interfaces/Orm/response/IWorkflowResponse';
|
|
5
6
|
/**
|
|
6
7
|
* @class
|
|
7
8
|
* ```ts
|
|
@@ -70,8 +71,8 @@ declare class CubekitOrmClient {
|
|
|
70
71
|
private update;
|
|
71
72
|
private delete;
|
|
72
73
|
getProcessState(tenantId: string, entityId: string): Promise<import("axios").AxiosResponse<IResponse<IProcessState>, any>>;
|
|
73
|
-
startProcess(tenantId: string, workflowDefenitionId: string, entityId: string): Promise<import("axios").AxiosResponse<
|
|
74
|
-
executeProcessAction(tenantId: string, workflowInstanceId: string, actionId: string): Promise<import("axios").AxiosResponse<IResponse<IProcessState>, any>>;
|
|
74
|
+
startProcess(tenantId: string, workflowDefenitionId: string, entityId: string): Promise<import("axios").AxiosResponse<IWorkflowResponse, any>>;
|
|
75
|
+
executeProcessAction(tenantId: string, workflowInstanceId: string, actionId: string, data: any): Promise<import("axios").AxiosResponse<IResponse<IProcessState>, any>>;
|
|
75
76
|
}
|
|
76
77
|
export default CubekitOrmClient;
|
|
77
78
|
//# sourceMappingURL=CubekitOrmClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CubekitOrmClient.d.ts","sourceRoot":"","sources":["../../src/core/CubekitOrmClient.ts"],"names":[],"mappings":"AACA,OAAO,gBAAgB,MAAM,oCAAoC,CAAC;AAClE,OAAO,oBAAoB,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EACN,SAAS,EAKT,MAAM,mBAAmB,CAAC;AAG3B,OAAO,aAAa,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"CubekitOrmClient.d.ts","sourceRoot":"","sources":["../../src/core/CubekitOrmClient.ts"],"names":[],"mappings":"AACA,OAAO,gBAAgB,MAAM,oCAAoC,CAAC;AAClE,OAAO,oBAAoB,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EACN,SAAS,EAKT,MAAM,mBAAmB,CAAC;AAG3B,OAAO,aAAa,MAAM,0CAA0C,CAAC;AACrE,OAAO,iBAAiB,MAAM,8CAA8C,CAAC;AAI7E;;;;;;;;;;;;;EAaE;AACF,cAAM,gBAAgB;IACrB,OAAO,CAAC,KAAK,CAAgB;gBAEjB,MAAM,EAAE,gBAAgB;IAUpC;;;;;;;;;;;;OAYG;IACI,SAAS,CAAC,MAAM,EAAE,gBAAgB;IAKzC;;;;;;;OAOG;IACI,sBAAsB,CAAC,KAAK,EAAE,MAAM;IAI3C;;;;;;;;;;;;;;;;;;;OAmBG;IACI,IAAI,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,MAAM,EAAE,oBAAoB,CAAC,EAAE,CAAC;IAezD,OAAO,CAAC,iBAAiB;IAYzB,OAAO,CAAC,MAAM;IAgBd,OAAO,CAAC,OAAO;IAKf,OAAO,CAAC,MAAM;IAId,OAAO,CAAC,MAAM;IAQd,OAAO,CAAC,MAAM;IAOP,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IAMlD,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,oBAAoB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IAM7E,oBAAoB,CAC1B,QAAQ,EAAE,MAAM,EAChB,kBAAkB,EAAE,MAAM,EAC1B,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,GAAG;CAOV;AAED,eAAe,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IActionGroup.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/Orm/Workflow/IActionGroup.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"IActionGroup.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/Orm/Workflow/IActionGroup.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,GAAG,GAAG,IAAI,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,EAAE,MAAM,CAAC;CACzB"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { IActionGroup } from
|
|
1
|
+
import { IActionGroup } from './IActionGroup';
|
|
2
2
|
import { IStepLink } from './IStepLink';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { IWorkflowInstance } from
|
|
3
|
+
import { IProcessHistory } from './IProcessHistory';
|
|
4
|
+
import { IStep } from './IStep';
|
|
5
|
+
import { IWorkflowDefinition } from './IWorkflowDefinition';
|
|
6
|
+
import { IWorkflowInstance } from './IWorkflowInstance';
|
|
7
7
|
export default interface IProcessState {
|
|
8
|
-
workflow_instance: IWorkflowInstance
|
|
9
|
-
definition:
|
|
8
|
+
workflow_instance: Pick<IWorkflowInstance, 'id' | 'status' | 'workflow_definition_id' | 'initiator_id' | 'initiated_at' | 'current_step_id'>;
|
|
9
|
+
definition: Pick<IWorkflowDefinition, 'id' | 'code' | 'name'>;
|
|
10
10
|
current_step: IStepLink;
|
|
11
11
|
step_actions: IStep[];
|
|
12
12
|
allowed_actions: IStep[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IProcessState.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/Orm/Workflow/IProcessState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"IProcessState.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/Orm/Workflow/IProcessState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,MAAM,CAAC,OAAO,WAAW,aAAa;IACrC,iBAAiB,EAAE,IAAI,CACtB,iBAAiB,EACjB,IAAI,GAAG,QAAQ,GAAG,wBAAwB,GAAG,cAAc,GAAG,cAAc,GAAG,iBAAiB,CAChG,CAAC;IACF,UAAU,EAAE,IAAI,CAAC,mBAAmB,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC,CAAC;IAC9D,YAAY,EAAE,SAAS,CAAC;IACxB,YAAY,EAAE,KAAK,EAAE,CAAC;IACtB,eAAe,EAAE,KAAK,EAAE,CAAC;IACzB,aAAa,EAAE,YAAY,EAAE,CAAC;IAC9B,OAAO,EAAE,eAAe,EAAE,CAAC;CAC3B"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { IActionGroup } from './IActionGroup';
|
|
2
|
+
import { IProcessHistory } from './IProcessHistory';
|
|
3
|
+
import { IWorkflowDefinition } from './IWorkflowDefinition';
|
|
4
|
+
export interface IWorkflowData {
|
|
5
|
+
definition: IWorkflowDefinition;
|
|
6
|
+
current_step_id: string;
|
|
7
|
+
steps: Record<string, WorkflowStep>;
|
|
8
|
+
history: IProcessHistory[];
|
|
9
|
+
status: string;
|
|
10
|
+
build_meta: BuildMeta;
|
|
11
|
+
document: DocumentData;
|
|
12
|
+
document_meta: DocumentMeta;
|
|
13
|
+
}
|
|
14
|
+
interface BuildMeta {
|
|
15
|
+
synced_at: string | null;
|
|
16
|
+
}
|
|
17
|
+
interface DocumentData {
|
|
18
|
+
id: string;
|
|
19
|
+
name: string;
|
|
20
|
+
price: number | null;
|
|
21
|
+
file: any | null;
|
|
22
|
+
description: string | null;
|
|
23
|
+
created_at: string;
|
|
24
|
+
updated_at: string | null;
|
|
25
|
+
deleted_at: string | null;
|
|
26
|
+
status: any | null;
|
|
27
|
+
meta: any | null;
|
|
28
|
+
}
|
|
29
|
+
interface DocumentMeta {
|
|
30
|
+
snapshot_at: string;
|
|
31
|
+
source: 'orm_http' | string;
|
|
32
|
+
}
|
|
33
|
+
interface WorkflowStep {
|
|
34
|
+
id: string;
|
|
35
|
+
name: string;
|
|
36
|
+
order: number;
|
|
37
|
+
auto_approve: boolean;
|
|
38
|
+
is_skippable_on_retry: boolean;
|
|
39
|
+
validations: any[];
|
|
40
|
+
actions: Record<string, WorkflowAction>;
|
|
41
|
+
transitions: Record<string, Transition>;
|
|
42
|
+
action_groups: IActionGroup[];
|
|
43
|
+
}
|
|
44
|
+
interface WorkflowAction {
|
|
45
|
+
build: ActionBuild;
|
|
46
|
+
state: ActionState;
|
|
47
|
+
}
|
|
48
|
+
interface ActionBuild {
|
|
49
|
+
id: string;
|
|
50
|
+
name: string;
|
|
51
|
+
label: string;
|
|
52
|
+
action_type: string;
|
|
53
|
+
assignee_type: string;
|
|
54
|
+
workflow_action_group_id: string;
|
|
55
|
+
assignee_value: string[];
|
|
56
|
+
condition_expression: ConditionExpression | any[];
|
|
57
|
+
appearance_expression: any[];
|
|
58
|
+
callback_timeout_minutes: number | null;
|
|
59
|
+
}
|
|
60
|
+
interface ConditionExpression {
|
|
61
|
+
[field: string]: string[];
|
|
62
|
+
}
|
|
63
|
+
interface ActionState {
|
|
64
|
+
status: string;
|
|
65
|
+
result: any | null;
|
|
66
|
+
timestamp: string | null;
|
|
67
|
+
user_id: string | null;
|
|
68
|
+
payload: any[];
|
|
69
|
+
errors: any[];
|
|
70
|
+
}
|
|
71
|
+
interface Transition {
|
|
72
|
+
id: string;
|
|
73
|
+
action_id: string;
|
|
74
|
+
from_step_id: string;
|
|
75
|
+
to_step_id: string;
|
|
76
|
+
is_default: boolean;
|
|
77
|
+
condition_expression: any | null;
|
|
78
|
+
}
|
|
79
|
+
export {};
|
|
80
|
+
//# sourceMappingURL=IWorkflowData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IWorkflowData.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/Orm/Workflow/IWorkflowData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,WAAW,aAAa;IAC7B,UAAU,EAAE,mBAAmB,CAAC;IAChC,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IACpC,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,SAAS,CAAC;IACtB,QAAQ,EAAE,YAAY,CAAC;IACvB,aAAa,EAAE,YAAY,CAAC;CAC5B;AAED,UAAU,SAAS;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED,UAAU,YAAY;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,EAAE,GAAG,GAAG,IAAI,CAAC;IACjB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,MAAM,EAAE,GA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,IAAI,CAAC;IACvB,OAAO,EAAE,GAAG,EAAE,CAAC;IACf,MAAM,EAAE,GAAG,EAAE,CAAC;CACd;AAED,UAAU,UAAU;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,oBAAoB,EAAE,GAAG,GAAG,IAAI,CAAC;CACjC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface IWorkflowDefinition {
|
|
2
|
+
id: string;
|
|
3
|
+
code: string;
|
|
4
|
+
name: string;
|
|
5
|
+
orm_status_field: string;
|
|
6
|
+
orm_meta_field: string;
|
|
7
|
+
orm_integration: ORMIntegration;
|
|
8
|
+
}
|
|
9
|
+
interface ORMIntegration {
|
|
10
|
+
x_api_key: string;
|
|
11
|
+
tenant_application_id: string;
|
|
12
|
+
tenant_application_name: string;
|
|
13
|
+
tenant_application_slug: string;
|
|
14
|
+
tenant_application_table: string;
|
|
15
|
+
tenant_application_model_id: string;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=IWorkflowDefinition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IWorkflowDefinition.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/Orm/Workflow/IWorkflowDefinition.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,cAAc,CAAC;CAChC;AAED,UAAU,cAAc;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,uBAAuB,EAAE,MAAM,CAAC;IAChC,uBAAuB,EAAE,MAAM,CAAC;IAChC,wBAAwB,EAAE,MAAM,CAAC;IACjC,2BAA2B,EAAE,MAAM,CAAC;CACpC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface IWorkflowDocumentInfo {
|
|
2
|
+
x_api_key: string;
|
|
3
|
+
tenant_application_id: string;
|
|
4
|
+
tenant_application_name: string;
|
|
5
|
+
tenant_application_slug: string;
|
|
6
|
+
tenant_application_table: string;
|
|
7
|
+
tenant_application_model_id: string;
|
|
8
|
+
tenant_id: string;
|
|
9
|
+
tenant_application_entity_id: string;
|
|
10
|
+
document_type: string;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=IWorkflowDocumentInfo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IWorkflowDocumentInfo.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/Orm/Workflow/IWorkflowDocumentInfo.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,qBAAqB;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,uBAAuB,EAAE,MAAM,CAAC;IAChC,uBAAuB,EAAE,MAAM,CAAC;IAChC,wBAAwB,EAAE,MAAM,CAAC;IACjC,2BAA2B,EAAE,MAAM,CAAC;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,4BAA4B,EAAE,MAAM,CAAC;IACrC,aAAa,EAAE,MAAM,CAAC;CACtB"}
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
+
import { IWorkflowData } from './IWorkflowData';
|
|
2
|
+
import { IWorkflowDocumentInfo } from './IWorkflowDocumentInfo';
|
|
3
|
+
import { IWorkflowInstanceMeta } from './IWorkflowInstanceMeta';
|
|
1
4
|
export interface IWorkflowInstance {
|
|
2
5
|
id: string;
|
|
3
|
-
status: string;
|
|
4
6
|
workflow_definition_id: string;
|
|
7
|
+
meta: IWorkflowInstanceMeta;
|
|
8
|
+
document: IWorkflowDocumentInfo;
|
|
9
|
+
status: string;
|
|
10
|
+
current_step_id: string;
|
|
5
11
|
initiator_id: string;
|
|
6
12
|
initiated_at: string;
|
|
7
|
-
|
|
13
|
+
data: IWorkflowData;
|
|
14
|
+
updated_at: string;
|
|
15
|
+
created_at: string;
|
|
8
16
|
}
|
|
9
17
|
//# sourceMappingURL=IWorkflowInstance.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IWorkflowInstance.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/Orm/Workflow/IWorkflowInstance.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,
|
|
1
|
+
{"version":3,"file":"IWorkflowInstance.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/Orm/Workflow/IWorkflowInstance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,MAAM,WAAW,iBAAiB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,sBAAsB,EAAE,MAAM,CAAC;IAC/B,IAAI,EAAE,qBAAqB,CAAC;IAC5B,QAAQ,EAAE,qBAAqB,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,aAAa,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IWorkflowInstanceMeta.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/Orm/Workflow/IWorkflowInstanceMeta.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,qBAAqB;IACrC,SAAS,EAAE,MAAM,CAAC;CAClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IWorkflowResponse.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/Orm/response/IWorkflowResponse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE,MAAM,CAAC,OAAO,WAAW,iBAAiB;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,iBAAiB,CAAC;CAC5B"}
|
package/dist/index.d.ts
CHANGED
|
@@ -272,7 +272,7 @@ interface IMoveResponse extends IStorageResponse {
|
|
|
272
272
|
|
|
273
273
|
interface IActionGroup {
|
|
274
274
|
id: string;
|
|
275
|
-
meta: any;
|
|
275
|
+
meta: any | null;
|
|
276
276
|
name: string;
|
|
277
277
|
workflow_step_id: string;
|
|
278
278
|
}
|
|
@@ -283,12 +283,6 @@ interface IStepLink {
|
|
|
283
283
|
order: number;
|
|
284
284
|
}
|
|
285
285
|
|
|
286
|
-
interface IDefinition {
|
|
287
|
-
id: string;
|
|
288
|
-
code: string;
|
|
289
|
-
name: string;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
286
|
interface IProcessPayload {
|
|
293
287
|
result: string;
|
|
294
288
|
}
|
|
@@ -328,18 +322,132 @@ interface IStep {
|
|
|
328
322
|
workflow_action_group_id: string;
|
|
329
323
|
}
|
|
330
324
|
|
|
331
|
-
interface
|
|
325
|
+
interface IWorkflowDefinition {
|
|
332
326
|
id: string;
|
|
327
|
+
code: string;
|
|
328
|
+
name: string;
|
|
329
|
+
orm_status_field: string;
|
|
330
|
+
orm_meta_field: string;
|
|
331
|
+
orm_integration: ORMIntegration;
|
|
332
|
+
}
|
|
333
|
+
interface ORMIntegration {
|
|
334
|
+
x_api_key: string;
|
|
335
|
+
tenant_application_id: string;
|
|
336
|
+
tenant_application_name: string;
|
|
337
|
+
tenant_application_slug: string;
|
|
338
|
+
tenant_application_table: string;
|
|
339
|
+
tenant_application_model_id: string;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
interface IWorkflowData {
|
|
343
|
+
definition: IWorkflowDefinition;
|
|
344
|
+
current_step_id: string;
|
|
345
|
+
steps: Record<string, WorkflowStep>;
|
|
346
|
+
history: IProcessHistory[];
|
|
333
347
|
status: string;
|
|
348
|
+
build_meta: BuildMeta;
|
|
349
|
+
document: DocumentData;
|
|
350
|
+
document_meta: DocumentMeta;
|
|
351
|
+
}
|
|
352
|
+
interface BuildMeta {
|
|
353
|
+
synced_at: string | null;
|
|
354
|
+
}
|
|
355
|
+
interface DocumentData {
|
|
356
|
+
id: string;
|
|
357
|
+
name: string;
|
|
358
|
+
price: number | null;
|
|
359
|
+
file: any | null;
|
|
360
|
+
description: string | null;
|
|
361
|
+
created_at: string;
|
|
362
|
+
updated_at: string | null;
|
|
363
|
+
deleted_at: string | null;
|
|
364
|
+
status: any | null;
|
|
365
|
+
meta: any | null;
|
|
366
|
+
}
|
|
367
|
+
interface DocumentMeta {
|
|
368
|
+
snapshot_at: string;
|
|
369
|
+
source: 'orm_http' | string;
|
|
370
|
+
}
|
|
371
|
+
interface WorkflowStep {
|
|
372
|
+
id: string;
|
|
373
|
+
name: string;
|
|
374
|
+
order: number;
|
|
375
|
+
auto_approve: boolean;
|
|
376
|
+
is_skippable_on_retry: boolean;
|
|
377
|
+
validations: any[];
|
|
378
|
+
actions: Record<string, WorkflowAction>;
|
|
379
|
+
transitions: Record<string, Transition>;
|
|
380
|
+
action_groups: IActionGroup[];
|
|
381
|
+
}
|
|
382
|
+
interface WorkflowAction {
|
|
383
|
+
build: ActionBuild;
|
|
384
|
+
state: ActionState;
|
|
385
|
+
}
|
|
386
|
+
interface ActionBuild {
|
|
387
|
+
id: string;
|
|
388
|
+
name: string;
|
|
389
|
+
label: string;
|
|
390
|
+
action_type: string;
|
|
391
|
+
assignee_type: string;
|
|
392
|
+
workflow_action_group_id: string;
|
|
393
|
+
assignee_value: string[];
|
|
394
|
+
condition_expression: ConditionExpression | any[];
|
|
395
|
+
appearance_expression: any[];
|
|
396
|
+
callback_timeout_minutes: number | null;
|
|
397
|
+
}
|
|
398
|
+
interface ConditionExpression {
|
|
399
|
+
[field: string]: string[];
|
|
400
|
+
}
|
|
401
|
+
interface ActionState {
|
|
402
|
+
status: string;
|
|
403
|
+
result: any | null;
|
|
404
|
+
timestamp: string | null;
|
|
405
|
+
user_id: string | null;
|
|
406
|
+
payload: any[];
|
|
407
|
+
errors: any[];
|
|
408
|
+
}
|
|
409
|
+
interface Transition {
|
|
410
|
+
id: string;
|
|
411
|
+
action_id: string;
|
|
412
|
+
from_step_id: string;
|
|
413
|
+
to_step_id: string;
|
|
414
|
+
is_default: boolean;
|
|
415
|
+
condition_expression: any | null;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
interface IWorkflowDocumentInfo {
|
|
419
|
+
x_api_key: string;
|
|
420
|
+
tenant_application_id: string;
|
|
421
|
+
tenant_application_name: string;
|
|
422
|
+
tenant_application_slug: string;
|
|
423
|
+
tenant_application_table: string;
|
|
424
|
+
tenant_application_model_id: string;
|
|
425
|
+
tenant_id: string;
|
|
426
|
+
tenant_application_entity_id: string;
|
|
427
|
+
document_type: string;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
interface IWorkflowInstanceMeta {
|
|
431
|
+
tenant_id: string;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
interface IWorkflowInstance {
|
|
435
|
+
id: string;
|
|
334
436
|
workflow_definition_id: string;
|
|
437
|
+
meta: IWorkflowInstanceMeta;
|
|
438
|
+
document: IWorkflowDocumentInfo;
|
|
439
|
+
status: string;
|
|
440
|
+
current_step_id: string;
|
|
335
441
|
initiator_id: string;
|
|
336
442
|
initiated_at: string;
|
|
337
|
-
|
|
443
|
+
data: IWorkflowData;
|
|
444
|
+
updated_at: string;
|
|
445
|
+
created_at: string;
|
|
338
446
|
}
|
|
339
447
|
|
|
340
448
|
interface IProcessState {
|
|
341
|
-
workflow_instance: IWorkflowInstance
|
|
342
|
-
definition:
|
|
449
|
+
workflow_instance: Pick<IWorkflowInstance, 'id' | 'status' | 'workflow_definition_id' | 'initiator_id' | 'initiated_at' | 'current_step_id'>;
|
|
450
|
+
definition: Pick<IWorkflowDefinition, 'id' | 'code' | 'name'>;
|
|
343
451
|
current_step: IStepLink;
|
|
344
452
|
step_actions: IStep[];
|
|
345
453
|
allowed_actions: IStep[];
|
|
@@ -347,6 +455,11 @@ interface IProcessState {
|
|
|
347
455
|
history: IProcessHistory[];
|
|
348
456
|
}
|
|
349
457
|
|
|
458
|
+
interface IWorkflowResponse {
|
|
459
|
+
status: string;
|
|
460
|
+
instance: IWorkflowInstance;
|
|
461
|
+
}
|
|
462
|
+
|
|
350
463
|
/**
|
|
351
464
|
* @class
|
|
352
465
|
* ```ts
|
|
@@ -415,8 +528,8 @@ declare class CubekitOrmClient {
|
|
|
415
528
|
private update;
|
|
416
529
|
private delete;
|
|
417
530
|
getProcessState(tenantId: string, entityId: string): Promise<axios.AxiosResponse<IResponse<IProcessState>, any>>;
|
|
418
|
-
startProcess(tenantId: string, workflowDefenitionId: string, entityId: string): Promise<axios.AxiosResponse<
|
|
419
|
-
executeProcessAction(tenantId: string, workflowInstanceId: string, actionId: string): Promise<axios.AxiosResponse<IResponse<IProcessState>, any>>;
|
|
531
|
+
startProcess(tenantId: string, workflowDefenitionId: string, entityId: string): Promise<axios.AxiosResponse<IWorkflowResponse, any>>;
|
|
532
|
+
executeProcessAction(tenantId: string, workflowInstanceId: string, actionId: string, data: any): Promise<axios.AxiosResponse<IResponse<IProcessState>, any>>;
|
|
420
533
|
}
|
|
421
534
|
//# sourceMappingURL=CubekitOrmClient.d.ts.map
|
|
422
535
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cubekit-cloud/cubekit-sdk-js",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.54",
|
|
4
4
|
"description": "@cubekit-cloud/cubekit-sdk-js - the library for working with auto generated API from cubekit.com",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
import { RequestOrmMethodsEnum } from '../enums';
|
|
12
12
|
import { WORKFLOW_URL } from '../config/const';
|
|
13
13
|
import IProcessState from '../interfaces/Orm/Workflow/IProcessState';
|
|
14
|
+
import IWorkflowResponse from '../interfaces/Orm/response/IWorkflowResponse';
|
|
14
15
|
|
|
15
16
|
const ID_SPOT = '{key}';
|
|
16
17
|
|
|
@@ -165,14 +166,20 @@ class CubekitOrmClient {
|
|
|
165
166
|
}
|
|
166
167
|
|
|
167
168
|
public startProcess(tenantId: string, workflowDefenitionId: string, entityId: string) {
|
|
168
|
-
return this.axios.post<
|
|
169
|
+
return this.axios.post<IWorkflowResponse>(
|
|
169
170
|
`${WORKFLOW_URL}/api/v1.0/workflow/tenants/${tenantId}/defenitions/${workflowDefenitionId}/start/${entityId}`
|
|
170
171
|
);
|
|
171
172
|
}
|
|
172
173
|
|
|
173
|
-
public executeProcessAction(
|
|
174
|
+
public executeProcessAction(
|
|
175
|
+
tenantId: string,
|
|
176
|
+
workflowInstanceId: string,
|
|
177
|
+
actionId: string,
|
|
178
|
+
data: any
|
|
179
|
+
) {
|
|
174
180
|
return this.axios.post<IResponse<IProcessState>>(
|
|
175
|
-
`${WORKFLOW_URL}/api/v1.0/workflow/tenants/${tenantId}/instance/${workflowInstanceId}/actions/${actionId}/execute
|
|
181
|
+
`${WORKFLOW_URL}/api/v1.0/workflow/tenants/${tenantId}/instance/${workflowInstanceId}/actions/${actionId}/execute`,
|
|
182
|
+
data
|
|
176
183
|
);
|
|
177
184
|
}
|
|
178
185
|
}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import { IActionGroup } from
|
|
1
|
+
import { IActionGroup } from './IActionGroup';
|
|
2
2
|
import { IStepLink } from './IStepLink';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { IWorkflowInstance } from
|
|
3
|
+
import { IProcessHistory } from './IProcessHistory';
|
|
4
|
+
import { IStep } from './IStep';
|
|
5
|
+
import { IWorkflowDefinition } from './IWorkflowDefinition';
|
|
6
|
+
import { IWorkflowInstance } from './IWorkflowInstance';
|
|
7
7
|
|
|
8
8
|
export default interface IProcessState {
|
|
9
|
-
workflow_instance:
|
|
10
|
-
|
|
9
|
+
workflow_instance: Pick<
|
|
10
|
+
IWorkflowInstance,
|
|
11
|
+
'id' | 'status' | 'workflow_definition_id' | 'initiator_id' | 'initiated_at' | 'current_step_id'
|
|
12
|
+
>;
|
|
13
|
+
definition: Pick<IWorkflowDefinition, 'id' | 'code' | 'name'>;
|
|
11
14
|
current_step: IStepLink;
|
|
12
15
|
step_actions: IStep[];
|
|
13
16
|
allowed_actions: IStep[];
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { IActionGroup } from './IActionGroup';
|
|
2
|
+
import { IProcessHistory } from './IProcessHistory';
|
|
3
|
+
import { IWorkflowDefinition } from './IWorkflowDefinition';
|
|
4
|
+
|
|
5
|
+
export interface IWorkflowData {
|
|
6
|
+
definition: IWorkflowDefinition;
|
|
7
|
+
current_step_id: string;
|
|
8
|
+
steps: Record<string, WorkflowStep>;
|
|
9
|
+
history: IProcessHistory[];
|
|
10
|
+
status: string;
|
|
11
|
+
build_meta: BuildMeta;
|
|
12
|
+
document: DocumentData;
|
|
13
|
+
document_meta: DocumentMeta;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface BuildMeta {
|
|
17
|
+
synced_at: string | null;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
interface DocumentData {
|
|
21
|
+
id: string;
|
|
22
|
+
name: string;
|
|
23
|
+
price: number | null;
|
|
24
|
+
file: any | null;
|
|
25
|
+
description: string | null;
|
|
26
|
+
created_at: string;
|
|
27
|
+
updated_at: string | null;
|
|
28
|
+
deleted_at: string | null;
|
|
29
|
+
status: any | null;
|
|
30
|
+
meta: any | null;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
interface DocumentMeta {
|
|
34
|
+
snapshot_at: string;
|
|
35
|
+
source: 'orm_http' | string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
interface WorkflowStep {
|
|
39
|
+
id: string;
|
|
40
|
+
name: string;
|
|
41
|
+
order: number;
|
|
42
|
+
auto_approve: boolean;
|
|
43
|
+
is_skippable_on_retry: boolean;
|
|
44
|
+
validations: any[];
|
|
45
|
+
actions: Record<string, WorkflowAction>;
|
|
46
|
+
transitions: Record<string, Transition>;
|
|
47
|
+
action_groups: IActionGroup[];
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
interface WorkflowAction {
|
|
51
|
+
build: ActionBuild;
|
|
52
|
+
state: ActionState;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
interface ActionBuild {
|
|
56
|
+
id: string;
|
|
57
|
+
name: string;
|
|
58
|
+
label: string;
|
|
59
|
+
action_type: string;
|
|
60
|
+
assignee_type: string;
|
|
61
|
+
workflow_action_group_id: string;
|
|
62
|
+
assignee_value: string[];
|
|
63
|
+
condition_expression: ConditionExpression | any[];
|
|
64
|
+
appearance_expression: any[];
|
|
65
|
+
callback_timeout_minutes: number | null;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
interface ConditionExpression {
|
|
69
|
+
[field: string]: string[];
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
interface ActionState {
|
|
73
|
+
status: string;
|
|
74
|
+
result: any | null;
|
|
75
|
+
timestamp: string | null;
|
|
76
|
+
user_id: string | null;
|
|
77
|
+
payload: any[];
|
|
78
|
+
errors: any[];
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
interface Transition {
|
|
82
|
+
id: string;
|
|
83
|
+
action_id: string;
|
|
84
|
+
from_step_id: string;
|
|
85
|
+
to_step_id: string;
|
|
86
|
+
is_default: boolean;
|
|
87
|
+
condition_expression: any | null;
|
|
88
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface IWorkflowDefinition {
|
|
2
|
+
id: string;
|
|
3
|
+
code: string;
|
|
4
|
+
name: string;
|
|
5
|
+
orm_status_field: string;
|
|
6
|
+
orm_meta_field: string;
|
|
7
|
+
orm_integration: ORMIntegration;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface ORMIntegration {
|
|
11
|
+
x_api_key: string;
|
|
12
|
+
tenant_application_id: string;
|
|
13
|
+
tenant_application_name: string;
|
|
14
|
+
tenant_application_slug: string;
|
|
15
|
+
tenant_application_table: string;
|
|
16
|
+
tenant_application_model_id: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface IWorkflowDocumentInfo {
|
|
2
|
+
x_api_key: string;
|
|
3
|
+
tenant_application_id: string;
|
|
4
|
+
tenant_application_name: string;
|
|
5
|
+
tenant_application_slug: string;
|
|
6
|
+
tenant_application_table: string;
|
|
7
|
+
tenant_application_model_id: string;
|
|
8
|
+
tenant_id: string;
|
|
9
|
+
tenant_application_entity_id: string;
|
|
10
|
+
document_type: string;
|
|
11
|
+
}
|
|
@@ -1,8 +1,17 @@
|
|
|
1
|
+
import { IWorkflowData } from './IWorkflowData';
|
|
2
|
+
import { IWorkflowDocumentInfo } from './IWorkflowDocumentInfo';
|
|
3
|
+
import { IWorkflowInstanceMeta } from './IWorkflowInstanceMeta';
|
|
4
|
+
|
|
1
5
|
export interface IWorkflowInstance {
|
|
2
6
|
id: string;
|
|
3
|
-
status: string;
|
|
4
7
|
workflow_definition_id: string;
|
|
8
|
+
meta: IWorkflowInstanceMeta;
|
|
9
|
+
document: IWorkflowDocumentInfo;
|
|
10
|
+
status: string;
|
|
11
|
+
current_step_id: string;
|
|
5
12
|
initiator_id: string;
|
|
6
13
|
initiated_at: string;
|
|
7
|
-
|
|
14
|
+
data: IWorkflowData;
|
|
15
|
+
updated_at: string;
|
|
16
|
+
created_at: string;
|
|
8
17
|
}
|