Files
lincodex/api/core/routes/organization_notifications.yml
T

41 lines
2.4 KiB
YAML

get:
operationId: ListOrganizationNotifications
summary: List the inbox of the current employer in one organization.
description: |-
Requires the session cookie of an employer account with a confirmed email and an active membership in `org_id`, whatever its role. The recipient comes from the session and the organization from the path and the membership that the server holds, never from the request. Returns only the items addressed to the caller in this organization, newest delivery first with the identifier as the tie-breaker, with cursor pagination. An item of the same account in another organization, and an item of another member, are never listed. The response is `Cache-Control: no-store`.
Items follow the rules of ListMyNotifications: the inbox stores a reference to the event, an email never blocks an item, and the `content` of every item is resolved from the current source for this recipient on this read. An employer sees content only while the membership is active.
Access: a missing, unknown, expired, or revoked session answers 401 unauthenticated; a candidate account answers 403 forbidden, and an employer account with an unconfirmed email answers 403 email_not_verified; an account without an active membership in the organization and an unknown organization both answer 404 not_found, so organizations cannot be enumerated. A malformed `org_id`, `limit`, or `cursor`, or a cursor of another account or organization, answers 400 validation_failed.
security:
- sessionCookie: []
tags:
- notification
parameters:
- $ref: ../components/parameters.yml#/OrganizationId
- $ref: ../components/parameters.yml#/PageLimit
- $ref: ../components/parameters.yml#/PageCursor
responses:
"200":
description: A page of the inbox of the current employer in the organization.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/NotificationList
examples:
page:
$ref: ../components/examples.yml#/NotificationListPage
"400":
$ref: ../components/responses.yml#/ValidationFailed
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/Forbidden
"404":
$ref: ../components/responses.yml#/NotFound
default:
$ref: ../components/responses.yml#/Problem