{
  "openapi": "3.1.1",
  "info": {
    "title": "devngn.ai Wellness API",
    "description": "Opt-in dev wellness service: profiles, goals, equipment, schedule gaps, and short activity prompts.",
    "contact": {
      "name": "David Pine",
      "url": "https://github.com/IEvangelist/devngn.ai"
    },
    "license": {
      "name": "MIT",
      "url": "https://github.com/IEvangelist/devngn.ai/blob/main/LICENSE"
    },
    "version": "v1"
  },
  "servers": [
    {
      "url": "http://localhost/"
    }
  ],
  "paths": {
    "/v1/hello": {
      "get": {
        "tags": [
          "Meta"
        ],
        "operationId": "Hello",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/auth/github/device": {
      "post": {
        "tags": [
          "Auth"
        ],
        "operationId": "StartDeviceFlow",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceFlowStartResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/auth/github/device/poll": {
      "post": {
        "tags": [
          "Auth"
        ],
        "operationId": "PollDeviceFlow",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceFlowPollRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessTokenResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/auth/github/web/start": {
      "get": {
        "tags": [
          "Auth"
        ],
        "operationId": "StartWebFlow",
        "parameters": [
          {
            "name": "returnPath",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/auth/github/web/callback": {
      "get": {
        "tags": [
          "Auth"
        ],
        "operationId": "WebCallback",
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "error",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "error_description",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessTokenResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/auth/me": {
      "get": {
        "tags": [
          "Auth"
        ],
        "operationId": "GetMe",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticatedUserResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/consent": {
      "get": {
        "tags": [
          "Consent"
        ],
        "summary": "Returns the user's accepted consent (if any) and the current canonical text.",
        "operationId": "GetConsent",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsentStateResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Consent"
        ],
        "summary": "Idempotently accepts the named consent version using the server's canonical text.",
        "operationId": "AcceptConsent",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AcceptConsentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsentSnapshot"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpValidationProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Consent"
        ],
        "summary": "Revokes consent and cascade-deletes profile, goals, and equipment.",
        "operationId": "RevokeConsent",
        "responses": {
          "204": {
            "description": "No Content"
          }
        }
      }
    },
    "/v1/profile": {
      "get": {
        "tags": [
          "Profile"
        ],
        "operationId": "GetProfile",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      },
      "put": {
        "tags": [
          "Profile"
        ],
        "operationId": "UpsertProfile",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertProfileRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpValidationProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Profile"
        ],
        "operationId": "DeleteProfile",
        "responses": {
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/v1/goals": {
      "get": {
        "tags": [
          "Goals"
        ],
        "operationId": "ListGoals",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GoalResponse"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Goals"
        ],
        "operationId": "CreateGoal",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateGoalRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoalResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpValidationProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/goals/{id}": {
      "get": {
        "tags": [
          "Goals"
        ],
        "operationId": "GetGoal",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoalResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      },
      "put": {
        "tags": [
          "Goals"
        ],
        "operationId": "UpdateGoal",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateGoalRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoalResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpValidationProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      },
      "delete": {
        "tags": [
          "Goals"
        ],
        "operationId": "DeleteGoal",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/v1/equipment": {
      "get": {
        "tags": [
          "Equipment"
        ],
        "operationId": "ListEquipment",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EquipmentResponse"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Equipment"
        ],
        "operationId": "CreateEquipment",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEquipmentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EquipmentResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpValidationProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict"
          }
        }
      }
    },
    "/v1/equipment/{id}": {
      "get": {
        "tags": [
          "Equipment"
        ],
        "operationId": "GetEquipment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EquipmentResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      },
      "put": {
        "tags": [
          "Equipment"
        ],
        "operationId": "UpdateEquipment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEquipmentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EquipmentResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpValidationProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      },
      "delete": {
        "tags": [
          "Equipment"
        ],
        "operationId": "DeleteEquipment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/v1/schedule/sources": {
      "get": {
        "tags": [
          "ScheduleSources"
        ],
        "operationId": "ListScheduleSources",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ScheduleSourceResponse"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "ScheduleSources"
        ],
        "operationId": "CreateScheduleSource",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateScheduleSourceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleSourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpValidationProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/schedule/sources/{id}": {
      "get": {
        "tags": [
          "ScheduleSources"
        ],
        "operationId": "GetScheduleSource",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleSourceResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      },
      "patch": {
        "tags": [
          "ScheduleSources"
        ],
        "operationId": "UpdateScheduleSource",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateScheduleSourceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleSourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpValidationProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "ScheduleSources"
        ],
        "operationId": "DeleteScheduleSource",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/v1/schedule/sources/{id}/sync": {
      "post": {
        "tags": [
          "ScheduleSources"
        ],
        "operationId": "SyncScheduleSource",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleSyncResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/schedule/events": {
      "get": {
        "tags": [
          "ScheduleEvents"
        ],
        "operationId": "ListScheduleEvents",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "sourceId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ScheduleEventResponse"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpValidationProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "ScheduleEvents"
        ],
        "operationId": "PushScheduleEvents",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PushScheduleEventsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ScheduleEventResponse"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpValidationProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/schedule/events/{id}": {
      "delete": {
        "tags": [
          "ScheduleEvents"
        ],
        "operationId": "DeleteScheduleEvent",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/v1/schedule/connect/google": {
      "get": {
        "tags": [
          "ScheduleConnect"
        ],
        "operationId": "BeginGoogleConnect",
        "parameters": [
          {
            "name": "returnPath",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/schedule/connect/microsoft": {
      "get": {
        "tags": [
          "ScheduleConnect"
        ],
        "operationId": "BeginMicrosoftConnect",
        "parameters": [
          {
            "name": "returnPath",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/schedule/callback/google": {
      "get": {
        "tags": [
          "ScheduleConnect"
        ],
        "operationId": "CompleteGoogleConnect",
        "parameters": [
          {
            "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"
          }
        }
      }
    },
    "/v1/schedule/callback/microsoft": {
      "get": {
        "tags": [
          "ScheduleConnect"
        ],
        "operationId": "CompleteMicrosoftConnect",
        "parameters": [
          {
            "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"
          }
        }
      }
    },
    "/v1/gaps": {
      "get": {
        "tags": [
          "Gaps"
        ],
        "operationId": "ListGaps",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "tz",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GapResponse"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpValidationProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/activities": {
      "get": {
        "tags": [
          "Activities"
        ],
        "operationId": "ListActivities",
        "parameters": [
          {
            "name": "availableEquipmentTag",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "bodyArea",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/BodyArea"
            }
          },
          {
            "name": "maxDurationSeconds",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ActivityResponse"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpValidationProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/prompts": {
      "get": {
        "tags": [
          "Prompts"
        ],
        "operationId": "ListPrompts",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PromptResponse"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/prompts/next": {
      "post": {
        "tags": [
          "Prompts"
        ],
        "operationId": "NextPrompt",
        "parameters": [
          {
            "name": "tz",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channel",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromptResponse"
                }
              }
            }
          },
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpValidationProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/prompts/{id}/dismiss": {
      "post": {
        "tags": [
          "Prompts"
        ],
        "operationId": "DismissPrompt",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromptResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/v1/prompts/{id}/complete": {
      "post": {
        "tags": [
          "Prompts"
        ],
        "operationId": "CompletePrompt",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromptResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/v1/prompts/{id}/feedback": {
      "post": {
        "tags": [
          "Prompts"
        ],
        "operationId": "SubmitPromptFeedback",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FeedbackRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromptResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpValidationProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/v1/prompts/stream": {
      "get": {
        "tags": [
          "Prompts"
        ],
        "operationId": "StreamPrompts",
        "parameters": [
          {
            "name": "tz",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channel",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/prompts/ws": {
      "get": {
        "tags": [
          "Prompts"
        ],
        "operationId": "PromptsWebSocket",
        "parameters": [
          {
            "name": "tz",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channel",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/gamification/me": {
      "get": {
        "tags": [
          "Gamification"
        ],
        "operationId": "GetPlayerState",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlayerStateResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/gamification/badges": {
      "get": {
        "tags": [
          "Gamification"
        ],
        "operationId": "ListBadges",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BadgeResponse"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/gamification/milestones": {
      "get": {
        "tags": [
          "Gamification"
        ],
        "operationId": "ListMilestones",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MilestoneResponse"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/gamification/leaderboard": {
      "get": {
        "tags": [
          "Gamification"
        ],
        "operationId": "GetLeaderboard",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/LeaderboardEntry"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/social/profile": {
      "get": {
        "tags": [
          "Social"
        ],
        "operationId": "GetSocialProfile",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SocialProfileResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      },
      "put": {
        "tags": [
          "Social"
        ],
        "operationId": "UpsertSocialProfile",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertSocialProfileRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SocialProfileResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpValidationProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/v1/social/follow/{followeeId}": {
      "post": {
        "tags": [
          "Social"
        ],
        "operationId": "Follow",
        "parameters": [
          {
            "name": "followeeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request"
          },
          "409": {
            "description": "Conflict"
          }
        }
      },
      "delete": {
        "tags": [
          "Social"
        ],
        "operationId": "Unfollow",
        "parameters": [
          {
            "name": "followeeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/v1/social/followers": {
      "get": {
        "tags": [
          "Social"
        ],
        "operationId": "ListFollowers",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FollowerResponse"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/social/following": {
      "get": {
        "tags": [
          "Social"
        ],
        "operationId": "ListFollowing",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FollowResponse"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/social/feed": {
      "get": {
        "tags": [
          "Social"
        ],
        "operationId": "GetFeed",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FeedItemResponse"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AcceptConsentRequest": {
        "required": [
          "version"
        ],
        "type": "object",
        "properties": {
          "version": {
            "maxLength": 40,
            "minLength": 1,
            "type": "string"
          }
        }
      },
      "AccessTokenResponse": {
        "required": [
          "accessToken",
          "tokenType",
          "expiresAt",
          "user"
        ],
        "type": "object",
        "properties": {
          "accessToken": {
            "type": "string"
          },
          "tokenType": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "user": {
            "$ref": "#/components/schemas/AuthenticatedUserResponse"
          }
        }
      },
      "ActivityResponse": {
        "required": [
          "id",
          "slug",
          "title",
          "description",
          "bodyArea",
          "intensity",
          "durationSeconds",
          "equipmentTags",
          "animationProvider",
          "animationAssetId",
          "licenseAttribution"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "bodyArea": {
            "$ref": "#/components/schemas/BodyArea"
          },
          "intensity": {
            "$ref": "#/components/schemas/IntensityLevel"
          },
          "durationSeconds": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "equipmentTags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "animationProvider": {
            "type": "string"
          },
          "animationAssetId": {
            "type": "string"
          },
          "licenseAttribution": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "AuthenticatedUserResponse": {
        "required": [
          "id",
          "gitHubId",
          "login",
          "displayName",
          "avatarUrl"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "gitHubId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "login": {
            "type": "string"
          },
          "displayName": {
            "type": [
              "null",
              "string"
            ]
          },
          "avatarUrl": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "AuthErrorResponse": {
        "required": [
          "error"
        ],
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "BadgeResponse": {
        "required": [
          "key",
          "name",
          "description",
          "icon",
          "category",
          "isHidden",
          "earned",
          "earnedAt"
        ],
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "icon": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "isHidden": {
            "type": "boolean"
          },
          "earned": {
            "type": "boolean"
          },
          "earnedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "BodyArea": {
        "enum": [
          "Full",
          "Upper",
          "Lower",
          "Core",
          "Neck",
          "Back",
          "Wrists",
          "Hips",
          "Ankles",
          "Breath",
          "Posture"
        ]
      },
      "ConsentSnapshot": {
        "required": [
          "version",
          "text",
          "acceptedAt"
        ],
        "type": "object",
        "properties": {
          "version": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "acceptedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ConsentStateResponse": {
        "required": [
          "accepted",
          "current"
        ],
        "type": "object",
        "properties": {
          "accepted": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ConsentSnapshot"
              }
            ]
          },
          "current": {
            "$ref": "#/components/schemas/CurrentConsentText"
          }
        }
      },
      "CreateEquipmentRequest": {
        "required": [
          "tag",
          "displayName"
        ],
        "type": "object",
        "properties": {
          "tag": {
            "maxLength": 60,
            "minLength": 1,
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
            "type": "string"
          },
          "displayName": {
            "maxLength": 120,
            "minLength": 1,
            "type": "string"
          },
          "notes": {
            "maxLength": 1000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CreateGoalRequest": {
        "required": [
          "title",
          "startDate"
        ],
        "type": "object",
        "properties": {
          "title": {
            "maxLength": 120,
            "minLength": 1,
            "type": "string"
          },
          "description": {
            "maxLength": 2000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "category": {
            "$ref": "#/components/schemas/GoalCategory"
          },
          "targetMetric": {
            "maxLength": 80,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "startDate": {
            "type": "string",
            "format": "date"
          },
          "endDate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          }
        }
      },
      "CreateScheduleSourceRequest": {
        "required": [
          "type",
          "displayName"
        ],
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/ScheduleSourceType"
          },
          "displayName": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          }
        }
      },
      "CurrentConsentText": {
        "required": [
          "version",
          "text"
        ],
        "type": "object",
        "properties": {
          "version": {
            "type": "string"
          },
          "text": {
            "type": "string"
          }
        }
      },
      "DeliveryChannel": {
        "enum": [
          "Vscode",
          "Cli",
          "Web"
        ]
      },
      "DeviceFlowPollRequest": {
        "required": [
          "sessionId"
        ],
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "string"
          }
        }
      },
      "DeviceFlowStartResponse": {
        "required": [
          "sessionId",
          "userCode",
          "verificationUri",
          "expiresInSeconds",
          "intervalSeconds"
        ],
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "string"
          },
          "userCode": {
            "type": "string"
          },
          "verificationUri": {
            "type": "string"
          },
          "expiresInSeconds": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "intervalSeconds": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "EquipmentResponse": {
        "required": [
          "id",
          "tag",
          "displayName",
          "notes",
          "createdAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "tag": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "notes": {
            "type": [
              "null",
              "string"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "FeedbackRequest": {
        "type": "object",
        "properties": {
          "rating": {
            "maximum": 5,
            "minimum": 1,
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int16"
          }
        }
      },
      "FeedItemResponse": {
        "required": [
          "id",
          "type",
          "message",
          "createdAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "$ref": "#/components/schemas/FeedItemType"
          },
          "message": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "FeedItemType": {
        "enum": [
          "PromptCompleted",
          "BadgeEarned",
          "MilestoneAchieved",
          "LevelUp",
          "GoalCreated",
          "Followed"
        ]
      },
      "FitnessBaseline": {
        "enum": [
          "Unspecified",
          "Sedentary",
          "Light",
          "Moderate",
          "Active"
        ]
      },
      "FollowerResponse": {
        "required": [
          "followerId",
          "followedAt"
        ],
        "type": "object",
        "properties": {
          "followerId": {
            "type": "string",
            "format": "uuid"
          },
          "followedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "FollowResponse": {
        "required": [
          "followeeId",
          "followedAt"
        ],
        "type": "object",
        "properties": {
          "followeeId": {
            "type": "string",
            "format": "uuid"
          },
          "followedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "GapResponse": {
        "required": [
          "startUtc",
          "endUtc",
          "durationMinutes"
        ],
        "type": "object",
        "properties": {
          "startUtc": {
            "type": "string",
            "format": "date-time"
          },
          "endUtc": {
            "type": "string",
            "format": "date-time"
          },
          "durationMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "GoalCategory": {
        "enum": [
          "Mobility",
          "Strength",
          "Breathing",
          "Posture",
          "CardioLight"
        ]
      },
      "GoalResponse": {
        "required": [
          "id",
          "title",
          "description",
          "category",
          "targetMetric",
          "startDate",
          "endDate",
          "createdAt",
          "updatedAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "category": {
            "$ref": "#/components/schemas/GoalCategory"
          },
          "targetMetric": {
            "type": [
              "null",
              "string"
            ]
          },
          "startDate": {
            "type": "string",
            "format": "date"
          },
          "endDate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "HttpValidationProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": [
              "null",
              "string"
            ]
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "detail": {
            "type": [
              "null",
              "string"
            ]
          },
          "instance": {
            "type": [
              "null",
              "string"
            ]
          },
          "errors": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        }
      },
      "IntensityLevel": {
        "enum": [
          "Low",
          "Medium",
          "High"
        ]
      },
      "LeaderboardEntry": {
        "required": [
          "userId",
          "displayName",
          "totalXp",
          "level",
          "rankTier"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "displayName": {
            "type": "string"
          },
          "totalXp": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "level": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "rankTier": {
            "$ref": "#/components/schemas/RankTier"
          }
        }
      },
      "MilestoneResponse": {
        "required": [
          "key",
          "name",
          "description",
          "isHidden",
          "achieved",
          "achievedAt"
        ],
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "isHidden": {
            "type": "boolean"
          },
          "achieved": {
            "type": "boolean"
          },
          "achievedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "PlayerStateResponse": {
        "required": [
          "level",
          "totalXp",
          "xpIntoLevel",
          "xpForNextLevel",
          "currentStreak",
          "longestStreak",
          "rankTier"
        ],
        "type": "object",
        "properties": {
          "level": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "totalXp": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "xpIntoLevel": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "xpForNextLevel": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "currentStreak": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "longestStreak": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "rankTier": {
            "$ref": "#/components/schemas/RankTier"
          }
        }
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": [
              "null",
              "string"
            ]
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "detail": {
            "type": [
              "null",
              "string"
            ]
          },
          "instance": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ProfileResponse": {
        "required": [
          "id",
          "ageRange",
          "heightCm",
          "weightKg",
          "fitnessBaseline",
          "preferredIntensity",
          "limitations",
          "timeOfDayPreference",
          "updatedAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "ageRange": {
            "type": [
              "null",
              "string"
            ]
          },
          "heightCm": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "weightKg": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "fitnessBaseline": {
            "$ref": "#/components/schemas/FitnessBaseline"
          },
          "preferredIntensity": {
            "$ref": "#/components/schemas/IntensityLevel"
          },
          "limitations": {
            "type": [
              "null",
              "string"
            ]
          },
          "timeOfDayPreference": {
            "type": [
              "null",
              "string"
            ]
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PromptResponse": {
        "required": [
          "id",
          "activityId",
          "activitySlug",
          "activityTitle",
          "activityDescription",
          "bodyArea",
          "intensity",
          "durationSeconds",
          "equipmentTags",
          "animationProvider",
          "animationAssetId",
          "licenseAttribution",
          "gapStartUtc",
          "gapEndUtc",
          "deliveredAt",
          "deliveredVia",
          "dismissedAt",
          "completedAt",
          "feedbackRating"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "activityId": {
            "type": "string",
            "format": "uuid"
          },
          "activitySlug": {
            "type": "string"
          },
          "activityTitle": {
            "type": "string"
          },
          "activityDescription": {
            "type": "string"
          },
          "bodyArea": {
            "$ref": "#/components/schemas/BodyArea"
          },
          "intensity": {
            "$ref": "#/components/schemas/IntensityLevel"
          },
          "durationSeconds": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "equipmentTags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "animationProvider": {
            "type": "string"
          },
          "animationAssetId": {
            "type": "string"
          },
          "licenseAttribution": {
            "type": [
              "null",
              "string"
            ]
          },
          "gapStartUtc": {
            "type": "string",
            "format": "date-time"
          },
          "gapEndUtc": {
            "type": "string",
            "format": "date-time"
          },
          "deliveredAt": {
            "type": "string",
            "format": "date-time"
          },
          "deliveredVia": {
            "$ref": "#/components/schemas/DeliveryChannel"
          },
          "dismissedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "completedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "feedbackRating": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int16"
          }
        }
      },
      "PushScheduleEventItem": {
        "required": [
          "externalId",
          "startUtc",
          "endUtc"
        ],
        "type": "object",
        "properties": {
          "externalId": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "startUtc": {
            "type": "string",
            "format": "date-time"
          },
          "endUtc": {
            "type": "string",
            "format": "date-time"
          },
          "busy": {
            "type": "boolean"
          }
        }
      },
      "PushScheduleEventsRequest": {
        "required": [
          "sourceId",
          "items"
        ],
        "type": "object",
        "properties": {
          "sourceId": {
            "type": "string",
            "format": "uuid"
          },
          "items": {
            "maxItems": 200,
            "minItems": 1,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PushScheduleEventItem"
            }
          }
        }
      },
      "RankTier": {
        "enum": [
          "Bronze",
          "Silver",
          "Gold",
          "Platinum",
          "Diamond",
          "Legend"
        ]
      },
      "ScheduleEventResponse": {
        "required": [
          "id",
          "sourceId",
          "externalId",
          "startUtc",
          "endUtc",
          "busy"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "sourceId": {
            "type": "string",
            "format": "uuid"
          },
          "externalId": {
            "type": [
              "null",
              "string"
            ]
          },
          "startUtc": {
            "type": "string",
            "format": "date-time"
          },
          "endUtc": {
            "type": "string",
            "format": "date-time"
          },
          "busy": {
            "type": "boolean"
          }
        }
      },
      "ScheduleSourceConnectionStatus": {
        "enum": [
          "Connected",
          "NeedsReconnect",
          "Disabled",
          "Error",
          "PendingConnection"
        ]
      },
      "ScheduleSourceResponse": {
        "required": [
          "id",
          "type",
          "displayName",
          "connectionStatus",
          "scope",
          "lastSyncAt",
          "lastRefreshAt",
          "lastSyncErrorCode",
          "lastSyncErrorAt",
          "createdAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "$ref": "#/components/schemas/ScheduleSourceType"
          },
          "displayName": {
            "type": "string"
          },
          "connectionStatus": {
            "$ref": "#/components/schemas/ScheduleSourceConnectionStatus"
          },
          "scope": {
            "type": [
              "null",
              "string"
            ]
          },
          "lastSyncAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "lastRefreshAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "lastSyncErrorCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "lastSyncErrorAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ScheduleSourceType": {
        "enum": [
          "User",
          "Google",
          "Microsoft"
        ]
      },
      "ScheduleSyncResponse": {
        "required": [
          "synced"
        ],
        "type": "object",
        "properties": {
          "synced": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "SocialProfileResponse": {
        "required": [
          "userId",
          "displayName",
          "bio",
          "isPublic"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "displayName": {
            "type": "string"
          },
          "bio": {
            "type": [
              "null",
              "string"
            ]
          },
          "isPublic": {
            "type": "boolean"
          }
        }
      },
      "UpdateEquipmentRequest": {
        "required": [
          "displayName"
        ],
        "type": "object",
        "properties": {
          "displayName": {
            "maxLength": 120,
            "minLength": 1,
            "type": "string"
          },
          "notes": {
            "maxLength": 1000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "UpdateGoalRequest": {
        "required": [
          "title",
          "startDate"
        ],
        "type": "object",
        "properties": {
          "title": {
            "maxLength": 120,
            "minLength": 1,
            "type": "string"
          },
          "description": {
            "maxLength": 2000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "category": {
            "$ref": "#/components/schemas/GoalCategory"
          },
          "targetMetric": {
            "maxLength": 80,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "startDate": {
            "type": "string",
            "format": "date"
          },
          "endDate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          }
        }
      },
      "UpdateScheduleSourceRequest": {
        "type": "object",
        "properties": {
          "displayName": {
            "maxLength": 200,
            "minLength": 1,
            "type": [
              "null",
              "string"
            ]
          },
          "connectionStatus": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ScheduleSourceConnectionStatus"
              }
            ]
          }
        }
      },
      "UpsertProfileRequest": {
        "type": "object",
        "properties": {
          "ageRange": {
            "maxLength": 20,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "heightCm": {
            "maximum": 300,
            "minimum": 30,
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "weightKg": {
            "maximum": 500,
            "minimum": 20,
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "fitnessBaseline": {
            "$ref": "#/components/schemas/FitnessBaseline"
          },
          "preferredIntensity": {
            "$ref": "#/components/schemas/IntensityLevel"
          },
          "limitations": {
            "maxLength": 2000,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "timeOfDayPreference": {
            "maxLength": 100,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "UpsertSocialProfileRequest": {
        "required": [
          "displayName"
        ],
        "type": "object",
        "properties": {
          "displayName": {
            "maxLength": 80,
            "minLength": 1,
            "type": "string"
          },
          "bio": {
            "maxLength": 500,
            "minLength": 0,
            "type": [
              "null",
              "string"
            ]
          },
          "isPublic": {
            "type": "boolean"
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Meta"
    },
    {
      "name": "Auth"
    },
    {
      "name": "Consent"
    },
    {
      "name": "Profile"
    },
    {
      "name": "Goals"
    },
    {
      "name": "Equipment"
    },
    {
      "name": "ScheduleSources"
    },
    {
      "name": "ScheduleEvents"
    },
    {
      "name": "ScheduleConnect"
    },
    {
      "name": "Gaps"
    },
    {
      "name": "Activities"
    },
    {
      "name": "Prompts"
    },
    {
      "name": "Gamification"
    },
    {
      "name": "Social"
    }
  ]
}