Web SDK
  • Home
  • Overview
  • Getting started
  • References
    • Authentication
    • Account
      • Users
    • Notifications
    • Bookmark
    • 2FA
    • Collection
    • Connection filters
    • Feed
    • File Upload
    • Invite
    • Messaging
    • Payment
    • Reviews
    • Search
    • Verification
      • Supported document type
      • List of expected ISO countries
    • Wallet
      • Withdrawal
  • Tutorial
  • Web API
Powered by GitBook
On this page
  • Create a bookmark
  • Get bookmarks
  • Get a bookmark
  • Delete a bookmark
  1. References

Bookmark

Users can bookmark collections via PAKT SDK

Create a bookmark

type createBookMarkDto = {
  collection: string;
};
interface ICollectionBookmarkDto {
  _id?: string;
  owner: string; //TODO :: add IUserDto
  data: ICollectionDto | string;
  active: boolean;
  isDeleted?: boolean;
}
export const createBookmark = async (collection: string) => {
  const payload: createBookMarkDto = {
    collection,
  };

  const create: ICollectionBookmarkDto = await sdkInit.bookmark.create();
};

Get bookmarks

type filterBookmarkDto = {
      page?: string;
      limit?: string;
    }
  | ICollectionBookmarkDto;

  interface FindCollectionBookMarkDto = {
  page: number;
  pages: number;
  total: number;
  limit: number;
  data: ICollectionBookmarkDto[];
};

  export const getBookmarks = async (filter?: filterBookmarkDto) => {
    const bookmarks: FindCollectionBookMarkDto = await sdkInit.bookmark.getAll(filter);
  };

Get a bookmark

export const getABookmark = async (id: string, filter?: Record<string, any> | ICollectionBookmarkDto) => {
  const aBookmark: ICollectionBookmarkDto = await sdkInit.bookmark.getById(id, filter);
};

Delete a bookmark

export const deleteABookmark = async (id: string) => {
  const resp: any = await sdkInit.bookmark.delete(id);
};
PreviousNotificationsNext2FA

Last updated 11 months ago