-
Notifications
You must be signed in to change notification settings - Fork 97
Events reference
Global events internally used by the app
Fired when some element requests requests to be deleted.
If any component handle this request it will return a result
property in the event's details object. It's a promise that will resolve itself when the database operation succeed or reject if fails.
If any required parameter is not set then the details object will result with error
set to true
and message
property with the error message.
This operation will trigger request-object-deleted
event.
Property name | Property type | Description |
---|---|---|
dbName |
String | Name of the data store to perform an operation on. |
id |
String | The id of the object |
rev |
String | The revision id. It can be obtained by querying the PouchDB for this object. |
this.fire('request-object-delete', {
dbName: 'saved-requests',
id: doc._id,
rev: doc._rev
});
Fired when the request has been removed from the data store.
Property name | Property type | Description |
---|---|---|
id |
String | Id of the removed item. |
oldRev |
String | The rev property before the delete. If can be used to read previous value. |
Similar to request-object-deleted
but it's fired when the bulk operation took place.
Property name | Property type | Description |
---|---|---|
items |
Array | Array of responses to PounchDB delete operation. It will contain an id and new rev . |
type |
String | Can be one of saved , history and external
|
Opposite to the request-objects-deleted
event. It's fired when the requests has been restored from deletion.
Property name | Property type | Description |
---|---|---|
items |
Array | Array of PounchDB docs. It will have updated rev property. |
type |
String | Can be one of saved , history and external
|
Fired when some element requested to change name of the request.
If any component handle this request it will return a result
property in the event's details object. It's a promise that will resolve itself when the database operation succeed or reject if fails.
If any required parameter is not set then the details object will result with error
set to true
and message
property with the error message.
This operation will trigger request-object-changed
event.
Property name | Property type | Description |
---|---|---|
dbName |
String | Name of the data store to perform an operation on. |
name |
String | New name of the object |
request |
Object | Full request object (with rev and id ). It's optional if id property is set |
id |
String | Id of the request. It's optional if the request property is set. When using id it will override newest version of the document in the data store |
Fired when some element requested to change a request.
If any component handle this request it will return a result
property in the event's details object. It's a promise that will resolve itself when the database operation succeed or reject if fails.
If any required parameter is not set then the details object will result with error
set to true
and message
property with the error message.
This operation will trigger request-object-changed
event.
Property name | Property type | Description |
---|---|---|
dbName |
String | Name of the data store to perform an operation on. |
request |
Object | Full request object (with rev and id ). |
Event fired when the request has been changed and changes has been saved in the data store.
Property name | Property type | Description |
---|---|---|
oldRev |
String | The rev before the change. |
request |
Object | Updated request object. It will contain updated rev property. |
Fired when the data store of the requests has been cleared from all entries. Practically the data store has been removed.
Property name | Property type | Description |
---|---|---|
type |
String | Can be one of saved , history and external
|
Fired when any component requested open a file from the Google Drive.
This event do not require any details.
Fired when the name of the project has changed.
Property name | Property type | Description |
---|---|---|
projectId |
String | The ID of the project |
name |
String | New name |
project |
Object | The project object |