### Hierarchy

- Emitter
  - Page

### Implements

- IEmitter
- IPageService

## Index

### Constructors

- constructor

### Properties

- Actions
- Content
- Functions
- Ranges
- _access
- _accessInterval
- _accessLoaded
- _checkAccess
- _contentLoaded
- _data
- _error
- _folderId
- _folderName
- _metaLoaded
- _pageId
- _pageName
- _provider
- _supportsWS
- _uuid
- _wsDisabled
- decrypted
- listeners
- onListeners
- ready
- types
- updatesOn

### Accessors

- EVENT_ACCESS_UPDATED
- EVENT_DECRYPTED
- EVENT_EMPTY_UPDATE
- EVENT_ERROR
- EVENT_NEW_CONTENT
- EVENT_NEW_CONTENT_DELTA
- EVENT_NEW_META
- EVENT_RANGES_UPDATED
- EVENT_READY
- TYPE_ALERT
- TYPE_DOMAIN_USAGE_REPORT
- TYPE_GLOBAL_USAGE_REPORT
- TYPE_LIVE_USAGE_REPORT
- TYPE_PAGE_ACCESS_REPORT
- TYPE_PAGE_UPDATE_REPORT
- TYPE_PDF
- TYPE_REGULAR
- access
- data
- encryptionKeyPull
- encryptionKeyPush

### Methods

- canEdit
- checkPageAccess
- checkReady
- clone
- copy
- createProvider
- decrypt
- del
- destroy
- emit
- encrypt
- getPageAccess
- getPageId
- init
- off
- on
- onPageError
- push
- pushDelta
- pushFull
- register
- registerListeners
- removeEvent
- removeEvents
- saveMeta
- setAsFoldersDefault
- start
- stop
- unRegister
- updatePageType
- create

### Object literals

- _encryptionKeyPull
- _encryptionKeyPush

## Constructors

### constructor

- new Page(pageId: number | string, folderId: number | string, uuid?: undefined | string): Page

- Overrides Emitter.constructor

  - Defined in Page/Page.ts:478

  Starts new page object

  #### Parameters

  - ##### pageId: number | string

  - ##### folderId: number | string

  - ##### Optional uuid: undefined | string

  #### Returns Page

## Properties

### Actions

Actions: IActions

- Defined in Page/Page.ts:349

Class for page actions manipulation

type

  {IActions}

### Content

Content: IPageContentProvider

Implementation of IPageService.Content

- Defined in Page/Page.ts:356

Page content provider class

type

  {IPageContentProvider}

### Functions

Functions: IFunctions

- Defined in Page/Page.ts:350

### Ranges

Ranges: IPageRangesCollection

Implementation of IPageService.Ranges

- Defined in Page/Page.ts:343

Class for page range manipulation

type

  {IPageRangesCollection}

### Private _access

_access: IUserPageAccess

- Defined in Page/Page.ts:395

Holds page access values

type

  {IUserPageAccess}

### Private _accessInterval

_accessInterval: Promise<any>

- Defined in Page/Page.ts:383

Object that holds the setInterval object for requesting page access data

type

  {number}

### Private _accessLoaded

_accessLoaded: boolean = false

- Defined in Page/Page.ts:406

### Private _checkAccess

_checkAccess: boolean = true

- Defined in Page/Page.ts:371

### Private _contentLoaded

_contentLoaded: boolean = false

- Defined in Page/Page.ts:404

### Private _data

_data: IPage

- Defined in Page/Page.ts:389

Holds page content and page meta together

type

  {IPage}

### Private _error

_error: boolean = false

- Defined in Page/Page.ts:407

### Private _folderId

_folderId: number

- Defined in Page/Page.ts:398

### Private _folderName

_folderName: string

- Defined in Page/Page.ts:400

### Private _metaLoaded

_metaLoaded: boolean = false

- Defined in Page/Page.ts:405

### Private _pageId

_pageId: number

- Defined in Page/Page.ts:397

### Private _pageName

_pageName: string

- Defined in Page/Page.ts:399

### Private _provider

_provider: IPageProvider

