# Models

## The PlayerRankingResponse object

```json
{"openapi":"3.0.0","info":{"title":"Meshmap API v1","version":"1.0.0"},"components":{"schemas":{"PlayerRankingResponse":{"type":"object","required":["highestScore","ranking"],"properties":{"highestScore":{"type":"number","description":"Player's highest score"},"ranking":{"type":"integer","minimum":1,"description":"Player's global ranking"},"miniGameTypeId":{"type":"string","nullable":true,"description":"Mini game type ID (null for default game type)"},"miniGameTypeName":{"type":"string","nullable":true,"description":"Mini game type name (null for default game type)"}}}}}}
```

## The CreateAppRequest object

```json
{"openapi":"3.0.0","info":{"title":"Meshmap API v1","version":"1.0.0"},"components":{"schemas":{"CreateAppRequest":{"type":"object","required":["name","description"],"properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"App name"},"description":{"type":"string","minLength":1,"maxLength":500,"description":"App description"},"imageUrl":{"type":"string","format":"uri","description":"Optional image URL"},"visibility":{"type":"string","enum":["PUBLIC","PRIVATE"],"default":"PRIVATE","description":"App visibility setting. PUBLIC apps are visible in public listings, PRIVATE apps are only accessible to the owner."}}}}}}
```

## The AppSchema object

```json
{"openapi":"3.0.0","info":{"title":"Meshmap API v1","version":"1.0.0"},"components":{"schemas":{"AppSchema":{"type":"object","required":["id","name","description","apiKey","createdAt","updatedAt","visibility"],"properties":{"id":{"type":"string","description":"Unique app identifier"},"name":{"type":"string","description":"App name"},"description":{"type":"string","description":"App description"},"imageUrl":{"type":"string","nullable":true,"description":"App image URL"},"apiKey":{"type":"string","description":"App API key"},"visibility":{"type":"string","enum":["PUBLIC","PRIVATE"],"description":"App visibility setting"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp"}}}}}}
```

## The AppsListResponse object

```json
{"openapi":"3.0.0","info":{"title":"Meshmap API v1","version":"1.0.0"},"components":{"schemas":{"AppsListResponse":{"type":"object","required":["apps"],"properties":{"apps":{"type":"array","items":{"$ref":"#/components/schemas/AppSchema"}}}},"AppSchema":{"type":"object","required":["id","name","description","apiKey","createdAt","updatedAt","visibility"],"properties":{"id":{"type":"string","description":"Unique app identifier"},"name":{"type":"string","description":"App name"},"description":{"type":"string","description":"App description"},"imageUrl":{"type":"string","nullable":true,"description":"App image URL"},"apiKey":{"type":"string","description":"App API key"},"visibility":{"type":"string","enum":["PUBLIC","PRIVATE"],"description":"App visibility setting"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp"}}}}}}
```

## The CreatePlayerRequest object

```json
{"openapi":"3.0.0","info":{"title":"Meshmap API v1","version":"1.0.0"},"components":{"schemas":{"CreatePlayerRequest":{"type":"object","required":["displayName"],"properties":{"userId":{"type":"string","nullable":true,"description":"Optional user ID"},"displayName":{"type":"string","description":"Player display name"}}}}}}
```

## The PlayerSchema object

```json
{"openapi":"3.0.0","info":{"title":"Meshmap API v1","version":"1.0.0"},"components":{"schemas":{"PlayerSchema":{"type":"object","required":["id","displayName","createdAt","updatedAt"],"properties":{"id":{"type":"string","description":"Unique player identifier"},"displayName":{"type":"string","description":"Player display name"},"userId":{"type":"string","nullable":true,"description":"Associated user ID"},"imageUrl":{"type":"string","nullable":true,"description":"URL to player's profile image"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp"}}}}}}
```

## The GetPlayersListResponse object

```json
{"openapi":"3.0.0","info":{"title":"Meshmap API v1","version":"1.0.0"},"components":{"schemas":{"GetPlayersListResponse":{"type":"object","required":["players"],"properties":{"players":{"type":"array","items":{"$ref":"#/components/schemas/PlayerSchema"}}}},"PlayerSchema":{"type":"object","required":["id","displayName","createdAt","updatedAt"],"properties":{"id":{"type":"string","description":"Unique player identifier"},"displayName":{"type":"string","description":"Player display name"},"userId":{"type":"string","nullable":true,"description":"Associated user ID"},"imageUrl":{"type":"string","nullable":true,"description":"URL to player's profile image"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp"}}}}}}
```

