Skip to content
Snippets Groups Projects
agent-swagger.json 41 KiB
Newer Older
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "info": {
    "title": "Agent",
    "description": "Agent API",
    "version": "1.0",
    "contact": {}
  },
  "tags": [],
  "servers": [],
  "components": {
Alexey Lunin's avatar
Alexey Lunin committed
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "type": "http"
      },
      "basic": {
        "type": "http",
        "scheme": "basic"
      }
    },
    "schemas": {
      "CreateInvitationResponseDto": {
        "type": "object",
        "properties": {
          "invitationUrl": {
            "type": "string",
            "description": "Example of long invitation url",
            "example": "http://0.0.0.0:8001?oob=eyJAdHlwZSI6Imh0dHBzOi8vZGlkY29tbS5vcmcvb3V0LW9mLWJhbmQvMS4xL2ludml0YXRpb24iLCJAaWQiOiIzYWExNGIzNC04YTk5LTQxY2UtYTY3NC1jODUxYmVhMTIxMWEiLCJsYWJlbCI6IkRFeGNWYXNkX0FHRU5UXzQ1IiwiYWNjZXB0IjpbImRpZGNvbW0vYWlwMSIsImRpZGNvbW0vYWlwMjtlbnY9cmZjMTkiXSwiaGFuZHNoYWtlX3Byb3RvY29scyI6WyJodHRwczovL2RpZGNvbW0ub3JnL2RpZGV4Y2hhbmdlLzEuMCIsImh0dHBzOi8vZGlkY29tbS5vcmcvY29ubmVjdGlvbnMvMS4wIl0sInNlcnZpY2VzIjpbeyJpZCI6IiNpbmxpbmUtMCIsInNlcnZpY2VFbmRwb2ludCI6Imh0dHA6Ly8wLjAuMC4wOjgwMDEiLCJ0eXBlIjoiZGlkLWNvbW11bmljYXRpb24iLCJyZWNpcGllbnRLZXlzIjpbImRpZDprZXk6ejZNa3VFcHllc1pNa3k0a1BpQzhEOEplZERlcm55YTFuaTREMUF3ZmdnWWt6YmR4Il0sInJvdXRpbmdLZXlzIjpbXX1dfQ"
          },
          "shortInvitationUrl": {
            "type": "string",
            "example": "http://0.0.0.0:8001/invitations/85a7c179-122b-4d2d-9a86-d92ad31cef2b"
          },
          "outOfBandId": {
            "type": "string",
            "example": "85a7c179-122b-4d2d-9a86-d92ad31cef2b"
          },
          "role": {
            "example": "sender",
            "enum": [
              "sender",
              "receiver"
            ],
            "type": "string"
          },
          "state": {
            "example": "Done",
            "enum": [
              "initial",
              "await-response",
              "prepare-response",
              "done"
            ],
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        }
      },
      "CreateInvitationRequestDto": {
        "type": "object",
        "properties": {
          "goal": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "alias": {
            "type": "string"
          },
          "imageUrl": {
            "type": "string"
          },
          "multiUseInvitation": {
            "type": "boolean"
      "AcceptInvitationRequestDto": {
        "type": "object",
        "properties": {
          "invitationUrl": {
            "type": "string",
            "description": "Example of long invitation url",
            "example": "http://0.0.0.0:8001?oob=eyJAdHlwZSI6Imh0dHBzOi8vZGlkY29tbS5vcmcvb3V0LW9mLWJhbmQvMS4xL2ludml0YXRpb24iLCJAaWQiOiIzYWExNGIzNC04YTk5LTQxY2UtYTY3NC1jODUxYmVhMTIxMWEiLCJsYWJlbCI6IkRFeGNWYXNkX0FHRU5UXzQ1IiwiYWNjZXB0IjpbImRpZGNvbW0vYWlwMSIsImRpZGNvbW0vYWlwMjtlbnY9cmZjMTkiXSwiaGFuZHNoYWtlX3Byb3RvY29scyI6WyJodHRwczovL2RpZGNvbW0ub3JnL2RpZGV4Y2hhbmdlLzEuMCIsImh0dHBzOi8vZGlkY29tbS5vcmcvY29ubmVjdGlvbnMvMS4wIl0sInNlcnZpY2VzIjpbeyJpZCI6IiNpbmxpbmUtMCIsInNlcnZpY2VFbmRwb2ludCI6Imh0dHA6Ly8wLjAuMC4wOjgwMDEiLCJ0eXBlIjoiZGlkLWNvbW11bmljYXRpb24iLCJyZWNpcGllbnRLZXlzIjpbImRpZDprZXk6ejZNa3VFcHllc1pNa3k0a1BpQzhEOEplZERlcm55YTFuaTREMUF3ZmdnWWt6YmR4Il0sInJvdXRpbmdLZXlzIjpbXX1dfQ"
          },
          "shortInvitationUrl": {
            "type": "string",
            "example": "http://0.0.0.0:8001/invitations/85a7c179-122b-4d2d-9a86-d92ad31cef2b"
          }
        },
        "required": [
          "invitationUrl",
          "shortInvitationUrl"
        ]
      },
      "ConnectionRecordDto": {
        "type": "object",
        "properties": {
          "state": {
            "enum": [
              "start",
              "invitation-sent",
              "invitation-received",
              "request-sent",
              "request-received",
              "response-sent",
              "response-received",
              "abandoned",
              "completed"
            ],
            "type": "string"
          },
          "connectionName": {
            "type": "string"
          },
          "alias": {
            "type": "string"
          },
          "did": {
            "type": "string"
          },
          "invitationDid": {
            "type": "string"
          },
          "outOfBandId": {
            "type": "string"
          },
          "imageUrl": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
Zdravko Iliev's avatar
Zdravko Iliev committed
      "BaseRecordDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        }
      },
      "CreateSchemaRequestDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "my test schema"
          },
          "attributes": {
            "example": [
              "first_name, last_name"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "version": {
            "type": "string",
            "example": "1.0.2",
            "pattern": "/^(\\d+\\.)?(\\d+\\.)?(\\*|\\d+)$/"
          }
        },
        "required": [
          "name",
          "attributes",
          "version"
        ]
      },
      "SchemaRecordDto": {
        "type": "object",
        "properties": {
Zdravko Iliev's avatar
Zdravko Iliev committed
          "id": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "attributes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "version": {
            "type": "string"
          },
          "issuerId": {
            "type": "string"
          },
          "methodName": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "attributes",
        ]
      },
      "IdReqDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          }
        },
        "required": [
          "id"
        ]
      },
      "CreddefRecordDto": {
        "type": "object",
        "properties": {
Zdravko Iliev's avatar
Zdravko Iliev committed
          "id": {
            "type": "string"
          },
Zdravko Iliev's avatar
Zdravko Iliev committed
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
Zdravko Iliev's avatar
Zdravko Iliev committed
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
Zdravko Iliev's avatar
Zdravko Iliev committed
          "schemaId": {
            "type": "string"
          },
Zdravko Iliev's avatar
Zdravko Iliev committed
          "issuerId": {
            "type": "string"
          },
Zdravko Iliev's avatar
Zdravko Iliev committed
          "tag": {
            "type": "string"
          }
        },
        "required": [
          "schemaId",
          "issuerId",
        ]
      },
      "CreateCredentialDefinitionRequestDto": {
        "type": "object",
        "properties": {
          "schemaId": {
            "type": "string"
          },
          "tag": {
            "type": "string"
          }
        },
        "required": [
          "schemaId",
          "tag"
        ]
      },
      "OfferCredentialAttributes": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "value"
        ]
      },
      "OfferCredentialRequestDto": {
        "type": "object",
        "properties": {
          "connectionId": {
            "type": "string",
            "example": "6464b521-005a-4379-91e0-a3692b31cafd"
          },
          "credentialDefinitionId": {
            "type": "string"
          },
          "attributes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OfferCredentialAttributes"
            }
          }
        },
        "required": [
          "credentialDefinitionId",
          "attributes"
        ]
      },
      "CredentialRecordDto": {
        "type": "object",
        "properties": {
Zdravko Iliev's avatar
Zdravko Iliev committed
          "id": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "state": {
            "enum": [
              "proposal-sent",
              "proposal-received",
              "offer-sent",
              "offer-received",
              "declined",
              "request-sent",
              "request-received",
              "credential-issued",
              "credential-received",
              "done",
              "abandoned"
            ],
            "type": "string"
          },
          "credentialRecordType": {
            "type": "string"
          },
          "connectionId": {
            "type": "string"
          },
          "attributes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OfferCredentialAttributes"
            }
          },
          "tags": {
            "type": "object"
          }
        },
        "required": [
          "state",
          "credentialRecordType",
        ]
      },
      "CredentialOfferResponseDto": {
        "type": "object",
        "properties": {
          "credentialUrl": {
            "type": "string",
            "nullable": true
          },
          "shortCredentialUrl": {
            "type": "string",
            "nullable": true
          },
          "credentialRecord": {
            "$ref": "#/components/schemas/CredentialRecordDto"
          }
        },
        "required": [
          "credentialUrl",
          "shortCredentialUrl",
          "credentialRecord"
        ]
      },
      "CredentialFormatDataDto": {
        "type": "object",
        "properties": {
          "proposalAttributes": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "offerAttributes": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "anoncredsProposal": {
            "type": "object"
          },
          "anoncredsOffer": {
            "type": "object"
          },
          "anoncredsRequest": {
            "type": "object"
          },
          "anoncredsCredential": {
            "type": "object"
          }
        }
      },
      "AcceptCredentialDto": {
        "type": "object",
        "properties": {
          "credentialId": {
            "type": "string"
          },
          "credentialUrl": {
            "type": "string"
          }
        },
        "required": [
          "credentialId",
          "credentialUrl"
        ]
      },
      "MakeBasicMessageRequestDto": {
        "type": "object",
        "properties": {
          "connectionId": {
            "type": "string",
            "example": "6464b521-005a-4379-91e0-a3692b31cafd"
          },
          "message": {
            "type": "string",
            "example": "hello world"
          }
        },
        "required": [
          "connectionId",
        ]
      },
      "MessageRecordDto": {
        "type": "object",
        "properties": {
Zdravko Iliev's avatar
Zdravko Iliev committed
          "id": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "connectionId": {
            "type": "string",
            "example": "6464b521-005a-4379-91e0-a3692b31cafd"
          },
          "role": {
            "enum": [
              "sender",
              "receiver"
            ],
            "type": "string"
          },
          "sentTime": {
            "type": "string"
          },
          "from": {
            "type": "string",
            "example": "example-ocm-name"
          },
          "to": {
            "type": "string",
            "example": "example-ocm-name"
          },
          "content": {
            "type": "string",
            "example": "hello world"
          }
        },
        "required": [
          "connectionId",
          "role",
          "sentTime",
        ]
      },
      "ProofRecordDto": {
        "type": "object",
        "properties": {
Zdravko Iliev's avatar
Zdravko Iliev committed
          "id": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "connectionId": {
            "type": "string"
          },
          "state": {
            "enum": [
              "proposal-sent",
              "proposal-received",
              "request-sent",
              "request-received",
              "presentation-sent",
              "presentation-received",
              "declined",
              "abandoned",
              "done"
            ],
            "type": "string"
          },
          "tags": {
            "type": "object"
          }
        },
        "required": [
          "state",
        ]
      },
      "ProofFormatDataDto": {
        "type": "object",
        "properties": {
          "anoncredsProposal": {
            "type": "object"
          },
          "anoncredsRequest": {
            "type": "object"
          },
          "anoncredsPresentation": {
            "type": "object"
          }
        }
      },
      "RequestProofAttribute": {
        "type": "object",
        "properties": {
          "attributeName": {
            "type": "string"
          },
          "credentialDefinitionId": {
            "type": "string"
          },
          "schemaId": {
            "type": "string"
          }
        },
        "required": [
          "attributeName",
          "credentialDefinitionId",
          "schemaId"
        ]
      },
      "RequestProofDto": {
        "type": "object",
        "properties": {
          "connectionId": {
            "type": "string",
            "example": "6464b521-005a-4379-91e0-a3692b31cafd"
          },
          "attributes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RequestProofAttribute"
            }
          }
        },
        "required": [
          "attributes"
        ]
      },
      "RequestProofResponseDto": {
        "type": "object",
        "properties": {
          "proofUrl": {
            "type": "string",
            "nullable": true
          },
          "shortProofUrl": {
            "type": "string",
            "nullable": true
          },
          "proofRecord": {
            "$ref": "#/components/schemas/ProofRecordDto"
          }
        },
        "required": [
          "proofUrl",
          "shortProofUrl",
          "proofRecord"
        ]
      },
      "AcceptProofDto": {
        "type": "object",
        "properties": {
          "proofId": {
            "type": "string"
          },
          "proofUrl": {
            "type": "string"
          }
        },
        "required": [
          "proofId",
          "proofUrl"
        ]
      },
      "DidRecordDto": {
        "type": "object",
        "properties": {
Zdravko Iliev's avatar
Zdravko Iliev committed
          "id": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "did": {
            "type": "string"
          },
          "role": {
            "type": "string",
            "enum": [
              "created",
              "received"
            ]
          },
          "method": {
            "type": "string"
          },
          "tags": {
            "type": "object"
          }
        },
        "required": [
          "did",
          "role",
          "method",
          "tags"
        ]