- Defined in Page/Page.ts:377

Object that holds page data provider

type

  {IPageProvider}

### Private _supportsWS

_supportsWS: boolean = true

- Defined in Page/Page.ts:369

Indicates if client supports websockets

type

  {boolean}

### Private _uuid

_uuid: string

- Defined in Page/Page.ts:401

### Private _wsDisabled

_wsDisabled: boolean = false

- Defined in Page/Page.ts:370

### decrypted

decrypted: boolean = true

Implementation of IPageService.decrypted

- Defined in Page/Page.ts:325

Indicates if page is decrypted.

type

  {boolean}

### listeners

listeners: IListeners = []

Inherited from Emitter.listeners

- Defined in Emitter.ts:16

### onListeners

onListeners: any

Inherited from Emitter.onListeners

- Defined in Emitter.ts:17

### ready

ready: boolean = false

Implementation of IPageService.ready

- Defined in Page/Page.ts:319

Indicates when page is ready (both content and settings/meta are loaded)

type

  {boolean}

### types

types: IPageTypes

Implementation of IPageService.types

- Defined in Page/Page.ts:337

Mapping list of page types label - id

type

  {IPageTypes}

### updatesOn

updatesOn: boolean = true

Implementation of IPageService.updatesOn

- Defined in Page/Page.ts:331

Indicates if page updates are on - page is requesting/receiving new updates

type

  {boolean}

## Accessors

### EVENT_ACCESS_UPDATED

- get EVENT_ACCESS_UPDATED(): string

- - Defined in Page/Page.ts:308

  #### Returns string

### EVENT_DECRYPTED

- get EVENT_DECRYPTED(): string

- - Defined in Page/Page.ts:290

  #### Returns string

### EVENT_EMPTY_UPDATE

- get EVENT_EMPTY_UPDATE(): string

- - Defined in Page/Page.ts:299

  #### Returns string

### EVENT_ERROR

- get EVENT_ERROR(): string

- - Defined in Page/Page.ts:311

  #### Returns string

### EVENT_NEW_CONTENT

- get EVENT_NEW_CONTENT(): string

- - Defined in Page/Page.ts:293

  #### Returns string

### EVENT_NEW_CONTENT_DELTA

- get EVENT_NEW_CONTENT_DELTA(): string

- - Defined in Page/Page.ts:296

  #### Returns string

### EVENT_NEW_META

- get EVENT_NEW_META(): string

- - Defined in Page/Page.ts:302

  #### Returns string

### EVENT_RANGES_UPDATED

- get EVENT_RANGES_UPDATED(): string

- - Defined in Page/Page.ts:305

  #### Returns string

### EVENT_READY

- get EVENT_READY(): string

- - Defined in Page/Page.ts:287

  #### Returns string

### TYPE_ALERT

- get TYPE_ALERT(): number

- - Defined in Page/Page.ts:265

  #### Returns number

### TYPE_DOMAIN_USAGE_REPORT

- get TYPE_DOMAIN_USAGE_REPORT(): number

- - Defined in Page/Page.ts:274

  #### Returns number

### TYPE_GLOBAL_USAGE_REPORT

- get TYPE_GLOBAL_USAGE_REPORT(): number

- - Defined in Page/Page.ts:277

  #### Returns number

### TYPE_LIVE_USAGE_REPORT

- get TYPE_LIVE_USAGE_REPORT(): number

- - Defined in Page/Page.ts:283

  #### Returns number

### TYPE_PAGE_ACCESS_REPORT

- get TYPE_PAGE_ACCESS_REPORT(): number

- - Defined in Page/Page.ts:271

  #### Returns number

### TYPE_PAGE_UPDATE_REPORT

- get TYPE_PAGE_UPDATE_REPORT(): number

- - Defined in Page/Page.ts:280

  #### Returns number

### TYPE_PDF

- get TYPE_PDF(): number

- - Defined in Page/Page.ts:268

  #### Returns number

### TYPE_REGULAR

- get TYPE_REGULAR(): number

- - Defined in Page/Page.ts:262

  #### Returns number

### access

- get access(): IUserPageAccess

