Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type aliases

Actions

Actions: typeof Actions[keyof typeof Actions]

Annotation

Annotation: { __typename?: "Annotation"; annotContents?: Maybe<Scalars["String"]>; author?: Maybe<User>; createdAt: Scalars["Date"]; documentId: Scalars["ID"]; id: Scalars["ID"]; inReplyTo?: Maybe<Scalars["ID"]>; membership?: Maybe<AnnotationMember>; mentions: Array<Mention>; pageNumber: Scalars["Int"]; updatedAt: Scalars["Date"]; xfdf: Scalars["String"] }

Type declaration

  • Optional __typename?: "Annotation"
  • Optional annotContents?: Maybe<Scalars["String"]>
  • Optional author?: Maybe<User>
  • createdAt: Scalars["Date"]
  • documentId: Scalars["ID"]
  • id: Scalars["ID"]
  • Optional inReplyTo?: Maybe<Scalars["ID"]>
  • Optional membership?: Maybe<AnnotationMember>
  • mentions: Array<Mention>
  • pageNumber: Scalars["Int"]
  • updatedAt: Scalars["Date"]
  • xfdf: Scalars["String"]

AnnotationCountQueryData

AnnotationCountQueryData: { documentId: string; since: number }

Type declaration

  • documentId: string
  • since: number

AnnotationMember

AnnotationMember: Member & { __typename?: "AnnotationMember"; annotationCreatedAt: Scalars["Date"]; annotationId: Scalars["ID"]; createdAt: Scalars["Date"]; documentId: Scalars["ID"]; id: Scalars["ID"]; lastRead: Scalars["Date"]; updatedAt: Scalars["Date"] }

AnnotationMemberCountQueryData

AnnotationMemberCountQueryData: { documentId: string; since: number; userId: string }

Type declaration

  • documentId: string
  • since: number
  • userId: string

AnnotationMembersQuery

AnnotationMembersQuery: { annotationId?: string; filters?: QueryParams; ids?: string[]; userId?: string }

Type declaration

  • Optional annotationId?: string
  • Optional filters?: QueryParams
  • Optional ids?: string[]
  • Optional userId?: string

AnnotationsQuery

AnnotationsQuery: { documentId?: string; filters?: QueryParams; ids?: string[]; inReplyTo?: string; pageNumbers?: number[] }

Type declaration

  • Optional documentId?: string
  • Optional filters?: QueryParams
  • Optional ids?: string[]
  • Optional inReplyTo?: string
  • Optional pageNumbers?: number[]

ApolloDatabaseAnnotation

ApolloDatabaseAnnotation: Omit<ApolloAnnotation, "membership" | "author" | "mentions" | "__typename"> & { authorId: string }

ApolloDatabaseAnnotationMember

ApolloDatabaseAnnotationMember: Omit<ApolloAnnotationMember, "__typename" | "user"> & { annotationCreatedAt: number; userId: string }

ApolloDatabaseDocument

ApolloDatabaseDocument: Omit<ApolloDocument, "members" | "annotations" | "unreadCount" | "__typename">

ApolloDatabaseDocumentMember

ApolloDatabaseDocumentMember: Omit<ApolloDocumentMember, "__typename" | "user"> & { userId: string }

ApolloDatabaseMention

ApolloDatabaseMention: Omit<ApolloMention, "mentionedUser" | "__typename"> & { userId: string }

ApolloDatabaseUser

ApolloDatabaseUser: Omit<ApolloUser, "documents" | "__typename">

AuthMethod

AuthMethod: Roles | AuthorizeFunction

AuthorizeFunction

AuthorizeFunction: (entity: any, user: Pick<ApolloUser, "id" | "createdAt" | "email" | "type">) => Promise<boolean>

Type declaration

    • (entity: any, user: Pick<ApolloUser, "id" | "createdAt" | "email" | "type">): Promise<boolean>
    • Parameters

      • entity: any
      • user: Pick<ApolloUser, "id" | "createdAt" | "email" | "type">

      Returns Promise<boolean>

CollabServerCustomQueriesOptions

CollabServerCustomQueriesOptions: { additionalResolvers: ResolverObj; additionalTypeDefs: string }

Type declaration

  • additionalResolvers: ResolverObj
  • additionalTypeDefs: string

CollabServerEmailOptions

CollabServerEmailOptions: { emailHandler?: EmailFunction; emailOnAnnotationCreated?: boolean; emailQueueTimer?: number }

Type declaration

  • Optional emailHandler?: EmailFunction
  • Optional emailOnAnnotationCreated?: boolean
  • Optional emailQueueTimer?: number

CollabServerOptions

