import { DynamicModule } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { LabNotificationsNotification } from 'itlab-functions'; import { HubResource } from '../../../../hub-resource.enum'; import { AuthenticationModuleOptions } from '../../../authentication'; import { BaseHttpService } from '../../base-http.service'; import { ServicesModuleOptions } from '../../services-module-options.interface'; import { ScheduleNotificationDtoV1 } from './dtos'; import { FetchNotificationOptionsDtoV1 } from './fetch-notification-options.dto.v1.type'; /** * Parameter decorator to inject the feature-specific NotificationService. */ export declare function InjectFeatureNotificationsService(): ParameterDecorator; /** * NotificationService * * Provides methods to schedule and unschedule notifications for specific resources. * Communicates with the organisation-hub notification microservice. */ export declare class NotificationsService extends BaseHttpService { readonly options: ServicesModuleOptions; /** * Creates a NotificationService client for a specific resource. * * @param authenticationOptions Authentication options injected from the Auth module. * @param options Options specifying the resource type this service operates on. * @param configService NestJS configuration service for environment variables and URLs. */ constructor(authenticationOptions: AuthenticationModuleOptions, options: ServicesModuleOptions, configService: ConfigService); /** * Factory method to create a dynamic module for a specific Hub resource. * * @param resource The HubResource type this module will provide notification services for. * @returns A DynamicModule with a provider for the specified NotificationService instance. */ static forResource(resource: HubResource): DynamicModule; /** * Retrieves a single notification entry by its MongoDB identifier. * * This method gracefully handles downstream failures by logging * and returning `undefined` instead of throwing. * * @param {string} notificationId - Unique MongoDB identifier of the notification. * @param {FetchNotificationOptionsDtoV1} [options] - Optional query parameters for filtering or projection. * @returns {Promise} Resolves to an Notification or `undefined` on failure. */ fetchNotificationV1(notificationId: string, options?: FetchNotificationOptionsDtoV1): Promise; /** * Retrieves a collection of notification entries. * * Useful for batch lookups or paginated listings. * Returns an empty array if the downstream service call fails. * * @param {FetchNotificationOptionsDtoV1} [options] - Optional filter options for narrowing results. * @returns {Promise} Resolves to a list of notifications, or an empty array if none found. */ fetchNotificationCollectionV1(options?: FetchNotificationOptionsDtoV1): Promise; /** * Schedules or reschedules a notification for a given resource. * Updates existing notifications if necessary. * * @param resourceId Unique identifier of the resource. * @param notification Notification configuration payload. */ scheduleNotificationV1(resourceId: string, notification: ScheduleNotificationDtoV1): void; /** * Unschedules a previously set notification for a given resource. * Typically called when the resource is deleted or the event is canceled. * * @param resourceId Unique identifier of the resource. */ deleteNotificationsV1(resourceId: string): void; }