{
  "openapi": "3.1.0",
  "info": {
    "title": "Desklog API",
    "version": "v1"
  },
  "servers": [
    {
      "url": "http://localhost/api"
    }
  ],
  "security": [
    {
      "http": []
    }
  ],
  "paths": {
    "/v1/health": {
      "get": {
        "operationId": "health",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "const": "ok"
                    }
                  },
                  "required": ["status"]
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/v1/me/delete": {
      "get": {
        "operationId": "v1.account.deletion-plan",
        "tags": ["Account"],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "action": {
                            "type": "string",
                            "enum": ["delete", "leave"]
                          },
                          "active_members_count": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "action",
                          "active_members_count"
                        ]
                      }
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      },
      "post": {
        "operationId": "v1.account.destroy",
        "tags": ["Account"],
        "parameters": [
          {
            "name": "X-Step-Up-Token",
            "in": "header",
            "required": true,
            "description": "A short-lived encrypted proof returned by a step-up endpoint.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteAccountRequest"
              }
            }
          }
        },
        "responses": {
          "409": {
            "description": "",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "204": {
            "description": "No content"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/attachments/{attachment}": {
      "get": {
        "operationId": "v1.attachments.download",
        "tags": ["Attachment"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "attachment",
            "in": "path",
            "required": true,
            "description": "The attachment ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      },
      "delete": {
        "operationId": "v1.attachments.destroy",
        "tags": ["Attachment"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "attachment",
            "in": "path",
            "required": true,
            "description": "The attachment ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "500": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "description": "Error overview.",
                      "examples": ["Unable to quarantine attachment."]
                    }
                  },
                  "required": ["message"]
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/attachments/{attachment}/inline": {
      "get": {
        "operationId": "v1.attachments.inline",
        "tags": ["Attachment"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "attachment",
            "in": "path",
            "required": true,
            "description": "The attachment ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/attachment-drafts/{draftToken}": {
      "post": {
        "operationId": "v1.attachment-drafts.store",
        "tags": ["Attachment"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "draftToken",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/StoreAttachmentRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "`AttachmentResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AttachmentResource"
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/organizations/{organization}/attachments": {
      "post": {
        "operationId": "v1.organization-attachments.store",
        "tags": ["Attachment"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "The organization ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/StoreAttachmentRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "`AttachmentResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AttachmentResource"
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/projects/{project}/attachments": {
      "post": {
        "operationId": "v1.project-attachments.store",
        "tags": ["Attachment"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "description": "The project ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/StoreAttachmentRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "`AttachmentResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AttachmentResource"
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/tasks/{task}/attachments": {
      "post": {
        "operationId": "v1.task-attachments.store",
        "tags": ["Attachment"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "task",
            "in": "path",
            "required": true,
            "description": "The task ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/StoreAttachmentRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "`AttachmentResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AttachmentResource"
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/tasks/{task}/comments/{comment}/attachments": {
      "post": {
        "operationId": "v1.comment-attachments.store",
        "tags": ["Attachment"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "task",
            "in": "path",
            "required": true,
            "description": "The task ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "comment",
            "in": "path",
            "required": true,
            "description": "The comment ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/StoreAttachmentRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "`AttachmentResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AttachmentResource"
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/wiki-pages/{wikiPage}/attachments": {
      "post": {
        "operationId": "v1.wiki-page-attachments.store",
        "tags": ["Attachment"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wikiPage",
            "in": "path",
            "required": true,
            "description": "The wiki page ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/StoreAttachmentRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "`AttachmentResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AttachmentResource"
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        }
      }
    },
    "/v1/me/authentication/factors": {
      "get": {
        "operationId": "v1.authentication-factors.index",
        "tags": ["AuthenticationFactor"],
        "responses": {
          "200": {
            "description": "Array of `AuthenticationFactorResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AuthenticationFactorResource"
                      }
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/me/authentication/recovery-codes": {
      "post": {
        "operationId": "v1.authentication-factors.recovery-codes.rotate",
        "tags": ["AuthenticationFactor"],
        "parameters": [
          {
            "name": "X-Step-Up-Token",
            "in": "header",
            "required": true,
            "description": "A short-lived encrypted proof returned by a step-up endpoint.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "codes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": ["codes"]
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Pragma": {
                "schema": {
                  "type": "string",
                  "const": "no-cache"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      },
      "delete": {
        "operationId": "v1.authentication-factors.recovery-codes.destroy",
        "tags": ["AuthenticationFactor"],
        "parameters": [
          {
            "name": "X-Step-Up-Token",
            "in": "header",
            "required": true,
            "description": "A short-lived encrypted proof returned by a step-up endpoint.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Pragma": {
                "schema": {
                  "type": "string",
                  "const": "no-cache"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/auth/session": {
      "post": {
        "operationId": "v1.auth.session.store",
        "tags": ["AuthorizationSession"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "`UserResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/UserResource"
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          },
          "401": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "const": "invalid_client"
                    },
                    "error_description": {
                      "type": "string",
                      "const": "Client authentication failed."
                    }
                  },
                  "required": ["error", "error_description"]
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "schema": {
                  "type": "string",
                  "const": "Basic realm=\"oauth\""
                }
              },
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Pragma": {
                "schema": {
                  "type": "string",
                  "const": "no-cache"
                }
              }
            }
          }
        },
        "security": []
      },
      "delete": {
        "operationId": "v1.auth.session.destroy",
        "tags": ["AuthorizationSession"],
        "responses": {
          "204": {
            "description": "No content",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Pragma": {
                "schema": {
                  "type": "string",
                  "const": "no-cache"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/auth/sessions": {
      "delete": {
        "operationId": "v1.auth.sessions.destroy-all",
        "tags": ["AuthorizationSession"],
        "responses": {
          "204": {
            "description": "No content",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Pragma": {
                "schema": {
                  "type": "string",
                  "const": "no-cache"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/auth/session/email/verification-notification": {
      "post": {
        "operationId": "v1.auth.session.email.resend",
        "tags": ["AuthorizationSession"],
        "responses": {
          "202": {
            "description": "",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Pragma": {
                "schema": {
                  "type": "string",
                  "const": "no-cache"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/backlinks/{targetType}/{targetId}": {
      "get": {
        "operationId": "v1.references.backlinks",
        "tags": ["Backlink"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "targetType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "targetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated set of `BacklinkResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BacklinkResource"
                      }
                    },
                    "links": {
                      "type": "object",
                      "properties": {
                        "first": {
                          "type": ["string", "null"]
                        },
                        "last": {
                          "type": ["string", "null"]
                        },
                        "prev": {
                          "type": ["string", "null"]
                        },
                        "next": {
                          "type": ["string", "null"]
                        }
                      },
                      "required": ["first", "last", "prev", "next"]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "current_page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "from": {
                          "type": ["integer", "null"],
                          "minimum": 1
                        },
                        "last_page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "links": {
                          "type": "array",
                          "description": "Generated paginator links.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "url": {
                                "type": ["string", "null"]
                              },
                              "label": {
                                "type": "string"
                              },
                              "active": {
                                "type": "boolean"
                              }
                            },
                            "required": ["url", "label", "active"]
                          }
                        },
                        "path": {
                          "type": ["string", "null"],
                          "description": "Base path for paginator generated URLs."
                        },
                        "per_page": {
                          "type": "integer",
                          "description": "Number of items shown per page.",
                          "minimum": 0
                        },
                        "to": {
                          "type": ["integer", "null"],
                          "description": "Number of the last item in the slice.",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "description": "Total number of items being paginated.",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "current_page",
                        "from",
                        "last_page",
                        "links",
                        "path",
                        "per_page",
                        "to",
                        "total"
                      ]
                    }
                  },
                  "required": ["data", "links", "meta"]
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/references/{entityReference}/open": {
      "get": {
        "operationId": "v1.references.open",
        "tags": ["Backlink"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "entityReference",
            "in": "path",
            "required": true,
            "description": "The entity reference ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/auth/session/oauth/authorize": {
      "post": {
        "operationId": "v1.auth.session.oauth.authorize",
        "tags": ["BffOAuthSession"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "scopes": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "profile:read",
                        "profile:write",
                        "desks:read",
                        "desks:write",
                        "organizations:read",
                        "organizations:write",
                        "projects:read",
                        "projects:write",
                        "tasks:read",
                        "tasks:write",
                        "wiki:read",
                        "wiki:write",
                        "attachments:read",
                        "attachments:write",
                        "references:read",
                        "references:write",
                        "notifications:read",
                        "notifications:write",
                        "offline_access"
                      ]
                    },
                    "minItems": 1
                  }
                },
                "required": ["scopes"]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "authorization_url": {
                          "type": "string"
                        },
                        "expires_in": {
                          "type": "integer",
                          "const": 300
                        }
                      },
                      "required": ["authorization_url", "expires_in"]
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        }
      }
    },
    "/v1/auth/session/oauth/callback": {
      "post": {
        "operationId": "v1.auth.session.oauth.callback",
        "tags": ["BffOAuthSession"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "maxLength": 8192
                  },
                  "state": {
                    "type": "string",
                    "maxLength": 255
                  }
                },
                "required": ["code", "state"]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "authenticated": {
                          "type": "boolean"
                        },
                        "expires_at": {
                          "type": "string"
                        }
                      },
                      "required": ["authenticated", "expires_at"]
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/auth/session/oauth/token": {
      "post": {
        "operationId": "v1.auth.session.oauth.token",
        "tags": ["BffOAuthSession"],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/auth/session/oauth/grant": {
      "delete": {
        "operationId": "v1.auth.session.oauth.revoke",
        "tags": ["BffOAuthSession"],
        "responses": {
          "204": {
            "description": "No content",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Pragma": {
                "schema": {
                  "type": "string",
                  "const": "no-cache"
                }
              },
              "Vary": {
                "schema": {
                  "type": "string",
                  "const": "Authorization, Cookie"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/custom-references": {
      "get": {
        "operationId": "v1.custom-references.index",
        "tags": ["CustomReference"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "archived",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated set of `CustomReferenceResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CustomReferenceResource"
                      }
                    },
                    "links": {
                      "type": "object",
                      "properties": {
                        "first": {
                          "type": ["string", "null"]
                        },
                        "last": {
                          "type": ["string", "null"]
                        },
                        "prev": {
                          "type": ["string", "null"]
                        },
                        "next": {
                          "type": ["string", "null"]
                        }
                      },
                      "required": ["first", "last", "prev", "next"]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "current_page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "from": {
                          "type": ["integer", "null"],
                          "minimum": 1
                        },
                        "last_page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "links": {
                          "type": "array",
                          "description": "Generated paginator links.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "url": {
                                "type": ["string", "null"]
                              },
                              "label": {
                                "type": "string"
                              },
                              "active": {
                                "type": "boolean"
                              }
                            },
                            "required": ["url", "label", "active"]
                          }
                        },
                        "path": {
                          "type": ["string", "null"],
                          "description": "Base path for paginator generated URLs."
                        },
                        "per_page": {
                          "type": "integer",
                          "description": "Number of items shown per page.",
                          "minimum": 0
                        },
                        "to": {
                          "type": ["integer", "null"],
                          "description": "Number of the last item in the slice.",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "description": "Total number of items being paginated.",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "current_page",
                        "from",
                        "last_page",
                        "links",
                        "path",
                        "per_page",
                        "to",
                        "total"
                      ]
                    }
                  },
                  "required": ["data", "links", "meta"]
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        }
      },
      "post": {
        "operationId": "v1.custom-references.store",
        "tags": ["CustomReference"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "A retry key retained for 24 hours.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomReferenceRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "`CustomReferenceResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/CustomReferenceResource"
                        },
                        {
                          "type": "object",
                          "required": ["targets"]
                        }
                      ]
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/custom-references/{customReference}": {
      "get": {
        "operationId": "v1.custom-references.show",
        "tags": ["CustomReference"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "customReference",
            "in": "path",
            "required": true,
            "description": "The custom reference ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "`CustomReferenceResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/CustomReferenceResource"
                        },
                        {
                          "type": "object",
                          "required": ["targets"]
                        }
                      ]
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      },
      "patch": {
        "operationId": "v1.custom-references.update",
        "tags": ["CustomReference"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "customReference",
            "in": "path",
            "required": true,
            "description": "The custom reference ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomReferenceRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "`CustomReferenceResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/CustomReferenceResource"
                        },
                        {
                          "type": "object",
                          "required": ["targets"]
                        }
                      ]
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        }
      },
      "delete": {
        "operationId": "v1.custom-references.destroy",
        "tags": ["CustomReference"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "customReference",
            "in": "path",
            "required": true,
            "description": "The custom reference ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/custom-references/{customReference}/archive": {
      "post": {
        "operationId": "v1.custom-references.archive",
        "tags": ["CustomReference"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "customReference",
            "in": "path",
            "required": true,
            "description": "The custom reference ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "`CustomReferenceResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/CustomReferenceResource"
                        },
                        {
                          "type": "object",
                          "required": ["targets"]
                        }
                      ]
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/custom-references/{customReference}/unarchive": {
      "post": {
        "operationId": "v1.custom-references.unarchive",
        "tags": ["CustomReference"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "customReference",
            "in": "path",
            "required": true,
            "description": "The custom reference ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "`CustomReferenceResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/CustomReferenceResource"
                        },
                        {
                          "type": "object",
                          "required": ["targets"]
                        }
                      ]
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/custom-references/{deletedCustomReference}/restore": {
      "post": {
        "operationId": "v1.custom-references.restore",
        "tags": ["CustomReference"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "deletedCustomReference",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "`CustomReferenceResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/CustomReferenceResource"
                        },
                        {
                          "type": "object",
                          "required": ["targets"]
                        }
                      ]
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/desks": {
      "get": {
        "operationId": "v1.desks.index",
        "tags": ["Desk"],
        "responses": {
          "200": {
            "description": "Array of `DeskResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DeskResource"
                      }
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      },
      "post": {
        "operationId": "v1.desks.store",
        "tags": ["Desk"],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "A client-generated key that makes this create operation safely retryable for 24 hours.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreDeskRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "`DeskResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DeskResource"
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        }
      }
    },
    "/v1/desks/{desk}": {
      "get": {
        "operationId": "v1.desks.show",
        "tags": ["Desk"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "`DeskResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DeskResource"
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      },
      "patch": {
        "operationId": "v1.desks.update",
        "tags": ["Desk"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": true,
            "description": "The current strong ETag returned by the Desk detail endpoint.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDeskRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "`DeskResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DeskResource"
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        }
      },
      "delete": {
        "operationId": "v1.desks.destroy",
        "tags": ["Desk"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": true,
            "description": "The current strong ETag returned by the Desk detail endpoint.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Step-Up-Token",
            "in": "header",
            "required": true,
            "description": "A short-lived encrypted proof returned by the password step-up endpoint.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "412": {
            "description": "",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/auth/email/verify/{id}/{hash}": {
      "get": {
        "operationId": "verification.verify",
        "tags": ["EmailVerification"],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "hash",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "verified": {
                          "type": "boolean"
                        }
                      },
                      "required": ["verified"]
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/v1/auth/email/verification-status": {
      "get": {
        "operationId": "v1.auth.email.status",
        "tags": ["EmailVerification"],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "verified": {
                          "type": "boolean"
                        }
                      },
                      "required": ["verified"]
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/auth/email/verification-notification": {
      "post": {
        "operationId": "v1.auth.email.resend",
        "tags": ["EmailVerification"],
        "responses": {
          "202": {
            "description": "",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/enter": {
      "post": {
        "operationId": "v1.desks.enter",
        "tags": ["EnterDesk"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "`UserSettingsResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/UserSettingsResource"
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          }
        }
      }
    },
    "/v1/desks/{desk}/markdown/preview": {
      "post": {
        "operationId": "v1.markdown.preview",
        "tags": ["MarkdownPreview"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "markdown": {
                    "type": ["string", "null"],
                    "maxLength": 50000
                  },
                  "organization_id": {
                    "type": ["string", "null"],
                    "format": "uuid"
                  },
                  "project_id": {
                    "type": ["string", "null"],
                    "format": "uuid"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "html": {
                          "type": "string"
                        },
                        "context": {
                          "type": "object",
                          "properties": {
                            "desk_id": {
                              "type": "string"
                            },
                            "organization_id": {
                              "type": ["string", "null"]
                            },
                            "project_id": {
                              "type": ["string", "null"]
                            }
                          },
                          "required": [
                            "desk_id",
                            "organization_id",
                            "project_id"
                          ]
                        }
                      },
                      "required": ["html", "context"]
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/meta": {
      "get": {
        "operationId": "v1.meta",
        "tags": ["Meta"],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "api_version": {
                          "type": "string"
                        },
                        "compatibility": {
                          "type": "object",
                          "properties": {
                            "supported_versions": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "minimum_client_contract": {
                              "type": "string"
                            },
                            "openapi_url": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "supported_versions",
                            "minimum_client_contract",
                            "openapi_url"
                          ]
                        },
                        "build": {
                          "type": "object",
                          "properties": {
                            "version": {
                              "type": "string"
                            },
                            "commit": {
                              "type": "string"
                            }
                          },
                          "required": ["version", "commit"]
                        },
                        "instance": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "web_url": {
                              "type": "string"
                            }
                          },
                          "required": ["id", "name", "web_url"]
                        },
                        "registration_enabled": {
                          "type": "boolean"
                        },
                        "uploads": {
                          "type": "object",
                          "properties": {
                            "max_bytes": {
                              "type": "string"
                            }
                          },
                          "required": ["max_bytes"]
                        },
                        "capabilities": {
                          "type": "object",
                          "properties": {
                            "organizations": {
                              "type": "boolean"
                            },
                            "projects": {
                              "type": "boolean"
                            },
                            "tasks": {
                              "type": "boolean"
                            },
                            "time_entries": {
                              "type": "boolean"
                            },
                            "comments": {
                              "type": "boolean"
                            },
                            "attachments": {
                              "type": "boolean"
                            },
                            "wiki": {
                              "type": "boolean"
                            },
                            "references": {
                              "type": "boolean"
                            },
                            "custom_references": {
                              "type": "boolean"
                            },
                            "search": {
                              "type": "boolean"
                            },
                            "notifications": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "organizations",
                            "projects",
                            "tasks",
                            "time_entries",
                            "comments",
                            "attachments",
                            "wiki",
                            "references",
                            "custom_references",
                            "search",
                            "notifications"
                          ]
                        },
                        "authentication": {
                          "type": "object",
                          "properties": {
                            "oauth2_authorization_code": {
                              "type": "boolean"
                            },
                            "pkce_methods": {
                              "type": "array",
                              "prefixItems": [
                                {
                                  "type": "string",
                                  "const": "S256"
                                }
                              ],
                              "minItems": 1,
                              "maxItems": 1,
                              "additionalItems": false
                            },
                            "metadata_url": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "oauth2_authorization_code",
                            "pkce_methods",
                            "metadata_url"
                          ]
                        }
                      },
                      "required": [
                        "api_version",
                        "compatibility",
                        "build",
                        "instance",
                        "registration_enabled",
                        "uploads",
                        "capabilities",
                        "authentication"
                      ]
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/v1/notifications": {
      "get": {
        "operationId": "v1.notifications.index",
        "tags": ["Notification"],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated set of `DeskNotificationResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DeskNotificationResource"
                      }
                    },
                    "links": {
                      "type": "object",
                      "properties": {
                        "first": {
                          "type": ["string", "null"]
                        },
                        "last": {
                          "type": ["string", "null"]
                        },
                        "prev": {
                          "type": ["string", "null"]
                        },
                        "next": {
                          "type": ["string", "null"]
                        }
                      },
                      "required": ["first", "last", "prev", "next"]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "current_page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "from": {
                          "type": ["integer", "null"],
                          "minimum": 1
                        },
                        "last_page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "links": {
                          "type": "array",
                          "description": "Generated paginator links.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "url": {
                                "type": ["string", "null"]
                              },
                              "label": {
                                "type": "string"
                              },
                              "active": {
                                "type": "boolean"
                              }
                            },
                            "required": ["url", "label", "active"]
                          }
                        },
                        "path": {
                          "type": ["string", "null"],
                          "description": "Base path for paginator generated URLs."
                        },
                        "per_page": {
                          "type": "integer",
                          "description": "Number of items shown per page.",
                          "minimum": 0
                        },
                        "to": {
                          "type": ["integer", "null"],
                          "description": "Number of the last item in the slice.",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "description": "Total number of items being paginated.",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "current_page",
                        "from",
                        "last_page",
                        "links",
                        "path",
                        "per_page",
                        "to",
                        "total"
                      ]
                    }
                  },
                  "required": ["data", "links", "meta"]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        }
      }
    },
    "/v1/notifications/unread-summary": {
      "get": {
        "operationId": "v1.notifications.summary",
        "tags": ["Notification"],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "unread": {
                          "type": "string"
                        },
                        "by_desk": {
                          "type": "string"
                        }
                      },
                      "required": ["unread", "by_desk"]
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/notifications": {
      "get": {
        "operationId": "v1.notifications.desk-index",
        "tags": ["Notification"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated set of `DeskNotificationResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DeskNotificationResource"
                      }
                    },
                    "links": {
                      "type": "object",
                      "properties": {
                        "first": {
                          "type": ["string", "null"]
                        },
                        "last": {
                          "type": ["string", "null"]
                        },
                        "prev": {
                          "type": ["string", "null"]
                        },
                        "next": {
                          "type": ["string", "null"]
                        }
                      },
                      "required": ["first", "last", "prev", "next"]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "current_page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "from": {
                          "type": ["integer", "null"],
                          "minimum": 1
                        },
                        "last_page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "links": {
                          "type": "array",
                          "description": "Generated paginator links.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "url": {
                                "type": ["string", "null"]
                              },
                              "label": {
                                "type": "string"
                              },
                              "active": {
                                "type": "boolean"
                              }
                            },
                            "required": ["url", "label", "active"]
                          }
                        },
                        "path": {
                          "type": ["string", "null"],
                          "description": "Base path for paginator generated URLs."
                        },
                        "per_page": {
                          "type": "integer",
                          "description": "Number of items shown per page.",
                          "minimum": 0
                        },
                        "to": {
                          "type": ["integer", "null"],
                          "description": "Number of the last item in the slice.",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "description": "Total number of items being paginated.",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "current_page",
                        "from",
                        "last_page",
                        "links",
                        "path",
                        "per_page",
                        "to",
                        "total"
                      ]
                    }
                  },
                  "required": ["data", "links", "meta"]
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/notifications/unread-summary": {
      "get": {
        "operationId": "v1.notifications.desk-summary",
        "tags": ["Notification"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "unread": {
                          "type": "string"
                        },
                        "by_desk": {
                          "type": "string"
                        }
                      },
                      "required": ["unread", "by_desk"]
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        }
      }
    },
    "/v1/notifications/{notification}/read": {
      "post": {
        "operationId": "v1.notifications.read",
        "tags": ["Notification"],
        "parameters": [
          {
            "name": "notification",
            "in": "path",
            "required": true,
            "description": "The notification ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "`DeskNotificationResource`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeskNotificationResource"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/notifications/read-all": {
      "post": {
        "operationId": "v1.notifications.read-all",
        "tags": ["Notification"],
        "responses": {
          "204": {
            "description": "No content"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/openapi.json": {
      "get": {
        "operationId": "v1.openapi",
        "tags": ["OpenApi"],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": ["object", "null"]
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/v1/desks/{desk}/organizations": {
      "get": {
        "operationId": "v1.organizations.index",
        "tags": ["Organization"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[type]",
            "in": "query",
            "description": "Limit results to customer or company organizations.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[archived]",
            "in": "query",
            "description": "Archive state: active, with, or only.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Sort by name or created_at; prefix with - for descending order.",
            "schema": {
              "type": "string",
              "default": "name"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated set of `OrganizationSummaryResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/OrganizationSummaryResource"
                      }
                    },
                    "links": {
                      "type": "object",
                      "properties": {
                        "first": {
                          "type": ["string", "null"]
                        },
                        "last": {
                          "type": ["string", "null"]
                        },
                        "prev": {
                          "type": ["string", "null"]
                        },
                        "next": {
                          "type": ["string", "null"]
                        }
                      },
                      "required": ["first", "last", "prev", "next"]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "current_page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "from": {
                          "type": ["integer", "null"],
                          "minimum": 1
                        },
                        "last_page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "links": {
                          "type": "array",
                          "description": "Generated paginator links.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "url": {
                                "type": ["string", "null"]
                              },
                              "label": {
                                "type": "string"
                              },
                              "active": {
                                "type": "boolean"
                              }
                            },
                            "required": ["url", "label", "active"]
                          }
                        },
                        "path": {
                          "type": ["string", "null"],
                          "description": "Base path for paginator generated URLs."
                        },
                        "per_page": {
                          "type": "integer",
                          "description": "Number of items shown per page.",
                          "minimum": 0
                        },
                        "to": {
                          "type": ["integer", "null"],
                          "description": "Number of the last item in the slice.",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "description": "Total number of items being paginated.",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "current_page",
                        "from",
                        "last_page",
                        "links",
                        "path",
                        "per_page",
                        "to",
                        "total"
                      ]
                    }
                  },
                  "required": ["data", "links", "meta"]
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        }
      },
      "post": {
        "operationId": "v1.organizations.store",
        "tags": ["Organization"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "A client-generated key that makes this create operation safely retryable for 24 hours.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreOrganizationRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "`OrganizationResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/OrganizationResource"
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/organizations/by-slug/{slug}": {
      "get": {
        "operationId": "v1.organizations.show-by-slug",
        "tags": ["Organization"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include",
            "in": "query",
            "description": "Comma-separated related resources: projects, tasks, attachments.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "`OrganizationResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/OrganizationResource"
                        },
                        {
                          "type": "object",
                          "required": ["projects", "tasks", "attachments"]
                        }
                      ]
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/organizations/{organization}": {
      "get": {
        "operationId": "v1.organizations.show",
        "tags": ["Organization"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "The organization ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "include",
            "in": "query",
            "description": "Comma-separated related resources: projects, tasks, attachments.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "`OrganizationResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/OrganizationResource"
                        },
                        {
                          "type": "object",
                          "required": ["projects", "tasks", "attachments"]
                        }
                      ]
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      },
      "patch": {
        "operationId": "v1.organizations.update",
        "tags": ["Organization"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "The organization ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": true,
            "description": "The current strong ETag returned by the Organization detail endpoint.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateOrganizationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "`OrganizationResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/OrganizationResource"
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        }
      },
      "delete": {
        "operationId": "v1.organizations.destroy",
        "tags": ["Organization"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "The organization ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": true,
            "description": "The current strong Organization ETag.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "412": {
            "description": "",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/organizations/{organization}/archive": {
      "post": {
        "operationId": "v1.organizations.archive",
        "tags": ["Organization"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "The organization ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": true,
            "description": "The current strong Organization ETag.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "`OrganizationResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/OrganizationResource"
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/organizations/{organization}/restore": {
      "post": {
        "operationId": "v1.organizations.restore",
        "tags": ["Organization"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "organization",
            "in": "path",
            "required": true,
            "description": "The organization ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": true,
            "description": "The current strong Organization ETag.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "`OrganizationResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/OrganizationResource"
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/me/authentication/passkeys/options": {
      "post": {
        "operationId": "v1.authentication-factors.passkeys.options",
        "tags": ["Passkey"],
        "parameters": [
          {
            "name": "X-Step-Up-Token",
            "in": "header",
            "required": true,
            "description": "A short-lived encrypted proof returned by a step-up endpoint.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "challenge_token": {
                          "type": "string"
                        },
                        "expires_in": {
                          "type": "integer"
                        },
                        "public_key": {
                          "type": "object",
                          "additionalProperties": {}
                        }
                      },
                      "required": [
                        "challenge_token",
                        "expires_in",
                        "public_key"
                      ]
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Pragma": {
                "schema": {
                  "type": "string",
                  "const": "no-cache"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/me/authentication/passkeys": {
      "post": {
        "operationId": "v1.authentication-factors.passkeys.store",
        "tags": ["Passkey"],
        "parameters": [
          {
            "name": "X-Step-Up-Token",
            "in": "header",
            "required": true,
            "description": "A short-lived encrypted proof returned by a step-up endpoint.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompletePasskeyRegistrationRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "`AuthenticationFactorResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AuthenticationFactorResource"
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/me/authentication/passkeys/{factor}": {
      "delete": {
        "operationId": "v1.authentication-factors.passkeys.destroy",
        "tags": ["Passkey"],
        "parameters": [
          {
            "name": "factor",
            "in": "path",
            "required": true,
            "description": "The factor ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Step-Up-Token",
            "in": "header",
            "required": true,
            "description": "A short-lived encrypted proof returned by a step-up endpoint.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Pragma": {
                "schema": {
                  "type": "string",
                  "const": "no-cache"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          }
        }
      }
    },
    "/v1/me/step-up/passkey/options": {
      "post": {
        "operationId": "v1.step-up.passkey.options",
        "tags": ["PasskeyStepUp"],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "challenge_token": {
                          "type": "string"
                        },
                        "expires_in": {
                          "type": "integer"
                        },
                        "public_key": {
                          "type": "object",
                          "additionalProperties": {}
                        }
                      },
                      "required": [
                        "challenge_token",
                        "expires_in",
                        "public_key"
                      ]
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Pragma": {
                "schema": {
                  "type": "string",
                  "const": "no-cache"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/me/step-up/passkey": {
      "post": {
        "operationId": "v1.step-up.passkey.verify",
        "tags": ["PasskeyStepUp"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompletePasskeyStepUpRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "token": {
                          "type": "string"
                        },
                        "expires_at": {
                          "type": "string"
                        }
                      },
                      "required": ["token", "expires_at"]
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Pragma": {
                "schema": {
                  "type": "string",
                  "const": "no-cache"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/me/password": {
      "put": {
        "operationId": "v1.password.update",
        "tags": ["Password"],
        "parameters": [
          {
            "name": "X-Step-Up-Token",
            "in": "header",
            "required": true,
            "description": "A short-lived encrypted proof returned by a step-up endpoint.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePasswordRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No content",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Pragma": {
                "schema": {
                  "type": "string",
                  "const": "no-cache"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/auth/password/forgot": {
      "post": {
        "operationId": "v1.auth.password.forgot",
        "tags": ["PasswordRecovery"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email"
                  }
                },
                "required": ["email"]
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        },
        "security": []
      }
    },
    "/v1/auth/password/reset": {
      "post": {
        "operationId": "v1.auth.password.reset",
        "tags": ["PasswordRecovery"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResetPasswordRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No content",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        },
        "security": []
      }
    },
    "/v1/me": {
      "get": {
        "operationId": "v1.profile.show",
        "tags": ["Profile"],
        "responses": {
          "200": {
            "description": "`UserResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/UserResource"
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      },
      "patch": {
        "operationId": "v1.profile.update",
        "tags": ["Profile"],
        "parameters": [
          {
            "name": "X-Step-Up-Token",
            "in": "header",
            "required": true,
            "description": "A short-lived encrypted proof returned by a step-up endpoint.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProfileRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "`UserResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/UserResource"
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/projects": {
      "get": {
        "operationId": "v1.projects.index",
        "tags": ["Project"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[organization_id]",
            "in": "query",
            "description": "Limit results to one organization UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "filter[parent_project_id]",
            "in": "query",
            "description": "Limit results to direct children of one project UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "filter[roots]",
            "in": "query",
            "description": "Return only root projects when true.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "filter[archived]",
            "in": "query",
            "description": "Archive state: active, with, or only.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Sort by name, created_at, or updated_at; prefix with - for descending order.",
            "schema": {
              "type": "string",
              "default": "name"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated set of `ProjectSummaryResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ProjectSummaryResource"
                      }
                    },
                    "links": {
                      "type": "object",
                      "properties": {
                        "first": {
                          "type": ["string", "null"]
                        },
                        "last": {
                          "type": ["string", "null"]
                        },
                        "prev": {
                          "type": ["string", "null"]
                        },
                        "next": {
                          "type": ["string", "null"]
                        }
                      },
                      "required": ["first", "last", "prev", "next"]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "current_page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "from": {
                          "type": ["integer", "null"],
                          "minimum": 1
                        },
                        "last_page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "links": {
                          "type": "array",
                          "description": "Generated paginator links.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "url": {
                                "type": ["string", "null"]
                              },
                              "label": {
                                "type": "string"
                              },
                              "active": {
                                "type": "boolean"
                              }
                            },
                            "required": ["url", "label", "active"]
                          }
                        },
                        "path": {
                          "type": ["string", "null"],
                          "description": "Base path for paginator generated URLs."
                        },
                        "per_page": {
                          "type": "integer",
                          "description": "Number of items shown per page.",
                          "minimum": 0
                        },
                        "to": {
                          "type": ["integer", "null"],
                          "description": "Number of the last item in the slice.",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "description": "Total number of items being paginated.",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "current_page",
                        "from",
                        "last_page",
                        "links",
                        "path",
                        "per_page",
                        "to",
                        "total"
                      ]
                    }
                  },
                  "required": ["data", "links", "meta"]
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        }
      },
      "post": {
        "operationId": "v1.projects.store",
        "tags": ["Project"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "A retry key retained for 24 hours.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreProjectRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "`ProjectResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ProjectResource"
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/projects/tree": {
      "get": {
        "operationId": "v1.projects.tree",
        "tags": ["Project"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "filter[archived]",
            "in": "query",
            "description": "Archive state: active, with, or only.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Sort each hierarchy level by name, created_at, or updated_at; prefix with - for descending order.",
            "schema": {
              "type": "string",
              "default": "name"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/projects/by-slug/{slug}": {
      "get": {
        "operationId": "v1.projects.show-by-slug",
        "tags": ["Project"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include",
            "in": "query",
            "description": "Comma-separated related resources: attachments.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "`ProjectResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/ProjectResource"
                        },
                        {
                          "type": "object",
                          "required": ["attachments"]
                        }
                      ]
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/projects/{project}": {
      "get": {
        "operationId": "v1.projects.show",
        "tags": ["Project"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "description": "The project ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "include",
            "in": "query",
            "description": "Comma-separated related resources: attachments.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "`ProjectResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/ProjectResource"
                        },
                        {
                          "type": "object",
                          "required": ["attachments"]
                        }
                      ]
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      },
      "patch": {
        "operationId": "v1.projects.update",
        "tags": ["Project"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "description": "The project ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": true,
            "description": "The current strong Project ETag.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProjectRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "`ProjectResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ProjectResource"
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        }
      },
      "delete": {
        "operationId": "v1.projects.destroy",
        "tags": ["Project"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "description": "The project ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": true,
            "description": "The current strong Project ETag.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "409": {
            "description": "",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/projects/{project}/archive": {
      "post": {
        "operationId": "v1.projects.archive",
        "tags": ["Project"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "description": "The project ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": true,
            "description": "The current strong Project ETag.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "`ProjectResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ProjectResource"
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/projects/{project}/restore": {
      "post": {
        "operationId": "v1.projects.restore",
        "tags": ["Project"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "project",
            "in": "path",
            "required": true,
            "description": "The project ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": true,
            "description": "The current strong Project ETag.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "`ProjectResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ProjectResource"
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/ready": {
      "get": {
        "operationId": "ready",
        "tags": ["Readiness"],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/v1/me/step-up/recovery-code": {
      "post": {
        "operationId": "v1.step-up.recovery-code",
        "tags": ["RecoveryCodeStepUp"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UseRecoveryCodeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "token": {
                          "type": "string"
                        },
                        "expires_at": {
                          "type": "string"
                        }
                      },
                      "required": ["token", "expires_at"]
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              },
              "Pragma": {
                "schema": {
                  "type": "string",
                  "const": "no-cache"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/reference-suggestions": {
      "get": {
        "operationId": "v1.references.suggestions",
        "tags": ["ReferenceSuggestion"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "types[]",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "Reference alias or resource search term.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum suggestions per source, from 1 to 50.",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "organization_id",
            "in": "query",
            "description": "Limit suggestions to an organization context.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project_id",
            "in": "query",
            "description": "Limit suggestions to a project context.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReferenceSuggestionResponseData"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/auth/register": {
      "post": {
        "operationId": "v1.auth.register",
        "tags": ["Registration"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "`UserResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/UserResource"
                        },
                        {
                          "type": "object",
                          "required": ["settings"]
                        }
                      ]
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        },
        "security": []
      }
    },
    "/v1/settings": {
      "get": {
        "operationId": "v1.runtime-settings",
        "tags": ["RuntimeSettings"],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "timezone": {
                          "type": "string"
                        },
                        "date_format": {
                          "type": "string"
                        },
                        "default_task_prefix": {
                          "type": "string"
                        },
                        "notifications": {
                          "type": "array",
                          "prefixItems": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "const": "task_due_today"
                                },
                                "enabled": {
                                  "type": "boolean"
                                },
                                "schedule": {
                                  "type": "string",
                                  "const": "daily"
                                },
                                "local_time": {
                                  "type": "string",
                                  "const": "08:00"
                                }
                              },
                              "required": [
                                "kind",
                                "enabled",
                                "schedule",
                                "local_time"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "const": "task_overdue"
                                },
                                "enabled": {
                                  "type": "boolean"
                                },
                                "schedule": {
                                  "type": "string",
                                  "const": "daily"
                                },
                                "local_time": {
                                  "type": "string",
                                  "const": "08:00"
                                }
                              },
                              "required": [
                                "kind",
                                "enabled",
                                "schedule",
                                "local_time"
                              ]
                            }
                          ],
                          "minItems": 2,
                          "maxItems": 2,
                          "additionalItems": false
                        }
                      },
                      "required": [
                        "timezone",
                        "date_format",
                        "default_task_prefix",
                        "notifications"
                      ]
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/search": {
      "get": {
        "operationId": "v1.search.global",
        "tags": ["Search"],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "Search query or exact task key.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "types[]",
            "in": "query",
            "description": "Resource types to search.",
            "schema": {
              "type": "array",
              "items": {}
            }
          },
          {
            "name": "desk_ids[]",
            "in": "query",
            "description": "Limit search to accessible Desk UUIDs.",
            "schema": {
              "type": "array",
              "items": {}
            }
          },
          {
            "name": "archived",
            "in": "query",
            "description": "Archive state: exclude, include, or only.",
            "schema": {
              "type": "string",
              "default": "exclude"
            }
          },
          {
            "name": "task_status",
            "in": "query",
            "description": "Limit task results to NEW or DONE.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "One-based page applied to every requested group.",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "description": "Results per group, from 1 to 50.",
            "schema": {
              "type": "integer",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResponseData"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/search/grouped": {
      "get": {
        "operationId": "v1.search.global-grouped",
        "tags": ["Search"],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "Search query or exact task key.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "types[]",
            "in": "query",
            "description": "Resource types to search.",
            "schema": {
              "type": "array",
              "items": {}
            }
          },
          {
            "name": "desk_ids[]",
            "in": "query",
            "description": "Limit search to accessible Desk UUIDs.",
            "schema": {
              "type": "array",
              "items": {}
            }
          },
          {
            "name": "archived",
            "in": "query",
            "description": "Archive state: exclude, include, or only.",
            "schema": {
              "type": "string",
              "default": "exclude"
            }
          },
          {
            "name": "task_status",
            "in": "query",
            "description": "Limit task results to NEW or DONE.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "One-based page applied to every requested group.",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Compact results per group, from 1 to 20.",
            "schema": {
              "type": "integer",
              "default": 5
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResponseData"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/search": {
      "get": {
        "operationId": "v1.search.desk",
        "tags": ["Search"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "Search query or exact task key.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "types[]",
            "in": "query",
            "description": "Resource types to search.",
            "schema": {
              "type": "array",
              "items": {}
            }
          },
          {
            "name": "archived",
            "in": "query",
            "description": "Archive state: exclude, include, or only.",
            "schema": {
              "type": "string",
              "default": "exclude"
            }
          },
          {
            "name": "task_status",
            "in": "query",
            "description": "Limit task results to NEW or DONE.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "One-based page applied to every requested group.",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "description": "Results per group, from 1 to 50.",
            "schema": {
              "type": "integer",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResponseData"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/search/grouped": {
      "get": {
        "operationId": "v1.search.desk-grouped",
        "tags": ["Search"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "Search query or exact task key.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "types[]",
            "in": "query",
            "description": "Resource types to search.",
            "schema": {
              "type": "array",
              "items": {}
            }
          },
          {
            "name": "archived",
            "in": "query",
            "description": "Archive state: exclude, include, or only.",
            "schema": {
              "type": "string",
              "default": "exclude"
            }
          },
          {
            "name": "task_status",
            "in": "query",
            "description": "Limit task results to NEW or DONE.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "One-based page applied to every requested group.",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Compact results per group, from 1 to 20.",
            "schema": {
              "type": "integer",
              "default": 5
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResponseData"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/me/step-up/password": {
      "post": {
        "operationId": "v1.step-up.password",
        "tags": ["StepUp"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmPasswordRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "token": {
                          "type": "string"
                        },
                        "expires_at": {
                          "type": "string"
                        },
                        "authentication_methods": {
                          "type": "array",
                          "prefixItems": [
                            {
                              "type": "string",
                              "const": "pwd"
                            }
                          ],
                          "minItems": 1,
                          "maxItems": 1,
                          "additionalItems": false
                        }
                      },
                      "required": [
                        "token",
                        "expires_at",
                        "authentication_methods"
                      ]
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/tasks": {
      "get": {
        "operationId": "v1.tasks.index",
        "tags": ["Task"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[status]",
            "in": "query",
            "description": "Limit results to NEW or DONE tasks.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[organization_id]",
            "in": "query",
            "description": "Limit results to one organization UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "filter[project_id]",
            "in": "query",
            "description": "Limit results to one project UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "filter[direct]",
            "in": "query",
            "description": "Return only tasks without a project when true; combine with organization_id for direct organization tasks.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "filter[inbox]",
            "in": "query",
            "description": "Return only tasks without organization or project context when true.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "filter[archived]",
            "in": "query",
            "description": "Archive state: active, with, or only.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[due]",
            "in": "query",
            "description": "Due-date state: today, overdue, soon (the next seven days), future (after seven days), or none.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Use default for workflow ordering, or sort by updated_at, created_at, due_date, public_key, or title; prefix with - for descending order.",
            "schema": {
              "type": "string",
              "default": "default"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated set of `TaskSummaryResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TaskSummaryResource"
                      }
                    },
                    "links": {
                      "type": "object",
                      "properties": {
                        "first": {
                          "type": ["string", "null"]
                        },
                        "last": {
                          "type": ["string", "null"]
                        },
                        "prev": {
                          "type": ["string", "null"]
                        },
                        "next": {
                          "type": ["string", "null"]
                        }
                      },
                      "required": ["first", "last", "prev", "next"]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "current_page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "from": {
                          "type": ["integer", "null"],
                          "minimum": 1
                        },
                        "last_page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "links": {
                          "type": "array",
                          "description": "Generated paginator links.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "url": {
                                "type": ["string", "null"]
                              },
                              "label": {
                                "type": "string"
                              },
                              "active": {
                                "type": "boolean"
                              }
                            },
                            "required": ["url", "label", "active"]
                          }
                        },
                        "path": {
                          "type": ["string", "null"],
                          "description": "Base path for paginator generated URLs."
                        },
                        "per_page": {
                          "type": "integer",
                          "description": "Number of items shown per page.",
                          "minimum": 0
                        },
                        "to": {
                          "type": ["integer", "null"],
                          "description": "Number of the last item in the slice.",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "description": "Total number of items being paginated.",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "current_page",
                        "from",
                        "last_page",
                        "links",
                        "path",
                        "per_page",
                        "to",
                        "total"
                      ]
                    }
                  },
                  "required": ["data", "links", "meta"]
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        }
      },
      "post": {
        "operationId": "v1.tasks.store",
        "tags": ["Task"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "A retry key retained for 24 hours.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreTaskRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "`TaskResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TaskResource"
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/tasks/counts": {
      "get": {
        "operationId": "v1.tasks.counts",
        "tags": ["Task"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "filter[status]",
            "in": "query",
            "description": "Limit results to NEW or DONE tasks.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[organization_id]",
            "in": "query",
            "description": "Limit results to one organization UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "filter[project_id]",
            "in": "query",
            "description": "Limit results to one project UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "filter[direct]",
            "in": "query",
            "description": "Count only tasks without a project when true; combine with organization_id for direct organization tasks.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "filter[inbox]",
            "in": "query",
            "description": "Count only tasks without organization or project context when true.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "filter[archived]",
            "in": "query",
            "description": "Archive state: active, with, or only.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter[due]",
            "in": "query",
            "description": "Due-date state: today, overdue, soon (the next seven days), future (after seven days), or none.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "NEW": {
                          "type": "integer"
                        },
                        "DONE": {
                          "type": "integer"
                        }
                      },
                      "required": ["NEW", "DONE"]
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/tasks/by-key/{publicKey}": {
      "get": {
        "operationId": "v1.tasks.show-by-key",
        "tags": ["Task"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "publicKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include",
            "in": "query",
            "description": "Comma-separated related resources: comments, time_entries, attachments.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "`TaskResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TaskResource"
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/tasks/{task}": {
      "get": {
        "operationId": "v1.tasks.show",
        "tags": ["Task"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "task",
            "in": "path",
            "required": true,
            "description": "The task ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "include",
            "in": "query",
            "description": "Comma-separated related resources: comments, time_entries, attachments.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "`TaskResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TaskResource"
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      },
      "patch": {
        "operationId": "v1.tasks.update",
        "tags": ["Task"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "task",
            "in": "path",
            "required": true,
            "description": "The task ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": true,
            "description": "The current strong Task ETag.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTaskRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "`TaskResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TaskResource"
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        }
      },
      "delete": {
        "operationId": "v1.tasks.destroy",
        "tags": ["Task"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "task",
            "in": "path",
            "required": true,
            "description": "The task ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": true,
            "description": "The current strong Task ETag.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/tasks/{task}/complete": {
      "post": {
        "operationId": "v1.tasks.complete",
        "tags": ["Task"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "task",
            "in": "path",
            "required": true,
            "description": "The task ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": true,
            "description": "The current strong Task ETag.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "`TaskResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TaskResource"
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/tasks/{task}/reopen": {
      "post": {
        "operationId": "v1.tasks.reopen",
        "tags": ["Task"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "task",
            "in": "path",
            "required": true,
            "description": "The task ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": true,
            "description": "The current strong Task ETag.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "`TaskResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TaskResource"
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/tasks/{task}/archive": {
      "post": {
        "operationId": "v1.tasks.archive",
        "tags": ["Task"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "task",
            "in": "path",
            "required": true,
            "description": "The task ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": true,
            "description": "The current strong Task ETag.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "`TaskResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TaskResource"
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/tasks/{task}/restore": {
      "post": {
        "operationId": "v1.tasks.restore",
        "tags": ["Task"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "task",
            "in": "path",
            "required": true,
            "description": "The task ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": true,
            "description": "The current strong Task ETag.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "`TaskResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TaskResource"
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/tasks/{deletedTask}/undelete": {
      "post": {
        "operationId": "v1.tasks.undelete",
        "tags": ["Task"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "deletedTask",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": true,
            "description": "The Task ETag held before deletion.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "`TaskResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TaskResource"
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/tasks/{task}/comments": {
      "get": {
        "operationId": "v1.task-comments.index",
        "tags": ["TaskComment"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "task",
            "in": "path",
            "required": true,
            "description": "The task ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Sort comments newest first or oldest first.",
            "schema": {
              "type": "string",
              "default": "newest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated set of `CommentResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/CommentResource"
                          },
                          {
                            "type": "object",
                            "required": ["attachments"]
                          }
                        ]
                      }
                    },
                    "links": {
                      "type": "object",
                      "properties": {
                        "first": {
                          "type": ["string", "null"]
                        },
                        "last": {
                          "type": ["string", "null"]
                        },
                        "prev": {
                          "type": ["string", "null"]
                        },
                        "next": {
                          "type": ["string", "null"]
                        }
                      },
                      "required": ["first", "last", "prev", "next"]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "current_page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "from": {
                          "type": ["integer", "null"],
                          "minimum": 1
                        },
                        "last_page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "links": {
                          "type": "array",
                          "description": "Generated paginator links.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "url": {
                                "type": ["string", "null"]
                              },
                              "label": {
                                "type": "string"
                              },
                              "active": {
                                "type": "boolean"
                              }
                            },
                            "required": ["url", "label", "active"]
                          }
                        },
                        "path": {
                          "type": ["string", "null"],
                          "description": "Base path for paginator generated URLs."
                        },
                        "per_page": {
                          "type": "integer",
                          "description": "Number of items shown per page.",
                          "minimum": 0
                        },
                        "to": {
                          "type": ["integer", "null"],
                          "description": "Number of the last item in the slice.",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "description": "Total number of items being paginated.",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "current_page",
                        "from",
                        "last_page",
                        "links",
                        "path",
                        "per_page",
                        "to",
                        "total"
                      ]
                    }
                  },
                  "required": ["data", "links", "meta"]
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        }
      },
      "post": {
        "operationId": "v1.task-comments.store",
        "tags": ["TaskComment"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "task",
            "in": "path",
            "required": true,
            "description": "The task ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "A retry key retained for 24 hours.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreCommentRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "`CommentResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/CommentResource"
                        },
                        {
                          "type": "object",
                          "required": ["attachments"]
                        }
                      ]
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/tasks/{task}/comments/{comment}": {
      "patch": {
        "operationId": "v1.task-comments.update",
        "tags": ["TaskComment"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "task",
            "in": "path",
            "required": true,
            "description": "The task ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "comment",
            "in": "path",
            "required": true,
            "description": "The comment ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCommentRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "`CommentResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CommentResource"
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        }
      },
      "delete": {
        "operationId": "v1.task-comments.destroy",
        "tags": ["TaskComment"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "task",
            "in": "path",
            "required": true,
            "description": "The task ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "comment",
            "in": "path",
            "required": true,
            "description": "The comment ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/tasks/{task}/comments/{deletedComment}/restore": {
      "post": {
        "operationId": "v1.task-comments.restore",
        "tags": ["TaskComment"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "task",
            "in": "path",
            "required": true,
            "description": "The task ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "deletedComment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "`CommentResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CommentResource"
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "409": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "description": "Error overview.",
                      "examples": ["Comment is not deleted."]
                    }
                  },
                  "required": ["message"]
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/tasks/{task}/time-entries": {
      "get": {
        "operationId": "v1.task-time-entries.index",
        "tags": ["TaskTimeEntry"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "task",
            "in": "path",
            "required": true,
            "description": "The task ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated set of `TaskTimeEntryResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TaskTimeEntryResource"
                      }
                    },
                    "links": {
                      "type": "object",
                      "properties": {
                        "first": {
                          "type": ["string", "null"]
                        },
                        "last": {
                          "type": ["string", "null"]
                        },
                        "prev": {
                          "type": ["string", "null"]
                        },
                        "next": {
                          "type": ["string", "null"]
                        }
                      },
                      "required": ["first", "last", "prev", "next"]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "current_page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "from": {
                          "type": ["integer", "null"],
                          "minimum": 1
                        },
                        "last_page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "links": {
                          "type": "array",
                          "description": "Generated paginator links.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "url": {
                                "type": ["string", "null"]
                              },
                              "label": {
                                "type": "string"
                              },
                              "active": {
                                "type": "boolean"
                              }
                            },
                            "required": ["url", "label", "active"]
                          }
                        },
                        "path": {
                          "type": ["string", "null"],
                          "description": "Base path for paginator generated URLs."
                        },
                        "per_page": {
                          "type": "integer",
                          "description": "Number of items shown per page.",
                          "minimum": 0
                        },
                        "to": {
                          "type": ["integer", "null"],
                          "description": "Number of the last item in the slice.",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "description": "Total number of items being paginated.",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "current_page",
                        "from",
                        "last_page",
                        "links",
                        "path",
                        "per_page",
                        "to",
                        "total"
                      ]
                    },
                    "total_time_minutes": {
                      "type": "integer"
                    }
                  },
                  "required": ["data", "links", "meta", "total_time_minutes"]
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        }
      },
      "post": {
        "operationId": "v1.task-time-entries.store",
        "tags": ["TaskTimeEntry"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "task",
            "in": "path",
            "required": true,
            "description": "The task ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "A retry key retained for 24 hours.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreTaskTimeEntryRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "`TaskTimeEntryResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TaskTimeEntryResource"
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/tasks/{task}/time-entries/{taskTimeEntry}": {
      "delete": {
        "operationId": "v1.task-time-entries.destroy",
        "tags": ["TaskTimeEntry"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "task",
            "in": "path",
            "required": true,
            "description": "The task ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "taskTimeEntry",
            "in": "path",
            "required": true,
            "description": "The task time entry ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/me/settings": {
      "get": {
        "operationId": "v1.settings.show",
        "tags": ["UserSettings"],
        "responses": {
          "200": {
            "description": "`UserSettingsResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/UserSettingsResource"
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      },
      "patch": {
        "operationId": "v1.settings.update",
        "tags": ["UserSettings"],
        "parameters": [
          {
            "name": "If-Match",
            "in": "header",
            "required": true,
            "description": "The current strong ETag returned by the settings endpoint.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUserSettingsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "`UserSettingsResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/UserSettingsResource"
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "412": {
            "description": "",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "428": {
            "description": "",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/wiki-pages": {
      "get": {
        "operationId": "v1.wiki-pages.index",
        "tags": ["WikiPage"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "organization_id",
            "in": "query",
            "description": "Limit results to one organization Wiki scope.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "project_id",
            "in": "query",
            "description": "Limit results to one project Wiki scope.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "Archive state: active, archived, or all.",
            "schema": {
              "type": "string",
              "default": "active"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Sort by title, created_at, or updated_at; prefix with - for descending order.",
            "schema": {
              "type": "string",
              "default": "title"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated set of `WikiPageSummaryResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WikiPageSummaryResource"
                      }
                    },
                    "links": {
                      "type": "object",
                      "properties": {
                        "first": {
                          "type": ["string", "null"]
                        },
                        "last": {
                          "type": ["string", "null"]
                        },
                        "prev": {
                          "type": ["string", "null"]
                        },
                        "next": {
                          "type": ["string", "null"]
                        }
                      },
                      "required": ["first", "last", "prev", "next"]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "current_page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "from": {
                          "type": ["integer", "null"],
                          "minimum": 1
                        },
                        "last_page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "links": {
                          "type": "array",
                          "description": "Generated paginator links.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "url": {
                                "type": ["string", "null"]
                              },
                              "label": {
                                "type": "string"
                              },
                              "active": {
                                "type": "boolean"
                              }
                            },
                            "required": ["url", "label", "active"]
                          }
                        },
                        "path": {
                          "type": ["string", "null"],
                          "description": "Base path for paginator generated URLs."
                        },
                        "per_page": {
                          "type": "integer",
                          "description": "Number of items shown per page.",
                          "minimum": 0
                        },
                        "to": {
                          "type": ["integer", "null"],
                          "description": "Number of the last item in the slice.",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "description": "Total number of items being paginated.",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "current_page",
                        "from",
                        "last_page",
                        "links",
                        "path",
                        "per_page",
                        "to",
                        "total"
                      ]
                    },
                    "parent_options": {
                      "type": "array",
                      "items": {}
                    }
                  },
                  "required": ["data", "links", "meta", "parent_options"]
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        }
      },
      "post": {
        "operationId": "v1.wiki-pages.store",
        "tags": ["WikiPage"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "A retry key retained for 24 hours.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreWikiPageRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "`WikiPageResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/WikiPageResource"
                        },
                        {
                          "type": "object",
                          "required": ["children", "attachments"]
                        }
                      ]
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/wiki-pages/tree": {
      "get": {
        "operationId": "v1.wiki-pages.tree",
        "tags": ["WikiPage"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "organization_id",
            "in": "query",
            "description": "Limit the tree to one organization Wiki scope.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "project_id",
            "in": "query",
            "description": "Limit the tree to one project Wiki scope.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Array of `WikiPageTreeResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WikiPageTreeResource"
                      }
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/wiki-pages/{wikiPage}": {
      "get": {
        "operationId": "v1.wiki-pages.show",
        "tags": ["WikiPage"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wikiPage",
            "in": "path",
            "required": true,
            "description": "The wiki page ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "`WikiPageResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/WikiPageResource"
                        },
                        {
                          "type": "object",
                          "required": ["children", "attachments"]
                        }
                      ]
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      },
      "patch": {
        "operationId": "v1.wiki-pages.update",
        "tags": ["WikiPage"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wikiPage",
            "in": "path",
            "required": true,
            "description": "The wiki page ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWikiPageRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "`WikiPageResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/WikiPageResource"
                        },
                        {
                          "type": "object",
                          "required": ["children", "attachments"]
                        }
                      ]
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          },
          "422": {
            "$ref": "#/components/responses/ValidationException"
          }
        }
      },
      "delete": {
        "operationId": "v1.wiki-pages.destroy",
        "tags": ["WikiPage"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wikiPage",
            "in": "path",
            "required": true,
            "description": "The wiki page ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/wiki-pages/{wikiPage}/archive": {
      "post": {
        "operationId": "v1.wiki-pages.archive",
        "tags": ["WikiPage"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wikiPage",
            "in": "path",
            "required": true,
            "description": "The wiki page ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "`WikiPageResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/WikiPageResource"
                        },
                        {
                          "type": "object",
                          "required": ["children", "attachments"]
                        }
                      ]
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/wiki-pages/{wikiPage}/restore": {
      "post": {
        "operationId": "v1.wiki-pages.restore",
        "tags": ["WikiPage"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "wikiPage",
            "in": "path",
            "required": true,
            "description": "The wiki page ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "`WikiPageResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/WikiPageResource"
                        },
                        {
                          "type": "object",
                          "required": ["children", "attachments"]
                        }
                      ]
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    },
    "/v1/desks/{desk}/wiki-pages/{deletedWikiPage}/undelete": {
      "post": {
        "operationId": "v1.wiki-pages.undelete",
        "tags": ["WikiPage"],
        "parameters": [
          {
            "name": "desk",
            "in": "path",
            "required": true,
            "description": "The desk ID",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "deletedWikiPage",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "A retry key retained for 24 hours.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "`WikiPageResource`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/WikiPageResource"
                        },
                        {
                          "type": "object",
                          "required": ["children", "attachments"]
                        }
                      ]
                    }
                  },
                  "required": ["data"]
                }
              }
            }
          },
          "409": {
            "description": "An error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "description": "Error overview.",
                      "examples": ["Wiki page is not deleted."]
                    }
                  },
                  "required": ["message"]
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/AuthorizationException"
          },
          "404": {
            "$ref": "#/components/responses/ModelNotFoundException"
          },
          "401": {
            "$ref": "#/components/responses/AuthenticationException"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "http": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "schemas": {
      "AttachmentResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "original_name": {
            "type": "string"
          },
          "mime_type": {
            "type": "string"
          },
          "size_bytes": {
            "type": "integer"
          },
          "checksum": {
            "type": "string"
          },
          "width": {
            "type": ["integer", "null"]
          },
          "height": {
            "type": ["integer", "null"]
          },
          "created_at": {
            "type": ["string", "null"],
            "format": "date-time"
          },
          "download_url": {
            "type": "string"
          },
          "inline_url": {
            "type": ["string", "null"]
          },
          "delete_url": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "original_name",
          "mime_type",
          "size_bytes",
          "checksum",
          "width",
          "height",
          "created_at",
          "download_url",
          "inline_url",
          "delete_url"
        ],
        "title": "AttachmentResource"
      },
      "AuthenticationFactorResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "label": {
            "type": ["string", "null"]
          },
          "enabled_at": {
            "type": "string"
          },
          "last_used_at": {
            "type": ["string", "null"]
          },
          "unused_recovery_codes_count": {
            "type": ["integer", "null"]
          }
        },
        "required": [
          "id",
          "type",
          "label",
          "enabled_at",
          "last_used_at",
          "unused_recovery_codes_count"
        ],
        "title": "AuthenticationFactorResource"
      },
      "BacklinkResource": {
        "type": "object",
        "properties": {
          "source": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "type": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "locator": {
                "type": "string"
              }
            },
            "required": ["id", "type", "label", "locator"]
          },
          "field_name": {
            "type": "string"
          },
          "mention_count": {
            "type": "integer"
          },
          "raw_matches": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "first_mentioned_at": {
            "type": "string"
          }
        },
        "required": [
          "source",
          "field_name",
          "mention_count",
          "raw_matches",
          "first_mentioned_at"
        ],
        "title": "BacklinkResource"
      },
      "CommentResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "body_markdown": {
            "type": "string"
          },
          "body_html": {
            "type": "string"
          },
          "author": {
            "type": ["object", "null"],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": ["id", "name"]
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AttachmentResource"
            }
          },
          "created_at": {
            "type": ["string", "null"],
            "format": "date-time"
          },
          "updated_at": {
            "type": ["string", "null"],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "body_markdown",
          "body_html",
          "author",
          "created_at",
          "updated_at"
        ],
        "title": "CommentResource"
      },
      "CompletePasskeyRegistrationRequest": {
        "type": "object",
        "properties": {
          "challenge_token": {
            "type": "string",
            "minLength": 64,
            "maxLength": 64
          },
          "label": {
            "type": ["string", "null"],
            "maxLength": 255
          },
          "credential": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "maxLength": 2048
              },
              "rawId": {
                "type": "string",
                "maxLength": 2048
              },
              "type": {
                "type": "string",
                "enum": ["public-key"]
              },
              "response": {
                "type": "object",
                "properties": {
                  "clientDataJSON": {
                    "type": "string"
                  },
                  "attestationObject": {
                    "type": "string"
                  },
                  "transports": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": ["clientDataJSON", "attestationObject"]
              },
              "authenticatorAttachment": {
                "type": ["string", "null"]
              },
              "clientExtensionResults": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": ["id", "rawId", "type", "response"]
          }
        },
        "required": ["challenge_token", "credential"],
        "title": "CompletePasskeyRegistrationRequest"
      },
      "CompletePasskeyStepUpRequest": {
        "type": "object",
        "properties": {
          "challenge_token": {
            "type": "string",
            "minLength": 64,
            "maxLength": 64
          },
          "credential": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "maxLength": 2048
              },
              "rawId": {
                "type": "string",
                "maxLength": 2048
              },
              "type": {
                "type": "string",
                "enum": ["public-key"]
              },
              "response": {
                "type": "object",
                "properties": {
                  "clientDataJSON": {
                    "type": "string"
                  },
                  "authenticatorData": {
                    "type": "string"
                  },
                  "signature": {
                    "type": "string"
                  },
                  "userHandle": {
                    "type": ["string", "null"]
                  }
                },
                "required": ["clientDataJSON", "authenticatorData", "signature"]
              },
              "authenticatorAttachment": {
                "type": ["string", "null"]
              },
              "clientExtensionResults": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": ["id", "rawId", "type", "response"]
          }
        },
        "required": ["challenge_token", "credential"],
        "title": "CompletePasskeyStepUpRequest"
      },
      "ConfirmPasswordRequest": {
        "type": "object",
        "properties": {
          "password": {
            "type": "string",
            "maxLength": 1024
          }
        },
        "required": ["password"],
        "title": "ConfirmPasswordRequest"
      },
      "CustomReferenceRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "prefix": {
            "type": "string",
            "pattern": "^[a-z0-9][a-z0-9_-]*$",
            "maxLength": 32
          },
          "type": {
            "type": "string",
            "enum": ["gitlab", "github", "url_template"]
          },
          "base_url": {
            "type": ["string", "null"],
            "format": "uri",
            "maxLength": 255
          },
          "url_template": {
            "type": ["string", "null"],
            "pattern": "^https?:\\/\\/\\S+$",
            "maxLength": 255
          },
          "label_template": {
            "type": ["string", "null"],
            "maxLength": 255
          },
          "targets": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "alias": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]*$",
                  "maxLength": 128
                },
                "target": {
                  "type": "string",
                  "maxLength": 255
                },
                "label": {
                  "type": ["string", "null"],
                  "maxLength": 255
                }
              },
              "required": ["alias", "target"]
            },
            "maxItems": 100
          }
        },
        "required": ["name", "prefix", "type"],
        "title": "CustomReferenceRequest"
      },
      "CustomReferenceResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "desk_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "prefix": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "base_url": {
            "type": ["string", "null"]
          },
          "url_template": {
            "type": ["string", "null"]
          },
          "label_template": {
            "type": ["string", "null"]
          },
          "targets_count": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "integer",
                "minimum": 0
              }
            ]
          },
          "targets": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "alias": {
                  "type": "string"
                },
                "target": {
                  "type": "string"
                },
                "label": {
                  "type": ["string", "null"]
                }
              },
              "required": ["id", "alias", "target", "label"]
            }
          },
          "version": {
            "type": "string"
          },
          "archived_at": {
            "type": ["string", "null"],
            "format": "date-time"
          },
          "created_at": {
            "type": ["string", "null"],
            "format": "date-time"
          },
          "updated_at": {
            "type": ["string", "null"],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "desk_id",
          "name",
          "prefix",
          "type",
          "base_url",
          "url_template",
          "label_template",
          "targets_count",
          "version",
          "archived_at",
          "created_at",
          "updated_at"
        ],
        "title": "CustomReferenceResource"
      },
      "DeleteAccountRequest": {
        "type": "object",
        "properties": {
          "confirmation": {
            "type": "string",
            "enum": ["DELETE MY ACCOUNT"]
          },
          "desks": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "action": {
                  "type": "string",
                  "enum": ["delete", "leave"]
                }
              },
              "required": ["id", "action"]
            },
            "minItems": 1
          }
        },
        "required": ["confirmation", "desks"],
        "title": "DeleteAccountRequest"
      },
      "DeskNotificationResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "desk": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": ["id", "name"]
          },
          "title": {
            "type": "string"
          },
          "subtitle": {
            "type": ["string", "null"]
          },
          "target": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string"
              },
              "id": {
                "type": "string"
              },
              "locator": {
                "type": "string"
              }
            },
            "required": ["type", "id", "locator"]
          },
          "data": {
            "type": "array",
            "items": {}
          },
          "read": {
            "type": "boolean"
          },
          "read_at": {
            "type": ["string", "null"],
            "format": "date-time"
          },
          "created_at": {
            "type": ["string", "null"],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "kind",
          "desk",
          "title",
          "subtitle",
          "target",
          "data",
          "read",
          "read_at",
          "created_at"
        ],
        "title": "DeskNotificationResource"
      },
      "DeskResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "membership": {
            "type": "object",
            "properties": {
              "role": {
                "type": "string"
              },
              "is_default": {
                "type": "boolean"
              },
              "capabilities": {
                "type": "array",
                "items": {}
              }
            },
            "required": ["role", "is_default", "capabilities"]
          },
          "navigation": {
            "type": "object",
            "properties": {
              "is_pinned": {
                "type": "boolean"
              },
              "is_recent": {
                "type": "boolean"
              },
              "is_last_entered": {
                "type": "boolean"
              }
            },
            "required": ["is_pinned", "is_recent", "is_last_entered"]
          },
          "counts": {
            "type": "object",
            "properties": {
              "organizations": {
                "type": "integer"
              },
              "projects": {
                "type": "integer"
              },
              "open_tasks": {
                "type": "integer"
              },
              "wiki_pages": {
                "type": "integer"
              },
              "unread_notifications": {
                "type": "integer"
              }
            },
            "required": [
              "organizations",
              "projects",
              "open_tasks",
              "wiki_pages",
              "unread_notifications"
            ]
          },
          "created_at": {
            "type": ["string", "null"],
            "format": "date-time"
          },
          "updated_at": {
            "type": ["string", "null"],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "name",
          "version",
          "membership",
          "navigation",
          "counts",
          "created_at",
          "updated_at"
        ],
        "title": "DeskResource"
      },
      "LoginRequest": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email"
          },
          "password": {
            "type": "string",
            "maxLength": 4096
          }
        },
        "required": ["email", "password"],
        "title": "LoginRequest"
      },
      "OrganizationResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "desk_id": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "key_prefix": {
            "type": "string"
          },
          "description_markdown": {
            "type": ["string", "null"]
          },
          "description_html": {
            "type": "string"
          },
          "counts": {
            "type": "object",
            "properties": {
              "projects": {
                "type": "integer"
              },
              "tasks": {
                "type": "integer"
              },
              "wiki_pages": {
                "type": "integer"
              }
            },
            "required": ["projects", "tasks", "wiki_pages"]
          },
          "key_prefix_locked": {
            "type": "boolean"
          },
          "projects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectSummaryResource"
            }
          },
          "tasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaskSummaryResource"
            }
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AttachmentResource"
            }
          },
          "backlinks_url": {
            "type": "string"
          },
          "archived_at": {
            "type": ["string", "null"],
            "format": "date-time"
          },
          "version": {
            "type": "string"
          },
          "created_at": {
            "type": ["string", "null"],
            "format": "date-time"
          },
          "updated_at": {
            "type": ["string", "null"],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "desk_id",
          "type",
          "name",
          "slug",
          "key_prefix",
          "description_markdown",
          "description_html",
          "counts",
          "key_prefix_locked",
          "backlinks_url",
          "archived_at",
          "version",
          "created_at",
          "updated_at"
        ],
        "title": "OrganizationResource"
      },
      "OrganizationSummaryResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "desk_id": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "key_prefix": {
            "type": "string"
          },
          "counts": {
            "type": "object",
            "properties": {
              "projects": {
                "type": "integer"
              },
              "tasks": {
                "type": "integer"
              },
              "wiki_pages": {
                "type": "integer"
              }
            },
            "required": ["projects", "tasks", "wiki_pages"]
          },
          "key_prefix_locked": {
            "type": "boolean"
          },
          "archived_at": {
            "type": ["string", "null"],
            "format": "date-time"
          },
          "version": {
            "type": "string"
          },
          "created_at": {
            "type": ["string", "null"],
            "format": "date-time"
          },
          "updated_at": {
            "type": ["string", "null"],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "desk_id",
          "type",
          "name",
          "slug",
          "key_prefix",
          "counts",
          "key_prefix_locked",
          "archived_at",
          "version",
          "created_at",
          "updated_at"
        ],
        "title": "OrganizationSummaryResource"
      },
      "ProjectResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "desk_id": {
            "type": "string"
          },
          "organization_id": {
            "type": ["string", "null"]
          },
          "parent_project_id": {
            "type": ["string", "null"]
          },
          "organization": {
            "type": ["object", "null"],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "slug": {
                "type": "string"
              },
              "key_prefix": {
                "type": "string"
              }
            },
            "required": ["id", "name", "slug", "key_prefix"]
          },
          "parent_project": {
            "type": ["object", "null"],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "slug": {
                "type": "string"
              },
              "key_prefix": {
                "type": "string"
              }
            },
            "required": ["id", "name", "slug", "key_prefix"]
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "key_prefix": {
            "type": "string"
          },
          "description_markdown": {
            "type": ["string", "null"]
          },
          "description_html": {
            "type": "string"
          },
          "counts": {
            "type": "object",
            "properties": {
              "child_projects": {
                "type": "integer"
              },
              "tasks": {
                "type": "integer"
              },
              "wiki_pages": {
                "type": "integer"
              }
            },
            "required": ["child_projects", "tasks", "wiki_pages"]
          },
          "key_prefix_locked": {
            "type": "boolean"
          },
          "backlinks_url": {
            "type": "string"
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AttachmentResource"
            }
          },
          "archived_at": {
            "type": ["string", "null"],
            "format": "date-time"
          },
          "version": {
            "type": "string"
          },
          "created_at": {
            "type": ["string", "null"],
            "format": "date-time"
          },
          "updated_at": {
            "type": ["string", "null"],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "desk_id",
          "organization_id",
          "parent_project_id",
          "organization",
          "parent_project",
          "name",
          "slug",
          "key_prefix",
          "description_markdown",
          "description_html",
          "counts",
          "key_prefix_locked",
          "backlinks_url",
          "archived_at",
          "version",
          "created_at",
          "updated_at"
        ],
        "title": "ProjectResource"
      },
      "ProjectSummaryResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "desk_id": {
            "type": "string"
          },
          "organization_id": {
            "type": ["string", "null"]
          },
          "parent_project_id": {
            "type": ["string", "null"]
          },
          "organization": {
            "type": ["object", "null"],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "slug": {
                "type": "string"
              },
              "key_prefix": {
                "type": "string"
              }
            },
            "required": ["id", "name", "slug", "key_prefix"]
          },
          "parent_project": {
            "type": ["object", "null"],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "slug": {
                "type": "string"
              },
              "key_prefix": {
                "type": "string"
              }
            },
            "required": ["id", "name", "slug", "key_prefix"]
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "key_prefix": {
            "type": "string"
          },
          "counts": {
            "type": "object",
            "properties": {
              "child_projects": {
                "type": "integer"
              },
              "tasks": {
                "type": "integer"
              },
              "wiki_pages": {
                "type": "integer"
              }
            },
            "required": ["child_projects", "tasks", "wiki_pages"]
          },
          "key_prefix_locked": {
            "type": "boolean"
          },
          "archived_at": {
            "type": ["string", "null"],
            "format": "date-time"
          },
          "version": {
            "type": "string"
          },
          "created_at": {
            "type": ["string", "null"],
            "format": "date-time"
          },
          "updated_at": {
            "type": ["string", "null"],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "desk_id",
          "organization_id",
          "parent_project_id",
          "organization",
          "parent_project",
          "name",
          "slug",
          "key_prefix",
          "counts",
          "key_prefix_locked",
          "archived_at",
          "version",
          "created_at",
          "updated_at"
        ],
        "title": "ProjectSummaryResource"
      },
      "ReferenceSuggestionData": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "insertion_text": {
            "type": "string"
          },
          "alias": {
            "type": "string"
          },
          "primary": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "type",
          "label",
          "insertion_text",
          "alias",
          "primary"
        ],
        "title": "ReferenceSuggestionData"
      },
      "ReferenceSuggestionResponseData": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/ReferenceSuggestionData"
              }
            }
          }
        },
        "required": ["data"],
        "title": "ReferenceSuggestionResponseData"
      },
      "RegisterRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 255
          },
          "password": {
            "type": "string"
          },
          "password_confirmation": {
            "type": "string"
          }
        },
        "required": ["name", "email", "password", "password_confirmation"],
        "title": "RegisterRequest"
      },
      "ResetPasswordRequest": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email"
          },
          "token": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "password_confirmation": {
            "type": "string"
          }
        },
        "required": ["email", "token", "password", "password_confirmation"],
        "title": "ResetPasswordRequest"
      },
      "SearchDeskData": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": ["id", "name"],
        "title": "SearchDeskData"
      },
      "SearchGroupData": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchResultData"
            }
          },
          "total": {
            "type": "integer"
          },
          "has_more": {
            "type": "boolean"
          },
          "current_page": {
            "type": "integer"
          },
          "per_page": {
            "type": "integer"
          }
        },
        "required": ["data", "total", "has_more", "current_page", "per_page"],
        "title": "SearchGroupData"
      },
      "SearchMetaData": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string"
          },
          "total": {
            "type": "integer"
          },
          "desk_count": {
            "type": "integer"
          }
        },
        "required": ["query", "total", "desk_count"],
        "title": "SearchMetaData"
      },
      "SearchResponseData": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/SearchGroupData"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/SearchMetaData"
          }
        },
        "required": ["data", "meta"],
        "title": "SearchResponseData"
      },
      "SearchResultData": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "subtitle": {
            "type": ["string", "null"]
          },
          "excerpt": {
            "type": "string"
          },
          "badge": {
            "type": "string"
          },
          "archived": {
            "type": "boolean"
          },
          "locator": {
            "type": ["string", "null"]
          },
          "desk": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SearchDeskData"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "type",
          "title",
          "subtitle",
          "excerpt",
          "badge",
          "archived",
          "locator",
          "desk"
        ],
        "title": "SearchResultData"
      },
      "StoreAttachmentRequest": {
        "type": "object",
        "properties": {
          "file": {
            "type": "string",
            "format": "binary",
            "contentMediaType": "application/octet-stream",
            "description": "Maximum file size: 20480 kilobytes."
          },
          "desk_id": {
            "type": "string"
          },
          "uploader_user_id": {
            "type": "string"
          },
          "attachable_type": {
            "type": "string"
          },
          "attachable_id": {
            "type": "string"
          },
          "disk": {
            "type": "string"
          },
          "path": {
            "type": "string"
          }
        },
        "required": ["file"],
        "title": "StoreAttachmentRequest"
      },
      "StoreCommentRequest": {
        "type": "object",
        "properties": {
          "body_markdown": {
            "type": "string",
            "maxLength": 10000
          },
          "attachment_draft_token": {
            "type": ["string", "null"],
            "format": "uuid"
          },
          "desk_id": {
            "type": "string"
          },
          "author_user_id": {
            "type": "string"
          },
          "commentable_type": {
            "type": "string"
          },
          "commentable_id": {
            "type": "string"
          }
        },
        "required": ["body_markdown"],
        "title": "StoreCommentRequest"
      },
      "StoreDeskRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          }
        },
        "required": ["name"],
        "title": "StoreDeskRequest"
      },
      "StoreOrganizationRequest": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": ["customer", "company"]
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "slug": {
            "type": ["string", "null"],
            "minLength": 1,
            "maxLength": 255
          },
          "key_prefix": {
            "type": ["string", "null"],
            "pattern": "^[A-Z0-9]+$",
            "minLength": 1,
            "maxLength": 12
          },
          "description_markdown": {
            "type": ["string", "null"],
            "maxLength": 50000
          },
          "attachment_draft_token": {
            "type": ["string", "null"],
            "format": "uuid"
          }
        },
        "required": ["type", "name"],
        "title": "StoreOrganizationRequest"
      },
      "StoreProjectRequest": {
        "type": "object",
        "properties": {
          "organization_id": {
            "type": ["string", "null"],
            "format": "uuid"
          },
          "parent_project_id": {
            "type": ["string", "null"],
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "slug": {
            "type": ["string", "null"],
            "minLength": 1,
            "maxLength": 255
          },
          "key_prefix": {
            "type": ["string", "null"],
            "pattern": "^[A-Z0-9]+$",
            "minLength": 1,
            "maxLength": 12
          },
          "description_markdown": {
            "type": ["string", "null"],
            "maxLength": 50000
          },
          "attachment_draft_token": {
            "type": ["string", "null"],
            "format": "uuid"
          }
        },
        "required": ["name"],
        "title": "StoreProjectRequest"
      },
      "StoreTaskRequest": {
        "type": "object",
        "properties": {
          "organization_id": {
            "type": ["string", "null"],
            "format": "uuid"
          },
          "project_id": {
            "type": ["string", "null"],
            "format": "uuid"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "description_markdown": {
            "type": ["string", "null"],
            "maxLength": 50000
          },
          "status": {
            "type": ["string", "null"],
            "enum": ["NEW", "DONE", null]
          },
          "due_date": {
            "type": ["string", "null"],
            "format": "date"
          }
        },
        "required": ["title"],
        "title": "StoreTaskRequest"
      },
      "StoreTaskTimeEntryRequest": {
        "type": "object",
        "properties": {
          "duration": {
            "type": ["string", "null"],
            "maxLength": 32
          },
          "minutes": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1440
          },
          "note_markdown": {
            "type": ["string", "null"],
            "maxLength": 10000
          },
          "spent_at": {
            "type": ["string", "null"],
            "format": "date"
          },
          "task_id": {
            "type": "string"
          },
          "desk_id": {
            "type": "string"
          },
          "author_user_id": {
            "type": "string"
          }
        },
        "required": ["minutes"],
        "title": "StoreTaskTimeEntryRequest"
      },
      "StoreWikiPageRequest": {
        "type": "object",
        "properties": {
          "organization_id": {
            "type": ["string", "null"],
            "format": "uuid"
          },
          "project_id": {
            "type": ["string", "null"],
            "format": "uuid"
          },
          "parent_id": {
            "type": ["string", "null"],
            "format": "uuid"
          },
          "title": {
            "type": "string",
            "maxLength": 255
          },
          "slug": {
            "type": ["string", "null"],
            "maxLength": 255
          },
          "body_markdown": {
            "type": ["string", "null"],
            "maxLength": 100000
          },
          "attachment_draft_token": {
            "type": ["string", "null"],
            "format": "uuid"
          },
          "desk_id": {
            "type": "string"
          },
          "created_by_user_id": {
            "type": "string"
          },
          "archived_at": {
            "type": "string"
          }
        },
        "required": ["title"],
        "title": "StoreWikiPageRequest"
      },
      "TaskResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "desk_id": {
            "type": "string"
          },
          "organization_id": {
            "type": ["string", "null"]
          },
          "project_id": {
            "type": ["string", "null"]
          },
          "organization": {
            "type": ["object", "null"],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "slug": {
                "type": "string"
              },
              "key_prefix": {
                "type": "string"
              }
            },
            "required": ["id", "name", "slug", "key_prefix"]
          },
          "project": {
            "type": ["object", "null"],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "slug": {
                "type": "string"
              },
              "key_prefix": {
                "type": "string"
              },
              "parent_project": {
                "type": ["object", "null"],
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "slug": {
                    "type": "string"
                  },
                  "key_prefix": {
                    "type": "string"
                  }
                },
                "required": ["id", "name", "slug", "key_prefix"]
              }
            },
            "required": ["id", "name", "slug", "key_prefix", "parent_project"]
          },
          "public_key": {
            "type": "string"
          },
          "sequence_number": {
            "type": "integer"
          },
          "title": {
            "type": "string"
          },
          "description_markdown": {
            "type": ["string", "null"]
          },
          "description_html": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "due_date": {
            "type": ["string", "null"],
            "format": "date-time"
          },
          "started_at": {
            "type": ["string", "null"],
            "format": "date-time"
          },
          "completed_at": {
            "type": ["string", "null"],
            "format": "date-time"
          },
          "archived_at": {
            "type": ["string", "null"],
            "format": "date-time"
          },
          "version": {
            "type": "string"
          },
          "created_at": {
            "type": ["string", "null"],
            "format": "date-time"
          },
          "updated_at": {
            "type": ["string", "null"],
            "format": "date-time"
          },
          "backlinks_url": {
            "type": "string"
          },
          "total_time_minutes": {
            "type": "integer"
          },
          "comments_count": {
            "type": "integer"
          },
          "time_entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaskTimeEntryResource"
            }
          },
          "comments": {
            "type": "array",
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/CommentResource"
                },
                {
                  "type": "object",
                  "required": ["attachments"]
                }
              ]
            }
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AttachmentResource"
            }
          }
        },
        "required": [
          "id",
          "desk_id",
          "organization_id",
          "project_id",
          "organization",
          "project",
          "public_key",
          "sequence_number",
          "title",
          "description_markdown",
          "description_html",
          "status",
          "due_date",
          "started_at",
          "completed_at",
          "archived_at",
          "version",
          "created_at",
          "updated_at",
          "backlinks_url",
          "total_time_minutes",
          "comments_count"
        ],
        "title": "TaskResource"
      },
      "TaskSummaryResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "organization_id": {
            "type": ["string", "null"]
          },
          "project_id": {
            "type": ["string", "null"]
          },
          "organization": {
            "type": ["object", "null"],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": ["id", "name"]
          },
          "project": {
            "type": ["object", "null"],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "parent_project": {
                "type": ["object", "null"],
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": ["id", "name"]
              }
            },
            "required": ["id", "name", "parent_project"]
          },
          "public_key": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "due_date": {
            "type": ["string", "null"],
            "format": "date-time"
          },
          "completed_at": {
            "type": ["string", "null"],
            "format": "date-time"
          },
          "archived_at": {
            "type": ["string", "null"],
            "format": "date-time"
          },
          "version": {
            "type": "string"
          },
          "comments_count": {
            "type": "integer"
          },
          "total_time_minutes": {
            "type": "integer"
          },
          "updated_at": {
            "type": ["string", "null"],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "organization_id",
          "project_id",
          "organization",
          "project",
          "public_key",
          "title",
          "status",
          "due_date",
          "completed_at",
          "archived_at",
          "version",
          "comments_count",
          "total_time_minutes",
          "updated_at"
        ],
        "title": "TaskSummaryResource"
      },
      "TaskTimeEntryResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "task_id": {
            "type": "string"
          },
          "author_user_id": {
            "type": ["string", "null"]
          },
          "minutes": {
            "type": "integer"
          },
          "note_markdown": {
            "type": ["string", "null"]
          },
          "note_html": {
            "type": "string"
          },
          "spent_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_at": {
            "type": ["string", "null"],
            "format": "date-time"
          },
          "updated_at": {
            "type": ["string", "null"],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "task_id",
          "author_user_id",
          "minutes",
          "note_markdown",
          "note_html",
          "spent_at",
          "created_at",
          "updated_at"
        ],
        "title": "TaskTimeEntryResource"
      },
      "UpdateCommentRequest": {
        "type": "object",
        "properties": {
          "body_markdown": {
            "type": "string",
            "maxLength": 10000
          },
          "desk_id": {
            "type": "string"
          },
          "author_user_id": {
            "type": "string"
          },
          "commentable_type": {
            "type": "string"
          },
          "commentable_id": {
            "type": "string"
          }
        },
        "required": ["body_markdown"],
        "title": "UpdateCommentRequest"
      },
      "UpdateDeskRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          }
        },
        "required": ["name"],
        "title": "UpdateDeskRequest"
      },
      "UpdateOrganizationRequest": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": ["customer", "company"]
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "slug": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "key_prefix": {
            "type": "string",
            "pattern": "^[A-Z0-9]+$",
            "minLength": 1,
            "maxLength": 12
          },
          "description_markdown": {
            "type": ["string", "null"],
            "maxLength": 50000
          }
        },
        "title": "UpdateOrganizationRequest"
      },
      "UpdatePasswordRequest": {
        "type": "object",
        "properties": {
          "password": {
            "type": "string"
          },
          "password_confirmation": {
            "type": "string"
          }
        },
        "required": ["password", "password_confirmation"],
        "title": "UpdatePasswordRequest"
      },
      "UpdateProfileRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 255
          }
        },
        "title": "UpdateProfileRequest"
      },
      "UpdateProjectRequest": {
        "type": "object",
        "properties": {
          "organization_id": {
            "type": ["string", "null"],
            "format": "uuid"
          },
          "parent_project_id": {
            "type": ["string", "null"],
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "slug": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "key_prefix": {
            "type": "string",
            "pattern": "^[A-Z0-9]+$",
            "minLength": 1,
            "maxLength": 12
          },
          "description_markdown": {
            "type": ["string", "null"],
            "maxLength": 50000
          }
        },
        "title": "UpdateProjectRequest"
      },
      "UpdateTaskRequest": {
        "type": "object",
        "properties": {
          "organization_id": {
            "type": ["string", "null"],
            "format": "uuid"
          },
          "project_id": {
            "type": ["string", "null"],
            "format": "uuid"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "description_markdown": {
            "type": ["string", "null"],
            "maxLength": 50000
          },
          "due_date": {
            "type": ["string", "null"],
            "format": "date"
          }
        },
        "title": "UpdateTaskRequest"
      },
      "UpdateUserSettingsRequest": {
        "type": "object",
        "properties": {
          "appearance": {
            "type": "string",
            "enum": ["light", "dark", "system"]
          },
          "sidebar_open": {
            "type": "boolean"
          },
          "pinned_desk_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "maxItems": 25
          }
        },
        "title": "UpdateUserSettingsRequest"
      },
      "UpdateWikiPageRequest": {
        "type": "object",
        "properties": {
          "parent_id": {
            "type": ["string", "null"],
            "format": "uuid"
          },
          "title": {
            "type": "string",
            "maxLength": 255
          },
          "slug": {
            "type": "string",
            "maxLength": 255
          },
          "body_markdown": {
            "type": ["string", "null"],
            "maxLength": 100000
          },
          "desk_id": {
            "type": "string"
          },
          "organization_id": {
            "type": "string"
          },
          "project_id": {
            "type": "string"
          },
          "created_by_user_id": {
            "type": "string"
          },
          "archived_at": {
            "type": "string"
          }
        },
        "title": "UpdateWikiPageRequest"
      },
      "UseRecoveryCodeRequest": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "maxLength": 64
          }
        },
        "required": ["code"],
        "title": "UseRecoveryCodeRequest"
      },
      "UserResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "email_verified": {
            "type": "boolean"
          },
          "settings": {
            "$ref": "#/components/schemas/UserSettingsResource"
          }
        },
        "required": ["id", "name", "email", "email_verified"],
        "title": "UserResource"
      },
      "UserSettingsResource": {
        "type": "object",
        "properties": {
          "appearance": {
            "type": "string"
          },
          "sidebar_open": {
            "type": "boolean"
          },
          "last_entered_desk_id": {
            "type": ["string", "null"]
          },
          "pinned_desk_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "recent_desk_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "version": {
            "type": "string"
          },
          "updated_at": {
            "type": ["string", "null"],
            "format": "date-time"
          }
        },
        "required": [
          "appearance",
          "sidebar_open",
          "last_entered_desk_id",
          "pinned_desk_ids",
          "recent_desk_ids",
          "version",
          "updated_at"
        ],
        "title": "UserSettingsResource"
      },
      "WikiPageResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "desk_id": {
            "type": "string"
          },
          "organization_id": {
            "type": ["string", "null"]
          },
          "project_id": {
            "type": ["string", "null"]
          },
          "parent_id": {
            "type": ["string", "null"]
          },
          "title": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "body_markdown": {
            "type": ["string", "null"]
          },
          "body_html": {
            "type": "string"
          },
          "parent": {
            "type": ["object", "null"],
            "properties": {
              "id": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "slug": {
                "type": "string"
              }
            },
            "required": ["id", "title", "slug"]
          },
          "children": {
            "type": "array",
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/WikiPageResource"
                },
                {
                  "type": "object",
                  "required": ["attachments"]
                }
              ]
            }
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AttachmentResource"
            }
          },
          "backlinks_url": {
            "type": "string"
          },
          "creator_user_id": {
            "type": ["string", "null"]
          },
          "version": {
            "type": "string"
          },
          "archived_at": {
            "type": ["string", "null"],
            "format": "date-time"
          },
          "created_at": {
            "type": ["string", "null"],
            "format": "date-time"
          },
          "updated_at": {
            "type": ["string", "null"],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "desk_id",
          "organization_id",
          "project_id",
          "parent_id",
          "title",
          "slug",
          "body_markdown",
          "body_html",
          "parent",
          "backlinks_url",
          "creator_user_id",
          "version",
          "archived_at",
          "created_at",
          "updated_at"
        ],
        "title": "WikiPageResource"
      },
      "WikiPageSummaryResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "desk_id": {
            "type": "string"
          },
          "organization_id": {
            "type": ["string", "null"]
          },
          "project_id": {
            "type": ["string", "null"]
          },
          "parent_id": {
            "type": ["string", "null"]
          },
          "title": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "parent": {
            "type": ["object", "null"],
            "properties": {
              "id": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "slug": {
                "type": "string"
              }
            },
            "required": ["id", "title", "slug"]
          },
          "creator_user_id": {
            "type": ["string", "null"]
          },
          "version": {
            "type": "string"
          },
          "archived_at": {
            "type": ["string", "null"],
            "format": "date-time"
          },
          "created_at": {
            "type": ["string", "null"],
            "format": "date-time"
          },
          "updated_at": {
            "type": ["string", "null"],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "desk_id",
          "organization_id",
          "project_id",
          "parent_id",
          "title",
          "slug",
          "parent",
          "creator_user_id",
          "version",
          "archived_at",
          "created_at",
          "updated_at"
        ],
        "title": "WikiPageSummaryResource"
      },
      "WikiPageTreeResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "body_html": {
            "type": "string"
          },
          "parent_id": {
            "type": ["string", "null"]
          },
          "children_count": {
            "type": "integer",
            "minimum": 0
          },
          "updated_at": {
            "type": ["string", "null"],
            "format": "date-time"
          },
          "children": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WikiPageTreeResource"
            }
          }
        },
        "required": [
          "id",
          "title",
          "slug",
          "body_html",
          "parent_id",
          "children_count",
          "updated_at",
          "children"
        ],
        "title": "WikiPageTreeResource"
      }
    },
    "responses": {
      "ValidationException": {
        "description": "Validation error",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string",
                  "description": "Errors overview."
                },
                "errors": {
                  "type": "object",
                  "description": "A detailed description of each field that failed validation.",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "required": ["message", "errors"]
            }
          }
        }
      },
      "AuthenticationException": {
        "description": "Unauthenticated",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string",
                  "description": "Error overview."
                }
              },
              "required": ["message"]
            }
          }
        }
      },
      "ModelNotFoundException": {
        "description": "Not found",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string",
                  "description": "Error overview."
                }
              },
              "required": ["message"]
            }
          }
        }
      },
      "AuthorizationException": {
        "description": "Authorization error",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string",
                  "description": "Error overview."
                }
              },
              "required": ["message"]
            }
          }
        }
      }
    }
  }
}
