import type { AvailableNotificationType } from '../models/AvailableNotificationType'; import type { CampaignEnablement } from '../models/CampaignEnablement'; import type { CampaignExclusion } from '../models/CampaignExclusion'; import type { ContextResponse } from '../models/ContextResponse'; import type { MarkAllReadRequest } from '../models/MarkAllReadRequest'; import type { MarkAllReadResponse } from '../models/MarkAllReadResponse'; import type { Notification } from '../models/Notification'; import type { NotificationCount } from '../models/NotificationCount'; import type { NotificationPreview } from '../models/NotificationPreview'; import type { NotificationSource } from '../models/NotificationSource'; import type { NotificationsUpdate } from '../models/NotificationsUpdate'; import type { NotificationTemplateDetail } from '../models/NotificationTemplateDetail'; import type { NotificationTemplateList } from '../models/NotificationTemplateList'; import type { NotificationTemplateTest } from '../models/NotificationTemplateTest'; import type { NotificationTemplateTestResponse } from '../models/NotificationTemplateTestResponse'; import type { NotificationToggle } from '../models/NotificationToggle'; import type { NotificationTypePreference } from '../models/NotificationTypePreference'; import type { PatchedNotification } from '../models/PatchedNotification'; import type { PatchedNotificationTemplateDetail } from '../models/PatchedNotificationTemplateDetail'; import type { PatchedNotificationToggle } from '../models/PatchedNotificationToggle'; import type { PatchedNotificationTypePreference } from '../models/PatchedNotificationTypePreference'; import type { PatchedUserNotificationPreferences } from '../models/PatchedUserNotificationPreferences'; import type { PreviewResponse } from '../models/PreviewResponse'; import type { Recipient } from '../models/Recipient'; import type { SendNotification } from '../models/SendNotification'; import type { SendResponse } from '../models/SendResponse'; import type { TestSMTPCredentials } from '../models/TestSMTPCredentials'; import type { TestSMTPResponse } from '../models/TestSMTPResponse'; import type { UserNotificationPreferences } from '../models/UserNotificationPreferences'; import type { ValidateSourceResponse } from '../models/ValidateSourceResponse'; import type { CancelablePromise } from '../core/CancelablePromise'; export declare class NotificationsService { /** * Unsubscribe from a campaign using a hash * @returns any * @throws ApiError */ static notificationV1CampaignsUnsubscribeRetrieve({ unsubscribeHash, }: { unsubscribeHash: string; }): CancelablePromise<{ success?: boolean; message?: string; }>; /** * Get notifications for a user. Requires: Ibl.Notifications/Notification/list * @returns Notification * @throws ApiError */ static notificationV1OrgsNotificationsRetrieve({ org, channel, endDate, excludeChannel, startDate, status, tags, }: { org: string; /** * Filter by delivery channel */ channel?: string; /** * Filter notifications until this date */ endDate?: string; /** * Exclude notifications from this channel */ excludeChannel?: string; /** * Filter notifications from this date */ startDate?: string; /** * Filter by notification status */ status?: string; /** * Comma-separated tags to filter by (e.g. 'learning,activity'). Returns notifications whose template matches ANY of the given tags. */ tags?: string; }): CancelablePromise; /** * Update notification status for a user. Requires: Ibl.Notifications/Notification/write * @returns Notification * @throws ApiError */ static notificationV1OrgsNotificationsUpdate({ org, requestBody, }: { org: string; requestBody: NotificationsUpdate; }): CancelablePromise; /** * Bulk update notification status for a user. Requires: Ibl.Notifications/Notification/write * @returns Notification * @throws ApiError */ static notificationV1OrgsNotificationsBulkUpdatePartialUpdate({ org, requestBody, }: { org: string; requestBody?: PatchedNotification; }): CancelablePromise; /** * Get notifications for a user. Requires: Ibl.Notifications/Notification/list * @returns Notification * @throws ApiError */ static notificationV1OrgsUsersNotificationsRetrieve({ org, userId, channel, endDate, excludeChannel, startDate, status, tags, }: { org: string; /** * Filter by delivery channel */ channel?: string; /** * Filter notifications until this date */ endDate?: string; /** * Exclude notifications from this channel */ excludeChannel?: string; /** * Filter notifications from this date */ startDate?: string; /** * Filter by notification status */ status?: string; /** * Comma-separated tags to filter by (e.g. 'learning, activity'). Returns notifications whose template matches ANY of the given tags. */ tags?: string; }): CancelablePromise; /** * Update notification status for a user. Requires: Ibl.Notifications/Notification/write * @returns Notification * @throws ApiError */ static notificationV1OrgsUsersNotificationsUpdate({ org, userId, requestBody, }: { org: string; requestBody: NotificationsUpdate; }): CancelablePromise; /** * Get notifications count for a user. Requires: Ibl.Notifications/Notification/list * @returns NotificationCount * @throws ApiError */ static notificationV1OrgsUsersNotificationsCountRetrieve({ org, userId, channel, status, }: { org: string; /** * Filter count by delivery channel */ channel?: string; /** * Filter count by notification status * * * `READ` - Read * * `UNREAD` - Unread * * `CANCELLED` - Cancelled */ status?: 'READ' | 'UNREAD' | 'CANCELLED'; }): CancelablePromise; /** * Delete a notification for a user. Requires: Ibl.Notifications/Notification/delete * @returns void * @throws ApiError */ static notificationV1OrgsUsersNotificationsDestroy({ notificationId, org, userId, }: { notificationId: string; org: string; }): CancelablePromise; /** * Bulk update notification status for a user. Requires: Ibl.Notifications/Notification/write * @returns Notification * @throws ApiError */ static notificationV1OrgsUsersNotificationsBulkUpdatePartialUpdate({ org, userId, requestBody, }: { org: string; requestBody?: PatchedNotification; }): CancelablePromise; /** * Re-enable campaigns for a user. Requires: Ibl.Notifications/Campaigns/action * @returns any * @throws ApiError */ static notificationV1OrgsCampaignsEnableCreate({ platformKey, requestBody, }: { platformKey: string; requestBody?: CampaignEnablement; }): CancelablePromise<{ success?: boolean; message?: string; }>; /** * Exclude a user from specified campaigns. Requires: Ibl.Notifications/Campaigns/action * @returns any * @throws ApiError */ static notificationV1OrgsCampaignsExcludeCreate({ platformKey, requestBody, }: { platformKey: string; requestBody?: CampaignExclusion; }): CancelablePromise<{ success?: boolean; message?: string; }>; /** * Mark all notifications as read for a user. Optionally provide specific notification IDs. Requires: Ibl.Notifications/Notification/write * @returns MarkAllReadResponse * @throws ApiError */ static notificationV1OrgsMarkAllAsReadCreate({ platformKey, requestBody, }: { platformKey: string; requestBody?: MarkAllReadRequest; }): CancelablePromise; /** * Get build recipients * Get paginated list of recipients for a notification build * @returns Recipient * @throws ApiError */ static notificationV1OrgsNotificationBuilderRecipientsList({ id, platformKey, page, pageSize, search, }: { id: string; platformKey: string; /** * Page number */ page?: number; /** * Number of items per page */ pageSize?: number; /** * Search recipients by username or email */ search?: string; }): CancelablePromise>; /** * Get notification context data * Get all context data needed for notification building including templates, channels, and platforms * @returns ContextResponse * @throws ApiError */ static notificationV1OrgsNotificationBuilderContextRetrieve({ platformKey, }: { platformKey: string; }): CancelablePromise; /** * Preview notification * Preview notification recipients and get build ID for sending * @returns PreviewResponse * @throws ApiError */ static notificationV1OrgsNotificationBuilderPreviewCreate({ platformKey, requestBody, }: { platformKey: string; requestBody: NotificationPreview; }): CancelablePromise; /** * Send notification * Send notifications to all recipients in a build * @returns SendResponse * @throws ApiError */ static notificationV1OrgsNotificationBuilderSendCreate({ platformKey, requestBody, }: { platformKey: string; requestBody: SendNotification; }): CancelablePromise; /** * Validate notification source * Validate a single notification source (email, username, platform, csv) * @returns ValidateSourceResponse * @throws ApiError */ static notificationV1OrgsNotificationBuilderValidateSourceCreate({ platformKey, requestBody, }: { platformKey: string; requestBody: NotificationSource; }): CancelablePromise; /** * Test SMTP credentials for a platform * Test SMTP credentials by sending a test email to the specified address. Requires: Ibl.Notifications/SMTP/action * @returns TestSMTPResponse * @throws ApiError */ static notificationV1PlatformsConfigTestSmtpCreate({ platformKey, requestBody, }: { platformKey: string; requestBody: TestSMTPCredentials; }): CancelablePromise; /** * Get user notification preferences * Retrieve notification preferences for the authenticated user (or another user via ?username= for admins). Auto-creates preferences with defaults on first access. RBAC: Ibl.Notifications/Notification/read * @returns UserNotificationPreferences * @throws ApiError */ static notificationV1PlatformsNotificationPreferencesRetrieve({ platformKey, tags, username, }: { platformKey: string; /** * Comma-separated tags to filter by (e.g. 'learning,activity'). Returns types matching ANY tag. */ tags?: string; /** * Username to manage preferences for (admin only). Defaults to authenticated user. */ username?: string; }): CancelablePromise; /** * Update user notification preferences * Partially update global notification preferences. Per-type overrides use the /types/{notification_type}/ endpoint. RBAC: Ibl.Notifications/Notification/write * @returns UserNotificationPreferences * @throws ApiError */ static notificationV1PlatformsNotificationPreferencesPartialUpdate({ platformKey, tags, username, requestBody, }: { platformKey: string; /** * Comma-separated tags to filter by (e.g. 'learning,activity'). Returns types matching ANY tag. */ tags?: string; /** * Username to manage preferences for (admin only). Defaults to authenticated user. */ username?: string; requestBody?: PatchedUserNotificationPreferences; }): CancelablePromise; /** * List available notification types * Returns notification types enabled for this platform, annotated with the user's per-type preferences. RBAC: Ibl.Notifications/Notification/read * @returns AvailableNotificationType * @throws ApiError */ static notificationV1PlatformsNotificationPreferencesAvailableTypesList({ platformKey, tags, username, }: { platformKey: string; /** * Comma-separated tags to filter by (e.g. 'learning,activity'). Returns types matching ANY tag. */ tags?: string; /** * Username to manage preferences for (admin only). Defaults to authenticated user. */ username?: string; }): CancelablePromise>; /** * Update per-type notification preference * Set enabled/frequency for a single notification type. RBAC: Ibl.Notifications/Notification/write * @returns NotificationTypePreference * @throws ApiError */ static notificationV1PlatformsNotificationPreferencesTypesPartialUpdate({ notificationType, platformKey, tags, username, requestBody, }: { notificationType: string; platformKey: string; /** * Comma-separated tags to filter by (e.g. 'learning,activity'). Returns types matching ANY tag. */ tags?: string; /** * Username to manage preferences for (admin only). Defaults to authenticated user. */ username?: string; requestBody?: PatchedNotificationTypePreference; }): CancelablePromise; /** * List notification templates * Get all notification templates for the platform. Includes both platform-specific and inherited templates from main. Filter by tags with ?tags=learning,activity (comma-separated, OR logic). Requires permission: Ibl.Notifications/NotificationTemplate/list * @returns NotificationTemplateList * @throws ApiError */ static notificationV1PlatformsTemplatesList({ platformKey, page, pageSize, tags, }: { platformKey: string; /** * Page number. When provided, response is paginated ({count, next, previous, results}). When omitted, returns a flat list. */ page?: number; /** * Number of templates per page (default 25, max 100). */ pageSize?: number; /** * Comma-separated tags to filter by (e.g. 'learning,activity'). Returns templates matching ANY of the given tags. */ tags?: string; }): CancelablePromise>; /** * Get notification template details * Get detailed view of a notification template by type. Returns platform-specific template if exists, otherwise main template. Requires permission: Ibl.Notifications/NotificationTemplate/read * @returns NotificationTemplateDetail * @throws ApiError */ static notificationV1PlatformsTemplatesRetrieve({ notificationType, platformKey, }: { notificationType: string; platformKey: string; }): CancelablePromise; /** * Update notification template * Update notification template. Creates platform-specific copy on first edit. Requires permission: Ibl.Notifications/NotificationTemplate/write * @returns NotificationTemplateDetail * @throws ApiError */ static notificationV1PlatformsTemplatesPartialUpdate({ notificationType, platformKey, requestBody, }: { notificationType: string; platformKey: string; requestBody?: PatchedNotificationTemplateDetail; }): CancelablePromise; /** * Reset template to default * Delete platform-specific template override and revert to main template. Notification preference (on/off) is preserved. Requires permission: Ibl.Notifications/NotificationTemplate/write * @returns any * @throws ApiError */ static notificationV1PlatformsTemplatesResetCreate({ notificationType, platformKey, }: { notificationType: string; platformKey: string; }): CancelablePromise<{ message?: string; deleted?: boolean; }>; /** * Send test notification * Send a test notification to verify template rendering and delivery. Sends to the requesting admin's email or a specified test email. Requires permission: Ibl.Notifications/NotificationTemplate/action * @returns NotificationTemplateTestResponse * @throws ApiError */ static notificationV1PlatformsTemplatesTestCreate({ notificationType, platformKey, requestBody, }: { notificationType: string; platformKey: string; requestBody?: NotificationTemplateTest; }): CancelablePromise; /** * Toggle notification preference * Enable or disable a notification type for the platform. This sets the NotificationPreference, not the template. Requires permission: Ibl.Notifications/NotificationTemplate/write * @returns NotificationToggle * @throws ApiError */ static notificationV1PlatformsTemplatesTogglePartialUpdate({ notificationType, platformKey, requestBody, }: { notificationType: string; platformKey: string; requestBody?: PatchedNotificationToggle; }): CancelablePromise; /** * List distinct template tags * Get all unique tags used across notification templates for this platform. Useful for autocomplete / filter UIs. Requires permission: Ibl.Notifications/NotificationTemplate/list * @returns string * @throws ApiError */ static notificationV1PlatformsTemplatesTagsRetrieve({ platformKey, }: { platformKey: string; }): CancelablePromise>; }