CollabServerOptions: { corsOption?: CorsOptions; customQueries?: CollabServerCustomQueriesOptions; emailOptions?: CollabServerEmailOptions; getUserFromToken?: GetUserFromToken; jwtCookieName?: string; logLevel?: Logging; logTransports?: Array<winston.transport>; permissions?: UserPermissionSetting; resolvers: UserResolvers; verifyPassword?: VerifyPassword }

Type declaration

DeleteResult

DeleteResult: { __typename?: "DeleteResult"; id?: Maybe<Scalars["ID"]>; message?: Maybe<Scalars["String"]>; successful: Scalars["Boolean"] }

Type declaration

  • Optional __typename?: "DeleteResult"
  • Optional id?: Maybe<Scalars["ID"]>
  • Optional message?: Maybe<Scalars["String"]>
  • successful: Scalars["Boolean"]

Document

Document: { __typename?: "Document"; annotations: Array<Annotation>; authorId: Scalars["ID"]; createdAt: Scalars["Date"]; id: Scalars["ID"]; isPublic?: Maybe<Scalars["Boolean"]>; members: Array<DocumentMember>; name?: Maybe<Scalars["String"]>; unreadCount: Scalars["Int"]; updatedAt: Scalars["Date"] }

Type declaration

  • Optional __typename?: "Document"
  • annotations: Array<Annotation>
  • authorId: Scalars["ID"]
  • createdAt: Scalars["Date"]
  • id: Scalars["ID"]
  • Optional isPublic?: Maybe<Scalars["Boolean"]>
  • members: Array<DocumentMember>
  • Optional name?: Maybe<Scalars["String"]>
  • unreadCount: Scalars["Int"]
  • updatedAt: Scalars["Date"]

DocumentMember

DocumentMember: Member & { __typename?: "DocumentMember"; createdAt: Scalars["Date"]; documentId: Scalars["ID"]; id: Scalars["ID"]; lastRead: Scalars["Date"]; updatedAt: Scalars["Date"]; user: User }

DocumentMembersQuery

DocumentMembersQuery: { documentId?: string; filters?: QueryParams; ids?: string[]; userId?: string }

Type declaration

  • Optional documentId?: string
  • Optional filters?: QueryParams
  • Optional ids?: string[]
  • Optional userId?: string

DocumentsQuery

DocumentsQuery: { filters?: QueryParams; ids?: string[]; userId?: string }

Type declaration

  • Optional filters?: QueryParams
  • Optional ids?: string[]
  • Optional userId?: string

EditAnnotationInput

EditAnnotationInput: { annotContents?: Maybe<Scalars["String"]>; mentionedUserIds?: Maybe<Array<Scalars["ID"]>>; pageNumber?: Maybe<Scalars["Int"]>; updatedAt: Scalars["Date"]; xfdf?: Maybe<Scalars["String"]> }

Type declaration

  • Optional annotContents?: Maybe<Scalars["String"]>
  • Optional mentionedUserIds?: Maybe<Array<Scalars["ID"]>>
  • Optional pageNumber?: Maybe<Scalars["Int"]>
  • updatedAt: Scalars["Date"]
  • Optional xfdf?: Maybe<Scalars["String"]>

EditAnnotationMemberInput

EditAnnotationMemberInput: { lastRead?: Maybe<Scalars["String"]>; updatedAt: Scalars["Date"] }

Type declaration

  • Optional lastRead?: Maybe<Scalars["String"]>
  • updatedAt: Scalars["Date"]

EditAnnotationMemberUserInput

EditAnnotationMemberUserInput: Omit<EditAnnotationMemberInput, "lastRead"> & { lastRead?: number }

EditDocumentMemberInput

EditDocumentMemberInput: { lastRead?: Maybe<Scalars["String"]>; updatedAt: Scalars["Date"] }

Type declaration

  • Optional lastRead?: Maybe<Scalars["String"]>
  • updatedAt: Scalars["Date"]

EditDocumentMemberUserInput

EditDocumentMemberUserInput: Omit<EditDocumentMemberInput, "lastRead"> & { lastRead?: number }

EmailFunction

EmailFunction: (type: Email, data: InviteEmailData | MessageEmailData) => Promise<void>

Type declaration

EmailServiceOptions

EmailServiceOptions: { emailSender: string; emailServiceApiKey: string; getTemplateData?: (type: Email, data: InviteEmailData | MessageEmailData) => AsyncOrSync<TemplateData>; sendGrid: typeof sgMail; senderName?: string; templateId?: { invite: string; message: string } }

Type declaration

  • emailSender: string

    The email address or domain you verified from your email service

  • emailServiceApiKey: string

    Your sendgrid API key

  • Optional getTemplateData?: (type: Email, data: InviteEmailData | MessageEmailData) => AsyncOrSync<TemplateData>
  • sendGrid: typeof sgMail

    A reference to '@sendgrid/mail'

  • Optional senderName?: string

    The name of the sender

  • Optional templateId?: { invite: string; message: string }

    Sendgrid template Ids for each email type

    • invite: string
    • message: string

