CTZN.network Schemas Video Devlog

DBMethod results view json-view

ctzn.network/dbmethod-results-view

List dbmethod results and their calls for a given database.

{
  "id": "ctzn.network/dbmethod-results-view",
  "title": "DBMethod results view",
  "description": "List dbmethod results and their calls for a given database.",
  "type": "json-view",
  "parameters": {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "type": "array",
    "minItems": 1,
    "additionalItems": false,
    "items": [
      {
        "type": "string"
      },
      {
        "type": "object",
        "properties": {
          "limit": {
            "type": "number"
          },
          "lt": {
            "type": "string"
          }
        }
      }
    ]
  },
  "definition": {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "type": "object",
    "required": [
      "results"
    ],
    "properties": {
      "results": {
        "type": "array",
        "items": {
          "type": "object",
          "required": [
            "seq",
            "key",
            "url",
            "value"
          ],
          "properties": {
            "seq": {
              "type": "number"
            },
            "key": {
              "type": "string"
            },
            "url": {
              "type": "string",
              "format": "uri"
            },
            "value": {
              "type": "object",
              "required": [
                "call",
                "code",
                "createdAt"
              ],
              "properties": {
                "call": {
                  "type": "object",
                  "required": [
                    "dbUrl",
                    "authorId"
                  ],
                  "properties": {
                    "dbUrl": {
                      "type": "string",
                      "format": "uri"
                    },
                    "authorId": {
                      "type": "string",
                      "pattern": ".+@.+"
                    }
                  }
                },
                "code": {
                  "type": "string"
                },
                "details": {
                  "type": "object"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            },
            "call": {
              "type": "object",
              "required": [
                "seq",
                "key",
                "url",
                "value"
              ],
              "properties": {
                "seq": {
                  "type": "number"
                },
                "key": {
                  "type": "string"
                },
                "url": {
                  "type": "string",
                  "format": "uri"
                },
                "value": {
                  "type": "object",
                  "required": [
                    "database",
                    "method",
                    "createdAt"
                  ],
                  "properties": {
                    "database": {
                      "type": "object",
                      "required": [
                        "dbUrl",
                        "userId"
                      ],
                      "properties": {
                        "dbUrl": {
                          "type": "string",
                          "format": "uri"
                        },
                        "userId": {
                          "type": "string",
                          "pattern": ".+@.+"
                        }
                      }
                    },
                    "method": {
                      "type": "string"
                    },
                    "args": {
                      "type": "object"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

Schemas