Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,15 @@
- added method `isApplicationTokenValid`
- changed method `public function applicationInstalled(?string $applicationToken): void` application token now is nullable
- changed method `public function applicationUninstalled(?string $applicationToken): void` application token now is nullable
- added method `linkContactPerson(Uuid $uuid)`
- added method `linkBitrix24Partner()`
- added method `unlinkBitrix24Partner()`
- added method `unlinkContactPerson()`
- added method `linkBitrix24PartnerContactPerson()`
- added method `unlinkBitrix24PartnerContactPerson()`
- remove method `changeContactPerson(?Uuid $uuid)`
- remove method `changeBitrix24Partner(?Uuid $uuid)`
- remove method `changeBitrix24PartnerContactPerson(?Uuid $uuid)`

### Statistics

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@ Optional can store links to:
| `getUpdatedAt()` | `CarbonImmutable` | Returns date and time of last application installation change | |
| `getBitrix24AccountId()` | `Uuid` | Returns Bitrix24 Account id related to this installation | |
| `getContactPersonId()` | `?Uuid` | Returns contact person id who installed the application on portal (optional) | |
| `changeContactPerson()` | `void` | Changes client contact person | |
| `linkContactPerson()` | `void` | Link client contact person | |
| `unlinkContactPerson()` | `void` | Unlink client contact person | |
| `getBitrix24PartnerContactPersonId()` | `?Uuid` | Returns Bitrix24 partner contact person id (optional) | |
| `changeBitrix24PartnerContactPerson()` | `void` | Changes Bitrix24 partner contact person | |
| `linkBitrix24PartnerContactPerson()` | `void` | Link Bitrix24 partner contact person | |
| `unlinkBitrix24PartnerContactPerson()` | `void` | Unlink Bitrix24 partner contact person | |
| `getBitrix24PartnerId()` | `?Uuid` | Returns Bitrix24 Partner id related to this installation (optional) | |
| `changeBitrix24Partner()` | `void` | Changes Bitrix24 partner | |
| `linkBitrix24Partner()` | `void` | Link Bitrix24 partner | |
| `unlinkBitrix24Partner()` | `void` | Unlink Bitrix24 partner | |
| `getExternalId()` | `?string` | Returns external id for application installation | |
| `setExternalId()` | `void` | Sets external id for application installation | `InvalidArgumentException` |
| `getStatus()` | `ApplicationInstallationStatus` | Returns application installation status | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,18 @@ public function getBitrix24AccountId(): Uuid;
public function getContactPersonId(): ?Uuid;

/**
* Change contact person
* Link contact person
*
* Change client contact person if client say he has new responsible for the application
* Link client contact person if a client says they have new responsible for the application
*/
public function changeContactPerson(?Uuid $uuid): void;
public function linkContactPerson(Uuid $uuid): void;

/**
* Unlink contact person
*
* Unlink a client contact person if the client says the contact person has changed
*/
public function unlinkContactPerson(): void;

/**
* Get Bitrix24 Partner contact person id, optional
Expand All @@ -71,23 +78,37 @@ public function changeContactPerson(?Uuid $uuid): void;
public function getBitrix24PartnerContactPersonId(): ?Uuid;

/**
* Change bitrix24 partner contact person
* Link Bitrix24 partner contact person
*
* Link Bitrix24 partner contact person if partner say he has new responsible for the application
*/
public function linkBitrix24PartnerContactPerson(Uuid $uuid): void;

/**
* Unlink Bitrix24 partner contact person
*
* Change bitrix24 partner contact person if partner say he has new responsible for the application
* Unlink Bitrix24 partner contacts the person if the partner says they remove this employee
*/
public function changeBitrix24PartnerContactPerson(?Uuid $uuid): void;
public function unlinkBitrix24PartnerContactPerson(): void;

/**
* @return Uuid|null get Bitrix24 Partner id related with this installation, optional
*/
public function getBitrix24PartnerId(): ?Uuid;

/**
* Change bitrix24 partner
* Link Bitrix24 partner
*
* Link Bitrix24 partner who supports this portal
*/
public function linkBitrix24Partner(Uuid $uuid): void;

/**
* Unlink Bitrix24 partner
*
* Change bitrix24 partner if other partner starts support client portal
* Unlink Bitrix24 partner who stops supporting this portal
*/
public function changeBitrix24Partner(?Uuid $uuid): void;
public function unlinkBitrix24Partner(): void;