- - Defined in Page/Page.ts:570

  Getter for page access

  #### Returns IUserPageAccess

### data

- get data(): IPage

- - Defined in Page/Page.ts:562

  Getter for page data

  #### Returns IPage

### encryptionKeyPull

- set encryptionKeyPull(key: IEncryptionKey): void

- - Defined in Page/Page.ts:546

  Setter for pull encryption key

  #### Parameters

  - ##### key: IEncryptionKey

  #### Returns void

### encryptionKeyPush

- set encryptionKeyPush(key: IEncryptionKey): void

- - Defined in Page/Page.ts:554

  Setter for push encryption key

  #### Parameters

  - ##### key: IEncryptionKey

  #### Returns void

## Methods

### canEdit

- canEdit(): boolean

- - Defined in Page/Page.ts:957

  #### Returns boolean

### Private checkPageAccess

- checkPageAccess(): void

- - Defined in Page/Page.ts:1021

  #### Returns void

### Private checkReady

- checkReady(): void

- - Defined in Page/Page.ts:1334

  Check if page is considered to be ready

  #### Returns void

### clone

- clone(folderId: number, name: string, options?: IPageCloneOptions): Promise<IPageService>

- - Defined in Page/Page.ts:836

  Clone current page. Clones page content and some settings, can specify more options via options param.

  deprecated

  #### Parameters

  - ##### folderId: number

  - ##### name: string

  - ##### Default value options: IPageCloneOptions = {}

  #### Returns Promise<IPageService>

### copy

- copy(folderId: number, name: string, options?: IPageCopyOptions): Promise<IPageService>

- - Defined in Page/Page.ts:888

  Clone current page. Clones page content and some settings, can specify more options via options param.

  #### Parameters

  - ##### folderId: number

  - ##### name: string

  - ##### Default value options: IPageCopyOptions = {}

  #### Returns Promise<IPageService>

### Private createProvider

- createProvider(ignoreWS?: undefined | false | true): void

- - Defined in Page/Page.ts:964

  #### Parameters

  - ##### Optional ignoreWS: undefined | false | true

  #### Returns void

### decrypt

- decrypt(key?: IEncryptionKey): void

- - Defined in Page/Page.ts:746

  Check if page is encrypted and decrypt it if it is

  #### Parameters

  - ##### Optional key: IEncryptionKey

  #### Returns void

### del

- del(): Promise<any>

- - Defined in Page/Page.ts:732

  Deletes current page

  #### Returns Promise<any>

### destroy

- destroy(): void

- - Defined in Page/Page.ts:818

  Destroy page object

  #### Returns void

### emit

- emit(name: string, args?: any): void

- Inherited from Emitter.emit

  - Defined in Emitter.ts:51

  #### Parameters

  - ##### name: string

  - ##### Optional args: any

  #### Returns void

### Private encrypt

- encrypt(key: IEncryptionKey, content: IPageContent): string | null

- - Defined in Page/Page.ts:1360

  Encrypt page content with given key

  #### Parameters

  - ##### key: IEncryptionKey

  - ##### content: IPageContent

  #### Returns string | null

### Private getPageAccess

- getPageAccess(): Promise<any>

- - Defined in Page/Page.ts:1059

  Load page access

  #### Returns Promise<any>

### Private getPageId

- getPageId(folderName: string, pageName: string): Promise<any>

- - Defined in Page/Page.ts:1038

  In case page is requested with name, get page ID from service

  #### Parameters

  - ##### folderName: string

  - ##### pageName: string

  #### Returns Promise<any>

### Private init

- init(ignoreWS?: undefined | false | true): void

- - Defined in Page/Page.ts:979

  Actual bootstrap of the page, starts page updates, registeres provider, starts page access updates

  #### Parameters

  - ##### Optional ignoreWS: undefined | false | true

  #### Returns void

### off

- off(name: string, callback: any): void

- Inherited from Emitter.off

  - Defined in Emitter.ts:30

  #### Parameters

  - ##### name: string

  - ##### callback: any

  #### Returns void

### on

- on(name: string, callback: any): void

