openapi: 3.0.0
info:
  title: Contentful Localization
  version: 1.0.0
servers:
  - url: http://{{backend_url}}
  - url: http://{{medusa_backend_url}}
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
tags:
  - name: Store
  - name: Admin
  - name: Admin > Auth
  - name: Webhook Listeners
paths:
  /store/products/{id}/{locale}:
    get:
      tags:
        - Store
      summary: Get Product Translation
      parameters:
        - name: x-publishable-api-key
          in: header
          schema:
            type: string
          example: '{{MEDUSA_PUBLISHABLE_API_KEY}}'
        - name: id
          in: path
          schema:
            type: string
          required: true
          example: prod_01JRSKZ7BJ7V5EMWM2PQFAWVAB
        - name: locale
          in: path
          schema:
            type: string
          required: true
          example: ar
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /store/locales:
    get:
      tags:
        - Store
      summary: Get Locales
      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/contentful/sync:
    post:
      tags:
        - Admin
      summary: Sync Contentful
      requestBody:
        content: {}
      security:
        - bearerAuth: []
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
  /hooks/contentful:
    post:
      tags:
        - Webhook Listeners
      summary: Contentful Update
      requestBody:
        content: {}
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
