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.
Files changed (90) hide show
  1. package/README.md +89 -0
  2. package/dist/index.d.ts +2 -0
  3. package/dist/index.js +18 -0
  4. package/dist/interfaces/Backend/EscalationLevel.interface.d.ts +16 -0
  5. package/dist/interfaces/Backend/EscalationLevel.interface.js +15 -0
  6. package/dist/interfaces/Backend/FollowUpOperation.interface.d.ts +11 -0
  7. package/dist/interfaces/Backend/FollowUpOperation.interface.js +2 -0
  8. package/dist/interfaces/Backend/index.d.ts +3 -0
  9. package/dist/interfaces/Backend/index.js +6 -0
  10. package/dist/interfaces/Config/ElementEditorConfig.interface.d.ts +18 -0
  11. package/dist/interfaces/Config/ElementEditorConfig.interface.js +8 -0
  12. package/dist/interfaces/Config/ElementEditorConfigSection.interface.d.ts +40 -0
  13. package/dist/interfaces/Config/ElementEditorConfigSection.interface.js +2 -0
  14. package/dist/interfaces/Config/ExtendedDbForm.interface.d.ts +4 -0
  15. package/dist/interfaces/Config/ExtendedDbForm.interface.js +2 -0
  16. package/dist/interfaces/Config/NgxTWorkflowsConfig.interface.d.ts +10 -0
  17. package/dist/interfaces/Config/NgxTWorkflowsConfig.interface.js +2 -0
  18. package/dist/interfaces/Config/index.d.ts +5 -0
  19. package/dist/interfaces/Config/index.js +5 -0
  20. package/dist/interfaces/Diagram/WorkflowDiagram.interface.d.ts +61 -0
  21. package/dist/interfaces/Diagram/WorkflowDiagram.interface.js +2 -0
  22. package/dist/interfaces/Diagram/index.d.ts +14 -0
  23. package/dist/interfaces/Diagram/index.js +2 -0
  24. package/dist/interfaces/Document/WorkFlowDocument.interface.d.ts +63 -0
  25. package/dist/interfaces/Document/WorkFlowDocument.interface.js +9 -0
  26. package/dist/interfaces/Document/index.d.ts +2 -0
  27. package/dist/interfaces/Document/index.js +5 -0
  28. package/dist/interfaces/DocumentSection/DocumentSectionConfigurations.interface.d.ts +35 -0
  29. package/dist/interfaces/DocumentSection/DocumentSectionConfigurations.interface.js +21 -0
  30. package/dist/interfaces/DocumentSection/index.d.ts +2 -0
  31. package/dist/interfaces/DocumentSection/index.js +6 -0
  32. package/dist/interfaces/ProcessStep/DocumentWorkflowStep.interface.d.ts +23 -0
  33. package/dist/interfaces/ProcessStep/DocumentWorkflowStep.interface.js +2 -0
  34. package/dist/interfaces/ProcessStep/NodeConfig.interface.d.ts +11 -0
  35. package/dist/interfaces/ProcessStep/NodeConfig.interface.js +2 -0
  36. package/dist/interfaces/ProcessStep/ProcessStep.interface.d.ts +80 -0
  37. package/dist/interfaces/ProcessStep/ProcessStep.interface.js +11 -0
  38. package/dist/interfaces/ProcessStep/WorkflowStepType.interface.d.ts +24 -0
  39. package/dist/interfaces/ProcessStep/WorkflowStepType.interface.js +28 -0
  40. package/dist/interfaces/ProcessStep/index.d.ts +12 -0
  41. package/dist/interfaces/ProcessStep/index.js +11 -0
  42. package/dist/interfaces/Schedule/WorkflowSchedule.interface.d.ts +30 -0
  43. package/dist/interfaces/Schedule/WorkflowSchedule.interface.js +2 -0
  44. package/dist/interfaces/Schedule/index.d.ts +1 -0
  45. package/dist/interfaces/Schedule/index.js +2 -0
  46. package/dist/interfaces/Tag/TransactionTag.interface.d.ts +35 -0
  47. package/dist/interfaces/Tag/TransactionTag.interface.js +2 -0
  48. package/dist/interfaces/Tag/index.d.ts +1 -0
  49. package/dist/interfaces/Tag/index.js +2 -0
  50. package/dist/interfaces/Workflow/WorkflowModel.interface.d.ts +15 -0
  51. package/dist/interfaces/Workflow/WorkflowModel.interface.js +2 -0
  52. package/dist/interfaces/Workflow/WorkflowNodeData.interface.d.ts +23 -0
  53. package/dist/interfaces/Workflow/WorkflowNodeData.interface.js +2 -0
  54. package/dist/interfaces/Workflow/WorkflowPointingRule.interface.d.ts +7 -0
  55. package/dist/interfaces/Workflow/WorkflowPointingRule.interface.js +2 -0
  56. package/dist/interfaces/Workflow/index.d.ts +3 -0
  57. package/dist/interfaces/Workflow/index.js +2 -0
  58. package/dist/interfaces/index.d.ts +9 -0
  59. package/dist/interfaces/index.js +25 -0
  60. package/dist/schemas/Backend/EscalationLevel.schema.d.ts +6 -0
  61. package/dist/schemas/Backend/EscalationLevel.schema.js +26 -0
  62. package/dist/schemas/Backend/FollowUpOperation.schema.d.ts +7 -0
  63. package/dist/schemas/Backend/FollowUpOperation.schema.js +33 -0
  64. package/dist/schemas/Backend/index.d.ts +2 -0
  65. package/dist/schemas/Backend/index.js +10 -0
  66. package/dist/schemas/Document/WorkFlowDocument.schema.d.ts +12 -0
  67. package/dist/schemas/Document/WorkFlowDocument.schema.js +90 -0
  68. package/dist/schemas/Document/index.d.ts +1 -0
  69. package/dist/schemas/Document/index.js +8 -0
  70. package/dist/schemas/ProcessStep/ProcessStep.schema.d.ts +9 -0
  71. package/dist/schemas/ProcessStep/ProcessStep.schema.js +135 -0
  72. package/dist/schemas/ProcessStep/index.d.ts +1 -0
  73. package/dist/schemas/ProcessStep/index.js +8 -0
  74. package/dist/schemas/Schedule/WorkflowSchedule.schema.d.ts +16 -0
  75. package/dist/schemas/Schedule/WorkflowSchedule.schema.js +74 -0
  76. package/dist/schemas/Schedule/index.d.ts +1 -0
  77. package/dist/schemas/Schedule/index.js +10 -0
  78. package/dist/schemas/Tag/TransactionTag.schema.d.ts +9 -0
  79. package/dist/schemas/Tag/TransactionTag.schema.js +53 -0
  80. package/dist/schemas/Tag/index.d.ts +1 -0
  81. package/dist/schemas/Tag/index.js +9 -0
  82. package/dist/schemas/Workflow/WorkflowModel.schema.d.ts +6 -0
  83. package/dist/schemas/Workflow/WorkflowModel.schema.js +49 -0
  84. package/dist/schemas/Workflow/index.d.ts +1 -0
  85. package/dist/schemas/Workflow/index.js +6 -0
  86. package/dist/schemas/index.d.ts +6 -0
  87. package/dist/schemas/index.js +22 -0
  88. package/dist/types/util.type.d.ts +4 -0
  89. package/dist/types/util.type.js +5 -0
  90. package/package.json +37 -0
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WorkflowStepStatus = void 0;
4
+ var WorkflowStepStatus;
5
+ (function (WorkflowStepStatus) {
6
+ WorkflowStepStatus["PENDING"] = "pending";
7
+ WorkflowStepStatus["IN_PROGRESS"] = "in-progress";
8
+ WorkflowStepStatus["REJECTED"] = "rejected";
9
+ WorkflowStepStatus["ESCALATED"] = "escalated";
10
+ WorkflowStepStatus["COMPLETE"] = "complete";
11
+ })(WorkflowStepStatus || (exports.WorkflowStepStatus = WorkflowStepStatus = {}));
@@ -0,0 +1,24 @@
1
+ export declare enum WorkflowStepTypeEnum {
2
+ Initiate = "initiate",
3
+ Review = "review",
4
+ Append = "append",
5
+ Process = "process",
6
+ Decision = "decision",
7
+ End = "end",
8
+ BulkMail = "bulkMail",
9
+ Adjudication = "adjudication",
10
+ PublicPortal = "publicPortal",
11
+ Archive = "archive",
12
+ Checkout = "checkout",
13
+ Checkin = "checkin"
14
+ }
15
+ export type WorkflowStepTypes = WorkflowStepTypeEnum.Initiate | WorkflowStepTypeEnum.Review | WorkflowStepTypeEnum.Append | WorkflowStepTypeEnum.Process | WorkflowStepTypeEnum.Decision | WorkflowStepTypeEnum.End | WorkflowStepTypeEnum.BulkMail | WorkflowStepTypeEnum.Adjudication | WorkflowStepTypeEnum.PublicPortal | WorkflowStepTypeEnum.Archive | WorkflowStepTypeEnum.Checkout | WorkflowStepTypeEnum.Checkin;
16
+ export declare enum EFlowActionPanelEvent {
17
+ ZOOM_IN = "ZOOM_IN",
18
+ ZOOM_OUT = "ZOOM_OUT",
19
+ ONE_TO_ONE = "ONE_TO_ONE",
20
+ FIT_TO_SCREEN = "FIT_TO_SCREEN",
21
+ SELECT_ALL = "SELECT_ALL",
22
+ DELETE_SELECTED = "DELETE_SELECTED",
23
+ AUTO_ARRANGE = "AUTO_ARRANGE"
24
+ }
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EFlowActionPanelEvent = exports.WorkflowStepTypeEnum = void 0;
4
+ var WorkflowStepTypeEnum;
5
+ (function (WorkflowStepTypeEnum) {
6
+ WorkflowStepTypeEnum["Initiate"] = "initiate";
7
+ WorkflowStepTypeEnum["Review"] = "review";
8
+ WorkflowStepTypeEnum["Append"] = "append";
9
+ WorkflowStepTypeEnum["Process"] = "process";
10
+ WorkflowStepTypeEnum["Decision"] = "decision";
11
+ WorkflowStepTypeEnum["End"] = "end";
12
+ WorkflowStepTypeEnum["BulkMail"] = "bulkMail";
13
+ WorkflowStepTypeEnum["Adjudication"] = "adjudication";
14
+ WorkflowStepTypeEnum["PublicPortal"] = "publicPortal";
15
+ WorkflowStepTypeEnum["Archive"] = "archive";
16
+ WorkflowStepTypeEnum["Checkout"] = "checkout";
17
+ WorkflowStepTypeEnum["Checkin"] = "checkin";
18
+ })(WorkflowStepTypeEnum || (exports.WorkflowStepTypeEnum = WorkflowStepTypeEnum = {}));
19
+ var EFlowActionPanelEvent;
20
+ (function (EFlowActionPanelEvent) {
21
+ EFlowActionPanelEvent["ZOOM_IN"] = "ZOOM_IN";
22
+ EFlowActionPanelEvent["ZOOM_OUT"] = "ZOOM_OUT";
23
+ EFlowActionPanelEvent["ONE_TO_ONE"] = "ONE_TO_ONE";
24
+ EFlowActionPanelEvent["FIT_TO_SCREEN"] = "FIT_TO_SCREEN";
25
+ EFlowActionPanelEvent["SELECT_ALL"] = "SELECT_ALL";
26
+ EFlowActionPanelEvent["DELETE_SELECTED"] = "DELETE_SELECTED";
27
+ EFlowActionPanelEvent["AUTO_ARRANGE"] = "AUTO_ARRANGE";
28
+ })(EFlowActionPanelEvent || (exports.EFlowActionPanelEvent = EFlowActionPanelEvent = {}));
@@ -0,0 +1,12 @@
1
+ export type { ProcessStepTemplate, IProcessNodeBase, ProcessStep, AdjudicationScoreSheet, AdjudicationReviewedMicroFlowSubmission, } from './ProcessStep.interface';
2
+ export type { DocumentWorkflowStep, DocumentActivityLog, } from './DocumentWorkflowStep.interface';
3
+ export { WorkflowStepStatus } from './ProcessStep.interface';
4
+ export { WorkflowStepTypeEnum, EFlowActionPanelEvent, } from './WorkflowStepType.interface';
5
+ export type { WorkflowStepTypes } from './WorkflowStepType.interface';
6
+ export type { NodeConfig, NodeConfigValue } from './NodeConfig.interface';
7
+ /** @deprecated Use WorkflowStepStatus instead */
8
+ export { WorkflowStepStatus as workflowStepStatus } from './ProcessStep.interface';
9
+ /** @deprecated Use AdjudicationScoreSheet instead */
10
+ export type { AdjudicationScoreSheet as adjudicationScoreSheet } from './ProcessStep.interface';
11
+ /** @deprecated Use AdjudicationReviewedMicroFlowSubmission instead */
12
+ export type { AdjudicationReviewedMicroFlowSubmission as adjudicationReviewedMicroFlowSubmission, } from './ProcessStep.interface';
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.workflowStepStatus = exports.EFlowActionPanelEvent = exports.WorkflowStepTypeEnum = exports.WorkflowStepStatus = void 0;
4
+ var ProcessStep_interface_1 = require("./ProcessStep.interface");
5
+ Object.defineProperty(exports, "WorkflowStepStatus", { enumerable: true, get: function () { return ProcessStep_interface_1.WorkflowStepStatus; } });
6
+ var WorkflowStepType_interface_1 = require("./WorkflowStepType.interface");
7
+ Object.defineProperty(exports, "WorkflowStepTypeEnum", { enumerable: true, get: function () { return WorkflowStepType_interface_1.WorkflowStepTypeEnum; } });
8
+ Object.defineProperty(exports, "EFlowActionPanelEvent", { enumerable: true, get: function () { return WorkflowStepType_interface_1.EFlowActionPanelEvent; } });
9
+ /** @deprecated Use WorkflowStepStatus instead */
10
+ var ProcessStep_interface_2 = require("./ProcessStep.interface");
11
+ Object.defineProperty(exports, "workflowStepStatus", { enumerable: true, get: function () { return ProcessStep_interface_2.WorkflowStepStatus; } });
@@ -0,0 +1,30 @@
1
+ export type DayOfWeek = 'Monday' | 'Tuesday' | 'Wednesday' | 'Thursday' | 'Friday' | 'Saturday' | 'Sunday';
2
+ export interface Duration {
3
+ value: number;
4
+ unit: 'minutes' | 'hours' | 'days';
5
+ }
6
+ export interface WorkSchedule {
7
+ /** Total hours in a single working day (e.g., 8) */
8
+ workDayHours: number;
9
+ /** Start of shift in 24h format (HH:mm:ss) */
10
+ shiftStart: string;
11
+ /** End of shift in 24h format (HH:mm:ss) */
12
+ shiftEnd: string;
13
+ /** The days of the week the clock is active */
14
+ workDays: DayOfWeek[];
15
+ /** If true, the clock stops on dates found in the holiday calendar */
16
+ excludeHolidays: boolean;
17
+ /** Reference to a specific holiday dataset */
18
+ holidayCalendarId?: string;
19
+ }
20
+ export interface TaskSLAConfig {
21
+ id: string;
22
+ name: string;
23
+ duration?: Duration;
24
+ schedule: WorkSchedule;
25
+ escalation?: {
26
+ warningThresholdPercent: number;
27
+ notifyAssignee: boolean;
28
+ notifyManager: boolean;
29
+ };
30
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export type { DayOfWeek, Duration, WorkSchedule, TaskSLAConfig, } from './WorkflowSchedule.interface';
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,35 @@
1
+ export interface ITagMetadata {
2
+ category?: string;
3
+ color?: string;
4
+ priority?: number;
5
+ [key: string]: string | number | boolean | undefined;
6
+ }
7
+ export interface IAuditEntry {
8
+ action: string;
9
+ userId: string;
10
+ timestamp: Date;
11
+ details: Record<string, unknown>;
12
+ }
13
+ export interface ITagAssignment {
14
+ transactionId: string;
15
+ assignedBy: string;
16
+ assignedAt: Date;
17
+ metadata?: Record<string, unknown>;
18
+ }
19
+ /** Data-only interface for schema validation; methods omitted for typings library. */
20
+ export interface ITransactionTag {
21
+ _id: string;
22
+ name: string;
23
+ description?: string;
24
+ metadata: ITagMetadata;
25
+ busy?: boolean;
26
+ isActive: boolean;
27
+ assignments: ITagAssignment[];
28
+ auditTrail: IAuditEntry[];
29
+ createdBy: string;
30
+ departmentId: string;
31
+ updatedBy: string;
32
+ createdAt: Date;
33
+ updatedAt: Date;
34
+ systemTag: boolean;
35
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export type { ITagMetadata, IAuditEntry, ITagAssignment, ITransactionTag, } from './TransactionTag.interface';
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,15 @@
1
+ import type { DocumentSectionConfigurationsInterface } from '../DocumentSection/DocumentSectionConfigurations.interface';
2
+ import type { ProcessStep } from '../ProcessStep/ProcessStep.interface';
3
+ export interface WorkflowModel {
4
+ processTree: ProcessStep[];
5
+ departmentId: string;
6
+ superAdmin: string;
7
+ _id: string;
8
+ createdAt: Date;
9
+ updatedAt: Date;
10
+ name: string;
11
+ isDocument: boolean;
12
+ documentConfig?: DocumentSectionConfigurationsInterface;
13
+ checkInAndOutWorkflow?: boolean;
14
+ checkInAndOutWorkflowId?: string;
15
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,23 @@
1
+ import type { WorkflowStepTypes } from '../ProcessStep/WorkflowStepType.interface';
2
+ export interface WorkflowNodeData {
3
+ id: string;
4
+ label: string;
5
+ type: WorkflowStepTypes;
6
+ members?: string[];
7
+ formId?: string;
8
+ outputs?: string[];
9
+ position?: {
10
+ x: number;
11
+ y: number;
12
+ };
13
+ }
14
+ export interface WorkflowConnection {
15
+ source: string;
16
+ sourceOutput: string;
17
+ target: string;
18
+ targetInput: string;
19
+ }
20
+ export interface Workflow {
21
+ nodes: WorkflowNodeData[];
22
+ connections: WorkflowConnection[];
23
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ export interface WorkflowPointingRuleInterface {
2
+ [key: string]: {
3
+ outletId: string;
4
+ label: string;
5
+ documentTest?: string;
6
+ };
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ export type { WorkflowModel } from './WorkflowModel.interface';
2
+ export type { WorkflowNodeData, WorkflowConnection, Workflow, } from './WorkflowNodeData.interface';
3
+ export type { WorkflowPointingRuleInterface } from './WorkflowPointingRule.interface';
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ export * from './Backend/index';
2
+ export * from './Config/index';
3
+ export * from './DocumentSection/index';
4
+ export * from './Diagram/index';
5
+ export * from './Document/index';
6
+ export * from './ProcessStep/index';
7
+ export * from './Schedule/index';
8
+ export * from './Tag/index';
9
+ export * from './Workflow/index';
@@ -0,0 +1,25 @@
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("./Config/index"), exports);
19
+ __exportStar(require("./DocumentSection/index"), exports);
20
+ __exportStar(require("./Diagram/index"), exports);
21
+ __exportStar(require("./Document/index"), exports);
22
+ __exportStar(require("./ProcessStep/index"), exports);
23
+ __exportStar(require("./Schedule/index"), exports);
24
+ __exportStar(require("./Tag/index"), exports);
25
+ __exportStar(require("./Workflow/index"), exports);
@@ -0,0 +1,6 @@
1
+ import Joi from 'joi';
2
+ export declare const escalationLevelSchema: Joi.ObjectSchema<any>;
3
+ export declare function validateEscalationLevel(data: unknown): {
4
+ key: string;
5
+ message: string;
6
+ }[];
@@ -0,0 +1,26 @@
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.escalationLevelSchema = void 0;
7
+ exports.validateEscalationLevel = validateEscalationLevel;
8
+ const joi_1 = __importDefault(require("joi"));
9
+ exports.escalationLevelSchema = joi_1.default.object({
10
+ type: joi_1.default.string().required(),
11
+ periodType: joi_1.default.string().required(),
12
+ members: joi_1.default.array().items(joi_1.default.string()).required(),
13
+ period: joi_1.default.number().required(),
14
+ });
15
+ function validateEscalationLevel(data) {
16
+ const { error } = exports.escalationLevelSchema.validate(data, {
17
+ abortEarly: false,
18
+ });
19
+ if (error) {
20
+ return error.details.map((detail) => ({
21
+ key: detail.path.join('.'),
22
+ message: detail.message,
23
+ }));
24
+ }
25
+ return [];
26
+ }
@@ -0,0 +1,7 @@
1
+ import Joi from 'joi';
2
+ export declare const backendApiRequiredParamsSchema: Joi.ObjectSchema<any>;
3
+ export declare const backEndFollowUpOperationSchema: Joi.ObjectSchema<any>;
4
+ export declare function validateBackEndFollowUpOperation(data: unknown): {
5
+ key: string;
6
+ message: string;
7
+ }[];
@@ -0,0 +1,33 @@
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.backEndFollowUpOperationSchema = exports.backendApiRequiredParamsSchema = void 0;
7
+ exports.validateBackEndFollowUpOperation = validateBackEndFollowUpOperation;
8
+ const joi_1 = __importDefault(require("joi"));
9
+ exports.backendApiRequiredParamsSchema = joi_1.default.object({
10
+ name: joi_1.default.string().required(),
11
+ type: joi_1.default.string().required(),
12
+ });
13
+ exports.backEndFollowUpOperationSchema = joi_1.default.object({
14
+ _id: joi_1.default.string().required(),
15
+ name: joi_1.default.string().required(),
16
+ config: joi_1.default.string().required(),
17
+ requiredParams: joi_1.default.array()
18
+ .items(exports.backendApiRequiredParamsSchema)
19
+ .required(),
20
+ requiredParamDocumentLink: joi_1.default.object().pattern(joi_1.default.string(), joi_1.default.string()).required(),
21
+ });
22
+ function validateBackEndFollowUpOperation(data) {
23
+ const { error } = exports.backEndFollowUpOperationSchema.validate(data, {
24
+ abortEarly: false,
25
+ });
26
+ if (error) {
27
+ return error.details.map((detail) => ({
28
+ key: detail.path.join('.'),
29
+ message: detail.message,
30
+ }));
31
+ }
32
+ return [];
33
+ }
@@ -0,0 +1,2 @@
1
+ export { backendApiRequiredParamsSchema, backEndFollowUpOperationSchema, validateBackEndFollowUpOperation, } from './FollowUpOperation.schema';
2
+ export { escalationLevelSchema, validateEscalationLevel, } from './EscalationLevel.schema';
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validateEscalationLevel = exports.escalationLevelSchema = exports.validateBackEndFollowUpOperation = exports.backEndFollowUpOperationSchema = exports.backendApiRequiredParamsSchema = void 0;
4
+ var FollowUpOperation_schema_1 = require("./FollowUpOperation.schema");
5
+ Object.defineProperty(exports, "backendApiRequiredParamsSchema", { enumerable: true, get: function () { return FollowUpOperation_schema_1.backendApiRequiredParamsSchema; } });
6
+ Object.defineProperty(exports, "backEndFollowUpOperationSchema", { enumerable: true, get: function () { return FollowUpOperation_schema_1.backEndFollowUpOperationSchema; } });
7
+ Object.defineProperty(exports, "validateBackEndFollowUpOperation", { enumerable: true, get: function () { return FollowUpOperation_schema_1.validateBackEndFollowUpOperation; } });
8
+ var EscalationLevel_schema_1 = require("./EscalationLevel.schema");
9
+ Object.defineProperty(exports, "escalationLevelSchema", { enumerable: true, get: function () { return EscalationLevel_schema_1.escalationLevelSchema; } });
10
+ Object.defineProperty(exports, "validateEscalationLevel", { enumerable: true, get: function () { return EscalationLevel_schema_1.validateEscalationLevel; } });
@@ -0,0 +1,12 @@
1
+ import Joi from 'joi';
2
+ declare const workFlowDocumentSchema: Joi.ObjectSchema<any>;
3
+ declare const iRecentlyViewedSchema: Joi.ObjectSchema<any>;
4
+ export { workFlowDocumentSchema, iRecentlyViewedSchema };
5
+ export declare function validateWorkFlowDocument(data: unknown): {
6
+ key: string;
7
+ message: string;
8
+ }[];
9
+ export declare function validateIRecentlyViewed(data: unknown): {
10
+ key: string;
11
+ message: string;
12
+ }[];
@@ -0,0 +1,90 @@
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.iRecentlyViewedSchema = exports.workFlowDocumentSchema = void 0;
7
+ exports.validateWorkFlowDocument = validateWorkFlowDocument;
8
+ exports.validateIRecentlyViewed = validateIRecentlyViewed;
9
+ const joi_1 = __importDefault(require("joi"));
10
+ const ProcessStep_schema_1 = require("../ProcessStep/ProcessStep.schema");
11
+ const TransactionTag_schema_1 = require("../Tag/TransactionTag.schema");
12
+ const documentWorkflowStepSchema = ProcessStep_schema_1.processStepSchema.keys({
13
+ date: joi_1.default.date().required(),
14
+ data: joi_1.default.alternatives().try(joi_1.default.object(), joi_1.default.valid(null)).optional(),
15
+ taskRef: joi_1.default.string().required(),
16
+ reference: joi_1.default.string().required(),
17
+ isArchived: joi_1.default.boolean().optional(),
18
+ userId: joi_1.default.string().optional(),
19
+ members: joi_1.default.array().items(joi_1.default.string()).required(),
20
+ taskCompltedBy: joi_1.default.string().required(),
21
+ validations: joi_1.default.array().required(),
22
+ });
23
+ const workFlowDocumentSchema = joi_1.default.object({
24
+ _id: joi_1.default.string().required(),
25
+ processTree: joi_1.default.array().items(documentWorkflowStepSchema).required(),
26
+ archive: joi_1.default.boolean().required(),
27
+ ownerId: joi_1.default.string().required(),
28
+ userId: joi_1.default.string().required(),
29
+ originDocId: joi_1.default.string().optional(),
30
+ previousDocRef: joi_1.default.string().optional(),
31
+ form: joi_1.default.object().required(),
32
+ workflowId: joi_1.default.string().required(),
33
+ docType: joi_1.default.string().required(),
34
+ reference: joi_1.default.string().required(),
35
+ departmentId: joi_1.default.string().required(),
36
+ organisationId: joi_1.default.string().required(),
37
+ createdAt: joi_1.default.date().required(),
38
+ updatedAt: joi_1.default.date().required(),
39
+ adj_microFlow_review: joi_1.default.boolean().optional(),
40
+ microFlowSubmissions: joi_1.default.array().items(joi_1.default.object().unknown(true)).optional(),
41
+ currentStepID: joi_1.default.string().required(),
42
+ itemListSelected: joi_1.default.boolean().optional(),
43
+ checkedOut: joi_1.default.object({
44
+ userId: joi_1.default.string().required(),
45
+ date: joi_1.default.date().required(),
46
+ }).optional(),
47
+ checkedOutDocId: joi_1.default.string().optional(),
48
+ latestVersion: joi_1.default.number().required(),
49
+ versions: joi_1.default.array()
50
+ .items(joi_1.default.object({
51
+ versionNumber: joi_1.default.number().required(),
52
+ description: joi_1.default.string().required(),
53
+ updatedAt: joi_1.default.date().required(),
54
+ tempDocId: joi_1.default.string().required(),
55
+ }))
56
+ .required(),
57
+ busy: joi_1.default.boolean().optional(),
58
+ SYSTEM_TAGS: joi_1.default.array().items(TransactionTag_schema_1.iTransactionTagSchema).required(),
59
+ });
60
+ exports.workFlowDocumentSchema = workFlowDocumentSchema;
61
+ const iRecentlyViewedSchema = joi_1.default.object({
62
+ _id: joi_1.default.string().required(),
63
+ reference: joi_1.default.string().required(),
64
+ date: joi_1.default.date().required(),
65
+ description: joi_1.default.string().required(),
66
+ status: joi_1.default.string().valid('pending', 'complete', 'action').required(),
67
+ url: joi_1.default.string().required(),
68
+ params: joi_1.default.object().pattern(joi_1.default.string(), joi_1.default.alternatives().try(joi_1.default.string(), joi_1.default.array().items(joi_1.default.string()))).required(),
69
+ });
70
+ exports.iRecentlyViewedSchema = iRecentlyViewedSchema;
71
+ function validateWorkFlowDocument(data) {
72
+ const { error } = workFlowDocumentSchema.validate(data, { abortEarly: false });
73
+ if (error) {
74
+ return error.details.map((detail) => ({
75
+ key: detail.path.join('.'),
76
+ message: detail.message,
77
+ }));
78
+ }
79
+ return [];
80
+ }
81
+ function validateIRecentlyViewed(data) {
82
+ const { error } = iRecentlyViewedSchema.validate(data, { abortEarly: false });
83
+ if (error) {
84
+ return error.details.map((detail) => ({
85
+ key: detail.path.join('.'),
86
+ message: detail.message,
87
+ }));
88
+ }
89
+ return [];
90
+ }
@@ -0,0 +1 @@
1
+ export { workFlowDocumentSchema, iRecentlyViewedSchema, validateWorkFlowDocument, validateIRecentlyViewed, } from './WorkFlowDocument.schema';
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validateIRecentlyViewed = exports.validateWorkFlowDocument = exports.iRecentlyViewedSchema = exports.workFlowDocumentSchema = void 0;
4
+ var WorkFlowDocument_schema_1 = require("./WorkFlowDocument.schema");
5
+ Object.defineProperty(exports, "workFlowDocumentSchema", { enumerable: true, get: function () { return WorkFlowDocument_schema_1.workFlowDocumentSchema; } });
6
+ Object.defineProperty(exports, "iRecentlyViewedSchema", { enumerable: true, get: function () { return WorkFlowDocument_schema_1.iRecentlyViewedSchema; } });
7
+ Object.defineProperty(exports, "validateWorkFlowDocument", { enumerable: true, get: function () { return WorkFlowDocument_schema_1.validateWorkFlowDocument; } });
8
+ Object.defineProperty(exports, "validateIRecentlyViewed", { enumerable: true, get: function () { return WorkFlowDocument_schema_1.validateIRecentlyViewed; } });
@@ -0,0 +1,9 @@
1
+ import Joi from 'joi';
2
+ declare const adjudicationScoreSheetSchema: Joi.ObjectSchema<any>;
3
+ declare const processStepSchema: Joi.ObjectSchema<any>;
4
+ export declare const adjudicationReviewedMicroFlowSubmissionSchema: Joi.ObjectSchema<any>;
5
+ export { processStepSchema, adjudicationScoreSheetSchema };
6
+ export declare function validateProcessStep(data: unknown): {
7
+ key: string;
8
+ message: string;
9
+ }[];