| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416 |
- openapi: 3.1.0
- x-stoplight:
- id: okoe8mh50pjec
- info:
- title: chat
- version: '1.0'
- servers:
- - url: 'http://chat:3010'
- x-exegesis-controller: messagesController
- paths:
- '/project/{projectId}/messages':
- parameters:
- - schema:
- type: string
- name: projectId
- in: path
- required: true
- get:
- summary: Get Global messages
- tags: []
- responses:
- '201':
- description: OK
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/Message'
- operationId: getGlobalMessages
- description: Get global messages for the project with Project ID provided
- parameters:
- - schema:
- type: string
- in: query
- name: before
- - schema:
- type: string
- in: query
- name: limit
- post:
- summary: Send Global message
- operationId: sendGlobalMessage
- responses:
- '201':
- description: OK
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Message'
- examples:
- example-1:
- value:
- user_id: string
- content: string
- description: 'UserID and Content of the message to be posted. '
- description: Send global message for the project with Project ID provided
- '/project/{projectId}/thread/{threadId}/messages':
- parameters:
- - schema:
- type: string
- name: projectId
- in: path
- required: true
- - schema:
- type: string
- name: threadId
- in: path
- required: true
- post:
- summary: Send message
- operationId: sendMessage
- responses:
- '201':
- description: Created
- description: Add a message to the thread with thread ID provided from the Project with Project ID provided.
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Message'
- description: |-
- JSON object with :
- - user_id: Id of the user
- - content: Content of the message
- '/project/{projectId}/threads':
- parameters:
- - schema:
- type: string
- name: projectId
- in: path
- required: true
- get:
- summary: Get Threads
- tags: []
- responses:
- '200':
- description: OK
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/Thread'
- examples: {}
- '404':
- description: Not Found
- operationId: getThreads
- description: Get the list of threads for the project with Project ID provided
- '/project/{projectId}/thread/{threadId}/messages/{messageId}/edit':
- parameters:
- - schema:
- type: string
- name: projectId
- in: path
- required: true
- - schema:
- type: string
- name: threadId
- in: path
- required: true
- - schema:
- type: string
- name: messageId
- in: path
- required: true
- post:
- summary: Edit message
- operationId: editMessage
- responses:
- '204':
- description: No Content
- '404':
- description: Not Found
- requestBody:
- content:
- application/json:
- schema:
- type: object
- properties:
- content:
- type: string
- user_id:
- type: string
- readOnly: true
- required:
- - content
- examples: {}
- description: |-
- JSON object with :
- - content: Content of the message to edit
- - user_id: Id of the user (optional)
- description: |
- Update message with Message ID provided from the Thread ID and Project ID provided
- '/project/{projectId}/thread/{threadId}/messages/{messageId}':
- parameters:
- - schema:
- type: string
- name: projectId
- in: path
- required: true
- - schema:
- type: string
- name: threadId
- in: path
- required: true
- - schema:
- type: string
- name: messageId
- in: path
- required: true
- delete:
- summary: Delete message
- operationId: deleteMessage
- responses:
- '204':
- description: No Content
- description: 'Delete message with Message ID provided, from the Thread with ThreadID and ProjectID provided'
- '/project/{projectId}/thread/{threadId}/user/{userId}/messages/{messageId}':
- parameters:
- - schema:
- type: string
- name: projectId
- in: path
- required: true
- - schema:
- type: string
- name: threadId
- in: path
- required: true
- - schema:
- type: string
- name: userId
- in: path
- required: true
- - schema:
- type: string
- name: messageId
- in: path
- required: true
- delete:
- summary: Delete message written by a given user
- operationId: deleteUserMessage
- responses:
- '204':
- description: No Content
- '/project/{projectId}/thread/{threadId}/resolve':
- parameters:
- - schema:
- type: string
- name: projectId
- in: path
- required: true
- - schema:
- type: string
- name: threadId
- in: path
- required: true
- post:
- summary: Resolve Thread
- operationId: resolveThread
- responses:
- '204':
- description: No Content
- requestBody:
- content:
- application/json:
- schema:
- type: object
- properties:
- user_id:
- type: string
- required:
- - user_id
- description: |-
- JSON object with :
- - user_id: Id of the user.
- description: Mark Thread with ThreadID and ProjectID provided owned by the user with UserID provided as resolved.
- '/project/{projectId}/thread/{threadId}/reopen':
- parameters:
- - schema:
- type: string
- name: projectId
- in: path
- required: true
- - schema:
- type: string
- name: threadId
- in: path
- required: true
- post:
- summary: Reopen Thread
- operationId: reopenThread
- responses:
- '204':
- description: No Content
- description: |-
- Reopen Thread with ThreadID and ProjectID provided.
- i.e unmark it as resolved.
- '/project/{projectId}/thread/{threadId}':
- parameters:
- - schema:
- type: string
- name: projectId
- in: path
- required: true
- - schema:
- type: string
- name: threadId
- in: path
- required: true
- delete:
- summary: Delete thread
- operationId: deleteThread
- responses:
- '204':
- description: No Content
- description: Delete thread with ThreadID and ProjectID provided
- '/project/{projectId}/resolved-thread-ids':
- parameters:
- - schema:
- type: string
- name: projectId
- in: path
- required: true
- get:
- summary: Get resolved thread ids
- operationId: getResolvedThreadIds
- responses:
- '200':
- description: Resolved thread ids
- '/project/{projectId}':
- parameters:
- - schema:
- type: string
- name: projectId
- in: path
- required: true
- delete:
- summary: Destroy project
- operationId: destroyProject
- responses:
- '204':
- description: No Content
- description: 'Delete all threads from Project with Project ID provided, and all messages in those threads.'
- /status:
- get:
- summary: Check status
- tags: []
- responses:
- '200':
- description: OK
- content:
- application/json:
- schema:
- type: string
- description: chat is alive
- operationId: getStatus
- description: Check that the Chat service is alive
- head:
- summary: Check status
- tags: []
- responses:
- '200':
- description: OK
- content:
- application/json:
- schema:
- type: string
- description: chat is alive
- operationId: getStatus
- description: Check that the Chat service is alive
- '/project/{projectId}/duplicate-comment-threads':
- parameters:
- - schema:
- type: string
- name: projectId
- in: path
- required: true
- post:
- summary: Duplicate comment threads
- operationId: duplicateCommentThreads
- requestBody:
- content:
- application/json:
- schema:
- type: object
- properties:
- threads:
- type: array
- items:
- type: string
- responses:
- '200':
- content:
- application/json:
- schema:
- type: object
- properties:
- newThreads:
- type: object
- description: Mapping of old thread ids to their duplicated thread ids
- description: Duplicate a list of comment threads
- '/project/{projectId}/generate-thread-data':
- parameters:
- - schema:
- type: string
- name: projectId
- in: path
- required: true
- post:
- summary: Generate thread data to load into the frontend
- operationId: generateThreadData
- requestBody:
- content:
- application/json:
- schema:
- type: object
- properties:
- threads:
- type: array
- items:
- type: string
- responses:
- '200':
- content:
- application/json:
- schema:
- type: object
- description: Load threads and generate a json blob containing all messages in all the threads
- components:
- schemas:
- Message:
- title: Message
- x-stoplight:
- id: ue9n1vvezlutw
- type: object
- examples:
- - user_id: string
- - content: string
- properties:
- user_id:
- type: string
- content:
- type: string
- required:
- - user_id
- - content
- Thread:
- title: Thread
- x-stoplight:
- id: 0ppt3jw4h5bua
- type: array
- items:
- $ref: '#/components/schemas/Message'
|