> ## Documentation Index
> Fetch the complete documentation index at: https://andcze.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Zmień ustawienia AI Workspace



## OpenAPI

````yaml /openapi.pl.json patch /api/v2/shops/{shopId}/workspace
openapi: 3.0.0
info:
  title: ItemShop v2 API
  description: >-
    REST API platformy ItemShop v2 (NestJS + Fastify). Wszystkie ścieżki mają
    prefiks /api/v2.
  version: 2.0.0
  contact: {}
servers:
  - url: https://itemshop.dev
    description: Produkcja (API pod /api/v2, ten sam origin co panel)
  - url: http://localhost:3000
    description: Lokalnie
security: []
tags: []
paths:
  /api/v2/shops/{shopId}/workspace:
    patch:
      tags:
        - Workspace
      summary: Zmień ustawienia AI Workspace
      operationId: WorkspaceController_update
      parameters:
        - name: shopId
          required: true
          in: path
          schema:
            type: string
          description: ID sklepu (ObjectId)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateWorkspaceDto'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                  message:
                    type: string
        '400':
          description: Błędne dane wejściowe
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Brak/niepoprawne uwierzytelnienie
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Brak uprawnień / dostępu
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Nie znaleziono
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Przekroczony limit żądań
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    UpdateWorkspaceDto:
      type: object
      properties:
        agentId:
          type: string
          enum:
            - builtin
            - claude-code
            - codex
            - opencode
            - gemini-cli
            - cursor
            - windsurf
            - aider
            - generic
          description: Wybrany agent
        mcp:
          description: 'Kształt jak w GET: { toolGroups }'
          allOf:
            - $ref: '#/components/schemas/WorkspaceMcpPatchDto'
        toolGroups:
          description: Skrót dla mcp.toolGroups
          allOf:
            - $ref: '#/components/schemas/ToolGroupsDto'
        skills:
          maxItems: 30
          description: Włączone skille (id z GET /skills)
          type: array
          items:
            type: string
            maxLength: 64
            minLength: 1
        git:
          $ref: '#/components/schemas/WorkspaceGitPatchDto'
        publish:
          $ref: '#/components/schemas/PublishPolicyDto'
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        statusCode:
          type: integer
          example: 400
        error:
          type: string
          example: Komunikat błędu
        timestamp:
          type: string
          format: date-time
        path:
          type: string
          example: /api/v2/...
    WorkspaceMcpPatchDto:
      type: object
      properties:
        toolGroups:
          $ref: '#/components/schemas/ToolGroupsDto'
    ToolGroupsDto:
      type: object
      properties:
        site-files:
          enum:
            - 'off'
            - read
            - write
          type: string
          description: off | read | write
        builds:
          enum:
            - 'off'
            - read
            - write
          type: string
          description: off | read | write
        catalog:
          enum:
            - 'off'
            - read
            - write
          type: string
          description: off | read | write
        orders:
          enum:
            - 'off'
            - read
          type: string
        discounts:
          enum:
            - 'off'
            - read
            - write
          type: string
          description: off | read | write
        stats:
          enum:
            - 'off'
            - read
          type: string
        appearance:
          enum:
            - 'off'
            - read
            - write
          type: string
          description: off | read | write
    WorkspaceGitPatchDto:
      type: object
      properties:
        branch:
          type: string
          minLength: 1
          maxLength: 200
          description: Gałąź
          example: main
        autoDeploy:
          type: boolean
          description: Synchronizuj automatycznie po pushu
    PublishPolicyDto:
      type: object
      properties:
        previewOnCommit:
          type: boolean
        productionRequiresApproval:
          type: boolean
        autoPromoteFromGit:
          type: boolean
  securitySchemes:
    bearerAuth:
      scheme: bearer
      bearerFormat: JWT
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.