import { HttpClient } from '@angular/common/http'; import { Configurations } from '../../configurations'; import { AuthService } from '../../workflow-services/auth.service'; import { FrequencyObject } from '../../interfaces/frequency.interface'; import { GrcService } from '../../workflow/shared/services/grc.service'; import * as i0 from "@angular/core"; export declare class FrequencyService { private http; private authService; private grcService; monthArray: Array; dayName: Array; quarterlyMonth: Array; dateConfig: { format: string; showGoToCurrent: boolean; }; frequencyInfo: { placeholder: string; pattern: string; case: string; failedAfter: number; window: number; timeIn12hr: string; timeIn24Hr: string; lifecycleDetails: string; startFrom: number; reportId: number; failed_time_utc: number; continuous_failed_days: number; dateOfModified: number; startDate: string; }; frequencyDetails: object; private env; constructor(http: HttpClient, authService: AuthService, grcService: GrcService, config?: Configurations); timeFrom12hTo24h(value: string): string; timeIn12(value: any): string; frameworkStartDate(row: any): number; frameworkFrequency(frequency: any, start_date: any): { frequency_pattern: string; continuous_failed_days: number; }; shortHand_freqCal(frequency: any, day: any, month: any, year?: any): { pattern: string; continuous_failed_days: number; }; getOnCompletionOfResponsibility(): import("rxjs").Observable; changeTimeZone(date: any): Date; getResponsibilityList(payload: any): import("rxjs").Observable; getResponsibilitiesCount(payload: any): import("rxjs").Observable; getAllResponsibilities(pageNo: number, payload: any): import("rxjs").Observable; formatDate(): string; /** * Converts a frequency configuration object into a standardized FrequencyObject format. * * @param frequency - The input frequency configuration object with the following properties: * - case: The type of frequency ('one_time' | 'daily' | 'weekly' | 'monthly' | 'quarterly' | 'semester' | 'yearly' | 'random' | 'ongoing' | 'on_completion_of' | 'biannually') * - window: Number of days before the task can be started * - failedAfter: Number of days after which the task is considered failed * - continuous_failed_days: Number of days after which the task is auto-deactivated * - day: The day of occurrence * - timeIn24Hr: Time in 24-hour format * - every: Frequency interval * - selectedDay: Array of selected days for weekly frequency (1-7 representing Monday-Sunday) * - selectedMonth: Array of selected months (0-11 representing January-December) * - startFrom: Unix timestamp for the start date * - lifecycleDetails: String in format "YYYY-MM-DD~~N" where N is the number of occurrences * - randomTypeSelected: Index for random frequency type (0: weekly, 1: monthly, 2: quarterly, 3: yearly) * - randomInstances: Number of random occurrences * - selectedType: Number of reminders for ongoing frequency * - selectedOngoingType: Index for ongoing frequency type (1: week, 2: month, 3: quarter, 4: semester, 5: year) * * @returns A FrequencyObject with the following structure: * - type: Frequency type * - startBefore: Days before task can start * - endAfter: Days after which task fails * - autoDeactivate: Days after which task is deactivated * - day: Day of occurrence * - time: Time in 24-hour format * - repeatOptions: { * every: number, * repeatOn: string (binary representation of selected days/months), * lifecycle: { * startFrom: string (YYYY-MM-DD), * endBy?: string (YYYY-MM-DD), * endAfter?: number * } * } * - random?: { type: string, occurrence: number } * - onComplete: {} * - onGoing: { reminders: number, startOf: 'week' | 'month' | 'quarter' | 'semester' | 'year' } * * @example * ```typescript * const frequency = { * case: 'weekly', * window: 2, * failedAfter: 1, * continuous_failed_days: 3, * day: 1, * timeIn24Hr: '09:00:00', * every: 1, * selectedDay: [1, 3, 5], // Monday, Wednesday, Friday * startFrom: 1678900000, * lifecycleDetails: '2024-12-31~~10' * }; * const result = setFrequencyObject(frequency); * ``` */ setFrequencyObject(frequency: any): FrequencyObject | null; repeatOptions(frequency: any): string; getOngoing(frequency: any): { reminders: any; startOf: string; }; getRandomFrequency(frequency: any): { type: string; occurrence: any; }; createFrequencyPattern(frequency: any): string; getDay(repeatOptions: string): string; getMonth(repeatOptions: string): string; getLifecyclePattern(frequency: any): { startFrom: number; pattern: string; }; /** * Converts a date string in "YYYY-MM-DD" format to "DD-Month-YYYY~~0". * * @param {string} dateString - The input date string in "YYYY-MM-DD" format. * @returns {string} - The formatted date string in "DD-Month-YYYY~~0" format. * * @example * ```typescript * formatDateString("2025-03-27"); // Returns "27-March-2025~~0" * ``` */ formatDateString(dateString: string): string; /** * Retrieves the name of a month based on its numerical value. * * @param {number} month - The month number (1-12) where: * 1 = January * 2 = February * ... * 12 = December * * @returns {string | undefined} The name of the month (e.g., "JAN", "FEB", etc.) or undefined if the month number is invalid * * @example * getMonthName(1) // Returns: "Jan" * getMonthName(12) // Returns: "Dec" * getMonthName(13) // Returns: undefined */ getMonthName(selectedMonth: number): string | undefined; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }