1
0
Fork 0
mirror of synced 2025-04-04 21:53:32 +03:00

Compare commits

..

No commits in common. "master" and "v1.4.7" have entirely different histories.

16 changed files with 54 additions and 193 deletions

View file

@ -15,14 +15,14 @@ jobs:
matrix:
php-version: ['7.3', '7.4', '8.0', '8.1']
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v2
- name: Setup PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: composer:v1
- name: Composer cache
uses: actions/cache@v4
uses: actions/cache@v2
with:
path: ${{ env.HOME }}/.composer/cache
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}

View file

@ -1355,11 +1355,6 @@ parameters:
count: 1
path: src/Bot/Model/Request/MembersRequest.php
-
message: "#^Method RetailCrm\\\\Mg\\\\Bot\\\\Model\\\\Request\\\\MembersRequest\\:\\:setId\\(\\) has no return typehint specified\\.$#"
count: 1
path: src/Bot/Model/Request/MembersRequest.php
-
message: "#^Method RetailCrm\\\\Mg\\\\Bot\\\\Model\\\\Request\\\\MembersRequest\\:\\:setSince\\(\\) has no return typehint specified\\.$#"
count: 1

View file

@ -38,7 +38,6 @@ class Constants
const BOT_ROLE_DISTRIBUTOR = "distributor";
const BOT_ROLE_RESPONSIBLE = "responsible";
const BOT_ROLE_HIDDEN = "hidden";
const MESSAGE_SCOPE_PUBLIC = "public";
const MESSAGE_SCOPE_PRIVATE = "private";

View file

@ -113,14 +113,6 @@ class Chat implements ModelInterface
*/
private $lastActivity;
/**
* @var \DateTime $replyDeadline
*
* @Type("DateTime<'Y-m-d\TH:i:sP'>")
* @Accessor(getter="getReplyDeadline",setter="setReplyDeadline")
*/
private $replyDeadline;
/**
* @return string|null
*/
@ -296,20 +288,4 @@ class Chat implements ModelInterface
{
$this->lastActivity = $lastActivity;
}
/**
* @return \DateTime
*/
public function getReplyDeadline(): ?\DateTime
{
return $this->replyDeadline;
}
/**
* @param \DateTime $replyDeadline
*/
public function setReplyDeadline(\DateTime $replyDeadline): void
{
$this->replyDeadline = $replyDeadline;
}
}

View file

@ -49,15 +49,6 @@ class Item implements ModelInterface
*/
private $caption;
/**
* @var string $transcription
*
* @Type("string")
* @Accessor(getter="getTranscription",setter="setTranscription")
* @SkipWhenEmpty()
*/
private $transcription;
/**
* @return string|null
*/
@ -105,20 +96,4 @@ class Item implements ModelInterface
{
$this->caption = $caption;
}
/**
* @return string|null
*/
public function getTranscription(): ?string
{
return $this->transcription;
}
/**
* @param string $transcription
*/
public function setTranscription(string $transcription): void
{
$this->transcription = $transcription;
}
}

View file

@ -49,15 +49,6 @@ class Responsible implements ModelInterface
*/
private $type;
/**
* @var string $externalId
*
* @Type("string")
* @Accessor(getter="getExternalId",setter="setExternalId")
* @SkipWhenEmpty()
*/
private $externalId;
/**
* @return string|null
*/
@ -105,20 +96,4 @@ class Responsible implements ModelInterface
{
$this->type = $type;
}
/**
* @return string|null
*/
public function getExternalId(): ?string
{
return $this->externalId;
}
/**
* @param string $externalId
*/
public function setExternalId(string $externalId): void
{
$this->externalId = $externalId;
}
}

View file

@ -142,15 +142,6 @@ class User implements ModelInterface
*/
private $revokedAt;
/**
* @var bool $isSystem
*
* @Type("bool")
* @Accessor(getter="isSystem",setter="setIsSystem")
* @SkipWhenEmpty()
*/
private $isSystem;
/**
* @return string|null
*/
@ -358,20 +349,4 @@ class User implements ModelInterface
{
$this->revokedAt = $revokedAt;
}
/**
* @return bool|null
*/
public function isSystem(): ?bool
{
return $this->isSystem;
}
/**
* @param bool $isSystem
*/
public function setIsSystem(bool $isSystem): void
{
$this->isSystem = $isSystem;
}
}

View file

@ -24,7 +24,6 @@ class ChatsRequest implements ModelInterface
{
use CommonFields;
use PageLimit;
use IncludeMassCommunication;
/**
* @Type("int")
@ -49,15 +48,6 @@ class ChatsRequest implements ModelInterface
*/
private $customerId;
/**
* @var int $sinceId
*
* @Type("int")
* @Accessor(getter="getSinceId",setter="setSinceId")
* @SkipWhenEmpty()
*/
private $sinceId;
/**
* @return int
*/
@ -106,21 +96,4 @@ class ChatsRequest implements ModelInterface
{
$this->customerId = $customerId;
}
/**
* @return int|null
*/
public function getSinceId()
{
return $this->sinceId;
}
/**
* @param int $sinceId
* @return void
*/
public function setSinceId($sinceId)
{
$this->sinceId = $sinceId;
}
}

