From 9ed5b3b16f0769d6aa987a360403aa119eb5f6ff Mon Sep 17 00:00:00 2001 From: Roland Osborne Date: Fri, 24 Dec 2021 14:59:24 -0800 Subject: [PATCH] adding contact module --- api.oa3 | 253 ++++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 209 insertions(+), 44 deletions(-) diff --git a/api.oa3 b/api.oa3 index 4560c042..19560ce1 100644 --- a/api.oa3 +++ b/api.oa3 @@ -23,13 +23,13 @@ tags: description: authenticate holder of identity for external service - name: profile description: getting and setting of the public profile + - name: share + description: access control for personal subjects, associates content and contacts + - name: contact description: connection to other identities, hook receiver - - name: content description: posting and listing of personal subjects, group and tag managment - - name: sharing - description: sharing personal subjects, associates content and contacts - name: converstaion description: group sharing of subjects @@ -166,7 +166,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/ProfileView' + $ref: '#/components/schemas/Profile' '401': description: invalid password '404': @@ -481,7 +481,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ProfileView' + $ref: '#/components/schemas/Profile' '401': description: invalid token '500': @@ -545,15 +545,122 @@ paths: '500': description: internal server error - ## Share Module - ## structure types: share - # get shares - # add share - # delete share - # update share + + /share/groups: + get: + tags: + - share + description: Get groups for sharing + operationId: get-share-groups + security: + - bearerAuth: [] + responses: + '200': + description: successful operation + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Group' + '401': + description: invalid token + '500': + description: internal server error + post: + tags: + - share + description: Add a group for sharing + operationId: add-share-group + security: + - bearerAuth: [] + responses: + '201': + description: entry created + '401': + description: invalid token + '500': + description: internal server error + requestBody: + content: + application/json: + schema: + type: string + + /share/groups/{groupId}: + delete: + tags: + - share + description: Get groups for sharing + operationId: remove-share-group + security: + - bearerAuth: [] + parameters: + - name: groupId + in: path + description: specified group id + required: true + schema: + type: string + responses: + '200': + description: successful operation + '401': + description: invalid token + '500': + description: internal server error + put: + tags: + - share + description: Update group for sharing + operationId: update-share-group + security: + - bearerAuth: [] + parameters: + - name: groupId + in: path + description: specified group id + required: true + schema: + type: string + responses: + '200': + description: successful operation + '401': + description: invalid token + '500': + description: internal server error + requestBody: + content: + application/json: + schema: + type: string + + + /index/view: + get: + tags: + - index + description: Get list of contacts + operationId: get-index-contacts + security: + - bearerAuth: [] + responses: + '200': + description: successful operation + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ContactView' + '401': + description: invalid password + '500': + description: internal server error ## Contact Module - ### contacts: { disconnected, connecting, connected } + ### contacts: { pending, confirmed, connecting, connected } ### blocked: any id on blocked list is silently ignored ### pending: limit number of pending contacts, created with Connect DataMessage # get list of contacts @@ -571,21 +678,21 @@ paths: # add blocked to block contact # remove blocked to unblock contact # get content&conversation revision - # get contact content&conversation revision - # set contact content&conversation revision + # get contact content&conversation&profile revision + # set contact content&conversation&profile revision # set share # clear share ## Content Module ## structure types: article, subject, label, tag, articleBlock, tagBlock # get article block view [ { articleBlockId, articleBlockRevision } ] - # get article block (blockId, subjectFilter, tagFilter): [ { articleId, articleRevision, subject: { - # subjectId, revision, type, data, created, modified, set, ready + # get article block (blockId, subjectFilter, tagFilter): [ { articleId, articleRevision, set, ready, subject: { + # subjectId, revision, type, data, created, modified # }, labelId[], shareId[], tagCount, tagModified # } ] # get article view (blockId, subjectFilter): [ { articleId, articleRevision } ] - # get article (articleId, tagFilter) : { articleId, articleRevision, subject: { - # subjectId, revision, type, data, created, modified, set, ready + # get article (articleId, tagFilter) : { articleId, articleRevision, set, ready, subject: { + # subjectId, revision, type, data, created, modified # }, labelId[], shareId[], tagCount, tagModified # } # get tag view (articleId, filter): [ { tagId, revision } ] @@ -596,9 +703,8 @@ paths: # add subject # add subject asset # update subject data - # update subject set - # set share - # clear share + # set/clear ready + # set/clear share externalDocs: description: Find out more about Swagger @@ -688,29 +794,6 @@ components: image: type: string - ProfileView: - type: object - required: - - guid - - imageSet - - revision - properties: - guid: - type: string - handle: - type: string - name: - type: string - description: - type: string - location: - type: string - imageSet: - type: boolean - revision: - type: integer - format: int64 - App: type: object required: @@ -739,6 +822,88 @@ components: type: string format: base64 encoded image + ContactView: + type: object + required: + - guid + - profileRevision + - contentRevision + - conversationRevision + - contactRevision + properties: + guid: + type: string + contactRevision: + type: integer + format: int64 + profileRevision: + type: integer + format: int64 + contentRevision: + type: integer + format: int64 + converstaionRevision: + type: integer + format: int64 + + Contact: + type: object + required: + - guid + - profileRevision + - contentRevision + - conversationRevision + - contactRevision + properties: + guid: + type: string + handle: + type: string + name: + type: string + description: + type: string + location: + type: string + imageSet: + type: boolean + node: + type: string + contactRevision: + type: integer + format: int64 + profileRevision: + type: integer + format: int64 + contentRevision: + type: integer + format: int64 + converstaionRevision: + type: integer + format: int64 + status: + type: string + enum: [ pending, confirmed, connecting, connected ] + notes: + type: string + token: + type: string + groups: + type: array + items: + type: string + + Group: + type: object + required: + - groupId + - name + properties: + groupId: + type: string + name: + type: string + Authenticate: type: object required: