openapi: 3.0.0
info:
  title: Agriconecta
  version: 1.0.0
servers:
  - url: http://{{baseurl}}
  - url: http://localhost:9099
  - url: https://beta.agriconecta.com
  - url: http://beta.agriconecta.com
  - url: http://127.0.0.1:5001
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
    noauthAuth:
      type: http
      scheme: noauth
tags:
  - name: User Picture
  - name: Firebase
  - name: Agriconecta
  - name: Magento
  - name: Crops
  - name: Pests
  - name: Stages
  - name: GraphQl
paths:
  /updateProfilePictureByThirdMock:
    post:
      tags:
        - User Picture
      summary: (Mock) Update
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                input:
                  agriconectaId: '{{$randomUUID}}'
                  profilePictureData: '{{sampleBase64Image}}'
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /updateProfilePictureByThird:
    post:
      tags:
        - User Picture
      summary: Update by third
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                input:
                  agriconectaId: '{{user_id}}'
                  profilePictureData: '{{sampleBase64Image}}'
      parameters:
        - name: remote-auth
          in: header
          schema:
            type: string
          example: '{{token}}'
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /updateProfilePicture:
    post:
      tags:
        - User Picture
      summary: Update
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                input:
                  agriconectaId: '{{user_id}}'
                  profilePictureData: '{{sampleBase64Image}}'
      parameters:
        - name: remote-auth
          in: header
          schema:
            type: string
          example: '{{token}}'
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /identitytoolkit.googleapis.com/v1/accounts:signInWithPassword:
    post:
      tags:
        - Firebase
      summary: Generate token
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                email: '{{email}}'
                password: '{{password}}'
      parameters:
        - name: key
          in: query
          schema:
            type: string
          example: any_key_you_want
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /rest/all/V1/integration/admin/token:
    post:
      tags:
        - Agriconecta
      summary: E-Commerce Token
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                username: '{{ecommerceUser}}'
                password: '{{ecommercePassword}}'
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /rest/V1/useravatar/sendProfilePicture:
    post:
      tags:
        - Agriconecta
      summary: Send profile picture
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                agriconectaId: '{{user_id}}'
                profilePictureData: '{{sampleBase64Image}}'
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /crops:
    get:
      tags:
        - Crops
      summary: Get crops affected by pests
      parameters:
        - name: remote-auth
          in: header
          schema:
            type: string
          example: '{{token}}'
        - name: pestCategoryTypeId
          in: query
          schema:
            type: integer
          example: '1'
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /treatments/pests/:
    get:
      tags:
        - Pests
      summary: Get pests with treatments
      parameters:
        - name: remote-auth
          in: header
          schema:
            type: string
          example: '{{token}}'
        - name: pestId
          in: query
          schema:
            type: integer
          example: '11'
        - name: pestTreatmentTypeId
          in: query
          schema:
            type: integer
          example: '1'
        - name: stageId
          in: query
          schema:
            type: integer
          example: '2'
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /stages/crops/:
    get:
      tags:
        - Stages
      summary: Get stages by crop
      parameters:
        - name: remote-auth
          in: header
          schema:
            type: string
          example: '{{token}}'
        - name: pestTreatmentTypeId
          in: query
          schema:
            type: integer
          example: '1'
        - name: cropId
          in: query
          schema:
            type: integer
          example: '4'
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /jchamale-ce426/us-central1/server/graphql:
    post:
      tags:
        - GraphQl
      summary: Pest with treatments resolver
      requestBody:
        content: {}
      security:
        - noauthAuth: []
      parameters:
        - name: Cache-Control
          in: header
          schema:
            type: string
          example: no-cache
        - name: Postman-Token
          in: header
          schema:
            type: string
          example: <calculated when request is sent>
        - name: Content-Type
          in: header
          schema:
            type: string
          example: application/json
        - name: Content-Length
          in: header
          schema:
            type: string
          example: <calculated when request is sent>
        - name: Host
          in: header
          schema:
            type: string
          example: <calculated when request is sent>
        - name: User-Agent
          in: header
          schema:
            type: string
          example: PostmanRuntime/7.32.1
        - name: Accept
          in: header
          schema:
            type: string
          example: '*/*'
        - name: Accept-Encoding
          in: header
          schema:
            type: string
          example: gzip, deflate, br
        - name: Connection
          in: header
          schema:
            type: string
          example: keep-alive
        - name: remote-auth
          in: header
          schema:
            type: string
          example: '{{token}}'
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
