openapi: 3.0.3
info:
  title: TIIX Permissions Sync
  version: 1.0.0
  description: Endpoints gerados para apoio operacional da governanca de permissoes.
  license:
    name: Uso interno
    url: https://dash.tiix.com.br/adm/api-docs
servers:
  - url: /adm/api
components:
  securitySchemes:
    cookieAuth:
      type: apiKey
      in: cookie
      name: wordpress_logged_in
security:
  - cookieAuth: []
paths:
  /Permissions/mySlugs:
    get:
      operationId: Permissions.mySlugs
      summary: Lista os slugs efetivos do usuario atual
      responses:
        '200':
          description: OK
        '400':
          description: Requisicao invalida
  /Permissions/scan:
    post:
      operationId: Permissions.scan
      summary: Recebe slugs detectados no front e retorna os que ainda nao existem
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                permissoes:
                  type: array
                  items:
                    type: object
                    properties:
                      slug:
                        type: string
                      tipo:
                        type: string
      responses:
        '200':
          description: OK
        '400':
          description: Requisicao invalida
  /Permissions/createBatch:
    post:
      operationId: Permissions.createBatch
      summary: Cria permissoes ausentes em lote
      responses:
        '200':
          description: OK
        '400':
          description: Requisicao invalida