## The GlobalRankingSchema object

```json
{"openapi":"3.0.0","info":{"title":"Meshmap API v1","version":"1.0.0"},"components":{"schemas":{"GlobalRankingSchema":{"type":"object","required":["highestScore","ranking"],"properties":{"highestScore":{"type":"number","description":"Player's highest score for this mini-game type"},"ranking":{"type":"integer","minimum":1,"description":"Player's global ranking for this mini-game type"},"miniGameTypeName":{"type":"string","nullable":true,"description":"Mini game type name (null for default game type)"},"miniGameTypeId":{"type":"string","nullable":true,"description":"Mini game type ID (null for default game type)"}}}}}}
```

## The PlayerWithGlobalRankingsSchema object

```json
{"openapi":"3.0.0","info":{"title":"Meshmap API v1","version":"1.0.0"},"components":{"schemas":{"PlayerWithGlobalRankingsSchema":{"type":"object","required":["id","displayName","createdAt","updatedAt","globalRankings"],"properties":{"id":{"type":"string","description":"Unique player identifier"},"displayName":{"type":"string","description":"Player display name"},"userId":{"type":"string","nullable":true,"description":"Associated user ID"},"imageUrl":{"type":"string","nullable":true,"description":"URL to player's profile image"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp"},"globalRankings":{"type":"array","items":{"$ref":"#/components/schemas/GlobalRankingSchema"},"description":"Array of global rankings for each mini-game type the player has participated in"},"appName":{"type":"string","description":"Name of the app the player belongs to (optional)"}}},"GlobalRankingSchema":{"type":"object","required":["highestScore","ranking"],"properties":{"highestScore":{"type":"number","description":"Player's highest score for this mini-game type"},"ranking":{"type":"integer","minimum":1,"description":"Player's global ranking for this mini-game type"},"miniGameTypeName":{"type":"string","nullable":true,"description":"Mini game type name (null for default game type)"},"miniGameTypeId":{"type":"string","nullable":true,"description":"Mini game type ID (null for default game type)"}}}}}}
```

## The CreateMiniGameTypeRequest object

```json
{"openapi":"3.0.0","info":{"title":"Meshmap API v1","version":"1.0.0"},"components":{"schemas":{"CreateMiniGameTypeRequest":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Mini game type name (must be unique per app)"},"description":{"type":"string","description":"Mini game type description","default":""},"imageUrl":{"type":"string","format":"uri","nullable":true,"description":"Optional image URL for the mini game type"}}}}}}
```

## The MiniGameTypeSchema object

```json
{"openapi":"3.0.0","info":{"title":"Meshmap API v1","version":"1.0.0"},"components":{"schemas":{"MiniGameTypeSchema":{"type":"object","required":["id","name","description","createdAt"],"properties":{"id":{"type":"string","description":"Unique mini game type identifier"},"name":{"type":"string","description":"Mini game type name"},"description":{"type":"string","description":"Mini game type description"},"imageUrl":{"type":"string","nullable":true,"description":"Mini game type image URL"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp"}}}}}}
```

## The GetMiniGameTypesList object

```json
{"openapi":"3.0.0","info":{"title":"Meshmap API v1","version":"1.0.0"},"components":{"schemas":{"GetMiniGameTypesList":{"type":"object","required":["miniGameTypes"],"properties":{"miniGameTypes":{"type":"array","items":{"$ref":"#/components/schemas/MiniGameTypeSchema"}}}},"MiniGameTypeSchema":{"type":"object","required":["id","name","description","createdAt"],"properties":{"id":{"type":"string","description":"Unique mini game type identifier"},"name":{"type":"string","description":"Mini game type name"},"description":{"type":"string","description":"Mini game type description"},"imageUrl":{"type":"string","nullable":true,"description":"Mini game type image URL"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp"}}}}}}
```

## The CreateGameSessionSchema object

```json
{"openapi":"3.0.0","info":{"title":"Meshmap API v1","version":"1.0.0"},"components":{"schemas":{"CreateGameSessionSchema":{"type":"object","properties":{"name":{"type":"string","nullable":true,"description":"Game session name"},"description":{"type":"string","nullable":true,"description":"Game session description"},"status":{"type":"string","enum":["ACTIVE","COMPLETED","PAUSED"],"default":"ACTIVE","description":"Game session status"},"miniGameTypeId":{"type":"string","nullable":true,"description":"Optional mini game type ID to associate with this game session."},"miniGameTypeName":{"type":"string","nullable":true,"description":"Optional mini game type name to associate with this game session."}}}}}}
```

