Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add batch support for crm-items #347

Merged
merged 7 commits into from
Aug 23, 2023
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
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
* `Bitrix24\SDK\Services\User\Service\User::get` - get user
* `Bitrix24\SDK\Services\User\Service\User::update` - update user
* `Bitrix24\SDK\Services\User\Service\User::search` - search users
* add [crm item support](https://github.com/mesilov/bitrix24-php-sdk/issues/330)
* add Duplicate search support for `Bitrix24\SDK\Services\CRM\Duplicates\Service\Duplicate`

### Changed

Expand All @@ -32,6 +34,16 @@
to `Bitrix24\SDK\Services\Telephony\Requests\Events\OnExternalCallStart\OnExternalCallStart`
* from `Bitrix24\SDK\Services\Telephony\Requests\Events\OnVoximplantCallEnd`
to `Bitrix24\SDK\Services\Telephony\Requests\Events\OnVoximplantCallEnd\OnVoximplantCallEnd`
* ❗Changes in `Bitrix24\SDK\Application\Contracts\Bitrix24Account\Bitrix24AccountInterface`:
* method `getContactPerson` renamed to `getContactPersonId`
* added method `getApplicationVersion`
* added method `updateApplicationVersion`
* added method `getApplicationScope`
* added method `applicationInstalled`
* added method `applicationUninstalled`
* added method `markAccountAsDeactivated`
* removed method `markAccountAsDeleted`
* changed method `markAccountAsActive` signature

### Bugfix

Expand Down
2 changes: 2 additions & 0 deletions bin/console
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env php
<?php

use Bitrix24\SDK\Tools\Commands\CopyPropertyValues;
use Bitrix24\SDK\Tools\Commands\GenerateContactsCommand;
use Bitrix24\SDK\Tools\Commands\PerformanceBenchmarks\ListCommand;
use Bitrix24\SDK\Tools\Commands\ShowFieldsDescriptionCommand;
Expand Down Expand Up @@ -53,4 +54,5 @@ $application = new Application();
$application->add(new GenerateContactsCommand($log));
$application->add(new ListCommand($log));
$application->add(new ShowFieldsDescriptionCommand($log));
$application->add(new CopyPropertyValues($log));
$application->run($input);
Original file line number Diff line number Diff line change
Expand Up @@ -4,69 +4,106 @@

namespace Bitrix24\SDK\Application\Contracts\Bitrix24Account;

use Bitrix24\SDK\Core\Credentials\Scope;
use Symfony\Component\Uid\Uuid;
use Bitrix24\SDK\Core\Response\DTO\RenewedAccessToken;

interface Bitrix24AccountInterface
{
/**
* @return \Symfony\Component\Uid\Uuid
* @return Uuid
*/
public function getId(): Uuid;

/**
* @return \Symfony\Component\Uid\Uuid
* @return Uuid
*/
public function getContactPerson(): Uuid;
public function getContactPersonId(): Uuid;

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

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

/**
* @return Bitrix24AccountStatus
*/
public function getStatus(): Bitrix24AccountStatus;

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

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

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

/**
* @param \Bitrix24\SDK\Core\Response\DTO\RenewedAccessToken $renewedAccessToken
* Get application version
*
* @return void
* @return int
*/
public function renewAccessToken(RenewedAccessToken $renewedAccessToken): void;
public function getApplicationVersion(): int;

/**
* @param string $newDomainUrl
* Update application version if application was updated in marketplace
*
* @param int $version
* @param Scope|null $newScope
* @return void
*/
public function changeDomainUrl(string $newDomainUrl): void;
public function updateApplicationVersion(int $version, ?Scope $newScope): void;

/**
* Switch account to Active status - installation is finalized
* Get application scope (permissions)
*
* @param string $applicationToken
* @return Scope
*/
public function getApplicationScope(): Scope;

/**
* @param RenewedAccessToken $renewedAccessToken
*
* @return void
*/
public function markAccountAsActive(string $applicationToken): void;
public function renewAccessToken(RenewedAccessToken $renewedAccessToken): void;

/**
* Change account status to Deleted
*
* @param string $applicationToken
* @param string $newDomainUrl
*
* @return void
*/
public function markAccountAsDeleted(string $applicationToken): void;
public function changeDomainUrl(string $newDomainUrl): void;

/**
* Application installed on portal and finish installation flow
*/
public function applicationInstalled(string $applicationToken): void;

/**
* Application uninstalled from portal
*/
public function applicationUninstalled(string $applicationToken): void;

/**
* Switch account to Active status
*/
public function markAccountAsActive(): void;

/**
* Change account status to Deactivated
*/
public function markAccountAsDeactivated(): void;
}
Loading