feat(#21): Replaced chat comment component with proper cursor-based commenting
This commit is contained in:
@@ -646,13 +646,67 @@ paths:
|
||||
operationId: getCommentsByApplicationFormId
|
||||
tags:
|
||||
- comment
|
||||
parameters:
|
||||
- in: query
|
||||
name: formElementId
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
description: If provided, only comments for this form element are returned.
|
||||
- in: query
|
||||
name: cursorCreatedAt
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
format: date-time
|
||||
description: Cursor for pagination (createdAt of the last received comment). When omitted, returns the first page.
|
||||
- in: query
|
||||
name: limit
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
format: int32
|
||||
default: 10
|
||||
minimum: 1
|
||||
maximum: 50
|
||||
description: Number of comments to return.
|
||||
responses:
|
||||
"200":
|
||||
description: Get comments for application form ID
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/PagedCommentDto"
|
||||
$ref: "#/components/schemas/CursorPagedCommentDto"
|
||||
"400":
|
||||
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/BadRequest"
|
||||
"401":
|
||||
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/Unauthorized"
|
||||
"500":
|
||||
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServerError"
|
||||
"503":
|
||||
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServiceUnavailable"
|
||||
|
||||
/application-forms/{applicationFormId}/comments/counts:
|
||||
parameters:
|
||||
- name: applicationFormId
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
get:
|
||||
summary: Get comment counts grouped by form element for an application form
|
||||
operationId: getGroupedCommentCountByApplicationFromId
|
||||
tags:
|
||||
- comment
|
||||
responses:
|
||||
"200":
|
||||
description: Map of formElementId to comment count
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ApplicationFormCommentCountsDto"
|
||||
"400":
|
||||
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/BadRequest"
|
||||
"401":
|
||||
@@ -1132,6 +1186,12 @@ components:
|
||||
allOf:
|
||||
- $ref: "#/components/schemas/ApplicationFormStatus"
|
||||
nullable: true
|
||||
commentCount:
|
||||
type: integer
|
||||
format: int64
|
||||
nullable: true
|
||||
readOnly: true
|
||||
description: Total number of comments associated with this application form.
|
||||
|
||||
PagedApplicationFormDto:
|
||||
type: object
|
||||
@@ -1571,17 +1631,36 @@ components:
|
||||
message:
|
||||
type: string
|
||||
|
||||
PagedCommentDto:
|
||||
CursorPagedCommentDto:
|
||||
type: object
|
||||
allOf:
|
||||
- $ref: "#/components/schemas/Page"
|
||||
required:
|
||||
- content
|
||||
- hasMore
|
||||
properties:
|
||||
content:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/CommentDto"
|
||||
nextCursorCreatedAt:
|
||||
type: string
|
||||
format: date-time
|
||||
nullable: true
|
||||
description: Cursor to fetch the next page (createdAt of the last item in this page). Null when no more pages.
|
||||
hasMore:
|
||||
type: boolean
|
||||
description: Whether more comments exist after this page.
|
||||
|
||||
ApplicationFormCommentCountsDto:
|
||||
type: object
|
||||
required:
|
||||
- counts
|
||||
properties:
|
||||
counts:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: integer
|
||||
format: int64
|
||||
description: Keys are formElementId (UUID), values are comment counts.
|
||||
|
||||
####### RoleDto #######
|
||||
RoleDto:
|
||||
|
||||
Reference in New Issue
Block a user