Trendsic Platform Service

<back to all web services

WebixKanbanTaskCreateRequest

The following routes are available for this service:
POST/v1/webix/kanban/tasks
POST/v1/webix/kanban/tasks/{ProjectUID}
<?php namespace dtos;

use DateTime;
use Exception;
use DateInterval;
use JsonSerializable;
use ServiceStack\{IReturn,IReturnVoid,IGet,IPost,IPut,IDelete,IPatch,IMeta,IHasSessionId,IHasBearerToken,IHasVersion};
use ServiceStack\{ICrud,ICreateDb,IUpdateDb,IPatchDb,IDeleteDb,ISaveDb,AuditBase,QueryDb,QueryDb2,QueryData,QueryData2,QueryResponse};
use ServiceStack\{ResponseStatus,ResponseError,EmptyResponse,IdResponse,ArrayList,KeyValuePair2,StringResponse,StringsResponse,Tuple2,Tuple3,ByteArray};
use ServiceStack\{JsonConverters,Returns,TypeContext};


class WebixKanbanComment implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $id=null,
        /** @var int|null */
        public ?int $user_id=null,
        /** @var string|null */
        public ?string $date=null,
        /** @var string|null */
        public ?string $text=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['id'])) $this->id = $o['id'];
        if (isset($o['user_id'])) $this->user_id = $o['user_id'];
        if (isset($o['date'])) $this->date = $o['date'];
        if (isset($o['text'])) $this->text = $o['text'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->id)) $o['id'] = $this->id;
        if (isset($this->user_id)) $o['user_id'] = $this->user_id;
        if (isset($this->date)) $o['date'] = $this->date;
        if (isset($this->text)) $o['text'] = $this->text;
        return empty($o) ? new class(){} : $o;
    }
}

class KanbanTaskAttachment implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $id='',
        /** @var string|null */
        public ?string $link=null,
        /** @var int */
        public int $size=0
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['id'])) $this->id = $o['id'];
        if (isset($o['link'])) $this->link = $o['link'];
        if (isset($o['size'])) $this->size = $o['size'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->id)) $o['id'] = $this->id;
        if (isset($this->link)) $o['link'] = $this->link;
        if (isset($this->size)) $o['size'] = $this->size;
        return empty($o) ? new class(){} : $o;
    }
}

class WebixKanbanTask implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $id='',
        /** @var string|null */
        public ?string $status=null,
        /** @var int */
        public int $user_id=0,
        /** @var string|null */
        public ?string $text=null,
        /** @var string|null */
        public ?string $color=null,
        /** @var array<string>|null */
        public ?array $tags=null,
        /** @var array<WebixKanbanComment>|null */
        public ?array $comments=null,
        /** @var array<KanbanTaskAttachment>|null */
        public ?array $attachments=null,
        /** @var int */
        public int $list=0
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['id'])) $this->id = $o['id'];
        if (isset($o['status'])) $this->status = $o['status'];
        if (isset($o['user_id'])) $this->user_id = $o['user_id'];
        if (isset($o['text'])) $this->text = $o['text'];
        if (isset($o['color'])) $this->color = $o['color'];
        if (isset($o['tags'])) $this->tags = JsonConverters::fromArray('string', $o['tags']);
        if (isset($o['comments'])) $this->comments = JsonConverters::fromArray('WebixKanbanComment', $o['comments']);
        if (isset($o['attachments'])) $this->attachments = JsonConverters::fromArray('KanbanTaskAttachment', $o['attachments']);
        if (isset($o['list'])) $this->list = $o['list'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->id)) $o['id'] = $this->id;
        if (isset($this->status)) $o['status'] = $this->status;
        if (isset($this->user_id)) $o['user_id'] = $this->user_id;
        if (isset($this->text)) $o['text'] = $this->text;
        if (isset($this->color)) $o['color'] = $this->color;
        if (isset($this->tags)) $o['tags'] = JsonConverters::toArray('string', $this->tags);
        if (isset($this->comments)) $o['comments'] = JsonConverters::toArray('WebixKanbanComment', $this->comments);
        if (isset($this->attachments)) $o['attachments'] = JsonConverters::toArray('KanbanTaskAttachment', $this->attachments);
        if (isset($this->list)) $o['list'] = $this->list;
        return empty($o) ? new class(){} : $o;
    }
}

class WebixKanbanTaskResponse extends WebixKanbanTask implements JsonSerializable
{
    /**
     * @param string $id
     * @param string|null $status
     * @param int $user_id
     * @param string|null $text
     * @param string|null $color
     * @param array<string>|null $tags
     * @param array<WebixKanbanComment>|null $comments
     * @param array<KanbanTaskAttachment>|null $attachments
     * @param int $list
     */
    public function __construct(
        string $id='',
        ?string $status=null,
        int $user_id=0,
        ?string $text=null,
        ?string $color=null,
        ?array $tags=null,
        ?array $comments=null,
        ?array $attachments=null,
        int $list=0
    ) {
        parent::__construct($id,$status,$user_id,$text,$color,$tags,$comments,$attachments,$list);
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        return empty($o) ? new class(){} : $o;
    }
}

class WebixKanbanTaskCreateRequest extends WebixKanbanTask implements JsonSerializable
{
    /**
     * @param string $id
     * @param string|null $status
     * @param int $user_id
     * @param string|null $text
     * @param string|null $color
     * @param array<string>|null $tags
     * @param array<WebixKanbanComment>|null $comments
     * @param array<KanbanTaskAttachment>|null $attachments
     * @param int $list
     */
    public function __construct(
        string $id='',
        ?string $status=null,
        int $user_id=0,
        ?string $text=null,
        ?string $color=null,
        ?array $tags=null,
        ?array $comments=null,
        ?array $attachments=null,
        int $list=0,
        /** @var string */
        public string $ProjectUID=''
    ) {
        parent::__construct($id,$status,$user_id,$text,$color,$tags,$comments,$attachments,$list);
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['ProjectUID'])) $this->ProjectUID = $o['ProjectUID'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->ProjectUID)) $o['ProjectUID'] = $this->ProjectUID;
        return empty($o) ? new class(){} : $o;
    }
}

PHP WebixKanbanTaskCreateRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /v1/webix/kanban/tasks HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"ProjectUID":"00000000000000000000000000000000","id":"00000000000000000000000000000000","status":"String","user_id":0,"text":"String","color":"String","tags":["String"],"comments":[{"id":"String","user_id":0,"date":"String","text":"String"}],"attachments":[{"id":"00000000000000000000000000000000","link":"String","size":0}],"list":0}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"id":"00000000000000000000000000000000","status":"String","user_id":0,"text":"String","color":"String","tags":["String"],"comments":[{"id":"String","user_id":0,"date":"String","text":"String"}],"attachments":[{"id":"00000000000000000000000000000000","link":"String","size":0}],"list":0}