2024-08-28 04:43:23 -07:00
import type { PaginationParams } from './common' ;
2024-10-29 14:44:28 -07:00
/ * *
* @category Request params
* /
2024-08-28 04:43:23 -07:00
interface GetNotificationParams extends PaginationParams {
2024-10-27 16:10:25 -07:00
/** Types to include in the result. */
2024-08-28 04:43:23 -07:00
types? : string [ ] ;
2024-10-27 16:10:25 -07:00
/** Types to exclude from the results. */
2024-08-28 04:43:23 -07:00
exclude_types? : string [ ] ;
2024-10-27 16:10:25 -07:00
/** Return only notifications received from the specified account. */
2024-08-28 04:43:23 -07:00
account_id? : string ;
2024-11-01 09:30:32 -07:00
/ * *
* Whether to include notifications filtered by the user ’ s NotificationPolicy . Defaults to false .
* Requires features . { @link Features [ 'notificationsPolicy' ] } .
* /
include_filtered? : boolean ;
2024-08-28 04:43:23 -07:00
/ * *
* will exclude the notifications for activities with the given visibilities . The parameter accepts an array of visibility types ( ` public ` , ` unlisted ` , ` private ` , ` direct ` ) .
2024-11-01 09:30:32 -07:00
* Requires features { @link Features [ 'notificationsExcludeVisibilities' ] } .
2024-08-28 04:43:23 -07:00
* /
exclude_visibilities? : string [ ] ;
}
2024-10-29 14:44:28 -07:00
/ * *
* @category Request params
* /
2024-10-27 16:10:25 -07:00
interface GetUnreadNotificationCountParams {
/** Maximum number of results to return. Defaults to 100 notifications. Max 1000 notifications. */
limit? : number ;
/** Types of notifications that should count towards unread notifications. */
types? : string [ ] ;
/** Types of notifications that should not count towards unread notifications */
exclude_types? : string [ ] ;
/** Only count unread notifications received from the specified account. */
account_id? : string ;
}
2024-10-29 14:44:28 -07:00
/ * *
* @category Request params
* /
2024-08-28 04:43:23 -07:00
interface UpdateNotificationPolicyRequest {
2024-10-27 16:10:25 -07:00
/** Whether to `accept`, `filter` or `drop` notifications from accounts the user is not following. */
for_not_following? : boolean ;
/** Whether to `accept`, `filter` or `drop` notifications from accounts that are not following the user. */
for_not_followers? : boolean ;
/** Whether to `accept`, `filter` or `drop` notifications from accounts created in the past 30 days. */
for_new_accounts? : boolean ;
/** Whether to `accept`, `filter` or `drop` notifications from private mentions. drop will prevent creation of the notification object altogether (without preventing the underlying activity), */
for_private_mentions? : boolean ;
/** Whether to `accept`, `filter` or `drop` notifications from accounts that were limited by a moderator. */
for_limited_accounts? : boolean ;
2024-08-28 04:43:23 -07:00
}
2024-10-29 14:44:28 -07:00
/ * *
* @category Request params
* /
2024-08-28 04:43:23 -07:00
type GetNotificationRequestsParams = PaginationParams ;
export type {
GetNotificationParams ,
2024-10-27 16:10:25 -07:00
GetUnreadNotificationCountParams ,
2024-08-28 04:43:23 -07:00
UpdateNotificationPolicyRequest ,
GetNotificationRequestsParams ,
} ;