External
========

.. _ExternalRoot:

ExternalRoot
------------

Used as a root for all items pointing to external resources

.. code-block:: json

 message ExternalRoot {
  string id = 1;
  string dataroom_id = 2;
  string name = 3;
  string title = 4;
  string parent_id = 5;
  ItemType item_type = 6;
  google.protobuf.Timestamp creation_date = 10;
  google.protobuf.Timestamp modification_date = 11;
  EffectivePermission effective_permission = 14;
 }

+--------------------------+-------------------------------+-------------+
|  Field                   | Type                          | Description |
+==========================+===============================+=============+
| ``id``                   | ``string``                    |             |
+--------------------------+-------------------------------+-------------+
| ``dataroom_id``          | ``string``                    |             |
+--------------------------+-------------------------------+-------------+
| ``name``                 | ``string``                    |             |
+--------------------------+-------------------------------+-------------+
| ``title``                | ``string``                    |             |
+--------------------------+-------------------------------+-------------+
| ``parent_id``            | ``string``                    |             |
+--------------------------+-------------------------------+-------------+
| ``item_type``            | ``ItemType``                  |             |
+--------------------------+-------------------------------+-------------+
| ``creation_date``        | ``google.protobuf.Timestamp`` |             |
+--------------------------+-------------------------------+-------------+
| ``modification_date``    | ``google.protobuf.Timestamp`` |             |
+--------------------------+-------------------------------+-------------+
| ``effective_permission`` | ``EffectivePermission``       |             |
+--------------------------+-------------------------------+-------------+

.. _ExternalItem:

ExternalItem
------------

Represent items that exists outside of postgres

.. code-block:: json

 message ExternalItem {
  string id = 1;
  string dataroom_id = 2;
  string parent_id = 3;
  ItemType item_type = 5;
  EffectivePermission effective_permission = 6;
  string name = 7;
  string title = 8;
  string external_id = 9;
  ExternalType external_type = 10;

  map<uint32, uint32> sum_children = 11;
  map<uint32, uint32> sum_decendents = 12;

  google.protobuf.Timestamp creation_date = 13;
  google.protobuf.Timestamp modification_date = 14;
  optional bool has_comments = 15;
 }

+--------------------------+-------------------------------+--------------+
|  Field                   | Type                          | Description  |
+==========================+===============================+==============+
| ``id``                   | ``string``                    |              |
+--------------------------+-------------------------------+--------------+
| ``dataroom_id``          | ``string``                    |              |
+--------------------------+-------------------------------+--------------+
| ``parent_id``            | ``string``                    |              |
+--------------------------+-------------------------------+--------------+
| ``item_type``            | ``ItemType``                  |              |
+--------------------------+-------------------------------+--------------+
| ``effective_permission`` | ``EffectivePermission``       |              |
+--------------------------+-------------------------------+--------------+
| ``name``                 | ``string``                    |              |
+--------------------------+-------------------------------+--------------+
| ``title``                | ``string``                    |              |
+--------------------------+-------------------------------+--------------+
| ``external_id``          | ``string``                    |              |
+--------------------------+-------------------------------+--------------+
| ``external_type``        | ``ExternalType``              |              |
+--------------------------+-------------------------------+--------------+
| ``sum_children``         | ``map<uint32, uint32>``       |              |
+--------------------------+-------------------------------+--------------+
| ``sum_decendents``       | ``map<uint32, uint32>``       |              |
+--------------------------+-------------------------------+--------------+
| ``creation_date``        | ``google.protobuf.Timestamp`` |              |
+--------------------------+-------------------------------+--------------+
| ``modification_date``    | ``google.protobuf.Timestamp`` |              |
+--------------------------+-------------------------------+--------------+
| ``has_comments``         | ``bool``                      | **Optional** |
+--------------------------+-------------------------------+--------------+