- Inherited from Emitter.on

  - Defined in Emitter.ts:23

  #### Parameters

  - ##### name: string

  - ##### callback: any

  #### Returns void

### Private onPageError

- onPageError(err: any): void

- - Defined in Page/Page.ts:1225

  #### Parameters

  - ##### err: any

  #### Returns void

### push

- push(forceFull?: boolean, otherRequestData?: any): Promise<any>

- - Defined in Page/Page.ts:599

  Push new data to a page. This method accepts either full page content or delta content update

  #### Parameters

  - ##### Default value forceFull: boolean = false

  - ##### Default value otherRequestData: any = {}

  #### Returns Promise<any>

### Private pushDelta

- pushDelta(data: IPageDelta, otherRequestData?: any): Promise<any>

- - Defined in Page/Page.ts:1312

  Push delta content update

  #### Parameters

  - ##### data: IPageDelta

  - ##### Default value otherRequestData: any = {}

  #### Returns Promise<any>

### Private pushFull

- pushFull(content: IPageContent, otherRequestData?: any): Promise<any>

- - Defined in Page/Page.ts:1253

  Push full content update

  #### Parameters

  - ##### content: IPageContent

  - ##### Default value otherRequestData: any = {}

  #### Returns Promise<any>

### register

- register(callback: any): void

- Inherited from Emitter.register

  - Defined in Emitter.ts:40

  #### Parameters

  - ##### callback: any

  #### Returns void

### Private registerListeners

- registerListeners(): void

- - Defined in Page/Page.ts:1133

  Register listeners. THese are listeners on events emitted from page providers, which are processed and then re-emitted to public

  #### Returns void

### removeEvent

- removeEvent(): void

- Implementation of IPageService.removeEvent

  Inherited from Emitter.removeEvent

  - Defined in Emitter.ts:65

  #### Returns void

### removeEvents

- removeEvents(): void

- Implementation of IPageService.removeEvents

  Inherited from Emitter.removeEvents

  - Defined in Emitter.ts:69

  #### Returns void

### saveMeta

- saveMeta(data: any): Promise<any>

- - Defined in Page/Page.ts:674

  Save page settings/meta

  #### Parameters

  - ##### data: any

  #### Returns Promise<any>

### setAsFoldersDefault

- setAsFoldersDefault(): Promise<any>

- - Defined in Page/Page.ts:710

  Sets current page as folders default for current user

  #### Returns Promise<any>

### start

- start(): void

- - Defined in Page/Page.ts:577

  Start page updates

  #### Returns void

### stop

- stop(): void

- - Defined in Page/Page.ts:587

  Stop page updates

  #### Returns void

### unRegister

- unRegister(callback: any): void

- Inherited from Emitter.unRegister

  - Defined in Emitter.ts:44

  #### Parameters

  - ##### callback: any

  #### Returns void

### Private updatePageType

- updatePageType(pageType: number): number

- - Defined in Page/Page.ts:1346

  Temporary fix to update page types. This will take any page report types and adds 1000 to them. This way can do easier filtering.

  #### Parameters

  - ##### pageType: number

  #### Returns number

### Static create

- create(folderId: number, name: string, type?: number, template?: IPageTemplate, organization_public?: boolean): Promise<IPageService>

- - Defined in Page/Page.ts:429

  Creates new page in the system

  #### Parameters

  - ##### folderId: number

  - ##### name: string

  - ##### Default value type: number = 0

  - ##### Optional template: IPageTemplate

  - ##### Default value organization_public: boolean = false

  #### Returns Promise<IPageService>

## Object literals

### Private _encryptionKeyPull

_encryptionKeyPull: object

- Defined in Page/Page.ts:409

### name

name: string = ""

- Defined in Page/Page.ts:410

### passphrase

passphrase: string = ""

- Defined in Page/Page.ts:411

### Private _encryptionKeyPush

_encryptionKeyPush: object

- Defined in Page/Page.ts:413

### name

name: string = ""

- Defined in Page/Page.ts:414

### passphrase

passphrase: string = ""

- Defined in Page/Page.ts:415

Generated using TypeDoc