openapi: 3.0.0
info:
  title: Algolia Search
  version: 1.0.0
servers:
  - url: http://{{medusa_backend_url}}
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
tags:
  - name: Storefront
  - name: Admin
  - name: Admin > Auth
paths:
  /store/products/search:
    post:
      tags:
        - Storefront
      summary: Search Products
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                query: Shirt
      parameters:
        - name: x-publishable-api-key
          in: header
          schema:
            type: string
          example: '{{MEDUSA_PUBLISHABLE_API_KEY}}'
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /auth/user/emailpass:
    post:
      tags:
        - Admin > Auth
      summary: Login
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                email: admin@gmail.com
                password: supersecret
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /admin/algolia/sync:
    post:
      tags:
        - Admin
      summary: Sync Products
      requestBody:
        content: {}
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
