openapi: 3.0.3
info:
  title: 'API Documentation'
  description: 'This is the API documentation for the application.'
  version: 1.0.0
servers:
  -
    url: 'http://beact.test'
paths:
  /api/register:
    post:
      summary: 'Register a new user'
      operationId: registerANewUser
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  user:
                    id: 1
                    name: 'John Doe'
                    email: johndoe@example.com
                    created_at: '2023-10-01T00:00:00.000000Z'
                    updated_at: '2023-10-01T00:00:00.000000Z'
                properties:
                  user:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      name:
                        type: string
                        example: 'John Doe'
                      email:
                        type: string
                        example: johndoe@example.com
                      created_at:
                        type: string
                        example: '2023-10-01T00:00:00.000000Z'
                      updated_at:
                        type: string
                        example: '2023-10-01T00:00:00.000000Z'
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'The name of the user.'
                  example: 'John Doe'
                  nullable: false
                email:
                  type: string
                  description: 'The email of the user.'
                  example: johndoe@example.com
                  nullable: false
                password:
                  type: string
                  description: 'The password of the user.'
                  example: secret
                  nullable: false
                password_confirmation:
                  type: string
                  description: 'The password confirmation.'
                  example: secret
                  nullable: false
              required:
                - name
                - email
                - password
                - password_confirmation
      security: []
  /api/login:
    post:
      summary: 'Login a user'
      operationId: loginAUser
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  access_token: token
                  token_type: Bearer
                properties:
                  access_token:
                    type: string
                    example: token
                  token_type:
                    type: string
                    example: Bearer
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  description: 'The email of the user.'
                  example: johndoe@example.com
                  nullable: false
                password:
                  type: string
                  description: 'The password of the user.'
                  example: secret
                  nullable: false
              required:
                - email
                - password
      security: []
  /api/logout:
    post:
      summary: 'Logout a user'
      operationId: logoutAUser
      description: 'Requires a valid Sanctum token.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Successfully logged out'
                properties:
                  message:
                    type: string
                    example: 'Successfully logged out'
      tags:
        - Endpoints
  /api/forgot-password:
    post:
      summary: 'Send a password reset link'
      operationId: sendAPasswordResetLink
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'We have emailed your password reset link!'
                properties:
                  message:
                    type: string
                    example: 'We have emailed your password reset link!'
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  description: 'The email of the user.'
                  example: johndoe@example.com
                  nullable: false
              required:
                - email
      security: []
  /api/reset-password:
    post:
      summary: 'Reset the password'
      operationId: resetThePassword
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Your password has been reset!'
                properties:
                  message:
                    type: string
                    example: 'Your password has been reset!'
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                token:
                  type: string
                  description: 'The password reset token.'
                  example: esse
                  nullable: false
                email:
                  type: string
                  description: 'The email of the user.'
                  example: johndoe@example.com
                  nullable: false
                password:
                  type: string
                  description: 'The new password of the user.'
                  example: newpassword
                  nullable: false
                password_confirmation:
                  type: string
                  description: 'The password confirmation.'
                  example: newpassword
                  nullable: false
              required:
                - token
                - email
                - password
                - password_confirmation
      security: []
  /api/user:
    get:
      summary: 'Get the authenticated user'
      operationId: getTheAuthenticatedUser
      description: 'Requires a valid Sanctum token.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 1
                  name: 'John Doe'
                  email: johndoe@example.com
                  created_at: '2023-10-01T00:00:00.000000Z'
                  updated_at: '2023-10-01T00:00:00.000000Z'
                properties:
                  id:
                    type: integer
                    example: 1
                  name:
                    type: string
                    example: 'John Doe'
                  email:
                    type: string
                    example: johndoe@example.com
                  created_at:
                    type: string
                    example: '2023-10-01T00:00:00.000000Z'
                  updated_at:
                    type: string
                    example: '2023-10-01T00:00:00.000000Z'
      tags:
        - Endpoints
  /api/activities:
    get:
      summary: 'Display a listing of the activities.'
      operationId: displayAListingOfTheActivities
      description: 'Requires a valid Sanctum token.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 1
                  name: 'Activity 1'
                  category_id: 1
                  created_at: '2023-10-01T00:00:00.000000Z'
                  updated_at: '2023-10-01T00:00:00.000000Z'
                properties:
                  id:
                    type: integer
                    example: 1
                  name:
                    type: string
                    example: 'Activity 1'
                  category_id:
                    type: integer
                    example: 1
                  created_at:
                    type: string
                    example: '2023-10-01T00:00:00.000000Z'
                  updated_at:
                    type: string
                    example: '2023-10-01T00:00:00.000000Z'
      tags:
        - Endpoints
    post:
      summary: 'Store a newly created activity in storage.'
      operationId: storeANewlyCreatedActivityInStorage
      description: 'Requires a valid Sanctum token.'
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 1
                  name: Running
                  category_id: 1
                  created_at: '2023-10-01T00:00:00.000000Z'
                  updated_at: '2023-10-01T00:00:00.000000Z'
                properties:
                  id:
                    type: integer
                    example: 1
                  name:
                    type: string
                    example: Running
                  category_id:
                    type: integer
                    example: 1
                  created_at:
                    type: string
                    example: '2023-10-01T00:00:00.000000Z'
                  updated_at:
                    type: string
                    example: '2023-10-01T00:00:00.000000Z'
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'The name of the activity.'
                  example: Running
                  nullable: false
                category_id:
                  type: integer
                  description: 'The ID of the category.'
                  example: 1
                  nullable: false
              required:
                - name
                - category_id
  '/api/activities/{id}':
    get:
      summary: 'Display the specified activity.'
      operationId: displayTheSpecifiedActivity
      description: 'Requires a valid Sanctum token.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 1
                  name: Running
                  category_id: 1
                  created_at: '2023-10-01T00:00:00.000000Z'
                  updated_at: '2023-10-01T00:00:00.000000Z'
                properties:
                  id:
                    type: integer
                    example: 1
                  name:
                    type: string
                    example: Running
                  category_id:
                    type: integer
                    example: 1
                  created_at:
                    type: string
                    example: '2023-10-01T00:00:00.000000Z'
                  updated_at:
                    type: string
                    example: '2023-10-01T00:00:00.000000Z'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Activity not found'
                properties:
                  message:
                    type: string
                    example: 'Activity not found'
      tags:
        - Endpoints
    put:
      summary: 'Update the specified activity in storage.'
      operationId: updateTheSpecifiedActivityInStorage
      description: 'Requires a valid Sanctum token.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 1
                  name: Running
                  category_id: 1
                  created_at: '2023-10-01T00:00:00.000000Z'
                  updated_at: '2023-10-01T00:00:00.000000Z'
                properties:
                  id:
                    type: integer
                    example: 1
                  name:
                    type: string
                    example: Running
                  category_id:
                    type: integer
                    example: 1
                  created_at:
                    type: string
                    example: '2023-10-01T00:00:00.000000Z'
                  updated_at:
                    type: string
                    example: '2023-10-01T00:00:00.000000Z'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Activity not found'
                properties:
                  message:
                    type: string
                    example: 'Activity not found'
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'The name of the activity.'
                  example: Running
                  nullable: false
                category_id:
                  type: integer
                  description: 'The ID of the category.'
                  example: 1
                  nullable: false
              required:
                - name
                - category_id
    delete:
      summary: 'Remove the specified activity from storage.'
      operationId: removeTheSpecifiedActivityFromStorage
      description: 'Requires a valid Sanctum token.'
      parameters: []
      responses:
        204:
          description: ''
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Activity not found'
                properties:
                  message:
                    type: string
                    example: 'Activity not found'
      tags:
        - Endpoints
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the activity.'
        example: 1
        required: true
        schema:
          type: integer
  /api/categories:
    get:
      summary: 'Display a listing of the categories'
      operationId: displayAListingOfTheCategories
      description: 'Requires a valid Sanctum token.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 1
                  name: 'Category 1'
                  created_at: '2023-10-01T00:00:00.000000Z'
                  updated_at: '2023-10-01T00:00:00.000000Z'
                properties:
                  id:
                    type: integer
                    example: 1
                  name:
                    type: string
                    example: 'Category 1'
                  created_at:
                    type: string
                    example: '2023-10-01T00:00:00.000000Z'
                  updated_at:
                    type: string
                    example: '2023-10-01T00:00:00.000000Z'
      tags:
        - Endpoints
    post:
      summary: 'Store a newly created category in storage'
      operationId: storeANewlyCreatedCategoryInStorage
      description: 'Requires a valid Sanctum token.'
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 1
                  name: Electronics
                  created_at: '2023-10-01T00:00:00.000000Z'
                  updated_at: '2023-10-01T00:00:00.000000Z'
                properties:
                  id:
                    type: integer
                    example: 1
                  name:
                    type: string
                    example: Electronics
                  created_at:
                    type: string
                    example: '2023-10-01T00:00:00.000000Z'
                  updated_at:
                    type: string
                    example: '2023-10-01T00:00:00.000000Z'
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'The name of the category.'
                  example: Electronics
                  nullable: false
              required:
                - name
  '/api/categories/{id}':
    get:
      summary: 'Display the specified category'
      operationId: displayTheSpecifiedCategory
      description: 'Requires a valid Sanctum token.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 1
                  name: Electronics
                  created_at: '2023-10-01T00:00:00.000000Z'
                  updated_at: '2023-10-01T00:00:00.000000Z'
                properties:
                  id:
                    type: integer
                    example: 1
                  name:
                    type: string
                    example: Electronics
                  created_at:
                    type: string
                    example: '2023-10-01T00:00:00.000000Z'
                  updated_at:
                    type: string
                    example: '2023-10-01T00:00:00.000000Z'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Category not found'
                properties:
                  message:
                    type: string
                    example: 'Category not found'
      tags:
        - Endpoints
    put:
      summary: 'Update the specified category in storage'
      operationId: updateTheSpecifiedCategoryInStorage
      description: 'Requires a valid Sanctum token.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 1
                  name: Electronics
                  created_at: '2023-10-01T00:00:00.000000Z'
                  updated_at: '2023-10-01T00:00:00.000000Z'
                properties:
                  id:
                    type: integer
                    example: 1
                  name:
                    type: string
                    example: Electronics
                  created_at:
                    type: string
                    example: '2023-10-01T00:00:00.000000Z'
                  updated_at:
                    type: string
                    example: '2023-10-01T00:00:00.000000Z'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Category not found'
                properties:
                  message:
                    type: string
                    example: 'Category not found'
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'The name of the category.'
                  example: Electronics
                  nullable: false
              required:
                - name
    delete:
      summary: 'Remove the specified category from storage'
      operationId: removeTheSpecifiedCategoryFromStorage
      description: 'Requires a valid Sanctum token.'
      parameters: []
      responses:
        204:
          description: ''
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Category not found'
                properties:
                  message:
                    type: string
                    example: 'Category not found'
      tags:
        - Endpoints
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the category.'
        example: 1
        required: true
        schema:
          type: integer
  /api/user-tap-streams:
    get:
      summary: 'Display a listing of the resource.'
      operationId: displayAListingOfTheResource
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
    post:
      summary: 'Store a newly created resource in storage.'
      operationId: storeANewlyCreatedResourceInStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                page:
                  type: string
                  description: ''
                  example: accusamus
                  nullable: false
                duration:
                  type: integer
                  description: ''
                  example: 14
                  nullable: false
                data:
                  type: string
                  description: 'Must be a valid JSON string.'
                  example: '["maiores","labore"]'
                  nullable: false
              required:
                - page
                - duration
                - data
  '/api/user-tap-streams/{id}':
    get:
      summary: 'Display the specified resource.'
      operationId: displayTheSpecifiedResource
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
    put:
      summary: 'Update the specified resource in storage.'
      operationId: updateTheSpecifiedResourceInStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                page:
                  type: string
                  description: ''
                  example: magni
                  nullable: false
                duration:
                  type: integer
                  description: ''
                  example: 7
                  nullable: false
                data:
                  type: string
                  description: 'Must be a valid JSON string.'
                  example: '["quibusdam","molestiae"]'
                  nullable: false
              required:
                - page
                - duration
                - data
    delete:
      summary: 'Remove the specified resource from storage.'
      operationId: removeTheSpecifiedResourceFromStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the user tap stream.'
        example: nisi
        required: true
        schema:
          type: string
  /api/user-activities/today:
    get:
      summary: 'List user activities for today for the current authenticated user.'
      operationId: listUserActivitiesForTodayForTheCurrentAuthenticatedUser
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"data\": [\n    {\n      \"id\": 1,\n      \"user_id\": 1,\n      \"activity_id\": 1,\n      \"duration\": 60,\n      // ...other fields...\n    }\n  ]\n}"
      tags:
        - Endpoints
  /api/user-activities/yesterday:
    get:
      summary: 'List user activities for yesterday for the current authenticated user.'
      operationId: listUserActivitiesForYesterdayForTheCurrentAuthenticatedUser
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"data\": [\n    {\n      \"id\": 1,\n      \"user_id\": 1,\n      \"activity_id\": 1,\n      \"duration\": 60,\n      // ...other fields...\n    }\n  ]\n}"
      tags:
        - Endpoints
  /api/user-activities/last7days:
    get:
      summary: 'List user activities for the last 7 days for the current authenticated user.'
      operationId: listUserActivitiesForTheLast7DaysForTheCurrentAuthenticatedUser
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"data\": [\n    {\n      \"id\": 1,\n      \"user_id\": 1,\n      \"activity_id\": 1,\n      \"duration\": 60,\n      // ...other fields...\n    }\n  ]\n}"
      tags:
        - Endpoints
  /api/user-activities/date:
    post:
      summary: 'List user activities for a specific date for the current authenticated user.'
      operationId: listUserActivitiesForASpecificDateForTheCurrentAuthenticatedUser
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"data\": [\n    {\n      \"id\": 1,\n      \"user_id\": 1,\n      \"activity_id\": 1,\n      \"duration\": 60,\n      // ...other fields...\n    }\n  ]\n}"
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                date:
                  type: string
                  description: 'Must be a valid date.'
                  example: '2025-02-28T02:40:25'
                  nullable: false
              required:
                - date
  /api/user-activities:
    get:
      summary: "Display a listing of the current user's activities."
      operationId: displayAListingOfTheCurrentUsersActivities
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"data\": [\n    {\n      \"id\": 1,\n      \"user_id\": 1,\n      \"activity_id\": 1,\n      \"duration\": 60,\n      // ...other fields...\n    }\n  ]\n}"
      tags:
        - Endpoints
    post:
      summary: 'Store a newly created user activity in storage.'
      operationId: storeANewlyCreatedUserActivityInStorage
      description: 'Note: The user_id is taken from the authenticated user.'
      parameters: []
      responses:
        201:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"data\": {\n    \"id\": 1,\n    \"user_id\": 1,\n    \"activity_id\": 1,\n    \"duration\": 60,\n    // ...other fields...\n  }\n}"
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                activity_id:
                  type: string
                  description: 'The <code>id</code> of an existing record in the activities table.'
                  example: nulla
                  nullable: false
                duration:
                  type: integer
                  description: ''
                  example: 1
                  nullable: false
              required:
                - activity_id
                - duration
  '/api/user-activities/{id}':
    get:
      summary: 'Display the specified user activity for the current user.'
      operationId: displayTheSpecifiedUserActivityForTheCurrentUser
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"data\": {\n    \"id\": 1,\n    \"user_id\": 1,\n    \"activity_id\": 1,\n    \"duration\": 60,\n    \"activity\": {\n      \"id\": 1,\n      \"name\": \"Running\",\n      \"category\": {\n        \"id\": 1,\n        \"name\": \"Exercise\"\n      }\n    }\n    // ...other fields...\n  }\n}"
      tags:
        - Endpoints
    put:
      summary: 'Update the specified user activity for the current user.'
      operationId: updateTheSpecifiedUserActivityForTheCurrentUser
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"data\": {\n    \"id\": 1,\n    \"user_id\": 1,\n    \"activity_id\": 1,\n    \"duration\": 90,\n    // ...other fields...\n  }\n}"
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                activity_id:
                  type: string
                  description: 'The <code>id</code> of an existing record in the activities table.'
                  example: possimus
                  nullable: false
                duration:
                  type: integer
                  description: ''
                  example: 4
                  nullable: false
              required:
                - activity_id
                - duration
    delete:
      summary: 'Remove the specified user activity from storage for the current user.'
      operationId: removeTheSpecifiedUserActivityFromStorageForTheCurrentUser
      description: ''
      parameters: []
      responses:
        204:
          description: ''
      tags:
        - Endpoints
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the user activity.'
        example: nostrum
        required: true
        schema:
          type: string
tags:
  -
    name: Endpoints
    description: ''
components:
  securitySchemes:
    default:
      type: apiKey
      name: Authorization
      in: header
      description: 'You can retrieve your token by visiting your dashboard and clicking <b>Generate API token</b>.'
security:
  -
    default: []
