Добавлены уведомления
This commit is contained in:
@@ -179,6 +179,168 @@ paths:
|
||||
security: [{bearerAuth: []}]
|
||||
responses:
|
||||
"200": {description: Audited short-lived presigned GET}
|
||||
/api/v1/public/notifications:
|
||||
get:
|
||||
operationId: listGuestNotifications
|
||||
responses:
|
||||
"200":
|
||||
description: Server-sorted active guest campaigns
|
||||
content:
|
||||
application/json:
|
||||
schema: {$ref: "#/components/schemas/NotificationList"}
|
||||
/api/v1/public/notification-types:
|
||||
get:
|
||||
operationId: getNotificationCatalog
|
||||
parameters:
|
||||
- {name: If-None-Match, in: header, schema: {type: string}}
|
||||
responses:
|
||||
"200": {description: Public catalog with ETag}
|
||||
"304": {description: Catalog is unchanged}
|
||||
/api/v1/notifications:
|
||||
get:
|
||||
operationId: listNotifications
|
||||
security: [{bearerAuth: []}]
|
||||
parameters:
|
||||
- {name: place, in: query, required: true, schema: {type: string, enum: [home, center]}}
|
||||
responses:
|
||||
"200":
|
||||
description: Server-sorted personal notifications
|
||||
content:
|
||||
application/json:
|
||||
schema: {$ref: "#/components/schemas/NotificationList"}
|
||||
/api/v1/notifications/counter:
|
||||
get:
|
||||
operationId: getNotificationCounter
|
||||
security: [{bearerAuth: []}]
|
||||
responses:
|
||||
"200":
|
||||
description: Unread count in the center window
|
||||
content:
|
||||
application/json:
|
||||
schema: {$ref: "#/components/schemas/NotificationCounter"}
|
||||
/api/v1/notifications/{notification_id}:
|
||||
parameters:
|
||||
- {$ref: "#/components/parameters/NotificationId"}
|
||||
get:
|
||||
operationId: getNotification
|
||||
security: [{bearerAuth: []}]
|
||||
responses:
|
||||
"200": {description: Active notification detail}
|
||||
"404": {$ref: "#/components/responses/NotFound"}
|
||||
/api/v1/notifications/{notification_id}/read:
|
||||
parameters:
|
||||
- {$ref: "#/components/parameters/NotificationId"}
|
||||
post:
|
||||
operationId: readNotification
|
||||
security: [{bearerAuth: []}]
|
||||
responses:
|
||||
"200": {description: Current notification state}
|
||||
"409": {$ref: "#/components/responses/Conflict"}
|
||||
/api/v1/notifications/{notification_id}/hide:
|
||||
parameters:
|
||||
- {$ref: "#/components/parameters/NotificationId"}
|
||||
post:
|
||||
operationId: hideNotification
|
||||
security: [{bearerAuth: []}]
|
||||
responses:
|
||||
"200": {description: Current notification state}
|
||||
"409": {$ref: "#/components/responses/Conflict"}
|
||||
/api/v1/notifications/{notification_id}/buttons/{button_code}:
|
||||
parameters:
|
||||
- {$ref: "#/components/parameters/NotificationId"}
|
||||
- {name: button_code, in: path, required: true, schema: {type: string}}
|
||||
post:
|
||||
operationId: pressNotificationButton
|
||||
security: [{bearerAuth: []}]
|
||||
responses:
|
||||
"200": {description: Current notification state}
|
||||
"409": {$ref: "#/components/responses/Conflict"}
|
||||
"422": {$ref: "#/components/responses/Unprocessable"}
|
||||
/api/v1/notifications/{notification_id}/cta:
|
||||
parameters:
|
||||
- {$ref: "#/components/parameters/NotificationId"}
|
||||
post:
|
||||
operationId: invokeNotificationCta
|
||||
security: [{bearerAuth: []}]
|
||||
responses:
|
||||
"200": {description: CTA result and current state}
|
||||
"409": {$ref: "#/components/responses/Conflict"}
|
||||
/api/v1/notifications/{notification_id}/documents/{document_id}/download-url:
|
||||
parameters:
|
||||
- {$ref: "#/components/parameters/NotificationId"}
|
||||
- {$ref: "#/components/parameters/DocumentId"}
|
||||
get:
|
||||
operationId: getNotificationDocumentDownloadUrl
|
||||
security: [{bearerAuth: []}]
|
||||
responses:
|
||||
"200": {description: Audited short-lived presigned GET}
|
||||
"404": {$ref: "#/components/responses/NotFound"}
|
||||
/api/v1/uploads/init:
|
||||
post:
|
||||
operationId: initClientUpload
|
||||
security: [{bearerAuth: []}]
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema: {$ref: "#/components/schemas/UploadInitRequest"}
|
||||
responses:
|
||||
"201": {description: Upload draft and presigned PUT}
|
||||
/api/v1/uploads/{draft_id}/complete:
|
||||
parameters:
|
||||
- {$ref: "#/components/parameters/DraftId"}
|
||||
post:
|
||||
operationId: completeClientUpload
|
||||
security: [{bearerAuth: []}]
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema: {$ref: "#/components/schemas/ChecksumRequest"}
|
||||
responses:
|
||||
"200": {description: Current scan state}
|
||||
/api/v1/uploads:
|
||||
get:
|
||||
operationId: listClientUploads
|
||||
security: [{bearerAuth: []}]
|
||||
parameters:
|
||||
- {name: context_type, in: query, required: true, schema: {type: string, enum: [notification]}}
|
||||
- {name: context_id, in: query, required: true, schema: {type: string, format: uuid}}
|
||||
responses:
|
||||
"200": {description: Upload drafts for context}
|
||||
/api/v1/uploads/{draft_id}:
|
||||
parameters:
|
||||
- {$ref: "#/components/parameters/DraftId"}
|
||||
delete:
|
||||
operationId: deleteClientUpload
|
||||
security: [{bearerAuth: []}]
|
||||
responses:
|
||||
"204": {description: Draft discarded}
|
||||
/internal/notifications/v1/notifications:
|
||||
post:
|
||||
operationId: createNotification
|
||||
security: [{serviceBearer: []}]
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema: {$ref: "#/components/schemas/NotificationCreateRequest"}
|
||||
responses:
|
||||
"200": {description: Idempotent duplicate}
|
||||
"201": {description: Notification created}
|
||||
"409": {$ref: "#/components/responses/Conflict"}
|
||||
/internal/notifications/v1/notifications/cancel:
|
||||
post:
|
||||
operationId: cancelNotification
|
||||
security: [{serviceBearer: []}]
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema: {$ref: "#/components/schemas/NotificationCancelRequest"}
|
||||
responses:
|
||||
"200": {description: Notification closed or already closed}
|
||||
"404": {$ref: "#/components/responses/NotFound"}
|
||||
/internal/openlines/v1/inbox:
|
||||
post:
|
||||
operationId: applyOpenLinesInbox
|
||||
@@ -211,6 +373,8 @@ components:
|
||||
DialogId: {name: dialog_id, in: path, required: true, schema: {type: string, format: uuid}}
|
||||
AttachmentId: {name: attachment_id, in: path, required: true, schema: {type: string, format: uuid}}
|
||||
DocumentId: {name: document_id, in: path, required: true, schema: {type: string, format: uuid}}
|
||||
NotificationId: {name: notification_id, in: path, required: true, schema: {type: string, format: uuid}}
|
||||
DraftId: {name: draft_id, in: path, required: true, schema: {type: string, format: uuid}}
|
||||
IdempotencyKey: {name: Idempotency-Key, in: header, required: true, schema: {type: string, minLength: 1, maxLength: 128}}
|
||||
responses:
|
||||
Unauthorized:
|
||||
@@ -222,6 +386,12 @@ components:
|
||||
DependencyUnavailable:
|
||||
description: Required dependency is unavailable
|
||||
content: {application/json: {schema: {$ref: "#/components/schemas/ErrorEnvelope"}}}
|
||||
Conflict:
|
||||
description: Notification state or idempotency conflict
|
||||
content: {application/json: {schema: {$ref: "#/components/schemas/ErrorEnvelope"}}}
|
||||
Unprocessable:
|
||||
description: Catalog action is not allowed
|
||||
content: {application/json: {schema: {$ref: "#/components/schemas/ErrorEnvelope"}}}
|
||||
schemas:
|
||||
OtpSettingsResponse:
|
||||
type: object
|
||||
@@ -256,6 +426,72 @@ components:
|
||||
message: {type: string}
|
||||
request_id: {type: string}
|
||||
details: {type: object}
|
||||
NotificationCounter:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
required: [unread_count]
|
||||
properties:
|
||||
unread_count: {type: integer, minimum: 0}
|
||||
NotificationList:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
required: [items]
|
||||
properties:
|
||||
items:
|
||||
type: array
|
||||
items: {$ref: "#/components/schemas/Notification"}
|
||||
Notification:
|
||||
type: object
|
||||
required: [id, notification_type, notification_datetime, header]
|
||||
properties:
|
||||
id: {type: string, format: uuid}
|
||||
notification_type: {type: string}
|
||||
notification_datetime: {type: string, format: date-time}
|
||||
header: {type: string}
|
||||
text: {type: [string, "null"]}
|
||||
instruction_url: {type: [string, "null"], format: uri}
|
||||
instruction_open_mode: {type: [string, "null"], enum: [new_tab, null]}
|
||||
lifecycle_status: {type: string, enum: [active, closed]}
|
||||
visibility: {type: string, enum: [visible, hidden]}
|
||||
is_read: {type: boolean}
|
||||
details: {type: [object, "null"]}
|
||||
NotificationCreateRequest:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
required: [user_id, notification_type, source, external_id, notification_datetime, header]
|
||||
properties:
|
||||
user_id: {type: string, format: uuid}
|
||||
notification_type: {type: string, maxLength: 32}
|
||||
source: {type: string, maxLength: 32}
|
||||
external_id: {type: string, maxLength: 128}
|
||||
notification_datetime: {type: string, format: date-time}
|
||||
header: {type: string, maxLength: 255}
|
||||
text: {type: [string, "null"], maxLength: 1024}
|
||||
priority_override: {type: [integer, "null"]}
|
||||
date_expired: {type: [string, "null"], format: date-time}
|
||||
price: {type: [number, "null"]}
|
||||
old_price: {type: [number, "null"]}
|
||||
payment_url: {type: [string, "null"], format: uri}
|
||||
chat_message_text: {type: [string, "null"], maxLength: 1024}
|
||||
details: {type: [object, "null"]}
|
||||
NotificationCancelRequest:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
required: [source, external_id, close_reason]
|
||||
properties:
|
||||
source: {type: string}
|
||||
external_id: {type: string}
|
||||
close_reason: {type: string, enum: [cancelled, paid]}
|
||||
UploadInitRequest:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
required: [context_type, context_id, file_name, mime_type, size_bytes]
|
||||
properties:
|
||||
context_type: {const: notification}
|
||||
context_id: {type: string, format: uuid}
|
||||
file_name: {type: string, maxLength: 255}
|
||||
mime_type: {type: string, maxLength: 128}
|
||||
size_bytes: {type: integer, minimum: 1}
|
||||
ConsentChoice:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
|
||||
Reference in New Issue
Block a user