EntityPermissions

EntityPermissions: { add?: AuthMethod | Array<AuthMethod>; delete?: AuthMethod | Array<AuthMethod>; edit?: AuthMethod | Array<AuthMethod>; invite?: AuthMethod | Array<AuthMethod>; read?: AuthMethod | Array<AuthMethod> }

Type declaration

GetUserFromToken

GetUserFromToken: (token: string) => Promise<UserAuth> | UserAuth

Type declaration

InviteEmailData

InviteEmailData: { documentId: string; documentName: string; sendTo: string[]; sentBy: string; usersInvited: InvitedUserInput[] }

Type declaration

  • documentId: string
  • documentName: string
  • sendTo: string[]
  • sentBy: string
  • usersInvited: InvitedUserInput[]

MentionsQuery

MentionsQuery: { annotationId?: string; documentId?: string; filters?: QueryParams; ids?: string[]; userId?: string }

Type declaration

  • Optional annotationId?: string
  • Optional documentId?: string
  • Optional filters?: QueryParams
  • Optional ids?: string[]
  • Optional userId?: string

MessageData

MessageData: { annotationId: string; documentId: string; documentName: string; messageText: string; sendTo: string[]; sentBy: string }

Type declaration

  • annotationId: string
  • documentId: string
  • documentName: string
  • messageText: string
  • sendTo: string[]
  • sentBy: string

MessageEmailData

MessageEmailData: { messages: Omit<MessageData, "sendTo">[]; sendTo: string }

Type declaration

  • messages: Omit<MessageData, "sendTo">[]
  • sendTo: string

PermissionSetting

PermissionSetting: { annotation: Omit<EntityPermissions, "invite">; document: EntityPermissions }

Type declaration

QueryParams

QueryParams: { createdAfter?: number; createdBefore?: number; limit?: number; orderBy?: "updatedAt" | "createdAt"; orderDirection?: "ASC" | "DESC"; updatedAfter?: number; updatedBefore?: number }

Type declaration

  • Optional createdAfter?: number
  • Optional createdBefore?: number
  • Optional limit?: number
  • Optional orderBy?: "updatedAt" | "createdAt"
  • Optional orderDirection?: "ASC" | "DESC"
  • Optional updatedAfter?: number
  • Optional updatedBefore?: number

Roles

Roles: typeof Roles[keyof typeof Roles]

User

User: { __typename?: "User"; createdAt: Scalars["Date"]; documents: Array<Document>; email?: Maybe<Scalars["String"]>; id: Scalars["ID"]; type: UserTypes; updatedAt: Scalars["Date"]; userName?: Maybe<Scalars["String"]> }

Type declaration

  • Optional __typename?: "User"
  • createdAt: Scalars["Date"]
  • documents: Array<Document>
  • Optional email?: Maybe<Scalars["String"]>
  • id: Scalars["ID"]
  • type: UserTypes
  • updatedAt: Scalars["Date"]
  • Optional userName?: Maybe<Scalars["String"]>

UserAuth

UserAuth: { id: string; userName?: string }

Type declaration

  • id: string
  • Optional userName?: string

UserPermissionSetting

UserPermissionSetting: { annotation?: Roles | EntityPermissions; document?: Roles | EntityPermissions }

Type declaration

UserResolvers

