openapi: 3.0.0
paths:
  /v1/auth/register:
    post:
      operationId: AuthController_registerV1
      summary: Register
      parameters:
        - name: x-auth-token
          in: header
          description: >

            Token protecting non-jwt routes. Format: `<secret>+<clientId>`
            (base64 encoded)
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthRegisterRequestDto'
      responses:
        '201':
          description: Successful request
          content:
            application/json:
              schema:
                properties:
                  status:
                    type: string
                    enum:
                      - success
        '400':
          description: Invalid request or Email already in use
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - property city should not exist
                  - email must be an email
                statusCode: 400
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - Internal server error
                statusCode: 500
      tags:
        - auth
  /v1/auth/login:
    post:
      operationId: AuthController_loginV1
      summary: Login
      deprecated: true
      parameters:
        - name: x-auth-token
          in: header
          description: >

            Token protecting non-jwt routes. Format: `<secret>+<clientId>`
            (base64 encoded)
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthLoginRequestDto'
      responses:
        '201':
          description: Access and refresh token information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthLoginResponseDto'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - property city should not exist
                  - email must be an email
                statusCode: 400
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v1/user
                message:
                  - Invalid email or password
                statusCode: 401
      tags:
        - auth
  /v2/auth/login:
    post:
      operationId: AuthController_loginV2
      summary: Login
      parameters:
        - name: x-auth-token
          in: header
          description: >

            Token protecting non-jwt routes. Format: `<secret>+<clientId>`
            (base64 encoded)
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthLoginRequestDto'
      responses:
        '201':
          description: Access and refresh token information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthLoginResponseDto'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - property city should not exist
                  - email must be an email
                statusCode: 400
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v1/user
                message:
                  - Invalid email or password
                statusCode: 401
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - Internal server error
                statusCode: 500
      tags:
        - auth
  /v2/auth/login/admin:
    post:
      operationId: AuthController_loginAdminV1
      summary: Admin login
      parameters:
        - name: x-auth-token
          in: header
          description: >

            Token protecting non-jwt routes. Format: `<secret>+<clientId>`
            (base64 encoded)
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthLoginRequestDto'
      responses:
        '201':
          description: Access and refresh token information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthLoginResponseDto'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - property city should not exist
                  - email must be an email
                statusCode: 400
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v1/user
                message:
                  - Invalid email or password
                statusCode: 401
      tags:
        - auth
  /v1/auth/refresh:
    post:
      operationId: AuthController_refreshTokenV1
      summary: Create refresh token
      parameters:
        - name: x-auth-token
          in: header
          description: >

            Token protecting non-jwt routes. Format: `<secret>+<clientId>`
            (base64 encoded)
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthRefreshRequestDto'
      responses:
        '201':
          description: Access and refresh token information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthLoginResponseDto'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - property city should not exist
                  - email must be an email
                statusCode: 400
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v1/user
                message:
                  - jwt malformed
                statusCode: 401
      tags:
        - auth
  /v1/auth/forgot_password:
    post:
      operationId: AuthController_forgotPasswordV1
      summary: Reset password
      description: >-
        Initiates users forgot password flow, user will receive a code from AWS
        in their email
      parameters:
        - name: x-auth-token
          in: header
          description: >

            Token protecting non-jwt routes. Format: `<secret>+<clientId>`
            (base64 encoded)
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthForgotPasswordRequestDto'
      responses:
        '201':
          description: Successful request
          content:
            application/json:
              schema:
                properties:
                  status:
                    type: string
                    enum:
                      - success
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - property city should not exist
                  - email must be an email
                statusCode: 400
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v1/user
                message:
                  - jwt malformed
                statusCode: 401
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - Internal server error
                statusCode: 500
      tags:
        - auth
  /v1/auth/confirm_new_password:
    post:
      operationId: AuthController_confirmNewPasswordV1
      summary: Change password
      description: Changes users password with verification code and new password
      parameters:
        - name: x-auth-token
          in: header
          description: >

            Token protecting non-jwt routes. Format: `<secret>+<clientId>`
            (base64 encoded)
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthConfirmNewPasswordRequestDto'
      responses:
        '201':
          description: Successful request
          content:
            application/json:
              schema:
                properties:
                  status:
                    type: string
                    enum:
                      - success
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - property city should not exist
                  - email must be an email
                statusCode: 400
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v1/user
                message:
                  - jwt malformed
                statusCode: 401
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - Internal server error
                statusCode: 500
      tags:
        - auth
  /v1/auth/sign-out:
    post:
      operationId: AuthController_signOutV1
      summary: Sign out
      description: Revokes all tokens
      parameters:
        - name: x-auth-token
          in: header
          description: >

            Token protecting non-jwt routes. Format: `<secret>+<clientId>`
            (base64 encoded)
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthSignOutRequestDto'
      responses:
        '201':
          description: Successful request
          content:
            application/json:
              schema:
                properties:
                  status:
                    type: string
                    enum:
                      - success
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - property city should not exist
                  - email must be an email
                statusCode: 400
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v1/user
                message:
                  - jwt malformed
                statusCode: 401
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - Internal server error
                statusCode: 500
      tags:
        - auth
  /v1/user:
    get:
      operationId: UserController_findOneV1
      summary: Fetch profile
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserEntity'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - property city should not exist
                  - email must be an email
                statusCode: 400
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v1/user
                message:
                  - jwt malformed
                statusCode: 401
      tags:
        - user
      security:
        - bearer: []
    put:
      operationId: UserController_updateV1
      summary: Update profile
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserUpdateDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserEntity'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - property city should not exist
                  - email must be an email
                statusCode: 400
      tags:
        - user
      security:
        - bearer: []
    delete:
      operationId: UserController_deleteV1
      summary: Delete account
      parameters: []
      responses:
        '200':
          description: Successful request
          content:
            application/json:
              schema:
                properties:
                  status:
                    type: string
                    enum:
                      - success
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - property city should not exist
                  - email must be an email
                statusCode: 400
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - Internal server error
                statusCode: 500
      tags:
        - user
      security:
        - bearer: []
  /v1/user/beta_access:
    post:
      operationId: UserController_requestBetaAccessV1
      summary: Request beta access
      description: >+

        The process is the following.


        1) First the user requests beta

        2) A email gets sent to legal@nowatch.com and the request is added to
        the database

        3) A NOWATCH admin will login to the admin dashboard ([test admin
        dashboard](https://nowatch-admin-dashboard-test.vercel.app/) or
        [production admin
        dashboard](https://nowatch-admin-dashboard.vercel.app/)) and approve /
        deny the request

      parameters: []
      responses:
        '200':
          description: Successful request
          content:
            application/json:
              schema:
                properties:
                  status:
                    type: string
                    enum:
                      - success
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - property city should not exist
                  - email must be an email
                statusCode: 400
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - Internal server error
                statusCode: 500
      tags:
        - user
      security:
        - bearer: []
  /v1/user/change_password:
    post:
      operationId: UserController_changePasswordV1
      summary: Update password
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserChangePasswordDto'
      responses:
        '200':
          description: Successful request
          content:
            application/json:
              schema:
                properties:
                  status:
                    type: string
                    enum:
                      - success
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - property city should not exist
                  - email must be an email
                statusCode: 400
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - Internal server error
                statusCode: 500
      tags:
        - user
      security:
        - bearer: []
  /v1/user/settings:
    get:
      operationId: UserController_fetchSettings
      summary: Fetch settings
      description: >-
        For extra context visit: [User Settings
        Context](/guides/user-settings-context)
      parameters: []
      responses:
        '200':
          description: User settings object and extra information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SettingsResponseDto'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - property city should not exist
                  - email must be an email
                statusCode: 400
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v1/user
                message:
                  - jwt malformed
                statusCode: 401
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - Internal server error
                statusCode: 500
      tags:
        - user
      security:
        - bearer: []
    put:
      operationId: UserController_updateSettings
      summary: Update settings
      description: >-
        For extra context visit: [User Settings
        Context](/guides/user-settings-context)
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SettingsDto'
      responses:
        '200':
          description: User settings object and extra information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SettingsResponseDto'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v1/user
                message:
                  - jwt malformed
                statusCode: 401
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - Internal server error
                statusCode: 500
      tags:
        - user
      security:
        - bearer: []
  /v1/user/export:
    get:
      operationId: UserController_export
      summary: Export data
      parameters:
        - name: start_day
          required: true
          in: query
          description: Start day (inclusive) in YYYY-MM-DD format
          schema:
            example: '2025-01-01'
            type: string
        - name: end_day
          required: true
          in: query
          description: End day (inclusive) in YYYY-MM-DD format
          schema:
            example: '2025-01-31'
            type: string
        - name: types
          required: false
          in: query
          description: >-
            Comma-separated list of data types to export. If not provided, all
            data types will be exported.
          schema:
            type: array
            items:
              type: string
        - name: encryptedUserIds
          required: false
          in: query
          description: >-
            Optional array of encrypted user IDs to export data for. The
            requesting user must have sharing permissions with these users.
          schema:
            example:
              - encrypted_user_id_1
              - encrypted_user_id_2
            type: array
            items:
              type: string
      responses:
        '200':
          description: Stream file download
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v1/user
                message:
                  - jwt malformed
                statusCode: 401
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - Internal server error
                statusCode: 500
      tags:
        - user
      security:
        - bearer: []
  /v1/user/export/create:
    post:
      operationId: UserController_createExport
      summary: Create data export
      parameters:
        - name: start_day
          required: true
          in: query
          description: Start day (inclusive) in YYYY-MM-DD format
          schema:
            example: '2025-01-01'
            type: string
        - name: end_day
          required: true
          in: query
          description: End day (inclusive) in YYYY-MM-DD format
          schema:
            example: '2025-01-31'
            type: string
        - name: types
          required: false
          in: query
          description: >-
            Comma-separated list of data types to export. If not provided, all
            data types will be exported.
          schema:
            type: array
            items:
              type: string
        - name: encryptedUserIds
          required: false
          in: query
          description: >-
            Optional array of encrypted user IDs to export data for. The
            requesting user must have sharing permissions with these users.
          schema:
            example:
              - encrypted_user_id_1
              - encrypted_user_id_2
            type: array
            items:
              type: string
      responses:
        '200':
          description: Export created
          content:
            application/json:
              schema:
                example:
                  id: uuid
      tags:
        - user
      security:
        - bearer: []
  /v1/user/export/list:
    get:
      operationId: UserController_listExports
      summary: List data exports
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DataExportEntity'
      tags:
        - user
      security:
        - bearer: []
  /v1/user/export/{id}/status:
    get:
      operationId: UserController_getExportStatus
      summary: Get export status
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: Export status
          content:
            application/json:
              schema:
                example:
                  status: PENDING
      tags:
        - user
      security:
        - bearer: []
  /v1/user/export/{id}/result:
    get:
      operationId: UserController_getExportResult
      summary: Get export result (download file)
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
      tags:
        - user
      security:
        - bearer: []
  /v1/user/admin/all:
    get:
      operationId: UserController_getAllV1
      summary: (Admin) Get all users
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/FullUserEntity'
      tags:
        - user
      security:
        - bearer: []
  /v1/user/admin/beta/all:
    get:
      operationId: UserController_findBetaRequestsV1
      summary: (Admin) Get all beta requests
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/UserBetaRequestEntity'
      tags:
        - user
      security:
        - bearer: []
  /v1/user/admin/beta/set:
    post:
      operationId: UserController_setBetaV1
      summary: (Admin) Set beta request status
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserBetaAdminDto'
      responses:
        '200':
          description: Successful request
          content:
            application/json:
              schema:
                properties:
                  status:
                    type: string
                    enum:
                      - success
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - property city should not exist
                  - email must be an email
                statusCode: 400
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - Internal server error
                statusCode: 500
      tags:
        - user
      security:
        - bearer: []
  /v1/user/admin:
    put:
      operationId: UserController_updateAdminV1
      summary: (Admin) Update any users profile
      parameters:
        - name: id
          required: false
          in: query
          schema:
            type: string
        - name: email
          required: false
          in: query
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserUpdateDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserEntity'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - property city should not exist
                  - email must be an email
                statusCode: 400
      tags:
        - user
      security:
        - bearer: []
    get:
      operationId: UserController_findUserByEmailV1
      summary: (Admin) Fetch any user profile by email
      parameters:
        - name: email
          required: true
          in: query
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserEntity'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - property city should not exist
                  - email must be an email
                statusCode: 400
        '404':
          description: ''
      tags:
        - user
      security:
        - bearer: []
  /v1/user/admin/measurementsSince/{date}:
    get:
      operationId: UserController_usersWithMeasurementsV1
      summary: (Admin) Fetch list of users who have measurements since date
      parameters:
        - name: date
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/UserMeasurementsTypeSinceDto'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - property city should not exist
                  - email must be an email
                statusCode: 400
      tags:
        - user
      security:
        - bearer: []
  /v1/user/admin/{id}:
    get:
      operationId: UserController_findOneUserV1
      summary: (Admin) Fetch any user profile
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserEntity'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - property city should not exist
                  - email must be an email
                statusCode: 400
        '404':
          description: ''
      tags:
        - user
      security:
        - bearer: []
  /v1/firmware/latest:
    get:
      operationId: FirmwareController_latestV1
      summary: Fetch latest firmware
      deprecated: true
      parameters:
        - name: app-version
          required: true
          in: header
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FirmwareEntity'
        '404':
          description: Firmware not found
      tags:
        - firmware
      security:
        - bearer: []
  /v2/firmware/latest:
    get:
      operationId: FirmwareController_latestV2
      summary: Fetch latest firmware
      deprecated: true
      parameters:
        - name: platform
          required: true
          in: query
          schema:
            enum:
              - IOS
              - ANDROID
            type: string
        - name: app-version
          required: true
          in: header
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FirmwareEntity'
        '404':
          description: Firmware not found
      tags:
        - firmware
      security:
        - bearer: []
  /v3/firmware/latest:
    get:
      operationId: FirmwareController_latestV3
      summary: Fetch latest firmware
      description: >-
        ### Fetch Latest Firmware (V3)


        This endpoint retrieves the latest compatible firmware version for the
        requesting client. The compatibility is determined by several factors:


        1.  **User Early Access Status**: If the authenticated user has 

        `isEarlyAccess` set to 

        `true`,
         the system will first attempt to find an early access firmware. If a compatible early access firmware is found, it will be returned. Otherwise, the system will proceed to look for a general release firmware.
        2.  **Client Application Version (`app-version` header)**: The 

        `app-version`
         header, provided by the client application (e.g., "1.2.3"), is crucial for determining firmware compatibility. Only firmwares with a 
        `min_app_version`
         less than or equal to the client's 
        `app-version`
         will be considered.
        3.  **Platform (`platform` query parameter)**: Specifies the target
        platform for the firmware (e.g., 

        `IOS`

        , 

        `ANDROID`

        ).

        4.  **Device (`device` query parameter)**: Specifies the target device
        model for the firmware (e.g., 

        `X`

        , 

        `B`

        ).


        **Process to find the latest firmware:**


        *   **Step 1: Fetch Candidate Firmwares**: The system queries the
        database for all firmware records that match the provided 

        `platform`
         and 
        `device`

        .

        *   **Step 2: Prioritize Early Access (if applicable)**: If the user is
        an early access user, the system filters the candidate firmwares to
        include only those marked as 

        `earlyAccess: true`

        . If no compatible early access firmware is found, it then considers
        general release firmwares.

        *   **Step 3: Filter by Application Version Compatibility**: From the
        remaining candidate firmwares, only those where the client's 

        `app-version`
         is greater than or equal to the firmware's 
        `min_app_version`
         are kept. This ensures that the firmware is compatible with the client's current application.
            *   **Example**: If the client's 
        `app-version`
         is 
        `1.5.0`

        :
                *   A firmware with 
        `min_app_version: 1.4.0`
         is **compatible** (
        `1.5.0 >= 1.4.0`

        ).
                *   A firmware with 
        `min_app_version: 1.6.0`
         is **incompatible** (
        `1.5.0 < 1.6.0`

        ).

        *   **Step 4: Sort by Version**: The compatible firmwares are then
        sorted in descending order based on their 

        `version`
         number (e.g., "1.0.1" is newer than "1.0.0").
        *   **Step 5: Return Latest**: The firmware at the top of the sorted
        list (i.e., the latest compatible version) is returned.


        **Error Handling:**


        *   If the 

        `app-version`
         header is missing or in an invalid format (expected 
        `x.y.z`

        ), a 

        `400 Bad Request`
         error is returned.
        *   If no compatible firmware is found after applying all filters, a 

        `404 Not Found`
         error is returned.
            
      parameters:
        - name: platform
          required: true
          in: query
          schema:
            enum:
              - IOS
              - ANDROID
            type: string
        - name: device
          required: true
          in: query
          schema:
            enum:
              - X
              - B
            type: string
        - name: app-version
          required: true
          in: header
          schema:
            type: string
      responses:
        '200':
          schema:
            example:
              id: 1
              version: 1.0.0
              file: firmware/ANDROID/X/1.0.0/firmware.bin
              latest: false
              earlyAccess: false
              platform: ANDROID
              device: X
              appVersion: 1.0.0
              created: '2023-01-01T12:00:00.000Z'
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FirmwareEntity'
        '400':
          description: Bad request - appVersion is required or invalid format.
        '404':
          description: Firmware not found
      tags:
        - firmware
      security:
        - bearer: []
  /v1/firmware/download_latest:
    get:
      operationId: FirmwareController_downloadLatestV1
      summary: Download latest firmware
      deprecated: true
      parameters: []
      responses:
        '200':
          description: Firmware file to download
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '404':
          description: Firmware not found
      tags:
        - firmware
      security:
        - bearer: []
  /v1/firmware/download:
    get:
      operationId: FirmwareController_downloadV1
      summary: Download specified version
      deprecated: true
      parameters:
        - name: version
          required: true
          in: query
          schema:
            type: string
      responses:
        '200':
          description: Firmware file to download
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '404':
          description: Firmware not found
      tags:
        - firmware
      security:
        - bearer: []
  /v2/firmware/download:
    get:
      operationId: FirmwareController_downloadV2
      summary: Download specified version for device
      parameters:
        - name: version
          required: true
          in: query
          schema:
            type: string
        - name: device
          required: true
          in: query
          schema:
            enum:
              - X
              - B
            type: string
      responses:
        '200':
          description: Firmware file to download
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '400':
          description: Bad request - firmware not found or file not found in S3.
        '404':
          description: Firmware not found
      tags:
        - firmware
      security:
        - bearer: []
  /admin/firmware:
    get:
      operationId: FirmwareAdminController_listFirmware
      summary: List all firmware versions
      parameters:
        - name: platform
          required: false
          in: query
          schema:
            enum:
              - IOS
              - ANDROID
            type: string
        - name: device
          required: false
          in: query
          schema:
            enum:
              - X
              - B
            type: string
        - name: earlyAccess
          required: false
          in: query
          schema:
            type: boolean
      responses:
        '200':
          description: List of firmware versions
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/FirmwareAdminResponseDto'
      tags:
        - admin-firmware
      security:
        - bearer: []
    post:
      operationId: FirmwareAdminController_createFirmware
      summary: Create new firmware version
      parameters: []
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                version:
                  type: string
                  example: 1.0.0
                platform:
                  type: string
                  enum:
                    - IOS
                    - ANDROID
                  example: ANDROID
                device:
                  type: string
                  enum:
                    - X
                    - B
                  example: X
                earlyAccess:
                  type: boolean
                  example: false
                appVersion:
                  type: string
                  example: 1.0.0
                file:
                  type: string
                  format: binary
              required:
                - version
                - platform
                - device
                - earlyAccess
                - appVersion
                - file
      responses:
        '201':
          description: Firmware created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FirmwareAdminResponseDto'
        '400':
          description: >-
            Bad request - validation failed, firmware already exists, invalid
            appVersion format, or failed to upload file to S3.
      tags:
        - admin-firmware
      security:
        - bearer: []
  /admin/firmware/active:
    put:
      operationId: FirmwareAdminController_setActiveFirmware
      summary: Set active firmware version
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetActiveFirmwareRequestDto'
      responses:
        '200':
          description: Firmware set as active successfully
        '400':
          description: >-
            Bad request - firmware not found, validation failed, or earlyAccess
            mismatch.
        '404':
          description: Firmware not found.
      tags:
        - admin-firmware
      security:
        - bearer: []
  /admin/firmware/{id}:
    delete:
      operationId: FirmwareAdminController_deleteFirmware
      summary: Delete firmware version
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        '200':
          description: Firmware deleted successfully
        '400':
          description: Bad request - failed to delete firmware.
        '404':
          description: Firmware not found.
      tags:
        - admin-firmware
      security:
        - bearer: []
  /v1/measurement:
    get:
      operationId: MeasurementController_fetchRawMeasurementsV1
      summary: Fetch users measurements
      parameters:
        - name: type
          required: true
          in: query
          schema:
            enum:
              - HEART_BEAT
              - HEART_RATE
              - HEART_RATE_GRAPH
              - RESPIRATION_RATE
              - RESTING_HEART_RATE
              - TEMPERATURE
              - ACTIVITY_COUNT
              - ACTIVITY_TYPE
              - ACTIVITY_CADENCE
              - MOTION_GRAPH
              - REACTIVITY_GRAPH
              - SLEEP_SESSION
              - BOSCH_STEP_COUNT
              - BOSCH_ACTIVITY_TYPE
              - SYSTEM_EVENTS
              - SKIN_CONDUCTANCE
              - RAW_ACCEL
              - RAW_ADC
              - RAW_PPG_GREEN
              - RAW_PPG_AMBIENT
              - RAW_PPG_SINGLE_GREEN
              - RAW_PPG_SINGLE_AMBIENT
              - RAW_SKIN_CONDUCTANCE
              - NOWATCH_ACTIVITY_TYPE
              - REACTIVITY_PEAKS
              - STEPS_GRAPH
              - INTERBEAT_INTERVAL
            type: string
        - name: sort
          required: true
          in: query
          schema:
            enum:
              - ASC
              - DESC
            type: string
        - name: start_day
          required: true
          in: query
          schema:
            type: string
        - name: end_day
          required: true
          in: query
          schema:
            type: string
        - name: shared-user
          in: header
          description: The ID of the user to fetch measurements for (optional)
          required: false
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MeasurementEntity'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - property city should not exist
                  - email must be an email
                statusCode: 400
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v1/user
                message:
                  - jwt malformed
                statusCode: 401
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - Internal server error
                statusCode: 500
      tags:
        - measurement
      security:
        - bearer: []
    delete:
      operationId: MeasurementController_deleteRawMeasurementsV1
      summary: Delete users measurements
      parameters:
        - name: type
          required: true
          in: query
          schema:
            enum:
              - HEART_BEAT
              - HEART_RATE
              - HEART_RATE_GRAPH
              - RESPIRATION_RATE
              - RESTING_HEART_RATE
              - TEMPERATURE
              - ACTIVITY_COUNT
              - ACTIVITY_TYPE
              - ACTIVITY_CADENCE
              - MOTION_GRAPH
              - REACTIVITY_GRAPH
              - SLEEP_SESSION
              - BOSCH_STEP_COUNT
              - BOSCH_ACTIVITY_TYPE
              - SYSTEM_EVENTS
              - SKIN_CONDUCTANCE
              - RAW_ACCEL
              - RAW_ADC
              - RAW_PPG_GREEN
              - RAW_PPG_AMBIENT
              - RAW_PPG_SINGLE_GREEN
              - RAW_PPG_SINGLE_AMBIENT
              - RAW_SKIN_CONDUCTANCE
              - NOWATCH_ACTIVITY_TYPE
              - REACTIVITY_PEAKS
              - STEPS_GRAPH
              - INTERBEAT_INTERVAL
            type: string
        - name: start_day
          required: true
          in: query
          schema:
            type: string
        - name: end_day
          required: true
          in: query
          schema:
            type: string
      responses:
        '200':
          description: Measurements are deleted
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - property city should not exist
                  - email must be an email
                statusCode: 400
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v1/user
                message:
                  - jwt malformed
                statusCode: 401
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - Internal server error
                statusCode: 500
      tags:
        - measurement
      security:
        - bearer: []
  /v1/measurement/upload:
    post:
      operationId: MeasurementController_uploadV1
      summary: Upload users measurements in a compressed ZIP file
      description: >-
        This endpoint is used to upload time series data to the backend. The
        request is a 

        multipart/form-data request with two parts:

        1.  file: The zipped CSV file containing the time-series data.

        2.  type: The name of the table the data belongs to.


        For extra context visit: [Measurements
        Context](/guides/measurements-context)
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MeasurementUploadDto'
      responses:
        '200':
          description: Successful request
          content:
            application/json:
              schema:
                properties:
                  status:
                    type: string
                    enum:
                      - success
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - property city should not exist
                  - email must be an email
                statusCode: 400
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v1/user
                message:
                  - jwt malformed
                statusCode: 401
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - Internal server error
                statusCode: 500
      tags:
        - measurement
      security:
        - bearer: []
  /v1/measurement/oldest:
    get:
      operationId: MeasurementController_fetchOldestMeasurementsV1
      summary: Shows the latest measurements dates for a user per type
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MeasurementsSince'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - property city should not exist
                  - email must be an email
                statusCode: 400
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v1/user
                message:
                  - jwt malformed
                statusCode: 401
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - Internal server error
                statusCode: 500
      tags:
        - measurement
      security:
        - bearer: []
  /v1/insight/feedback:
    post:
      operationId: InsightController_createFeedbackV1
      summary: Upload users insight feedback
      deprecated: true
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/InsightFeedbackDto'
      responses:
        '201':
          description: ''
        '400':
          description: ''
      tags:
        - insight
      security:
        - bearer: []
  /v2/insight/feedback:
    post:
      operationId: InsightController_createFeedbackV2
      summary: Upload users insight feedback
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/InsightFeedbackV2Dto'
      responses:
        '201':
          description: ''
        '400':
          description: ''
      tags:
        - insight
      security:
        - bearer: []
  /v1/insight:
    post:
      operationId: InsightController_createV1
      summary: Create a reflection for the day or week
      deprecated: true
      parameters:
        - name: app-version
          required: true
          in: header
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InsightReflectionDto'
      responses:
        '201':
          description: ''
        '400':
          description: ''
      tags:
        - insight
      security:
        - bearer: []
  /v2/insight:
    post:
      operationId: InsightController_createV2
      summary: Create a reflection for the day or week
      parameters:
        - name: app-version
          required: true
          in: header
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InsightReflectionDtoV2'
      responses:
        '201':
          description: ''
        '400':
          description: ''
      tags:
        - insight
      security:
        - bearer: []
  /v1/insight/{id}:
    get:
      operationId: InsightController_fetchReflectionV1
      summary: Fetch reflection with instance id
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InsightReflectionEntity'
        '400':
          description: ''
        '404':
          description: ''
      tags:
        - insight
      security:
        - bearer: []
  /v1/session:
    post:
      operationId: SessionController_createV1
      summary: Creates new sessions
      description: 'For extra context visit: [Sessions Context](/guides/sessions-context)'
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/CreateSessionDto'
      responses:
        '201':
          description: Returns created session id list
        '400':
          description: Something went wrong
      tags:
        - session
      security:
        - bearer: []
    get:
      operationId: SessionController_findAllV1
      summary: Fetch all user sessions based on start and end date
      description: 'For extra context visit: [Sessions Context](/guides/sessions-context)'
      parameters:
        - name: start_date
          required: true
          in: query
          schema:
            type: string
        - name: end_date
          required: true
          in: query
          schema:
            type: string
        - name: shared-user
          in: header
          description: The ID of the user to fetch measurements for (optional)
          required: false
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SessionEntity'
      tags:
        - session
      security:
        - bearer: []
  /v1/session/{id}:
    get:
      operationId: SessionController_findOneV1
      summary: Fetch session
      description: 'For extra context visit: [Sessions Context](/guides/sessions-context)'
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: shared-user
          in: header
          description: The ID of the user to fetch measurements for (optional)
          required: false
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionEntity'
      tags:
        - session
      security:
        - bearer: []
    put:
      operationId: SessionController_updateV1
      summary: Update session
      description: 'For extra context visit: [Sessions Context](/guides/sessions-context)'
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSessionDto'
      responses:
        '200':
          description: 'Status: Success'
      tags:
        - session
      security:
        - bearer: []
    delete:
      operationId: SessionController_removeV1
      summary: Delete session
      description: 'For extra context visit: [Sessions Context](/guides/sessions-context)'
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        '202':
          description: 'Status: Success'
      tags:
        - session
      security:
        - bearer: []
  /v1/activity:
    post:
      operationId: ActivityController_create
      summary: Creates a new activity
      description: 'For extra context visit: [Sessions Context](/guides/sessions-context)'
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateActivityDto'
      responses:
        '201':
          description: Returns created activity id
        '400':
          description: Something went wrong
      tags:
        - activity
      security:
        - bearer: []
    get:
      operationId: ActivityController_findActivities
      summary: Fetch all activites for date range
      description: 'For extra context visit: [Sessions Context](/guides/sessions-context)'
      parameters:
        - name: start_date
          required: true
          in: query
          schema:
            type: string
        - name: end_date
          required: true
          in: query
          schema:
            type: string
        - name: shared-user
          in: header
          description: The ID of the user to fetch measurements for (optional)
          required: false
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ActivityEntity'
      tags:
        - activity
      security:
        - bearer: []
  /v1/activity/{id}:
    get:
      operationId: ActivityController_findActivity
      summary: Fetch activity by id
      description: 'For extra context visit: [Sessions Context](/guides/sessions-context)'
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: shared-user
          in: header
          description: The ID of the user to fetch measurements for (optional)
          required: false
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ActivityEntity'
      tags:
        - activity
      security:
        - bearer: []
    put:
      operationId: ActivityController_update
      summary: Update activity
      description: 'For extra context visit: [Sessions Context](/guides/sessions-context)'
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateActivityDto'
      responses:
        '200':
          description: 'Status: Success'
      tags:
        - activity
      security:
        - bearer: []
    delete:
      operationId: ActivityController_remove
      summary: Delete a activity
      description: 'For extra context visit: [Sessions Context](/guides/sessions-context)'
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        '202':
          description: 'Status: success'
      tags:
        - activity
      security:
        - bearer: []
  /v1/intention:
    post:
      operationId: IntentionController_create
      summary: Creates a new intention
      description: 'For extra context visit: [Sessions Context](/guides/sessions-context)'
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateIntentionDto'
      responses:
        '201':
          description: Returns created intention id
        '400':
          description: Something went wrong
      tags:
        - intention
      security:
        - bearer: []
    get:
      operationId: IntentionController_find
      summary: Fetch all intentions for date range
      description: 'For extra context visit: [Sessions Context](/guides/sessions-context)'
      parameters:
        - name: start_date
          required: true
          in: query
          schema:
            type: string
        - name: end_date
          required: true
          in: query
          schema:
            type: string
        - name: shared-user
          in: header
          description: The ID of the user to fetch measurements for (optional)
          required: false
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/IntentionEntity'
      tags:
        - intention
      security:
        - bearer: []
  /v1/intention/{id}:
    get:
      operationId: IntentionController_findOne
      summary: Fetch intention by id
      description: 'For extra context visit: [Sessions Context](/guides/sessions-context)'
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: shared-user
          in: header
          description: The ID of the user to fetch measurements for (optional)
          required: false
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/IntentionEntity'
      tags:
        - intention
      security:
        - bearer: []
    put:
      operationId: IntentionController_update
      summary: Update intention
      description: 'For extra context visit: [Sessions Context](/guides/sessions-context)'
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateIntentionDto'
      responses:
        '200':
          description: 'Status: Success'
      tags:
        - intention
      security:
        - bearer: []
    delete:
      operationId: IntentionController_remove
      summary: Delete a intention
      description: 'For extra context visit: [Sessions Context](/guides/sessions-context)'
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        '202':
          description: 'Status: success'
      tags:
        - intention
      security:
        - bearer: []
  /v1/statistics:
    get:
      operationId: StatisticsController_getManyStatistics
      summary: Get multiple statistics
      description: >-
        For more information visit [Statistics
        Context](https://docs.api.nowatch.tech/guides/statistics-context)
      parameters:
        - name: start_day
          required: true
          in: query
          description: Start date in YYYY-MM-DD format
          schema:
            example: '2024-03-20'
            type: string
        - name: end_day
          required: true
          in: query
          description: End date in YYYY-MM-DD format
          schema:
            example: '2024-03-20'
            type: string
        - name: type
          required: true
          in: query
          schema:
            type: array
            items:
              type: string
              enum:
                - STRESS_DURATION
                - STRESS_RECOVERY
                - STRESS_FREQUENCY
                - INTENSE_ACTIVITY
                - DAYTIME_RESTING_HEART_RATE
                - SLEEP_HRV
                - SLEEP_DURATION
                - SLEEP_REGULARITY
                - SLEEP_STAGES
                - SLEEP_CYCLES
                - AWAKE_DURATION
                - WAKE_HOUR
                - STEP_COUNT
                - STRESSOR_RECOVERY_TIME
                - STRESSORS
                - HEART_RATE
                - RESTING_HEART_RATE
                - HRV
                - REACTIVITY
                - ACTIVITIES_DURATION
                - ACTIVITY_COUNT
                - REACTIVITY_DURING_STRESSORS
                - LOW_REACTIVITY_DURATION
                - STRESS_DURATION_DESCRIPTIVE
                - STRESS_RECOVERY_DESCRIPTIVE
                - STRESS_FREQUENCY_DESCRIPTIVE
                - STRESS_DESCRIPTIVE
                - INTENSE_ACTIVITY_DESCRIPTIVE
                - RESTING_HEART_RATE_DESCRIPTIVE
                - SLEEP_DURATION_DESCRIPTIVE
                - SLEEP_REGULARITY_DESCRIPTIVE
                - HRV_DESCRIPTIVE
                - TEMPERATURE
                - TEMPERATURE_DESCRIPTIVE
        - name: shared-user
          in: header
          description: The ID of the user to fetch measurements for (optional)
          required: false
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/StatisticsEntity'
        '400':
          description: ''
      tags:
        - statistics
      security:
        - bearer: []
    post:
      operationId: StatisticsController_createStatistics
      summary: Create multiple statistics
      description: >-
        For more information visit [Statistics
        Context](https://docs.api.nowatch.tech/guides/statistics-context)
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StatisticsBatch'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/StatisticsEntity'
        '400':
          description: ''
      tags:
        - statistics
      security:
        - bearer: []
  /v1/statistics/batch:
    put:
      operationId: StatisticsController_createManyStatistics
      summary: Create or update multiple statistics
      description: >-
        For more information visit [Statistics
        Context](https://docs.api.nowatch.tech/guides/statistics-context)
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StatisticsBatch'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/StatisticsEntity'
        '400':
          description: ''
      tags:
        - statistics
      security:
        - bearer: []
  /v1/statistics/{date}/{type}:
    put:
      operationId: StatisticsController_createOrUpdateStatistics
      summary: Create or update a single statistic
      description: >-
        For more information visit [Statistics
        Context](https://docs.api.nowatch.tech/guides/statistics-context)
      parameters:
        - name: date
          required: true
          in: path
          description: Date in YYYY-MM-DD format
          schema:
            format: date-time
            example: '2024-03-20'
            type: string
        - name: type
          required: true
          in: path
          schema:
            enum:
              - STRESS_DURATION
              - STRESS_RECOVERY
              - STRESS_FREQUENCY
              - INTENSE_ACTIVITY
              - DAYTIME_RESTING_HEART_RATE
              - SLEEP_HRV
              - SLEEP_DURATION
              - SLEEP_REGULARITY
              - SLEEP_STAGES
              - SLEEP_CYCLES
              - AWAKE_DURATION
              - WAKE_HOUR
              - STEP_COUNT
              - STRESSOR_RECOVERY_TIME
              - STRESSORS
              - HEART_RATE
              - RESTING_HEART_RATE
              - HRV
              - REACTIVITY
              - ACTIVITIES_DURATION
              - ACTIVITY_COUNT
              - REACTIVITY_DURING_STRESSORS
              - LOW_REACTIVITY_DURATION
              - STRESS_DURATION_DESCRIPTIVE
              - STRESS_RECOVERY_DESCRIPTIVE
              - STRESS_FREQUENCY_DESCRIPTIVE
              - STRESS_DESCRIPTIVE
              - INTENSE_ACTIVITY_DESCRIPTIVE
              - RESTING_HEART_RATE_DESCRIPTIVE
              - SLEEP_DURATION_DESCRIPTIVE
              - SLEEP_REGULARITY_DESCRIPTIVE
              - HRV_DESCRIPTIVE
              - SLEEP
              - TEMPERATURE
              - TEMPERATURE_DESCRIPTIVE
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StatisticsDtoUpdate'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatisticsEntity'
        '400':
          description: ''
      tags:
        - statistics
      security:
        - bearer: []
    delete:
      operationId: StatisticsController_deleteOneStatistics
      summary: Delete a single statistic
      description: >-
        For more information visit [Statistics
        Context](https://docs.api.nowatch.tech/guides/statistics-context)
      parameters:
        - name: date
          required: true
          in: path
          description: Date in YYYY-MM-DD format
          schema:
            format: date-time
            example: '2024-03-20'
            type: string
        - name: type
          required: true
          in: path
          schema:
            enum:
              - STRESS_DURATION
              - STRESS_RECOVERY
              - STRESS_FREQUENCY
              - INTENSE_ACTIVITY
              - DAYTIME_RESTING_HEART_RATE
              - SLEEP_HRV
              - SLEEP_DURATION
              - SLEEP_REGULARITY
              - SLEEP_STAGES
              - SLEEP_CYCLES
              - AWAKE_DURATION
              - WAKE_HOUR
              - STEP_COUNT
              - STRESSOR_RECOVERY_TIME
              - STRESSORS
              - HEART_RATE
              - RESTING_HEART_RATE
              - HRV
              - REACTIVITY
              - ACTIVITIES_DURATION
              - ACTIVITY_COUNT
              - REACTIVITY_DURING_STRESSORS
              - LOW_REACTIVITY_DURATION
              - STRESS_DURATION_DESCRIPTIVE
              - STRESS_RECOVERY_DESCRIPTIVE
              - STRESS_FREQUENCY_DESCRIPTIVE
              - STRESS_DESCRIPTIVE
              - INTENSE_ACTIVITY_DESCRIPTIVE
              - RESTING_HEART_RATE_DESCRIPTIVE
              - SLEEP_DURATION_DESCRIPTIVE
              - SLEEP_REGULARITY_DESCRIPTIVE
              - HRV_DESCRIPTIVE
              - TEMPERATURE
              - TEMPERATURE_DESCRIPTIVE
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatisticsEntity'
        '400':
          description: ''
      tags:
        - statistics
      security:
        - bearer: []
  /v1/checkin:
    post:
      operationId: CheckinController_createV1
      summary: Creates new check-ins ('How do you feel?')
      description: >

        The Check-in feature (”How do you feel?” question) is designed to
        support users with greater awareness of their internal state by
        encouraging regular moments of self-reflection throughout the day.


        This question can appear randomly or after N minutes of prolonged
        stress. These settings are chosen by the user. They can choose the
        following options:


        * 0, 3, 6, or 9 daily random vibrations;

        * Prolonged stress vibrations (when in more than 5, 10, 15, or 20
        minutes consecutively under stress);

        * Both random and prolonged stress vibrations.


        From each a Check-In, the following information can be obtained:


        * **Origin of the check-in**: user initiative, random vibration, or
        prolonged stress vibration.

        * **How does the user feel**:
            * Reactivity: very calm, calm, neutral, stressed, very stressed;
            * Valence: very negative, negative, neutrals, positive, very positive;
        * **Related feelings**: happy, sad, etc.

        * **What was the user doing**;

        * **Who was the user with**.
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/CreateCheckinDto'
      responses:
        '201':
          description: 'Status: Success'
        '400':
          description: Something went wrong
      tags:
        - checkin
      security:
        - bearer: []
    get:
      operationId: CheckinController_findAllV1
      summary: Fetch all user checkins based on date range
      parameters:
        - name: start_date
          required: true
          in: query
          schema:
            type: string
        - name: end_date
          required: true
          in: query
          schema:
            type: string
        - name: shared-user
          in: header
          description: The ID of the user to fetch measurements for (optional)
          required: false
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CheckinEntity'
      tags:
        - checkin
      security:
        - bearer: []
  /v1/checkin/{id}:
    get:
      operationId: CheckinController_findOneV1
      summary: Fetch checkin
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: shared-user
          in: header
          description: The ID of the user to fetch measurements for (optional)
          required: false
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckinEntity'
      tags:
        - checkin
      security:
        - bearer: []
    put:
      operationId: CheckinController_updateV1
      summary: Update checkin
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCheckinDto'
      responses:
        '200':
          description: 'Status: Success'
      tags:
        - checkin
      security:
        - bearer: []
    delete:
      operationId: CheckinController_removeV1
      summary: Delete checkin
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        '202':
          description: 'Status: Success'
      tags:
        - checkin
      security:
        - bearer: []
  /v1/alarm:
    post:
      operationId: AlarmController_createV1
      summary: Creates new alarms
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/CreateAlarmDto'
      responses:
        '201':
          description: 'Status: Success'
        '400':
          description: Something went wrong
      tags:
        - alarm
      security:
        - bearer: []
    get:
      operationId: AlarmController_findAllV1
      summary: Fetch all user alarms based on offset, limit
      parameters:
        - name: offset
          required: true
          in: query
          schema:
            type: string
        - name: limit
          required: true
          in: query
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AlarmEntity'
      tags:
        - alarm
      security:
        - bearer: []
  /v1/alarm/{id}:
    get:
      operationId: AlarmController_findOneV1
      summary: Fetch alarm
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlarmEntity'
      tags:
        - alarm
      security:
        - bearer: []
    put:
      operationId: AlarmController_updateV1
      summary: Update session
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAlarmDto'
      responses:
        '200':
          description: 'Status: Success'
      tags:
        - alarm
      security:
        - bearer: []
    delete:
      operationId: AlarmController_removeV1
      summary: Delete session
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        '202':
          description: 'Status: Success'
      tags:
        - alarm
      security:
        - bearer: []
  /v1/day-feedback:
    post:
      operationId: DayFeedbackController_createV1
      summary: Creates new day feedback ('How was your day/sleep?')
      description: >

        Each day, the user receives two questions in the app, under the Now tab.


        ### "How was your day?" question


        This question appears once each day, when you open the app after the
        theoretical end of the workday (between 5 p.m. and midnight).


        *   **Possible values**: very bad, bad, okay, good, very good.


        ### "How was your sleep?" question


        This question appears once each day, when you open the app after the
        theoretical end of the night of sleep (between 4 a.m. and midday).


        *   **Possible values**: very bad, bad, okay, good, very good.
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/CreateDayFeedbackDto'
      responses:
        '201':
          description: 'Status: Success'
        '400':
          description: Something went wrong
      tags:
        - day-feedback
      security:
        - bearer: []
    get:
      operationId: DayFeedbackController_findAllV1
      summary: Fetch all user day feedbacks based on type, start, end date
      parameters:
        - name: type
          required: true
          in: query
          schema:
            type: string
        - name: start_date
          required: true
          in: query
          schema:
            type: string
        - name: end_date
          required: true
          in: query
          schema:
            type: string
        - name: shared-user
          in: header
          description: The ID of the user to fetch measurements for (optional)
          required: false
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DayFeedbackEntity'
      tags:
        - day-feedback
      security:
        - bearer: []
  /v1/day-feedback/{id}:
    get:
      operationId: DayFeedbackController_findOneV1
      summary: Fetch day-feedback
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: shared-user
          in: header
          description: The ID of the user to fetch measurements for (optional)
          required: false
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DayFeedbackEntity'
      tags:
        - day-feedback
      security:
        - bearer: []
    put:
      operationId: DayFeedbackController_updateV1
      summary: Update day-feedback
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateDayFeedbackDto'
      responses:
        '200':
          description: 'Status: Success'
      tags:
        - day-feedback
      security:
        - bearer: []
    delete:
      operationId: DayFeedbackController_removeV1
      summary: Delete day-feedback
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        '202':
          description: 'Status: Success'
      tags:
        - day-feedback
      security:
        - bearer: []
  /v1/sleep/log/{id}:
    get:
      operationId: SleepController_findSleepLogV1
      summary: Fetches a single sleep log for a user
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SleepLogEntity'
        '400':
          description: Something went wrong
      tags:
        - sleep
      security:
        - bearer: []
    put:
      operationId: SleepController_updateSleepLogV1
      summary: Update a sleep log for a user
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SleepLogDto'
      responses:
        '202':
          description: 'Status: Success'
        '400':
          description: Something went wrong
      tags:
        - sleep
      security:
        - bearer: []
    delete:
      operationId: SleepController_deleteSleepLogV1
      summary: Delete a sleep log for a user
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        '202':
          description: 'Status: Success'
        '400':
          description: Something went wrong
      tags:
        - sleep
      security:
        - bearer: []
  /v1/sleep/log:
    get:
      operationId: SleepController_findAllSleepLogsV1
      summary: Fetches all sleep logs for a user
      parameters:
        - name: start_date
          required: true
          in: query
          schema:
            type: string
        - name: end_date
          required: true
          in: query
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SleepLogEntity'
        '400':
          description: Something went wrong
      tags:
        - sleep
      security:
        - bearer: []
    post:
      operationId: SleepController_createSleepLogV1
      summary: Create a sleep log for a user
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InsertSleepLogDto'
      responses:
        '201':
          description: Sleep log created, returns array of created Ids
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
        '400':
          description: Something went wrong
      tags:
        - sleep
      security:
        - bearer: []
  /v2/sleep/processed:
    get:
      operationId: SleepController_findProcessedSleepV2
      summary: Fetches all processed sleep records for a user
      parameters:
        - name: start_date
          required: true
          in: query
          schema:
            type: string
        - name: end_date
          required: true
          in: query
          schema:
            type: string
        - name: shared-user
          in: header
          description: The ID of the user to fetch measurements for (optional)
          required: false
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SleepEntity'
        '400':
          description: Something went wrong
      tags:
        - sleep
      security:
        - bearer: []
  /v2/sleep/{id}:
    get:
      operationId: SleepController_findSleepV2
      summary: Fetches a single sleep record for a user
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: shared-user
          in: header
          description: The ID of the user to fetch measurements for (optional)
          required: false
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SleepEntity'
        '400':
          description: Something went wrong
      tags:
        - sleep
      security:
        - bearer: []
    put:
      operationId: SleepController_updateSleepV2
      summary: Update or create a sleep record for a user
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SleepDto'
      responses:
        '202':
          description: Returns the id of the updated or created sleep record
          content:
            application/json:
              schema:
                type: string
        '500':
          description: Error occurred during request
      tags:
        - sleep
      security:
        - bearer: []
    delete:
      operationId: SleepController_deleteSleepV2
      summary: Delete sleep record for user
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        '202':
          description: 'Status: Success'
        '400':
          description: Something went wrong
      tags:
        - sleep
      security:
        - bearer: []
  /v2/sleep:
    get:
      operationId: SleepController_findAllSleepV2
      summary: Fetches all sleep records for a user
      parameters:
        - name: start_date
          required: true
          in: query
          schema:
            type: string
        - name: end_date
          required: true
          in: query
          schema:
            type: string
        - name: shared-user
          in: header
          description: The ID of the user to fetch measurements for (optional)
          required: false
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SleepEntity'
        '400':
          description: Something went wrong
      tags:
        - sleep
      security:
        - bearer: []
    post:
      operationId: SleepController_createSleepV2
      summary: Create sleep record for a user
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SleepBatchDto'
      responses:
        '201':
          description: Sleep record created
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
        '400':
          description: Something went wrong
      tags:
        - sleep
      security:
        - bearer: []
  /v2/sleep/batch:
    put:
      operationId: SleepController_batchSleepUpdateV2
      summary: Update or create multiple sleep records for a user
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SleepBatchDto'
      responses:
        '202':
          description: Returns the ids of the updated or created sleep records
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
        '500':
          description: Returns the ids of the failed sleep records
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SleepErrorResponseDto'
      tags:
        - sleep
      security:
        - bearer: []
  /v1/sharing/invite:
    post:
      operationId: SharingController_createInvite
      summary: Share your dashboard data with a user
      description: >-
        Creates an invitation to share your dashboard with another user. The
        recipient will receive an email notification and can accept or reject
        the invitation. You can specify from which date the data should be
        shared. For extra context visit: [Sharing
        Context](/guides/sharing-context)
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShareSinceDto'
      responses:
        '200':
          description: Invite sent successfully
        '400':
          description: >-
            Invite already exists (and is not rejected), cannot invite yourself,
            or already sharing dashboard
      tags:
        - sharing
      security:
        - bearer: []
    delete:
      operationId: SharingController_deleteInvite
      summary: Delete a sent sharing invite
      description: >-
        Cancels a pending invitation that was sent to another user. This can
        only be done before the invitation has been accepted. For extra context
        visit: [Sharing Context](/guides/sharing-context)
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SharingActionDto'
      responses:
        '200':
          description: Invite deleted successfully
        '400':
          description: Bad request
        '404':
          description: Invite not found
      tags:
        - sharing
      security:
        - bearer: []
  /v1/sharing/invite/resend:
    put:
      operationId: SharingController_resendInvite
      summary: Resend a sharing invite
      description: >-
        Resends an invitation email to a user who hasn't yet responded to a
        previous invitation. This is useful when the original email was missed
        or expired. For extra context visit: [Sharing
        Context](/guides/sharing-context)
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SharingActionDto'
      responses:
        '200':
          description: Invite resent successfully
        '404':
          description: Invite not found
      tags:
        - sharing
      security:
        - bearer: []
  /v1/sharing/invite/accept:
    post:
      operationId: SharingController_acceptInvite
      summary: Accept a sharing invite
      description: >-
        Accepts an invitation to view another user's dashboard. Once accepted,
        the dashboard will appear in your shared dashboards list and you can
        access their data from the specified date onwards. For extra context
        visit: [Sharing Context](/guides/sharing-context)
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SharingActionDto'
      responses:
        '200':
          description: Invite accepted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SharingEntity'
        '400':
          description: >-
            Bad request - Invite has already been accepted or cannot accept a
            rejected invite
        '404':
          description: Invite not found
      tags:
        - sharing
      security:
        - bearer: []
  /v1/sharing/invite/reject:
    post:
      operationId: SharingController_rejectInvite
      summary: Reject a sharing invite
      description: >-
        Declines an invitation to view another user's dashboard. The sender will
        not be notified of the rejection. For extra context visit: [Sharing
        Context](/guides/sharing-context)
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SharingActionDto'
      responses:
        '200':
          description: Invite rejected successfully
        '400':
          description: >-
            Bad request - Invite has already been rejected or cannot reject an
            accepted invite
        '404':
          description: Invite not found
      tags:
        - sharing
      security:
        - bearer: []
  /v1/sharing:
    get:
      operationId: SharingController_getShared
      summary: Get all dashboards user is sharing
      description: >-
        Retrieves a list of all users with whom the authenticated user is
        currently sharing their dashboard. For extra context visit: [Sharing
        Context](/guides/sharing-context)
      parameters: []
      responses:
        '200':
          description: Returns information about dashboards user is sharing
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SharingEntity'
      tags:
        - sharing
      security:
        - bearer: []
    delete:
      operationId: SharingController_stopSharing
      summary: Stop sharing a dashboard
      description: >-
        Revokes another user's access to your dashboard. The recipient will no
        longer be able to view your dashboard data. For extra context visit:
        [Sharing Context](/guides/sharing-context)
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SharingActionDto'
      responses:
        '200':
          description: Dashboard sharing stopped successfully
        '400':
          description: Bad request
        '500':
          description: User not found or dashboard not found
      tags:
        - sharing
      security:
        - bearer: []
  /v1/sharing/shared-since:
    post:
      operationId: SharingController_updateSharedSince
      summary: Update shared since for a dashboard user is sharing
      description: >-
        Modifies the start date from which data is shared with a specific user.
        This allows you to extend or restrict the date range of shared data. For
        extra context visit: [Sharing Context](/guides/sharing-context)
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSharingDto'
      responses:
        '200':
          description: Shared since updated successfully
        '400':
          description: Bad request
        '500':
          description: User not found or dashboard not found
      tags:
        - sharing
      security:
        - bearer: []
  /v1/sharing/invites/sent:
    get:
      operationId: SharingController_getSentInvites
      summary: Get all invites sent by the user
      description: >-
        Retrieves a list of all sharing invitations that the authenticated user
        has sent to others, including their current status (pending, accepted,
        or rejected). For extra context visit: [Sharing
        Context](/guides/sharing-context)
      parameters: []
      responses:
        '200':
          description: Returns all invites sent by the user
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/InviteEntity'
      tags:
        - sharing
      security:
        - bearer: []
  /v1/sharing/invites/received:
    get:
      operationId: SharingController_getReceivedInvites
      summary: Get all invites received by the user
      description: >-
        Retrieves a list of all sharing invitations that the authenticated user
        has received from others, including their current status. For extra
        context visit: [Sharing Context](/guides/sharing-context)
      parameters: []
      responses:
        '200':
          description: Returns all invites received by the user
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/InviteEntity'
      tags:
        - sharing
      security:
        - bearer: []
  /v1/sharing/requests/sent:
    get:
      operationId: SharingController_getSentRequests
      summary: Get all sharing requests sent by the user
      description: >-
        Retrieves all requests that the authenticated user has sent to others
        asking for access to their dashboards. For extra context visit: [Sharing
        Context](/guides/sharing-context)
      parameters: []
      responses:
        '200':
          description: Returns all sharing requests sent by the user
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SharingRequestEntity'
      tags:
        - sharing
      security:
        - bearer: []
  /v1/sharing/requests/received:
    get:
      operationId: SharingController_getReceivedRequests
      summary: Get all sharing requests received by the user
      description: >-
        Retrieves all requests from other users asking to view the authenticated
        user's dashboard. For extra context visit: [Sharing
        Context](/guides/sharing-context)
      parameters: []
      responses:
        '200':
          description: Returns all sharing requests received by the user
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SharingRequestEntity'
      tags:
        - sharing
      security:
        - bearer: []
  /v1/sharing/request:
    post:
      operationId: SharingController_createRequest
      summary: Request access to a user's dashboard
      description: >-
        Sends a request to another user asking for access to view their
        dashboard. The recipient can choose to accept or reject the request. For
        extra context visit: [Sharing Context](/guides/sharing-context)
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShareSinceDto'
      responses:
        '200':
          description: Request sent successfully
        '400':
          description: >-
            Cannot request access to your own dashboard, already sharing
            dashboard, or request already exists
      tags:
        - sharing
      security:
        - bearer: []
    delete:
      operationId: SharingController_deleteRequest
      summary: Delete a sent sharing request
      description: >-
        Cancels a pending request that was sent to another user asking for
        dashboard access. For extra context visit: [Sharing
        Context](/guides/sharing-context)
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SharingActionDto'
      responses:
        '200':
          description: Request deleted successfully
        '404':
          description: Request not found
      tags:
        - sharing
      security:
        - bearer: []
  /v1/sharing/request/accept:
    post:
      operationId: SharingController_acceptRequest
      summary: Accept a sharing request
      description: >-
        Accepts a request from another user to view your dashboard. Once
        accepted, the requester will gain access to your dashboard data from the
        specified date. For extra context visit: [Sharing
        Context](/guides/sharing-context)
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SharingActionDto'
      responses:
        '200':
          description: Request accepted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SharingEntity'
        '400':
          description: >-
            Request has already been accepted or cannot accept a rejected
            request
        '404':
          description: Request not found
      tags:
        - sharing
      security:
        - bearer: []
  /v1/sharing/request/reject:
    post:
      operationId: SharingController_rejectRequest
      summary: Reject a sharing request
      description: >-
        Declines a request from another user to view your dashboard. The
        requester will not be notified of the rejection. For extra context
        visit: [Sharing Context](/guides/sharing-context)
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SharingActionDto'
      responses:
        '200':
          description: Request rejected successfully
        '400':
          description: >-
            Request has already been rejected or cannot reject an accepted
            request
        '404':
          description: Request not found
      tags:
        - sharing
      security:
        - bearer: []
  /v1/sharing/request/resend:
    put:
      operationId: SharingController_resendRequest
      summary: Resend a sharing request
      description: >-
        Resends a request email to a user who hasn't yet responded to a previous
        dashboard access request. For extra context visit: [Sharing
        Context](/guides/sharing-context)
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SharingActionDto'
      responses:
        '200':
          description: Request resent successfully
        '404':
          description: Request not found
      tags:
        - sharing
      security:
        - bearer: []
  /v1/shared:
    get:
      operationId: SharedController_getSharedWithMe
      summary: Get all dashboards shared with the user
      description: >-
        Retrieves all dashboards that other users have shared with the
        authenticated user. For extra context visit: [Sharing
        Context](/guides/sharing-context)
      parameters: []
      responses:
        '200':
          description: Returns information about dashboards shared with the user
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SharedEntity'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - property city should not exist
                  - email must be an email
                statusCode: 400
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v1/user
                message:
                  - jwt malformed
                statusCode: 401
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - Internal server error
                statusCode: 500
      tags:
        - shared
      security:
        - bearer: []
    delete:
      operationId: SharedController_deleteShared
      summary: Delete a shared dashboard
      description: >-
        Removes a shared dashboard from the authenticated user's list. This
        effectively stops viewing access to the shared dashboard without
        notifying the owner. For extra context visit: [Sharing
        Context](/guides/sharing-context)
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteSharedDto'
      responses:
        '200':
          description: Successful request
          content:
            application/json:
              schema:
                properties:
                  status:
                    type: string
                    enum:
                      - success
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - property city should not exist
                  - email must be an email
                statusCode: 400
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v1/user
                message:
                  - jwt malformed
                statusCode: 401
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - Internal server error
                statusCode: 500
      tags:
        - shared
      security:
        - bearer: []
  /v1/shared/groups:
    get:
      operationId: SharedController_getGroupsOwnedByUser
      summary: Get all groups owned by the user
      description: >-
        Retrieves all groups created by the authenticated user, including the
        members of each group. Groups allow users to organize their shared
        dashboards. For extra context visit: [Sharing
        Context](/guides/sharing-context)
      parameters: []
      responses:
        '200':
          description: Returns all groups owned by the user with populated user information
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/GroupPopulatedEntity'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - property city should not exist
                  - email must be an email
                statusCode: 400
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v1/user
                message:
                  - jwt malformed
                statusCode: 401
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - Internal server error
                statusCode: 500
      tags:
        - shared
      security:
        - bearer: []
    post:
      operationId: SharedController_createGroup
      summary: Create a new group
      description: >-
        Creates a new group for organizing shared dashboards. Groups allow users
        to categorize and manage multiple shared users more efficiently. For
        extra context visit: [Sharing Context](/guides/sharing-context)
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateGroupDto'
      responses:
        '201':
          description: The group has been successfully created
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - property city should not exist
                  - email must be an email
                statusCode: 400
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v1/user
                message:
                  - jwt malformed
                statusCode: 401
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - Internal server error
                statusCode: 500
      tags:
        - shared
      security:
        - bearer: []
  /v1/shared/groups/{groupId}:
    patch:
      operationId: SharedController_renameGroup
      summary: Rename a group
      description: >-
        Updates the name of an existing group. The user must own the group to
        rename it. For extra context visit: [Sharing
        Context](/guides/sharing-context)
      parameters:
        - name: groupId
          required: true
          in: path
          description: The ID of the group to rename
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateGroupDto'
      responses:
        '200':
          description: The group has been successfully renamed
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - property city should not exist
                  - email must be an email
                statusCode: 400
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v1/user
                message:
                  - jwt malformed
                statusCode: 401
        '404':
          description: Group not found
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - Internal server error
                statusCode: 500
      tags:
        - shared
      security:
        - bearer: []
    delete:
      operationId: SharedController_deleteGroup
      summary: Delete a group
      description: >-
        Deletes a group. The user must own the group to delete it. Deleting a
        group does not affect the shared dashboards themselves, only the
        grouping. For extra context visit: [Sharing
        Context](/guides/sharing-context)
      parameters:
        - name: groupId
          required: true
          in: path
          description: The ID of the group to delete
          schema:
            type: string
      responses:
        '200':
          description: Successful request
          content:
            application/json:
              schema:
                properties:
                  status:
                    type: string
                    enum:
                      - success
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - property city should not exist
                  - email must be an email
                statusCode: 400
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v1/user
                message:
                  - jwt malformed
                statusCode: 401
        '404':
          description: Group not found
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - Internal server error
                statusCode: 500
      tags:
        - shared
      security:
        - bearer: []
  /v1/shared/custom:
    post:
      operationId: SharedController_updateCustom
      summary: Update custom name and icon color for a shared dashboard
      description: >-
        Allows users to personalize how a shared dashboard appears to them by
        setting a custom name and icon color. This only affects the viewing
        user's experience and does not change the dashboard for others. For
        extra context visit: [Sharing Context](/guides/sharing-context)
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCustomDto'
      responses:
        '200':
          description: Custom settings updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SharedEntity'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - property city should not exist
                  - email must be an email
                statusCode: 400
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v1/user
                message:
                  - jwt malformed
                statusCode: 401
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - Internal server error
                statusCode: 500
      tags:
        - shared
      security:
        - bearer: []
  /v1/shared/custom/profile-picture:
    post:
      operationId: SharedController_uploadCustomProfilePicture
      summary: Upload custom profile picture for a shared dashboard
      description: >-
        Uploads a custom profile picture for a shared dashboard. The user must
        have access to the shared dashboard. Max file size is 5MB. Allowed
        formats: jpg, png, webp. For extra context visit: [Sharing
        Context](/guides/sharing-context)
      parameters: []
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                userId:
                  type: string
                  description: The ID of the user who shared the dashboard
                file:
                  type: string
                  format: binary
      responses:
        '200':
          description: Profile picture uploaded successfully
          content:
            application/json:
              schema:
                type: string
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - property city should not exist
                  - email must be an email
                statusCode: 400
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v1/user
                message:
                  - jwt malformed
                statusCode: 401
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - Internal server error
                statusCode: 500
      tags:
        - shared
      security:
        - bearer: []
    delete:
      operationId: SharedController_deleteCustomProfilePicture
      summary: Delete custom profile picture for a shared dashboard
      description: >-
        Deletes the custom profile picture for a shared dashboard. The user must
        have access to the shared dashboard. For extra context visit: [Sharing
        Context](/guides/sharing-context)
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                userId:
                  type: string
                  description: The ID of the user who shared the dashboard
      responses:
        '200':
          description: Successful request
          content:
            application/json:
              schema:
                properties:
                  status:
                    type: string
                    enum:
                      - success
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - property city should not exist
                  - email must be an email
                statusCode: 400
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v1/user
                message:
                  - jwt malformed
                statusCode: 401
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - Internal server error
                statusCode: 500
      tags:
        - shared
      security:
        - bearer: []
  /v1/shared/groups/{groupId}/members:
    post:
      operationId: SharedController_addUserToGroup
      summary: Add a user to a group
      description: >-
        Adds a shared user to an existing group. The user to be added must
        already be sharing their dashboard with the authenticated user. For
        extra context visit: [Sharing Context](/guides/sharing-context)
      parameters:
        - name: groupId
          required: true
          in: path
          description: The ID of the group
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddUserToGroupDto'
      responses:
        '201':
          description: Successful request
          content:
            application/json:
              schema:
                properties:
                  status:
                    type: string
                    enum:
                      - success
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - property city should not exist
                  - email must be an email
                statusCode: 400
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v1/user
                message:
                  - jwt malformed
                statusCode: 401
        '404':
          description: Group not found
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - Internal server error
                statusCode: 500
      tags:
        - shared
      security:
        - bearer: []
    delete:
      operationId: SharedController_removeUserFromGroup
      summary: Remove a user from a group
      description: >-
        Removes a shared user from a group. This does not stop the dashboard
        sharing relationship, it only removes them from the group. For extra
        context visit: [Sharing Context](/guides/sharing-context)
      parameters:
        - name: groupId
          required: true
          in: path
          description: The ID of the group
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RemoveUserFromGroupDto'
      responses:
        '200':
          description: Successful request
          content:
            application/json:
              schema:
                properties:
                  status:
                    type: string
                    enum:
                      - success
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - property city should not exist
                  - email must be an email
                statusCode: 400
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v1/user
                message:
                  - jwt malformed
                statusCode: 401
        '404':
          description: Group not found
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                properties:
                  timestamp:
                    type: string
                    format: date-time
                  path:
                    type: string
                  message:
                    type: array
                    items:
                      type: string
                  statusCode:
                    type: number
              example:
                timestamp: '2025-08-27T15:28:20.215Z'
                path: /nowatch/v2/auth/login
                message:
                  - Internal server error
                statusCode: 500
      tags:
        - shared
      security:
        - bearer: []
  /v1/telemetry/spans:
    post:
      operationId: TelemetryController_receiveSpans
      summary: Send spans
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SpanBatchDto'
      responses:
        '201':
          description: ''
      tags:
        - telemetry
      security:
        - bearer: []
  /v1/telemetry/metrics:
    post:
      operationId: TelemetryController_receiveMetrics
      summary: Send metrics
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MetricBatchDto'
      responses:
        '201':
          description: ''
      tags:
        - telemetry
      security:
        - bearer: []
  /v1/telemetry/logs:
    post:
      operationId: TelemetryController_receiveLogs
      summary: Send logs
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LogBatchDto'
      responses:
        '201':
          description: ''
      tags:
        - telemetry
      security:
        - bearer: []
info:
  title: NOWATCH API
  description: The NOWATCH API
  version: 0.9.0
  contact: {}
tags:
  - name: auth
    description: User authentication
  - name: user
    description: User data routes
  - name: firmware
    description: Firmware updates and downloads
  - name: admin-firmware
    description: Admin firmware management
  - name: measurement
    description: Time series health data (heart rate, temperature, activity, etc.)
  - name: insight
    description: User insights, feedback, and reflections
  - name: session
    description: Activity session tracking
  - name: checkin
    description: User check-ins and wellness tracking
  - name: alarm
    description: User alarm management
  - name: day-feedback
    description: Daily feedback and mood tracking
  - name: sleep
    description: Sleep logs and sleep data
  - name: activity
    description: Sessions wrapper for activities
  - name: intention
    description: Sessions wrapper for intentions
  - name: statistics
    description: Aggregated health statistics
  - name: sharing
    description: Manage sharing your data with other people
  - name: shared
    description: Manage other people's data shared with you
  - name: telemetry
    description: Application telemetry data (spans, metrics, logs)
servers:
  - url: /nowatch
components:
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http
  schemas:
    AuthRegisterRequestDto:
      type: object
      properties:
        email:
          type: string
          description: User email address used as the login identifier.
          example: spongebob@bikinibottom.com
        password:
          type: string
          minLength: 8
          maxLength: 99
          example: BigBob27!
          description: >-

            User password. Requirements:


            - At least one lowercase letter is required.

            - At least one uppercase letter is required.

            - At least one digit (0-9) is required.

            - At least one special character from the provided set
            `(^$*.[]{}()?-“!@#%&/,><’:;|_~+)` is required.
        first_name:
          type: string
          minLength: 1
          maxLength: 150
          example: Sponge Bob
        last_name:
          type: string
          minLength: 1
          maxLength: 150
          example: Squarepants
        toc_accepted_at:
          type: string
          description: Timestamp when the Terms of Service were accepted
          format: date-time
          example: '2024-07-01T12:34:56Z'
        privacy_policy_accepted_at:
          type: string
          description: Timestamp when the Privacy Policy was accepted
          format: date-time
          example: '2024-07-01T12:34:56Z'
      required:
        - email
        - password
        - first_name
        - last_name
        - toc_accepted_at
        - privacy_policy_accepted_at
    AuthLoginRequestDto:
      type: object
      properties:
        email:
          type: string
          example: garryTheSnail@bikinibottom.com
        password:
          type: string
          example: BigBob27!
      required:
        - email
        - password
    AuthLoginResponseDto:
      type: object
      properties:
        access:
          type: string
          description: JWT access token used to authorize API requests
          example: >-
            eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0IiwibmJmIjoxNjAwMDAwMDAwLCJleHAiOjE2MDAwMzYwMDB9.signature
          format: jwt
        refresh:
          type: string
          description: JWT refresh token used to obtain a new access token
          example: >-
            eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0eXAiOiJyZWZyZXNoIiwic3ViIjoiMTIzNCIsImV4cCI6MTYwMDA5MjAwMH0.signature
          format: jwt
        expiresIn:
          type: number
          description: Seconds until the access token expires
          example: 3600
          minimum: 0
      required:
        - access
        - refresh
        - expiresIn
    AuthChallengeResponseDto:
      type: object
      properties:
        challenge:
          type: string
        session:
          type: string
      required:
        - challenge
        - session
    AuthRefreshRequestDto:
      type: object
      properties:
        refresh:
          type: string
          minimum: 1
          example: >-
            eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0eXAiOiJyZWZyZXNoIiwic3ViIjoiMTIzNCIsImV4cCI6MTYwMDA5MjAwMH0.signature
      required:
        - refresh
    AuthForgotPasswordRequestDto:
      type: object
      properties:
        email:
          type: string
          example: spongebob@bikinibottom.com
      required:
        - email
    AuthConfirmNewPasswordRequestDto:
      type: object
      properties:
        email:
          type: string
          example: spongebob@bikinibottom.com
        verification_code:
          type: string
          example: '123456'
        new_password:
          type: string
          minLength: 8
          maxLength: 99
          example: BigBob27!
          description: >-

            New user password. Requirements:


            - At least one lowercase letter is required.

            - At least one uppercase letter is required.

            - At least one digit (0-9) is required.

            - At least one special character from the provided set
            `(^$*.[]{}()?-“!@#%&/,><’:;|_~+)` is required.
      required:
        - email
        - verification_code
        - new_password
    AuthSignOutRequestDto:
      type: object
      properties:
        email:
          type: string
          example: spongebob@bikinibottom.com
      required:
        - email
    UserEntity:
      type: object
      properties:
        id:
          type: string
          example: >-
            uid_69954cbc5ef58c2b4a140903bceed6c0NYBoQ803kphGz89qu9KsaXtlJVdF56KNYVf1fh5d8UKls1Hn4v1/M/MzM058S8Ec
        email:
          type: string
          example: spongebob@bikinibottom.com
        firstName:
          type: string
          example: Sponge Bob
        lastName:
          type: string
          example: Squarepants
        isEarlyAccess:
          type: boolean
          example: true
        gender:
          type: string
          enum:
            - FEMALE
            - MALE
            - OTHER
          example: MALE
        watchHand:
          type: string
          enum:
            - LEFT
            - RIGHT
            - MIXED
          example: RIGHT
        dominantHand:
          type: string
          enum:
            - LEFT
            - RIGHT
            - MIXED
          example: RIGHT
        height:
          type: number
          example: 180
          description: Height in cm (integer)
        weight:
          type: number
          example: 80
          description: Weight in kg (integer)
        dateOfBirth:
          format: date-time
          type: string
          example: '1986-07-14T00:00:00.000Z'
        unit:
          type: string
          enum:
            - METRIC
            - IMPERIAL
          example: METRIC
        employee:
          type: boolean
          example: true
        lastSyncAt:
          format: date-time
          type: string
          example: '2024-01-01T12:00:00.000Z'
          description: Last time data was synchronized from mobile app
      required:
        - id
        - email
        - firstName
        - lastName
        - isEarlyAccess
        - gender
        - watchHand
        - dominantHand
        - height
        - weight
        - dateOfBirth
        - unit
        - employee
        - lastSyncAt
    UserUpdateDto:
      type: object
      properties:
        first_name:
          type: string
          minLength: 1
          maxLength: 150
          example: Sponge Bob
        last_name:
          type: string
          minLength: 1
          maxLength: 150
          example: Squarepants
        date_of_birth:
          type: string
          example: '1986-07-14T00:00:00.000Z'
        height:
          type: number
          example: 180
          description: Height in cm (integer)
        weight:
          type: number
          example: 80
          description: Weight in kg (integer)
        gender:
          type: string
          enum:
            - FEMALE
            - MALE
            - OTHER
          example: MALE
        watch_hand:
          type: string
          enum:
            - LEFT
            - RIGHT
            - MIXED
          example: RIGHT
        dominant_hand:
          type: string
          enum:
            - LEFT
            - RIGHT
            - MIXED
          example: RIGHT
        is_early_access:
          type: boolean
          example: true
        platform:
          type: string
          enum:
            - IOS
            - ANDROID
          example: IOS
        unit:
          type: string
          enum:
            - METRIC
            - IMPERIAL
          example: METRIC
        employee:
          type: boolean
          example: true
        is_admin:
          type: boolean
          example: true
    UserChangePasswordDto:
      type: object
      properties:
        new_password:
          type: string
          minLength: 8
          maxLength: 99
          description: |2-

                              At least one lowercase letter is required.

                              At least one uppercase letter is required.

                              At least one digit (0-9) is required.

                              At least one special character from the provided set (?=.*[`!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]) is required
                              
      required:
        - new_password
    SettingsResponseDto:
      type: object
      properties:
        settings:
          type: object
          description: User settings object
          example:
            theme: light
            language: en
        createdAt:
          format: date-time
          type: string
          description: Creation timestamp
          example: '2024-03-20T12:00:00Z'
        updatedAt:
          format: date-time
          type: string
          description: Last update timestamp
          example: '2024-03-20T12:00:00Z'
      required:
        - settings
        - createdAt
        - updatedAt
    SettingsDto:
      type: object
      properties:
        settings:
          type: object
          description: User settings object
      required:
        - settings
    DataExportEntity:
      type: object
      properties:
        id:
          type: string
          example: uuid-1234
        userId:
          type: string
          example: uuid-user-1234
        status:
          type: string
          enum:
            - IN_PROGRESS
            - COMPLETED
            - FAILED
          example: IN_PROGRESS
        types:
          example:
            - TIMELINE_TIME-SERIES_HEART-RATE
          type: array
          items:
            type: array
        exportedUserIds:
          example:
            - uid_1234
          type: array
          items:
            type: array
        createdAt:
          format: date-time
          type: string
          example: '2024-01-01T00:00:00.000Z'
        updatedAt:
          format: date-time
          type: string
          example: '2024-01-01T00:00:00.000Z'
      required:
        - id
        - userId
        - status
        - types
        - exportedUserIds
        - createdAt
        - updatedAt
    FullUserEntity:
      type: object
      properties:
        id:
          type: string
          example: >-
            uid_69954cbc5ef58c2b4a140903bceed6c0NYBoQ803kphGz89qu9KsaXtlJVdF56KNYVf1fh5d8UKls1Hn4v1/M/MzM058S8Ec
        email:
          type: string
          example: spongebob@bikinibottom.com
        firstName:
          type: string
          example: Sponge Bob
        lastName:
          type: string
          example: Squarepants
        isEarlyAccess:
          type: boolean
          example: true
        gender:
          type: string
          enum:
            - FEMALE
            - MALE
            - OTHER
          example: MALE
        watchHand:
          type: string
          enum:
            - LEFT
            - RIGHT
            - MIXED
          example: RIGHT
        dominantHand:
          type: string
          enum:
            - LEFT
            - RIGHT
            - MIXED
          example: RIGHT
        height:
          type: number
          example: 10
        weight:
          type: number
          example: 0.028
          description: Weight in kg
        dateOfBirth:
          format: date-time
          type: string
          example: '1986-07-14T00:00:00.000Z'
        isAdmin:
          type: boolean
          example: true
          description: Whether the user is an admin
        unit:
          type: string
          enum:
            - METRIC
            - IMPERIAL
          example: METRIC
        employee:
          type: boolean
          example: true
        lastSyncAt:
          format: date-time
          type: string
          example: '2024-01-01T12:00:00.000Z'
          description: Last time data was synchronized from mobile app
      required:
        - id
        - email
        - firstName
        - lastName
        - isEarlyAccess
        - gender
        - watchHand
        - dominantHand
        - height
        - weight
        - dateOfBirth
        - isAdmin
        - unit
        - employee
        - lastSyncAt
    UserBetaRequestEntity:
      type: object
      properties:
        id:
          type: string
          example: >-
            uid_69954cbc5ef58c2b4a140903bceed6c0NYBoQ803kphGz89qu9KsaXtlJVdF56KNYVf1fh5d8UKls1Hn4v1/M/MzM058S8Ec
        email:
          type: string
          example: spongebob@bikinibottom.com
        firstName:
          type: string
          example: Sponge Bob
        lastName:
          type: string
          example: Squarepants
        isEarlyAccess:
          type: boolean
          example: true
        gender:
          type: string
          enum:
            - FEMALE
            - MALE
            - OTHER
          example: MALE
        watchHand:
          type: string
          enum:
            - LEFT
            - RIGHT
            - MIXED
          example: RIGHT
        dominantHand:
          type: string
          enum:
            - LEFT
            - RIGHT
            - MIXED
          example: RIGHT
        height:
          type: number
          example: 180
          description: Height in cm (integer)
        weight:
          type: number
          example: 80
          description: Weight in kg (integer)
        dateOfBirth:
          format: date-time
          type: string
          example: '1986-07-14T00:00:00.000Z'
        unit:
          type: string
          enum:
            - METRIC
            - IMPERIAL
          example: METRIC
        employee:
          type: boolean
          example: true
        lastSyncAt:
          format: date-time
          type: string
          example: '2024-01-01T12:00:00.000Z'
          description: Last time data was synchronized from mobile app
        datetimeRequested:
          format: date-time
          type: string
          description: Datetime when the beta request was made
        betaLastUpdated:
          format: date-time
          type: string
          description: Datetime when the beta request was last updated
        status:
          type: string
          description: Status of the beta request
      required:
        - id
        - email
        - firstName
        - lastName
        - isEarlyAccess
        - gender
        - watchHand
        - dominantHand
        - height
        - weight
        - dateOfBirth
        - unit
        - employee
        - lastSyncAt
        - datetimeRequested
        - betaLastUpdated
        - status
    BetaRequestStatus:
      type: string
      enum:
        - PENDING
        - APPROVED
        - REJECTED
    UserBetaAdminDto:
      type: object
      properties:
        userId:
          type: string
        status:
          $ref: '#/components/schemas/BetaRequestStatus'
      required:
        - userId
    MeasurementsSince:
      type: object
      properties:
        type:
          type: string
          enum:
            - HEART_BEAT
            - HEART_RATE
            - HEART_RATE_GRAPH
            - RESPIRATION_RATE
            - RESTING_HEART_RATE
            - TEMPERATURE
            - ACTIVITY_COUNT
            - ACTIVITY_TYPE
            - ACTIVITY_CADENCE
            - MOTION_GRAPH
            - REACTIVITY_GRAPH
            - SLEEP_SESSION
            - BOSCH_STEP_COUNT
            - BOSCH_ACTIVITY_TYPE
            - SYSTEM_EVENTS
            - SKIN_CONDUCTANCE
            - RAW_ACCEL
            - RAW_ADC
            - RAW_PPG_GREEN
            - RAW_PPG_AMBIENT
            - RAW_PPG_SINGLE_GREEN
            - RAW_PPG_SINGLE_AMBIENT
            - RAW_SKIN_CONDUCTANCE
            - NOWATCH_ACTIVITY_TYPE
            - REACTIVITY_PEAKS
            - STEPS_GRAPH
            - INTERBEAT_INTERVAL
        earliest:
          format: date-time
          type: string
        latest:
          format: date-time
          type: string
      required:
        - type
        - earliest
        - latest
    UserMeasurementsTypeSinceDto:
      type: object
      properties:
        user:
          type: string
        measurementsTypesSince:
          type: array
          items:
            $ref: '#/components/schemas/MeasurementsSince'
      required:
        - user
        - measurementsTypesSince
    FirmwareEntity:
      type: object
      properties:
        version:
          type: string
          example: 2025.11.03.1
      required:
        - version
    FirmwareAdminResponseDto:
      type: object
      properties:
        id:
          type: number
        version:
          type: string
        file:
          type: string
        latest:
          type: boolean
        earlyAccess:
          type: boolean
        platform:
          type: string
          enum:
            - IOS
            - ANDROID
        device:
          type: string
          enum:
            - X
            - B
        appVersion:
          type: string
        created:
          format: date-time
          type: string
      required:
        - id
        - version
        - file
        - latest
        - earlyAccess
        - platform
        - device
        - appVersion
        - created
    SetActiveFirmwareRequestDto:
      type: object
      properties:
        version:
          type: string
        platform:
          type: string
          enum:
            - IOS
            - ANDROID
        device:
          type: string
          enum:
            - X
            - B
        earlyAccess:
          type: boolean
      required:
        - version
        - platform
        - device
        - earlyAccess
    MeasurementEntity:
      type: object
      properties:
        values:
          type: string
          example: >-
            { "SECONDS_AFTER_MIDNIGHT": [VALUE, QUALITY (0-4)],
            "SECONDS_AFTER_MIDNIGHT": [VALUE, QUALITY (0-4)], ... }
        count:
          type: number
          example: 10
        type:
          type: string
          enum:
            - HEART_BEAT
            - HEART_RATE
            - HEART_RATE_GRAPH
            - RESPIRATION_RATE
            - RESTING_HEART_RATE
            - TEMPERATURE
            - ACTIVITY_COUNT
            - ACTIVITY_TYPE
            - ACTIVITY_CADENCE
            - MOTION_GRAPH
            - REACTIVITY_GRAPH
            - SLEEP_SESSION
            - BOSCH_STEP_COUNT
            - BOSCH_ACTIVITY_TYPE
            - SYSTEM_EVENTS
            - SKIN_CONDUCTANCE
            - RAW_ACCEL
            - RAW_ADC
            - RAW_PPG_GREEN
            - RAW_PPG_AMBIENT
            - RAW_PPG_SINGLE_GREEN
            - RAW_PPG_SINGLE_AMBIENT
            - RAW_SKIN_CONDUCTANCE
            - NOWATCH_ACTIVITY_TYPE
            - REACTIVITY_PEAKS
            - STEPS_GRAPH
            - INTERBEAT_INTERVAL
        day:
          format: date-time
          type: string
          example: '2025-08-09T00:00:00.000Z'
        created:
          format: date-time
          type: string
        updatedAt:
          format: date-time
          type: string
      required:
        - values
        - count
        - type
        - day
        - created
        - updatedAt
    MeasurementUploadDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - HEART_BEAT
            - HEART_RATE
            - HEART_RATE_GRAPH
            - RESPIRATION_RATE
            - RESTING_HEART_RATE
            - TEMPERATURE
            - ACTIVITY_COUNT
            - ACTIVITY_TYPE
            - ACTIVITY_CADENCE
            - MOTION_GRAPH
            - REACTIVITY_GRAPH
            - SLEEP_SESSION
            - BOSCH_STEP_COUNT
            - BOSCH_ACTIVITY_TYPE
            - SYSTEM_EVENTS
            - SKIN_CONDUCTANCE
            - RAW_ACCEL
            - RAW_ADC
            - RAW_PPG_GREEN
            - RAW_PPG_AMBIENT
            - RAW_PPG_SINGLE_GREEN
            - RAW_PPG_SINGLE_AMBIENT
            - RAW_SKIN_CONDUCTANCE
            - NOWATCH_ACTIVITY_TYPE
            - REACTIVITY_PEAKS
            - STEPS_GRAPH
            - INTERBEAT_INTERVAL
      required:
        - type
    Feedback:
      type: object
      properties:
        options:
          type: array
          items:
            type: string
        section:
          type: string
        thumbsUp:
          type: boolean
      required:
        - options
        - section
        - thumbsUp
    InsightFeedbackDto:
      type: object
      properties:
        date:
          type: string
        feedbacks:
          type: array
          items:
            $ref: '#/components/schemas/Feedback'
        response:
          type: object
        app_version:
          type: string
      required:
        - date
        - feedbacks
        - response
        - app_version
    InsightFeedbackOptionsV2Dto:
      type: object
      properties:
        section:
          type: string
        options:
          type: array
          items:
            type: string
        thumbUp:
          type: boolean
      required:
        - section
        - options
        - thumbUp
    InsightFeedbackV2Dto:
      type: object
      properties:
        app_version:
          type: string
        date:
          type: string
        feedback:
          type: array
          items:
            $ref: '#/components/schemas/InsightFeedbackOptionsV2Dto'
        instance_id:
          type: string
        test_build:
          type: boolean
      required:
        - app_version
        - date
        - feedback
        - instance_id
        - test_build
    StyleModifiersDto:
      type: object
      properties:
        xax:
          type: number
        yax:
          type: number
      required:
        - xax
        - yax
    PreviousVdbIdsDto:
      type: object
      properties:
        previously_used:
          type: array
          items:
            type: string
        liked:
          type: array
          items:
            type: string
        disliked:
          type: array
          items:
            type: string
      required:
        - previously_used
        - liked
        - disliked
    QualitativeSummaryDayDto:
      type: object
      properties:
        day:
          type: string
        events:
          type: array
          items:
            type: string
        trends:
          type: array
          items:
            type: string
        history:
          type: string
        day_level_events:
          type: array
          items:
            type: string
      required:
        - day
        - events
        - trends
        - history
        - day_level_events
    QuantitativeSummaryDto:
      type: object
      properties:
        outliers:
          type: array
          items:
            type: string
        compared_to_typical:
          type: array
          items:
            type: string
        compared_to_previous:
          type: array
          items:
            type: string
      required:
        - outliers
        - compared_to_typical
        - compared_to_previous
    InsightReflectionDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - daily
            - weekly
        platform:
          type: string
        app_version:
          type: string
        date_of_report:
          type: string
        topic_of_interest:
          type: string
        verbosity:
          type: number
        style_modifiers:
          $ref: '#/components/schemas/StyleModifiersDto'
        previous_vdb_ids:
          $ref: '#/components/schemas/PreviousVdbIdsDto'
        personal_pins:
          type: array
          items:
            type: string
        history:
          type: string
        day_level_events:
          type: array
          items:
            type: string
        qualitative_summary:
          type: array
          items:
            $ref: '#/components/schemas/QualitativeSummaryDayDto'
        quantitative_summary:
          $ref: '#/components/schemas/QuantitativeSummaryDto'
      required:
        - type
        - platform
        - app_version
        - date_of_report
        - topic_of_interest
        - verbosity
        - style_modifiers
        - previous_vdb_ids
        - personal_pins
        - history
        - day_level_events
        - qualitative_summary
        - quantitative_summary
    InsightReflectionDtoV2:
      type: object
      properties:
        time_format:
          type: string
        today_triggers:
          type: array
          items:
            type: string
        today_metrics:
          type: object
        past_daily_metrics:
          type: object
        past_triggers:
          type: object
        previous_research_insight_ids:
          type: array
          items:
            type: string
      required:
        - time_format
        - today_triggers
        - today_metrics
        - past_daily_metrics
        - past_triggers
        - previous_research_insight_ids
    InsightReflectionEntity:
      type: object
      properties:
        instanceId:
          type: string
        executedAt:
          format: date-time
          type: string
        state:
          type: string
          enum:
            - STARTED
            - RUNNING
            - FAILED
            - COMPLETED
        date:
          format: date-time
          type: string
        input:
          type: object
        output:
          type: object
        step:
          type: string
      required:
        - instanceId
        - executedAt
        - state
        - date
        - step
    SubjectiveInput:
      type: object
      properties:
        datetime:
          type: string
        type:
          type: number
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
          description: >-
            The type of subjective input.

            - For SubjectiveInputType.DAY: Represents the "How was your day?"
            question.
              This question appears once each day, when the user opens the app after the theoretical end of the workday (between 5 p.m. and midnight).
            - For SubjectiveInputType.SLEEP: Represents the "How was your
            sleep?" question.
              This question appears once each day, when the user opens the app after the theoretical end of the night of sleep (between 4 a.m. and midday).
        value:
          type: number
          description: >-
            The value associated with the subjective input.

            For "How was your day?" and "How was your sleep?" questions,
            possible values are:

            - 1: Very bad

            - 2: Bad

            - 3: Okay

            - 4: Good

            - 5: Very good
        tag:
          type: number
          description: |-
            A tag associated with the subjective input.
            For day-feedback and feelings, this tag should be 0 and is not used.
        note:
          type: string
      required:
        - datetime
        - type
        - value
        - tag
    SessionInfoDto:
      type: object
      properties:
        name:
          type: string
        note:
          type: string
        subjective_inputs:
          type: array
          items:
            $ref: '#/components/schemas/SubjectiveInput'
        origin:
          type: number
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 5
        tool:
          type: string
    CreateSessionDto:
      type: object
      properties:
        start_datetime:
          type: string
        end_datetime:
          type: string
        type:
          type: number
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
            - 7
            - 8
            - 9
            - 10
            - 11
            - 12
            - 13
            - 14
            - 15
            - 16
            - 17
            - 18
            - 19
            - 20
            - 21
            - 22
            - 23
            - 24
            - 25
            - 26
            - 27
            - 28
            - 29
            - 30
            - 31
            - 32
            - 33
            - 34
            - 35
            - 36
            - 37
            - 38
            - 39
            - 40
            - 41
            - 42
            - 43
            - 44
            - 45
            - 46
            - 47
            - 48
            - 49
            - 50
            - 51
            - 52
            - 53
            - 54
            - 55
            - 56
            - 57
            - 58
            - 59
            - 60
            - 61
            - 62
            - 63
            - 64
            - 65
            - 66
            - 67
            - 68
            - 69
            - 70
            - 71
            - 72
            - 73
            - 74
            - 75
            - 76
            - 77
            - 78
            - 79
            - 80
            - 81
            - 82
            - 83
            - 84
            - 85
            - 86
            - 87
            - 88
            - 89
            - 90
            - 91
            - 92
            - 93
            - 94
            - 95
            - 96
            - 97
            - 98
            - 99
            - 100
            - 101
            - 102
            - 103
            - 104
            - 105
            - 106
            - 107
            - 108
            - 109
            - 110
            - 111
            - 112
            - 113
            - 114
            - 115
            - 116
            - 117
        info:
          $ref: '#/components/schemas/SessionInfoDto'
      required:
        - start_datetime
        - type
        - info
    SessionInfo:
      type: object
      properties:
        name:
          type: string
        note:
          type: string
        subjectiveInputs:
          type: array
          items:
            $ref: '#/components/schemas/SubjectiveInput'
        origin:
          type: number
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 5
        toolData:
          type: string
      required:
        - name
        - note
        - subjectiveInputs
        - origin
    SessionEntity:
      type: object
      properties:
        id:
          type: string
        startDatetime:
          format: date-time
          type: string
        endDatetime:
          format: date-time
          type: string
        created:
          format: date-time
          type: string
        lastUpdated:
          format: date-time
          type: string
        type:
          type: number
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
            - 7
            - 8
            - 9
            - 10
            - 11
            - 12
            - 13
            - 14
            - 15
            - 16
            - 17
            - 18
            - 19
            - 20
            - 21
            - 22
            - 23
            - 24
            - 25
            - 26
            - 27
            - 28
            - 29
            - 30
            - 31
            - 32
            - 33
            - 34
            - 35
            - 36
            - 37
            - 38
            - 39
            - 40
            - 41
            - 42
            - 43
            - 44
            - 45
            - 46
            - 47
            - 48
            - 49
            - 50
            - 51
            - 52
            - 53
            - 54
            - 55
            - 56
            - 57
            - 58
            - 59
            - 60
            - 61
            - 62
            - 63
            - 64
            - 65
            - 66
            - 67
            - 68
            - 69
            - 70
            - 71
            - 72
            - 73
            - 74
            - 75
            - 76
            - 77
            - 78
            - 79
            - 80
            - 81
            - 82
            - 83
            - 84
            - 85
            - 86
            - 87
            - 88
            - 89
            - 90
            - 91
            - 92
            - 93
            - 94
            - 95
            - 96
            - 97
            - 98
            - 99
            - 100
            - 101
            - 102
            - 103
            - 104
            - 105
            - 106
            - 107
            - 108
            - 109
            - 110
            - 111
            - 112
            - 113
            - 114
            - 115
            - 116
            - 117
        info:
          $ref: '#/components/schemas/SessionInfo'
      required:
        - id
        - startDatetime
        - endDatetime
        - created
        - lastUpdated
        - type
        - info
    UpdateSessionDto:
      type: object
      properties:
        start_datetime:
          type: string
        end_datetime:
          type: string
        type:
          type: number
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
            - 7
            - 8
            - 9
            - 10
            - 11
            - 12
            - 13
            - 14
            - 15
            - 16
            - 17
            - 18
            - 19
            - 20
            - 21
            - 22
            - 23
            - 24
            - 25
            - 26
            - 27
            - 28
            - 29
            - 30
            - 31
            - 32
            - 33
            - 34
            - 35
            - 36
            - 37
            - 38
            - 39
            - 40
            - 41
            - 42
            - 43
            - 44
            - 45
            - 46
            - 47
            - 48
            - 49
            - 50
            - 51
            - 52
            - 53
            - 54
            - 55
            - 56
            - 57
            - 58
            - 59
            - 60
            - 61
            - 62
            - 63
            - 64
            - 65
            - 66
            - 67
            - 68
            - 69
            - 70
            - 71
            - 72
            - 73
            - 74
            - 75
            - 76
            - 77
            - 78
            - 79
            - 80
            - 81
            - 82
            - 83
            - 84
            - 85
            - 86
            - 87
            - 88
            - 89
            - 90
            - 91
            - 92
            - 93
            - 94
            - 95
            - 96
            - 97
            - 98
            - 99
            - 100
            - 101
            - 102
            - 103
            - 104
            - 105
            - 106
            - 107
            - 108
            - 109
            - 110
            - 111
            - 112
            - 113
            - 114
            - 115
            - 116
            - 117
        info:
          $ref: '#/components/schemas/SessionInfoDto'
      required:
        - start_datetime
        - type
        - info
    CreateActivityDto:
      type: object
      properties:
        start_datetime:
          type: string
        end_datetime:
          type: string
        type:
          type: string
          enum:
            - UNDEFINED
            - BREATHWORK
            - ICE_BATH
            - CYCLING
            - DANCING
            - EVENT
            - HIKING
            - MEDITATION
            - LISTENING_TO_MUSIC
            - PAINT
            - PARTY
            - WRITING
            - PHOTOGRAPHY
            - RELAXING
            - RUN
            - SAUNA
            - SEX
            - SINGING
            - SOCIALISING
            - SWIMMING
            - WALKING
            - WORKOUT
            - YOGA
            - SITTING
            - ROLLER_SKATING
            - SNORKEL
            - AEROBICS
            - PILATES
            - TAI_CHI
            - BODYBUILDING
            - CROSSFIT
            - WEIGHTLIFTING
            - MARATHON
            - TRIATHLON
            - JUMP_ROPE
            - CIRCUIT_TRAINING
            - GYMNASTICS
            - STRETCH
            - BASKETBALL
            - CRICKET
            - VOLLEYBALL
            - FOOTBALL
            - BASEBALL
            - DODGEBALL
            - HANDBALL
            - TENNIS
            - RACQUETBALL
            - SQUASH
            - BADMINTON
            - TABLE_TENNIS
            - PADEL
            - DIVING
            - KAYAKING
            - ROWING
            - CANOEING
            - SAILING
            - SURFING
            - WINDSURFING
            - KITESURFING
            - WAKEBOARDING
            - WATER_SKIING
            - MARTIAL_ARTS
            - CROSS_COUNTRY
            - TRAMPOLINE
            - SKIING
            - SNOWBOARDING
            - ICE_SKATING
            - HOCKEY
            - SKATEBOARDING
            - ROCK_CLIMBING
            - PARAGLIDING
            - SKYDIVING
            - GOLF
            - ARCHERY
            - BOWLING
            - BILLIARDS
            - DARTS
            - HIIT
            - HORSEBACK_RIDING
            - POLO
            - MOUNTAIN_CLIMBING
            - SCUBA_DIVING
            - DRIVE
            - DD
            - MOTORBIKE
            - CHESS
            - PHYSIOTHERAPY
            - CLASS_LECTURE
            - COMMUTING
            - COOKING
            - CRAFTING
            - HOUSEWORK
            - FISHING
            - GAMING
            - GARDENING
            - HAIRCUT
            - MASSAGE
            - MEETING
            - PANIC_ATTACK
            - PRAYER
            - PRESENTATION
            - READING
            - WATCHING_TV
            - SHOPPING
            - STUDYING
            - THERAPY
            - WORKING
            - BATH
            - PLAYING
            - BREASTFEEDING
            - KNITTING
            - POTTERY
            - CONCERT
            - PLAYING_MUSIC
            - NAIL_PAINTING
            - DOG_WALKING
            - TRAVELLING
            - BOARD_GAME
        origin:
          type: string
          enum:
            - USER_GENERATED
            - AUTO_GENERATED
            - STARTED_OUTSIDE_APP
            - STOPPED_OUTSIDE_APP
            - STARTED_AND_STOPPED_OUTSIDE_APP
            - LOGGED_FROM_TIMELINE
        name:
          type: string
      required:
        - start_datetime
        - end_datetime
        - type
        - origin
        - name
    ActivityEntity:
      type: object
      properties:
        id:
          type: string
        startDatetime:
          format: date-time
          type: string
        type:
          type: string
          enum:
            - UNDEFINED
            - BREATHWORK
            - ICE_BATH
            - CYCLING
            - DANCING
            - EVENT
            - HIKING
            - MEDITATION
            - LISTENING_TO_MUSIC
            - PAINT
            - PARTY
            - WRITING
            - PHOTOGRAPHY
            - RELAXING
            - RUN
            - SAUNA
            - SEX
            - SINGING
            - SOCIALISING
            - SWIMMING
            - WALKING
            - WORKOUT
            - YOGA
            - SITTING
            - ROLLER_SKATING
            - SNORKEL
            - AEROBICS
            - PILATES
            - TAI_CHI
            - BODYBUILDING
            - CROSSFIT
            - WEIGHTLIFTING
            - MARATHON
            - TRIATHLON
            - JUMP_ROPE
            - CIRCUIT_TRAINING
            - GYMNASTICS
            - STRETCH
            - BASKETBALL
            - CRICKET
            - VOLLEYBALL
            - FOOTBALL
            - BASEBALL
            - DODGEBALL
            - HANDBALL
            - TENNIS
            - RACQUETBALL
            - SQUASH
            - BADMINTON
            - TABLE_TENNIS
            - PADEL
            - DIVING
            - KAYAKING
            - ROWING
            - CANOEING
            - SAILING
            - SURFING
            - WINDSURFING
            - KITESURFING
            - WAKEBOARDING
            - WATER_SKIING
            - MARTIAL_ARTS
            - CROSS_COUNTRY
            - TRAMPOLINE
            - SKIING
            - SNOWBOARDING
            - ICE_SKATING
            - HOCKEY
            - SKATEBOARDING
            - ROCK_CLIMBING
            - PARAGLIDING
            - SKYDIVING
            - GOLF
            - ARCHERY
            - BOWLING
            - BILLIARDS
            - DARTS
            - HIIT
            - HORSEBACK_RIDING
            - POLO
            - MOUNTAIN_CLIMBING
            - SCUBA_DIVING
            - DRIVE
            - DD
            - MOTORBIKE
            - CHESS
            - PHYSIOTHERAPY
            - CLASS_LECTURE
            - COMMUTING
            - COOKING
            - CRAFTING
            - HOUSEWORK
            - FISHING
            - GAMING
            - GARDENING
            - HAIRCUT
            - MASSAGE
            - MEETING
            - PANIC_ATTACK
            - PRAYER
            - PRESENTATION
            - READING
            - WATCHING_TV
            - SHOPPING
            - STUDYING
            - THERAPY
            - WORKING
            - BATH
            - PLAYING
            - BREASTFEEDING
            - KNITTING
            - POTTERY
            - CONCERT
            - PLAYING_MUSIC
            - NAIL_PAINTING
            - DOG_WALKING
            - TRAVELLING
            - BOARD_GAME
        endDatetime:
          format: date-time
          type: string
        name:
          type: string
        lastUpdated:
          format: date-time
          type: string
        created:
          format: date-time
          type: string
        origin:
          type: string
      required:
        - id
        - startDatetime
        - type
        - endDatetime
        - name
        - lastUpdated
        - created
        - origin
    UpdateActivityDto:
      type: object
      properties:
        start_datetime:
          type: string
        end_datetime:
          type: string
        type:
          type: string
          enum:
            - UNDEFINED
            - BREATHWORK
            - ICE_BATH
            - CYCLING
            - DANCING
            - EVENT
            - HIKING
            - MEDITATION
            - LISTENING_TO_MUSIC
            - PAINT
            - PARTY
            - WRITING
            - PHOTOGRAPHY
            - RELAXING
            - RUN
            - SAUNA
            - SEX
            - SINGING
            - SOCIALISING
            - SWIMMING
            - WALKING
            - WORKOUT
            - YOGA
            - SITTING
            - ROLLER_SKATING
            - SNORKEL
            - AEROBICS
            - PILATES
            - TAI_CHI
            - BODYBUILDING
            - CROSSFIT
            - WEIGHTLIFTING
            - MARATHON
            - TRIATHLON
            - JUMP_ROPE
            - CIRCUIT_TRAINING
            - GYMNASTICS
            - STRETCH
            - BASKETBALL
            - CRICKET
            - VOLLEYBALL
            - FOOTBALL
            - BASEBALL
            - DODGEBALL
            - HANDBALL
            - TENNIS
            - RACQUETBALL
            - SQUASH
            - BADMINTON
            - TABLE_TENNIS
            - PADEL
            - DIVING
            - KAYAKING
            - ROWING
            - CANOEING
            - SAILING
            - SURFING
            - WINDSURFING
            - KITESURFING
            - WAKEBOARDING
            - WATER_SKIING
            - MARTIAL_ARTS
            - CROSS_COUNTRY
            - TRAMPOLINE
            - SKIING
            - SNOWBOARDING
            - ICE_SKATING
            - HOCKEY
            - SKATEBOARDING
            - ROCK_CLIMBING
            - PARAGLIDING
            - SKYDIVING
            - GOLF
            - ARCHERY
            - BOWLING
            - BILLIARDS
            - DARTS
            - HIIT
            - HORSEBACK_RIDING
            - POLO
            - MOUNTAIN_CLIMBING
            - SCUBA_DIVING
            - DRIVE
            - DD
            - MOTORBIKE
            - CHESS
            - PHYSIOTHERAPY
            - CLASS_LECTURE
            - COMMUTING
            - COOKING
            - CRAFTING
            - HOUSEWORK
            - FISHING
            - GAMING
            - GARDENING
            - HAIRCUT
            - MASSAGE
            - MEETING
            - PANIC_ATTACK
            - PRAYER
            - PRESENTATION
            - READING
            - WATCHING_TV
            - SHOPPING
            - STUDYING
            - THERAPY
            - WORKING
            - BATH
            - PLAYING
            - BREASTFEEDING
            - KNITTING
            - POTTERY
            - CONCERT
            - PLAYING_MUSIC
            - NAIL_PAINTING
            - DOG_WALKING
            - TRAVELLING
            - BOARD_GAME
        name:
          type: string
        origin:
          type: string
          enum:
            - USER_GENERATED
            - AUTO_GENERATED
            - STARTED_OUTSIDE_APP
            - STOPPED_OUTSIDE_APP
            - STARTED_AND_STOPPED_OUTSIDE_APP
            - LOGGED_FROM_TIMELINE
      required:
        - start_datetime
        - end_datetime
        - type
        - name
        - origin
    CreateIntentionDto:
      type: object
      properties:
        start_datetime:
          type: string
        end_datetime:
          type: string
        name:
          type: string
        subjectiveInputs:
          type: array
          items:
            type: string
      required:
        - start_datetime
        - end_datetime
        - name
        - subjectiveInputs
    IntentionEntity:
      type: object
      properties:
        id:
          type: string
        startDatetime:
          format: date-time
          type: string
        endDatetime:
          format: date-time
          type: string
        name:
          type: string
        lastUpdated:
          format: date-time
          type: string
        created:
          format: date-time
          type: string
        subjectiveInputs:
          type: array
          items:
            type: string
        infoData:
          type: object
      required:
        - id
        - startDatetime
        - endDatetime
        - name
        - lastUpdated
        - created
        - subjectiveInputs
        - infoData
    UpdateIntentionDto:
      type: object
      properties:
        start_datetime:
          type: string
        end_datetime:
          type: string
        name:
          type: string
        subjectiveInputs:
          type: array
          items:
            type: string
      required:
        - start_datetime
        - end_datetime
        - name
        - subjectiveInputs
    StatisticsEntity:
      type: object
      properties:
        date:
          format: date-time
          type: string
        data:
          type: object
        type:
          type: string
        created:
          format: date-time
          type: string
        lastUpdated:
          format: date-time
          type: string
        timeFilter:
          type: array
          items:
            type: string
        timeSpan:
          type: string
        enoughData:
          type: boolean
        version:
          type: string
        metadata:
          type: object
      required:
        - date
        - data
        - type
        - created
        - lastUpdated
        - timeFilter
        - timeSpan
        - enoughData
        - version
        - metadata
    IncomingStatisticsDto:
      type: object
      properties:
        data:
          type: object
        timeFilter:
          type: array
          example:
            - SUNDAYS
          items:
            type: string
            enum:
              - NONE
              - SUNDAYS
              - MONDAYS
              - TUESDAYS
              - WEDNESDAYS
              - THURSDAYS
              - FRIDAYS
              - SATURDAYS
              - NIGHTS
              - MORNINGS
              - AFTERNOONS
              - EVENINGS
              - AWAKE
              - SLEEP
        timeSpan:
          type: string
          enum:
            - ONE_DAY
            - ONE_WEEK
            - ONE_MONTH
            - ONE_YEAR
            - TWO_WEEKS
            - TWO_MONTHS
            - THREE_MONTHS
            - SIX_MONTHS
            - ALL_TIME
          example: ONE_DAY
        version:
          type: string
          example: 2025.05.23.1
          description: Algorithm version, stored in the format of `YYYY.MM.DD.X`
        enoughData:
          type: boolean
          description: Indicates if the statistics has enough data to be used for analysis
        metadata:
          type: object
          example:
            appVersion: 2025.05.23.1
            platform: ios
          description: >-
            Metadata about the statistics, right now it's stored in the format
            of `{ 'appVersion': 'YYYY.MM.DD.X', 'platform': 'ios' | 'android' }`
        date:
          format: date-time
          type: string
          example: '2024-03-20'
        type:
          type: string
          enum:
            - STRESS_DURATION
            - STRESS_RECOVERY
            - STRESS_FREQUENCY
            - INTENSE_ACTIVITY
            - DAYTIME_RESTING_HEART_RATE
            - SLEEP_HRV
            - SLEEP_DURATION
            - SLEEP_REGULARITY
            - SLEEP_STAGES
            - SLEEP_CYCLES
            - AWAKE_DURATION
            - WAKE_HOUR
            - STEP_COUNT
            - STRESSOR_RECOVERY_TIME
            - STRESSORS
            - HEART_RATE
            - RESTING_HEART_RATE
            - HRV
            - REACTIVITY
            - ACTIVITIES_DURATION
            - ACTIVITY_COUNT
            - REACTIVITY_DURING_STRESSORS
            - LOW_REACTIVITY_DURATION
            - STRESS_DURATION_DESCRIPTIVE
            - STRESS_RECOVERY_DESCRIPTIVE
            - STRESS_FREQUENCY_DESCRIPTIVE
            - STRESS_DESCRIPTIVE
            - INTENSE_ACTIVITY_DESCRIPTIVE
            - RESTING_HEART_RATE_DESCRIPTIVE
            - SLEEP_DURATION_DESCRIPTIVE
            - SLEEP_REGULARITY_DESCRIPTIVE
            - HRV_DESCRIPTIVE
            - SLEEP
            - TEMPERATURE
            - TEMPERATURE_DESCRIPTIVE
          example: >-
            'STRESS_DURATION' | 'STRESS_RECOVERY' | 'STRESS_FREQUENCY' |
            'INTENSE_ACTIVITY' | 'DAYTIME_RESTING_HEART_RATE' | 'SLEEP_HRV' |
            'SLEEP_DURATION' | 'SLEEP_REGULARITY' | 'SLEEP_STAGES' |
            'SLEEP_CYCLES' | 'AWAKE_DURATION' | 'WAKE_HOUR' | 'STEP_COUNT' |
            'STRESSOR_RECOVERY_TIME' | 'STRESSORS' | 'HEART_RATE' |
            'RESTING_HEART_RATE' | 'HRV' | 'REACTIVITY' | 'ACTIVITIES_DURATION'
            | 'ACTIVITY_COUNT' | 'REACTIVITY_DURING_STRESSORS' |
            'LOW_REACTIVITY_DURATION' | 'STRESS_DURATION_DESCRIPTIVE' |
            'STRESS_RECOVERY_DESCRIPTIVE' | 'STRESS_FREQUENCY_DESCRIPTIVE' |
            'STRESS_DESCRIPTIVE' | 'INTENSE_ACTIVITY_DESCRIPTIVE' |
            'RESTING_HEART_RATE_DESCRIPTIVE' | 'SLEEP_DURATION_DESCRIPTIVE' |
            'SLEEP_REGULARITY_DESCRIPTIVE' | 'HRV_DESCRIPTIVE' | 'SLEEP' |
            'TEMPERATURE' | 'TEMPERATURE_DESCRIPTIVE'
      required:
        - data
        - timeFilter
        - timeSpan
        - version
        - enoughData
        - metadata
        - date
        - type
    StatisticsBatch:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/IncomingStatisticsDto'
      required:
        - data
    StatisticsDtoUpdate:
      type: object
      properties:
        data:
          type: object
        timeFilter:
          type: array
          example:
            - SUNDAYS
          items:
            type: string
            enum:
              - NONE
              - SUNDAYS
              - MONDAYS
              - TUESDAYS
              - WEDNESDAYS
              - THURSDAYS
              - FRIDAYS
              - SATURDAYS
              - NIGHTS
              - MORNINGS
              - AFTERNOONS
              - EVENINGS
              - AWAKE
              - SLEEP
        timeSpan:
          type: string
          enum:
            - ONE_DAY
            - ONE_WEEK
            - ONE_MONTH
            - ONE_YEAR
            - TWO_WEEKS
            - TWO_MONTHS
            - THREE_MONTHS
            - SIX_MONTHS
            - ALL_TIME
          example: ONE_DAY
        version:
          type: string
          example: 2025.05.23.1
          description: Algorithm version, stored in the format of `YYYY.MM.DD.X`
        enoughData:
          type: boolean
          description: Indicates if the statistics has enough data to be used for analysis
        metadata:
          type: object
          example:
            appVersion: 2025.05.23.1
            platform: ios
          description: >-
            Metadata about the statistics, right now it's stored in the format
            of `{ 'appVersion': 'YYYY.MM.DD.X', 'platform': 'ios' | 'android' }`
      required:
        - data
        - timeFilter
        - timeSpan
        - version
        - enoughData
        - metadata
    CheckinInfo:
      type: object
      properties:
        name:
          type: string
        note:
          type: string
        subjective_inputs:
          type: array
          items:
            $ref: '#/components/schemas/SubjectiveInput'
        origin:
          type: number
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 5
    CreateCheckinDto:
      type: object
      properties:
        datetime:
          type: string
        info:
          $ref: '#/components/schemas/CheckinInfo'
      required:
        - datetime
        - info
    CheckinEntity:
      type: object
      properties:
        id:
          type: string
        datetime:
          format: date-time
          type: string
        created:
          format: date-time
          type: string
        lastUpdated:
          format: date-time
          type: string
        info:
          $ref: '#/components/schemas/CheckinInfo'
      required:
        - id
        - datetime
        - created
        - lastUpdated
        - info
    UpdateCheckinDto:
      type: object
      properties:
        info:
          $ref: '#/components/schemas/CheckinInfo'
      required:
        - info
    CreateAlarmDto:
      type: object
      properties:
        time:
          type: string
        enabled:
          type: boolean
        week_days:
          type: array
          items:
            type: string
      required:
        - time
        - enabled
        - week_days
    AlarmEntity:
      type: object
      properties:
        id:
          type: string
        time:
          type: string
        created:
          format: date-time
          type: string
        lastUpdated:
          format: date-time
          type: string
        enabled:
          type: boolean
        weekDays:
          type: array
          items:
            type: string
        info:
          type: object
      required:
        - id
        - time
        - created
        - lastUpdated
        - enabled
        - weekDays
        - info
    UpdateAlarmDto:
      type: object
      properties:
        time:
          type: string
        enabled:
          type: boolean
        week_days:
          type: array
          items:
            type: string
      required:
        - time
        - enabled
        - week_days
    CreateDayFeedbackDto:
      type: object
      properties:
        datetime:
          type: string
        type:
          type: number
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
          description: >-
            The type of subjective input.

            - For SubjectiveInputType.DAY: Represents the "How was your day?"
            question.
              This question appears once each day, when the user opens the app after the theoretical end of the workday (between 5 p.m. and midnight).
            - For SubjectiveInputType.SLEEP: Represents the "How was your
            sleep?" question.
              This question appears once each day, when the user opens the app after the theoretical end of the night of sleep (between 4 a.m. and midday).
        value:
          type: number
          description: >-
            The value associated with the subjective input.

            For "How was your day?" and "How was your sleep?" questions,
            possible values are:

            - 1: Very bad

            - 2: Bad

            - 3: Okay

            - 4: Good

            - 5: Very good
        tag:
          type: number
          description: |-
            A tag associated with the subjective input.
            For day-feedback and feelings, this tag should be 0 and is not used.
        note:
          type: string
      required:
        - datetime
        - type
        - value
        - tag
    DayFeedbackEntity:
      type: object
      properties:
        id:
          type: string
        datetime:
          format: date-time
          type: string
        created:
          format: date-time
          type: string
        lastUpdated:
          format: date-time
          type: string
        type:
          type: number
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
        value:
          type: number
        tag:
          type: number
        note:
          type: string
      required:
        - id
        - datetime
        - created
        - lastUpdated
        - type
        - value
        - tag
        - note
    UpdateDayFeedbackDto:
      type: object
      properties:
        value:
          type: number
        tag:
          type: number
        note:
          type: string
      required:
        - value
        - tag
    SleepAwakening:
      type: object
      properties:
        start_datetime:
          format: date-time
          type: string
        end_datetime:
          format: date-time
          type: string
        origin:
          type: number
          enum:
            - 0
            - 1
        modified_start_datetime:
          format: date-time
          type: string
        modified_end_datetime:
          format: date-time
          type: string
      required:
        - start_datetime
        - end_datetime
        - origin
        - modified_start_datetime
        - modified_end_datetime
    SleepLogEntity:
      type: object
      properties:
        id:
          type: string
        start_datetime:
          format: date-time
          type: string
        end_datetime:
          format: date-time
          type: string
        userId:
          type: string
        origin:
          type: number
          enum:
            - 0
            - 1
        details:
          type: array
          items:
            type: number
            enum:
              - -1
              - 0
              - 1
              - 2
              - 3
              - 4
        confirmed:
          type: number
          enum:
            - 0
            - 1
            - 2
            - 3
        awakenings:
          type: array
          items:
            $ref: '#/components/schemas/SleepAwakening'
        modified_start_datetime:
          format: date-time
          type: string
        modified_end_datetime:
          format: date-time
          type: string
      required:
        - id
        - start_datetime
        - end_datetime
        - userId
    SleepAwakeningsDto:
      type: object
      properties:
        start_datetime:
          type: string
        end_datetime:
          type: string
        origin:
          type: number
          enum:
            - 0
            - 1
          description: AUTO (0), USER (1)
        modified_start_datetime:
          type: string
        modified_end_datetime:
          type: string
      required:
        - start_datetime
        - end_datetime
        - origin
    SleepLogDto:
      type: object
      properties:
        start_datetime:
          type: string
        end_datetime:
          type: string
        origin:
          type: number
          enum:
            - 0
            - 1
          description: AUTO (0), USER (1)
        details:
          type: array
          description: >-
            [UNKNOWN (-1), NAP (0), SLEPT_ENOUGH (1), RESTLESS_SLEEP (2),
            WOKE_UP_TIRED (3), WOKE_UP_ENERGISED (4)]
          items:
            type: number
            enum:
              - -1
              - 0
              - 1
              - 2
              - 3
              - 4
        confirmed:
          type: number
          enum:
            - 0
            - 1
            - 2
            - 3
          description: NO_CHANGE (0), DELETED (1), CONFIRMED (2), MODIFIED (3)
        awakenings:
          type: array
          items:
            $ref: '#/components/schemas/SleepAwakeningsDto'
        modified_start_datetime:
          type: string
        modified_end_datetime:
          type: string
      required:
        - start_datetime
        - end_datetime
    InsertSleepLogDto:
      type: object
      properties:
        sleep_logs:
          type: array
          items:
            $ref: '#/components/schemas/SleepLogDto'
      required:
        - sleep_logs
    SleepEntity:
      type: object
      properties:
        id:
          type: string
        origin:
          type: number
          enum:
            - -1
            - 0
            - 1
            - 2
            - 3
            - 4
        confirmed_type:
          type: number
          enum:
            - -1
            - 0
            - 1
            - 2
            - 3
        created_at:
          format: date-time
          type: string
        start_datetime:
          format: date-time
          type: string
        end_datetime:
          format: date-time
          type: string
        details_data:
          type: array
          items:
            type: number
        stages:
          type: array
          items:
            type: object
        source_ids:
          type: array
          items:
            type: string
        metadata:
          type: object
      required:
        - id
        - origin
        - confirmed_type
        - created_at
        - start_datetime
        - end_datetime
        - metadata
    SleepStageDto:
      type: object
      properties:
        id:
          type: string
        start_datetime:
          format: date-time
          type: string
        end_datetime:
          format: date-time
          type: string
        type:
          type: number
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
      required:
        - id
        - start_datetime
        - end_datetime
        - type
    SleepMetadataDto:
      type: object
      properties:
        app_version:
          type: string
        algorithm_version:
          type: string
        platform:
          type: string
      required:
        - app_version
        - algorithm_version
        - platform
    SleepDto:
      type: object
      properties:
        id:
          type: string
        origin:
          type: number
          enum:
            - -1
            - 0
            - 1
            - 2
            - 3
            - 4
        confirmed_type:
          type: number
          enum:
            - -1
            - 0
            - 1
            - 2
            - 3
        created_at:
          format: date-time
          type: string
        start_datetime:
          format: date-time
          type: string
        end_datetime:
          format: date-time
          type: string
        details_data:
          type: array
          items:
            type: number
        stages:
          type: array
          items:
            $ref: '#/components/schemas/SleepStageDto'
        source_ids:
          type: array
          items:
            type: string
        metadata:
          $ref: '#/components/schemas/SleepMetadataDto'
      required:
        - id
        - origin
        - confirmed_type
        - created_at
        - start_datetime
        - end_datetime
        - metadata
    SleepBatchDto:
      type: object
      properties:
        sleeps:
          type: array
          items:
            $ref: '#/components/schemas/SleepDto'
      required:
        - sleeps
    SleepErrorResponseDto:
      type: object
      properties:
        success_ids:
          type: array
          items:
            type: string
        failed_ids:
          type: array
          items:
            type: string
      required:
        - success_ids
        - failed_ids
    ShareSinceDto:
      type: object
      properties:
        email:
          type: string
          description: The email of the user to share with or request from
        shareSince:
          format: date-time
          type: string
          description: The date from which to share the dashboard
      required:
        - email
        - shareSince
    SharingActionDto:
      type: object
      properties:
        email:
          type: string
          description: The email of the user
      required:
        - email
    SharingEntity:
      type: object
      properties:
        fromId:
          type: string
        fromEmail:
          type: string
        toId:
          type: string
        toEmail:
          type: string
        sharedSince:
          format: date-time
          type: string
        created:
          format: date-time
          type: string
        lastUpdated:
          format: date-time
          type: string
      required:
        - fromId
        - fromEmail
        - toId
        - toEmail
        - sharedSince
        - created
        - lastUpdated
    UpdateSharingDto:
      type: object
      properties:
        email:
          type: string
          description: The email of the user to update sharing with
        shareSince:
          format: date-time
          type: string
          description: The date when sharing should start
      required:
        - email
    InviteEntity:
      type: object
      properties:
        id:
          type: string
        fromEmail:
          type: string
        invitedEmail:
          type: string
        status:
          type: string
          enum:
            - PENDING
            - ACCEPTED
            - REJECTED
        shareSince:
          format: date-time
          type: string
        sentDate:
          format: date-time
          type: string
        created:
          format: date-time
          type: string
        lastUpdated:
          format: date-time
          type: string
      required:
        - id
        - fromEmail
        - invitedEmail
        - status
        - shareSince
        - sentDate
        - created
        - lastUpdated
    SharingRequestEntity:
      type: object
      properties:
        requestedEmail:
          type: string
        fromEmail:
          type: string
        status:
          type: string
        shareSince:
          format: date-time
          type: string
        sentDate:
          format: date-time
          type: string
        created:
          format: date-time
          type: string
        lastUpdated:
          format: date-time
          type: string
      required:
        - requestedEmail
        - fromEmail
        - status
        - shareSince
        - sentDate
        - created
        - lastUpdated
    SharedEntity:
      type: object
      properties:
        fromId:
          type: string
        fromEmail:
          type: string
        toId:
          type: string
        toEmail:
          type: string
        sharedSince:
          format: date-time
          type: string
        created:
          format: date-time
          type: string
        lastUpdated:
          format: date-time
          type: string
        customName:
          type: string
        iconColor:
          type: string
        customProfilePicture:
          type: string
        groupIds:
          description: Array of group IDs that the shared user is part of
          example:
            - a1b2c3d4-e5f6-7890-1234-567890abcdef
          type: array
          items:
            type: string
        lastSyncAt:
          format: date-time
          type: string
          description: Last time data was synchronized from the shared user's mobile app
          example: '2024-01-01T12:00:00.000Z'
      required:
        - fromId
        - fromEmail
        - toId
        - toEmail
        - sharedSince
        - created
        - lastUpdated
        - customName
        - iconColor
        - customProfilePicture
        - groupIds
    GroupPopulatedEntity:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier for the group
          example: a1b2c3d4-e5f6-7890-1234-567890abcdef
        userId:
          type: string
          description: The ID of the user who owns the group
          example: a1b2c3d4-e5f6-7890-1234-567890abcdef
        name:
          type: string
          description: The name of the group
          example: My Favorite People
        created:
          format: date-time
          type: string
          description: The date and time the group was created
          example: '2023-01-01T12:00:00.000Z'
        lastUpdated:
          format: date-time
          type: string
          description: The date and time the group was last updated
          example: '2023-01-01T12:00:00.000Z'
        userIds:
          description: Array of user IDs that are members of this group
          example:
            - a1b2c3d4-e5f6-7890-1234-567890abcdef
          type: array
          items:
            type: string
        users:
          description: Array of users that are members of this group
          type: array
          items:
            $ref: '#/components/schemas/SharedEntity'
      required:
        - id
        - userId
        - name
        - created
        - lastUpdated
        - userIds
        - users
    CreateGroupDto:
      type: object
      properties: {}
    UpdateCustomDto:
      type: object
      properties:
        userId:
          type: string
          description: The ID of the user who shared the dashboard
        customName:
          type: string
        iconColor:
          type: string
      required:
        - userId
        - customName
        - iconColor
    AddUserToGroupDto:
      type: object
      properties:
        userId:
          type: string
          description: ID of the user to add to the group
          example: a1b2c3d4-e5f6-7890-1234-567890abcdef
      required:
        - userId
    RemoveUserFromGroupDto:
      type: object
      properties:
        userId:
          type: string
          description: ID of the user to remove from the group
          example: a1b2c3d4-e5f6-7890-1234-567890abcdef
      required:
        - userId
    DeleteSharedDto:
      type: object
      properties:
        userId:
          type: string
          description: The ID of the user who shared the dashboard
          example: >-
            uid_42de8e6bedc4c4520572e33cad742387FNzK76rO/6weZ7SdXmntf/IKcuWal2Nca++pLMMTIu3QJHrDYDsQ0xJ9NrpntWz5
      required:
        - userId
    SpanDto:
      type: object
      properties:
        name:
          type: string
        traceId:
          type: string
        spanId:
          type: string
        parentSpanId:
          type: string
        startTime:
          type: number
        endTime:
          type: number
        attributes:
          type: array
          items:
            type: string
      required:
        - name
        - traceId
        - spanId
        - parentSpanId
        - startTime
        - endTime
    SpanBatchDto:
      type: object
      properties:
        spans:
          type: array
          items:
            $ref: '#/components/schemas/SpanDto'
        serviceName:
          type: string
        serviceVersion:
          type: string
      required:
        - spans
        - serviceName
        - serviceVersion
    MetricAttributeDto:
      type: object
      properties:
        key:
          type: string
        value:
          type: string
      required:
        - key
        - value
    MetricDataPointDto:
      type: object
      properties:
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/MetricAttributeDto'
        timestamp:
          type: number
        asInt:
          type: number
        asDouble:
          type: number
      required:
        - attributes
        - timestamp
    MetricSumDto:
      type: object
      properties:
        dataPoints:
          type: array
          items:
            $ref: '#/components/schemas/MetricDataPointDto'
        aggregationTemporality:
          type: string
          enum:
            - UNSPECIFIED
            - DELTA
            - CUMULATIVE
        isMonotonic:
          type: boolean
      required:
        - dataPoints
        - aggregationTemporality
        - isMonotonic
    MetricGaugeDto:
      type: object
      properties:
        dataPoints:
          type: array
          items:
            $ref: '#/components/schemas/MetricDataPointDto'
      required:
        - dataPoints
    MetricDto:
      type: object
      properties:
        name:
          type: string
        unit:
          type: string
        sum:
          $ref: '#/components/schemas/MetricSumDto'
        gauge:
          $ref: '#/components/schemas/MetricGaugeDto'
      required:
        - name
        - unit
    MetricBatchDto:
      type: object
      properties:
        serviceName:
          type: string
        serviceVersion:
          type: string
        metrics:
          type: array
          items:
            $ref: '#/components/schemas/MetricDto'
      required:
        - serviceName
        - serviceVersion
        - metrics
    LogDto:
      type: object
      properties:
        message:
          type: string
        timestamp:
          type: number
        level:
          type: string
        traceId:
          type: string
        spanId:
          type: string
        attributes:
          type: array
          items:
            type: string
      required:
        - message
        - timestamp
        - level
    LogBatchDto:
      type: object
      properties:
        logs:
          type: array
          items:
            $ref: '#/components/schemas/LogDto'
        serviceName:
          type: string
        serviceVersion:
          type: string
      required:
        - logs
        - serviceName
        - serviceVersion
