# Notification Types — Actions & `itemId`

Classification of `NotificationEnum` values by whether they have an action/destination
and whether they carry an `itemId` (the id of the entity the notification points to).

Source of truth for explicit actions: `src/services/notification/pushNotification.js` → `keys()`.
`itemId` resolution: `src/helpers/returnObject/returnObject.js` → `exports.notification`.

## 1) Has an action — opens a specific entity (needs `itemId`)

All of these are now defined in `keys()` with `action: "click"` and the `field` that
carries the entity id in the notification `data` payload.

| Type | Destination | `field` (id key) |
|------|-------------|------------------|
| `order` ✅ | Order details | `orderId` |
| `returnRequest` ✅ | Return-request details | `returnRequestId` |
| `product` ✅ | Product details | `productId` |
| `auction` ✅ | Auction details | `auctionId` |
| `advertisement` ✅ | Advertisement details | `advertisementId` |
| `advertisementCommissionPaid` ✅ | Advertisement / commission | `advertisementId` |
| `subscription` ✅ | Subscription page/details | `subscriptionId` |
| `complaint` ✅ | Complaint details | `complaint` |
| `settlementDebit` ✅ | Financial debits | `settlementId` |
| `message` ✅ | Chat | `chatId` |

## 2) Has an action — fixed screen (no `itemId`)

- `home` ✅ (`keys()` → `/home`) — Home screen
- `profile` ✅ (`keys()` → `/profile`) — Profile
- `support` ✅ (`keys()` → `/support`) — Support page

## 3) action = "out" / control (no navigation, no `itemId`)

- `phone` ✅ — action `out`
- `block` ✅ — action `out` (also not stored — in `excludedKeys`)
- `delete` ✅ — action `out` (not stored)

## 4) Informational only (no action, no `itemId`)

- `admin` ✅ — message from administration (action `""`)
- `global` ✅ — broadcast notification (action `""`)
- `contact` ✅ — contact-us reply (action `""`)

## 5) Call

- `call` ✅ — action `call`, opens the call screen; carries temporary credentials in
  `field: callCredentialId` (plus `token`/`uid`/`channelName`/`appId`/`expiration` in `data`).

---

## Notes

- The `keys()` map in `pushNotification.js` now covers **every** value of
  `NotificationEnum` (`src/helpers/enums/notification.enum.js`), so the client no longer
  has to fall back to `type`-only handling for untracked notifications.
- `field` values mirror `returnObject.notification → idByType` and the id keys actually
  emitted in the notification payloads (verified against the senders in
  `helpers/api/*` and `helpers/cronJopFn/cronJobFn.js`).
- `service` route strings are **client-app paths**. Entity navigations use an empty
  `service` (the app routes by `type` + `field`/`itemId`, same as the pre-existing
  `message` entry); fixed screens use `/home`, `/profile`, `/support`. Adjust the fixed
  paths if the mobile app expects different route strings.
- `excludedKeys` (never saved to the notification list):
  `block, delete, permission, phone, message, accept, reject, balanceWithdraw`.
