Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 64 additions & 11 deletions docs/api/notification_channels.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,27 @@

### Available notification types

- [`Ibexa\Contracts\FormBuilder\Notifications\FormSubmitted`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-FormBuilder-Notifications-FormSubmitted.html)
- [`Ibexa\Contracts\Notifications\SystemNotification\SystemNotification`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Notifications-SystemNotification-SystemNotification.html)
- [`Ibexa\Contracts\OrderManagement\Notification\OrderStatusChange`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-OrderManagement-Notification-OrderStatusChange.html)
- [`Ibexa\Contracts\Payment\Notification\PaymentStatusChange`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Payment-Notification-PaymentStatusChange.html)
- [`Ibexa\Contracts\Shipping\Notification\ShipmentStatusChange`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Shipping-Notification-ShipmentStatusChange.html)
- [`Ibexa\Contracts\User\Notification\UserInvitation`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-User-Notification-UserInvitation.html)
- [`Ibexa\Contracts\User\Notification\UserPasswordReset`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-User-Notification-UserPasswordReset.html)
- [`Ibexa\Contracts\User\Notification\UserRegister`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-User-Notification-UserRegister.html)
- `Ibexa\Share\Notification\ContentEditInvitationNotification`
- `Ibexa\Share\Notification\ContentViewInvitationNotification`
- `Ibexa\Share\Notification\ExternalParticipantContentViewInvitationNotification`
Several built-in notification types are available.
TODO: Some/All are sent by various notifiers like event subscribers.

Check failure on line 37 in docs/api/notification_channels.md

View workflow job for this annotation

GitHub Actions / markdownlint

Trailing spaces

docs/api/notification_channels.md:37:69 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md009.md

Check notice on line 37 in docs/api/notification_channels.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/api/notification_channels.md#L37

[Ibexa.Passive] Try to avoid passive tense, when possible.
Raw output
{"message": "[Ibexa.Passive] Try to avoid passive tense, when possible.", "location": {"path": "docs/api/notification_channels.md", "range": {"start": {"line": 37, "column": 16}}}, "severity": "INFO"}

Check warning on line 37 in docs/api/notification_channels.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/api/notification_channels.md#L37

[Ibexa.EOLWhitespace] Remove whitespace characters from the end of the line.
Raw output
{"message": "[Ibexa.EOLWhitespace] Remove whitespace characters from the end of the line.", "location": {"path": "docs/api/notification_channels.md", "range": {"start": {"line": 37, "column": 69}}}, "severity": "WARNING"}

| Notification type | Default recipients |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------|
| `Ibexa\AdminUi\Notifier\Notification\UserInvitation` | TODO: Given email address |
| `Ibexa\AdminUi\Notifier\Notification\UserPasswordReset` | TODO: Given email address |
| [`Ibexa\Contracts\FormBuilder\Notifications\FormSubmitted`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-FormBuilder-Notifications-FormSubmitted.html) | [Form submit email notification field](customize_email_notifications.md) |
| [`Ibexa\Contracts\Notifications\SystemNotification\SystemNotification`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Notifications-SystemNotification-SystemNotification.html) | TODO |
| [`Ibexa\Contracts\OrderManagement\Notification\OrderStatusChange`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-OrderManagement-Notification-OrderStatusChange.html) | Order owner |
| [`Ibexa\Contracts\Payment\Notification\PaymentStatusChange`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Payment-Notification-PaymentStatusChange.html) | Order owner |
| [`Ibexa\Contracts\Shipping\Notification\ShipmentStatusChange`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Shipping-Notification-ShipmentStatusChange.html) | Order owner |
| [`Ibexa\Contracts\User\Notification\UserInvitation`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-User-Notification-UserInvitation.html) | TODO: Given email address |
| [`Ibexa\Contracts\User\Notification\UserPasswordReset`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-User-Notification-UserPasswordReset.html) | TODO: Given email address |
| [`Ibexa\Contracts\User\Notification\UserRegister`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-User-Notification-UserRegister.html) | TODO |
| `Ibexa\Share\Notification\ContentEditInvitationNotification`<br>(alias `ibexa_content_edit_invitation`) | TODO: Given users |
| `Ibexa\Share\Notification\ContentViewInvitationNotification`<br>(alias `ibexa_content_view_invitation`) | TODO: Given users |
| `Ibexa\Share\Notification\ExternalParticipantContentViewInvitationNotification`<br>(alias `ibexa_external_participant_content_view_invitation`) | TODO: Given email addresses |

Notice that `Ibexa\AdminUi\Notifier\Notification\UserInvitation` are sent by the back office and don't implement `Ibexa\Contracts\User\Notification\UserInvitation` which is made for front end users and other more generic usages.

Check notice on line 55 in docs/api/notification_channels.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/api/notification_channels.md#L55

[Ibexa.Passive] Try to avoid passive tense, when possible.
Raw output
{"message": "[Ibexa.Passive] Try to avoid passive tense, when possible.", "location": {"path": "docs/api/notification_channels.md", "range": {"start": {"line": 55, "column": 66}}}, "severity": "INFO"}
Same for the two `UserPasswordReset` in distinct namespaces.

### Available notification channels

Expand Down Expand Up @@ -79,6 +89,49 @@
php bin/console ibexa:debug:config notifications.subscriptions --siteaccess=<siteaccess>
```

For example, the following command returns the subscription for the `admin` siteaccess.
You should see subscriptions to handle back office password reset and user invitation, and the share invitations through, at least, `email`.

```bash
php bin/console ibexa:debug:config notifications.subscriptions --siteaccess=admin --json | jq
```
```json
{
"ibexa_content_edit_invitation": {
"channels": [
"ibexa",
"email"
]
},
"ibexa_content_view_invitation": {
"channels": [
"ibexa",
"email"
]
},
"ibexa_external_participant_content_view_invitation": {
"channels": [
"email"
]
},
"Ibexa\\AdminUi\\Notifier\\Notification\\UserPasswordReset": {
"channels": [
"email"
]
},
"Ibexa\\AdminUi\\Notifier\\Notification\\UserInvitation": {
"channels": [
"email"
]
},
"Ibexa\\Contracts\\FormBuilder\\Notifications\\FormSubmitted": {
"channels": [
"email"
]
}
}
```
Comment on lines +95 to +133

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could expose the default result. --json | jq is optional, it rturn unformmated but readable JSON by default. I don't know what to do with FormSubmitted from ibexa/recipes-dev#257
It seems not immediately needed but it could be needed in the rare case someone use the form builder for an admin form.

Suggested change
```bash
php bin/console ibexa:debug:config notifications.subscriptions --siteaccess=admin
```
```bash
php bin/console ibexa:debug:config notifications.subscriptions --siteaccess=admin --json | jq
```
```json
{
"ibexa_content_edit_invitation": {
"channels": [
"ibexa",
"email"
]
},
"ibexa_content_view_invitation": {
"channels": [
"ibexa",
"email"
]
},
"ibexa_external_participant_content_view_invitation": {
"channels": [
"email"
]
},
"Ibexa\\AdminUi\\Notifier\\Notification\\UserPasswordReset": {
"channels": [
"email"
]
},
"Ibexa\\AdminUi\\Notifier\\Notification\\UserInvitation": {
"channels": [
"email"
]
},
"Ibexa\\Contracts\\FormBuilder\\Notifications\\FormSubmitted": {
"channels": [
"email"
]
}
}
```


#### Subscription example

The following example shows how you can deliver notifications about Commerce-related activities through Slack:
Expand Down
Loading