View file

@ -24,7 +24,6 @@ class DialogsRequest implements ModelInterface
{
use CommonFields;
use PageLimit;
use IncludeMassCommunication;
/**
* @var int $sinceId

View file

@ -1,48 +0,0 @@
<?php
/**
* PHP version 7.1
*
* Common fields
*
* @package RetailCrm\Mg\Bot\Model\Request
*/
namespace RetailCrm\Mg\Bot\Model\Request;
use JMS\Serializer\Annotation\Accessor;
use JMS\Serializer\Annotation\SkipWhenEmpty;
use JMS\Serializer\Annotation\Type;
/**
* CommonFields trait
*
* @package RetailCrm\Mg\Bot\Model\Request
*/
trait IncludeMassCommunication
{
/**
* @var int $includeMassCommunication
*
* @Type("int")
* @Accessor(getter="getIncludeMassCommunication",setter="setIncludeMassCommunication")
* @SkipWhenEmpty
*/
private $includeMassCommunication;
/**
* @return int
*/
public function getIncludeMassCommunication()
{
return $this->includeMassCommunication;
}
/**
* @param int $includeMassCommunication
*/
public function setIncludeMassCommunication(?int $includeMassCommunication): void
{
$this->includeMassCommunication = $includeMassCommunication;
}
}

View file

@ -22,7 +22,6 @@ use RetailCrm\Mg\Bot\Model\ModelInterface;
*/
class MembersRequest implements ModelInterface
{
use CommonFields;
use PageLimit;
/**
@ -52,6 +51,24 @@ class MembersRequest implements ModelInterface
*/
private $state;
/**
* @var string $since
*
* @Type("string")
* @Accessor(getter="getSince",setter="setSince")
* @SkipWhenEmpty
*/
private $since;
/**
* @var string $until
*
* @Type("string")
* @Accessor(getter="getUntil",setter="setUntil")
* @SkipWhenEmpty
*/
private $until;
/**
* @return int
*/
@ -99,4 +116,36 @@ class MembersRequest implements ModelInterface
{
$this->state = $state;
}
/**
* @return string
*/
public function getSince()
{
return $this->since;
}
/**
* @param string $since
*/
public function setSince(string $since)
{
$this->since = $since;
}
/**
* @return string
*/
public function getUntil()
{
return $this->until;
}
/**
* @param string $until
*/
public function setUntil(string $until)
{
$this->until = $until;
}
}

View file

@ -23,7 +23,6 @@ use RetailCrm\Mg\Bot\Model\ModelInterface;
class MessagesRequest implements ModelInterface
{
use CommonFields;
use IncludeMassCommunication;
/**
* @var int $chatId

View file

@ -57,7 +57,6 @@
"author_id": 0,
"last_message": null,
"last_activity": "2019-06-11T17:36:20+03:00",
"reply_deadline": "2019-06-18T17:36:20Z",
"created_at": "2019-06-11T12:49:26.938879Z",
"updated_at": "2019-06-14T14:40:28.7111Z"
},
@ -130,7 +129,6 @@
}
},
"last_activity": "2019-06-13T11:07:14+03:00",
"reply_deadline": "2019-06-20T11:07:14Z",
"created_at": "2019-06-11T07:34:16.082957Z",
"updated_at": "2019-06-16T08:10:28.657972Z"
},
@ -203,7 +201,6 @@
}
},
"last_activity": "2019-06-13T11:07:14+03:00",
"reply_deadline":"2019-06-20T11:07:14Z",
"created_at": "2019-06-11T07:34:16Z",
"updated_at": "2019-06-16T08:10:28Z"
}

View file

@ -1 +1 @@
{"responsible":{"type":"user","id":4,"external_id": "4","assigned_at":"2019-06-21T08:01:09Z"},"is_reassign":true,"previous_responsible":{"type":"user","id":12,"external_id": "12","assigned_at":"2019-06-11T12:49:34Z"},"left_user_id":12}
{"responsible":{"type":"user","id":4,"assigned_at":"2019-06-21T08:01:09Z"},"is_reassign":true,"previous_responsible":{"type":"user","id":12,"assigned_at":"2019-06-11T12:49:34Z"},"left_user_id":12}

View file

@ -1 +1 @@
{"previous_responsible":{"type":"user","id":12,"external_id": "12","assigned_at":"2019-06-11T12:49:34Z"}}
{"previous_responsible":{"type":"user","id":12,"assigned_at":"2019-06-11T12:49:34Z"}}

View file

@ -11,7 +11,6 @@
"responsible": {
"type": "user",
"id": 12,
"external_id": "12",
"assigned_at": "2019-06-11T12:49:34.716716Z"
},
"is_active": true
@ -28,7 +27,6 @@
"responsible": {
"type": "user",
"id": 12,
"external_id": "12",
"assigned_at": "2019-06-11T08:40:14.136916Z"
},
"is_active": true
@ -45,7 +43,6 @@
"responsible": {
"type": "user",
"id": 12,
"external_id": "12",
"assigned_at": "2019-06-11T08:40:14Z"
},
"is_active": true