{
  "openapi": "3.0.0",
  "info": {
    "title": "mprove backend",
    "description": "",
    "version": "12.0.27",
    "contact": {}
  },
  "paths": {
    "/api/ToBackendGetBranchesList": {
      "post": {
        "operationId": "GetBranchesListController",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ToBackendGetBranchesListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToBackendGetBranchesListResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ToBackendGetBranchesListRequest": {
        "type": "object",
        "properties": {
          "info": {
            "$ref": "#/components/schemas/ToBackendGetBranchesListRequestInfo"
          },
          "payload": {
            "$ref": "#/components/schemas/ToBackendGetBranchesListRequestPayload"
          }
        },
        "required": [
          "info",
          "payload"
        ]
      },
      "ToBackendGetBranchesListResponse": {
        "type": "object",
        "properties": {
          "info": {
            "$ref": "#/components/schemas/ToBackendGetBranchesListResponseInfo"
          },
          "payload": {
            "$ref": "#/components/schemas/ToBackendGetBranchesListResponsePayload"
          }
        },
        "required": [
          "info",
          "payload"
        ]
      },
      "ToBackendGetBranchesListRequestInfo": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "enum": [
              "api/ToBackendGetBranchesList"
            ]
          },
          "traceId": {
            "type": "string"
          },
          "idempotencyKey": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "traceId",
          "idempotencyKey"
        ]
      },
      "ToBackendGetBranchesListRequestPayload": {
        "type": "object",
        "properties": {
          "projectId": {
            "type": "string"
          }
        },
        "required": [
          "projectId"
        ]
      },
      "ToBackendGetBranchesListResponseInfo": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string",
            "enum": [
              "/api/ToBackendGetBranchesList"
            ]
          },
          "method": {
            "type": "string",
            "enum": [
              "POST"
            ]
          },
          "mproveVersion": {
            "type": "string",
            "nullable": true
          },
          "duration": {
            "type": "number",
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "Ok",
              "Error"
            ]
          },
          "traceId": {
            "type": "string"
          },
          "error": {
            "nullable": true
          }
        },
        "required": [
          "path",
          "method",
          "status",
          "traceId"
        ]
      },
      "ToBackendGetBranchesListResponsePayload": {
        "type": "object",
        "properties": {
          "branchesList": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ToBackendGetBranchesListResponsePayloadBranchesItem"
            }
          },
          "sessionsList": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SessionApi"
            }
          },
          "userMember": {
            "$ref": "#/components/schemas/Member"
          }
        },
        "required": [
          "branchesList",
          "sessionsList",
          "userMember"
        ]
      },
      "ToBackendGetBranchesListResponsePayloadBranchesItem": {
        "type": "object",
        "properties": {
          "repoId": {
            "type": "string"
          },
          "repoType": {
            "type": "string",
            "enum": [
              "production",
              "dev",
              "session"
            ]
          },
          "branchId": {
            "type": "string"
          }
        },
        "required": [
          "repoId",
          "repoType",
          "branchId"
        ]
      },
      "SessionApi": {
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "string"
          },
          "opencodeSessionId": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "enum": [
              "Explorer",
              "Editor"
            ]
          },
          "provider": {
            "type": "string"
          },
          "agent": {
            "type": "string"
          },
          "model": {
            "type": "string",
            "nullable": true
          },
          "lastMessageProviderModel": {
            "type": "string",
            "nullable": true
          },
          "lastMessageVariant": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string"
          },
          "archiveReason": {
            "type": "string",
            "enum": [
              "User",
              "Expire",
              "Commit"
            ],
            "nullable": true
          },
          "pauseReason": {
            "type": "string",
            "enum": [
              "User",
              "Idle",
              "Safe",
              "External"
            ],
            "nullable": true
          },
          "repoId": {
            "type": "string"
          },
          "branchId": {
            "type": "string"
          },
          "initialBranch": {
            "type": "string",
            "nullable": true
          },
          "envId": {
            "type": "string",
            "nullable": true
          },
          "initialCommit": {
            "type": "string",
            "nullable": true
          },
          "createdTs": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "lastActivityTs": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "firstMessage": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "useCodex": {
            "type": "boolean"
          },
          "closedExplorerTabIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "required": [
          "sessionId",
          "type",
          "provider",
          "agent",
          "status",
          "repoId",
          "branchId",
          "createdTs",
          "lastActivityTs",
          "useCodex"
        ]
      },
      "Member": {
        "type": "object",
        "properties": {
          "projectId": {
            "type": "string"
          },
          "memberId": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "alias": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "fullName": {
            "type": "string"
          },
          "avatarSmall": {
            "type": "string"
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "isAdmin": {
            "type": "boolean"
          },
          "isEditor": {
            "type": "boolean"
          },
          "isExplorer": {
            "type": "boolean"
          },
          "serverTs": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "projectId",
          "memberId",
          "email",
          "alias",
          "firstName",
          "lastName",
          "fullName",
          "avatarSmall",
          "roles",
          "isAdmin",
          "isEditor",
          "isExplorer",
          "serverTs"
        ]
      }
    }
  }
}
