# Classes

##

### Classes

AddOnBase
AddOnUpdateResult
Artifact
BlobClient
BlobMetadata
BlobRunPluginClient
Client
Core
ExecutorClient
GmeLogger
GMENode
InterPluginResult
JobInfo
OutputInfo
PluginBase
PluginConfig
PluginMessage
PluginNodeDescription
PluginResult
Project
ProjectInterface
GMEAuth
SafeStorage
UserProject
WebsocketRouter
WebsocketRouterUser

### Events

#### BRANCH_CHANGED

  Fired when the open branch changed. The event could either return the name of the newly opened branch or null if there no longer is a branch opened.

  ##### Type: string | null

#### BRANCH_CLOSED

  Fired when the currently opened branch is closed.

  ##### Type: string

#### BRANCH_OPENED

  Fired when a branch is opened.

  ##### Type: string

#### BRANCH_STATUS_CHANGED

  Fired when the branch status changes. The returned value is one of:

  - `'SYNC'` - The local branch is in sync with the server.
  - `'AHEAD_SYNC'` - There are changes in the local branch that has not been sent to the server. The latest commit was synchronized.
  - `'AHEAD_NOT_SYNC'` - There are changes in the local branch that has not been sent to the server. The latest commit did not update the branch head. An action is required.
  - `'PULLING'` - External changes to the branch are being pulled into the branch.
  - `'ERROR'` - Some unexpected error happened.
  - (`'MERGING'` - a forked commit is attempted to be merged by the server (this is disabled by default))

  ##### Type: object

#### CONNECTED_USERS_CHANGED

  Fired when there are changes among the users connected to the same branch-room (have the same project and branch opened).

  ##### Type: object

  ##### Properties:

  Name | Type | Argument | Description
  --- | --- | --- | ---
  `type` | string |  | 'BRANCH_ROOM_SOCKETS', 'CLIENT_STATE_NOTIFICATION'
  `projectId` | string |  | The id of the project
  `branchName` | string |  | The name of the branch
  `userId` | string |  | The user-id of the user who joined or left
  `socketId` | string |  | The unique socket-id of the user who joined or left (this can become hashed)
  `join` | boolean | undefined | <optional> | Whether or not the user joined or left the room (undefined -> false) this only applies to the 'BRANCH_ROOM_SOCKETS' event.
  `state` | object | null | <optional> | This only applies to the 'CLIENT_STATE_NOTIFICATION' event and is defined by the return value of the function passed in at client.registerUIStateGetter. Behind the scenes this emitted by the client when it receives a 'BRANCH_ROOM_SOCKETS' event in order to notify that new client that it has a user in the same room. But can also be emitted from the GUI by invoking client.emitStateNotification() (which is invoked by the generic webgme UI whenever its state changes). The state in the example below is specific for the generic webgme UI.

  ##### Examples

      {
        "type": "CLIENT_STATE_NOTIFICATION",
        "state": {
          "activeAspect": "All",
          "activeTab": 0,
          "layout": "DefaultLayout",
          "activeVisualizer": "ModelEditor",
          "activeProjectName": "demo+SignalFlowSystem",
          "activeBranchName": "master",
          "activeCommit": null,
          "_toBeActiveObject": "/682825457/607500954",
          "activeObject": "/682825457/607500954",
          "activeSelection": [
            "/682825457/607500954"
          ]
        },
        "projectId": "demo+SignalFlowSystem",
        "branchName": "master",
        "userId": "demo",
        "socketId": "nczll3cDYPfoK7IeAAAT"
      }

      {
        "projectId": "demo+SignalFlowSystem",
        "branchName": "master",
        "userId": "demo",
        "socketId": "nczll3cDYPfoK7IeAAAT",
        "type": "BRANCH_ROOM_SOCKETS",
        "join": true
      }

#### NETWORK_STATUS_CHANGED

  Fired when the network status changes. The returned value is one of:

  - `'CONNECTED'` - The websocket connection has been established (a project can be selected)
  - `'DISCONNECTED'` - The websocket connection is broken, the user can continue offline and any commits will be pushed automatically by the client when reconnected.
  - `'RECONNECTED'` - After a disconnect, the connection has been established again.
  - `'INCOMPATIBLE_CONNECTION'` - If the version of webgme-engine the server is different from the one loaded in the client at this point the browser must be refreshed.
  - `'CONNECTION_ERROR'` - Some unexpected error happened and the browser needs to be refreshed.

  ##### Type: string

#### NOTIFICATION

  A notification with a message to the end-user. Could be generated by plugins or add-ons, but also by GUI widgets.

  ##### Type: object

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `message` | string | The content of the message.
  `severity` | string | One of 'success', 'info', 'warn', 'error'

#### PLUGIN_FINISHED

  Fired when the execution of a plugin - initiated by this given client - finished. The event data contains information about the executed plugin.

  ##### Type: object

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `id` | string | the id of the plugin
  `name` | string | the name of the plugin
  `executionId` | string | unique identifier that can be used for managing the execution and communicating with the running plugin
  `metadata` | object | the original metadata of the plugin
  `context` | object | the context of the plugin that has information about the project, active object, and configuration settings for the run
  `canBeAborted` | boolean | flag that show if the plugin can be aborted
  `start` | string | the exact time of the initiation of the plugin
  `clientSide` | boolean | flag showing if the execution is done on the client or the server side
  `result` | object | the result of the plugin - once it became available

#### PLUGIN_INITIATED

  Fired when the client initiates a plugin execution. The event data contains information about the executed plugin.

  ##### Type: object

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `id` | string | the id of the plugin
  `name` | string | the name of the plugin
  `executionId` | string | unique identifier that can be used for managing the execution and communicating with the running plugin
  `metadata` | object | the original metadata of the plugin
  `context` | object | the context of the plugin that has information about the project, active object, and configuration settings for the run
  `canBeAborted` | boolean | flag that show if the plugin can be aborted
  `start` | string | the exact time of the initiation of the plugin
  `clientSide` | boolean | flag showing if the execution is done on the client or the server side
  `result` | object | the result of the plugin - once it became available

#### PLUGIN_NOTIFICATION

  Fired when the plugin sends a notification to the initiating client. The event data contains information about the executed plugin.

  ##### Type: object

  ##### Properties:

  Name | Type | Argument | Description
  --- | --- | --- | ---
  `pluginId` | string |  | the id of the plugin
  `pluginName` | string |  | the name of the plugin
  `pluginVersion` | string |  | the version of the plugin normally in the form of x.y.z
  `executionId` | string |  | unique identifier that can be used for managing the execution and communicating with the running plugin
  `projectId` | string |  | the id of the project context the plugin uses
  `branchName` | string | <optional> | the name of the branch the plugin runs in.
  `commitHash` | string | <optional> | the hash of the commit that represent the version that the plugin runs at.
  `notification` | object |  | the content of the notification, as the plugin control the content there are no mandatory fields ###### Properties
  Name | Type | Argument | Description
  --- | --- | --- | ---
  `message` | string | <optional> | the text content of the notification
  `severity` | string | <optional> | the severity of the notification ('debug', 'info' (default), 'warning', 'error').
  `type` | string |  | the exact type of the notification which should always be 'PLUGIN_NOTIFICATION'.

#### PROJECT_CLOSED

  Fired when the currently opened project is closed.

  ##### Type: string

#### PROJECT_OPENED

  Fired when a project is opened.

  ##### Type: string

#### Search results