/**
* Get external id for application installation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@
use Symfony\Component\Uid\Uuid;
use Symfony\Contracts\EventDispatcher\Event;

class ApplicationInstallationContactPersonChangedEvent extends Event
class ApplicationInstallationBitrix24PartnerContactPersonLinkedEvent extends Event
{
public function __construct(
public readonly Uuid $applicationInstallationId,
public readonly Uuid $applicationInstallationId,
public readonly CarbonImmutable $timestamp,
public readonly ?Uuid $previousContactPersonId,
public readonly ?Uuid $currentContactPersonId)
{
public readonly Uuid $bitrix24PartnerContactPersonId
) {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@
use Symfony\Component\Uid\Uuid;
use Symfony\Contracts\EventDispatcher\Event;

class ApplicationInstallationBitrix24PartnerContactPersonChangedEvent extends Event
class ApplicationInstallationBitrix24PartnerContactPersonUnlinkedEvent extends Event
{
public function __construct(
public readonly Uuid $applicationInstallationId,
public readonly Uuid $applicationInstallationId,
public readonly CarbonImmutable $timestamp,
public readonly ?Uuid $previousBitrix24PartnerContactPersonId,
public readonly ?Uuid $currentBitrix24PartnerContactPersonId)
{
public readonly Uuid $unlinkedBitrix24PartnerContactPersonId
) {
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

/**
* This file is part of the bitrix24-php-sdk package.
*
* © Maksim Mesilov <mesilov.maxim@gmail.com>
*
* For the full copyright and license information, please view the MIT-LICENSE.txt
* file that was distributed with this source code.
*/

declare(strict_types=1);

namespace Bitrix24\SDK\Application\Contracts\ApplicationInstallations\Events;

use Carbon\CarbonImmutable;
use Symfony\Component\Uid\Uuid;
use Symfony\Contracts\EventDispatcher\Event;

class ApplicationInstallationBitrix24PartnerLinkedEvent extends Event
{
public function __construct(
public readonly Uuid $applicationInstallationId,
public readonly CarbonImmutable $timestamp,
public readonly Uuid $bitrix24PartnerId
) {
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

/**
* This file is part of the bitrix24-php-sdk package.
*
* © Maksim Mesilov <mesilov.maxim@gmail.com>
*
* For the full copyright and license information, please view the MIT-LICENSE.txt
* file that was distributed with this source code.
*/

declare(strict_types=1);

namespace Bitrix24\SDK\Application\Contracts\ApplicationInstallations\Events;

use Carbon\CarbonImmutable;
use Symfony\Component\Uid\Uuid;
use Symfony\Contracts\EventDispatcher\Event;

class ApplicationInstallationBitrix24PartnerUnlinkedEvent extends Event
{
public function __construct(
public readonly Uuid $applicationInstallationId,
public readonly CarbonImmutable $timestamp,
public readonly Uuid $unlinkedBitrix24PartnerId
) {
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

/**
* This file is part of the bitrix24-php-sdk package.
*
* © Maksim Mesilov <mesilov.maxim@gmail.com>
*
* For the full copyright and license information, please view the MIT-LICENSE.txt
* file that was distributed with this source code.
*/

declare(strict_types=1);

namespace Bitrix24\SDK\Application\Contracts\ApplicationInstallations\Events;

use Carbon\CarbonImmutable;
use Symfony\Component\Uid\Uuid;
use Symfony\Contracts\EventDispatcher\Event;

class ApplicationInstallationContactPersonLinkedEvent extends Event
{
public function __construct(
public readonly Uuid $applicationInstallationId,
public readonly CarbonImmutable $timestamp,
public readonly Uuid $contactPersonId
) {
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

/**
* This file is part of the bitrix24-php-sdk package.
*
* © Maksim Mesilov <mesilov.maxim@gmail.com>
*
* For the full copyright and license information, please view the MIT-LICENSE.txt
* file that was distributed with this source code.
*/

declare(strict_types=1);

namespace Bitrix24\SDK\Application\Contracts\ApplicationInstallations\Events;

use Carbon\CarbonImmutable;
use Symfony\Component\Uid\Uuid;
use Symfony\Contracts\EventDispatcher\Event;

class ApplicationInstallationContactPersonUnlinkedEvent extends Event
{
public function __construct(
public readonly Uuid $applicationInstallationId,
public readonly CarbonImmutable $timestamp,
public readonly Uuid $unlinkedContactPersonId
) {
}
}
Loading