## The GameSessionSchema object

```json
{"openapi":"3.0.0","info":{"title":"Meshmap API v1","version":"1.0.0"},"components":{"schemas":{"GameSessionSchema":{"type":"object","required":["id","status","startTime","createdAt","updatedAt","playerCount"],"properties":{"id":{"type":"string","description":"Unique game session identifier"},"name":{"type":"string","nullable":true,"description":"Game session name"},"description":{"type":"string","nullable":true,"description":"Game session description"},"status":{"type":"string","enum":["ACTIVE","COMPLETED"],"description":"Game session status"},"startTime":{"type":"string","format":"date-time","description":"Game session start time"},"endTime":{"type":"string","format":"date-time","nullable":true,"description":"Game session end time"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp"},"miniGameType":{"allOf":[{"$ref":"#/components/schemas/MiniGameTypeSchema"}],"nullable":true,"description":"Associated mini game type"},"playerCount":{"type":"number","default":0,"description":"Number of players in the game session"}}},"MiniGameTypeSchema":{"type":"object","required":["id","name","description","createdAt"],"properties":{"id":{"type":"string","description":"Unique mini game type identifier"},"name":{"type":"string","description":"Mini game type name"},"description":{"type":"string","description":"Mini game type description"},"imageUrl":{"type":"string","nullable":true,"description":"Mini game type image URL"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp"}}}}}}
```

## The GameSessionsSchemaListResponse object

```json
{"openapi":"3.0.0","info":{"title":"Meshmap API v1","version":"1.0.0"},"components":{"schemas":{"GameSessionsSchemaListResponse":{"type":"object","required":["gameSessions"],"properties":{"gameSessions":{"type":"array","items":{"$ref":"#/components/schemas/GameSessionSchema"}}}},"GameSessionSchema":{"type":"object","required":["id","status","startTime","createdAt","updatedAt","playerCount"],"properties":{"id":{"type":"string","description":"Unique game session identifier"},"name":{"type":"string","nullable":true,"description":"Game session name"},"description":{"type":"string","nullable":true,"description":"Game session description"},"status":{"type":"string","enum":["ACTIVE","COMPLETED"],"description":"Game session status"},"startTime":{"type":"string","format":"date-time","description":"Game session start time"},"endTime":{"type":"string","format":"date-time","nullable":true,"description":"Game session end time"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp"},"miniGameType":{"allOf":[{"$ref":"#/components/schemas/MiniGameTypeSchema"}],"nullable":true,"description":"Associated mini game type"},"playerCount":{"type":"number","default":0,"description":"Number of players in the game session"}}},"MiniGameTypeSchema":{"type":"object","required":["id","name","description","createdAt"],"properties":{"id":{"type":"string","description":"Unique mini game type identifier"},"name":{"type":"string","description":"Mini game type name"},"description":{"type":"string","description":"Mini game type description"},"imageUrl":{"type":"string","nullable":true,"description":"Mini game type image URL"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp"}}}}}}
```

## The RegisterPlayerToSessionRequest object

```json
{"openapi":"3.0.0","info":{"title":"Meshmap API v1","version":"1.0.0"},"components":{"schemas":{"RegisterPlayerToSessionRequest":{"type":"object","required":["playerId"],"properties":{"playerId":{"type":"string","description":"Player ID to register"}}}}}}
```

## The UpdateGameSessionPlayerRequest object

```json
{"openapi":"3.0.0","info":{"title":"Meshmap API v1","version":"1.0.0"},"components":{"schemas":{"UpdateGameSessionPlayerRequest":{"type":"object","required":["score"],"properties":{"score":{"type":"number","description":"Player score"}}}}}}
```

## The GameSessionPlayerSchema object

```json
{"openapi":"3.0.0","info":{"title":"Meshmap API v1","version":"1.0.0"},"components":{"schemas":{"GameSessionPlayerSchema":{"type":"object","required":["score","createdAt","updatedAt","playerId","displayName"],"properties":{"score":{"type":"number","description":"Player score"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp"},"playerId":{"type":"string","description":"Associated player ID"},"displayName":{"type":"string","description":"Player display name"},"imageUrl":{"type":"string","nullable":true,"description":"URL to player's profile image"},"user":{"type":"object","nullable":true,"description":"Associated user information","properties":{"id":{"type":"string","description":"User ID"},"username":{"type":"string","nullable":true,"description":"User's username"}}}}}}}}
```

## The GameSessionPlayersListResponse object

```json
{"openapi":"3.0.0","info":{"title":"Meshmap API v1","version":"1.0.0"},"components":{"schemas":{"GameSessionPlayersListResponse":{"type":"object","required":["players"],"properties":{"players":{"type":"array","items":{"$ref":"#/components/schemas/GameSessionPlayerSchema"}}}},"GameSessionPlayerSchema":{"type":"object","required":["score","createdAt","updatedAt","playerId","displayName"],"properties":{"score":{"type":"number","description":"Player score"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp"},"playerId":{"type":"string","description":"Associated player ID"},"displayName":{"type":"string","description":"Player display name"},"imageUrl":{"type":"string","nullable":true,"description":"URL to player's profile image"},"user":{"type":"object","nullable":true,"description":"Associated user information","properties":{"id":{"type":"string","description":"User ID"},"username":{"type":"string","nullable":true,"description":"User's username"}}}}}}}}
```

## The ErrorResponse object

```json
{"openapi":"3.0.0","info":{"title":"Meshmap API v1","version":"1.0.0"},"components":{"schemas":{"ErrorResponse":{"type":"object","required":["error"],"properties":{"error":{"oneOf":[{"type":"string","description":"Error message"},{"type":"array","items":{"type":"object","required":["code","message","path"],"properties":{"code":{"type":"string","description":"Error code"},"message":{"type":"string","description":"Error message"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]},"description":"Error path"}}}}]}}}}}}
```

## The CreateCodeRequest object

```json
{"openapi":"3.0.0","info":{"title":"Meshmap API v1","version":"1.0.0"},"components":{"schemas":{"CreateCodeRequest":{"type":"object","required":["playerId"],"properties":{"playerId":{"type":"string","description":"Player ID to associate with the code. Used to link the player to the code. Optional.","nullable":true}}}}}}
```

## The CodeSchema object

```json
{"openapi":"3.0.0","info":{"title":"Meshmap API v1","version":"1.0.0"},"components":{"schemas":{"CodeSchema":{"type":"object","required":["code","expiryTime"],"properties":{"code":{"type":"string","description":"Generated authentication code","pattern":"^[0-9]{6}$"},"playerId":{"type":"string","nullable":true,"description":"Player ID associated with the code (if provided)"},"expiryTime":{"type":"string","format":"date-time","description":"Code expiration timestamp"}}}}}}
```

## The CreateTokenFromCodeRequest object

```json
{"openapi":"3.0.0","info":{"title":"Meshmap API v1","version":"1.0.0"},"components":{"schemas":{"CreateTokenFromCodeRequest":{"type":"object","required":["code"],"properties":{"code":{"type":"string","description":"Authentication code","pattern":"^[0-9]{6}$"}}}}}}
```

## The CreateTokenFromCodeResponse object

```json
{"openapi":"3.0.0","info":{"title":"Meshmap API v1","version":"1.0.0"},"components":{"schemas":{"CreateTokenFromCodeResponse":{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["VALID","INVALID","EXPIRED","ERROR"],"description":"Code validation status"},"sessionToken":{"type":"string","description":"JWT session token (only present when status is VALID and user is authenticated)"},"expiryTime":{"type":"string","format":"date-time","description":"Code expiry time (only present when status is VALID)"},"error":{"type":"string","description":"Error message (only present when status is not VALID)"}}}}}}
```

## The LeaderboardPlayerSchema object

```json
{"openapi":"3.0.0","info":{"title":"Meshmap API v1","version":"1.0.0"},"components":{"schemas":{"LeaderboardPlayerSchema":{"type":"object","required":["playerId","playerDisplayName","playerScore","createdAt","updatedAt","gameSessionId"],"properties":{"playerId":{"type":"string","description":"Player ID"},"playerDisplayName":{"type":"string","description":"Player display name"},"playerScore":{"type":"number","description":"Player score"},"playerImageUrl":{"type":"string","nullable":true,"description":"URL to player's profile image"},"createdAt":{"type":"string","format":"date-time","description":"Score creation timestamp"},"updatedAt":{"type":"string","format":"date-time","description":"Score last update timestamp"},"gameSessionId":{"type":"string","description":"Game session ID"},"userId":{"type":"string","nullable":true,"description":"Associated user ID"}}}}}}
```

## The MiniGameLeaderboardSchema object

