adding description to conversation module

This commit is contained in:
balzack 2022-01-01 11:49:04 -08:00
parent a63ff4dac5
commit 427966d5c4

191
api.oa3
View File

@ -658,7 +658,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/card' $ref: '#/components/schemas/Card'
'401': '401':
description: invalid password description: invalid password
'404': '404':
@ -682,7 +682,7 @@ paths:
schema: schema:
type: array type: array
items: items:
$ref: '#/components/schemas/cardView' $ref: '#/components/schemas/CardView'
'401': '401':
description: invalid password description: invalid password
'500': '500':
@ -709,7 +709,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/card' $ref: '#/components/schemas/Card'
'401': '401':
description: invalid password description: invalid password
'404': '404':
@ -767,7 +767,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/cardData' $ref: '#/components/schemas/CardData'
'401': '401':
description: invalid password description: invalid password
'404': '404':
@ -827,7 +827,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/cardStatus' $ref: '#/components/schemas/CardStatus'
'401': '401':
description: invalid password description: invalid password
'404': '404':
@ -886,7 +886,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/cardStatus' $ref: '#/components/schemas/CardStatus'
'401': '401':
description: invalid password description: invalid password
'404': '404':
@ -920,7 +920,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/cardProfile' $ref: '#/components/schemas/CardProfile'
'401': '401':
description: invalid password description: invalid password
'404': '404':
@ -947,7 +947,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/cardProfile' $ref: '#/components/schemas/CardProfile'
'401': '401':
description: invalid password description: invalid password
'404': '404':
@ -981,7 +981,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/cardData' $ref: '#/components/schemas/CardData'
'401': '401':
description: invalid password description: invalid password
'404': '404':
@ -1010,7 +1010,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/cardData' $ref: '#/components/schemas/CardData'
'401': '401':
description: invalid password description: invalid password
'404': '404':
@ -1042,7 +1042,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/cardData' $ref: '#/components/schemas/CardData'
'401': '401':
description: invalid password description: invalid password
'404': '404':
@ -1077,7 +1077,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/cardData' $ref: '#/components/schemas/CardData'
'401': '401':
description: invalid password description: invalid password
'404': '404':
@ -1110,7 +1110,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/cardData' $ref: '#/components/schemas/CardData'
'401': '401':
description: invalid password description: invalid password
'404': '404':
@ -2049,13 +2049,13 @@ paths:
items: items:
$ref: '#/components/schemas/Dialogue' $ref: '#/components/schemas/Dialogue'
'401': '401':
description: invalid token description: permission denied
'500': '500':
description: internal server error description: internal server error
post: post:
tags: tags:
- conversation - conversation
description: Add a new dialogue. description: Create and host a new dialogue. Authroization granted to an app token of the account holder.
operationId: add-dialogue operationId: add-dialogue
security: security:
- bearerAuth: [] - bearerAuth: []
@ -2069,7 +2069,7 @@ paths:
items: items:
$ref: '#/components/schemas/Dialogue' $ref: '#/components/schemas/Dialogue'
'401': '401':
description: invalid token description: permission denied
'500': '500':
description: internal server error description: internal server error
@ -2077,7 +2077,7 @@ paths:
put: put:
tags: tags:
- conversation - conversation
description: Set dialogue subject description: Set the subject for a dialogue. Authorization granted the an app token for the account holder.
operationId: set-dialogue-subject operationId: set-dialogue-subject
security: security:
- bearerAuth: [] - bearerAuth: []
@ -2090,11 +2090,11 @@ paths:
type: string type: string
responses: responses:
'201': '201':
description: entry created description: success
'401': '401':
description: invalid token description: permission denied
'404': '404':
description: not found description: dialogue not found
'500': '500':
description: internal server error description: internal server error
requestBody: requestBody:
@ -2115,7 +2115,7 @@ paths:
put: put:
tags: tags:
- conversation - conversation
description: Set dialogue active state description: Set active state of dialogue. If a dialogue is inactive any update to the topics will fail. Authorization is granted to an app token of the account holder.
operationId: set-dialogue-active operationId: set-dialogue-active
security: security:
- bearerAuth: [] - bearerAuth: []
@ -2130,9 +2130,9 @@ paths:
'200': '200':
description: success description: success
'401': '401':
description: invalid token description: permission denied
'404': '404':
description: not found description: dialogue not found
'500': '500':
description: internal server error description: internal server error
requestBody: requestBody:
@ -2145,8 +2145,8 @@ paths:
post: post:
tags: tags:
- conversation - conversation
description: Assign a card to have insight into the conversation description: Add insight to a dialogue. This endpoint will automatically invoke the add insight on the contact's node. Authorization is granted to the app token of the account holder.
operationId: add-card-insight operationId: add-dialogue-insight
security: security:
- bearerAuth: [] - bearerAuth: []
parameters: parameters:
@ -2164,18 +2164,18 @@ paths:
type: string type: string
responses: responses:
'200': '200':
description: entry set description: success
'401': '401':
description: invalid token description: permission denied
'404': '404':
description: id not found description: guid or dialogue not found
'500': '500':
description: internal server error description: internal server error
delete: delete:
tags: tags:
- conversation - conversation
description: Remove insight from the specified card description: Remove an insight from a dialogue. This endpoint will authomatically invoke the delete insight endpoint on the contact's node. Authorization is granted to the app token of the accoun holder.
operationId: remove-card-insight operationId: remove-dialogue-insight
security: security:
- bearerAuth: [] - bearerAuth: []
parameters: parameters:
@ -2193,19 +2193,56 @@ paths:
type: string type: string
responses: responses:
'200': '200':
description: entry cleared description: success
'401': '401':
description: invalid token description: permission denied
'404': '404':
description: id not found description: guid or dialogue not found
'500': '500':
description: internal server error description: internal server error
/conversation/dialogues/{dialogueId}/insight/{guid}/status:
put:
tags:
- conversation
description: Set active status for contact on the host node. Access is granted to a contact token for an accound with the specified guid
operationId: set-dialogue-insight-active
security:
- bearerAuth: []
parameters:
- name: dialogueId
in: path
description: specified dialogue id
required: true
schema:
type: string
- name: guid
in: path
description: specified card id
required: true
schema:
type: string
responses:
'200':
description: success
'401':
description: permission denied
'404':
description: guid or dialogue not found
'500':
description: internal server error
requestBody:
content:
application/json:
schema:
type: string
enum: [ active, inactive, dismissed ]
/conversation/dialogues/{dialogueId}: /conversation/dialogues/{dialogueId}:
delete: delete:
tags: tags:
- conversation - conversation
description: Remove dialogue description: Remove specified dialogue. This endpoint will authomatically invoke the delete insight endpoint on all of the contacts' nodes. Access is granted to an app token for the account holder.
operationId: remove-dialogue operationId: remove-dialogue
security: security:
- bearerAuth: [] - bearerAuth: []
@ -2218,11 +2255,11 @@ paths:
type: string type: string
responses: responses:
'200': '200':
description: entry removed description: success
'401': '401':
description: invalid token description: permission denied
'404': '404':
description: not found description: dialogue not found
'500': '500':
description: internal server error description: internal server error
@ -2230,7 +2267,7 @@ paths:
get: get:
tags: tags:
- conversation - conversation
description: Retrieve all insights. description: Retrieve all insights. Access granted to app token for the account holder.
operationId: get-insights operationId: get-insights
security: security:
- bearerAuth: [] - bearerAuth: []
@ -2252,8 +2289,8 @@ paths:
post: post:
tags: tags:
- conversation - conversation
description: Hook receiver for adding an insight and/or updating the dialog revision description: Create or update an insight. Access granted to a contact token for a contact with the specified guid. This endpoint is invoked by the webhook from the contact node.
operationId: add-insight-hook operationId: add-insight-dialogue
security: security:
- bearerAuth: [] - bearerAuth: []
parameters: parameters:
@ -2271,9 +2308,16 @@ paths:
type: string type: string
responses: responses:
'200': '200':
description: revision set description: success
content:
application/json:
schema:
type: string
enum: [ active, inactive, dismissed ]
'401': '401':
description: not authorized description: permission denied
'404':
description: dialogue or guid not found
'500': '500':
description: internal server error description: internal server error
requestBody: requestBody:
@ -2285,8 +2329,8 @@ paths:
delete: delete:
tags: tags:
- conversation - conversation
description: Hook receiver for removing an insight description: Remove a specified insight. If the referenced dialogue is still active, the insight will get recreated with the next hook receiver update. Access granted to app token of account holder or contact token of dialogue host.
operationId: remove-insight-hook operationId: set-insight-dialogue
security: security:
- bearerAuth: [] - bearerAuth: []
parameters: parameters:
@ -2304,18 +2348,20 @@ paths:
type: string type: string
responses: responses:
'200': '200':
description: revision set description: success
'401': '401':
description: not authorized description: permission denied
'404':
description: dialogue or guid not found
'500': '500':
description: internal server error description: internal server error
/conversation/insights/{guid}/dialogues/{dialogueId}/active: /conversation/insights/{guid}/dialogues/{dialogueId}/status:
post: put:
tags: tags:
- conversation - conversation
description: Change active state of insight description: Set the active status of an insight. This will cause the hook receiver to return an inactive status. Access granted to app token of account holder.
operationId: set-insight-active operationId: set-insight-dialogue-active
security: security:
- bearerAuth: [] - bearerAuth: []
parameters: parameters:
@ -2344,7 +2390,8 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: boolean type: string
enum: [ active, inactive, dismissed ]
/conversation/dialogues/{dialogueId}/topicBlocks/view: /conversation/dialogues/{dialogueId}/topicBlocks/view:
get: get:
@ -2495,6 +2542,8 @@ paths:
$ref: '#/components/schemas/Topic' $ref: '#/components/schemas/Topic'
'401': '401':
description: permission denied description: permission denied
'403':
description: inactive dialogue
'404': '404':
description: dialogue not found description: dialogue not found
'500': '500':
@ -2559,6 +2608,8 @@ paths:
description: successful operation description: successful operation
'401': '401':
description: permission denied description: permission denied
'403':
description: inactive dialogue
'404': '404':
description: topic or dilaogue not found description: topic or dilaogue not found
'500': '500':
@ -2590,6 +2641,10 @@ paths:
description: entry created description: entry created
'401': '401':
description: invalid token description: invalid token
'403':
description: inactive dialogue
'404':
description: topic or dialogue not found
'500': '500':
description: internal server error description: internal server error
requestBody: requestBody:
@ -2779,6 +2834,8 @@ paths:
$ref: '#/components/schemas/Tag' $ref: '#/components/schemas/Tag'
'401': '401':
description: permission denied description: permission denied
'403':
description: inactive dialogue
'404': '404':
description: topic or dialogue not found description: topic or dialogue not found
'500': '500':
@ -2868,6 +2925,8 @@ paths:
description: success description: success
'401': '401':
description: permission denied description: permission denied
'403':
description: inactive dialogue
'404': '404':
description: tag, topic, or dialogue not found description: tag, topic, or dialogue not found
'500': '500':
@ -2946,6 +3005,8 @@ paths:
$ref: '#/components/schemas/Asset' $ref: '#/components/schemas/Asset'
'401': '401':
description: permission denied description: permission denied
'403':
description: inactive dialogue
'404': '404':
description: topic or dialogue not found description: topic or dialogue not found
'500': '500':
@ -3032,6 +3093,8 @@ paths:
description: success description: success
'401': '401':
description: permission denied description: permission denied
'403':
description: inactive dialogue
'404': '404':
description: asset, topic or dialogue not found description: asset, topic or dialogue not found
'500': '500':
@ -3062,6 +3125,8 @@ paths:
description: success description: success
'401': '401':
description: permission denied description: permission denied
'403':
description: inactive dialogue
'404': '404':
description: topic or dialogue not found description: topic or dialogue not found
'500': '500':
@ -3190,7 +3255,7 @@ components:
type: string type: string
format: base64 encoded image format: base64 encoded image
cardView: CardView:
type: object type: object
required: required:
- guid - guid
@ -3213,7 +3278,7 @@ components:
type: integer type: integer
format: int64 format: int64
cardProfile: CardProfile:
type: object type: object
required: required:
- node - node
@ -3234,7 +3299,7 @@ components:
node: node:
type: string type: string
cardData: CardData:
type: object type: object
required: required:
- status - status
@ -3254,7 +3319,7 @@ components:
items: items:
type: string type: string
cardStatus: CardStatus:
type: object type: object
required: required:
- status - status
@ -3265,7 +3330,7 @@ components:
token: token:
type: string type: string
card: Card:
type: object type: object
required: required:
- cardProfile - cardProfile
@ -3274,9 +3339,9 @@ components:
- conversationRevision - conversationRevision
properties: properties:
cardProfile: cardProfile:
$ref: '#/components/schemas/cardProfile' $ref: '#/components/schemas/CardProfile'
cardData: cardData:
$ref: '#/components/schemas/cardData' $ref: '#/components/schemas/CardData'
contentRevision: contentRevision:
type: integer type: integer
format: int64 format: int64
@ -3337,6 +3402,7 @@ components:
- insightId - insightId
- revision - revision
- guid - guid
- status
properties: properties:
insightId: insightId:
type: string type: string
@ -3345,15 +3411,16 @@ components:
format: int64 format: int64
guid: guid:
type: string type: string
active: status:
type: boolean type: string
enum: [ active, inactive, dismissed ]
Dialogue: Dialogue:
type: object type: object
required: required:
- dialogueId - dialogueId
- revision - revision
- status - active
- subject - subject
- insights - insights
properties: properties:
@ -3375,7 +3442,7 @@ components:
type: string type: string
status: status:
type: string type: string
enum: [ synced, unsynced ] enum: [ active, offsync, inactive, dismissed ]
Topic: Topic:
type: object type: object