projectmanager-sdk
Version:
Software development kit for the ProjectManager.com API. for TypeScript
108 lines (107 loc) • 6.04 kB
TypeScript
/**
* ProjectManager API for TypeScript
*
* (c) ProjectManager.com, Inc.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @author ProjectManager.com <support@projectmanager.com>
* @copyright ProjectManager.com, Inc.
* @link https://github.com/projectmgr/projectmanager-sdk-typescript
*/
import { ProjectManagerClient } from "../index.js";
import { AstroResult } from "../index.js";
import { NotificationResponseDto } from "../index.js";
import { NotificationTotalCountDto } from "../index.js";
import { NotificationUnreadCountDto } from "../index.js";
import { NotificationTimestampDto } from "../index.js";
export declare class NotificationClient {
private readonly client;
/**
* Internal constructor for this client library
*/
constructor(client: ProjectManagerClient);
/**
* Retrieve the most recent notifications for the current user, along with the amount of notifications.
*
* A notification represents a message sent to a user to inform them of relevant actions or events within their
* workspace. Notifications are ephemeral and may be deleted when they are no longer needed. When a user has more
* than 1,000 pending notifications some old notifications will be deleted automatically.
*
* This API retrieves 500 notifications at a time. To fetch more than 500 notifications, repeat this API call
* using the parameter `lastId` of the oldest notification from each batch to fetch the next 500 notifications.
*
* @param lastId To continue loading more notifications in a series of requests, provide the ID of the oldest notification from the currently loaded batch as the `lastId` parameter
* @param senderId Filter the notifications to only those sent by the user with the specified ID
* @param notificationTypes Specifies the types of notifications to return. If not provided, all notifications will be returned.
* @param asFlatList If set to true all notifications will be returned as a flat list, otherwise they will be grouped by parent in the same manner as displayed in the UI.
*/
retrieveNotifications(lastId?: string, senderId?: string, notificationTypes?: string[], asFlatList?: boolean): Promise<AstroResult<NotificationResponseDto>>;
/**
* Retrieve the total count of pending notifications for the current user.
*
* A notification represents a message sent to a user to inform them of relevant actions or events within their
* workspace. Notifications are ephemeral and may be deleted when they are no longer needed. When a user has more
* than 1,000 pending notifications some old notifications will be deleted automatically.
*
*/
notificationCount(): Promise<AstroResult<NotificationTotalCountDto>>;
/**
* Retrieve the count of unread notifications for the current user.
*
* A notification represents a message sent to a user to inform them of relevant actions or events within their
* workspace. Notifications are ephemeral and may be deleted when they are no longer needed. When a user has more
* than 1,000 pending notifications some old notifications will be deleted automatically.
*
*/
unreadNotificationCount(): Promise<AstroResult<NotificationUnreadCountDto>>;
/**
* Delete all pending notifications for the current user.
*
* A notification represents a message sent to a user to inform them of relevant actions or events within their
* workspace. Notifications are ephemeral and may be deleted when they are no longer needed. When a user has more
* than 1,000 pending notifications some old notifications will be deleted automatically.
*
*/
deleteAllNotifications(): Promise<AstroResult<object>>;
/**
* Marks a pending notification as read.
*
* A notification represents a message sent to a user to inform them of relevant actions or events within their
* workspace. Notifications are ephemeral and may be deleted when they are no longer needed. When a user has more
* than 1,000 pending notifications some old notifications will be deleted automatically.
*
* @param id The unique identifier of the notification to mark read
*/
markNotificationRead(id: string): Promise<AstroResult<NotificationTimestampDto>>;
/**
* Marks all pending notification for the current user as read.
*
* A notification represents a message sent to a user to inform them of relevant actions or events within their
* workspace. Notifications are ephemeral and may be deleted when they are no longer needed. When a user has more
* than 1,000 pending notifications some old notifications will be deleted automatically.
*
*/
readAllNotifications(): Promise<AstroResult<NotificationTimestampDto>>;
/**
* Deletes a pending notification that is no longer wanted.
*
* A notification represents a message sent to a user to inform them of relevant actions or events within their
* workspace. Notifications are ephemeral and may be deleted when they are no longer needed. When a user has more
* than 1,000 pending notifications some old notifications will be deleted automatically.
*
* @param id The unique identifier of the notification to mark read
*/
deleteNotification(id: string): Promise<AstroResult<object>>;
/**
* Marks a pending notification as unread.
*
* A notification represents a message sent to a user to inform them of relevant actions or events within their
* workspace. Notifications are ephemeral and may be deleted when they are no longer needed. When a user has more
* than 1,000 pending notifications some old notifications will be deleted automatically.
*
* @param id The unique identifier of the notification to mark read
*/
markNotificationUnread(id: string): Promise<AstroResult<object>>;
}