```json
{"openapi":"3.0.0","info":{"title":"Meshmap API v1","version":"1.0.0"},"components":{"schemas":{"MiniGameLeaderboardSchema":{"type":"object","properties":{"miniGameTypeId":{"type":"string","nullable":true,"description":"Mini game type ID (null for default leaderboard)"},"miniGameTypeName":{"type":"string","nullable":true,"description":"Mini game type name (null for default leaderboard)"},"leaderboard":{"type":"array","items":{"$ref":"#/components/schemas/LeaderboardPlayerSchema"},"nullable":true,"description":"List of top players for this mini game type"}}},"LeaderboardPlayerSchema":{"type":"object","required":["playerId","playerDisplayName","playerScore","createdAt","updatedAt","gameSessionId"],"properties":{"playerId":{"type":"string","description":"Player ID"},"playerDisplayName":{"type":"string","description":"Player display name"},"playerScore":{"type":"number","description":"Player score"},"playerImageUrl":{"type":"string","nullable":true,"description":"URL to player's profile image"},"createdAt":{"type":"string","format":"date-time","description":"Score creation timestamp"},"updatedAt":{"type":"string","format":"date-time","description":"Score last update timestamp"},"gameSessionId":{"type":"string","description":"Game session ID"},"userId":{"type":"string","nullable":true,"description":"Associated user ID"}}}}}}
```

## The GlobalLeaderboardSchema object

```json
{"openapi":"3.0.0","info":{"title":"Meshmap API v1","version":"1.0.0"},"components":{"schemas":{"GlobalLeaderboardSchema":{"type":"object","required":["leaderboards"],"properties":{"leaderboards":{"type":"array","items":{"$ref":"#/components/schemas/MiniGameLeaderboardSchema"},"nullable":true,"description":"List of leaderboards for each mini game type and default. Each leaderboard includes player profile images and additional player details."}}},"MiniGameLeaderboardSchema":{"type":"object","properties":{"miniGameTypeId":{"type":"string","nullable":true,"description":"Mini game type ID (null for default leaderboard)"},"miniGameTypeName":{"type":"string","nullable":true,"description":"Mini game type name (null for default leaderboard)"},"leaderboard":{"type":"array","items":{"$ref":"#/components/schemas/LeaderboardPlayerSchema"},"nullable":true,"description":"List of top players for this mini game type"}}},"LeaderboardPlayerSchema":{"type":"object","required":["playerId","playerDisplayName","playerScore","createdAt","updatedAt","gameSessionId"],"properties":{"playerId":{"type":"string","description":"Player ID"},"playerDisplayName":{"type":"string","description":"Player display name"},"playerScore":{"type":"number","description":"Player score"},"playerImageUrl":{"type":"string","nullable":true,"description":"URL to player's profile image"},"createdAt":{"type":"string","format":"date-time","description":"Score creation timestamp"},"updatedAt":{"type":"string","format":"date-time","description":"Score last update timestamp"},"gameSessionId":{"type":"string","description":"Game session ID"},"userId":{"type":"string","nullable":true,"description":"Associated user ID"}}}}}}
```

## The UserSchema object

```json
{"openapi":"3.0.0","info":{"title":"Meshmap API v1","version":"1.0.0"},"components":{"schemas":{"UserSchema":{"type":"object","required":["id","createdAt"],"properties":{"id":{"type":"string","description":"Unique user identifier"},"email":{"type":"string","nullable":true,"description":"User email address"},"firstName":{"type":"string","nullable":true,"description":"User first name"},"lastName":{"type":"string","nullable":true,"description":"User last name"},"phoneNumber":{"type":"string","nullable":true,"description":"User phone number"},"username":{"type":"string","nullable":true,"description":"User username"},"createdAt":{"type":"string","format":"date-time","description":"User creation timestamp"},"imageUrl":{"type":"string","nullable":true,"description":"User profile image URL"}}}}}}
```

## The UserPatchRequest object

```json
{"openapi":"3.0.0","info":{"title":"Meshmap API v1","version":"1.0.0"},"components":{"schemas":{"UserPatchRequest":{"type":"object","required":["username"],"properties":{"username":{"type":"string","minLength":1,"description":"New username for the user"}}}}}}
```

## The ScanSchema object

