From 32cfc7fa4de5ba8099286ea486bf950f681af633 Mon Sep 17 00:00:00 2001 From: Roland Osborne Date: Tue, 1 Nov 2022 11:27:57 -0700 Subject: [PATCH] updating api doc --- doc/api.oa3 | 106 +- doc/swagger.html | 7392 +++++++++++++++++++++++++++++----------------- 2 files changed, 4746 insertions(+), 2752 deletions(-) diff --git a/doc/api.oa3 b/doc/api.oa3 index f0858b8b..cf0fd25d 100644 --- a/doc/api.oa3 +++ b/doc/api.oa3 @@ -250,6 +250,12 @@ paths: required: true schema: type: string + - name: accountId + in: path + description: specified account + required: true + schema: + type: string responses: '201': description: generated @@ -366,6 +372,45 @@ paths: '500': description: internal server error + /account/flag/{guid}: + get: + tags: + - account + description: Report record for admin review. + operationId: add-flag + parameters: + - name: guid + in: path + description: guid of account holder + required: true + schema: + type: string + - name: channel + in: query + description: channel of or reported record + required: false + schema: + type: string + - name: topic + in: query + description: topic id of reported record + required: false + schema: + type: string + responses: + '200': + description: success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Profile' + '401': + description: permission denied + '500': + description: internal server error + /account/listing: get: tags: @@ -373,9 +418,9 @@ paths: description: Get profile of searchable accounts. Endpoint is publically accessible. operationId: get-account-listing parameters: - - name: guid + - name: filter in: query - description: filter for specified guid + description: filter handles by text required: false schema: type: string @@ -792,6 +837,25 @@ paths: description: account disabled '500': description: internal server error + delete: + tags: + - profile + description: Delete own account. + operationId: remove-profile + parameters: + - name: agent + in: query + description: agent token + required: false + schema: + type: string + responses: + '200': + description: success + '401': + description: permission denied + '500': + description: internal server error /profile/data: put: @@ -1167,6 +1231,39 @@ paths: description: internal server error /contact/cards/{cardId}: + get: + tags: + - contact + description: Get specified card. Access granted to app tokens of account holder. + operationId: get-card + parameters: + - name: cardId + in: path + description: specified card id + required: true + schema: + type: string + - name: agent + in: query + description: agent token + required: false + schema: + type: string + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Card' + '401': + description: permission denied + '404': + description: card not found + '410': + description: account disabled + '500': + description: internal server error delete: tags: - contact @@ -3227,7 +3324,7 @@ components: appToken: type: string - LoginAccess { + LoginAccess: type: object required: - guid @@ -3636,7 +3733,7 @@ components: enableAudio: type: boolean enableVideo: - type: video + type: boolean contacts: $ref: '#/components/schemas/ChannelContacts' members: @@ -4006,3 +4103,4 @@ components: scheme: bearer + diff --git a/doc/swagger.html b/doc/swagger.html index 4def90bb..fd40bd23 100644 --- a/doc/swagger.html +++ b/doc/swagger.html @@ -1,4 +1,3 @@ - @@ -691,14 +690,61 @@ // Script section to load models into a JS Var var defs = {} defs["Account"] = { - "required" : [ "accountId", "disabled", "profile" ], + "required" : [ "accountId", "disabled" ], "type" : "object", "properties" : { "accountId" : { + "type" : "integer", + "format" : "uint32" + }, + "guid" : { "type" : "string" }, - "profile" : { - "$ref" : "#/components/schemas/Profile" + "handle" : { + "type" : "string" + }, + "name" : { + "type" : "string" + }, + "description" : { + "type" : "string" + }, + "location" : { + "type" : "string" + }, + "imageSet" : { + "type" : "boolean" + }, + "disabled" : { + "type" : "boolean" + } + } +}; + defs["AccountProfile"] = { + "required" : [ "guid", "node", "revision" ], + "type" : "object", + "properties" : { + "accountId" : { + "type" : "integer", + "format" : "uint32" + }, + "guid" : { + "type" : "string" + }, + "handle" : { + "type" : "string" + }, + "name" : { + "type" : "string" + }, + "description" : { + "type" : "string" + }, + "location" : { + "type" : "string" + }, + "imageSet" : { + "type" : "boolean" }, "disabled" : { "type" : "boolean" @@ -713,11 +759,11 @@ "type" : "boolean" }, "storageUsed" : { - "type" : "number", + "type" : "integer", "format" : "int64" }, "storageAvailable" : { - "type" : "number", + "type" : "integer", "format" : "int64" }, "forwardingAddress" : { @@ -916,6 +962,10 @@ "type" : "string", "enum" : [ "pending", "confirmed", "requested", "connecting", "connected" ] }, + "statusUpdated" : { + "type" : "integer", + "format" : "int64" + }, "token" : { "type" : "string" }, @@ -957,6 +1007,10 @@ }, "node" : { "type" : "string" + }, + "revision" : { + "type" : "integer", + "format" : "int64" } } }; @@ -1006,6 +1060,9 @@ "type" : "integer", "format" : "int64" }, + "channelSummary" : { + "$ref" : "#/components/schemas/ChannelSummary" + }, "channelDetail" : { "$ref" : "#/components/schemas/ChannelDetail" } @@ -1029,11 +1086,23 @@ "type" : "integer", "format" : "int64" }, + "enableImage" : { + "type" : "boolean" + }, + "enableAudio" : { + "type" : "boolean" + }, + "enableVideo" : { + "type" : "boolean" + }, "contacts" : { "$ref" : "#/components/schemas/ChannelContacts" }, "members" : { - "$ref" : "#/components/schemas/ChannelMembers" + "type" : "array", + "items" : { + "type" : "string" + } } } }; @@ -1050,11 +1119,14 @@ } }; defs["ChannelParams"] = { - "required" : [ "cards", "groups", "subject" ], + "required" : [ "cards", "data", "dataType", "groups" ], "type" : "object", "properties" : { - "subject" : { - "$ref" : "#/components/schemas/Subject" + "dataType" : { + "type" : "string" + }, + "data" : { + "type" : "string" }, "groups" : { "type" : "array", @@ -1069,6 +1141,14 @@ } } } +}; + defs["ChannelSummary"] = { + "type" : "object", + "properties" : { + "lastTopic" : { + "$ref" : "#/components/schemas/TopicDetail" + } + } }; defs["Claim"] = { "required" : [ "token" ], @@ -1256,9 +1336,25 @@ "type" : "string" } } +}; + defs["LoginAccess"] = { + "required" : [ "appToken", "created", "guid" ], + "type" : "object", + "properties" : { + "guid" : { + "type" : "string" + }, + "appToken" : { + "type" : "string" + }, + "created" : { + "type" : "integer", + "format" : "int64" + } + } }; defs["NodeConfig"] = { - "required" : [ "accountStorage", "domain", "publicLimit" ], + "required" : [ "accountStorage", "domain" ], "type" : "object", "properties" : { "domain" : { @@ -1267,6 +1363,18 @@ "accountStorage" : { "type" : "integer", "format" : "int64" + }, + "enableImage" : { + "type" : "boolean" + }, + "enableAudio" : { + "type" : "boolean" + }, + "enableVideo" : { + "type" : "boolean" + }, + "keyType" : { + "type" : "string" } } }; @@ -1323,6 +1431,10 @@ "required" : [ "article", "card", "channel", "group", "profile" ], "type" : "object", "properties" : { + "account" : { + "type" : "integer", + "format" : "int64" + }, "profile" : { "type" : "integer", "format" : "int64" @@ -1516,20 +1628,26 @@
  • addAccountAuthentication
  • +
  • + addFlag +
  • getAccountApps
  • getAccountAsset
  • -
  • - getAccountImage +
  • + getAccountAvailable
  • getAccountListing
  • -
  • - getAccountProfile +
  • + getAccountListingImage +
  • +
  • + getAccountListingMessage
  • getAccountStatus @@ -1546,15 +1664,15 @@
  • removeAccountApp
  • -
  • - setAccountApp -
  • setAccountAuthentication
  • setAccountExport
  • +
  • + setAccountLogin +
  • setAccountNode
  • @@ -1644,6 +1762,9 @@
  • clearCardNotes
  • +
  • + getCard +
  • getCardDetail
  • @@ -1714,14 +1835,14 @@
  • clearChannelGroup
  • -
  • - getChannel +
  • + getChannelDetail
  • getChannelSubjectField
  • -
  • - getChannelTopic +
  • + getChannelSummary
  • getChannelTopicAsset @@ -1778,6 +1899,9 @@ setChannelTopicTagSubject
  • +
  • + deleteProfile +
  • getProfile
  • @@ -2068,16 +2192,7 @@ except ApiException as e:
    +
    + + + @@ -2374,17 +2542,7 @@ except ApiException as e:
    +
    + +
    + + +

    Status: 401 - permission denied

    + + + +
    +
    + +

    Status: 500 - internal server error

    + + + +
    +
    + + + +
    @@ -2980,20 +3549,7 @@ except ApiException as e:
    - +
    -

    Status: 401 - permission denied

    - - - -
    -
    - -

    Status: 405 - invalid image

    - - - -
    -
    -

    Status: 500 - internal server error