Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/old/vendor/mageworx/module-open-ai/Api/Data/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/old/vendor/mageworx/module-open-ai/Api/Data/QueueItemInterface.php
<?php
/**
 * Copyright © MageWorx. All rights reserved.
 * See LICENSE.txt for license details.
 */
declare(strict_types = 1);

namespace MageWorx\OpenAI\Api\Data;

use MageWorx\OpenAI\Api\OptionsInterface;
use MageWorx\OpenAI\Api\ResponseInterface;

/**
 * Queue Item Interface for MageWorx OpenAI Module
 *
 * Interface for queue item entity. Defines getters and setters for the queue item properties.
 */
interface QueueItemInterface
{
    /** Status Constants */
    // Pending queue item. Should be processed by cron.
    const STATUS_PENDING = 0;
    // Processing queue item. Processed by cronjob right now.
    const STATUS_PROCESSING = 1;
    // Ready queue item. Should be processed by callback.
    const STATUS_READY = 2;
    // Completed queue item. Processed by callback.
    const STATUS_COMPLETED = 3;
    // Failed queue item. Error response from chatgpt. Should be re-run by cron and processed by callback after success.
    const STATUS_FAILED = 4;
    // Callback failed queue item. Error response from callback. Should be re-run by cron and processed by callback after success.
    const STATUS_CALLBACK_FAILED = 5;
    // Fatal error with queue item, which can not be processed by cron or callback. Prevents queue item from processing.
    const STATUS_FATAL_ERROR = 6;
    /**
     * The status specifies that the queue item should not be processed because a third party process has taken control
     * over it and another process of the queue item is being created, or it can be processed in some other way.
     */
    const STATUS_LOCKED = 7;

    /**
     * Get item ID
     *
     * @return int|null
     */
    public function getId(): ?int;

    /**
     * Get content
     *
     * @return string
     */
    public function getContent(): string;

    /**
     * Get context
     *
     * @return array|null
     */
    public function getContext(): ?array;

    /**
     * Get options
     *
     * @return OptionsInterface
     */
    public function getOptions(): OptionsInterface;

    /**
     * Get status
     *
     * @return int
     */
    public function getStatus(): int;

    /**
     * Get response
     *
     * @return ResponseInterface
     */
    public function getResponse(): ResponseInterface;

    /**
     * Get process id
     *
     * @return int|null
     */
    public function getProcessId(): ?int;

    /**
     * Get request id
     *
     * @return int|null
     */
    public function getRequestDataId(): ?int;

    /**
     * @return int
     */
    public function getPosition(): int;

    /**
     * @return string
     */
    public function getModel(): string;

    /**
     * @return string|null
     */
    public function getCallback(): ?string;

    /**
     * Additional data as product_id, review_id, store_id etc.
     * Stored as JSON.
     *
     * @return array
     */
    public function getAdditionalData(): array;

    /**
     * Set content
     *
     * @param string $content
     * @return QueueItemInterface
     */
    public function setContent(string $content): QueueItemInterface;

    /**
     * Set context
     *
     * @param array|null $context
     * @return QueueItemInterface
     */
    public function setContext(?array $context): QueueItemInterface;

    /**
     * Set options
     *
     * @param OptionsInterface $options
     * @return QueueItemInterface
     */
    public function setOptions(OptionsInterface $options): QueueItemInterface;

    /**
     * Set status
     *
     * @param int $status
     * @return QueueItemInterface
     */
    public function setStatus(int $status): QueueItemInterface;

    /**
     * Set response
     *
     * @param ResponseInterface $response
     * @return QueueItemInterface
     */
    public function setResponse(ResponseInterface $response): QueueItemInterface;

    /**
     * Set process id
     *
     * @param int|null $id
     * @return QueueItemInterface
     */
    public function setProcessId(?int $id): QueueItemInterface;

    /**
     * Set request id
     *
     * @param int|null $id
     * @return QueueItemInterface
     */
    public function setRequestDataId(?int $id): QueueItemInterface;

    /**
     * Set position
     *
     * @param int $position
     * @return QueueItemInterface
     */
    public function setPosition(int $position): QueueItemInterface;

    /**
     * @param string $model
     * @return QueueItemInterface
     */
    public function setModel(string $model): QueueItemInterface;

    /**
     * @param string|null $callback
     * @return QueueItemInterface
     */
    public function setCallback(?string $callback): QueueItemInterface;

    /**
     * Additional data as product_id, review_id, store_id etc.
     * Stored as JSON.
     *
     * @param array $data
     * @return QueueItemInterface
     */
    public function setAdditionalData(array $data): QueueItemInterface;

    /**
     * Get type of preprocessor for queue item
     *
     * @return string|null
     * @see \MageWorx\OpenAI\Api\QueueItemPreprocessorInterface
     */
    public function getPreprocessor(): ?string;

    /**
     * Set type of preprocessor for queue item
     *
     * @param string|null $preprocessor
     * @return QueueItemInterface
     * @see \MageWorx\OpenAI\Api\QueueItemPreprocessorInterface
     */
    public function setPreprocessor(?string $preprocessor): QueueItemInterface;

    /**
     * Error handler for request
     *
     * @return string|null
     * @see \MageWorx\OpenAI\Api\QueueItemErrorHandlerInterface
     */
    public function getErrorHandler(): ?string;

    /**
     * Set error handler for request
     * @param string|null $errorHandler
     * @return QueueItemInterface
     * @see \MageWorx\OpenAI\Api\QueueItemErrorHandlerInterface
     */
    public function setErrorHandler(?string $errorHandler): QueueItemInterface;
}

Spamworldpro Mini