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
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.adjudicationScoreSheetSchema = exports.processStepSchema = exports.adjudicationReviewedMicroFlowSubmissionSchema = void 0;
|
|
7
|
+
exports.validateProcessStep = validateProcessStep;
|
|
8
|
+
const joi_1 = __importDefault(require("joi"));
|
|
9
|
+
const EscalationLevel_schema_1 = require("../Backend/EscalationLevel.schema");
|
|
10
|
+
const FollowUpOperation_schema_1 = require("../Backend/FollowUpOperation.schema");
|
|
11
|
+
const WorkflowSchedule_schema_1 = require("../Schedule/WorkflowSchedule.schema");
|
|
12
|
+
const WORKFLOW_STEP_TYPES = [
|
|
13
|
+
'initiate',
|
|
14
|
+
'review',
|
|
15
|
+
'append',
|
|
16
|
+
'process',
|
|
17
|
+
'decision',
|
|
18
|
+
'end',
|
|
19
|
+
'bulkMail',
|
|
20
|
+
'adjudication',
|
|
21
|
+
'publicPortal',
|
|
22
|
+
'archive',
|
|
23
|
+
'checkout',
|
|
24
|
+
'checkin',
|
|
25
|
+
];
|
|
26
|
+
const WORKFLOW_STEP_STATUS = [
|
|
27
|
+
'pending',
|
|
28
|
+
'in-progress',
|
|
29
|
+
'rejected',
|
|
30
|
+
'escalated',
|
|
31
|
+
'complete',
|
|
32
|
+
];
|
|
33
|
+
const pointSchema = joi_1.default.object({
|
|
34
|
+
x: joi_1.default.number().required(),
|
|
35
|
+
y: joi_1.default.number().required(),
|
|
36
|
+
});
|
|
37
|
+
const nodeDecisionConditionSchema = joi_1.default.object({
|
|
38
|
+
expression: joi_1.default.string().required(),
|
|
39
|
+
valueAccessRules: joi_1.default.object().pattern(joi_1.default.string(), joi_1.default.array()).required(),
|
|
40
|
+
});
|
|
41
|
+
const nodeBaseConnectionSchema = joi_1.default.object({
|
|
42
|
+
id: joi_1.default.string().required(),
|
|
43
|
+
outputId: joi_1.default.string().required(),
|
|
44
|
+
inputId: joi_1.default.alternatives().try(joi_1.default.string(), joi_1.default.valid(null)).required(),
|
|
45
|
+
text: joi_1.default.string().required(),
|
|
46
|
+
endColor: joi_1.default.string().optional(),
|
|
47
|
+
startColor: joi_1.default.string().optional(),
|
|
48
|
+
type: joi_1.default.string().optional(),
|
|
49
|
+
});
|
|
50
|
+
const nodeInputOutSchema = joi_1.default.object({
|
|
51
|
+
id: joi_1.default.string().required(),
|
|
52
|
+
side: joi_1.default.string().valid('left', 'right', 'top', 'bottom').required(),
|
|
53
|
+
label: joi_1.default.string().required(),
|
|
54
|
+
inEdit: joi_1.default.boolean().optional(),
|
|
55
|
+
decisionsCondition: nodeDecisionConditionSchema.optional(),
|
|
56
|
+
connections: joi_1.default.array().items(nodeBaseConnectionSchema).optional(),
|
|
57
|
+
});
|
|
58
|
+
const adjudicationScoreSheetSchema = joi_1.default.object({
|
|
59
|
+
formControlName: joi_1.default.string().required(),
|
|
60
|
+
totalPoints: joi_1.default.number().required(),
|
|
61
|
+
description: joi_1.default.string().required(),
|
|
62
|
+
});
|
|
63
|
+
exports.adjudicationScoreSheetSchema = adjudicationScoreSheetSchema;
|
|
64
|
+
const adjudicationObjectSchema = joi_1.default.object({
|
|
65
|
+
scoreStepId: joi_1.default.string().required(),
|
|
66
|
+
scoreSheetWorkflowId: joi_1.default.string().required(),
|
|
67
|
+
scoreSheet: joi_1.default.array().items(adjudicationScoreSheetSchema).required(),
|
|
68
|
+
});
|
|
69
|
+
const processStepSchema = joi_1.default.object({
|
|
70
|
+
label: joi_1.default.string().required(),
|
|
71
|
+
icon: joi_1.default.string().optional(),
|
|
72
|
+
color: joi_1.default.string().optional(),
|
|
73
|
+
systemStep: joi_1.default.boolean().required(),
|
|
74
|
+
stepType: joi_1.default.string().valid(...WORKFLOW_STEP_TYPES).required(),
|
|
75
|
+
stepId: joi_1.default.string().required(),
|
|
76
|
+
position: pointSchema.required(),
|
|
77
|
+
inputs: joi_1.default.array().items(nodeInputOutSchema).required(),
|
|
78
|
+
outputs: joi_1.default.array().items(nodeInputOutSchema).required(),
|
|
79
|
+
controlName: joi_1.default.string().optional(),
|
|
80
|
+
duration: WorkflowSchedule_schema_1.durationSchema.optional(),
|
|
81
|
+
reference: joi_1.default.string().optional(),
|
|
82
|
+
bulkEmail: joi_1.default.object().pattern(joi_1.default.string(), joi_1.default.string()).optional(),
|
|
83
|
+
documentValueWithEmail: joi_1.default.string().optional(),
|
|
84
|
+
listPropertyWithEmail: joi_1.default.string().optional(),
|
|
85
|
+
initiateNextWorkflow: joi_1.default.boolean().optional(),
|
|
86
|
+
publicPortalConfig: joi_1.default.string().optional(),
|
|
87
|
+
postExpiryDateControlName: joi_1.default.string().optional(),
|
|
88
|
+
nextWorkflowId: joi_1.default.string().optional(),
|
|
89
|
+
nextWorkflowScheduleDateControlName: joi_1.default.string().optional(),
|
|
90
|
+
scheduleNextWorkflow: joi_1.default.boolean().optional(),
|
|
91
|
+
scheduleMultiItems: joi_1.default.boolean().optional(),
|
|
92
|
+
scheduleMultiItemsControlName: joi_1.default.string().optional(),
|
|
93
|
+
publicPortalFunctionalScoreSheetStep: joi_1.default.number().optional(),
|
|
94
|
+
class: joi_1.default.string().required(),
|
|
95
|
+
escalationRulee: joi_1.default.array().items(EscalationLevel_schema_1.escalationLevelSchema).optional(),
|
|
96
|
+
adjudication: joi_1.default.alternatives().try(adjudicationObjectSchema, joi_1.default.string()).required(),
|
|
97
|
+
microFlowSubmissions: joi_1.default.array().items(joi_1.default.string()).optional(),
|
|
98
|
+
workflowStepWithMicroFlowTransitions: joi_1.default.string().optional(),
|
|
99
|
+
adjudicationPricePreferenceCalculation: joi_1.default.string().optional(),
|
|
100
|
+
adjudicationPricePreferenceCalculationPriceKey: joi_1.default.string().optional(),
|
|
101
|
+
adjudicationMicroFlowStepWithReview: joi_1.default.string().optional(),
|
|
102
|
+
adjudicationRespondentNameKey: joi_1.default.string().optional(),
|
|
103
|
+
adjudicationRespondentCodeKey: joi_1.default.string().optional(),
|
|
104
|
+
workflowFormForScoreSheet: joi_1.default.string().optional(),
|
|
105
|
+
adjudicationStepWithScoreSheetControlName: joi_1.default.string().optional(),
|
|
106
|
+
adjudicationMicroFlowStepWithAssignPoints: joi_1.default.string().optional(),
|
|
107
|
+
microFlow: joi_1.default.string().required(),
|
|
108
|
+
formId: joi_1.default.string().optional(),
|
|
109
|
+
members: joi_1.default.array().items(joi_1.default.string()).optional(),
|
|
110
|
+
followUpOperations: joi_1.default.array()
|
|
111
|
+
.items(FollowUpOperation_schema_1.backEndFollowUpOperationSchema)
|
|
112
|
+
.required(),
|
|
113
|
+
active: joi_1.default.boolean().optional(),
|
|
114
|
+
status: joi_1.default.string().valid(...WORKFLOW_STEP_STATUS).required(),
|
|
115
|
+
});
|
|
116
|
+
exports.processStepSchema = processStepSchema;
|
|
117
|
+
exports.adjudicationReviewedMicroFlowSubmissionSchema = joi_1.default.object({
|
|
118
|
+
id: joi_1.default.string().required(),
|
|
119
|
+
supplierNumber: joi_1.default.string().required(),
|
|
120
|
+
nameOfBidder: joi_1.default.string().required(),
|
|
121
|
+
responsePreferenceCalculationKey: joi_1.default.number().required(),
|
|
122
|
+
adj_microFlow_review: joi_1.default.boolean().required(),
|
|
123
|
+
createdAt: joi_1.default.date().required(),
|
|
124
|
+
updatedAt: joi_1.default.date().required(),
|
|
125
|
+
});
|
|
126
|
+
function validateProcessStep(data) {
|
|
127
|
+
const { error } = processStepSchema.validate(data, { abortEarly: false });
|
|
128
|
+
if (error) {
|
|
129
|
+
return error.details.map((detail) => ({
|
|
130
|
+
key: detail.path.join('.'),
|
|
131
|
+
message: detail.message,
|
|
132
|
+
}));
|
|
133
|
+
}
|
|
134
|
+
return [];
|
|
135
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { processStepSchema, adjudicationScoreSheetSchema, adjudicationReviewedMicroFlowSubmissionSchema, validateProcessStep, } from './ProcessStep.schema';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateProcessStep = exports.adjudicationReviewedMicroFlowSubmissionSchema = exports.adjudicationScoreSheetSchema = exports.processStepSchema = void 0;
|
|
4
|
+
var ProcessStep_schema_1 = require("./ProcessStep.schema");
|
|
5
|
+
Object.defineProperty(exports, "processStepSchema", { enumerable: true, get: function () { return ProcessStep_schema_1.processStepSchema; } });
|
|
6
|
+
Object.defineProperty(exports, "adjudicationScoreSheetSchema", { enumerable: true, get: function () { return ProcessStep_schema_1.adjudicationScoreSheetSchema; } });
|
|
7
|
+
Object.defineProperty(exports, "adjudicationReviewedMicroFlowSubmissionSchema", { enumerable: true, get: function () { return ProcessStep_schema_1.adjudicationReviewedMicroFlowSubmissionSchema; } });
|
|
8
|
+
Object.defineProperty(exports, "validateProcessStep", { enumerable: true, get: function () { return ProcessStep_schema_1.validateProcessStep; } });
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import Joi from 'joi';
|
|
2
|
+
export declare const durationSchema: Joi.ObjectSchema<any>;
|
|
3
|
+
export declare const workScheduleSchema: Joi.ObjectSchema<any>;
|
|
4
|
+
export declare const taskSLAConfigSchema: Joi.ObjectSchema<any>;
|
|
5
|
+
export declare function validateDuration(data: unknown): {
|
|
6
|
+
key: string;
|
|
7
|
+
message: string;
|
|
8
|
+
}[];
|
|
9
|
+
export declare function validateWorkSchedule(data: unknown): {
|
|
10
|
+
key: string;
|
|
11
|
+
message: string;
|
|
12
|
+
}[];
|
|
13
|
+
export declare function validateTaskSLAConfig(data: unknown): {
|
|
14
|
+
key: string;
|
|
15
|
+
message: string;
|
|
16
|
+
}[];
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.taskSLAConfigSchema = exports.workScheduleSchema = exports.durationSchema = void 0;
|
|
7
|
+
exports.validateDuration = validateDuration;
|
|
8
|
+
exports.validateWorkSchedule = validateWorkSchedule;
|
|
9
|
+
exports.validateTaskSLAConfig = validateTaskSLAConfig;
|
|
10
|
+
const joi_1 = __importDefault(require("joi"));
|
|
11
|
+
const DAYS_OF_WEEK = [
|
|
12
|
+
'Monday',
|
|
13
|
+
'Tuesday',
|
|
14
|
+
'Wednesday',
|
|
15
|
+
'Thursday',
|
|
16
|
+
'Friday',
|
|
17
|
+
'Saturday',
|
|
18
|
+
'Sunday',
|
|
19
|
+
];
|
|
20
|
+
exports.durationSchema = joi_1.default.object({
|
|
21
|
+
value: joi_1.default.number().required(),
|
|
22
|
+
unit: joi_1.default.string().valid('minutes', 'hours', 'days').required(),
|
|
23
|
+
});
|
|
24
|
+
exports.workScheduleSchema = joi_1.default.object({
|
|
25
|
+
workDayHours: joi_1.default.number().required(),
|
|
26
|
+
shiftStart: joi_1.default.string().required(),
|
|
27
|
+
shiftEnd: joi_1.default.string().required(),
|
|
28
|
+
workDays: joi_1.default.array()
|
|
29
|
+
.items(joi_1.default.string().valid(...DAYS_OF_WEEK))
|
|
30
|
+
.required(),
|
|
31
|
+
excludeHolidays: joi_1.default.boolean().required(),
|
|
32
|
+
holidayCalendarId: joi_1.default.string().optional(),
|
|
33
|
+
});
|
|
34
|
+
exports.taskSLAConfigSchema = joi_1.default.object({
|
|
35
|
+
id: joi_1.default.string().required(),
|
|
36
|
+
name: joi_1.default.string().required(),
|
|
37
|
+
duration: exports.durationSchema.optional(),
|
|
38
|
+
schedule: exports.workScheduleSchema.required(),
|
|
39
|
+
escalation: joi_1.default.object({
|
|
40
|
+
warningThresholdPercent: joi_1.default.number().required(),
|
|
41
|
+
notifyAssignee: joi_1.default.boolean().required(),
|
|
42
|
+
notifyManager: joi_1.default.boolean().required(),
|
|
43
|
+
}).optional(),
|
|
44
|
+
});
|
|
45
|
+
function validateDuration(data) {
|
|
46
|
+
const { error } = exports.durationSchema.validate(data, { abortEarly: false });
|
|
47
|
+
if (error) {
|
|
48
|
+
return error.details.map((detail) => ({
|
|
49
|
+
key: detail.path.join('.'),
|
|
50
|
+
message: detail.message,
|
|
51
|
+
}));
|
|
52
|
+
}
|
|
53
|
+
return [];
|
|
54
|
+
}
|
|
55
|
+
function validateWorkSchedule(data) {
|
|
56
|
+
const { error } = exports.workScheduleSchema.validate(data, { abortEarly: false });
|
|
57
|
+
if (error) {
|
|
58
|
+
return error.details.map((detail) => ({
|
|
59
|
+
key: detail.path.join('.'),
|
|
60
|
+
message: detail.message,
|
|
61
|
+
}));
|
|
62
|
+
}
|
|
63
|
+
return [];
|
|
64
|
+
}
|
|
65
|
+
function validateTaskSLAConfig(data) {
|
|
66
|
+
const { error } = exports.taskSLAConfigSchema.validate(data, { abortEarly: false });
|
|
67
|
+
if (error) {
|
|
68
|
+
return error.details.map((detail) => ({
|
|
69
|
+
key: detail.path.join('.'),
|
|
70
|
+
message: detail.message,
|
|
71
|
+
}));
|
|
72
|
+
}
|
|
73
|
+
return [];
|
|
74
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { durationSchema, workScheduleSchema, taskSLAConfigSchema, validateDuration, validateWorkSchedule, validateTaskSLAConfig, } from './WorkflowSchedule.schema';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateTaskSLAConfig = exports.validateWorkSchedule = exports.validateDuration = exports.taskSLAConfigSchema = exports.workScheduleSchema = exports.durationSchema = void 0;
|
|
4
|
+
var WorkflowSchedule_schema_1 = require("./WorkflowSchedule.schema");
|
|
5
|
+
Object.defineProperty(exports, "durationSchema", { enumerable: true, get: function () { return WorkflowSchedule_schema_1.durationSchema; } });
|
|
6
|
+
Object.defineProperty(exports, "workScheduleSchema", { enumerable: true, get: function () { return WorkflowSchedule_schema_1.workScheduleSchema; } });
|
|
7
|
+
Object.defineProperty(exports, "taskSLAConfigSchema", { enumerable: true, get: function () { return WorkflowSchedule_schema_1.taskSLAConfigSchema; } });
|
|
8
|
+
Object.defineProperty(exports, "validateDuration", { enumerable: true, get: function () { return WorkflowSchedule_schema_1.validateDuration; } });
|
|
9
|
+
Object.defineProperty(exports, "validateWorkSchedule", { enumerable: true, get: function () { return WorkflowSchedule_schema_1.validateWorkSchedule; } });
|
|
10
|
+
Object.defineProperty(exports, "validateTaskSLAConfig", { enumerable: true, get: function () { return WorkflowSchedule_schema_1.validateTaskSLAConfig; } });
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Joi from 'joi';
|
|
2
|
+
export declare const iTagMetadataSchema: Joi.ObjectSchema<any>;
|
|
3
|
+
export declare const iAuditEntrySchema: Joi.ObjectSchema<any>;
|
|
4
|
+
export declare const iTagAssignmentSchema: Joi.ObjectSchema<any>;
|
|
5
|
+
export declare const iTransactionTagSchema: Joi.ObjectSchema<any>;
|
|
6
|
+
export declare function validateITransactionTag(data: unknown): {
|
|
7
|
+
key: string;
|
|
8
|
+
message: string;
|
|
9
|
+
}[];
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.iTransactionTagSchema = exports.iTagAssignmentSchema = exports.iAuditEntrySchema = exports.iTagMetadataSchema = void 0;
|
|
7
|
+
exports.validateITransactionTag = validateITransactionTag;
|
|
8
|
+
const joi_1 = __importDefault(require("joi"));
|
|
9
|
+
exports.iTagMetadataSchema = joi_1.default.object({
|
|
10
|
+
category: joi_1.default.string().optional(),
|
|
11
|
+
color: joi_1.default.string().optional(),
|
|
12
|
+
priority: joi_1.default.number().optional(),
|
|
13
|
+
}).pattern(joi_1.default.string(), joi_1.default.alternatives().try(joi_1.default.string(), joi_1.default.number(), joi_1.default.boolean()));
|
|
14
|
+
exports.iAuditEntrySchema = joi_1.default.object({
|
|
15
|
+
action: joi_1.default.string().required(),
|
|
16
|
+
userId: joi_1.default.string().required(),
|
|
17
|
+
timestamp: joi_1.default.date().required(),
|
|
18
|
+
details: joi_1.default.object().required(),
|
|
19
|
+
});
|
|
20
|
+
exports.iTagAssignmentSchema = joi_1.default.object({
|
|
21
|
+
transactionId: joi_1.default.string().required(),
|
|
22
|
+
assignedBy: joi_1.default.string().required(),
|
|
23
|
+
assignedAt: joi_1.default.date().required(),
|
|
24
|
+
metadata: joi_1.default.object().optional(),
|
|
25
|
+
});
|
|
26
|
+
exports.iTransactionTagSchema = joi_1.default.object({
|
|
27
|
+
_id: joi_1.default.string().required(),
|
|
28
|
+
name: joi_1.default.string().required(),
|
|
29
|
+
description: joi_1.default.string().optional(),
|
|
30
|
+
metadata: exports.iTagMetadataSchema.required(),
|
|
31
|
+
busy: joi_1.default.boolean().optional(),
|
|
32
|
+
isActive: joi_1.default.boolean().required(),
|
|
33
|
+
assignments: joi_1.default.array().items(exports.iTagAssignmentSchema).required(),
|
|
34
|
+
auditTrail: joi_1.default.array().items(exports.iAuditEntrySchema).required(),
|
|
35
|
+
createdBy: joi_1.default.string().required(),
|
|
36
|
+
departmentId: joi_1.default.string().required(),
|
|
37
|
+
updatedBy: joi_1.default.string().required(),
|
|
38
|
+
createdAt: joi_1.default.date().required(),
|
|
39
|
+
updatedAt: joi_1.default.date().required(),
|
|
40
|
+
systemTag: joi_1.default.boolean().required(),
|
|
41
|
+
});
|
|
42
|
+
function validateITransactionTag(data) {
|
|
43
|
+
const { error } = exports.iTransactionTagSchema.validate(data, {
|
|
44
|
+
abortEarly: false,
|
|
45
|
+
});
|
|
46
|
+
if (error) {
|
|
47
|
+
return error.details.map((detail) => ({
|
|
48
|
+
key: detail.path.join('.'),
|
|
49
|
+
message: detail.message,
|
|
50
|
+
}));
|
|
51
|
+
}
|
|
52
|
+
return [];
|
|
53
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { iTagMetadataSchema, iAuditEntrySchema, iTagAssignmentSchema, iTransactionTagSchema, validateITransactionTag, } from './TransactionTag.schema';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateITransactionTag = exports.iTransactionTagSchema = exports.iTagAssignmentSchema = exports.iAuditEntrySchema = exports.iTagMetadataSchema = void 0;
|
|
4
|
+
var TransactionTag_schema_1 = require("./TransactionTag.schema");
|
|
5
|
+
Object.defineProperty(exports, "iTagMetadataSchema", { enumerable: true, get: function () { return TransactionTag_schema_1.iTagMetadataSchema; } });
|
|
6
|
+
Object.defineProperty(exports, "iAuditEntrySchema", { enumerable: true, get: function () { return TransactionTag_schema_1.iAuditEntrySchema; } });
|
|
7
|
+
Object.defineProperty(exports, "iTagAssignmentSchema", { enumerable: true, get: function () { return TransactionTag_schema_1.iTagAssignmentSchema; } });
|
|
8
|
+
Object.defineProperty(exports, "iTransactionTagSchema", { enumerable: true, get: function () { return TransactionTag_schema_1.iTransactionTagSchema; } });
|
|
9
|
+
Object.defineProperty(exports, "validateITransactionTag", { enumerable: true, get: function () { return TransactionTag_schema_1.validateITransactionTag; } });
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.workflowModelSchema = void 0;
|
|
7
|
+
exports.validateWorkflowModel = validateWorkflowModel;
|
|
8
|
+
const joi_1 = __importDefault(require("joi"));
|
|
9
|
+
const ProcessStep_schema_1 = require("../ProcessStep/ProcessStep.schema");
|
|
10
|
+
const documentSectionConfigSchema = joi_1.default.object({
|
|
11
|
+
sectionTitle: joi_1.default.string().required(),
|
|
12
|
+
icon: joi_1.default.string().required(),
|
|
13
|
+
getSectionList: joi_1.default.object({
|
|
14
|
+
submissionId: joi_1.default.string().required(),
|
|
15
|
+
httpEndPoint: joi_1.default.string().required(),
|
|
16
|
+
}).required(),
|
|
17
|
+
documentDetailsConfig: joi_1.default.object({
|
|
18
|
+
title: joi_1.default.string().required(),
|
|
19
|
+
}).optional(),
|
|
20
|
+
sectionGroup: joi_1.default.string().required(),
|
|
21
|
+
docuListConfig: joi_1.default.object({
|
|
22
|
+
segments: joi_1.default.array().required(),
|
|
23
|
+
activeSegment: joi_1.default.string().required(),
|
|
24
|
+
labelConfiguration: joi_1.default.array().required(),
|
|
25
|
+
}).optional(),
|
|
26
|
+
});
|
|
27
|
+
exports.workflowModelSchema = joi_1.default.object({
|
|
28
|
+
processTree: joi_1.default.array().items(ProcessStep_schema_1.processStepSchema).required(),
|
|
29
|
+
departmentId: joi_1.default.string().required(),
|
|
30
|
+
superAdmin: joi_1.default.string().required(),
|
|
31
|
+
_id: joi_1.default.string().required(),
|
|
32
|
+
createdAt: joi_1.default.date().required(),
|
|
33
|
+
updatedAt: joi_1.default.date().required(),
|
|
34
|
+
name: joi_1.default.string().required(),
|
|
35
|
+
isDocument: joi_1.default.boolean().required(),
|
|
36
|
+
documentConfig: documentSectionConfigSchema.optional(),
|
|
37
|
+
checkInAndOutWorkflow: joi_1.default.boolean().optional(),
|
|
38
|
+
checkInAndOutWorkflowId: joi_1.default.string().optional(),
|
|
39
|
+
});
|
|
40
|
+
function validateWorkflowModel(data) {
|
|
41
|
+
const { error } = exports.workflowModelSchema.validate(data, { abortEarly: false });
|
|
42
|
+
if (error) {
|
|
43
|
+
return error.details.map((detail) => ({
|
|
44
|
+
key: detail.path.join('.'),
|
|
45
|
+
message: detail.message,
|
|
46
|
+
}));
|
|
47
|
+
}
|
|
48
|
+
return [];
|
|
49
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { workflowModelSchema, validateWorkflowModel, } from './WorkflowModel.schema';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateWorkflowModel = exports.workflowModelSchema = void 0;
|
|
4
|
+
var WorkflowModel_schema_1 = require("./WorkflowModel.schema");
|
|
5
|
+
Object.defineProperty(exports, "workflowModelSchema", { enumerable: true, get: function () { return WorkflowModel_schema_1.workflowModelSchema; } });
|
|
6
|
+
Object.defineProperty(exports, "validateWorkflowModel", { enumerable: true, get: function () { return WorkflowModel_schema_1.validateWorkflowModel; } });
|
|
@@ -0,0 +1,22 @@
|
|
|
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("./Backend/index"), exports);
|
|
18
|
+
__exportStar(require("./Document/index"), exports);
|
|
19
|
+
__exportStar(require("./ProcessStep/index"), exports);
|
|
20
|
+
__exportStar(require("./Schedule/index"), exports);
|
|
21
|
+
__exportStar(require("./Tag/index"), exports);
|
|
22
|
+
__exportStar(require("./Workflow/index"), exports);
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ngx-t-workflow-typings",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Typings and interfaces for the ngx-t-workflows library.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"typings",
|
|
7
|
+
"typescript",
|
|
8
|
+
"workflow"
|
|
9
|
+
],
|
|
10
|
+
"license": "ISC",
|
|
11
|
+
"type": "commonjs",
|
|
12
|
+
"main": "dist/index.js",
|
|
13
|
+
"types": "dist/index.d.ts",
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
17
|
+
"scripts": {
|
|
18
|
+
"clean": "rimraf dist",
|
|
19
|
+
"build": "npm run clean && tsc",
|
|
20
|
+
"prepublishOnly": "npm run build",
|
|
21
|
+
"typecheck": "tsc --noEmit",
|
|
22
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
23
|
+
},
|
|
24
|
+
"peerDependencies": {
|
|
25
|
+
"ngx-t-forms-types": "^0.0.16",
|
|
26
|
+
"rxjs": "^7.8.2"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"joi": "^18.0.2"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@types/joi": "^17.2.2",
|
|
33
|
+
"ngx-t-forms-types": "^0.0.16",
|
|
34
|
+
"rimraf": "^6.1.3",
|
|
35
|
+
"typescript": "^5.9.3"
|
|
36
|
+
}
|
|
37
|
+
}
|