ngx-t-workflow-typings 1.0.0
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/README.md +89 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +18 -0
- package/dist/interfaces/Backend/EscalationLevel.interface.d.ts +16 -0
- package/dist/interfaces/Backend/EscalationLevel.interface.js +15 -0
- package/dist/interfaces/Backend/FollowUpOperation.interface.d.ts +11 -0
- package/dist/interfaces/Backend/FollowUpOperation.interface.js +2 -0
- package/dist/interfaces/Backend/index.d.ts +3 -0
- package/dist/interfaces/Backend/index.js +6 -0
- package/dist/interfaces/Config/ElementEditorConfig.interface.d.ts +18 -0
- package/dist/interfaces/Config/ElementEditorConfig.interface.js +8 -0
- package/dist/interfaces/Config/ElementEditorConfigSection.interface.d.ts +40 -0
- package/dist/interfaces/Config/ElementEditorConfigSection.interface.js +2 -0
- package/dist/interfaces/Config/ExtendedDbForm.interface.d.ts +4 -0
- package/dist/interfaces/Config/ExtendedDbForm.interface.js +2 -0
- package/dist/interfaces/Config/NgxTWorkflowsConfig.interface.d.ts +10 -0
- package/dist/interfaces/Config/NgxTWorkflowsConfig.interface.js +2 -0
- package/dist/interfaces/Config/index.d.ts +5 -0
- package/dist/interfaces/Config/index.js +5 -0
- package/dist/interfaces/Diagram/WorkflowDiagram.interface.d.ts +61 -0
- package/dist/interfaces/Diagram/WorkflowDiagram.interface.js +2 -0
- package/dist/interfaces/Diagram/index.d.ts +14 -0
- package/dist/interfaces/Diagram/index.js +2 -0
- package/dist/interfaces/Document/WorkFlowDocument.interface.d.ts +63 -0
- package/dist/interfaces/Document/WorkFlowDocument.interface.js +9 -0
- package/dist/interfaces/Document/index.d.ts +2 -0
- package/dist/interfaces/Document/index.js +5 -0
- package/dist/interfaces/DocumentSection/DocumentSectionConfigurations.interface.d.ts +35 -0
- package/dist/interfaces/DocumentSection/DocumentSectionConfigurations.interface.js +21 -0
- package/dist/interfaces/DocumentSection/index.d.ts +2 -0
- package/dist/interfaces/DocumentSection/index.js +6 -0
- package/dist/interfaces/ProcessStep/DocumentWorkflowStep.interface.d.ts +23 -0
- package/dist/interfaces/ProcessStep/DocumentWorkflowStep.interface.js +2 -0
- package/dist/interfaces/ProcessStep/NodeConfig.interface.d.ts +11 -0
- package/dist/interfaces/ProcessStep/NodeConfig.interface.js +2 -0
- package/dist/interfaces/ProcessStep/ProcessStep.interface.d.ts +80 -0
- package/dist/interfaces/ProcessStep/ProcessStep.interface.js +11 -0
- package/dist/interfaces/ProcessStep/WorkflowStepType.interface.d.ts +24 -0
- package/dist/interfaces/ProcessStep/WorkflowStepType.interface.js +28 -0
- package/dist/interfaces/ProcessStep/index.d.ts +12 -0
- package/dist/interfaces/ProcessStep/index.js +11 -0
- package/dist/interfaces/Schedule/WorkflowSchedule.interface.d.ts +30 -0
- package/dist/interfaces/Schedule/WorkflowSchedule.interface.js +2 -0
- package/dist/interfaces/Schedule/index.d.ts +1 -0
- package/dist/interfaces/Schedule/index.js +2 -0
- package/dist/interfaces/Tag/TransactionTag.interface.d.ts +35 -0
- package/dist/interfaces/Tag/TransactionTag.interface.js +2 -0
- package/dist/interfaces/Tag/index.d.ts +1 -0
- package/dist/interfaces/Tag/index.js +2 -0
- package/dist/interfaces/Workflow/WorkflowModel.interface.d.ts +15 -0
- package/dist/interfaces/Workflow/WorkflowModel.interface.js +2 -0
- package/dist/interfaces/Workflow/WorkflowNodeData.interface.d.ts +23 -0
- package/dist/interfaces/Workflow/WorkflowNodeData.interface.js +2 -0
- package/dist/interfaces/Workflow/WorkflowPointingRule.interface.d.ts +7 -0
- package/dist/interfaces/Workflow/WorkflowPointingRule.interface.js +2 -0
- package/dist/interfaces/Workflow/index.d.ts +3 -0
- package/dist/interfaces/Workflow/index.js +2 -0
- package/dist/interfaces/index.d.ts +9 -0
- package/dist/interfaces/index.js +25 -0
- package/dist/schemas/Backend/EscalationLevel.schema.d.ts +6 -0
- package/dist/schemas/Backend/EscalationLevel.schema.js +26 -0
- package/dist/schemas/Backend/FollowUpOperation.schema.d.ts +7 -0
- package/dist/schemas/Backend/FollowUpOperation.schema.js +33 -0
- package/dist/schemas/Backend/index.d.ts +2 -0
- package/dist/schemas/Backend/index.js +10 -0
- package/dist/schemas/Document/WorkFlowDocument.schema.d.ts +12 -0
- package/dist/schemas/Document/WorkFlowDocument.schema.js +90 -0
- package/dist/schemas/Document/index.d.ts +1 -0
- package/dist/schemas/Document/index.js +8 -0
- package/dist/schemas/ProcessStep/ProcessStep.schema.d.ts +9 -0
- package/dist/schemas/ProcessStep/ProcessStep.schema.js +135 -0
- package/dist/schemas/ProcessStep/index.d.ts +1 -0
- package/dist/schemas/ProcessStep/index.js +8 -0
- package/dist/schemas/Schedule/WorkflowSchedule.schema.d.ts +16 -0
- package/dist/schemas/Schedule/WorkflowSchedule.schema.js +74 -0
- package/dist/schemas/Schedule/index.d.ts +1 -0
- package/dist/schemas/Schedule/index.js +10 -0
- package/dist/schemas/Tag/TransactionTag.schema.d.ts +9 -0
- package/dist/schemas/Tag/TransactionTag.schema.js +53 -0
- package/dist/schemas/Tag/index.d.ts +1 -0
- package/dist/schemas/Tag/index.js +9 -0
- package/dist/schemas/Workflow/WorkflowModel.schema.d.ts +6 -0
- package/dist/schemas/Workflow/WorkflowModel.schema.js +49 -0
- package/dist/schemas/Workflow/index.d.ts +1 -0
- package/dist/schemas/Workflow/index.js +6 -0
- package/dist/schemas/index.d.ts +6 -0
- package/dist/schemas/index.js +22 -0
- package/dist/types/util.type.d.ts +4 -0
- package/dist/types/util.type.js +5 -0
- package/package.json +37 -0
package/README.md
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# @ngx-t-workflows/shared-types
|
|
2
|
+
|
|
3
|
+
Typings and interfaces for the [ngx-t-workflows](https://github.com/mashegoTerrence/ngx-t-workflows) library. Provides TypeScript interfaces, enums, and Joi schemas for workflow-related data structures and runtime validation.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @ngx-t-workflows/shared-types
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### Peer Dependencies
|
|
12
|
+
|
|
13
|
+
- `ngx-t-forms-types` ^0.0.16
|
|
14
|
+
- `rxjs` ^7.8.2
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
### Interfaces and Types
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import {
|
|
22
|
+
WorkflowModel,
|
|
23
|
+
ProcessStep,
|
|
24
|
+
DocumentWorkflowStep,
|
|
25
|
+
WorkFlowDocumentInterface,
|
|
26
|
+
WorkflowStepTypeEnum,
|
|
27
|
+
WorkflowStepStatus,
|
|
28
|
+
} from '@ngx-t-workflows/shared-types';
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Runtime Validation (Joi Schemas)
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
import {
|
|
35
|
+
validateProcessStep,
|
|
36
|
+
validateWorkflowModel,
|
|
37
|
+
validateWorkFlowDocument,
|
|
38
|
+
validateTaskSLAConfig,
|
|
39
|
+
validateITransactionTag,
|
|
40
|
+
} from '@ngx-t-workflows/shared-types';
|
|
41
|
+
|
|
42
|
+
const errors = validateProcessStep(stepData);
|
|
43
|
+
if (errors.length > 0) {
|
|
44
|
+
console.error('Validation failed:', errors);
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Schemas (for custom validation)
|
|
49
|
+
|
|
50
|
+
```typescript
|
|
51
|
+
import {
|
|
52
|
+
processStepSchema,
|
|
53
|
+
workflowModelSchema,
|
|
54
|
+
workFlowDocumentSchema,
|
|
55
|
+
} from '@ngx-t-workflows/shared-types';
|
|
56
|
+
|
|
57
|
+
const { error, value } = processStepSchema.validate(data);
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Package Structure
|
|
61
|
+
|
|
62
|
+
| Path | Contents |
|
|
63
|
+
|------|----------|
|
|
64
|
+
| `interfaces/Backend` | Follow-up operations, escalation levels |
|
|
65
|
+
| `interfaces/Config` | NgxTWorkflowsConfig, element editor config |
|
|
66
|
+
| `interfaces/Document` | WorkFlowDocument, IRecentlyViewed |
|
|
67
|
+
| `interfaces/DocumentSection` | Document section configurations |
|
|
68
|
+
| `interfaces/Diagram` | Workflow diagram nodes, connections, state |
|
|
69
|
+
| `interfaces/ProcessStep` | ProcessStep, DocumentWorkflowStep, step types |
|
|
70
|
+
| `interfaces/Schedule` | Duration, WorkSchedule, TaskSLAConfig |
|
|
71
|
+
| `interfaces/Tag` | Transaction tags, metadata, assignments |
|
|
72
|
+
| `interfaces/Workflow` | WorkflowModel, WorkflowNodeData |
|
|
73
|
+
| `schemas/*` | Joi schemas and `validate*` helpers |
|
|
74
|
+
|
|
75
|
+
## Development
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
npm install
|
|
79
|
+
npm run build
|
|
80
|
+
npm run typecheck
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Publishing
|
|
84
|
+
|
|
85
|
+
See [PUBLISH-CHECKLIST.md](./PUBLISH-CHECKLIST.md) for step-by-step publishing instructions. See [RULES.md](./RULES.md) for versioning guidelines and security practices.
|
|
86
|
+
|
|
87
|
+
## License
|
|
88
|
+
|
|
89
|
+
ISC
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./interfaces/index"), exports);
|
|
18
|
+
__exportStar(require("./schemas/index"), exports);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare enum EscalationType {
|
|
2
|
+
Auto = "auto",
|
|
3
|
+
Manual = "manual",
|
|
4
|
+
SeniorEscalation = "seniorEsalation"
|
|
5
|
+
}
|
|
6
|
+
export declare enum PeriodType {
|
|
7
|
+
Days = "days",
|
|
8
|
+
Months = "months",
|
|
9
|
+
Years = "years"
|
|
10
|
+
}
|
|
11
|
+
export interface EscalationLevelInterface {
|
|
12
|
+
type: EscalationType | string;
|
|
13
|
+
periodType: PeriodType | string;
|
|
14
|
+
members: string[];
|
|
15
|
+
period: number;
|
|
16
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PeriodType = exports.EscalationType = void 0;
|
|
4
|
+
var EscalationType;
|
|
5
|
+
(function (EscalationType) {
|
|
6
|
+
EscalationType["Auto"] = "auto";
|
|
7
|
+
EscalationType["Manual"] = "manual";
|
|
8
|
+
EscalationType["SeniorEscalation"] = "seniorEsalation";
|
|
9
|
+
})(EscalationType || (exports.EscalationType = EscalationType = {}));
|
|
10
|
+
var PeriodType;
|
|
11
|
+
(function (PeriodType) {
|
|
12
|
+
PeriodType["Days"] = "days";
|
|
13
|
+
PeriodType["Months"] = "months";
|
|
14
|
+
PeriodType["Years"] = "years";
|
|
15
|
+
})(PeriodType || (exports.PeriodType = PeriodType = {}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface BackendApiRequiredParams {
|
|
2
|
+
name: string;
|
|
3
|
+
type: string;
|
|
4
|
+
}
|
|
5
|
+
export interface BackEndFollowUpOperationInterface {
|
|
6
|
+
_id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
config: string;
|
|
9
|
+
requiredParams: BackendApiRequiredParams[];
|
|
10
|
+
requiredParamDocumentLink: Record<string, string>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PeriodType = exports.EscalationType = void 0;
|
|
4
|
+
var EscalationLevel_interface_1 = require("./EscalationLevel.interface");
|
|
5
|
+
Object.defineProperty(exports, "EscalationType", { enumerable: true, get: function () { return EscalationLevel_interface_1.EscalationType; } });
|
|
6
|
+
Object.defineProperty(exports, "PeriodType", { enumerable: true, get: function () { return EscalationLevel_interface_1.PeriodType; } });
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ElementEditorConfigSectionInterface } from 'ngx-t-forms-types';
|
|
2
|
+
import type { ElementEditorStepConfigSectionInterface } from './ElementEditorConfigSection.interface';
|
|
3
|
+
export declare enum ConfigTypes {
|
|
4
|
+
BasicDetail = "basicDetail",
|
|
5
|
+
EditProcessStep = "editProcessStep"
|
|
6
|
+
}
|
|
7
|
+
export interface ElementEditorConfig {
|
|
8
|
+
label: string;
|
|
9
|
+
subTitle: string;
|
|
10
|
+
saveButtonLabel: string;
|
|
11
|
+
editorSections: ElementEditorConfigSectionInterface[];
|
|
12
|
+
}
|
|
13
|
+
export interface ElementEditorConfigStepEdit {
|
|
14
|
+
label: string;
|
|
15
|
+
subTitle: string;
|
|
16
|
+
saveButtonLabel: string;
|
|
17
|
+
editorSections: ElementEditorStepConfigSectionInterface[];
|
|
18
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConfigTypes = void 0;
|
|
4
|
+
var ConfigTypes;
|
|
5
|
+
(function (ConfigTypes) {
|
|
6
|
+
ConfigTypes["BasicDetail"] = "basicDetail";
|
|
7
|
+
ConfigTypes["EditProcessStep"] = "editProcessStep";
|
|
8
|
+
})(ConfigTypes || (exports.ConfigTypes = ConfigTypes = {}));
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { BlurHandleTypes, ConfigurationValidTestInterface, ElementEditorTypes, IGetTreeResponse, IPostmanCollectionConfig, IWorkflowOption, ValidationError } from 'ngx-t-forms-types';
|
|
2
|
+
import type { ProcessStep } from '../ProcessStep/ProcessStep.interface';
|
|
3
|
+
export interface ElementEditorInnerSectionStepElementInterface {
|
|
4
|
+
id: string;
|
|
5
|
+
name: keyof ProcessStep | 'default';
|
|
6
|
+
hint?: string;
|
|
7
|
+
editType: ElementEditorTypes;
|
|
8
|
+
deepBind: [keyof ProcessStep, ...string[]];
|
|
9
|
+
limitTo?: number;
|
|
10
|
+
additionalTest?: ConfigurationValidTestInterface[];
|
|
11
|
+
disabled?: ConfigurationValidTestInterface[];
|
|
12
|
+
fetchOptions?: string[];
|
|
13
|
+
clearOnChange?: string[][];
|
|
14
|
+
blurHandle?: BlurHandleTypes;
|
|
15
|
+
label: string;
|
|
16
|
+
required?: boolean;
|
|
17
|
+
readonly?: boolean;
|
|
18
|
+
templateOptions?: Array<Record<string, unknown>>;
|
|
19
|
+
placeholder?: string;
|
|
20
|
+
options?: Array<{
|
|
21
|
+
label: string;
|
|
22
|
+
value: string;
|
|
23
|
+
}>;
|
|
24
|
+
computedErrors?: ValidationError[];
|
|
25
|
+
min?: number;
|
|
26
|
+
max?: number;
|
|
27
|
+
step?: number;
|
|
28
|
+
format?: (value: unknown) => number;
|
|
29
|
+
postmanCollectionConfig?: IPostmanCollectionConfig;
|
|
30
|
+
httpGetDataFunction?: (url: string, options?: RequestInit) => import('rxjs').Observable<unknown>;
|
|
31
|
+
getWorkflowOptions?: import('rxjs').Observable<IWorkflowOption[]> | undefined;
|
|
32
|
+
getMscoaTree?: import('rxjs').Observable<IGetTreeResponse> | undefined;
|
|
33
|
+
}
|
|
34
|
+
export interface ElementEditorStepConfigSectionInterface {
|
|
35
|
+
label: string;
|
|
36
|
+
showItemValue?: keyof ProcessStep;
|
|
37
|
+
id: string;
|
|
38
|
+
additionalTest?: ConfigurationValidTestInterface[];
|
|
39
|
+
elements: ElementEditorInnerSectionStepElementInterface[];
|
|
40
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Observable } from 'rxjs';
|
|
2
|
+
import type { DatabaseFormInterface } from 'ngx-t-forms-types';
|
|
3
|
+
import type { WorkflowModel } from '../Workflow/WorkflowModel.interface';
|
|
4
|
+
export interface NgxTWorkflowsConfig {
|
|
5
|
+
runPipeLine: (pipeline: unknown[], workflowId: string) => Observable<unknown>;
|
|
6
|
+
postToServer: (url: string, data: unknown, options?: RequestInit) => Observable<unknown>;
|
|
7
|
+
dataIntegration: () => Observable<Record<string, unknown>>;
|
|
8
|
+
saveWorkflow: (workflow: WorkflowModel) => Observable<WorkflowModel | undefined>;
|
|
9
|
+
cloneForm: (formId: string, title: string, baseControlNameAdapter: string) => Observable<DatabaseFormInterface>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type { NgxTWorkflowsConfig } from './NgxTWorkflowsConfig.interface';
|
|
2
|
+
export type { ExtendedDbFormInterface } from './ExtendedDbForm.interface';
|
|
3
|
+
export type { ElementEditorConfig, ElementEditorConfigStepEdit, } from './ElementEditorConfig.interface';
|
|
4
|
+
export type { ElementEditorInnerSectionStepElementInterface, ElementEditorStepConfigSectionInterface, } from './ElementEditorConfigSection.interface';
|
|
5
|
+
export { ConfigTypes } from './ElementEditorConfig.interface';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConfigTypes = void 0;
|
|
4
|
+
var ElementEditorConfig_interface_1 = require("./ElementEditorConfig.interface");
|
|
5
|
+
Object.defineProperty(exports, "ConfigTypes", { enumerable: true, get: function () { return ElementEditorConfig_interface_1.ConfigTypes; } });
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { TreeNode } from 'ngx-t-forms-types';
|
|
2
|
+
import type { IProcessNodeBase } from '../ProcessStep/ProcessStep.interface';
|
|
3
|
+
import type { DatabaseFormInterface } from 'ngx-t-forms-types';
|
|
4
|
+
export interface IPoint {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
}
|
|
8
|
+
export interface INodeDecisionCondition {
|
|
9
|
+
expression: string;
|
|
10
|
+
valueAccessRules: Record<string, TreeNode[]>;
|
|
11
|
+
}
|
|
12
|
+
export interface INodeBaseConnection {
|
|
13
|
+
id: string;
|
|
14
|
+
outputId: string;
|
|
15
|
+
inputId: string | undefined;
|
|
16
|
+
text: string;
|
|
17
|
+
endColor?: string;
|
|
18
|
+
startColor?: string;
|
|
19
|
+
type?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface INodeInputOut {
|
|
22
|
+
id: string;
|
|
23
|
+
side: 'left' | 'right' | 'top' | 'bottom';
|
|
24
|
+
label: string;
|
|
25
|
+
inEdit?: boolean;
|
|
26
|
+
decisionsCondition?: INodeDecisionCondition;
|
|
27
|
+
connections?: INodeBaseConnection[];
|
|
28
|
+
}
|
|
29
|
+
export interface INodeMembers {
|
|
30
|
+
name: string;
|
|
31
|
+
id: string;
|
|
32
|
+
email: string;
|
|
33
|
+
avatar?: string;
|
|
34
|
+
isSelected?: boolean;
|
|
35
|
+
}
|
|
36
|
+
export interface INode extends IProcessNodeBase {
|
|
37
|
+
busy?: boolean;
|
|
38
|
+
form?: DatabaseFormInterface;
|
|
39
|
+
nextWorkflowName?: string;
|
|
40
|
+
systemStep: boolean;
|
|
41
|
+
initiateNextWorkflow?: boolean;
|
|
42
|
+
members?: INodeMembers[];
|
|
43
|
+
styling?: {
|
|
44
|
+
icon: string;
|
|
45
|
+
iconColor: string;
|
|
46
|
+
nodeBackground: string;
|
|
47
|
+
nodeBorder: string;
|
|
48
|
+
nodeTextColor: string;
|
|
49
|
+
nodeText: string;
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
export interface IConnection extends INodeBaseConnection {
|
|
53
|
+
endColor: string;
|
|
54
|
+
startColor: string;
|
|
55
|
+
type: string;
|
|
56
|
+
}
|
|
57
|
+
export interface IWorkflowDiagramConfig {
|
|
58
|
+
nodes: INode[];
|
|
59
|
+
connections: IConnection[];
|
|
60
|
+
flowId: string;
|
|
61
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { WorkflowModel } from '../Workflow/WorkflowModel.interface';
|
|
2
|
+
import type { INode, IConnection } from './WorkflowDiagram.interface';
|
|
3
|
+
export type { IPoint, INodeDecisionCondition, INodeBaseConnection, INodeInputOut, INodeMembers, INode, IConnection, IWorkflowDiagramConfig, } from './WorkflowDiagram.interface';
|
|
4
|
+
export interface WorkflowDiagramState {
|
|
5
|
+
nodes: INode[];
|
|
6
|
+
id: string;
|
|
7
|
+
workFlows: WorkflowModel[];
|
|
8
|
+
selectedNodes: string[];
|
|
9
|
+
selectedConnections: string[];
|
|
10
|
+
connections: IConnection[];
|
|
11
|
+
inEditMode: boolean;
|
|
12
|
+
nodeInEditId: string | null;
|
|
13
|
+
savingChanges: boolean;
|
|
14
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { DocumentWorkflowStep } from '../ProcessStep/DocumentWorkflowStep.interface';
|
|
2
|
+
import type { ITransactionTag } from '../Tag/TransactionTag.interface';
|
|
3
|
+
export type RecentlyViewedParams = Record<string, string | string[]>;
|
|
4
|
+
export declare enum RecentlyViewedStatus {
|
|
5
|
+
Pending = "pending",
|
|
6
|
+
Complete = "complete",
|
|
7
|
+
Action = "action"
|
|
8
|
+
}
|
|
9
|
+
export interface SimilarityResult {
|
|
10
|
+
document: WorkFlowDocumentInterface;
|
|
11
|
+
similarity: number;
|
|
12
|
+
view: boolean;
|
|
13
|
+
relation: 'ancestor' | 'descendant' | 'sibling' | 'similar';
|
|
14
|
+
}
|
|
15
|
+
export interface WorkFlowDocumentInterface {
|
|
16
|
+
_id: string;
|
|
17
|
+
processTree: DocumentWorkflowStep[];
|
|
18
|
+
archive: boolean;
|
|
19
|
+
ownerId: string;
|
|
20
|
+
userId: string;
|
|
21
|
+
originDocId?: string;
|
|
22
|
+
previousDocRef?: string;
|
|
23
|
+
form: Record<string, unknown>;
|
|
24
|
+
workflowId: string;
|
|
25
|
+
docType: string;
|
|
26
|
+
reference: string;
|
|
27
|
+
departmentId: string;
|
|
28
|
+
organisationId: string;
|
|
29
|
+
createdAt: Date;
|
|
30
|
+
updatedAt: Date;
|
|
31
|
+
adj_microFlow_review?: boolean;
|
|
32
|
+
microFlowSubmissions?: WorkFlowDocumentInterface[];
|
|
33
|
+
currentStepID: string;
|
|
34
|
+
itemListSelected?: boolean;
|
|
35
|
+
checkedOut?: {
|
|
36
|
+
userId: string;
|
|
37
|
+
date: Date;
|
|
38
|
+
};
|
|
39
|
+
checkedOutDocId?: string;
|
|
40
|
+
latestVersion: number;
|
|
41
|
+
versions: Array<{
|
|
42
|
+
versionNumber: number;
|
|
43
|
+
description: string;
|
|
44
|
+
updatedAt: Date;
|
|
45
|
+
tempDocId: string;
|
|
46
|
+
}>;
|
|
47
|
+
busy?: boolean;
|
|
48
|
+
SYSTEM_TAGS: ITransactionTag[];
|
|
49
|
+
}
|
|
50
|
+
export interface IRecentlyViewed {
|
|
51
|
+
_id: string;
|
|
52
|
+
reference: string;
|
|
53
|
+
date: Date;
|
|
54
|
+
description: string;
|
|
55
|
+
status: RecentlyViewedStatus | string;
|
|
56
|
+
url: string;
|
|
57
|
+
params: RecentlyViewedParams;
|
|
58
|
+
}
|
|
59
|
+
export interface IRecentlyViewedCookie {
|
|
60
|
+
[userId: string]: {
|
|
61
|
+
[workflowId: string]: IRecentlyViewed[];
|
|
62
|
+
};
|
|
63
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RecentlyViewedStatus = void 0;
|
|
4
|
+
var RecentlyViewedStatus;
|
|
5
|
+
(function (RecentlyViewedStatus) {
|
|
6
|
+
RecentlyViewedStatus["Pending"] = "pending";
|
|
7
|
+
RecentlyViewedStatus["Complete"] = "complete";
|
|
8
|
+
RecentlyViewedStatus["Action"] = "action";
|
|
9
|
+
})(RecentlyViewedStatus || (exports.RecentlyViewedStatus = RecentlyViewedStatus = {}));
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RecentlyViewedStatus = void 0;
|
|
4
|
+
var WorkFlowDocument_interface_1 = require("./WorkFlowDocument.interface");
|
|
5
|
+
Object.defineProperty(exports, "RecentlyViewedStatus", { enumerable: true, get: function () { return WorkFlowDocument_interface_1.RecentlyViewedStatus; } });
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { DocumentLitsLabelConfigInterface } from 'ngx-t-forms-types';
|
|
2
|
+
export declare enum DocumentLitsLabelConfigInterfaceValueType {
|
|
3
|
+
currency = "currency",
|
|
4
|
+
number = "number",
|
|
5
|
+
string = "string",
|
|
6
|
+
date = "date",
|
|
7
|
+
daysAgo = "daysAgo",
|
|
8
|
+
systemReference = "systemReference"
|
|
9
|
+
}
|
|
10
|
+
export declare enum SectionTypeGroups {
|
|
11
|
+
Transactions = "transactions",
|
|
12
|
+
Processes = "processes",
|
|
13
|
+
System = "system",
|
|
14
|
+
FormPreview = "formPreview",
|
|
15
|
+
Home = "home",
|
|
16
|
+
Transaction = "transaction"
|
|
17
|
+
}
|
|
18
|
+
export interface DocumentLitsConfigInterface {
|
|
19
|
+
segments: unknown[];
|
|
20
|
+
activeSegment: string;
|
|
21
|
+
labelConfiguration: DocumentLitsLabelConfigInterface[];
|
|
22
|
+
}
|
|
23
|
+
export interface DocumentSectionConfigurationsInterface {
|
|
24
|
+
sectionTitle: string;
|
|
25
|
+
icon: string;
|
|
26
|
+
getSectionList: {
|
|
27
|
+
submissionId: string;
|
|
28
|
+
httpEndPoint: string;
|
|
29
|
+
};
|
|
30
|
+
documentDetailsConfig?: {
|
|
31
|
+
title: string;
|
|
32
|
+
};
|
|
33
|
+
sectionGroup: SectionTypeGroups;
|
|
34
|
+
docuListConfig?: DocumentLitsConfigInterface;
|
|
35
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SectionTypeGroups = exports.DocumentLitsLabelConfigInterfaceValueType = void 0;
|
|
4
|
+
var DocumentLitsLabelConfigInterfaceValueType;
|
|
5
|
+
(function (DocumentLitsLabelConfigInterfaceValueType) {
|
|
6
|
+
DocumentLitsLabelConfigInterfaceValueType["currency"] = "currency";
|
|
7
|
+
DocumentLitsLabelConfigInterfaceValueType["number"] = "number";
|
|
8
|
+
DocumentLitsLabelConfigInterfaceValueType["string"] = "string";
|
|
9
|
+
DocumentLitsLabelConfigInterfaceValueType["date"] = "date";
|
|
10
|
+
DocumentLitsLabelConfigInterfaceValueType["daysAgo"] = "daysAgo";
|
|
11
|
+
DocumentLitsLabelConfigInterfaceValueType["systemReference"] = "systemReference";
|
|
12
|
+
})(DocumentLitsLabelConfigInterfaceValueType || (exports.DocumentLitsLabelConfigInterfaceValueType = DocumentLitsLabelConfigInterfaceValueType = {}));
|
|
13
|
+
var SectionTypeGroups;
|
|
14
|
+
(function (SectionTypeGroups) {
|
|
15
|
+
SectionTypeGroups["Transactions"] = "transactions";
|
|
16
|
+
SectionTypeGroups["Processes"] = "processes";
|
|
17
|
+
SectionTypeGroups["System"] = "system";
|
|
18
|
+
SectionTypeGroups["FormPreview"] = "formPreview";
|
|
19
|
+
SectionTypeGroups["Home"] = "home";
|
|
20
|
+
SectionTypeGroups["Transaction"] = "transaction";
|
|
21
|
+
})(SectionTypeGroups || (exports.SectionTypeGroups = SectionTypeGroups = {}));
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SectionTypeGroups = exports.DocumentLitsLabelConfigInterfaceValueType = void 0;
|
|
4
|
+
var DocumentSectionConfigurations_interface_1 = require("./DocumentSectionConfigurations.interface");
|
|
5
|
+
Object.defineProperty(exports, "DocumentLitsLabelConfigInterfaceValueType", { enumerable: true, get: function () { return DocumentSectionConfigurations_interface_1.DocumentLitsLabelConfigInterfaceValueType; } });
|
|
6
|
+
Object.defineProperty(exports, "SectionTypeGroups", { enumerable: true, get: function () { return DocumentSectionConfigurations_interface_1.SectionTypeGroups; } });
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { DatabaseFormInterface } from 'ngx-t-forms-types';
|
|
2
|
+
import type { ProcessStep } from './ProcessStep.interface';
|
|
3
|
+
export interface DocumentWorkflowStep extends ProcessStep {
|
|
4
|
+
date: Date;
|
|
5
|
+
data: Record<string, unknown> | undefined;
|
|
6
|
+
taskRef: string;
|
|
7
|
+
reference: string;
|
|
8
|
+
isArchived?: boolean;
|
|
9
|
+
userId?: string;
|
|
10
|
+
members: string[];
|
|
11
|
+
taskCompltedBy: string;
|
|
12
|
+
validations: unknown[];
|
|
13
|
+
}
|
|
14
|
+
export interface DocumentActivityLog extends DocumentWorkflowStep {
|
|
15
|
+
sectionInputs: unknown[];
|
|
16
|
+
reviewApproved: boolean | undefined;
|
|
17
|
+
form: DatabaseFormInterface | undefined;
|
|
18
|
+
userInfo: {
|
|
19
|
+
name: string | undefined;
|
|
20
|
+
lastName: string | undefined;
|
|
21
|
+
email: string | undefined;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { WorkflowStepTypes } from './WorkflowStepType.interface';
|
|
2
|
+
export interface NodeConfigValue {
|
|
3
|
+
inputs: number;
|
|
4
|
+
outputs: number | 'multiple';
|
|
5
|
+
hasMembers: boolean;
|
|
6
|
+
hasForm: boolean;
|
|
7
|
+
icon: string;
|
|
8
|
+
}
|
|
9
|
+
export type NodeConfig = {
|
|
10
|
+
[key in WorkflowStepTypes]: NodeConfigValue;
|
|
11
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { IPoint, INodeInputOut } from '../Diagram/WorkflowDiagram.interface';
|
|
2
|
+
import type { BackEndFollowUpOperationInterface } from '../Backend/FollowUpOperation.interface';
|
|
3
|
+
import type { EscalationLevelInterface } from '../Backend/EscalationLevel.interface';
|
|
4
|
+
import type { Duration } from '../Schedule/WorkflowSchedule.interface';
|
|
5
|
+
import type { WorkflowStepTypes } from './WorkflowStepType.interface';
|
|
6
|
+
export interface ProcessStepTemplate {
|
|
7
|
+
label: string;
|
|
8
|
+
icon?: string;
|
|
9
|
+
color?: string;
|
|
10
|
+
systemStep: boolean;
|
|
11
|
+
stepType: WorkflowStepTypes;
|
|
12
|
+
}
|
|
13
|
+
export interface IProcessNodeBase extends ProcessStepTemplate {
|
|
14
|
+
stepId: string;
|
|
15
|
+
position: IPoint;
|
|
16
|
+
inputs: INodeInputOut[];
|
|
17
|
+
outputs: INodeInputOut[];
|
|
18
|
+
controlName?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface AdjudicationScoreSheet {
|
|
21
|
+
formControlName: string;
|
|
22
|
+
totalPoints: number;
|
|
23
|
+
description: string;
|
|
24
|
+
}
|
|
25
|
+
export interface ProcessStep extends IProcessNodeBase {
|
|
26
|
+
duration?: Duration;
|
|
27
|
+
reference?: string;
|
|
28
|
+
bulkEmail?: Record<string, string>;
|
|
29
|
+
documentValueWithEmail?: string;
|
|
30
|
+
listPropertyWithEmail?: string;
|
|
31
|
+
initiateNextWorkflow?: boolean;
|
|
32
|
+
publicPortalConfig?: string;
|
|
33
|
+
postExpiryDateControlName?: string;
|
|
34
|
+
nextWorkflowId?: string;
|
|
35
|
+
nextWorkflowScheduleDateControlName?: string;
|
|
36
|
+
scheduleNextWorkflow?: boolean;
|
|
37
|
+
scheduleMultiItems?: boolean;
|
|
38
|
+
scheduleMultiItemsControlName?: string;
|
|
39
|
+
publicPortalFunctionalScoreSheetStep?: number;
|
|
40
|
+
class: string;
|
|
41
|
+
stepId: string;
|
|
42
|
+
escalationRulee?: EscalationLevelInterface[];
|
|
43
|
+
adjudication: {
|
|
44
|
+
scoreStepId: string;
|
|
45
|
+
scoreSheetWorkflowId: string;
|
|
46
|
+
scoreSheet: AdjudicationScoreSheet[];
|
|
47
|
+
} | string;
|
|
48
|
+
microFlowSubmissions?: string[];
|
|
49
|
+
workflowStepWithMicroFlowTransitions?: string;
|
|
50
|
+
adjudicationPricePreferenceCalculation?: string;
|
|
51
|
+
adjudicationPricePreferenceCalculationPriceKey?: string;
|
|
52
|
+
adjudicationMicroFlowStepWithReview?: string;
|
|
53
|
+
adjudicationRespondentNameKey?: string;
|
|
54
|
+
adjudicationRespondentCodeKey?: string;
|
|
55
|
+
workflowFormForScoreSheet?: string;
|
|
56
|
+
adjudicationStepWithScoreSheetControlName?: string;
|
|
57
|
+
adjudicationMicroFlowStepWithAssignPoints?: string;
|
|
58
|
+
microFlow: string;
|
|
59
|
+
formId?: string;
|
|
60
|
+
members?: string[];
|
|
61
|
+
followUpOperations: BackEndFollowUpOperationInterface[];
|
|
62
|
+
active?: boolean;
|
|
63
|
+
status: WorkflowStepStatus;
|
|
64
|
+
}
|
|
65
|
+
export declare enum WorkflowStepStatus {
|
|
66
|
+
PENDING = "pending",
|
|
67
|
+
IN_PROGRESS = "in-progress",
|
|
68
|
+
REJECTED = "rejected",
|
|
69
|
+
ESCALATED = "escalated",
|
|
70
|
+
COMPLETE = "complete"
|
|
71
|
+
}
|
|
72
|
+
export interface AdjudicationReviewedMicroFlowSubmission {
|
|
73
|
+
id: string;
|
|
74
|
+
supplierNumber: string;
|
|
75
|
+
nameOfBidder: string;
|
|
76
|
+
responsePreferenceCalculationKey: number;
|
|
77
|
+
adj_microFlow_review: boolean;
|
|
78
|
+
createdAt: Date;
|
|
79
|
+
updatedAt: Date;
|
|
80
|
+
}
|