// @ts-nocheck import { Observable } from "rxjs"; import { Config } from "../models/data/config.data.model"; import { DocumentUser } from "../models/data/document-user.data.model"; import { Location } from "../models/data/location.model"; import { User } from "../models/data/user.data.model"; import { CommentElement } from "../models/element/comment-element.model"; import { ContactElement } from "../models/element/contact-element.model"; import { CursorElement } from "../models/element/cursor-element.model"; import { PresenceElement } from "../models/element/presence-element.model"; import { RecorderElement } from "../models/element/recorder-element.model"; import { RewriterElement } from "../models/element/rewriter-element.model"; import { SelectionElement } from "../models/element/selection-element.model"; import { TagElement } from "../models/element/tag-element.model"; import { FeatureType } from "../utils/enums"; export declare class Snippyly { constructor(); initConfig: (apiKey: string, config?: Config) => void; identify: (user: User) => Promise; /** * Tell us who the currently logged in user is. * * Call whenever the user is updated: signs in, signs out, signs up etc. */ updateUser: (user: User) => void; /** * Tell us the unique ID of the current document/resource on which you want to enable collaboration. * @param id unique document ID */ setDocumentId: (id: string) => void; /** * Tell us the custom params of the current document/resource to identify sub document inside a document. * @param params Document Params * @deprecated This method is depercated and will be removed in next release. Use `setLocation` method instead. */ setDocumentParams: (params: Location) => void; /** * Tell us the custom params of the current document/resource to identify sub document inside a document. * @param params Locaion */ setLocation: (params: Location) => void; /** * To remove document params from a User * @deprecated This method is depercated and will be removed in next release. Use `removeLocation` method instead. */ removeDocumentParams: () => void; /** * To remove location from a User */ removeLocation: () => void; /** * Tell us the about the scrollable document ids to keep track on its scroll changes * @param ids scrollable elements ids */ setScrollableElementsIds: (ids: string[]) => void; /** * To remove document params from a User */ removeScrollableElementsIds: () => void; /** * Get the Presence Element Object to access the raw presence data. * * This is for Pros who don’t want to use Snippyly Presence web component and want to design their own UI. */ getPresenceElement: () => PresenceElement; /** * Get the Cursor Element Object to access the raw cursor data. * * This is for Pros who don’t want to use Snippyly Presence web component and want to design their own UI. */ getCursorElement: () => CursorElement; /** * Get the Comment Element Object to access the raw comment data. * * This is for Pros who don’t want to use Snippyly Comment web component and want to design their own UI. */ getCommentElement: () => CommentElement; /** * Get the Tag Pin Annotation Object to access the raw tag data. * * This is for Pros who don’t want to use Snippyly Tag web component and want to design their own UI. */ getTagElement: () => TagElement; /** * Get the Selection Object to enable/disable the feature. */ getSelectionElement: () => SelectionElement; /** * Get the Recorder Object. */ getRecorderElement: () => RecorderElement; /** * Get the Contact Object. */ getContactElement: () => ContactElement; /** * Get the Rewriter Object. */ getRewriterElement: () => RewriterElement; /** * To signout a user */ signOutUser: () => any; /** * Provide a list of features to disable. * Provide an empty array to enable all the features. * @param features List of features */ disableFeatures: (features: Array) => void; /** * Add location to show comments, tags, recorders etc. for provided location also. * @param location Location object */ addLocation: (location: any) => any; /** * To check if user allowed in provided document or not. */ isUserAllowed$: () => Observable; /** * To get user role in provided document. */ getUserRole$: () => Observable; /** * To check if plan is expired or not. */ isPlanExpired$: () => Observable; /** * To invite list of users to the document. * @param documentUsers List of document users */ inviteUsers: (documentUsers: Array) => void; /** * To remove snippyly specific content from provided html content. */ removeSnippylyContent: (htmlContent: string) => string; }