Skip to content

Feature/134-complete-scope-crm-vol-3 #136

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

Draft
wants to merge 10 commits into
base: dev
Choose a base branch
from

Conversation

ZoolanderX
Copy link

Q A
Bug fix? no
New feature? yes
Deprecations? no
Issues Feature#134
License MIT
  • Added service Services\AI\Engine\Service\Type with support methods:
    • crm.activity.type.add - method registers a custom activity type with a name and icon
    • crm.activity.type.delete - delete a custom activity type
    • crm.activity.type.list - get a list of custom task types
  • Added service Services\AI\Engine\Service\Communication with support methods:
    • crm.activity.communication.fields - get a description of the communication

@mesilov
Copy link
Collaborator

mesilov commented Apr 9, 2025

Great work!
Please fix some minor issues

@mesilov mesilov self-assigned this Apr 9, 2025
@mesilov mesilov added this to the Publish 1.4.0 milestone Apr 9, 2025
Copy link
Collaborator

@mesilov mesilov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, please fix some minor issues

*/
public function testAdd(): void
{
$activityTypeId = $this->activityTypeService->add(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For test add you must check

  1. is added type ok
  2. read added type
  3. compare some key fields


$res = $this->activityTypeService->list();

// Что за getActivities ?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, use English in comments

Copy link
Collaborator

@mesilov mesilov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great work!

}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ZoolanderX add to CHANGELOG.md line - fix typehint errors in src/Services/CRM/Activity/Result/ActivityItemResult.php

*/
class ActivityTypeResult extends AbstractCrmItem
{
public function getData(): array
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this method is redundant, you can get all raw data with

getIterator()->getArrayCopy() on resultItem

* @property-read string $TYPE
* @property-read string $VALUE
*/
class CommunicationResult extends AbstractCrmItem
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if this *item you must add Item prefix to class name.

please add new issue «find and add tool to check naming conversation», responsible - mesilov

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -17,11 +17,8 @@

class OpenLineActivityItemResult extends ActivityItemResult
{
/**
* @return \Bitrix24\SDK\Services\CRM\Activity\Result\OpenLine\OpenLineProviderParams
*/
public function getProviderParams(): OpenLineProviderParams
{
return new OpenLineProviderParams($this->PROVIDER_PARAMS['USER_CODE']);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please check typehints and fix phpstan error

@@ -17,9 +17,6 @@

class WebFormActivityItemResult extends ActivityItemResult
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please check typehints and fix phpstan error

/**
* This file is part of the bitrix24-php-sdk package.
*
* © Maksim Mesilov <[email protected]>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add own contacts

/**
* This file is part of the bitrix24-php-sdk package.
*
* © Maksim Mesilov <[email protected]>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix contacts to own

* @throws \Bitrix24\SDK\Core\Exceptions\BaseException
*/
#[\PHPUnit\Framework\Attributes\TestDox('Batch add deals')]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deals?

* @throws BaseException
* @throws TransportException
*/
#[\PHPUnit\Framework\Attributes\TestDox('Batch list deals')]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deals?

/**
* This file is part of the bitrix24-php-sdk package.
*
* © Maksim Mesilov <[email protected]>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix author to own contacts

@mesilov mesilov marked this pull request as draft April 16, 2025 19:29
@mesilov mesilov added the enhancement in SDK New feature or request in SDK label Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement in SDK New feature or request in SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants