UNPKG

@veltdev/types

Version:

Velt is an SDK to add collaborative features to your product within minutes. Example: Comments like Figma, Frame.io, Google docs or sheets, Recording like Loom, Huddles like Slack and much more.

397 lines (396 loc) 17.9 kB
export declare const CommentStatus: { readonly NEWLY_ADDED: "newlyAdded"; readonly ADDED: "added"; readonly UPDATED: "updated"; readonly DELETED: "deleted"; readonly APPROVED: "approved"; readonly ASSIGNED: "assigned"; readonly STATUS_CHANGED: "statusChanged"; readonly PRIORITY_CHANGED: "priorityChanged"; readonly ACCESS_MODE_CHANGED: "accessModeChanged"; readonly CUSTOM_LIST_CHANGED: "customListChanged"; readonly ACCEPTED: "accepted"; readonly REJECTED: "rejected"; readonly REACTION_ADDED: "reactionAdded"; readonly REACTION_DELETED: "reactionDeleted"; readonly SUBSCRIBED: "subscribed"; readonly UNSUBSCRIBED: "unsubscribed"; readonly SUGGESTION_ACCEPTED: "suggestionAccepted"; readonly SUGGESTION_REJECTED: "suggestionRejected"; }; export type CommentStatus = (typeof CommentStatus)[keyof typeof CommentStatus]; export declare const ResolverActions: { readonly COMMENT_ANNOTATION_ADD: "comment_annotation.add"; readonly COMMENT_ANNOTATION_DELETE: "comment_annotation.delete"; readonly COMMENT_ADD: "comment.add"; readonly COMMENT_DELETE: "comment.delete"; readonly COMMENT_UPDATE: "comment.update"; readonly REACTION_ADD: "reaction.add"; readonly REACTION_DELETE: "reaction.delete"; readonly ATTACHMENT_ADD: "attachment.add"; readonly ATTACHMENT_DELETE: "attachment.delete"; readonly RECORDER_ANNOTATION_ADD: "recorder_annotation.add"; readonly RECORDER_ANNOTATION_UPDATE: "recorder_annotation.update"; readonly RECORDER_ANNOTATION_DELETE: "recorder_annotation.delete"; readonly ACTIVITY_SAVE: "activity.save"; }; export type ResolverActions = (typeof ResolverActions)[keyof typeof ResolverActions]; /** * Opt-in additional (non-core) comment save events for the Comment Annotations Resolver * (specs/comment-resolver iteration-2). Values mirror the non-core `CommentActivityActionTypes` * (single source of truth — enforced by a unit test). A self-hosting customer lists these in * `ResolverConfig.additionalSaveEvents` to also receive annotation-level events (status change, * priority change, assign, …) on the existing save endpoint. The 4 core events keep using * `ResolverActions`. Kept in enums.ts (a leaf module) to avoid a * resolver.data.model ↔ comment-resolver.data.model import cycle. */ export declare const CommentResolverSaveEvent: { readonly STATUS_CHANGE: "comment_annotation.status_change"; readonly PRIORITY_CHANGE: "comment_annotation.priority_change"; readonly ASSIGN: "comment_annotation.assign"; readonly ACCESS_MODE_CHANGE: "comment_annotation.access_mode_change"; readonly CUSTOM_LIST_CHANGE: "comment_annotation.custom_list_change"; readonly APPROVE: "comment_annotation.approve"; readonly ACCEPT: "comment.accept"; readonly REJECT: "comment.reject"; readonly SUGGESTION_ACCEPT: "comment_annotation.suggestion_accept"; readonly SUGGESTION_REJECT: "comment_annotation.suggestion_reject"; readonly REACTION_ADD: "comment.reaction_add"; readonly REACTION_DELETE: "comment.reaction_delete"; readonly SUBSCRIBE: "comment_annotation.subscribe"; readonly UNSUBSCRIBE: "comment_annotation.unsubscribe"; }; export type CommentResolverSaveEvent = (typeof CommentResolverSaveEvent)[keyof typeof CommentResolverSaveEvent]; export declare const CommentEventTypes: { readonly ADD_COMMENT_ANNOTATION: "addCommentAnnotation"; readonly ADD_COMMENT_ANNOTATION_DRAFT: "addCommentAnnotationDraft"; readonly DELETE_COMMENT_ANNOTATION: "deleteCommentAnnotation"; readonly APPROVE_COMMENT_ANNOTATION: "approveCommentAnnotation"; readonly ACCEPT_COMMENT_ANNOTATION: "acceptCommentAnnotation"; readonly REJECT_COMMENT_ANNOTATION: "rejectCommentAnnotation"; readonly SUBSCRIBE_COMMENT_ANNOTATION: "subscribeCommentAnnotation"; readonly UNSUBSCRIBE_COMMENT_ANNOTATION: "unsubscribeCommentAnnotation"; readonly ASSIGN_USER: "assignUser"; readonly UPDATE_STATUS: "updateStatus"; readonly UPDATE_PRIORITY: "updatePriority"; readonly UPDATE_ACCESS: "updateAccess"; readonly RESOLVE_COMMENT: "resolveComment"; readonly ADD_COMMENT: "addComment"; readonly ADD_COMMENT_DRAFT: "addCommentDraft"; readonly UPDATE_COMMENT: "updateComment"; readonly DELETE_COMMENT: "deleteComment"; readonly ADD_ATTACHMENT: "addAttachment"; readonly DELETE_ATTACHMENT: "deleteAttachment"; readonly DELETE_RECORDING: "deleteRecording"; readonly COPY_LINK: "copyLink"; readonly ADD_REACTION: "addReaction"; readonly DELETE_REACTION: "deleteReaction"; readonly TOGGLE_REACTION: "toggleReaction"; readonly COMMENT_SIDEBAR_DATA_INIT: "commentSidebarDataInit"; readonly COMMENT_SIDEBAR_DATA_UPDATE: "commentSidebarDataUpdate"; readonly AUTOCOMPLETE_SEARCH: "autocompleteSearch"; readonly COMPOSER_CLICKED: "composerClicked"; readonly COMPOSER_TEXT_CHANGE: "composerTextChange"; readonly LINK_CLICKED: "linkClicked"; readonly COMMENT_PIN_CLICKED: "commentPinClicked"; readonly COMMENT_BUBBLE_CLICKED: "commentBubbleClicked"; readonly COMMENT_TOOL_CLICK: "commentToolClick"; readonly COMMENT_TOOL_CLICKED: "commentToolClicked"; readonly SIDEBAR_BUTTON_CLICK: "sidebarButtonClick"; readonly SIDEBAR_BUTTON_CLICKED: "sidebarButtonClicked"; readonly SIDEBAR_OPEN: "sidebarOpen"; readonly SIDEBAR_CLOSE: "sidebarClose"; readonly FULLSCREEN_CLICK: "fullscreenClick"; readonly COMMENT_CLICK: "commentClick"; readonly COMMENT_NAVIGATION_BUTTON_CLICK: "commentNavigationButtonClick"; readonly ATTACHMENT_DOWNLOAD_CLICKED: "attachmentDownloadClicked"; readonly COMMENT_SAVED: "commentSaved"; readonly COMMENT_SAVE_TRIGGERED: "commentSaveTriggered"; readonly VISIBILITY_OPTION_CLICKED: "visibilityOptionClicked"; readonly SUGGESTION_ACCEPTED: "suggestionAccepted"; readonly SUGGESTION_REJECTED: "suggestionRejected"; }; export declare const RecorderEventTypes: { readonly TRANSCRIPTION_DONE: "transcriptionDone"; readonly RECORDING_DONE: "recordingDone"; readonly RECORDING_EDIT_DONE: "recordingEditDone"; readonly DELETE_RECORDING: "deleteRecording"; readonly ERROR: "error"; readonly RECORDING_SAVE_INITIATED: "recordingSaveInitiated"; readonly RECORDING_STARTED: "recordingStarted"; readonly RECORDING_PAUSED: "recordingPaused"; readonly RECORDING_RESUMED: "recordingResumed"; readonly RECORDING_CANCELLED: "recordingCancelled"; readonly RECORDING_STOPPED: "recordingStopped"; readonly RECORDING_DONE_LOCAL: "recordingDoneLocal"; }; export declare const RewriterEventTypes: { readonly TEXT_SELECTED: "textSelected"; }; export declare const SuggestionEventTypes: { readonly SUGGESTION_CREATED: "suggestionCreated"; readonly SUGGESTION_APPROVED: "suggestionApproved"; readonly SUGGESTION_REJECTED: "suggestionRejected"; readonly SUGGESTION_STALE: "suggestionStale"; readonly TARGET_EDIT_START: "targetEditStart"; readonly TARGET_EDIT_COMMIT: "targetEditCommit"; }; export declare const CoreEventTypes: { readonly PERMISSION_PROVIDER: "permissionProvider"; readonly USER_RESOLVER: "userResolver"; readonly COMMENT_RESOLVER: "commentResolver"; readonly ATTACHMENT_RESOLVER: "attachmentResolver"; readonly REACTION_RESOLVER: "reactionResolver"; readonly RECORDER_RESOLVER: "recorderResolver"; readonly NOTIFICATION_RESOLVER: "notificationResolver"; readonly ACTIVITY_RESOLVER: "activityResolver"; readonly VELT_BUTTON_CLICK: "veltButtonClick"; readonly USER_UPDATE: "userUpdate"; readonly INIT_UPDATE: "initUpdate"; readonly DOCUMENT_INIT: "documentInit"; readonly ERROR: "error"; }; export declare const LiveStateSyncEventTypes: { readonly ACCESS_REQUESTED: "accessRequested"; readonly ACCESS_REQUEST_CANCELED: "accessRequestCanceled"; readonly ACCESS_ACCEPTED: "accessAccepted"; readonly ACCESS_REJECTED: "accessRejected"; readonly EDITOR_ASSIGNED: "editorAssigned"; readonly VIEWER_ASSIGNED: "viewerAssigned"; readonly EDITOR_ON_DIFFERENT_TAB_DETECTED: "editorOnDifferentTabDetected"; }; export declare const PresenceEventTypes: { readonly MULTIPLE_USERS_ONLINE: "multipleUsersOnline"; readonly USER_STATE_CHANGE: "userStateChange"; }; export declare const NotificationEventTypes: { readonly SETTINGS_UPDATED: "settingsUpdated"; }; export declare const CrdtEventTypes: { readonly UPDATE_DATA: "updateData"; }; export type CommentEventType = typeof CommentEventTypes[keyof typeof CommentEventTypes]; export type RecorderEventType = typeof RecorderEventTypes[keyof typeof RecorderEventTypes]; export type CoreEventType = typeof CoreEventTypes[keyof typeof CoreEventTypes]; export type LiveStateSyncEventType = typeof LiveStateSyncEventTypes[keyof typeof LiveStateSyncEventTypes]; export type PresenceEventType = typeof PresenceEventTypes[keyof typeof PresenceEventTypes]; export type NotificationEventType = typeof NotificationEventTypes[keyof typeof NotificationEventTypes]; export type RewriterEventType = typeof RewriterEventTypes[keyof typeof RewriterEventTypes]; export type SuggestionEventType = typeof SuggestionEventTypes[keyof typeof SuggestionEventTypes]; export type CrdtEventType = typeof CrdtEventTypes[keyof typeof CrdtEventTypes]; export declare enum TagStatus { ADDED = "added", UPDATED = "updated", DELETED = "deleted", APPROVED = "approved", RESOLVED = "resolved" } export declare enum UserActionTypes { INVITE = "invite", REMOVE = "remove" } export declare enum HuddleActionTypes { CREATED = "created", JOINED = "joined" } export declare enum CrdtActionTypes { UPDATE_DATA = "updateData" } export declare enum RecorderStatus { ADDED = "added", UPDATED = "updated", DELETED = "deleted", APPROVED = "approved", RESOLVED = "resolved" } export declare enum ArrowStatus { ADDED = "added", UPDATED = "updated", DELETED = "deleted" } export declare const AreaStatus: { readonly ADDED: "added"; readonly UPDATED: "updated"; readonly DELETED: "deleted"; }; export type AreaStatus = (typeof AreaStatus)[keyof typeof AreaStatus]; export declare enum DocumentViewsStatus { FIRST_VIEWED = "firstViewed" } export declare enum Features { AREA = "area", ARROW = "arrow", AUDIO_HUDDLE = "audioHuddle", COMMENT = "comment", MULTI_THREAD = "multiThread", CURSOR = "cursor", HUDDLE = "huddle", LIVE_STATE_SYNC = "liveStateSync", PRESENCE = "presence", TAG = "tag", RECORDER = "recorder", REWRITER = "rewriter", LIVE_SELECTION = "liveSelection", NOTIFICATION = "notification", REACTION = "reaction", ACTIVITY = "activity", VIEWS = "views", USER_INVITE = "userInvite", USER_REQUEST = "userRequest", VIDEO_PLAYER = "videoPlayer", CRDT = "crdt" } export declare enum AnalyticsFeatures { AREA = "area", ARROW = "arrow", AUDIO_HUDDLE = "audioHuddle", COMMENT = "comment", MULTI_THREAD = "multiThread", CURSOR = "cursor", HUDDLE = "huddle", LIVE_STATE_SYNC = "liveStateSync", PRESENCE = "presence", TAG = "tag", RECORDER = "recorder", REWRITER = "rewriter", LIVE_SELECTION = "liveSelection", NOTIFICATION = "notification", REACTION = "reaction", AREA_COMMENT = "areaComment", INLINE_COMMENT = "inlineComment", COMMENT_SIDEBAR = "commentSidebar" } export type FeatureType = 'area' | 'arrow' | 'audioHuddle' | 'comment' | 'cursor' | 'huddle' | 'liveStateSync' | 'presence' | 'recorder' | 'rewriter' | 'tag' | 'liveSelection' | 'notification' | 'reaction' | 'multiThread' | 'activity' | 'views' | 'userInvite' | 'userRequest' | 'videoPlayer' | 'crdt'; export type AssignToType = 'dropdown' | 'checkbox'; export declare enum DeviceType { DESKTOP = "Desktop", MOBILE = "Mobile", TABLET = "Tablet", MONITOR = "Monitor", UNKNOWN = "Unknown" } export declare enum Orientation { PORTRAIT = "portrait", LANDSCAPE = "landscape", UNKNOWN = "unknown" } export declare enum OrientationMediaQueries { Portrait = "(orientation: portrait)", Landscape = "(orientation: landscape)" } export declare enum GhostCommentType { DIFFERENT_DEVICE = "differentDevice", ELEMENT_DELETED = "elementDeleted" } export declare enum Roles { ADMIN = "Admin", COMMENTER = "Commenter" } export declare const DocumentAccessType: { readonly PUBLIC: "public"; readonly RESTRICTED: "restricted"; readonly ORGANIZATION_PRIVATE: "organizationPrivate"; }; export type DocumentAccessType = (typeof DocumentAccessType)[keyof typeof DocumentAccessType]; export declare enum DetectionStrategy { DEFAULT = "default", DYNAMIC_ID = "dynamicId" } export declare const CommentAccessMode: { readonly PUBLIC: "public"; readonly PRIVATE: "private"; }; export type CommentAccessMode = (typeof CommentAccessMode)[keyof typeof CommentAccessMode]; export declare enum UnreadIndicatorMode { MINIMAL = "minimal", VERBOSE = "verbose" } export declare enum ComposerMode { DEFAULT = "default", EXPANDED = "expanded" } export declare enum CommentCountType { TOTAL = "total", UNREAD = "unread" } export declare const ServerConnectionState: { readonly ONLINE: "online"; readonly OFFLINE: "offline"; readonly PENDING_INIT: "pendingInit"; readonly PENDING_DATA: "pendingData"; }; export type ServerConnectionState = (typeof ServerConnectionState)[keyof typeof ServerConnectionState]; export declare const ContactListScopeForOrganizationUsers: { readonly ALL: "all"; readonly ORGANIZATION: "organization"; readonly ORGANIZATION_USER_GROUP: "organizationUserGroup"; readonly DOCUMENT: "document"; readonly FOLDER: "folder"; }; export type ContactListScopeForOrganizationUsers = (typeof ContactListScopeForOrganizationUsers)[keyof typeof ContactListScopeForOrganizationUsers]; export type RecorderMode = 'audio' | 'video' | 'screen' | 'all' | string; export type RecorderType = 'audio' | 'video' | 'screen'; export type RecorderFileFormat = 'mp3' | 'mp4' | 'webm'; export type RecorderLayoutMode = 'floating' | 'thread'; export type SupportedMimeType = 'audio' | 'video'; export type FirebaseRegion = 'usCentral1' | 'asiaSouthEast1' | 'europeWest1' | 'australiaSouthEast1'; export type VideoEventType = 'play' | 'pause' | 'ratechange' | 'seeked' | 'timeupdate' | 'volumechange'; export type RewriterType = 'copywriter' | 'generic'; export type RecorderStatusType = 'started' | 'paused' | 'resumed' | 'stopped' | 'error' | null; export type HuddleType = 'audio' | 'video' | 'presentation'; export type NotificationTabId = 'for-you' | 'all' | 'document' | 'people'; export type NotificationTabType = 'forYou' | 'all' | 'documents' | 'people'; export type NotificationSource = 'area' | 'arrow' | 'comment' | 'tag' | 'huddle' | 'userInvite' | 'user' | 'recorder' | 'huddleInvite' | 'userFeedback' | 'userContactUs' | 'userReportBug' | 'documentViews' | 'crdt' | 'custom'; export type SingleEditorStatus = 'pending' | 'accepted' | 'rejected' | 'cancelled'; export type SingleEditorState = 'idle' | 'inProgress' | 'completed'; export type AudioWaveformVariant = 'expanded' | 'minified' | 'player' | 'preview' | 'preview-mini' | 'editor'; export type ActionButtonType = 'button' | 'button-toggle' | 'multi-select' | 'single-select'; export type DropdownPosition = 'left' | 'right' | 'center'; export type DevicePermissionType = 'audio' | 'video'; export type TranscriptionMode = 'floating' | 'embed' | 'summaryMode'; export type ComposerPosition = 'top' | 'bottom'; export type SortBy = 'lastUpdated' | 'createdAt'; export type SortOrder = 'asc' | 'desc'; export type MinimapPosition = 'left' | 'right'; export type FilterOptionLayout = 'dropdown' | 'checkbox'; export type FilterPanelPosition = 'menu' | 'bottomSheet'; export type OverlayOriginY = 'top' | 'center' | 'bottom'; export type OverlayOriginX = 'start' | 'center' | 'end'; export type SubtitlesMode = 'floating' | 'embed'; export type RecorderVariant = 'default' | 'embed'; export type ReactionPinType = 'timeline' | 'comment' | 'standalone'; export type SidebarPosition = 'left' | 'right'; export type SidebarSortingCriteria = 'date' | 'unread' | null; export type SidebarFilterCriteria = 'all' | 'read' | 'unread' | 'resolved' | 'open' | 'assignedToMe' | 'reset' | null; export type SidebarFilterSearchType = 'people' | 'assigned' | 'tagged' | 'involved' | 'pages' | 'documents' | 'statuses' | 'priorities' | 'categories' | 'versions' | string; export type InlineSortingCriteria = 'createdFirst' | 'createdLast' | 'updatedFirst' | 'updatedLast'; export type NotificationPanelMode = 'popover' | 'sidebar'; export type SidebarActionButtonType = 'default' | 'toggle'; export type SidebarButtonCountType = 'default' | 'filter'; export declare const CommentSidebarSystemFiltersOperator: { readonly AND: "and"; readonly OR: "or"; }; export type CommentSidebarSystemFiltersOperator = (typeof CommentSidebarSystemFiltersOperator)[keyof typeof CommentSidebarSystemFiltersOperator]; /** * Type for notification settings accordion types */ export type NotificationSettingsAccordionType = 'inbox' | 'email' | string; /** * Type for notification settings item options */ export type NotificationSettingsItemType = 'ALL' | 'MINE' | 'NONE' | string; /** * Type for notification settings layout */ export type NotificationSettingsLayout = 'accordion' | 'dropdown'; /** * Enum for comment visibility options in the visibility banner dropdown */ export declare enum CommentVisibilityOption { RESTRICTED_SELF = "restrictedSelf", RESTRICTED_SELECTED_PEOPLE = "restrictedSelectedPeople", ORGANIZATION_PRIVATE = "organizationPrivate", PUBLIC = "public" } export type CommentVisibilityOptionType = `${CommentVisibilityOption}`;