vcomply-workflow-engine 6.0.56 → 6.0.57

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.
@@ -159,7 +159,7 @@ export declare class AddMultipleRiskComponent implements OnInit, OnChanges {
159
159
  * @param {string} [label] - the label of the risk
160
160
  * @returns The return value is the value of the last expression in the function.
161
161
  */
162
- setRiskLabel(label?: string): 2 | 1;
162
+ setRiskLabel(label?: string): 1 | 2;
163
163
  /**
164
164
  * "If the date is a number, convert it to a date object, then create a new date object with the
165
165
  * timezone set to the user's timezone, then return the date in the format YYYY-MM-DD."
@@ -37,23 +37,23 @@ interface Evidence {
37
37
  }
38
38
  interface Program {
39
39
  id: number[];
40
+ tags: {
41
+ [key: string]: string;
42
+ };
40
43
  }
41
44
  export interface Responsibility {
42
45
  title: string;
43
46
  key: number;
44
- riskClass: 'low' | 'low-medium' | 'medium-high' | 'high';
47
+ riskClass: 'low' | 'low_medium' | 'medium_high' | 'high';
45
48
  notes: string;
46
49
  objective: string;
47
50
  frequency: Frequency;
48
- assignorId: number;
51
+ assignor: number;
49
52
  assignee: Assignee;
50
- responsibilityCenter: ResponsibilityCenter;
51
- reviewer: Reviewer;
52
- overseer: Overseer;
53
+ responsibilityCenter: ResponsibilityCenter | undefined;
54
+ reviewer: Reviewer | undefined;
55
+ overseer: Overseer | undefined;
53
56
  evidence: Evidence;
54
- tags: {
55
- [key: string]: string;
56
- };
57
57
  program: Program;
58
58
  grcObjectId: any[];
59
59
  assessmentId: string;
@@ -48,6 +48,63 @@ export declare class FrequencyService {
48
48
  getResponsibilityList(payload: any): import("rxjs").Observable<any>;
49
49
  getResponsibilitiesCount(payload: any): import("rxjs").Observable<any>;
50
50
  formatDate(): string;
51
+ /**
52
+ * Converts a frequency configuration object into a standardized FrequencyObject format.
53
+ *
54
+ * @param frequency - The input frequency configuration object with the following properties:
55
+ * - case: The type of frequency ('one_time' | 'daily' | 'weekly' | 'monthly' | 'quarterly' | 'semester' | 'yearly' | 'random' | 'ongoing' | 'on_completion_of' | 'biannually')
56
+ * - window: Number of days before the task can be started
57
+ * - failedAfter: Number of days after which the task is considered failed
58
+ * - continuous_failed_days: Number of days after which the task is auto-deactivated
59
+ * - day: The day of occurrence
60
+ * - timeIn24Hr: Time in 24-hour format
61
+ * - every: Frequency interval
62
+ * - selectedDay: Array of selected days for weekly frequency (1-7 representing Monday-Sunday)
63
+ * - selectedMonth: Array of selected months (0-11 representing January-December)
64
+ * - startFrom: Unix timestamp for the start date
65
+ * - lifecycleDetails: String in format "YYYY-MM-DD~~N" where N is the number of occurrences
66
+ * - randomTypeSelected: Index for random frequency type (0: weekly, 1: monthly, 2: quarterly, 3: yearly)
67
+ * - randomInstances: Number of random occurrences
68
+ * - selectedType: Number of reminders for ongoing frequency
69
+ * - selectedOngoingType: Index for ongoing frequency type (1: week, 2: month, 3: quarter, 4: semester, 5: year)
70
+ *
71
+ * @returns A FrequencyObject with the following structure:
72
+ * - type: Frequency type
73
+ * - startBefore: Days before task can start
74
+ * - endAfter: Days after which task fails
75
+ * - autoDeactivate: Days after which task is deactivated
76
+ * - day: Day of occurrence
77
+ * - time: Time in 24-hour format
78
+ * - repeatOptions: {
79
+ * every: number,
80
+ * repeatOn: string (binary representation of selected days/months),
81
+ * lifecycle: {
82
+ * startFrom: string (YYYY-MM-DD),
83
+ * endBy?: string (YYYY-MM-DD),
84
+ * endAfter?: number
85
+ * }
86
+ * }
87
+ * - random?: { type: string, occurrence: number }
88
+ * - onComplete: {}
89
+ * - onGoing: { reminders: number, startOf: 'week' | 'month' | 'quarter' | 'semester' | 'year' }
90
+ *
91
+ * @example
92
+ * ```typescript
93
+ * const frequency = {
94
+ * case: 'weekly',
95
+ * window: 2,
96
+ * failedAfter: 1,
97
+ * continuous_failed_days: 3,
98
+ * day: 1,
99
+ * timeIn24Hr: '09:00:00',
100
+ * every: 1,
101
+ * selectedDay: [1, 3, 5], // Monday, Wednesday, Friday
102
+ * startFrom: 1678900000,
103
+ * lifecycleDetails: '2024-12-31~~10'
104
+ * };
105
+ * const result = setFrequencyObject(frequency);
106
+ * ```
107
+ */
51
108
  setFrequencyObject(frequency: any): FrequencyObject | null;
52
109
  repeatOptions(frequency: any): string;
53
110
  getOngoing(frequency: any): {
@@ -167,7 +167,7 @@ export declare class WorkflowRiskComponent implements OnInit {
167
167
  setPopupButtons(): void;
168
168
  getRiskDetails(riskId: any): void;
169
169
  populateOptionalFields(): void;
170
- setCategoryType(type: any): "others" | "compliance" | "strategic" | "operational";
170
+ setCategoryType(type: any): "compliance" | "others" | "strategic" | "operational";
171
171
  getRCList(): void;
172
172
  getCategoryList(): void;
173
173
  getOwnersList(): void;
@@ -56,7 +56,17 @@ export declare class ResponsibilityService {
56
56
  addGRCObject(payload: any): Observable<any[]>;
57
57
  updateGRCObject(payload: any, _id: string): Observable<any[]>;
58
58
  buildResponsibilityPayload(event: any): Responsibility | null;
59
- getRiskClass(riskClass: 0 | 1 | 2 | 3): 'low' | 'low-medium' | 'medium-high' | 'high';
59
+ getOverseer(event: any): {
60
+ success: {
61
+ userId: any;
62
+ userGroupId: any;
63
+ };
64
+ fail: {
65
+ userId: any;
66
+ userGroupId: any;
67
+ };
68
+ } | undefined;
69
+ getRiskClass(riskClass: 0 | 1 | 2 | 3): 'low' | 'low_medium' | 'medium_high' | 'high';
60
70
  transformData(input: any): any;
61
71
  static ɵfac: i0.ɵɵFactoryDeclaration<ResponsibilityService, [null, null, { optional: true; }]>;
62
72
  static ɵprov: i0.ɵɵInjectableDeclaration<ResponsibilityService>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vcomply-workflow-engine",
3
- "version": "6.0.56",
3
+ "version": "6.0.57",
4
4
  "peerDependencies": {
5
5
  "@angular/common": " 12.x || 13.x || 14.x || 15.x || 16.x || 17.x || 18.x || 19.x ",
6
6
  "@angular/core": " 12.x || 13.x || 14.x || 15.x || 16.x || 17.x || 18.x || 19.x "