<?php

namespace interfaces;

interface n8n_i extends universal_module_i
{
    public function listWorkflows(array $filters = []): object;

    public function getWorkflow(string $id, bool $excludePinnedData = false): object;

    public function createWorkflow(object $workflow): object;

    public function updateWorkflow(string $id, object $changes): object;

    public function publishWorkflow(string $id, ?object $options = null): object;

    public function deactivateWorkflow(string $id): object;

    public function runWebhook(string $webhookTarget, mixed $payload = null, string $method = 'POST', array $query = []): object;

    public function listExecutions(array $filters = []): object;

    public function getExecution(int $id, bool $includeData = false): object;

    public function retryExecution(int $id, bool $loadWorkflow = false): object;

    public function stopExecution(int $id): object;
}
