-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Notifications adjustments. DeployActions. Docs updates (#25)
- [x] DeployActions interface - [x] Notifications adjustments (receive dynamic parameters to build known subjects) - [ ] Write docs about FileActionsMenu, Notifications --------- Signed-off-by: Alexander Piskun <bigcat88@icloud.com> Co-authored-by: Alexander Piskun <bigcat88@icloud.com>
- Loading branch information
1 parent
9a24411
commit 08b72fe
Showing
14 changed files
with
136 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
=================== | ||
AppEcosystemV2 APIs | ||
=================== | ||
|
||
|
||
.. toctree:: | ||
|
||
notifications |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
============= | ||
Notifications | ||
============= | ||
|
||
AppEcosystemV2 allows ExApps to send limited notifications to users. | ||
ExApp can send simple notification using available `rich object strings <https://github.com/nextcloud/server/blob/master/lib/public/RichObjectStrings/Definitions.php#L42>`_. | ||
More info about rich objects string can be found `here <https://github.com/nextcloud/server/issues/1706>`_. | ||
|
||
Send notification (OCS) | ||
^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
OCS endpoint: ``POST /apps/app_ecosystem_v2/api/v1/notification`` | ||
|
||
Request payload | ||
*************** | ||
|
||
.. code-block:: json | ||
{ | ||
"params": { | ||
"object": "app_ecosystem_v2", | ||
"object_id": "app_ecosystem_v2_id", | ||
"subject_type": "app_ecosystem_v2_ex_app", | ||
"subject_params": { | ||
"rich_subject": "Image {file} successfully upscaled!", | ||
"rich_subject_params": { | ||
"file": { | ||
"type": "file", | ||
"id": 123, | ||
"name": "upscaled_image_name", | ||
"path": "path/to/upscaled_image_name" | ||
} | ||
}, | ||
"rich_message": "{user} checkout results!", | ||
"rich_message_params": { | ||
"user": { | ||
"type": "user", | ||
"id": "admin", | ||
"name": "admin" | ||
} | ||
}, | ||
"link": "http(s)://nextcloud.local/index.php/apps/files/?fileid=123" | ||
} | ||
} | ||
} | ||
Params | ||
^^^^^^ | ||
|
||
Required payload params: | ||
|
||
* ``object`` - ``[required]`` should be set to default value, not used yet | ||
* ``object_id`` - ``[required]`` should be set to default value, not used yet | ||
* ``subject_type`` - ``[required]`` subject type should be set to default value, not used yet | ||
* ``subject_params`` - ``[required]`` | ||
* ``rich_subject`` - ``[optional]`` rich subject (title) string | ||
* ``rich_subject_params`` - ``[optional]`` rich subject (title) params to replace rich objects in string | ||
* ``rich_message`` - ``[optional]`` rich message string | ||
* ``rich_message_params`` - ``[optional`` rich message params to replace objects in string | ||
* ``link`` - absolute url to set for notification link |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.