specifying contact module

This commit is contained in:
balzack 2021-12-25 14:54:45 -08:00
parent 9ed5b3b16f
commit 5c6080e4e9

653
api.oa3
View File

@ -45,6 +45,79 @@ paths:
'200': '200':
description: Awaiting announce description: Awaiting announce
/revision/profile:
put:
tags:
- revision
description: Hook receiver for contact profile revision updates
operationId: revision-profile-hook
security:
- bearerAuth: []
responses:
'200':
description: revision set
'401':
description: not authorized
'500':
description: internal server error
requestBody:
content:
application/json:
schema:
type: integer
format: int64
/revision/content:
put:
tags:
- revision
description: Hook receiver for contact content revision updates
operationId: revision-content-hook
security:
- bearerAuth: []
responses:
'200':
description: revision set
'401':
description: not authorized
'500':
description: internal server error
requestBody:
content:
application/json:
schema:
type: integer
format: int64
/revision/insight/{insightId}:
put:
tags:
- revision
description: Hook receiver for contact insight revision updates
operationId: revision-insight-hook
security:
- bearerAuth: []
parameters:
- name: insightId
in: path
description: insight id to update
required: true
schema:
type: string
responses:
'200':
description: revision set
'401':
description: not authorized
'500':
description: internal server error
requestBody:
content:
application/json:
schema:
type: integer
format: int64
/admin/claimable: /admin/claimable:
get: get:
tags: tags:
@ -636,8 +709,29 @@ paths:
schema: schema:
type: string type: string
/index/contacts:
post:
tags:
- index
description: Add contact entry
operationId: add-index-contact
security:
- bearerAuth: []
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Contact'
'401':
description: invalid password
'404':
description: not found
'500':
description: internal server error
/index/view: /index/contacts/view:
get: get:
tags: tags:
- index - index
@ -659,29 +753,477 @@ paths:
'500': '500':
description: internal server error description: internal server error
## Contact Module /index/contacts/{contactId}:
### contacts: { pending, confirmed, connecting, connected } get:
### blocked: any id on blocked list is silently ignored tags:
### pending: limit number of pending contacts, created with Connect DataMessage - index
# get list of contacts description: Get contact entry
# add contact operationId: get-index-contact
# remove contact security:
# set contact disconnected - bearerAuth: []
# set contact connecting parameters:
# set contact connected (apply token) - name: contactId
# get connect message in: path
# get disconnect message description: specified contact id
# set connect message, if not contact adds to pending required: true
# set disconnect message schema:
# set pending to add contact with request type: string
# clear pending to ignore request responses:
# add blocked to block contact '200':
# remove blocked to unblock contact description: successful operation
# get content&conversation revision content:
# get contact content&conversation&profile revision application/json:
# set contact content&conversation&profile revision schema:
# set share $ref: '#/components/schemas/Contact'
# clear share '401':
description: invalid password
'404':
description: not found
'500':
description: internal server error
delete:
tags:
- index
description: Remove contact entry
operationId: remove-index-contact
security:
- bearerAuth: []
parameters:
- name: contactId
in: path
description: specified contact id
required: true
schema:
type: string
responses:
'200':
description: successful operation
'401':
description: invalid password
'404':
description: not found
'500':
description: internal server error
/index/contacts/{contactId}/status:
put:
tags:
- index
description: Update contact status
operationId: set-index-contact-status
security:
- bearerAuth: []
parameters:
- name: contactId
in: path
description: specified contact id
required: true
schema:
type: string
- name: token
in: query
description: token for accessing contact
required: true
schema:
type: string
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/ContactData'
'401':
description: invalid password
'404':
description: not found
'500':
description: internal server error
requestBody:
content:
application/json:
schema:
type: string
enum: [ pending, confirmed, connecting, connected ]
/index/contacts/{contactId}/openMessage:
get:
tags:
- index
description: Get message for opening contact connection
operationId: get-index-open-message
security:
- bearerAuth: []
parameters:
- name: contactId
in: path
description: specified contact id
required: true
schema:
type: string
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/DataMessage'
'401':
description: invalid password
'404':
description: not found
'500':
description: internal server error
put:
tags:
- index
description: Set message for opening contact connection
operationId: set-index-open-message
parameters:
- name: contactId
in: path
description: specified contact id
required: true
schema:
type: string
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/ContactStatus'
'401':
description: invalid password
'404':
description: not found
'500':
description: internal server error
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DataMessage'
/index/contacts/{contactId}/closeMessage:
get:
tags:
- index
description: Get message for closing contact connection
operationId: get-index-close-message
security:
- bearerAuth: []
parameters:
- name: contactId
in: path
description: specified contact id
required: true
schema:
type: string
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/DataMessage'
'401':
description: invalid password
'404':
description: not found
'500':
description: internal server error
put:
tags:
- index
description: Set message for closing contact connection
operationId: set-index-close-message
parameters:
- name: contactId
in: path
description: specified contact id
required: true
schema:
type: string
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/ContactStatus'
'401':
description: invalid password
'404':
description: not found
'500':
description: internal server error
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DataMessage'
/index/contacts/{contactId}/profile:
get:
tags:
- index
description: Get profile of contact entry
operationId: get-index-profile
security:
- bearerAuth: []
parameters:
- name: contactId
in: path
description: specified contact id
required: true
schema:
type: string
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/ContactProfile'
'401':
description: invalid password
'404':
description: not found
'500':
description: internal server error
/index/contacts/{contactId}/data:
get:
tags:
- index
description: Get data of contact entry
operationId: get-index-data
security:
- bearerAuth: []
parameters:
- name: contactId
in: path
description: specified contact id
required: true
schema:
type: string
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/ContactData'
'401':
description: invalid password
'404':
description: not found
'500':
description: internal server error
/index/contacts/{contactId}/notes:
put:
tags:
- index
description: Update contact notes
operationId: set-index-contact-notes
security:
- bearerAuth: []
parameters:
- name: contactId
in: path
description: specified contact id
required: true
schema:
type: string
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/ContactData'
'401':
description: invalid password
'404':
description: not found
'500':
description: internal server error
requestBody:
content:
application/json:
schema:
type: string
delete:
tags:
- index
description: Clear contact notes
operationId: clear-index-contact-notes
security:
- bearerAuth: []
parameters:
- name: contactId
in: path
description: specified contact id
required: true
schema:
type: string
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/ContactData'
'401':
description: invalid password
'404':
description: not found
'500':
description: internal server error
/index/contacts/{contactId}/{shareId}:
put:
tags:
- index
description: Update contact notes
operationId: set-index-contact-share
security:
- bearerAuth: []
parameters:
- name: contactId
in: path
description: specified contact id
required: true
schema:
type: string
- name: shareId
in: path
description: specified share id
required: true
schema:
type: string
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/ContactData'
'401':
description: invalid password
'404':
description: not found
'500':
description: internal server error
delete:
tags:
- index
description: Clear contact share group
operationId: clear-index-contact-share
security:
- bearerAuth: []
parameters:
- name: contactId
in: path
description: specified contact id
required: true
schema:
type: string
- name: shareId
in: path
description: specified share id
required: true
schema:
type: string
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/ContactData'
'401':
description: invalid password
'404':
description: not found
'500':
description: internal server error
/index/blocked:
get:
tags:
- index
description: Get list of blocked contacts
operationId: get-index-blocked-contacts
security:
- bearerAuth: []
responses:
'200':
description: successful operation
content:
application/json:
schema:
type: array
items:
type: string
'401':
description: invalid password
'404':
description: not found
'500':
description: internal server error
/index/blocked/{contactId}:
post:
tags:
- index
description: Add contact from blocked list
operationId: add-index-blocked-contact
security:
- bearerAuth: []
parameters:
- name: contactId
in: path
description: specified contact id
required: true
schema:
type: string
responses:
'200':
description: successful operation
'401':
description: invalid password
'404':
description: not found
'500':
description: internal server error
delete:
tags:
- index
description: Remove contact from blocked list
operationId: remove-index-blocked-contact
security:
- bearerAuth: []
parameters:
- name: contactId
in: path
description: specified contact id
required: true
schema:
type: string
responses:
'200':
description: successful operation
'401':
description: invalid password
'404':
description: not found
'500':
description: internal server error
## Content Module ## Content Module
## structure types: article, subject, label, tag, articleBlock, tagBlock ## structure types: article, subject, label, tag, articleBlock, tagBlock
@ -729,6 +1271,7 @@ components:
- labels - labels
- sharing - sharing
- contact - contact
- blocked
- dialogue - dialogue
- insight - insight
properties: properties:
@ -828,7 +1371,6 @@ components:
- guid - guid
- profileRevision - profileRevision
- contentRevision - contentRevision
- conversationRevision
- contactRevision - contactRevision
properties: properties:
guid: guid:
@ -846,17 +1388,11 @@ components:
type: integer type: integer
format: int64 format: int64
Contact: ContactProfile:
type: object type: object
required: required:
- guid - node
- profileRevision
- contentRevision
- conversationRevision
- contactRevision
properties: properties:
guid:
type: string
handle: handle:
type: string type: string
name: name:
@ -865,20 +1401,20 @@ components:
type: string type: string
location: location:
type: string type: string
revision:
type: integer
format: int64
imageSet: imageSet:
type: boolean type: boolean
node: node:
type: string type: string
contactRevision:
type: integer ContactData:
format: int64 type: object
profileRevision: required:
type: integer - status
format: int64 properties:
contentRevision: revision:
type: integer
format: int64
converstaionRevision:
type: integer type: integer
format: int64 format: int64
status: status:
@ -893,6 +1429,36 @@ components:
items: items:
type: string type: string
ContactStatus:
type: object
required:
- status
properties:
status:
type: string
enum: [ pending, confirmed, connecting, connected ]
token:
type: string
Contact:
type: object
required:
- contactProfile
- contactData
- contentRevision
- conversationRevision
properties:
contactProfile:
$ref: '#/components/schemas/ContactProfile'
contactData:
$ref: '#/components/schemas/ContactData'
contentRevision:
type: integer
format: int64
converstaionRevision:
type: integer
format: int64
Group: Group:
type: object type: object
required: required:
@ -996,3 +1562,4 @@ components:
bearerAuth: bearerAuth:
type: http type: http
scheme: bearer scheme: bearer