bigbuffet-rw/packages/pl-api/lib/params/notifications.ts
marcin mikołajczak 822e7e2287 pl-api: Add some newer Mastodon methods
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-10-28 00:10:25 +01:00

48 lines
2.1 KiB
TypeScript

import type { PaginationParams } from './common';
interface GetNotificationParams extends PaginationParams {
/** Types to include in the result. */
types?: string[];
/** Types to exclude from the results. */
exclude_types?: string[];
/** Return only notifications received from the specified account. */
account_id?: string;
/**
* will exclude the notifications for activities with the given visibilities. The parameter accepts an array of visibility types (`public`, `unlisted`, `private`, `direct`).
* Requires `features.notificationsExcludeVisibilities`.
*/
exclude_visibilities?: string[];
}
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;
}
interface UpdateNotificationPolicyRequest {
/** 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;
}
type GetNotificationRequestsParams = PaginationParams;
export type {
GetNotificationParams,
GetUnreadNotificationCountParams,
UpdateNotificationPolicyRequest,
GetNotificationRequestsParams,
};