{
  "openapi": "3.0.1",
  "info": {
    "title": "Nuxed.Api | v1",
    "version": "1.0.0"
  },
  "paths": {
    "/": {
      "get": {
        "tags": [
          "Nuxed.Api"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/access/oauth/{provider}/start": {
      "get": {
        "tags": [
          "Access"
        ],
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "flow",
            "in": "query",
            "schema": {
              "type": "string",
              "default": null
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AccessOAuthStartResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessOAuthStartResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessOAuthStartResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/access/oauth/{provider}/mock-authorize": {
      "get": {
        "tags": [
          "Access"
        ],
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/access/oauth/{provider}/callback": {
      "get": {
        "tags": [
          "Access"
        ],
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "code",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "error",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/access/challenge": {
      "get": {
        "tags": [
          "Access"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AccessChallengeResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessChallengeResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessChallengeResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/access/verify": {
      "post": {
        "tags": [
          "Access"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccessVerifyRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AccessVerifyRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AccessVerifyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/access/ticket/consume": {
      "post": {
        "tags": [
          "Access"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccessTicketConsumeRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AccessTicketConsumeRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AccessTicketConsumeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/access/session": {
      "post": {
        "tags": [
          "Access"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccessSessionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AccessSessionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AccessSessionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AccessSessionResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessSessionResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessSessionResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/communities": {
      "get": {
        "tags": [
          "Communities"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CommunitySummaryResponse"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CommunitySummaryResponse"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CommunitySummaryResponse"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/communities/{slug}/dashboard": {
      "get": {
        "tags": [
          "Communities"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CommunityDashboardResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommunityDashboardResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommunityDashboardResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/invitations": {
      "get": {
        "tags": [
          "Invitations"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/InvitationResponse"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/InvitationResponse"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/InvitationResponse"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Invitations"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInvitationRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInvitationRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInvitationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/InvitationResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitationResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitationResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/invitations/{id}": {
      "get": {
        "tags": [
          "Invitations"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/InvitationResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitationResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitationResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/memberships": {
      "get": {
        "tags": [
          "Memberships"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MembershipResponse"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MembershipResponse"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MembershipResponse"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/memberships/{id}/approve": {
      "post": {
        "tags": [
          "Memberships"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApproveMembershipRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApproveMembershipRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApproveMembershipRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/MembershipResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MembershipResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/MembershipResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/me/profile": {
      "get": {
        "tags": [
          "MeProfile"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/MeProfileResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeProfileResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeProfileResponse"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "MeProfile"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JsonElement"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/JsonElement"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/JsonElement"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/MeProfileResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeProfileResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeProfileResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/system": {
      "get": {
        "tags": [
          "System"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiInfoResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiInfoResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiInfoResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AccessChallengeResponse": {
        "required": [
          "challengeId",
          "nonce",
          "issuedAt",
          "expiresAt",
          "algorithm"
        ],
        "type": "object",
        "properties": {
          "challengeId": {
            "type": "string"
          },
          "nonce": {
            "type": "string"
          },
          "issuedAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "algorithm": {
            "type": "string"
          }
        }
      },
      "AccessClientMetadataRequest": {
        "required": [
          "uaHash"
        ],
        "type": "object",
        "properties": {
          "uaHash": {
            "type": "string"
          },
          "tzOffset": {
            "maximum": 840,
            "minimum": -840,
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "AccessibleCommunityResponse": {
        "required": [
          "membershipId",
          "communityId",
          "name",
          "slug",
          "type",
          "languageCode",
          "role",
          "status",
          "description",
          "approvedMemberCount"
        ],
        "type": "object",
        "properties": {
          "membershipId": {
            "type": "string",
            "format": "uuid"
          },
          "communityId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "languageCode": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "approvedMemberCount": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "AccessOAuthStartResponse": {
        "required": [
          "provider",
          "available",
          "message",
          "authorizationUrl",
          "errorCode"
        ],
        "type": "object",
        "properties": {
          "provider": {
            "type": "string"
          },
          "available": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          },
          "authorizationUrl": {
            "type": "string",
            "nullable": true
          },
          "errorCode": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "AccessProofRequest": {
        "required": [
          "digest"
        ],
        "type": "object",
        "properties": {
          "taps": {
            "maximum": 10,
            "minimum": 1,
            "type": "integer",
            "format": "int32"
          },
          "nx": {
            "maximum": 1,
            "minimum": 0,
            "type": "number",
            "format": "double"
          },
          "ny": {
            "maximum": 1,
            "minimum": 0,
            "type": "number",
            "format": "double"
          },
          "ts": {
            "type": "integer",
            "format": "int64"
          },
          "digest": {
            "type": "string"
          }
        }
      },
      "AccessSessionRequest": {
        "required": [
          "email"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          },
          "invitationToken": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "AccessSessionResponse": {
        "required": [
          "email",
          "accessState",
          "userStatus",
          "message",
          "communities",
          "profileStatus",
          "missingRequiredFields",
          "sessionToken"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          },
          "accessState": {
            "type": "string"
          },
          "userStatus": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "communities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccessibleCommunityResponse"
            }
          },
          "profileStatus": {
            "type": "string"
          },
          "missingRequiredFields": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sessionToken": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "AccessTicketConsumeRequest": {
        "required": [
          "accessTicket"
        ],
        "type": "object",
        "properties": {
          "accessTicket": {
            "type": "string"
          }
        }
      },
      "AccessVerifyRequest": {
        "required": [
          "challengeId",
          "proof",
          "client"
        ],
        "type": "object",
        "properties": {
          "challengeId": {
            "type": "string"
          },
          "proof": {
            "$ref": "#/components/schemas/AccessProofRequest"
          },
          "client": {
            "$ref": "#/components/schemas/AccessClientMetadataRequest"
          }
        }
      },
      "ApiInfoResponse": {
        "required": [
          "name",
          "version",
          "environment",
          "documentationUrl",
          "capabilities"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "environment": {
            "type": "string"
          },
          "documentationUrl": {
            "type": "string"
          },
          "capabilities": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ApproveMembershipRequest": {
        "type": "object",
        "properties": {
          "approvedByUserId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          }
        },
        "nullable": true
      },
      "CommunityDashboardCapsuleResponse": {
        "required": [
          "title",
          "tag",
          "summary"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "tag": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          }
        }
      },
      "CommunityDashboardResponse": {
        "required": [
          "communityName",
          "description",
          "workspaceType",
          "languageCode",
          "alert",
          "assistantDraft",
          "capsules",
          "tasks",
          "timeline"
        ],
        "type": "object",
        "properties": {
          "communityName": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "workspaceType": {
            "type": "string"
          },
          "languageCode": {
            "type": "string"
          },
          "alert": {
            "type": "string"
          },
          "assistantDraft": {
            "type": "string"
          },
          "capsules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommunityDashboardCapsuleResponse"
            }
          },
          "tasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommunityDashboardTaskResponse"
            }
          },
          "timeline": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "CommunityDashboardTaskResponse": {
        "required": [
          "title",
          "owner",
          "due"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "owner": {
            "type": "string"
          },
          "due": {
            "type": "string"
          }
        }
      },
      "CommunitySummaryResponse": {
        "required": [
          "id",
          "name",
          "slug",
          "type",
          "languageCode",
          "status",
          "description",
          "ownerDisplayName",
          "approvedMemberCount"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "languageCode": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "ownerDisplayName": {
            "type": "string"
          },
          "approvedMemberCount": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "CreateInvitationRequest": {
        "required": [
          "email",
          "communityId",
          "defaultRole"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          },
          "communityId": {
            "type": "string",
            "format": "uuid"
          },
          "invitedByUserId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "defaultRole": {
            "$ref": "#/components/schemas/MembershipRole"
          },
          "expiresInDays": {
            "maximum": 30,
            "minimum": 1,
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "InvitationResponse": {
        "required": [
          "id",
          "email",
          "communityId",
          "communityName",
          "invitedByUserId",
          "invitedByDisplayName",
          "defaultRole",
          "status",
          "expiresAt",
          "createdAt",
          "token"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": "string"
          },
          "communityId": {
            "type": "string",
            "format": "uuid"
          },
          "communityName": {
            "type": "string"
          },
          "invitedByUserId": {
            "type": "string",
            "format": "uuid"
          },
          "invitedByDisplayName": {
            "type": "string"
          },
          "defaultRole": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "token": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "JsonElement": { },
      "MembershipResponse": {
        "required": [
          "membershipId",
          "userId",
          "userEmail",
          "communityId",
          "communityName",
          "role",
          "status",
          "createdAt",
          "approvedAt",
          "approvedByUserId"
        ],
        "type": "object",
        "properties": {
          "membershipId": {
            "type": "string",
            "format": "uuid"
          },
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "userEmail": {
            "type": "string"
          },
          "communityId": {
            "type": "string",
            "format": "uuid"
          },
          "communityName": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "approvedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "approvedByUserId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          }
        }
      },
      "MembershipRole": {
        "type": "integer"
      },
      "MeProfileResponse": {
        "required": [
          "canonicalEmail",
          "displayName",
          "firstName",
          "lastName",
          "dateOfBirth",
          "postalAddress",
          "secondaryEmail",
          "phone",
          "instagram",
          "linkedIn",
          "facebook",
          "spotify",
          "xHandle",
          "profileStatus",
          "missingRequiredFields"
        ],
        "type": "object",
        "properties": {
          "canonicalEmail": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string",
            "nullable": true
          },
          "dateOfBirth": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "postalAddress": {
            "type": "string",
            "nullable": true
          },
          "secondaryEmail": {
            "type": "string",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "instagram": {
            "type": "string",
            "nullable": true
          },
          "linkedIn": {
            "type": "string",
            "nullable": true
          },
          "facebook": {
            "type": "string",
            "nullable": true
          },
          "spotify": {
            "type": "string",
            "nullable": true
          },
          "xHandle": {
            "type": "string",
            "nullable": true
          },
          "profileStatus": {
            "type": "string"
          },
          "missingRequiredFields": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Nuxed.Api"
    },
    {
      "name": "Access"
    },
    {
      "name": "Communities"
    },
    {
      "name": "Invitations"
    },
    {
      "name": "Memberships"
    },
    {
      "name": "MeProfile"
    },
    {
      "name": "System"
    }
  ]
}