```json
{"openapi":"3.0.0","info":{"title":"Meshmap API v1","version":"1.0.0"},"components":{"schemas":{"ScanSchema":{"type":"object","required":["id","timestamp","status"],"properties":{"id":{"type":"string","description":"Unique scan identifier"},"lat":{"type":"number","nullable":true,"description":"Latitude coordinate"},"long":{"type":"number","nullable":true,"description":"Longitude coordinate"},"scanUrl":{"type":"string","nullable":true,"description":"URL to the scan file"},"timestamp":{"type":"string","format":"date-time","description":"Scan timestamp"},"status":{"type":"string","description":"Scan processing status"},"title":{"type":"string","nullable":true,"description":"Scan title"},"category":{"type":"string","nullable":true,"description":"Scan category"},"location":{"type":"string","nullable":true,"description":"Scan location description"},"fileType":{"type":"string","nullable":true,"description":"Scan file type"},"previewImageUrl":{"type":"string","nullable":true,"description":"URL to scan preview image"},"timeOfDay":{"type":"string","nullable":true,"description":"Time of day when scan was taken"},"weather":{"type":"string","nullable":true,"description":"Weather conditions during scan"}}}}}}
```

## The PaginationInfo object

```json
{"openapi":"3.0.0","info":{"title":"Meshmap API v1","version":"1.0.0"},"components":{"schemas":{"PaginationInfo":{"type":"object","required":["total","page","limit","totalPages"],"properties":{"total":{"type":"integer","description":"Total number of items"},"page":{"type":"integer","description":"Current page number"},"limit":{"type":"integer","description":"Items per page"},"totalPages":{"type":"integer","description":"Total number of pages"}}}}}}
```

## The GetUserScansResponse object

```json
{"openapi":"3.0.0","info":{"title":"Meshmap API v1","version":"1.0.0"},"components":{"schemas":{"GetUserScansResponse":{"type":"object","required":["scans","pagination"],"properties":{"scans":{"type":"array","items":{"$ref":"#/components/schemas/ScanSchema"},"description":"List of user scans"},"pagination":{"$ref":"#/components/schemas/PaginationInfo"}}},"ScanSchema":{"type":"object","required":["id","timestamp","status"],"properties":{"id":{"type":"string","description":"Unique scan identifier"},"lat":{"type":"number","nullable":true,"description":"Latitude coordinate"},"long":{"type":"number","nullable":true,"description":"Longitude coordinate"},"scanUrl":{"type":"string","nullable":true,"description":"URL to the scan file"},"timestamp":{"type":"string","format":"date-time","description":"Scan timestamp"},"status":{"type":"string","description":"Scan processing status"},"title":{"type":"string","nullable":true,"description":"Scan title"},"category":{"type":"string","nullable":true,"description":"Scan category"},"location":{"type":"string","nullable":true,"description":"Scan location description"},"fileType":{"type":"string","nullable":true,"description":"Scan file type"},"previewImageUrl":{"type":"string","nullable":true,"description":"URL to scan preview image"},"timeOfDay":{"type":"string","nullable":true,"description":"Time of day when scan was taken"},"weather":{"type":"string","nullable":true,"description":"Weather conditions during scan"}}},"PaginationInfo":{"type":"object","required":["total","page","limit","totalPages"],"properties":{"total":{"type":"integer","description":"Total number of items"},"page":{"type":"integer","description":"Current page number"},"limit":{"type":"integer","description":"Items per page"},"totalPages":{"type":"integer","description":"Total number of pages"}}}}}}
```

## The PrivyAuthRequest object

```json
{"openapi":"3.0.0","info":{"title":"Meshmap API v1","version":"1.0.0"},"components":{"schemas":{"PrivyAuthRequest":{"type":"object","required":["token"],"properties":{"token":{"type":"string","description":"Privy authentication token"}}}}}}
```

## The PrivyAuthResponse object

```json
{"openapi":"3.0.0","info":{"title":"Meshmap API v1","version":"1.0.0"},"components":{"schemas":{"PrivyAuthResponse":{"type":"object","required":["user","meshmapSessionToken"],"properties":{"user":{"type":"object","required":["id","email","firstName","lastName","roles","isAdmin","hasOpsAccess"],"properties":{"id":{"type":"string","description":"User ID"},"email":{"type":"string","nullable":true,"description":"User email"},"firstName":{"type":"string","nullable":true,"description":"User first name"},"lastName":{"type":"string","nullable":true,"description":"User last name"},"roles":{"type":"array","items":{"type":"string"},"description":"User roles"},"isAdmin":{"type":"boolean","description":"Whether the user has admin role"},"hasOpsAccess":{"type":"boolean","description":"Whether the user has ops or admin access"}}},"meshmapSessionToken":{"type":"string","description":"JWT session token for authenticating with Meshmap APIs"}}}}}}
```