UserResolvers: { Mutation: { addAnnotation: (annotation: AddAnnotationVariables["input"]) => AsyncOrSync<RequireID<ApolloDatabaseAnnotation>>; addAnnotationMember: (annotationMember: ApolloDatabaseAnnotationMember) => AsyncOrSync<RequireID<ApolloDatabaseAnnotationMember>>; addDocument: (document: ApolloDatabaseDocument) => AsyncOrSync<RequireID<ApolloDatabaseDocument>>; addDocumentMember: (documentMember: ApolloDatabaseDocumentMember) => AsyncOrSync<RequireID<ApolloDatabaseDocumentMember>>; addMention: (mention: ApolloDatabaseMention) => AsyncOrSync<RequireID<ApolloDatabaseMention>>; addUser: (user: ApolloDatabaseUser) => AsyncOrSync<RequireID<ApolloDatabaseUser>>; deleteAnnotation: (id: string) => AsyncOrSync<DeleteResult>; deleteAnnotationMember: (id: string) => AsyncOrSync<DeleteResult>; deleteDocument: (id: string) => AsyncOrSync<DeleteResult>; deleteDocumentMember: (id: string) => AsyncOrSync<DeleteResult>; deleteMention: (id: string) => AsyncOrSync<DeleteResult>; editAnnotation: (id: string, input: EditAnnotationInput) => AsyncOrSync<RequireID<ApolloDatabaseAnnotation | null>>; editAnnotationMember: (id: string, input: EditAnnotationMemberUserInput) => AsyncOrSync<RequireID<ApolloDatabaseAnnotationMember | null>>; editDocument: (id: string, input: EditDocumentVariables["input"]) => AsyncOrSync<RequireID<ApolloDatabaseDocument | null>>; editDocumentMember: (id: string, input: EditDocumentMemberUserInput) => AsyncOrSync<RequireID<ApolloDatabaseDocumentMember | null>>; editMention: (id: string, input: EditMentionInput) => AsyncOrSync<RequireID<ApolloDatabaseMention | null>> }; Query: { annotationCount: (query: AnnotationCountQueryData) => AsyncOrSync<number>; annotationMemberCount: (query: AnnotationMemberCountQueryData) => AsyncOrSync<number>; annotationMembers: (query: AnnotationMembersQuery) => AsyncOrSync<Array<RequireID<ApolloDatabaseAnnotationMember>>>; annotations: (query: AnnotationsQuery) => AsyncOrSync<Array<RequireID<ApolloDatabaseAnnotation>>>; documentMembers: (query: DocumentMembersQuery) => AsyncOrSync<Array<RequireID<ApolloDatabaseDocumentMember>>>; documents: (query: DocumentsQuery) => AsyncOrSync<Array<RequireID<ApolloDatabaseDocument>>>; mentions: (query: MentionsQuery) => AsyncOrSync<Array<RequireID<ApolloDatabaseMention>>>; user: (id: string) => AsyncOrSync<RequireID<ApolloDatabaseUser>>; userWithEmail: (email: string) => AsyncOrSync<RequireID<ApolloDatabaseUser>> } }

Type declaration

VerifyPassword

VerifyPassword: (email: string, password: string) => Promise<boolean> | boolean

Type declaration

    • (email: string, password: string): Promise<boolean> | boolean
    • Parameters

      • email: string
      • password: string

      Returns Promise<boolean> | boolean

Variables

Const Actions

Actions: { ADD: "add"; DELETE: "delete"; EDIT: "edit"; INVITE: "invite"; READ: "read" } = {READ: 'read',ADD: 'add',EDIT: 'edit',DELETE: 'delete',INVITE: 'invite'} as const

Type declaration

  • ADD: "add"
  • DELETE: "delete"
  • EDIT: "edit"
  • INVITE: "invite"
  • READ: "read"

Const Roles

Roles: { ANNOTATION_AUTHOR: "annotation_author"; ANY: "any"; DOCUMENT_AUTHOR: "document_author"; DOCUMENT_MEMBER: "document_member" } = {DOCUMENT_AUTHOR: 'document_author',DOCUMENT_MEMBER: 'document_member',ANNOTATION_AUTHOR: 'annotation_author',ANY: 'any'} as const

Type declaration

  • ANNOTATION_AUTHOR: "annotation_author"
  • ANY: "any"
  • DOCUMENT_AUTHOR: "document_author"
  • DOCUMENT_MEMBER: "document_member"

Functions

Const makeResolvers

  • makeResolvers(): Resolvers
  • Returns Resolvers

Const sendGridEmailHandler

Const setPermissions

Object literals

Const SubscriptionTypes

SubscriptionTypes: object

ANNOTATION_CHANGED

ANNOTATION_CHANGED: string = "ANNOTATION_CHANGED"

CONNECTED_DOC_USERS_CHANGED

CONNECTED_DOC_USERS_CHANGED: string = "CONNECTED_DOC_USERS_CHANGED"

DOCUMENT_CHANGED

DOCUMENT_CHANGED: string = "DOCUMENT_CHANGED"

MENTION_CHANGED

MENTION_CHANGED: string = "MENTION_CHANGED"

SCROLL_POSITION_CHANGED

SCROLL_POSITION_CHANGED: string = "SCROLL_POSITION_CHANGED"

Const permissionConstants

permissionConstants: object

Actions

Actions: { ADD: "add"; DELETE: "delete"; EDIT: "edit"; INVITE: "invite"; READ: "read" }

Type declaration

  • ADD: "add"
  • DELETE: "delete"
  • EDIT: "edit"
  • INVITE: "invite"
  • READ: "read"

Entities

Entities: { ANNOTATION: "annotation"; DOCUMENT: "document" }

Type declaration

  • ANNOTATION: "annotation"
  • DOCUMENT: "document"

Roles

Roles: { ANNOTATION_AUTHOR: "annotation_author"; ANY: "any"; DOCUMENT_AUTHOR: "document_author"; DOCUMENT_MEMBER: "document_member" }

Type declaration

  • ANNOTATION_AUTHOR: "annotation_author"
  • ANY: "any"
  • DOCUMENT_AUTHOR: "document_author"
  • DOCUMENT_MEMBER: "document_member"

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc