{
 "openapi": "3.0.1",
 "info": {
  "title": "Automatyzacje API",
  "version": "2026-10-08",
  "description": "Skrypty automatyczne (AJS) i operacje automatyczne — odpowiednik akcji automatycznych BaseLinkera.\n\nAdres bazowy: `https://{instancja}-ajs-api.enterprise.sellrocket.pl` — `{instancja}` to nazwa Twojej instancji Sellrocket, którą otrzymasz przy jej uruchomieniu.\n\nWszystkie żądania wymagają nagłówka `Authorization: Bearer <token>` — zobacz [Uwierzytelnianie](../../start/uwierzytelnianie/).\n\n**Specyfikacja OpenAPI:** [automatyzacje.json](../../specs/automatyzacje.json) — do importu w Postmanie/Insomnii lub generowania klienta."
 },
 "servers": [
  {
   "url": "https://{instancja}-ajs-api.enterprise.sellrocket.pl",
   "variables": {
    "instancja": {
     "default": "twoja-instancja",
     "description": "Nazwa Twojej instancji Sellrocket"
    }
   }
  }
 ],
 "tags": [
  {
   "name": "Zadania asynchroniczne"
  },
  {
   "name": "Skrypty automatyczne"
  },
  {
   "name": "Grupy skryptów"
  },
  {
   "name": "Kreator operacji"
  },
  {
   "name": "Uruchomienia"
  },
  {
   "name": "Język skryptów (DSL)"
  },
  {
   "name": "Logi"
  }
 ],
 "paths": {
  "/api/v3/AjsAopsBuilder": {
   "post": {
    "tags": [
     "Kreator operacji"
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/CreateConfigRequestDTOv3"
         }
        ]
       }
      },
      "text/json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/CreateConfigRequestDTOv3"
         }
        ]
       }
      },
      "application/*+json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/CreateConfigRequestDTOv3"
         }
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success"
     }
    },
    "operationId": "post-ajsaopsbuilder",
    "summary": "Wygeneruj skrypt z konfiguracji kreatora",
    "description": "Tworzy skrypty automatyczne z konfiguracji kreatora operacji (wyzwalacz, warunki, akcje) – odpowiednik konfigurowania akcji automatycznych w BaseLinkerze. Używane głównie przez panel Sellrocket."
   }
  },
  "/api/v4/AjsAopsBuilder/CreateComplexConfig": {
   "post": {
    "tags": [
     "Kreator operacji"
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/CreateComplexConfigRequestDTO"
         }
        ]
       }
      },
      "text/json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/CreateComplexConfigRequestDTO"
         }
        ]
       }
      },
      "application/*+json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/CreateComplexConfigRequestDTO"
         }
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success"
     }
    },
    "operationId": "post-ajsaopsbuilder-createcomplexconfig",
    "summary": "Wygeneruj złożony skrypt z kreatora",
    "description": "Tworzy skrypt automatyczny z rozbudowanej konfiguracji kreatora (wiele grup warunków i akcji). Używane głównie przez panel Sellrocket."
   }
  },
  "/api/v4/AjsAopsBuilder/ImportBeelConfig": {
   "post": {
    "tags": [
     "Kreator operacji"
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/ImportBeelMacroRequestDTO"
         }
        ]
       }
      },
      "text/json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/ImportBeelMacroRequestDTO"
         }
        ]
       }
      },
      "application/*+json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/ImportBeelMacroRequestDTO"
         }
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "text/plain": {
        "schema": {
         "type": "array",
         "items": {
          "$ref": "#/components/schemas/ConfigResponseDTO"
         }
        }
       },
       "application/json": {
        "schema": {
         "type": "array",
         "items": {
          "$ref": "#/components/schemas/ConfigResponseDTO"
         }
        }
       },
       "text/json": {
        "schema": {
         "type": "array",
         "items": {
          "$ref": "#/components/schemas/ConfigResponseDTO"
         }
        }
       }
      }
     }
    },
    "operationId": "post-ajsaopsbuilder-importbeelconfig",
    "summary": "Importuj akcję automatyczną z BaseLinkera",
    "description": "Konwertuje definicję akcji automatycznej z BaseLinkera na konfigurację skryptu automatycznego Sellrocket. Przydatne przy migracji z BaseLinkera."
   }
  },
  "/api/v3/AjsAopsBuilder/ImportBeelConfig/ScopeCoverage/State": {
   "get": {
    "tags": [
     "Kreator operacji"
    ],
    "responses": {
     "200": {
      "description": "Success"
     }
    },
    "operationId": "get-ajsaopsbuilder-importbeelconfig-scopecoverage-state",
    "summary": "Pobierz zakres obsługi importu z BaseLinkera",
    "description": "Zwraca wyzwalacze, warunki, akcje i tagi akcji automatycznych BaseLinkera obsługiwane przez import. Pozwala sprawdzić przed migracją, co zostanie przeniesione."
   }
  },
  "/api/v3/AjsAopsBuilder/ImportBeelConfig/WellKnownMappings/Triggers": {
   "get": {
    "tags": [
     "Kreator operacji"
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "text/plain": {
        "schema": {
         "type": "object",
         "additionalProperties": {
          "type": "string"
         }
        }
       },
       "application/json": {
        "schema": {
         "type": "object",
         "additionalProperties": {
          "type": "string"
         }
        }
       },
       "text/json": {
        "schema": {
         "type": "object",
         "additionalProperties": {
          "type": "string"
         }
        }
       }
      }
     }
    },
    "operationId": "get-ajsaopsbuilder-importbeelconfig-wellknownmappings-triggers",
    "summary": "Pobierz mapowanie wyzwalaczy BaseLinkera",
    "description": "Zwraca mapowanie typów wyzwalaczy akcji automatycznych BaseLinkera na zdarzenia Sellrocket."
   }
  },
  "/api/v3/AjsAopsBuilder/ImportBeelConfigWithValidation": {
   "post": {
    "tags": [
     "Kreator operacji"
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/ImportBeelMacroRequestDTO"
         }
        ]
       }
      },
      "text/json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/ImportBeelMacroRequestDTO"
         }
        ]
       }
      },
      "application/*+json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/ImportBeelMacroRequestDTO"
         }
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success"
     }
    },
    "operationId": "post-ajsaopsbuilder-importbeelconfigwithvalidation",
    "summary": "Importuj akcję z BaseLinkera z walidacją",
    "description": "Wariant importu akcji automatycznej z BaseLinkera przeznaczony do weryfikacji konfiguracji przed jej zapisaniem."
   }
  },
  "/api/v1/automaticScripts": {
   "get": {
    "tags": [
     "Skrypty automatyczne"
    ],
    "summary": "Pobierz listę skryptów automatycznych",
    "parameters": [
     {
      "name": "offset",
      "in": "query",
      "description": "Number of automatic scripts to skip.",
      "style": "form",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 0
      }
     },
     {
      "name": "limit",
      "in": "query",
      "description": "Number of automatic scripts to take.",
      "style": "form",
      "schema": {
       "type": "integer",
       "format": "int32"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "text/plain": {
        "schema": {
         "type": "array",
         "items": {
          "$ref": "#/components/schemas/AutomaticScriptResponse"
         }
        }
       },
       "application/json": {
        "schema": {
         "type": "array",
         "items": {
          "$ref": "#/components/schemas/AutomaticScriptResponse"
         }
        }
       },
       "text/json": {
        "schema": {
         "type": "array",
         "items": {
          "$ref": "#/components/schemas/AutomaticScriptResponse"
         }
        }
       }
      }
     }
    },
    "operationId": "get-automaticscripts",
    "description": "Zwraca stronicowaną listę skryptów automatycznych wraz z kodem i konfiguracją – odpowiednik listy akcji automatycznych w BaseLinkerze."
   }
  },
  "/api/v3/automaticScripts": {
   "post": {
    "tags": [
     "Skrypty automatyczne"
    ],
    "summary": "Utwórz skrypt automatyczny",
    "requestBody": {
     "description": "Script to create.",
     "content": {
      "application/json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/CreateAutomaticScriptRequestV3"
         }
        ],
        "description": "Request for creating automatic script."
       }
      },
      "text/json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/CreateAutomaticScriptRequestV3"
         }
        ],
        "description": "Request for creating automatic script."
       }
      },
      "application/*+json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/CreateAutomaticScriptRequestV3"
         }
        ],
        "description": "Request for creating automatic script."
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/JobDto"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/JobDto"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/JobDto"
        }
       }
      }
     },
     "400": {
      "description": "Bad Request",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       }
      }
     }
    },
    "operationId": "post-automaticscripts",
    "description": "Tworzy nowy skrypt automatyczny. Operacja jest asynchroniczna – zwraca zadanie, którego stan sprawdzisz przez /api/jobs/get/{id}."
   }
  },
  "/api/v1/automaticScripts/{id}": {
   "get": {
    "tags": [
     "Skrypty automatyczne"
    ],
    "summary": "Pobierz skrypt automatyczny",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "description": "Id of the automatic script.",
      "required": true,
      "style": "simple",
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/AutomaticScript"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/AutomaticScript"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/AutomaticScript"
        }
       }
      }
     },
     "404": {
      "description": "Not Found",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       }
      }
     }
    },
    "operationId": "get-automaticscripts-id",
    "description": "Zwraca pełne dane skryptu automatycznego, w tym kod i ustawienia wyzwalacza."
   },
   "delete": {
    "tags": [
     "Skrypty automatyczne"
    ],
    "summary": "Usuń skrypt automatyczny",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "description": "Id of the automatic script.",
      "required": true,
      "style": "simple",
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/JobDto"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/JobDto"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/JobDto"
        }
       }
      }
     },
     "404": {
      "description": "Not Found",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       }
      }
     }
    },
    "operationId": "delete-automaticscripts-id",
    "description": "Usuwa skrypt automatyczny. Operacja asynchroniczna – zwraca zadanie."
   }
  },
  "/api/v3/automaticScripts/{id}": {
   "put": {
    "tags": [
     "Skrypty automatyczne"
    ],
    "summary": "Utwórz lub zastąp skrypt automatyczny",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "description": "Id of the automatic script to update.",
      "required": true,
      "style": "simple",
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     }
    ],
    "requestBody": {
     "description": "Automatic script to create or update.",
     "content": {
      "application/json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/UpdateAutomaticScriptRequestV3"
         }
        ],
        "description": "Request for updating the automatic script."
       }
      },
      "text/json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/UpdateAutomaticScriptRequestV3"
         }
        ],
        "description": "Request for updating the automatic script."
       }
      },
      "application/*+json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/UpdateAutomaticScriptRequestV3"
         }
        ],
        "description": "Request for updating the automatic script."
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/JobDto"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/JobDto"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/JobDto"
        }
       }
      }
     },
     "400": {
      "description": "Bad Request",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       }
      }
     }
    },
    "operationId": "put-automaticscripts-id",
    "description": "Tworzy skrypt o podanym identyfikatorze lub nadpisuje istniejący. Operacja asynchroniczna – zwraca zadanie."
   },
   "patch": {
    "tags": [
     "Skrypty automatyczne"
    ],
    "summary": "Zaktualizuj skrypt automatyczny",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "description": "Id of the automatic script to update",
      "required": true,
      "style": "simple",
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     }
    ],
    "requestBody": {
     "description": "Data that should be updated on automatic script.",
     "content": {
      "application/json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/UpdateAutomaticScriptRequestV3"
         }
        ],
        "description": "Request for updating the automatic script."
       }
      },
      "text/json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/UpdateAutomaticScriptRequestV3"
         }
        ],
        "description": "Request for updating the automatic script."
       }
      },
      "application/*+json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/UpdateAutomaticScriptRequestV3"
         }
        ],
        "description": "Request for updating the automatic script."
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/JobDto"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/JobDto"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/JobDto"
        }
       }
      }
     },
     "400": {
      "description": "Bad Request",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       }
      }
     },
     "404": {
      "description": "Not Found",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       }
      }
     }
    },
    "operationId": "patch-automaticscripts-id",
    "description": "Aktualizuje istniejący skrypt automatyczny. Operacja asynchroniczna – zwraca zadanie."
   }
  },
  "/api/v1/automaticScripts/{id}/header": {
   "get": {
    "tags": [
     "Skrypty automatyczne"
    ],
    "summary": "Pobierz nagłówek skryptu automatycznego",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "description": "Id of the automatic script.",
      "required": true,
      "style": "simple",
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/AutomaticScriptHeader"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/AutomaticScriptHeader"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/AutomaticScriptHeader"
        }
       }
      }
     },
     "404": {
      "description": "Not Found",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       }
      }
     }
    },
    "operationId": "get-automaticscripts-id-header",
    "description": "Zwraca podstawowe dane skryptu (m.in. nazwę, status, wyzwalacz) bez kodu źródłowego."
   }
  },
  "/api/v1/automaticScripts/{id}/runAsHttpFunction": {
   "get": {
    "tags": [
     "Skrypty automatyczne"
    ],
    "summary": "Wywołaj skrypt jako funkcję HTTP (GET)",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "description": "Id of the script to start.",
      "required": true,
      "style": "simple",
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     }
    ],
    "requestBody": {
     "description": "Parameters of the run. They will be passed to the script in object with name `data`.",
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": {
         "$ref": "#/components/schemas/JsonNode"
        }
       }
      },
      "text/json": {
       "schema": {
        "type": "object",
        "additionalProperties": {
         "$ref": "#/components/schemas/JsonNode"
        }
       }
      },
      "application/*+json": {
       "schema": {
        "type": "object",
        "additionalProperties": {
         "$ref": "#/components/schemas/JsonNode"
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "text/plain": {
        "schema": {
         "type": "integer",
         "format": "int64"
        }
       },
       "application/json": {
        "schema": {
         "type": "integer",
         "format": "int64"
        }
       },
       "text/json": {
        "schema": {
         "type": "integer",
         "format": "int64"
        }
       }
      }
     },
     "400": {
      "description": "Bad Request",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       }
      }
     },
     "404": {
      "description": "Not Found",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       }
      }
     }
    },
    "operationId": "get-automaticscripts-id-runashttpfunction",
    "description": "Uruchamia skrypt automatyczny jak endpoint HTTP i przekazuje mu dane żądania. Pozwala wywoływać skrypty z zewnętrznych systemów, np. jako odbiorcę webhooków."
   },
   "post": {
    "tags": [
     "Skrypty automatyczne"
    ],
    "summary": "Wywołaj skrypt jako funkcję HTTP (POST)",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "description": "Id of the script to start.",
      "required": true,
      "style": "simple",
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     }
    ],
    "requestBody": {
     "description": "Parameters of the run. They will be passed to the script in object with name `data`.",
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": {
         "$ref": "#/components/schemas/JsonNode"
        }
       }
      },
      "text/json": {
       "schema": {
        "type": "object",
        "additionalProperties": {
         "$ref": "#/components/schemas/JsonNode"
        }
       }
      },
      "application/*+json": {
       "schema": {
        "type": "object",
        "additionalProperties": {
         "$ref": "#/components/schemas/JsonNode"
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "text/plain": {
        "schema": {
         "type": "integer",
         "format": "int64"
        }
       },
       "application/json": {
        "schema": {
         "type": "integer",
         "format": "int64"
        }
       },
       "text/json": {
        "schema": {
         "type": "integer",
         "format": "int64"
        }
       }
      }
     },
     "400": {
      "description": "Bad Request",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       }
      }
     },
     "404": {
      "description": "Not Found",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       }
      }
     }
    },
    "operationId": "post-automaticscripts-id-runashttpfunction",
    "description": "Uruchamia skrypt automatyczny jak endpoint HTTP i przekazuje mu treść żądania (JSON). Pozwala wywoływać skrypty z zewnętrznych systemów, np. jako odbiorcę webhooków."
   }
  },
  "/api/v1/automaticScripts/headers": {
   "get": {
    "tags": [
     "Skrypty automatyczne"
    ],
    "summary": "Pobierz listę nagłówków skryptów",
    "parameters": [
     {
      "name": "offset",
      "in": "query",
      "description": "Number of automatic scripts to skip.",
      "style": "form",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 0
      }
     },
     {
      "name": "limit",
      "in": "query",
      "description": "Number of automatic scripts to take.",
      "style": "form",
      "schema": {
       "type": "integer",
       "format": "int32"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "text/plain": {
        "schema": {
         "type": "array",
         "items": {
          "$ref": "#/components/schemas/AutomaticScriptHeader"
         }
        }
       },
       "application/json": {
        "schema": {
         "type": "array",
         "items": {
          "$ref": "#/components/schemas/AutomaticScriptHeader"
         }
        }
       },
       "text/json": {
        "schema": {
         "type": "array",
         "items": {
          "$ref": "#/components/schemas/AutomaticScriptHeader"
         }
        }
       }
      }
     }
    },
    "operationId": "get-automaticscripts-headers",
    "description": "Zwraca stronicowaną listę skryptów bez kodu źródłowego – lżejsza alternatywa dla pełnej listy skryptów."
   }
  },
  "/api/v1/automaticScripts/name/{name}": {
   "get": {
    "tags": [
     "Skrypty automatyczne"
    ],
    "summary": "Pobierz skrypt automatyczny po nazwie",
    "parameters": [
     {
      "name": "name",
      "in": "path",
      "description": "Name of the automatic script.",
      "required": true,
      "style": "simple",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/AutomaticScript"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/AutomaticScript"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/AutomaticScript"
        }
       }
      }
     },
     "404": {
      "description": "Not Found",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       }
      }
     }
    },
    "operationId": "get-automaticscripts-name-name",
    "description": "Zwraca skrypt automatyczny o podanej nazwie."
   }
  },
  "/api/v3/automaticScripts/patch/{id}": {
   "patch": {
    "tags": [
     "Skrypty automatyczne"
    ],
    "summary": "Zmień wybrane pola skryptu",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "description": "Id of the automatic script to update",
      "required": true,
      "style": "simple",
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     }
    ],
    "requestBody": {
     "description": "Patch that should be applied on the automatic script.",
     "content": {
      "application/json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/AutomaticScriptPatchRequestPayload"
         }
        ]
       }
      },
      "text/json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/AutomaticScriptPatchRequestPayload"
         }
        ]
       }
      },
      "application/*+json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/AutomaticScriptPatchRequestPayload"
         }
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/AutomaticScript"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/AutomaticScript"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/AutomaticScript"
        }
       }
      }
     },
     "400": {
      "description": "Bad Request",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       }
      }
     },
     "404": {
      "description": "Not Found",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       }
      }
     }
    },
    "operationId": "patch-automaticscripts-patch-id",
    "description": "Częściowo aktualizuje wskazane pola skryptu i od razu zwraca jego aktualny stan (bez zadania asynchronicznego)."
   }
  },
  "/api/v3/automaticScripts/start_batch": {
   "post": {
    "tags": [
     "Skrypty automatyczne"
    ],
    "summary": "Uruchom skrypt dla wielu obiektów",
    "requestBody": {
     "description": "Parameters of the run. They will be passed to the script in object with name `data`.",
     "content": {
      "application/json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/AjsRunBatchPayload"
         }
        ]
       }
      },
      "text/json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/AjsRunBatchPayload"
         }
        ]
       }
      },
      "application/*+json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/AjsRunBatchPayload"
         }
        ]
       }
      }
     }
    },
    "responses": {
     "202": {
      "description": "Accepted",
      "content": {
       "text/plain": {
        "schema": {
         "type": "integer",
         "format": "int64"
        }
       },
       "application/json": {
        "schema": {
         "type": "integer",
         "format": "int64"
        }
       },
       "text/json": {
        "schema": {
         "type": "integer",
         "format": "int64"
        }
       }
      }
     },
     "400": {
      "description": "Bad Request",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       }
      }
     },
     "404": {
      "description": "Not Found",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       }
      }
     },
     "428": {
      "description": "Client Error",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/RunBatchScriptsRequirementsReponse"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/RunBatchScriptsRequirementsReponse"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/RunBatchScriptsRequirementsReponse"
        }
       }
      }
     }
    },
    "operationId": "post-automaticscripts-startbatch",
    "description": "Uruchamia skrypt wsadowo dla wielu obiektów (np. zamówień); postęp śledzisz przez /api/runs/batchProgress/{id}. Odpowiednik ręcznego uruchomienia akcji dla zaznaczonych zamówień w BaseLinkerze."
   }
  },
  "/api/v3/automaticScripts/start-with-config/{id}": {
   "post": {
    "tags": [
     "Skrypty automatyczne"
    ],
    "summary": "Uruchom skrypt z własnymi danymi wejściowymi",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "description": "Id of the script to start.",
      "required": true,
      "style": "simple",
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     }
    ],
    "requestBody": {
     "description": "Parameters of the run. They will be passed to the script in object with name `data`.",
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": {
         "$ref": "#/components/schemas/JsonNode"
        }
       }
      },
      "text/json": {
       "schema": {
        "type": "object",
        "additionalProperties": {
         "$ref": "#/components/schemas/JsonNode"
        }
       }
      },
      "application/*+json": {
       "schema": {
        "type": "object",
        "additionalProperties": {
         "$ref": "#/components/schemas/JsonNode"
        }
       }
      }
     }
    },
    "responses": {
     "202": {
      "description": "Accepted",
      "content": {
       "text/plain": {
        "schema": {
         "type": "integer",
         "format": "int64"
        }
       },
       "application/json": {
        "schema": {
         "type": "integer",
         "format": "int64"
        }
       },
       "text/json": {
        "schema": {
         "type": "integer",
         "format": "int64"
        }
       }
      }
     },
     "400": {
      "description": "Bad Request",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       }
      }
     },
     "404": {
      "description": "Not Found",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       }
      }
     }
    },
    "operationId": "post-automaticscripts-start-with-config-id",
    "description": "Uruchamia skrypt ręcznie, przekazując dowolny JSON jako konfigurację tego uruchomienia."
   }
  },
  "/api/v3/automaticScripts/start/{id}": {
   "post": {
    "tags": [
     "Skrypty automatyczne"
    ],
    "summary": "Uruchom skrypt ręcznie",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "description": "Id of the script to start.",
      "required": true,
      "style": "simple",
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     }
    ],
    "requestBody": {
     "description": "Parameters of the run. They will be passed to the script in object with name `data`.",
     "content": {
      "application/json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/AjsRunScriptPayload"
         }
        ]
       }
      },
      "text/json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/AjsRunScriptPayload"
         }
        ]
       }
      },
      "application/*+json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/AjsRunScriptPayload"
         }
        ]
       }
      }
     }
    },
    "responses": {
     "202": {
      "description": "Accepted",
      "content": {
       "text/plain": {
        "schema": {
         "type": "integer",
         "format": "int64"
        }
       },
       "application/json": {
        "schema": {
         "type": "integer",
         "format": "int64"
        }
       },
       "text/json": {
        "schema": {
         "type": "integer",
         "format": "int64"
        }
       }
      }
     },
     "400": {
      "description": "Bad Request",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       }
      }
     },
     "404": {
      "description": "Not Found",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       }
      }
     }
    },
    "operationId": "post-automaticscripts-start-id",
    "description": "Uruchamia skrypt automatyczny na żądanie dla wskazanego obiektu, niezależnie od jego wyzwalacza."
   }
  },
  "/api/v3/dsl/getSupportedObjects": {
   "get": {
    "tags": [
     "Język skryptów (DSL)"
    ],
    "summary": "Pobierz obiekty dostępne w skryptach",
    "parameters": [
     {
      "name": "type",
      "in": "query",
      "description": "Object type.",
      "style": "form",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/AutomaticScript"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/AutomaticScript"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/AutomaticScript"
        }
       }
      }
     },
     "404": {
      "description": "Not Found",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       }
      }
     }
    },
    "operationId": "get-dsl-getsupportedobjects",
    "description": "Zwraca obiekty i pola, z których można korzystać w skryptach automatycznych danego typu. Przydatne przy pisaniu własnych skryptów."
   }
  },
  "/api/groups": {
   "get": {
    "tags": [
     "Grupy skryptów"
    ],
    "parameters": [
     {
      "name": "offset",
      "in": "query",
      "style": "form",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 0
      }
     },
     {
      "name": "limit",
      "in": "query",
      "style": "form",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 100
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "array",
         "items": {
          "$ref": "#/components/schemas/AjsGroup"
         }
        }
       }
      }
     }
    },
    "operationId": "get-groups",
    "summary": "Pobierz listę grup skryptów",
    "description": "Zwraca grupy służące do porządkowania skryptów automatycznych."
   },
   "post": {
    "tags": [
     "Grupy skryptów"
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/AjsGroup"
         }
        ]
       }
      },
      "text/json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/AjsGroup"
         }
        ]
       }
      },
      "application/*+json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/AjsGroup"
         }
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/JobDto"
        }
       }
      }
     },
     "400": {
      "description": "Bad Request",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       }
      }
     }
    },
    "operationId": "post-groups",
    "summary": "Utwórz grupę skryptów",
    "description": "Tworzy grupę do porządkowania skryptów automatycznych. Zwraca zadanie asynchroniczne."
   }
  },
  "/api/groups/{id}": {
   "get": {
    "tags": [
     "Grupy skryptów"
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "style": "simple",
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/AjsGroup"
        }
       }
      }
     }
    },
    "operationId": "get-groups-id",
    "summary": "Pobierz grupę skryptów"
   },
   "put": {
    "tags": [
     "Grupy skryptów"
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "style": "simple",
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/AjsGroup"
         }
        ]
       }
      },
      "text/json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/AjsGroup"
         }
        ]
       }
      },
      "application/*+json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/AjsGroup"
         }
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/JobDto"
        }
       }
      }
     },
     "400": {
      "description": "Bad Request",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       }
      }
     }
    },
    "operationId": "put-groups-id",
    "summary": "Zaktualizuj grupę skryptów",
    "description": "Zmienia dane grupy skryptów. Zwraca zadanie asynchroniczne."
   },
   "delete": {
    "tags": [
     "Grupy skryptów"
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "style": "simple",
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/AjsGroup"
        }
       }
      }
     },
     "422": {
      "description": "Client Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       }
      }
     }
    },
    "operationId": "delete-groups-id",
    "summary": "Usuń grupę skryptów"
   }
  },
  "/api/jobs/get/{id}": {
   "get": {
    "tags": [
     "Zadania asynchroniczne"
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "style": "simple",
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/JobDto"
        }
       }
      }
     }
    },
    "operationId": "get-jobs-get-id",
    "summary": "Pobierz stan zadania dotyczącego skryptów",
    "description": "Zwraca status zadania asynchronicznego zwróconego przy tworzeniu, edycji lub usuwaniu skryptów i grup."
   }
  },
  "/api/jobs/list": {
   "get": {
    "tags": [
     "Zadania asynchroniczne"
    ],
    "parameters": [
     {
      "name": "status",
      "in": "query",
      "style": "form",
      "schema": {
       "allOf": [
        {
         "$ref": "#/components/schemas/JobStatusEnum"
        }
       ]
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "application/json": {
        "schema": {
         "type": "array",
         "items": {
          "$ref": "#/components/schemas/JobDto"
         }
        }
       }
      }
     }
    },
    "operationId": "get-jobs-list",
    "summary": "Pobierz listę zadań dotyczących skryptów",
    "description": "Zwraca zadania asynchroniczne modułu skryptów, filtrowane po statusie."
   }
  },
  "/api/v1/logs": {
   "get": {
    "tags": [
     "Logi"
    ],
    "summary": "Pobierz logi skryptów automatycznych",
    "parameters": [
     {
      "name": "offset",
      "in": "query",
      "description": "Number of logs to skip.",
      "style": "form",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 0
      }
     },
     {
      "name": "limit",
      "in": "query",
      "description": "Number of logs to take.",
      "style": "form",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 100
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/LogResponsePage"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/LogResponsePage"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/LogResponsePage"
        }
       }
      }
     },
     "400": {
      "description": "Bad Request",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       }
      }
     }
    },
    "operationId": "get-logs",
    "description": "Zwraca stronicowane logi ze wszystkich uruchomień skryptów."
   }
  },
  "/api/v1/runs": {
   "get": {
    "tags": [
     "Uruchomienia"
    ],
    "summary": "Pobierz listę uruchomień skryptów",
    "parameters": [
     {
      "name": "offset",
      "in": "query",
      "description": "Number of runs to skip.",
      "style": "form",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 0
      }
     },
     {
      "name": "limit",
      "in": "query",
      "description": "Number of runs to take.",
      "style": "form",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 100
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/RunResponsePage"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/RunResponsePage"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/RunResponsePage"
        }
       }
      }
     }
    },
    "operationId": "get-runs",
    "description": "Zwraca stronicowaną listę uruchomień skryptów automatycznych niezależnie od ich stanu."
   }
  },
  "/api/v3/runs/{id}": {
   "get": {
    "tags": [
     "Uruchomienia"
    ],
    "summary": "Pobierz szczegóły uruchomienia skryptu",
    "operationId": "get-runs-id",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "description": "Id of the run.",
      "required": true,
      "style": "simple",
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/RunResponseV2"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/RunResponseV2"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/RunResponseV2"
        }
       }
      }
     },
     "404": {
      "description": "Not Found",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/runs/{id}/logs": {
   "get": {
    "tags": [
     "Uruchomienia"
    ],
    "summary": "Pobierz logi uruchomienia skryptu",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "description": "Id of the run.",
      "required": true,
      "style": "simple",
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     },
     {
      "name": "offset",
      "in": "query",
      "description": "Number of logs to skip.",
      "style": "form",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 0
      }
     },
     {
      "name": "limit",
      "in": "query",
      "description": "Number of logs to take.",
      "style": "form",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 100
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/LogResponsePage"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/LogResponsePage"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/LogResponsePage"
        }
       }
      }
     },
     "400": {
      "description": "Bad Request",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       }
      }
     }
    },
    "operationId": "get-runs-id-logs",
    "description": "Zwraca logi wygenerowane podczas wskazanego uruchomienia – przydatne przy diagnozowaniu błędów skryptu."
   }
  },
  "/api/v1/runs/{id}/stop": {
   "post": {
    "tags": [
     "Uruchomienia"
    ],
    "summary": "Zatrzymaj uruchomienie skryptu",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "description": "Id of the run to stop.",
      "required": true,
      "style": "simple",
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/RunResponse"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/RunResponse"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/RunResponse"
        }
       }
      }
     },
     "400": {
      "description": "Bad Request",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       }
      }
     },
     "404": {
      "description": "Not Found",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       }
      }
     }
    },
    "operationId": "post-runs-id-stop",
    "description": "Wymusza zatrzymanie trwającego uruchomienia skryptu."
   }
  },
  "/api/v3/runs/batchProgress/{id}": {
   "get": {
    "tags": [
     "Uruchomienia"
    ],
    "summary": "Pobierz postęp uruchomienia wsadowego",
    "operationId": "get-runs-batchprogress-id",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "description": "The id of the run correlated with batch.",
      "required": true,
      "style": "simple",
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/BatchProgressResponse"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/BatchProgressResponse"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/BatchProgressResponse"
        }
       }
      }
     }
    },
    "description": "Zwraca postęp uruchomienia rozpoczętego przez /api/automaticScripts/start_batch."
   }
  },
  "/api/v1/runs/ended": {
   "get": {
    "tags": [
     "Uruchomienia"
    ],
    "summary": "Pobierz zakończone uruchomienia",
    "parameters": [
     {
      "name": "offset",
      "in": "query",
      "description": "Number of runs to skip.",
      "style": "form",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 0
      }
     },
     {
      "name": "limit",
      "in": "query",
      "description": "Number of runs to take.",
      "style": "form",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 100
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/RunResponsePage"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/RunResponsePage"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/RunResponsePage"
        }
       }
      }
     }
    },
    "operationId": "get-runs-ended",
    "description": "Zwraca uruchomienia zakończone poprawnie oraz zatrzymane wymuszenie."
   }
  },
  "/api/v1/runs/finished": {
   "get": {
    "tags": [
     "Uruchomienia"
    ],
    "summary": "Pobierz uruchomienia zakończone poprawnie",
    "parameters": [
     {
      "name": "offset",
      "in": "query",
      "description": "Number of runs to skip.",
      "style": "form",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 0
      }
     },
     {
      "name": "limit",
      "in": "query",
      "description": "Number of runs to take.",
      "style": "form",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 100
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/RunResponsePage"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/RunResponsePage"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/RunResponsePage"
        }
       }
      }
     }
    },
    "operationId": "get-runs-finished",
    "description": "Zwraca uruchomienia, które zakończyły się normalnie (bez wymuszonego zatrzymania)."
   }
  },
  "/api/v3/runs/finished/{id}": {
   "get": {
    "tags": [
     "Uruchomienia"
    ],
    "summary": "Pobierz poprawnie zakończone uruchomienie",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "description": "The id of the finished run to get.",
      "required": true,
      "style": "simple",
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/RunResponse"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/RunResponse"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/RunResponse"
        }
       }
      }
     }
    },
    "operationId": "get-runs-finished-id",
    "description": "Zwraca uruchomienie o podanym identyfikatorze, jeśli zakończyło się normalnie."
   }
  },
  "/api/v1/runs/history/{orderId}": {
   "get": {
    "tags": [
     "Uruchomienia"
    ],
    "summary": "Pobierz historię skryptów dla zamówienia",
    "parameters": [
     {
      "name": "orderId",
      "in": "path",
      "description": "Id of the run.",
      "required": true,
      "style": "simple",
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     },
     {
      "name": "offset",
      "in": "query",
      "description": "Number of logs to skip.",
      "style": "form",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 0
      }
     },
     {
      "name": "limit",
      "in": "query",
      "description": "Number of logs to take.",
      "style": "form",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 100
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/HistoryEntryPage"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HistoryEntryPage"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/HistoryEntryPage"
        }
       }
      }
     },
     "400": {
      "description": "Bad Request",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       }
      }
     }
    },
    "operationId": "get-runs-history-orderid",
    "description": "Zwraca historię uruchomień skryptów automatycznych dotyczących wskazanego zamówienia."
   }
  },
  "/api/v1/runs/history/return/{returnId}": {
   "get": {
    "tags": [
     "Uruchomienia"
    ],
    "summary": "Pobierz historię skryptów dla zwrotu",
    "parameters": [
     {
      "name": "returnId",
      "in": "path",
      "description": "Id of the return.",
      "required": true,
      "style": "simple",
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     },
     {
      "name": "offset",
      "in": "query",
      "description": "Number of runs to skip.",
      "style": "form",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 0
      }
     },
     {
      "name": "limit",
      "in": "query",
      "description": "Number of runs to take.",
      "style": "form",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 100
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/HistoryEntryPage"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HistoryEntryPage"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/HistoryEntryPage"
        }
       }
      }
     },
     "400": {
      "description": "Bad Request",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       }
      }
     }
    },
    "operationId": "get-runs-history-return-returnid",
    "description": "Zwraca historię uruchomień skryptów automatycznych dotyczących wskazanego zwrotu."
   }
  },
  "/api/v1/runs/notStarted": {
   "get": {
    "tags": [
     "Uruchomienia"
    ],
    "summary": "Pobierz uruchomienia oczekujące na start",
    "parameters": [
     {
      "name": "offset",
      "in": "query",
      "description": "Number of runs to skip.",
      "style": "form",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 0
      }
     },
     {
      "name": "limit",
      "in": "query",
      "description": "Number of runs to take.",
      "style": "form",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 100
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/RunResponsePage"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/RunResponsePage"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/RunResponsePage"
        }
       }
      }
     }
    },
    "operationId": "get-runs-notstarted"
   }
  },
  "/api/v1/runs/running": {
   "get": {
    "tags": [
     "Uruchomienia"
    ],
    "summary": "Pobierz trwające uruchomienia",
    "parameters": [
     {
      "name": "offset",
      "in": "query",
      "description": "Number of runs to skip.",
      "style": "form",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 0
      }
     },
     {
      "name": "limit",
      "in": "query",
      "description": "Number of runs to take.",
      "style": "form",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 100
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/RunResponsePage"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/RunResponsePage"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/RunResponsePage"
        }
       }
      }
     }
    },
    "operationId": "get-runs-running"
   }
  },
  "/api/v1/runs/stopped": {
   "get": {
    "tags": [
     "Uruchomienia"
    ],
    "summary": "Pobierz uruchomienia zatrzymane wymuszenie",
    "parameters": [
     {
      "name": "offset",
      "in": "query",
      "description": "Number of runs to skip.",
      "style": "form",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 0
      }
     },
     {
      "name": "limit",
      "in": "query",
      "description": "Number of runs to take.",
      "style": "form",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 100
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Success",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/RunResponsePage"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/RunResponsePage"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/RunResponsePage"
        }
       }
      }
     }
    },
    "operationId": "get-runs-stopped",
    "description": "Zwraca uruchomienia przerwane np. przez /api/runs/{id}/stop."
   }
  }
 },
 "components": {
  "schemas": {
   "ActionDTOv2": {
    "required": [
     "command",
     "parameters"
    ],
    "type": "object",
    "properties": {
     "command": {
      "allOf": [
       {
        "$ref": "#/components/schemas/ScriptsActionsEnum"
       }
      ]
     },
     "parameters": {
      "type": "object",
      "additionalProperties": {
       "$ref": "#/components/schemas/JsonNode"
      }
     },
     "onErrorCancelSubsequentActionsExecution": {
      "type": "boolean"
     }
    },
    "additionalProperties": false
   },
   "ActionsDTOv3": {
    "required": [
     "actions"
    ],
    "type": "object",
    "properties": {
     "data": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/DataDTO"
      },
      "nullable": true
     },
     "condition": {
      "allOf": [
       {
        "$ref": "#/components/schemas/ConditionDTOv3"
       }
      ],
      "nullable": true
     },
     "actions": {
      "type": "array",
      "items": {
       "oneOf": [
        {
         "$ref": "#/components/schemas/ActionDTOv2"
        },
        {
         "$ref": "#/components/schemas/UpdateOrderStatusActionDTO"
        },
        {
         "$ref": "#/components/schemas/CommandActionDTO"
        },
        {
         "$ref": "#/components/schemas/UpdateOrderActionDTO"
        },
        {
         "$ref": "#/components/schemas/InsertOrderSellerCommentActionDTO"
        },
        {
         "$ref": "#/components/schemas/InsertOrderBuyerCommentActionDTO"
        },
        {
         "$ref": "#/components/schemas/CallUrlActionDTO"
        },
        {
         "$ref": "#/components/schemas/SendEmailActionDTO"
        },
        {
         "$ref": "#/components/schemas/UpdateOrderLineItemsTaxRatesActionDTO"
        },
        {
         "$ref": "#/components/schemas/UpdateOrderPaymentStatusActionDTO"
        }
       ]
      }
     }
    },
    "additionalProperties": false
   },
   "AjsGroup": {
    "type": "object",
    "properties": {
     "id": {
      "type": "integer",
      "format": "int64"
     },
     "name": {
      "type": "string",
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "AutomaticScript": {
    "type": "object",
    "properties": {
     "id": {
      "type": "integer",
      "format": "int64"
     },
     "name": {
      "type": "string",
      "nullable": true
     },
     "body": {
      "type": "string",
      "nullable": true
     },
     "groupId": {
      "type": "integer",
      "format": "int64"
     },
     "priority": {
      "type": "integer",
      "format": "int64"
     },
     "delaySeconds": {
      "type": "integer",
      "format": "int64"
     },
     "inputDataSchema": {
      "nullable": true
     },
     "inputUiSchema": {
      "description": " (absent ⇒ property omitted)",
      "nullable": true
     },
     "inputDataDefaultsScriptId": {
      "type": "integer",
      "description": " (absent ⇒ property omitted)",
      "format": "int64",
      "nullable": true
     },
     "type": {
      "allOf": [
       {
        "$ref": "#/components/schemas/AutomaticScriptTypeEnum"
       }
      ],
      "nullable": true
     },
     "updatedAt": {
      "type": "string",
      "format": "date-time",
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "AutomaticScriptHeader": {
    "type": "object",
    "properties": {
     "id": {
      "type": "integer",
      "format": "int64"
     },
     "name": {
      "type": "string",
      "nullable": true
     },
     "groupId": {
      "type": "integer",
      "format": "int64"
     },
     "groupName": {
      "type": "string",
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "AutomaticScriptResponse": {
    "type": "object",
    "properties": {
     "id": {
      "type": "integer",
      "format": "int64"
     },
     "name": {
      "type": "string",
      "nullable": true
     },
     "body": {
      "type": "string",
      "nullable": true
     },
     "groupId": {
      "type": "integer",
      "format": "int64"
     },
     "groupName": {
      "type": "string",
      "nullable": true
     },
     "priority": {
      "type": "integer",
      "format": "int64"
     },
     "delaySeconds": {
      "type": "integer",
      "format": "int64"
     },
     "inputDataSchema": {
      "nullable": true
     },
     "type": {
      "allOf": [
       {
        "$ref": "#/components/schemas/AutomaticScriptTypeEnum"
       }
      ],
      "nullable": true
     },
     "updatedAt": {
      "type": "string",
      "format": "date-time",
      "nullable": true
     },
     "lastRun": {
      "type": "string",
      "format": "date-time",
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "AutomaticScriptTypeEnum": {
    "enum": [
     "AutomaticScript",
     "AutomaticAction"
    ],
    "type": "string"
   },
   "BeelMacroConditionDTO": {
    "required": [
     "type"
    ],
    "type": "object",
    "properties": {
     "type": {
      "minLength": 1,
      "type": "string"
     },
     "data": {
      "allOf": [
       {
        "$ref": "#/components/schemas/JsonNode"
       }
      ],
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "BeelMacroConfigDTO": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "nullable": true
     },
     "isEnabled": {
      "type": "string",
      "nullable": true
     },
     "groupId": {
      "type": "string",
      "nullable": true
     },
     "groupName": {
      "type": "string",
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "BeelMacroTaskDTO": {
    "required": [
     "type"
    ],
    "type": "object",
    "properties": {
     "type": {
      "minLength": 1,
      "type": "string"
     },
     "data": {
      "allOf": [
       {
        "$ref": "#/components/schemas/JsonNode"
       }
      ],
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "BeelMacroTriggerDTO": {
    "type": "object",
    "properties": {
     "eventName": {
      "type": "string",
      "nullable": true
     },
     "customEventId": {
      "type": "string",
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "CallUrlActionDTO": {
    "required": [
     "command",
     "parameters"
    ],
    "type": "object",
    "properties": {
     "command": {
      "allOf": [
       {
        "$ref": "#/components/schemas/ScriptsActionsEnum"
       }
      ]
     },
     "parameters": {
      "allOf": [
       {
        "$ref": "#/components/schemas/CallUrlActionParametersDTO"
       }
      ]
     }
    },
    "additionalProperties": false
   },
   "CallUrlActionParametersDTO": {
    "required": [
     "url"
    ],
    "type": "object",
    "properties": {
     "url": {
      "minLength": 1,
      "type": "string"
     },
     "useRetries": {
      "type": "boolean",
      "nullable": true
     },
     "breakOnFail": {
      "type": "boolean",
      "nullable": true
     },
     "breakOnFailTrigger": {
      "type": "integer",
      "format": "int64",
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "CommandActionDTO": {
    "required": [
     "command",
     "parameters"
    ],
    "type": "object",
    "properties": {
     "command": {
      "allOf": [
       {
        "$ref": "#/components/schemas/ScriptsActionsEnum"
       }
      ]
     },
     "parameters": {
      "allOf": [
       {
        "$ref": "#/components/schemas/CommandActionParametersDTO"
       }
      ]
     }
    },
    "additionalProperties": false
   },
   "CommandActionParametersDTO": {
    "type": "object",
    "additionalProperties": false
   },
   "ConditionDTOv3": {
    "type": "object",
    "properties": {
     "type": {
      "allOf": [
       {
        "$ref": "#/components/schemas/ConditionV3TypeEnum"
       }
      ]
     },
     "leftOperand": {
      "type": "string",
      "nullable": true
     },
     "rightOperand": {
      "type": "string",
      "nullable": true
     },
     "operator": {
      "allOf": [
       {
        "$ref": "#/components/schemas/ConditionOperatorEnum"
       }
      ],
      "nullable": true
     },
     "inner": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/ConditionDTOv3"
      },
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "ConditionOperatorEnum": {
    "enum": [
     "Equals",
     "NotEquals",
     "ContainsTextCaseSensitive",
     "ContainsTextCaseInsensitive",
     "ArrayContains",
     "ArrayNotContains",
     "InArray",
     "NotInArray",
     "GreaterThan",
     "GreaterThanOrEqual",
     "LessThan",
     "LessThanOrEqual",
     "DateTimeEquals",
     "DateTimeNotEquals",
     "DateTimeGreaterThan",
     "DateTimeGreaterThanOrEqual",
     "DateTimeLessThan",
     "DateTimeLessThanOrEqual",
     "DateTimeIsOlderThan",
     "DateTimeIsOlderThanOrEqual",
     "DateTimeIsNewerThan",
     "DateTimeIsNewerThanOrEqual",
     "DateTimeIsOlderThanExcludingWeekends",
     "CompareTextCaseInsensitive",
     "TextStartsWithCaseInsensitive",
     "TextEndsWithCaseInsensitive",
     "IsArrayAndNotEmpty",
     "NotContainsTextCaseSensitive",
     "NotContainsTextCaseInsensitive",
     "EqualsCaseInsensitive",
     "NotEqualsCaseInsensitive",
     "Match",
     "DateTimeIsOlderByNoMoreThanOneDay",
     "DateTimeIsOlderByNoMoreThanOneDayExcludingWeekends"
    ],
    "type": "string"
   },
   "ConditionV3TypeEnum": {
    "enum": [
     "Single",
     "And",
     "Or"
    ],
    "type": "string"
   },
   "CreateConfigRequestDTOv3": {
    "required": [
     "actions",
     "context",
     "trigger"
    ],
    "type": "object",
    "properties": {
     "context": {
      "allOf": [
       {
        "$ref": "#/components/schemas/ScriptsContextsEnum"
       }
      ]
     },
     "trigger": {
      "allOf": [
       {
        "$ref": "#/components/schemas/TriggerDTOv3"
       }
      ]
     },
     "actions": {
      "allOf": [
       {
        "$ref": "#/components/schemas/ActionsDTOv3"
       }
      ]
     }
    },
    "additionalProperties": false
   },
   "DataDTO": {
    "type": "object",
    "properties": {
     "command": {
      "allOf": [
       {
        "$ref": "#/components/schemas/DataFunctionEnum"
       }
      ],
      "nullable": true
     },
     "input": {
      "type": "string",
      "nullable": true
     },
     "output": {
      "type": "string",
      "nullable": true
     },
     "parameters": {
      "type": "object",
      "additionalProperties": {
       "$ref": "#/components/schemas/JsonNode"
      },
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "DataFunctionEnum": {
    "enum": [
     "NewConst",
     "Reduce",
     "TemplateFromOrder",
     "LookupOrders",
     "PimPackingPack",
     "PimPackingFitList",
     "CheckViesStatus",
     "PimPackingBestCardboardFromAllContainers"
    ],
    "type": "string"
   },
   "HistoryEntry": {
    "type": "object",
    "properties": {
     "id": {
      "type": "integer",
      "format": "int64"
     },
     "runStatus": {
      "allOf": [
       {
        "$ref": "#/components/schemas/RunStatus"
       }
      ]
     },
     "startTime": {
      "type": "string",
      "format": "date-time"
     },
     "duration": {
      "type": "number",
      "format": "double"
     },
     "scriptId": {
      "type": "integer",
      "format": "int64",
      "nullable": true
     },
     "scriptName": {
      "type": "string",
      "nullable": true
     },
     "triggerName": {
      "type": "string",
      "nullable": true
     },
     "error": {
      "type": "array",
      "items": {
       "type": "string"
      },
      "nullable": true
     },
     "runParameters": {
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "HistoryEntryPage": {
    "type": "object",
    "properties": {
     "list": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/HistoryEntry"
      },
      "nullable": true
     },
     "pageNumber": {
      "type": "integer",
      "format": "int32"
     },
     "total": {
      "type": "integer",
      "format": "int32"
     }
    },
    "additionalProperties": false
   },
   "ImportBeelMacroRequestDTO": {
    "required": [
     "actions",
     "conditions",
     "trigger"
    ],
    "type": "object",
    "properties": {
     "trigger": {
      "allOf": [
       {
        "$ref": "#/components/schemas/BeelMacroTriggerDTO"
       }
      ]
     },
     "conditions": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/BeelMacroConditionDTO"
      }
     },
     "actions": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/BeelMacroTaskDTO"
      }
     },
     "config": {
      "allOf": [
       {
        "$ref": "#/components/schemas/BeelMacroConfigDTO"
       }
      ],
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "InsertOrderBuyerCommentActionDTO": {
    "required": [
     "command"
    ],
    "type": "object",
    "properties": {
     "command": {
      "allOf": [
       {
        "$ref": "#/components/schemas/ScriptsActionsEnum"
       }
      ]
     },
     "parameters": {
      "allOf": [
       {
        "$ref": "#/components/schemas/InsertOrderBuyerCommentParametersDTO"
       }
      ],
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "InsertOrderBuyerCommentParametersDTO": {
    "required": [
     "comment"
    ],
    "type": "object",
    "properties": {
     "comment": {
      "type": "string"
     }
    },
    "additionalProperties": false
   },
   "InsertOrderSellerCommentActionDTO": {
    "required": [
     "command"
    ],
    "type": "object",
    "properties": {
     "command": {
      "allOf": [
       {
        "$ref": "#/components/schemas/ScriptsActionsEnum"
       }
      ]
     },
     "parameters": {
      "allOf": [
       {
        "$ref": "#/components/schemas/InsertOrderSellerCommentParametersDTO"
       }
      ],
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "InsertOrderSellerCommentParametersDTO": {
    "required": [
     "comment"
    ],
    "type": "object",
    "properties": {
     "comment": {
      "type": "string"
     }
    },
    "additionalProperties": false
   },
   "JobDto": {
    "type": "object",
    "properties": {
     "id": {
      "type": "integer",
      "format": "int64"
     },
     "createdAt": {
      "type": "string",
      "format": "date-time"
     },
     "updatedAt": {
      "type": "string",
      "format": "date-time"
     },
     "payload": {
      "nullable": true
     },
     "result": {
      "nullable": true
     },
     "status": {
      "allOf": [
       {
        "$ref": "#/components/schemas/JobStatusEnum"
       }
      ]
     },
     "command": {
      "type": "string",
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "JobStatusEnum": {
    "enum": [
     "New",
     "InProgress",
     "Completed",
     "Failed"
    ],
    "type": "string"
   },
   "JsonNode": {
    "type": "object",
    "properties": {
     "options": {
      "allOf": [
       {
        "$ref": "#/components/schemas/JsonNodeOptions"
       }
      ],
      "nullable": true,
      "readOnly": true
     },
     "parent": {
      "allOf": [
       {
        "$ref": "#/components/schemas/JsonNode"
       }
      ],
      "nullable": true,
      "readOnly": true
     },
     "root": {
      "allOf": [
       {
        "$ref": "#/components/schemas/JsonNode"
       }
      ],
      "nullable": true,
      "readOnly": true
     }
    },
    "additionalProperties": false
   },
   "JsonNodeOptions": {
    "type": "object",
    "properties": {
     "propertyNameCaseInsensitive": {
      "type": "boolean"
     }
    },
    "additionalProperties": false
   },
   "LogResponse": {
    "type": "object",
    "properties": {
     "runId": {
      "type": "integer",
      "description": "Id of the run during which the log occurred.",
      "format": "int64"
     },
     "timestamp": {
      "type": "string",
      "description": "Date and time when log occurred.",
      "format": "date-time"
     },
     "message": {
      "type": "string",
      "description": "Message of the log.",
      "nullable": true
     },
     "level": {
      "pattern": "^(Information|Error)$",
      "type": "string",
      "description": "Level of the log.",
      "nullable": true
     }
    },
    "additionalProperties": false,
    "description": "Log."
   },
   "LogResponsePage": {
    "type": "object",
    "properties": {
     "list": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/LogResponse"
      },
      "nullable": true
     },
     "pageNumber": {
      "type": "integer",
      "format": "int32"
     },
     "total": {
      "type": "integer",
      "format": "int32"
     }
    },
    "additionalProperties": false
   },
   "OrderEmailFieldEnum": {
    "enum": [
     "RECIPIENT",
     "BUYER",
     "SELLER"
    ],
    "type": "string"
   },
   "OwnerData": {
    "type": "object",
    "properties": {
     "email": {
      "type": "string",
      "nullable": true
     },
     "userName": {
      "type": "string",
      "nullable": true
     },
     "fullName": {
      "type": "string",
      "nullable": true
     },
     "id": {
      "type": "integer",
      "format": "int64"
     },
     "roles": {
      "type": "array",
      "items": {
       "type": "string"
      },
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "ProblemDetails": {
    "type": "object",
    "properties": {
     "type": {
      "type": "string",
      "nullable": true
     },
     "title": {
      "type": "string",
      "nullable": true
     },
     "status": {
      "type": "integer",
      "format": "int32",
      "nullable": true
     },
     "detail": {
      "type": "string",
      "nullable": true
     },
     "instance": {
      "type": "string",
      "nullable": true
     }
    },
    "additionalProperties": {}
   },
   "RunResponse": {
    "type": "object",
    "properties": {
     "id": {
      "type": "integer",
      "description": "Id of the run.",
      "format": "int64"
     },
     "scriptId": {
      "type": "integer",
      "description": "Id of the script.",
      "format": "int64",
      "nullable": true
     },
     "createdAt": {
      "type": "string",
      "description": "Date and time when run was created.",
      "format": "date-time"
     },
     "state": {
      "type": "string",
      "description": "State of the run.",
      "nullable": true
     },
     "parameters": {
      "type": "object",
      "additionalProperties": {
       "$ref": "#/components/schemas/JsonNode"
      },
      "description": "Parameters of the run. They will be passed to the script in object with name `data`.",
      "nullable": true
     }
    },
    "additionalProperties": false,
    "description": "Response that describes run."
   },
   "RunResponsePage": {
    "type": "object",
    "properties": {
     "list": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/RunResponse"
      },
      "nullable": true
     },
     "pageNumber": {
      "type": "integer",
      "format": "int32"
     },
     "total": {
      "type": "integer",
      "format": "int32"
     }
    },
    "additionalProperties": false
   },
   "RunResponseV2": {
    "type": "object",
    "properties": {
     "id": {
      "type": "integer",
      "description": "Id of the run.",
      "format": "int64"
     },
     "scriptId": {
      "type": "integer",
      "description": "Id of the script.",
      "format": "int64",
      "nullable": true
     },
     "scriptName": {
      "type": "string",
      "description": "Name of the script.",
      "nullable": true
     },
     "createdAt": {
      "type": "string",
      "description": "Date and time when run was created.",
      "format": "date-time"
     },
     "finishedAt": {
      "type": "string",
      "description": "Date and time when run has finished.",
      "format": "date-time",
      "nullable": true
     },
     "startedAt": {
      "type": "string",
      "description": "Date and time when run has finished.",
      "format": "date-time",
      "nullable": true
     },
     "executionTime": {
      "type": "number",
      "description": "Duration time of the run.",
      "format": "double"
     },
     "state": {
      "type": "string",
      "description": "State of the run.",
      "nullable": true
     },
     "parameters": {
      "type": "object",
      "additionalProperties": {
       "$ref": "#/components/schemas/JsonNode"
      },
      "description": "Parameters of the run. They will be passed to the script in object with name `data`.",
      "nullable": true
     }
    },
    "additionalProperties": false,
    "description": "Response that describes run."
   },
   "RunStatus": {
    "enum": [
     "NoChanges",
     "Success",
     "Failed",
     "PartiallyFailed"
    ],
    "type": "string"
   },
   "ScriptsActionsEnum": {
    "enum": [
     "UpdateOrderStatus",
     "UpdateOrder",
     "AssertionSetResult",
     "InsertOrderSellerCommentAction",
     "InsertOrderBuyerCommentAction",
     "UpdateOrderPaymentStatus",
     "UpdateOrderLineItemsTaxRates",
     "AssertionReturnResult",
     "CallUrl",
     "SendEmail",
     "DoAllegroCommissionRefund",
     "UpdateOrderEF",
     "CreateShipment",
     "RemoveShipment",
     "DoAllegroPaymentRefund",
     "PrintDocument",
     "RunScript",
     "CallPersonalEvent",
     "AddLineItemFromPim",
     "SplitBundles",
     "CreateShipmentV2",
     "Fakturowania",
     "CreateReturn",
     "UpdateReturnStatus",
     "UpdateReturn",
     "UpdateReturnEF",
     "DoAllegroPaymentRefundLineItems",
     "DoAllegroCommissionRefundReturnLineItems",
     "SetLineItemsWarehouseId",
     "AutoSplitOrder",
     "UpdateOrderAsterisk",
     "CorrectionFakturowania",
     "PrintLineItemsEf",
     "DoAllegroRejectReturn",
     "UpdateStatusOfOrdersCreatedFromSplit",
     "CreateWarehouseDocumentWZ",
     "UpdateMultipleOrdersStatuses",
     "GenerateP24PaymentLink"
    ],
    "type": "string"
   },
   "ScriptsContextsEnum": {
    "enum": [
     "Empty",
     "OrderV1",
     "OrderV2"
    ],
    "type": "string"
   },
   "SendEmailActionDTO": {
    "required": [
     "command"
    ],
    "type": "object",
    "properties": {
     "command": {
      "allOf": [
       {
        "$ref": "#/components/schemas/ScriptsActionsEnum"
       }
      ]
     },
     "parameters": {
      "allOf": [
       {
        "$ref": "#/components/schemas/SendEmailActionParametersDTO"
       }
      ],
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "SendEmailActionParametersDTO": {
    "required": [
     "emailTemplateId",
     "smerpConnectionId"
    ],
    "type": "object",
    "properties": {
     "emailTemplateId": {
      "type": "integer",
      "format": "int64"
     },
     "smerpConnectionId": {
      "minLength": 1,
      "type": "string"
     },
     "subject": {
      "type": "string",
      "nullable": true
     },
     "textBody": {
      "type": "string",
      "nullable": true
     },
     "htmlBody": {
      "type": "string",
      "nullable": true
     },
     "toEmail": {
      "type": "array",
      "items": {
       "type": "string"
      },
      "nullable": true
     },
     "emailFrom": {
      "type": "string",
      "nullable": true
     },
     "emailOrderField": {
      "allOf": [
       {
        "$ref": "#/components/schemas/OrderEmailFieldEnum"
       }
      ]
     }
    },
    "additionalProperties": false
   },
   "TriggerDTOv3": {
    "required": [
     "events"
    ],
    "type": "object",
    "properties": {
     "events": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "condition": {
      "allOf": [
       {
        "$ref": "#/components/schemas/ConditionDTOv3"
       }
      ],
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "UpdateOrderActionDTO": {
    "required": [
     "command"
    ],
    "type": "object",
    "properties": {
     "command": {
      "allOf": [
       {
        "$ref": "#/components/schemas/ScriptsActionsEnum"
       }
      ]
     },
     "parameters": {
      "allOf": [
       {
        "$ref": "#/components/schemas/UpdateOrderActionParametersDTO"
       }
      ],
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "UpdateOrderActionParametersDTO": {
    "required": [
     "updates"
    ],
    "type": "object",
    "properties": {
     "updates": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/UpdateOrderFieldDTO"
      }
     }
    },
    "additionalProperties": false
   },
   "UpdateOrderFieldDTO": {
    "required": [
     "path",
     "value"
    ],
    "type": "object",
    "properties": {
     "path": {
      "minLength": 1,
      "type": "string"
     },
     "value": {
      "type": "string"
     },
     "op": {
      "type": "string",
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "UpdateOrderLineItemsTaxRatesActionDTO": {
    "type": "object",
    "properties": {
     "command": {
      "allOf": [
       {
        "$ref": "#/components/schemas/ScriptsActionsEnum"
       }
      ],
      "nullable": true
     },
     "parameters": {
      "allOf": [
       {
        "$ref": "#/components/schemas/UpdateOrderLineItemsTaxRatesActionParametersDTO"
       }
      ],
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "UpdateOrderLineItemsTaxRatesActionParametersDTO": {
    "required": [
     "rate",
     "symbol"
    ],
    "type": "object",
    "properties": {
     "symbol": {
      "minLength": 1,
      "type": "string"
     },
     "rate": {
      "type": "number",
      "format": "double"
     }
    },
    "additionalProperties": false
   },
   "UpdateOrderPaymentStatusActionDTO": {
    "required": [
     "command"
    ],
    "type": "object",
    "properties": {
     "command": {
      "allOf": [
       {
        "$ref": "#/components/schemas/ScriptsActionsEnum"
       }
      ]
     },
     "parameters": {
      "allOf": [
       {
        "$ref": "#/components/schemas/UpdateOrderPaymentStatusActionParametersDTO"
       }
      ],
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "UpdateOrderPaymentStatusActionParametersDTO": {
    "required": [
     "paymentName",
     "status"
    ],
    "type": "object",
    "properties": {
     "status": {
      "minLength": 1,
      "type": "string"
     },
     "paymentName": {
      "minLength": 1,
      "type": "string"
     }
    },
    "additionalProperties": false
   },
   "UpdateOrderStatusActionDTO": {
    "required": [
     "command",
     "parameters"
    ],
    "type": "object",
    "properties": {
     "command": {
      "allOf": [
       {
        "$ref": "#/components/schemas/ScriptsActionsEnum"
       }
      ]
     },
     "parameters": {
      "allOf": [
       {
        "$ref": "#/components/schemas/UpdateOrderStatusActionParametersDTO"
       }
      ]
     }
    },
    "additionalProperties": false
   },
   "UpdateOrderStatusActionParametersDTO": {
    "required": [
     "value"
    ],
    "type": "object",
    "properties": {
     "value": {
      "minLength": 1,
      "type": "string"
     }
    },
    "additionalProperties": false
   },
   "AjsRunScriptPayload": {
    "required": [
     "context",
     "order"
    ],
    "type": "object",
    "properties": {
     "context": {
      "minLength": 1,
      "type": "string"
     },
     "owner": {
      "allOf": [
       {
        "$ref": "#/components/schemas/OwnerData"
       }
      ],
      "nullable": true
     },
     "order": {
      "allOf": [
       {
        "$ref": "#/components/schemas/AjsRunScriptPayloadOrderContext"
       }
      ]
     },
     "return": {
      "allOf": [
       {
        "$ref": "#/components/schemas/AjsRunScriptPayloadReturnContext"
       }
      ],
      "nullable": true
     },
     "runParams": {
      "type": "object",
      "additionalProperties": {
       "$ref": "#/components/schemas/JsonNode"
      },
      "nullable": true
     },
     "inputData": {
      "allOf": [
       {
        "$ref": "#/components/schemas/JsonNode"
       }
      ],
      "nullable": true,
      "readOnly": true
     },
     "multipleOrdersIdsForScope": {
      "type": "array",
      "items": {
       "type": "integer",
       "format": "int64"
      },
      "nullable": true
     },
     "multipleOrdersIds": {
      "type": "array",
      "items": {
       "type": "integer",
       "format": "int64"
      },
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "AjsRunScriptPayloadOrderContext": {
    "required": [
     "id"
    ],
    "type": "object",
    "properties": {
     "id": {
      "type": "integer",
      "format": "int64"
     }
    },
    "additionalProperties": false
   },
   "AjsRunScriptPayloadReturnContext": {
    "required": [
     "id"
    ],
    "type": "object",
    "properties": {
     "id": {
      "type": "integer",
      "format": "int64"
     }
    },
    "additionalProperties": false
   },
   "AjsRunBatchPayload": {
    "required": [
     "context",
     "orders"
    ],
    "type": "object",
    "properties": {
     "context": {
      "minLength": 1,
      "type": "string"
     },
     "owner": {
      "allOf": [
       {
        "$ref": "#/components/schemas/OwnerData"
       }
      ],
      "nullable": true
     },
     "orders": {
      "type": "array",
      "items": {
       "type": "integer",
       "format": "int64"
      }
     },
     "orderIdToReturnIdsMap": {
      "type": "object",
      "additionalProperties": {
       "type": "array",
       "items": {
        "type": "integer",
        "format": "int64"
       }
      },
      "nullable": true
     },
     "userEventId": {
      "type": "string",
      "nullable": true
     },
     "inputData": {
      "type": "object",
      "additionalProperties": {
       "$ref": "#/components/schemas/JsonNode"
      },
      "nullable": true
     },
     "useInputDataSchemaScripts": {
      "type": "boolean"
     },
     "useFastTriggersEvaluator": {
      "type": "boolean"
     },
     "useFastTriggersIncludeDisabled": {
      "type": "boolean"
     },
     "dryRun": {
      "type": "boolean"
     }
    },
    "additionalProperties": false
   },
   "AutomaticScriptPatchRequestPayload": {
    "type": "object",
    "properties": {
     "name": {
      "allOf": [
       {
        "$ref": "#/components/schemas/StringPatchOption"
       }
      ],
      "nullable": true
     },
     "groupId": {
      "allOf": [
       {
        "$ref": "#/components/schemas/Int64PatchOption"
       }
      ],
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "BatchOrderResponse": {
    "type": "object",
    "properties": {
     "id": {
      "type": "integer",
      "description": "Id of the order.",
      "format": "int64"
     },
     "progress": {
      "type": "number",
      "description": "Fraction of finished runs for this order, in percents.",
      "format": "double"
     },
     "runs": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/BatchRunOrderResponse"
      },
      "description": "Description of runs executed for certain order in batch.",
      "nullable": true
     }
    },
    "additionalProperties": false,
    "description": "Description of runs executed for certain order in batch."
   },
   "BatchProgressResponse": {
    "type": "object",
    "properties": {
     "runId": {
      "type": "integer",
      "description": "Id of the run correlated to whole batch.",
      "format": "int64"
     },
     "batchId": {
      "type": "integer",
      "description": "Id of the batch.",
      "format": "int64"
     },
     "createdAt": {
      "type": "string",
      "description": "Date and time when batch was created.",
      "format": "date-time"
     },
     "ajsIds": {
      "type": "array",
      "items": {
       "type": "integer",
       "format": "int64"
      },
      "description": "Ids of AJSes ran in this batch.",
      "nullable": true
     },
     "progress": {
      "type": "number",
      "description": "Fraction of finished runs in this batch, in percents.",
      "format": "double"
     },
     "orders": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/BatchOrderResponse"
      },
      "description": "Descriptions of runs executed for each order in batch.",
      "nullable": true
     }
    },
    "additionalProperties": false,
    "description": "Response that describes batch progress."
   },
   "BatchRunOrderResponse": {
    "type": "object",
    "properties": {
     "id": {
      "type": "integer",
      "description": "Id of the run.",
      "format": "int64",
      "nullable": true
     },
     "ajsId": {
      "type": "integer",
      "description": "Id of the AJS.",
      "format": "int64"
     },
     "state": {
      "type": "string",
      "description": "State of the run.",
      "nullable": true
     },
     "status": {
      "type": "string",
      "description": "Status of the run.",
      "nullable": true
     },
     "errors": {
      "type": "array",
      "items": {
       "type": "string"
      },
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "CreateAutomaticScriptRequestV3": {
    "required": [
     "name"
    ],
    "type": "object",
    "properties": {
     "name": {
      "minLength": 1,
      "type": "string",
      "description": "Name of the automatic script. Given by user."
     },
     "body": {
      "type": "string",
      "description": "Body of the automatic script. Written by user.",
      "nullable": true
     },
     "id": {
      "type": "integer",
      "description": "Id of the automatic script. Written by user.",
      "format": "int64",
      "nullable": true
     },
     "groupId": {
      "type": "integer",
      "description": "Id of the group the script belongs to",
      "format": "int64"
     },
     "inputDataSchema": {
      "description": "The input data JSON Schema",
      "nullable": true
     },
     "type": {
      "allOf": [
       {
        "$ref": "#/components/schemas/AutomaticScriptTypeEnum"
       }
      ],
      "description": "Type of the script used to determine the kind of UI used for display",
      "nullable": true
     },
     "priority": {
      "type": "integer",
      "description": "Priority of the script, the higher the number the higher the priority.",
      "format": "int64"
     },
     "delaySeconds": {
      "type": "integer",
      "description": "Delay in seconds - how long to wait before executing the script.",
      "format": "int64"
     },
     "inputUiSchema": {
      "description": " (absent ⇒ property omitted)",
      "nullable": true
     },
     "inputDataDefaultsScriptId": {
      "type": "integer",
      "description": " (absent ⇒ property omitted)",
      "format": "int64",
      "nullable": true
     }
    },
    "additionalProperties": false,
    "description": "Request for creating automatic script."
   },
   "Int64PatchOption": {
    "type": "object",
    "properties": {
     "hasValue": {
      "type": "boolean",
      "readOnly": true
     },
     "value": {
      "type": "integer",
      "format": "int64"
     }
    },
    "additionalProperties": false
   },
   "RunBatchScriptsRequirementsReponse": {
    "type": "object",
    "properties": {
     "scriptId": {
      "type": "integer",
      "format": "int64",
      "readOnly": true
     },
     "inputDataSchema": {
      "nullable": true,
      "readOnly": true
     },
     "inputUiSchema": {
      "nullable": true,
      "readOnly": true
     },
     "inputDataDefaults": {
      "nullable": true,
      "readOnly": true
     }
    },
    "additionalProperties": false
   },
   "StringPatchOption": {
    "type": "object",
    "properties": {
     "hasValue": {
      "type": "boolean",
      "readOnly": true
     },
     "value": {
      "type": "string",
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "UpdateAutomaticScriptRequestV3": {
    "type": "object",
    "properties": {
     "name": {
      "type": "string",
      "description": "Name of the automatic script. Given by user.",
      "nullable": true
     },
     "body": {
      "type": "string",
      "description": "Body of the automatic script. Written by user.",
      "nullable": true
     },
     "groupId": {
      "type": "integer",
      "description": "The id of the group the script belongs to.",
      "format": "int64"
     },
     "inputDataSchema": {
      "description": "The input data JSON Schema",
      "nullable": true
     },
     "type": {
      "allOf": [
       {
        "$ref": "#/components/schemas/AutomaticScriptTypeEnum"
       }
      ],
      "description": "Type of the script used to determine the kind of UI used for display",
      "nullable": true
     },
     "priority": {
      "type": "integer",
      "description": "Priority of the script, the higher the number the higher the priority.",
      "format": "int64"
     },
     "delaySeconds": {
      "type": "integer",
      "description": "Delay in seconds - how long to wait before executing the script.",
      "format": "int64"
     },
     "inputUiSchema": {
      "description": " (absent ⇒ property omitted)",
      "nullable": true
     },
     "inputDataDefaultsScriptId": {
      "type": "integer",
      "description": " (absent ⇒ property omitted)",
      "format": "int64",
      "nullable": true
     }
    },
    "additionalProperties": false,
    "description": "Request for updating the automatic script."
   },
   "ActionScopeMetadataDTO": {
    "type": "object",
    "properties": {
     "scopeNo": {
      "type": "string",
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "ConfigResponseDTO": {
    "required": [
     "businessActionJs64",
     "triggerJs64"
    ],
    "type": "object",
    "properties": {
     "triggerJs64": {
      "minLength": 1,
      "type": "string"
     },
     "businessActionJs64": {
      "minLength": 1,
      "type": "string"
     },
     "triggerJsonString": {
      "type": "string",
      "nullable": true
     },
     "businessActionJsonString": {
      "type": "string",
      "nullable": true
     },
     "dsl": {
      "allOf": [
       {
        "$ref": "#/components/schemas/CreateConfigRequestDTOv3"
       }
      ],
      "nullable": true
     },
     "triggerLog": {
      "allOf": [
       {
        "$ref": "#/components/schemas/CreateConfigResponseLogDTO"
       }
      ],
      "nullable": true
     },
     "actionsLog": {
      "allOf": [
       {
        "$ref": "#/components/schemas/CreateConfigResponseLogDTO"
       }
      ],
      "nullable": true
     },
     "config": {
      "allOf": [
       {
        "$ref": "#/components/schemas/BeelMacroConfigDTO"
       }
      ],
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "CreateComplexConfigRequestDTO": {
    "required": [
     "actions",
     "context",
     "trigger"
    ],
    "type": "object",
    "properties": {
     "context": {
      "allOf": [
       {
        "$ref": "#/components/schemas/ScriptsContextsEnum"
       }
      ]
     },
     "trigger": {
      "allOf": [
       {
        "$ref": "#/components/schemas/TriggerDTOv3"
       }
      ]
     },
     "actions": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/ScopedActionDto"
      }
     }
    },
    "additionalProperties": false
   },
   "CreateConfigResponseLogDTO": {
    "required": [
     "logs",
     "result"
    ],
    "type": "object",
    "properties": {
     "result": {
      "allOf": [
       {
        "$ref": "#/components/schemas/CreateConfigResultEnum"
       }
      ]
     },
     "logs": {
      "type": "array",
      "items": {
       "type": "string"
      }
     }
    },
    "additionalProperties": false
   },
   "CreateConfigResultEnum": {
    "enum": [
     "Unknown",
     "Full",
     "Partial"
    ],
    "type": "string"
   },
   "ScopedActionDto": {
    "required": [
     "actions",
     "metadata"
    ],
    "type": "object",
    "properties": {
     "actions": {
      "allOf": [
       {
        "$ref": "#/components/schemas/ActionsDTOv3"
       }
      ]
     },
     "metadata": {
      "allOf": [
       {
        "$ref": "#/components/schemas/ActionScopeMetadataDTO"
       }
      ]
     }
    },
    "additionalProperties": false
   }
  },
  "securitySchemes": {
   "Bearer": {
    "type": "http",
    "scheme": "bearer",
    "bearerFormat": "JWT",
    "description": "Token API wygenerowany w panelu Sellrocket."
   }
  }
 },
 "security": [
  {
   "Bearer": []
  }
 ]
}