|
55697
|
1200
|
48
|
2026-04-20T10:01:48.230700+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-20/1776 /Users/lukas/.screenpipe/data/data/2026-04-20/1776679308230_m2.jpg...
|
PhpStorm
|
faVsco.js – AskJiminnyReportActivityServiceTest.ph faVsco.js – AskJiminnyReportActivityServiceTest.php...
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Workspace associated with branch 'JY-18909-aut Workspace associated with branch 'JY-18909-automated-reports-ask-jiminny' has been restored
text/html
text/html
text/html
Rollback
Configure…
More
Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Listeners\Crm;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Str;
use Jiminny\Events\Playbooks\PlaybookCreated;
use Jiminny\Models\Crm\Field;
use Jiminny\Models\Crm\FieldValue;
use Jiminny\Models\PlaybookCategory;
use Jiminny\Repositories\Crm\FieldRepository;
use Jiminny\Repositories\PlaybookCategoryRepository;
use Illuminate\Contracts\Queue\ShouldQueue;
use Jiminny\Services\ResolveTeamCrmConnection;
use stdClass;
class ImportActivityTypes implements ShouldQueue
{
/**
* Create the event listener.
*/
public function __construct(
private readonly ResolveTeamCrmConnection $crmResolver,
private readonly FieldRepository $fieldRepository,
private readonly PlaybookCategoryRepository $repository,
) {
// nothing
}
/**
* Import the standard Event/Task Type picklist options from the CRM.
*/
public function handle(PlaybookCreated $event): void
{
$playbook = $event->playbook;
// Don't run if somehow we already have categories.
if ($playbook->getCategories()->isNotEmpty()) {
return;
}
$crmService = $this->crmResolver->resolveForTeam($playbook->getTeam());
$crmService->syncField($playbook->getActivityField());
$values = $crmService->importPicklistValues($playbook->getActivityField());
if (empty($values)) {
$values = $this->fetchActivityFieldValues($playbook->getActivityField());
}
/** @var stdClass{label: string} $value */
foreach ($values as $value) {
$data = [
'name' => $value->label,
'enabled' => true,
'type' => PlaybookCategory::TYPE_ALL,
];
if (Str::contains(strtolower($value->label), ['sms sent', 'sms out', 'text in'])) {
$data['type'] = PlaybookCategory::TYPE_SMS_OUTBOUND;
}
if (Str::contains(strtolower($value->label), ['sms received', 'sms in', 'text out'])) {
$data['type'] = PlaybookCategory::TYPE_SMS_INBOUND;
}
$this->repository->create($playbook, $data);
}
}
private function fetchActivityFieldValues(Field $field): Collection
{
/** @var Collection<FieldValue> */
return $this->fieldRepository->getPicklistValues($field);
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
3
3
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Services\Kiosk\AutomatedReports;
use Carbon\CarbonImmutable;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityActualDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityUpdatedDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\DealInsights\ClosingPeriodFilter;
use Jiminny\Component\ActivitySearch\FilterDefinitionCollection;
use Jiminny\Component\ActivitySearch\Service\ActivitySearch;
use Jiminny\Models\Activity\Search;
use Jiminny\Models\Activity\SearchFilter;
use Jiminny\Models\User;
use Jiminny\Repositories\ElasticActivityRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AskJiminnyReportActivityService;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Jiminny\VO\Repository\OnDemandActivitySearch\Criteria;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use Psr\Log\LoggerInterface;
class AskJiminnyReportActivityServiceTest extends TestCase
{
private ActivitySearch&MockObject $activitySearch;
private ElasticActivityRepository&MockObject $elasticRepository;
private LoggerInterface&MockObject $logger;
private AskJiminnyReportActivityService $service;
protected function setUp(): void
{
$this->activitySearch = $this->createMock(ActivitySearch::class);
$this->elasticRepository = $this->createMock(ElasticActivityRepository::class);
$this->logger = $this->createMock(LoggerInterface::class);
$this->service = new AskJiminnyReportActivityService(
$this->activitySearch,
$this->elasticRepository,
$this->logger,
);
}
private function makeFilter(string $key, ?string $value): SearchFilter&MockObject
{
$filter = $this->createMock(SearchFilter::class);
$filter->method('getFilterProperty')->willReturn($key);
$filter->method('getFilterValue')->willReturn($value);
return $filter;
}
private function makeUser(): User&MockObject
{
$tz = new \DateTimeZone('UTC');
$user = $this->createMock(User::class);
$user->method('getTimezone')->willReturn($tz);
$user->method('getId')->willReturn(1);
$user->method('getUuid')->willReturn('user-uuid');
return $user;
}
private function makeSavedSearch(array $filters): Search&MockObject
{
$savedSearch = $this->createMock(Search::class);
$savedSearch->method('getId')->willReturn(42);
$savedSearch->method('getFilters')->willReturn(new \Illuminate\Support\LazyCollection($filters));
return $savedSearch;
}
public function testGetActivityIdsForSavedSearchReturnsIds(): void
{
$user = $this->makeUser();
$savedSearch = $this->makeSavedSearch([]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->expects($this->once())
->method('getArrayFilterKeys')
->with($user)
->willReturn([]);
$this->activitySearch->expects($this->once())
->method('getOnDemandPageFilterSet')
->willReturn($filterSet);
$this->elasticRepository->expects($this->once())
->method('onDemandSearchIdsOnly')
->willReturn(['id-1', 'id-2', 'id-3']);
$this->logger->expects($this->once())
->method('info')
->with('[AskJiminnyReport] Fetched activity IDs for saved search');
$result = $this->service->getActivityIdsForSavedSearch($savedSearch, $user);
$this->assertEquals(['id-1', 'id-2', 'id-3'], $result);
}
public function testGetActivityIdsForSavedSearchReturnsEmptyWhenNoResults(): void
{
$user = $this->makeUser();
$savedSearch = $this->makeSavedSearch([]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn([]);
$this->activitySearch->method('getOnDemandPageFilterSet')->willReturn($filterSet);
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);
$this->logger->expects($this->once())->method('info');
$result = $this->service->getActivityIdsForSavedSearch($savedSearch, $user);
$this->assertEmpty($result);
}
public function testGetActivityIdsFiltersOutDateFilters(): void
{
$user = $this->makeUser();
$nonDateFilter = $this->makeFilter('owner_id', '123');
$startDateFilter = $this->makeFilter(ActivityActualDate::PARAM_START_DATE, '2025-01-01 00:00:00');
$endDateFilter = $this->makeFilter(ActivityActualDate::PARAM_END_DATE, '2025-01-31 23:59:59');
$updatedFromFilter = $this->makeFilter(ActivityUpdatedDate::PARAM_UPDATED_FROM, '2025-01-01 00:00:00');
$updatedToFilter = $this->makeFilter(ActivityUpdatedDate::PARAM_UPDATED_TO, '2025-01-31 23:59:59');
$savedSearch = $this->makeSavedSearch([
$nonDateFilter,
$startDateFilter,
$endDateFilter,
$updatedFromFilter,
$updatedToFilter,
]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn([]);
$capturedCriteria = null;
$this->activitySearch->expects($this->once())
->method('getOnDemandPageFilterSet')
->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {
$capturedCriteria = $criteria;
return $filterSet;
});
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);
$this->logger->method('info');
$this->service->getActivityIdsForSavedSearch($savedSearch, $user);
$this->assertNotNull($capturedCriteria);
}
public function testGetActivityIdsFiltersOutClosingPeriodDateFilters(): void
{
$user = $this->makeUser();
$closingStartFilter = $this->makeFilter(ClosingPeriodFilter::KEY_START_DATE, '2025-01-01');
$closingEndFilter = $this->makeFilter(ClosingPeriodFilter::KEY_END_DATE, '2025-03-31');
$regularFilter = $this->makeFilter('rep_id', '99');
$savedSearch = $this->makeSavedSearch([
$closingStartFilter,
$closingEndFilter,
$regularFilter,
]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn([]);
$this->activitySearch->expects($this->once())
->method('getOnDemandPageFilterSet')
->willReturn($filterSet);
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn(['id-1']);
$this->logger->method('info');
$result = $this->service->getActivityIdsForSavedSearch($savedSearch, $user);
$this->assertEquals(['id-1'], $result);
}
public function testGetActivityIdsHandlesArrayFilters(): void
{
$user = $this->makeUser();
$filter1 = $this->makeFilter('outcome', 'positive');
$filter2 = $this->makeFilter('outcome', 'negative');
$savedSearch = $this->makeSavedSearch([$filter1, $filter2]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn(['outcome']);
$this->activitySearch->method('getOnDemandPageFilterSet')->willReturn($filterSet);
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn(['id-1']);
$this->logger->method('info');
$result = $this->service->getActivityIdsForSavedSearch($savedSearch, $user);
$this->assertEquals(['id-1'], $result);
}
public function testGetActivityIdsHandlesScalarFilters(): void
{
$user = $this->makeUser();
$filter = $this->makeFilter('direction', 'inbound');
$savedSearch = $this->makeSavedSearch([$filter]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn([]);
$this->activitySearch->method('getOnDemandPageFilterSet')->willReturn($filterSet);
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn(['id-5']);
$this->logger->method('info');
$result = $this->service->getActivityIdsForSavedSearch($savedSearch, $user);
$this->assertEquals(['id-5'], $result);
}
public function testGetActivityIdsPassesNonZeroSequenceNumberToDisableFirstRequestDefaults(): void
{
$user = $this->makeUser();
$savedSearch = $this->makeSavedSearch([]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn([]);
$capturedCriteria = null;
$this->activitySearch->expects($this->once())
->method('getOnDemandPageFilterSet')
->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {
$capturedCriteria = $criteria;
return $filterSet;
});
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);
$this->logger->method('info');
$this->service->getActivityIdsForSavedSearch($savedSearch, $user);
$this->assertNotNull($capturedCriteria);
$this->assertFalse($capturedCriteria->isFirstRequest());
}
public function testGetActivityIdsLogsWithCorrectContext(): void
{
$user = $this->makeUser();
$savedSearch = $this->makeSavedSearch([]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn([]);
$this->activitySearch->method('getOnDemandPageFilterSet')->willReturn($filterSet);
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn(['a', 'b']);
$this->logger->expects($this->once())
->method('info')
->with(
'[AskJiminnyReport] Fetched activity IDs for saved search',
$this->callback(fn ($context) => $context['saved_search_id'] === 42
&& $context['user_id'] === 1
&& $context['activity_count'] === 2)
);
$this->service->getActivityIdsForSavedSearch($savedSearch, $user);
}
public static function frequencyDateRangeProvider(): array
{
return [
'daily' => [
AutomatedReportsService::FREQUENCY_DAILY,
'2025-06-15 00:00:00',
'2025-06-15 23:59:59',
],
'weekly' => [
AutomatedReportsService::FREQUENCY_WEEKLY,
'2025-06-09 00:00:00',
'2025-06-15 23:59:59',
],
'monthly' => [
AutomatedReportsService::FREQUENCY_MONTHLY,
'2025-05-01 00:00:00',
'2025-05-31 23:59:59',
],
'quarterly' => [
AutomatedReportsService::FREQUENCY_QUARTERLY,
'2025-01-01 00:00:00',
'2025-03-31 23:59:59',
],
];
}
/**
* @dataProvider frequencyDateRangeProvider
*/
public function testGetActivityIdsInjectsDateRangeForFrequency(
string $frequency,
string $expectedStartDate,
string $expectedEndDate,
): void {
CarbonImmutable::setTestNow('2025-06-16 12:00:00');
try {
$user = $this->makeUser();
$savedSearch = $this->makeSavedSearch([]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn([]);
$this->logger->method('info');
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);
$capturedCriteria = null;
$this->activitySearch->expects($this->once())
->method('getOnDemandPageFilterSet')
->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {
$capturedCriteria = $criteria;
return $filterSet;
});
$this->service->getActivityIdsForSavedSearch($savedSearch, $user, $frequency);
$this->assertNotNull($capturedCriteria);
$this->assertSame($expectedStartDate, $capturedCriteria->getStartDate()->format('Y-m-d H:i:s'));
$this->assertSame($expectedEndDate, $capturedCriteria->getEndDate()->format('Y-m-d H:i:s'));
} finally {
CarbonImmutable::setTestNow();
}
}
public function testGetActivityIdsWithNullFrequencyDoesNotInjectDates(): void
{
$user = $this->makeUser();
$savedSearch = $this->makeSavedSearch([]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn([]);
$this->logger->method('info');
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);
$capturedCriteria = null;
$this->activitySearch->expects($this->once())
->method('getOnDemandPageFilterSet')
->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {
$capturedCriteria = $criteria;
return $filterSet;
});
$this->service->getActivityIdsForSavedSearch($savedSearch, $user, null);
$this->assertNotNull($capturedCriteria);
$this->assertNull($capturedCriteria->getStartDate());
$this->assertNull($capturedCriteria->getEndDate());
}
public function testGetActivityIdsWithUnknownFrequencyDoesNotInjectDates(): void
{
$user = $this->makeUser();
$savedSearch = $this->makeSavedSearch([]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn([]);
$this->logger->method('info');
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);
$capturedCriteria = null;
$this->activitySearch->expects($this->once())
->method('getOnDemandPageFilterSet')
->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {
$capturedCriteria = $criteria;
return $filterSet;
});
$this->service->getActivityIdsForSavedSearch($savedSearch, $user, AutomatedReportsService::FREQUENCY_ONE_OFF);
$this->assertNotNull($capturedCriteria);
$this->assertNull($capturedCriteria->getStartDate());
$this->assertNull($capturedCriteria->getEndDate());
}
public function testGetActivityIdsFrequencyDateRangeOverridesSavedSearchDateFilters(): void
{
CarbonImmutable::setTestNow('2025-06-16 12:00:00');
try {
$user = $this->makeUser();
$startDateFilter = $this->makeFilter(ActivityActualDate::PARAM_START_DATE, '2024-01-01 00:00:00');
$endDateFilter = $this->makeFilter(ActivityActualDate::PARAM_END_DATE, '2024-12-31 23:59:59');
$savedSearch = $this->makeSavedSearch([$startDateFilter, $endDateFilter]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn([]);
$this->logger->method('info');
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);
$capturedCriteria = null;
$this->activitySearch->expects($this->once())
->method('getOnDemandPageFilterSet')
->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {
$capturedCriteria = $criteria;
return $filterSet;
});
$this->service->getActivityIdsForSavedSearch($savedSearch, $user, AutomatedReportsService::FREQUENCY_DAILY);
$this->assertNotNull($capturedCriteria);
$this->assertSame('2025-06-15 00:00:00', $capturedCriteria->getStartDate()->format('Y-m-d H:i:s'));
$this->assertSame('2025-06-15 23:59:59', $capturedCriteria->getEndDate()->format('Y-m-d H:i:s'));
} finally {
CarbonImmutable::setTestNow();
}
}
}
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide
app ~/jiminny/app
.circleci
.cursor
.github
.sonarlint
.vscode
.windsurf
app, sources root
Actions
Component
Configuration
Console
Commands
Activities
Analytics
Calendars
Crm
DealInsights
Dev
Dialers
DTOs
Elasticsearch
EngagementStats
GeckoExport
Livestream
Mailboxes
Migrate
PlaybackThemes
Playbooks
Playlists
Postmark
ProphetAi
Reports
AutomatedReportsCommand.php, class
AutomatedReportsRetentionPolicyCommand.php, class
AutomatedReportsSendCommand.php, class
CreateMockAskJiminnyReportResultCommand.php, class
DeleteReportCommand.php, class
GenerateMarketingReport.php, class
Team.php, class
Usage.php, class
Slack
Teams
Tracks
Transcription
Twilio
Users
Vocabulary
Zoom
CoachingFeedbacksUpdateEsActivities.php, class
Command.php, class
CreateDatabaseUsers.php, class
DatabaseTableCount.php, class
DeleteOldAiCrmNotesCommand.php, class
DeleteS3LeftoversCommand.php, class
DevPostmanCommand.php, final class...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Workspace associated with branch 'JY-18909-automated-reports-ask-jiminny' has been restored","depth":3,"bounds":{"left":0.8753325,"top":0.9018356,"width":0.11037234,"height":0.040702313},"value":"Workspace associated with branch 'JY-18909-automated-reports-ask-jiminny' has been restored","help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"bounds":{"left":0.8753325,"top":0.9018356,"width":0.09773936,"height":0.040702313},"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"Rollback","depth":2,"bounds":{"left":0.8753325,"top":0.9481245,"width":0.017287234,"height":0.013567438},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"Configure…","depth":2,"bounds":{"left":0.89793885,"top":0.9481245,"width":0.023603724,"height":0.013567438},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"More","depth":2,"bounds":{"left":0.27027926,"top":1.0,"width":0.016289894,"height":0.0},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.12134308,"height":0.025538707},"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"bounds":{"left":0.7972075,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"RequestGenerateAskJiminnyReportJobTest","depth":6,"bounds":{"left":0.8125,"top":0.019952115,"width":0.10305851,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9381649,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96609044,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9773936,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9886968,"top":0.019952115,"width":0.011303186,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.3793218,"top":0.22426178,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.38896278,"top":0.22266561,"width":0.00731383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.3962766,"top":0.22266561,"width":0.006981383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\nnamespace Jiminny\\Listeners\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Str;\nuse Jiminny\\Events\\Playbooks\\PlaybookCreated;\nuse Jiminny\\Models\\Crm\\Field;\nuse Jiminny\\Models\\Crm\\FieldValue;\nuse Jiminny\\Models\\PlaybookCategory;\nuse Jiminny\\Repositories\\Crm\\FieldRepository;\nuse Jiminny\\Repositories\\PlaybookCategoryRepository;\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\nuse Jiminny\\Services\\ResolveTeamCrmConnection;\nuse stdClass;\n\nclass ImportActivityTypes implements ShouldQueue\n{\n /**\n * Create the event listener.\n */\n public function __construct(\n private readonly ResolveTeamCrmConnection $crmResolver,\n private readonly FieldRepository $fieldRepository,\n private readonly PlaybookCategoryRepository $repository,\n ) {\n // nothing\n }\n\n /**\n * Import the standard Event/Task Type picklist options from the CRM.\n */\n public function handle(PlaybookCreated $event): void\n {\n $playbook = $event->playbook;\n\n // Don't run if somehow we already have categories.\n if ($playbook->getCategories()->isNotEmpty()) {\n return;\n }\n\n $crmService = $this->crmResolver->resolveForTeam($playbook->getTeam());\n $crmService->syncField($playbook->getActivityField());\n\n $values = $crmService->importPicklistValues($playbook->getActivityField());\n\n if (empty($values)) {\n $values = $this->fetchActivityFieldValues($playbook->getActivityField());\n }\n\n /** @var stdClass{label: string} $value */\n foreach ($values as $value) {\n $data = [\n 'name' => $value->label,\n 'enabled' => true,\n 'type' => PlaybookCategory::TYPE_ALL,\n ];\n\n if (Str::contains(strtolower($value->label), ['sms sent', 'sms out', 'text in'])) {\n $data['type'] = PlaybookCategory::TYPE_SMS_OUTBOUND;\n }\n\n if (Str::contains(strtolower($value->label), ['sms received', 'sms in', 'text out'])) {\n $data['type'] = PlaybookCategory::TYPE_SMS_INBOUND;\n }\n\n $this->repository->create($playbook, $data);\n }\n }\n\n private function fetchActivityFieldValues(Field $field): Collection\n {\n /** @var Collection<FieldValue> */\n return $this->fieldRepository->getPicklistValues($field);\n }\n}","depth":4,"value":"<?php\n\nnamespace Jiminny\\Listeners\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Str;\nuse Jiminny\\Events\\Playbooks\\PlaybookCreated;\nuse Jiminny\\Models\\Crm\\Field;\nuse Jiminny\\Models\\Crm\\FieldValue;\nuse Jiminny\\Models\\PlaybookCategory;\nuse Jiminny\\Repositories\\Crm\\FieldRepository;\nuse Jiminny\\Repositories\\PlaybookCategoryRepository;\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\nuse Jiminny\\Services\\ResolveTeamCrmConnection;\nuse stdClass;\n\nclass ImportActivityTypes implements ShouldQueue\n{\n /**\n * Create the event listener.\n */\n public function __construct(\n private readonly ResolveTeamCrmConnection $crmResolver,\n private readonly FieldRepository $fieldRepository,\n private readonly PlaybookCategoryRepository $repository,\n ) {\n // nothing\n }\n\n /**\n * Import the standard Event/Task Type picklist options from the CRM.\n */\n public function handle(PlaybookCreated $event): void\n {\n $playbook = $event->playbook;\n\n // Don't run if somehow we already have categories.\n if ($playbook->getCategories()->isNotEmpty()) {\n return;\n }\n\n $crmService = $this->crmResolver->resolveForTeam($playbook->getTeam());\n $crmService->syncField($playbook->getActivityField());\n\n $values = $crmService->importPicklistValues($playbook->getActivityField());\n\n if (empty($values)) {\n $values = $this->fetchActivityFieldValues($playbook->getActivityField());\n }\n\n /** @var stdClass{label: string} $value */\n foreach ($values as $value) {\n $data = [\n 'name' => $value->label,\n 'enabled' => true,\n 'type' => PlaybookCategory::TYPE_ALL,\n ];\n\n if (Str::contains(strtolower($value->label), ['sms sent', 'sms out', 'text in'])) {\n $data['type'] = PlaybookCategory::TYPE_SMS_OUTBOUND;\n }\n\n if (Str::contains(strtolower($value->label), ['sms received', 'sms in', 'text out'])) {\n $data['type'] = PlaybookCategory::TYPE_SMS_INBOUND;\n }\n\n $this->repository->create($playbook, $data);\n }\n }\n\n private function fetchActivityFieldValues(Field $field): Collection\n {\n /** @var Collection<FieldValue> */\n return $this->fieldRepository->getPicklistValues($field);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"3","depth":4,"bounds":{"left":0.69514626,"top":0.10055866,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"3","depth":4,"bounds":{"left":0.70511967,"top":0.10055866,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.71476066,"top":0.09896249,"width":0.00731383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.72207445,"top":0.09896249,"width":0.006981383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Services\\Kiosk\\AutomatedReports;\n\nuse Carbon\\CarbonImmutable;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityActualDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityUpdatedDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\DealInsights\\ClosingPeriodFilter;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinitionCollection;\nuse Jiminny\\Component\\ActivitySearch\\Service\\ActivitySearch;\nuse Jiminny\\Models\\Activity\\Search;\nuse Jiminny\\Models\\Activity\\SearchFilter;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\ElasticActivityRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AskJiminnyReportActivityService;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Jiminny\\VO\\Repository\\OnDemandActivitySearch\\Criteria;\nuse PHPUnit\\Framework\\MockObject\\MockObject;\nuse PHPUnit\\Framework\\TestCase;\nuse Psr\\Log\\LoggerInterface;\n\nclass AskJiminnyReportActivityServiceTest extends TestCase\n{\n private ActivitySearch&MockObject $activitySearch;\n private ElasticActivityRepository&MockObject $elasticRepository;\n private LoggerInterface&MockObject $logger;\n private AskJiminnyReportActivityService $service;\n\n protected function setUp(): void\n {\n $this->activitySearch = $this->createMock(ActivitySearch::class);\n $this->elasticRepository = $this->createMock(ElasticActivityRepository::class);\n $this->logger = $this->createMock(LoggerInterface::class);\n\n $this->service = new AskJiminnyReportActivityService(\n $this->activitySearch,\n $this->elasticRepository,\n $this->logger,\n );\n }\n\n private function makeFilter(string $key, ?string $value): SearchFilter&MockObject\n {\n $filter = $this->createMock(SearchFilter::class);\n $filter->method('getFilterProperty')->willReturn($key);\n $filter->method('getFilterValue')->willReturn($value);\n\n return $filter;\n }\n\n private function makeUser(): User&MockObject\n {\n $tz = new \\DateTimeZone('UTC');\n $user = $this->createMock(User::class);\n $user->method('getTimezone')->willReturn($tz);\n $user->method('getId')->willReturn(1);\n $user->method('getUuid')->willReturn('user-uuid');\n\n return $user;\n }\n\n private function makeSavedSearch(array $filters): Search&MockObject\n {\n $savedSearch = $this->createMock(Search::class);\n $savedSearch->method('getId')->willReturn(42);\n $savedSearch->method('getFilters')->willReturn(new \\Illuminate\\Support\\LazyCollection($filters));\n\n return $savedSearch;\n }\n\n public function testGetActivityIdsForSavedSearchReturnsIds(): void\n {\n $user = $this->makeUser();\n $savedSearch = $this->makeSavedSearch([]);\n\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->expects($this->once())\n ->method('getArrayFilterKeys')\n ->with($user)\n ->willReturn([]);\n\n $this->activitySearch->expects($this->once())\n ->method('getOnDemandPageFilterSet')\n ->willReturn($filterSet);\n\n $this->elasticRepository->expects($this->once())\n ->method('onDemandSearchIdsOnly')\n ->willReturn(['id-1', 'id-2', 'id-3']);\n\n $this->logger->expects($this->once())\n ->method('info')\n ->with('[AskJiminnyReport] Fetched activity IDs for saved search');\n\n $result = $this->service->getActivityIdsForSavedSearch($savedSearch, $user);\n\n $this->assertEquals(['id-1', 'id-2', 'id-3'], $result);\n }\n\n public function testGetActivityIdsForSavedSearchReturnsEmptyWhenNoResults(): void\n {\n $user = $this->makeUser();\n $savedSearch = $this->makeSavedSearch([]);\n\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn([]);\n $this->activitySearch->method('getOnDemandPageFilterSet')->willReturn($filterSet);\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);\n\n $this->logger->expects($this->once())->method('info');\n\n $result = $this->service->getActivityIdsForSavedSearch($savedSearch, $user);\n\n $this->assertEmpty($result);\n }\n\n public function testGetActivityIdsFiltersOutDateFilters(): void\n {\n $user = $this->makeUser();\n\n $nonDateFilter = $this->makeFilter('owner_id', '123');\n $startDateFilter = $this->makeFilter(ActivityActualDate::PARAM_START_DATE, '2025-01-01 00:00:00');\n $endDateFilter = $this->makeFilter(ActivityActualDate::PARAM_END_DATE, '2025-01-31 23:59:59');\n $updatedFromFilter = $this->makeFilter(ActivityUpdatedDate::PARAM_UPDATED_FROM, '2025-01-01 00:00:00');\n $updatedToFilter = $this->makeFilter(ActivityUpdatedDate::PARAM_UPDATED_TO, '2025-01-31 23:59:59');\n\n $savedSearch = $this->makeSavedSearch([\n $nonDateFilter,\n $startDateFilter,\n $endDateFilter,\n $updatedFromFilter,\n $updatedToFilter,\n ]);\n\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn([]);\n\n $capturedCriteria = null;\n $this->activitySearch->expects($this->once())\n ->method('getOnDemandPageFilterSet')\n ->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {\n $capturedCriteria = $criteria;\n\n return $filterSet;\n });\n\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);\n $this->logger->method('info');\n\n $this->service->getActivityIdsForSavedSearch($savedSearch, $user);\n\n $this->assertNotNull($capturedCriteria);\n }\n\n public function testGetActivityIdsFiltersOutClosingPeriodDateFilters(): void\n {\n $user = $this->makeUser();\n\n $closingStartFilter = $this->makeFilter(ClosingPeriodFilter::KEY_START_DATE, '2025-01-01');\n $closingEndFilter = $this->makeFilter(ClosingPeriodFilter::KEY_END_DATE, '2025-03-31');\n $regularFilter = $this->makeFilter('rep_id', '99');\n\n $savedSearch = $this->makeSavedSearch([\n $closingStartFilter,\n $closingEndFilter,\n $regularFilter,\n ]);\n\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn([]);\n $this->activitySearch->expects($this->once())\n ->method('getOnDemandPageFilterSet')\n ->willReturn($filterSet);\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn(['id-1']);\n $this->logger->method('info');\n\n $result = $this->service->getActivityIdsForSavedSearch($savedSearch, $user);\n\n $this->assertEquals(['id-1'], $result);\n }\n\n public function testGetActivityIdsHandlesArrayFilters(): void\n {\n $user = $this->makeUser();\n\n $filter1 = $this->makeFilter('outcome', 'positive');\n $filter2 = $this->makeFilter('outcome', 'negative');\n\n $savedSearch = $this->makeSavedSearch([$filter1, $filter2]);\n\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn(['outcome']);\n $this->activitySearch->method('getOnDemandPageFilterSet')->willReturn($filterSet);\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn(['id-1']);\n $this->logger->method('info');\n\n $result = $this->service->getActivityIdsForSavedSearch($savedSearch, $user);\n\n $this->assertEquals(['id-1'], $result);\n }\n\n public function testGetActivityIdsHandlesScalarFilters(): void\n {\n $user = $this->makeUser();\n\n $filter = $this->makeFilter('direction', 'inbound');\n $savedSearch = $this->makeSavedSearch([$filter]);\n\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn([]);\n $this->activitySearch->method('getOnDemandPageFilterSet')->willReturn($filterSet);\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn(['id-5']);\n $this->logger->method('info');\n\n $result = $this->service->getActivityIdsForSavedSearch($savedSearch, $user);\n\n $this->assertEquals(['id-5'], $result);\n }\n\n public function testGetActivityIdsPassesNonZeroSequenceNumberToDisableFirstRequestDefaults(): void\n {\n $user = $this->makeUser();\n $savedSearch = $this->makeSavedSearch([]);\n\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn([]);\n\n $capturedCriteria = null;\n $this->activitySearch->expects($this->once())\n ->method('getOnDemandPageFilterSet')\n ->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {\n $capturedCriteria = $criteria;\n\n return $filterSet;\n });\n\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);\n $this->logger->method('info');\n\n $this->service->getActivityIdsForSavedSearch($savedSearch, $user);\n\n $this->assertNotNull($capturedCriteria);\n $this->assertFalse($capturedCriteria->isFirstRequest());\n }\n\n public function testGetActivityIdsLogsWithCorrectContext(): void\n {\n $user = $this->makeUser();\n $savedSearch = $this->makeSavedSearch([]);\n\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn([]);\n $this->activitySearch->method('getOnDemandPageFilterSet')->willReturn($filterSet);\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn(['a', 'b']);\n\n $this->logger->expects($this->once())\n ->method('info')\n ->with(\n '[AskJiminnyReport] Fetched activity IDs for saved search',\n $this->callback(fn ($context) => $context['saved_search_id'] === 42\n && $context['user_id'] === 1\n && $context['activity_count'] === 2)\n );\n\n $this->service->getActivityIdsForSavedSearch($savedSearch, $user);\n }\n\n public static function frequencyDateRangeProvider(): array\n {\n return [\n 'daily' => [\n AutomatedReportsService::FREQUENCY_DAILY,\n '2025-06-15 00:00:00',\n '2025-06-15 23:59:59',\n ],\n 'weekly' => [\n AutomatedReportsService::FREQUENCY_WEEKLY,\n '2025-06-09 00:00:00',\n '2025-06-15 23:59:59',\n ],\n 'monthly' => [\n AutomatedReportsService::FREQUENCY_MONTHLY,\n '2025-05-01 00:00:00',\n '2025-05-31 23:59:59',\n ],\n 'quarterly' => [\n AutomatedReportsService::FREQUENCY_QUARTERLY,\n '2025-01-01 00:00:00',\n '2025-03-31 23:59:59',\n ],\n ];\n }\n\n /**\n * @dataProvider frequencyDateRangeProvider\n */\n public function testGetActivityIdsInjectsDateRangeForFrequency(\n string $frequency,\n string $expectedStartDate,\n string $expectedEndDate,\n ): void {\n CarbonImmutable::setTestNow('2025-06-16 12:00:00');\n\n try {\n $user = $this->makeUser();\n $savedSearch = $this->makeSavedSearch([]);\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn([]);\n $this->logger->method('info');\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);\n\n $capturedCriteria = null;\n $this->activitySearch->expects($this->once())\n ->method('getOnDemandPageFilterSet')\n ->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {\n $capturedCriteria = $criteria;\n\n return $filterSet;\n });\n\n $this->service->getActivityIdsForSavedSearch($savedSearch, $user, $frequency);\n\n $this->assertNotNull($capturedCriteria);\n $this->assertSame($expectedStartDate, $capturedCriteria->getStartDate()->format('Y-m-d H:i:s'));\n $this->assertSame($expectedEndDate, $capturedCriteria->getEndDate()->format('Y-m-d H:i:s'));\n } finally {\n CarbonImmutable::setTestNow();\n }\n }\n\n public function testGetActivityIdsWithNullFrequencyDoesNotInjectDates(): void\n {\n $user = $this->makeUser();\n $savedSearch = $this->makeSavedSearch([]);\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn([]);\n $this->logger->method('info');\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);\n\n $capturedCriteria = null;\n $this->activitySearch->expects($this->once())\n ->method('getOnDemandPageFilterSet')\n ->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {\n $capturedCriteria = $criteria;\n\n return $filterSet;\n });\n\n $this->service->getActivityIdsForSavedSearch($savedSearch, $user, null);\n\n $this->assertNotNull($capturedCriteria);\n $this->assertNull($capturedCriteria->getStartDate());\n $this->assertNull($capturedCriteria->getEndDate());\n }\n\n public function testGetActivityIdsWithUnknownFrequencyDoesNotInjectDates(): void\n {\n $user = $this->makeUser();\n $savedSearch = $this->makeSavedSearch([]);\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn([]);\n $this->logger->method('info');\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);\n\n $capturedCriteria = null;\n $this->activitySearch->expects($this->once())\n ->method('getOnDemandPageFilterSet')\n ->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {\n $capturedCriteria = $criteria;\n\n return $filterSet;\n });\n\n $this->service->getActivityIdsForSavedSearch($savedSearch, $user, AutomatedReportsService::FREQUENCY_ONE_OFF);\n\n $this->assertNotNull($capturedCriteria);\n $this->assertNull($capturedCriteria->getStartDate());\n $this->assertNull($capturedCriteria->getEndDate());\n }\n\n public function testGetActivityIdsFrequencyDateRangeOverridesSavedSearchDateFilters(): void\n {\n CarbonImmutable::setTestNow('2025-06-16 12:00:00');\n\n try {\n $user = $this->makeUser();\n\n $startDateFilter = $this->makeFilter(ActivityActualDate::PARAM_START_DATE, '2024-01-01 00:00:00');\n $endDateFilter = $this->makeFilter(ActivityActualDate::PARAM_END_DATE, '2024-12-31 23:59:59');\n $savedSearch = $this->makeSavedSearch([$startDateFilter, $endDateFilter]);\n\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn([]);\n $this->logger->method('info');\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);\n\n $capturedCriteria = null;\n $this->activitySearch->expects($this->once())\n ->method('getOnDemandPageFilterSet')\n ->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {\n $capturedCriteria = $criteria;\n\n return $filterSet;\n });\n\n $this->service->getActivityIdsForSavedSearch($savedSearch, $user, AutomatedReportsService::FREQUENCY_DAILY);\n\n $this->assertNotNull($capturedCriteria);\n $this->assertSame('2025-06-15 00:00:00', $capturedCriteria->getStartDate()->format('Y-m-d H:i:s'));\n $this->assertSame('2025-06-15 23:59:59', $capturedCriteria->getEndDate()->format('Y-m-d H:i:s'));\n } finally {\n CarbonImmutable::setTestNow();\n }\n }\n}","depth":4,"bounds":{"left":0.42519948,"top":0.09736632,"width":0.30352393,"height":0.90263367},"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Services\\Kiosk\\AutomatedReports;\n\nuse Carbon\\CarbonImmutable;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityActualDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityUpdatedDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\DealInsights\\ClosingPeriodFilter;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinitionCollection;\nuse Jiminny\\Component\\ActivitySearch\\Service\\ActivitySearch;\nuse Jiminny\\Models\\Activity\\Search;\nuse Jiminny\\Models\\Activity\\SearchFilter;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\ElasticActivityRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AskJiminnyReportActivityService;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Jiminny\\VO\\Repository\\OnDemandActivitySearch\\Criteria;\nuse PHPUnit\\Framework\\MockObject\\MockObject;\nuse PHPUnit\\Framework\\TestCase;\nuse Psr\\Log\\LoggerInterface;\n\nclass AskJiminnyReportActivityServiceTest extends TestCase\n{\n private ActivitySearch&MockObject $activitySearch;\n private ElasticActivityRepository&MockObject $elasticRepository;\n private LoggerInterface&MockObject $logger;\n private AskJiminnyReportActivityService $service;\n\n protected function setUp(): void\n {\n $this->activitySearch = $this->createMock(ActivitySearch::class);\n $this->elasticRepository = $this->createMock(ElasticActivityRepository::class);\n $this->logger = $this->createMock(LoggerInterface::class);\n\n $this->service = new AskJiminnyReportActivityService(\n $this->activitySearch,\n $this->elasticRepository,\n $this->logger,\n );\n }\n\n private function makeFilter(string $key, ?string $value): SearchFilter&MockObject\n {\n $filter = $this->createMock(SearchFilter::class);\n $filter->method('getFilterProperty')->willReturn($key);\n $filter->method('getFilterValue')->willReturn($value);\n\n return $filter;\n }\n\n private function makeUser(): User&MockObject\n {\n $tz = new \\DateTimeZone('UTC');\n $user = $this->createMock(User::class);\n $user->method('getTimezone')->willReturn($tz);\n $user->method('getId')->willReturn(1);\n $user->method('getUuid')->willReturn('user-uuid');\n\n return $user;\n }\n\n private function makeSavedSearch(array $filters): Search&MockObject\n {\n $savedSearch = $this->createMock(Search::class);\n $savedSearch->method('getId')->willReturn(42);\n $savedSearch->method('getFilters')->willReturn(new \\Illuminate\\Support\\LazyCollection($filters));\n\n return $savedSearch;\n }\n\n public function testGetActivityIdsForSavedSearchReturnsIds(): void\n {\n $user = $this->makeUser();\n $savedSearch = $this->makeSavedSearch([]);\n\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->expects($this->once())\n ->method('getArrayFilterKeys')\n ->with($user)\n ->willReturn([]);\n\n $this->activitySearch->expects($this->once())\n ->method('getOnDemandPageFilterSet')\n ->willReturn($filterSet);\n\n $this->elasticRepository->expects($this->once())\n ->method('onDemandSearchIdsOnly')\n ->willReturn(['id-1', 'id-2', 'id-3']);\n\n $this->logger->expects($this->once())\n ->method('info')\n ->with('[AskJiminnyReport] Fetched activity IDs for saved search');\n\n $result = $this->service->getActivityIdsForSavedSearch($savedSearch, $user);\n\n $this->assertEquals(['id-1', 'id-2', 'id-3'], $result);\n }\n\n public function testGetActivityIdsForSavedSearchReturnsEmptyWhenNoResults(): void\n {\n $user = $this->makeUser();\n $savedSearch = $this->makeSavedSearch([]);\n\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn([]);\n $this->activitySearch->method('getOnDemandPageFilterSet')->willReturn($filterSet);\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);\n\n $this->logger->expects($this->once())->method('info');\n\n $result = $this->service->getActivityIdsForSavedSearch($savedSearch, $user);\n\n $this->assertEmpty($result);\n }\n\n public function testGetActivityIdsFiltersOutDateFilters(): void\n {\n $user = $this->makeUser();\n\n $nonDateFilter = $this->makeFilter('owner_id', '123');\n $startDateFilter = $this->makeFilter(ActivityActualDate::PARAM_START_DATE, '2025-01-01 00:00:00');\n $endDateFilter = $this->makeFilter(ActivityActualDate::PARAM_END_DATE, '2025-01-31 23:59:59');\n $updatedFromFilter = $this->makeFilter(ActivityUpdatedDate::PARAM_UPDATED_FROM, '2025-01-01 00:00:00');\n $updatedToFilter = $this->makeFilter(ActivityUpdatedDate::PARAM_UPDATED_TO, '2025-01-31 23:59:59');\n\n $savedSearch = $this->makeSavedSearch([\n $nonDateFilter,\n $startDateFilter,\n $endDateFilter,\n $updatedFromFilter,\n $updatedToFilter,\n ]);\n\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn([]);\n\n $capturedCriteria = null;\n $this->activitySearch->expects($this->once())\n ->method('getOnDemandPageFilterSet')\n ->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {\n $capturedCriteria = $criteria;\n\n return $filterSet;\n });\n\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);\n $this->logger->method('info');\n\n $this->service->getActivityIdsForSavedSearch($savedSearch, $user);\n\n $this->assertNotNull($capturedCriteria);\n }\n\n public function testGetActivityIdsFiltersOutClosingPeriodDateFilters(): void\n {\n $user = $this->makeUser();\n\n $closingStartFilter = $this->makeFilter(ClosingPeriodFilter::KEY_START_DATE, '2025-01-01');\n $closingEndFilter = $this->makeFilter(ClosingPeriodFilter::KEY_END_DATE, '2025-03-31');\n $regularFilter = $this->makeFilter('rep_id', '99');\n\n $savedSearch = $this->makeSavedSearch([\n $closingStartFilter,\n $closingEndFilter,\n $regularFilter,\n ]);\n\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn([]);\n $this->activitySearch->expects($this->once())\n ->method('getOnDemandPageFilterSet')\n ->willReturn($filterSet);\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn(['id-1']);\n $this->logger->method('info');\n\n $result = $this->service->getActivityIdsForSavedSearch($savedSearch, $user);\n\n $this->assertEquals(['id-1'], $result);\n }\n\n public function testGetActivityIdsHandlesArrayFilters(): void\n {\n $user = $this->makeUser();\n\n $filter1 = $this->makeFilter('outcome', 'positive');\n $filter2 = $this->makeFilter('outcome', 'negative');\n\n $savedSearch = $this->makeSavedSearch([$filter1, $filter2]);\n\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn(['outcome']);\n $this->activitySearch->method('getOnDemandPageFilterSet')->willReturn($filterSet);\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn(['id-1']);\n $this->logger->method('info');\n\n $result = $this->service->getActivityIdsForSavedSearch($savedSearch, $user);\n\n $this->assertEquals(['id-1'], $result);\n }\n\n public function testGetActivityIdsHandlesScalarFilters(): void\n {\n $user = $this->makeUser();\n\n $filter = $this->makeFilter('direction', 'inbound');\n $savedSearch = $this->makeSavedSearch([$filter]);\n\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn([]);\n $this->activitySearch->method('getOnDemandPageFilterSet')->willReturn($filterSet);\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn(['id-5']);\n $this->logger->method('info');\n\n $result = $this->service->getActivityIdsForSavedSearch($savedSearch, $user);\n\n $this->assertEquals(['id-5'], $result);\n }\n\n public function testGetActivityIdsPassesNonZeroSequenceNumberToDisableFirstRequestDefaults(): void\n {\n $user = $this->makeUser();\n $savedSearch = $this->makeSavedSearch([]);\n\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn([]);\n\n $capturedCriteria = null;\n $this->activitySearch->expects($this->once())\n ->method('getOnDemandPageFilterSet')\n ->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {\n $capturedCriteria = $criteria;\n\n return $filterSet;\n });\n\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);\n $this->logger->method('info');\n\n $this->service->getActivityIdsForSavedSearch($savedSearch, $user);\n\n $this->assertNotNull($capturedCriteria);\n $this->assertFalse($capturedCriteria->isFirstRequest());\n }\n\n public function testGetActivityIdsLogsWithCorrectContext(): void\n {\n $user = $this->makeUser();\n $savedSearch = $this->makeSavedSearch([]);\n\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn([]);\n $this->activitySearch->method('getOnDemandPageFilterSet')->willReturn($filterSet);\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn(['a', 'b']);\n\n $this->logger->expects($this->once())\n ->method('info')\n ->with(\n '[AskJiminnyReport] Fetched activity IDs for saved search',\n $this->callback(fn ($context) => $context['saved_search_id'] === 42\n && $context['user_id'] === 1\n && $context['activity_count'] === 2)\n );\n\n $this->service->getActivityIdsForSavedSearch($savedSearch, $user);\n }\n\n public static function frequencyDateRangeProvider(): array\n {\n return [\n 'daily' => [\n AutomatedReportsService::FREQUENCY_DAILY,\n '2025-06-15 00:00:00',\n '2025-06-15 23:59:59',\n ],\n 'weekly' => [\n AutomatedReportsService::FREQUENCY_WEEKLY,\n '2025-06-09 00:00:00',\n '2025-06-15 23:59:59',\n ],\n 'monthly' => [\n AutomatedReportsService::FREQUENCY_MONTHLY,\n '2025-05-01 00:00:00',\n '2025-05-31 23:59:59',\n ],\n 'quarterly' => [\n AutomatedReportsService::FREQUENCY_QUARTERLY,\n '2025-01-01 00:00:00',\n '2025-03-31 23:59:59',\n ],\n ];\n }\n\n /**\n * @dataProvider frequencyDateRangeProvider\n */\n public function testGetActivityIdsInjectsDateRangeForFrequency(\n string $frequency,\n string $expectedStartDate,\n string $expectedEndDate,\n ): void {\n CarbonImmutable::setTestNow('2025-06-16 12:00:00');\n\n try {\n $user = $this->makeUser();\n $savedSearch = $this->makeSavedSearch([]);\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn([]);\n $this->logger->method('info');\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);\n\n $capturedCriteria = null;\n $this->activitySearch->expects($this->once())\n ->method('getOnDemandPageFilterSet')\n ->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {\n $capturedCriteria = $criteria;\n\n return $filterSet;\n });\n\n $this->service->getActivityIdsForSavedSearch($savedSearch, $user, $frequency);\n\n $this->assertNotNull($capturedCriteria);\n $this->assertSame($expectedStartDate, $capturedCriteria->getStartDate()->format('Y-m-d H:i:s'));\n $this->assertSame($expectedEndDate, $capturedCriteria->getEndDate()->format('Y-m-d H:i:s'));\n } finally {\n CarbonImmutable::setTestNow();\n }\n }\n\n public function testGetActivityIdsWithNullFrequencyDoesNotInjectDates(): void\n {\n $user = $this->makeUser();\n $savedSearch = $this->makeSavedSearch([]);\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn([]);\n $this->logger->method('info');\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);\n\n $capturedCriteria = null;\n $this->activitySearch->expects($this->once())\n ->method('getOnDemandPageFilterSet')\n ->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {\n $capturedCriteria = $criteria;\n\n return $filterSet;\n });\n\n $this->service->getActivityIdsForSavedSearch($savedSearch, $user, null);\n\n $this->assertNotNull($capturedCriteria);\n $this->assertNull($capturedCriteria->getStartDate());\n $this->assertNull($capturedCriteria->getEndDate());\n }\n\n public function testGetActivityIdsWithUnknownFrequencyDoesNotInjectDates(): void\n {\n $user = $this->makeUser();\n $savedSearch = $this->makeSavedSearch([]);\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn([]);\n $this->logger->method('info');\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);\n\n $capturedCriteria = null;\n $this->activitySearch->expects($this->once())\n ->method('getOnDemandPageFilterSet')\n ->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {\n $capturedCriteria = $criteria;\n\n return $filterSet;\n });\n\n $this->service->getActivityIdsForSavedSearch($savedSearch, $user, AutomatedReportsService::FREQUENCY_ONE_OFF);\n\n $this->assertNotNull($capturedCriteria);\n $this->assertNull($capturedCriteria->getStartDate());\n $this->assertNull($capturedCriteria->getEndDate());\n }\n\n public function testGetActivityIdsFrequencyDateRangeOverridesSavedSearchDateFilters(): void\n {\n CarbonImmutable::setTestNow('2025-06-16 12:00:00');\n\n try {\n $user = $this->makeUser();\n\n $startDateFilter = $this->makeFilter(ActivityActualDate::PARAM_START_DATE, '2024-01-01 00:00:00');\n $endDateFilter = $this->makeFilter(ActivityActualDate::PARAM_END_DATE, '2024-12-31 23:59:59');\n $savedSearch = $this->makeSavedSearch([$startDateFilter, $endDateFilter]);\n\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn([]);\n $this->logger->method('info');\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);\n\n $capturedCriteria = null;\n $this->activitySearch->expects($this->once())\n ->method('getOnDemandPageFilterSet')\n ->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {\n $capturedCriteria = $criteria;\n\n return $filterSet;\n });\n\n $this->service->getActivityIdsForSavedSearch($savedSearch, $user, AutomatedReportsService::FREQUENCY_DAILY);\n\n $this->assertNotNull($capturedCriteria);\n $this->assertSame('2025-06-15 00:00:00', $capturedCriteria->getStartDate()->format('Y-m-d H:i:s'));\n $this->assertSame('2025-06-15 23:59:59', $capturedCriteria->getEndDate()->format('Y-m-d H:i:s'));\n } finally {\n CarbonImmutable::setTestNow();\n }\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.011968086,"top":0.047885075,"width":0.024268618,"height":0.024740623},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"app ~/jiminny/app","depth":6,"role_description":"text"},{"role":"AXStaticText","text":".circleci","depth":7,"role_description":"text"},{"role":"AXStaticText","text":".cursor","depth":7,"role_description":"text"},{"role":"AXStaticText","text":".github","depth":7,"role_description":"text"},{"role":"AXStaticText","text":".sonarlint","depth":7,"role_description":"text"},{"role":"AXStaticText","text":".vscode","depth":7,"role_description":"text"},{"role":"AXStaticText","text":".windsurf","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"app, sources root","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"Actions","depth":8,"role_description":"text"},{"role":"AXStaticText","text":"Component","depth":8,"role_description":"text"},{"role":"AXStaticText","text":"Configuration","depth":8,"role_description":"text"},{"role":"AXStaticText","text":"Console","depth":8,"role_description":"text"},{"role":"AXStaticText","text":"Commands","depth":9,"role_description":"text"},{"role":"AXStaticText","text":"Activities","depth":10,"role_description":"text"},{"role":"AXStaticText","text":"Analytics","depth":10,"role_description":"text"},{"role":"AXStaticText","text":"Calendars","depth":10,"role_description":"text"},{"role":"AXStaticText","text":"Crm","depth":10,"role_description":"text"},{"role":"AXStaticText","text":"DealInsights","depth":10,"role_description":"text"},{"role":"AXStaticText","text":"Dev","depth":10,"role_description":"text"},{"role":"AXStaticText","text":"Dialers","depth":10,"role_description":"text"},{"role":"AXStaticText","text":"DTOs","depth":10,"role_description":"text"},{"role":"AXStaticText","text":"Elasticsearch","depth":10,"role_description":"text"},{"role":"AXStaticText","text":"EngagementStats","depth":10,"role_description":"text"},{"role":"AXStaticText","text":"GeckoExport","depth":10,"role_description":"text"},{"role":"AXStaticText","text":"Livestream","depth":10,"role_description":"text"},{"role":"AXStaticText","text":"Mailboxes","depth":10,"role_description":"text"},{"role":"AXStaticText","text":"Migrate","depth":10,"role_description":"text"},{"role":"AXStaticText","text":"PlaybackThemes","depth":10,"role_description":"text"},{"role":"AXStaticText","text":"Playbooks","depth":10,"role_description":"text"},{"role":"AXStaticText","text":"Playlists","depth":10,"role_description":"text"},{"role":"AXStaticText","text":"Postmark","depth":10,"role_description":"text"},{"role":"AXStaticText","text":"ProphetAi","depth":10,"role_description":"text"},{"role":"AXStaticText","text":"Reports","depth":10,"role_description":"text"},{"role":"AXStaticText","text":"AutomatedReportsCommand.php, class","depth":11,"role_description":"text"},{"role":"AXStaticText","text":"AutomatedReportsRetentionPolicyCommand.php, class","depth":11,"role_description":"text"},{"role":"AXStaticText","text":"AutomatedReportsSendCommand.php, class","depth":11,"role_description":"text"},{"role":"AXStaticText","text":"CreateMockAskJiminnyReportResultCommand.php, class","depth":11,"role_description":"text"},{"role":"AXStaticText","text":"DeleteReportCommand.php, class","depth":11,"role_description":"text"},{"role":"AXStaticText","text":"GenerateMarketingReport.php, class","depth":11,"role_description":"text"},{"role":"AXStaticText","text":"Team.php, class","depth":11,"role_description":"text"},{"role":"AXStaticText","text":"Usage.php, class","depth":11,"role_description":"text"},{"role":"AXStaticText","text":"Slack","depth":10,"role_description":"text"},{"role":"AXStaticText","text":"Teams","depth":10,"role_description":"text"},{"role":"AXStaticText","text":"Tracks","depth":10,"role_description":"text"},{"role":"AXStaticText","text":"Transcription","depth":10,"role_description":"text"},{"role":"AXStaticText","text":"Twilio","depth":10,"role_description":"text"},{"role":"AXStaticText","text":"Users","depth":10,"role_description":"text"},{"role":"AXStaticText","text":"Vocabulary","depth":10,"role_description":"text"},{"role":"AXStaticText","text":"Zoom","depth":10,"role_description":"text"},{"role":"AXStaticText","text":"CoachingFeedbacksUpdateEsActivities.php, class","depth":10,"role_description":"text"},{"role":"AXStaticText","text":"Command.php, class","depth":10,"role_description":"text"},{"role":"AXStaticText","text":"CreateDatabaseUsers.php, class","depth":10,"role_description":"text"},{"role":"AXStaticText","text":"DatabaseTableCount.php, class","depth":10,"role_description":"text"},{"role":"AXStaticText","text":"DeleteOldAiCrmNotesCommand.php, class","depth":10,"role_description":"text"},{"role":"AXStaticText","text":"DeleteS3LeftoversCommand.php, class","depth":10,"role_description":"text"},{"role":"AXStaticText","text":"DevPostmanCommand.php, final class","depth":10,"role_description":"text"}]...
|
4059052151934792368
|
382932895125673363
|
click
|
accessibility
|
NULL
|
Workspace associated with branch 'JY-18909-aut Workspace associated with branch 'JY-18909-automated-reports-ask-jiminny' has been restored
text/html
text/html
text/html
Rollback
Configure…
More
Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Listeners\Crm;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Str;
use Jiminny\Events\Playbooks\PlaybookCreated;
use Jiminny\Models\Crm\Field;
use Jiminny\Models\Crm\FieldValue;
use Jiminny\Models\PlaybookCategory;
use Jiminny\Repositories\Crm\FieldRepository;
use Jiminny\Repositories\PlaybookCategoryRepository;
use Illuminate\Contracts\Queue\ShouldQueue;
use Jiminny\Services\ResolveTeamCrmConnection;
use stdClass;
class ImportActivityTypes implements ShouldQueue
{
/**
* Create the event listener.
*/
public function __construct(
private readonly ResolveTeamCrmConnection $crmResolver,
private readonly FieldRepository $fieldRepository,
private readonly PlaybookCategoryRepository $repository,
) {
// nothing
}
/**
* Import the standard Event/Task Type picklist options from the CRM.
*/
public function handle(PlaybookCreated $event): void
{
$playbook = $event->playbook;
// Don't run if somehow we already have categories.
if ($playbook->getCategories()->isNotEmpty()) {
return;
}
$crmService = $this->crmResolver->resolveForTeam($playbook->getTeam());
$crmService->syncField($playbook->getActivityField());
$values = $crmService->importPicklistValues($playbook->getActivityField());
if (empty($values)) {
$values = $this->fetchActivityFieldValues($playbook->getActivityField());
}
/** @var stdClass{label: string} $value */
foreach ($values as $value) {
$data = [
'name' => $value->label,
'enabled' => true,
'type' => PlaybookCategory::TYPE_ALL,
];
if (Str::contains(strtolower($value->label), ['sms sent', 'sms out', 'text in'])) {
$data['type'] = PlaybookCategory::TYPE_SMS_OUTBOUND;
}
if (Str::contains(strtolower($value->label), ['sms received', 'sms in', 'text out'])) {
$data['type'] = PlaybookCategory::TYPE_SMS_INBOUND;
}
$this->repository->create($playbook, $data);
}
}
private function fetchActivityFieldValues(Field $field): Collection
{
/** @var Collection<FieldValue> */
return $this->fieldRepository->getPicklistValues($field);
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
3
3
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Services\Kiosk\AutomatedReports;
use Carbon\CarbonImmutable;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityActualDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityUpdatedDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\DealInsights\ClosingPeriodFilter;
use Jiminny\Component\ActivitySearch\FilterDefinitionCollection;
use Jiminny\Component\ActivitySearch\Service\ActivitySearch;
use Jiminny\Models\Activity\Search;
use Jiminny\Models\Activity\SearchFilter;
use Jiminny\Models\User;
use Jiminny\Repositories\ElasticActivityRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AskJiminnyReportActivityService;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Jiminny\VO\Repository\OnDemandActivitySearch\Criteria;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use Psr\Log\LoggerInterface;
class AskJiminnyReportActivityServiceTest extends TestCase
{
private ActivitySearch&MockObject $activitySearch;
private ElasticActivityRepository&MockObject $elasticRepository;
private LoggerInterface&MockObject $logger;
private AskJiminnyReportActivityService $service;
protected function setUp(): void
{
$this->activitySearch = $this->createMock(ActivitySearch::class);
$this->elasticRepository = $this->createMock(ElasticActivityRepository::class);
$this->logger = $this->createMock(LoggerInterface::class);
$this->service = new AskJiminnyReportActivityService(
$this->activitySearch,
$this->elasticRepository,
$this->logger,
);
}
private function makeFilter(string $key, ?string $value): SearchFilter&MockObject
{
$filter = $this->createMock(SearchFilter::class);
$filter->method('getFilterProperty')->willReturn($key);
$filter->method('getFilterValue')->willReturn($value);
return $filter;
}
private function makeUser(): User&MockObject
{
$tz = new \DateTimeZone('UTC');
$user = $this->createMock(User::class);
$user->method('getTimezone')->willReturn($tz);
$user->method('getId')->willReturn(1);
$user->method('getUuid')->willReturn('user-uuid');
return $user;
}
private function makeSavedSearch(array $filters): Search&MockObject
{
$savedSearch = $this->createMock(Search::class);
$savedSearch->method('getId')->willReturn(42);
$savedSearch->method('getFilters')->willReturn(new \Illuminate\Support\LazyCollection($filters));
return $savedSearch;
}
public function testGetActivityIdsForSavedSearchReturnsIds(): void
{
$user = $this->makeUser();
$savedSearch = $this->makeSavedSearch([]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->expects($this->once())
->method('getArrayFilterKeys')
->with($user)
->willReturn([]);
$this->activitySearch->expects($this->once())
->method('getOnDemandPageFilterSet')
->willReturn($filterSet);
$this->elasticRepository->expects($this->once())
->method('onDemandSearchIdsOnly')
->willReturn(['id-1', 'id-2', 'id-3']);
$this->logger->expects($this->once())
->method('info')
->with('[AskJiminnyReport] Fetched activity IDs for saved search');
$result = $this->service->getActivityIdsForSavedSearch($savedSearch, $user);
$this->assertEquals(['id-1', 'id-2', 'id-3'], $result);
}
public function testGetActivityIdsForSavedSearchReturnsEmptyWhenNoResults(): void
{
$user = $this->makeUser();
$savedSearch = $this->makeSavedSearch([]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn([]);
$this->activitySearch->method('getOnDemandPageFilterSet')->willReturn($filterSet);
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);
$this->logger->expects($this->once())->method('info');
$result = $this->service->getActivityIdsForSavedSearch($savedSearch, $user);
$this->assertEmpty($result);
}
public function testGetActivityIdsFiltersOutDateFilters(): void
{
$user = $this->makeUser();
$nonDateFilter = $this->makeFilter('owner_id', '123');
$startDateFilter = $this->makeFilter(ActivityActualDate::PARAM_START_DATE, '2025-01-01 00:00:00');
$endDateFilter = $this->makeFilter(ActivityActualDate::PARAM_END_DATE, '2025-01-31 23:59:59');
$updatedFromFilter = $this->makeFilter(ActivityUpdatedDate::PARAM_UPDATED_FROM, '2025-01-01 00:00:00');
$updatedToFilter = $this->makeFilter(ActivityUpdatedDate::PARAM_UPDATED_TO, '2025-01-31 23:59:59');
$savedSearch = $this->makeSavedSearch([
$nonDateFilter,
$startDateFilter,
$endDateFilter,
$updatedFromFilter,
$updatedToFilter,
]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn([]);
$capturedCriteria = null;
$this->activitySearch->expects($this->once())
->method('getOnDemandPageFilterSet')
->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {
$capturedCriteria = $criteria;
return $filterSet;
});
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);
$this->logger->method('info');
$this->service->getActivityIdsForSavedSearch($savedSearch, $user);
$this->assertNotNull($capturedCriteria);
}
public function testGetActivityIdsFiltersOutClosingPeriodDateFilters(): void
{
$user = $this->makeUser();
$closingStartFilter = $this->makeFilter(ClosingPeriodFilter::KEY_START_DATE, '2025-01-01');
$closingEndFilter = $this->makeFilter(ClosingPeriodFilter::KEY_END_DATE, '2025-03-31');
$regularFilter = $this->makeFilter('rep_id', '99');
$savedSearch = $this->makeSavedSearch([
$closingStartFilter,
$closingEndFilter,
$regularFilter,
]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn([]);
$this->activitySearch->expects($this->once())
->method('getOnDemandPageFilterSet')
->willReturn($filterSet);
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn(['id-1']);
$this->logger->method('info');
$result = $this->service->getActivityIdsForSavedSearch($savedSearch, $user);
$this->assertEquals(['id-1'], $result);
}
public function testGetActivityIdsHandlesArrayFilters(): void
{
$user = $this->makeUser();
$filter1 = $this->makeFilter('outcome', 'positive');
$filter2 = $this->makeFilter('outcome', 'negative');
$savedSearch = $this->makeSavedSearch([$filter1, $filter2]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn(['outcome']);
$this->activitySearch->method('getOnDemandPageFilterSet')->willReturn($filterSet);
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn(['id-1']);
$this->logger->method('info');
$result = $this->service->getActivityIdsForSavedSearch($savedSearch, $user);
$this->assertEquals(['id-1'], $result);
}
public function testGetActivityIdsHandlesScalarFilters(): void
{
$user = $this->makeUser();
$filter = $this->makeFilter('direction', 'inbound');
$savedSearch = $this->makeSavedSearch([$filter]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn([]);
$this->activitySearch->method('getOnDemandPageFilterSet')->willReturn($filterSet);
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn(['id-5']);
$this->logger->method('info');
$result = $this->service->getActivityIdsForSavedSearch($savedSearch, $user);
$this->assertEquals(['id-5'], $result);
}
public function testGetActivityIdsPassesNonZeroSequenceNumberToDisableFirstRequestDefaults(): void
{
$user = $this->makeUser();
$savedSearch = $this->makeSavedSearch([]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn([]);
$capturedCriteria = null;
$this->activitySearch->expects($this->once())
->method('getOnDemandPageFilterSet')
->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {
$capturedCriteria = $criteria;
return $filterSet;
});
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);
$this->logger->method('info');
$this->service->getActivityIdsForSavedSearch($savedSearch, $user);
$this->assertNotNull($capturedCriteria);
$this->assertFalse($capturedCriteria->isFirstRequest());
}
public function testGetActivityIdsLogsWithCorrectContext(): void
{
$user = $this->makeUser();
$savedSearch = $this->makeSavedSearch([]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn([]);
$this->activitySearch->method('getOnDemandPageFilterSet')->willReturn($filterSet);
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn(['a', 'b']);
$this->logger->expects($this->once())
->method('info')
->with(
'[AskJiminnyReport] Fetched activity IDs for saved search',
$this->callback(fn ($context) => $context['saved_search_id'] === 42
&& $context['user_id'] === 1
&& $context['activity_count'] === 2)
);
$this->service->getActivityIdsForSavedSearch($savedSearch, $user);
}
public static function frequencyDateRangeProvider(): array
{
return [
'daily' => [
AutomatedReportsService::FREQUENCY_DAILY,
'2025-06-15 00:00:00',
'2025-06-15 23:59:59',
],
'weekly' => [
AutomatedReportsService::FREQUENCY_WEEKLY,
'2025-06-09 00:00:00',
'2025-06-15 23:59:59',
],
'monthly' => [
AutomatedReportsService::FREQUENCY_MONTHLY,
'2025-05-01 00:00:00',
'2025-05-31 23:59:59',
],
'quarterly' => [
AutomatedReportsService::FREQUENCY_QUARTERLY,
'2025-01-01 00:00:00',
'2025-03-31 23:59:59',
],
];
}
/**
* @dataProvider frequencyDateRangeProvider
*/
public function testGetActivityIdsInjectsDateRangeForFrequency(
string $frequency,
string $expectedStartDate,
string $expectedEndDate,
): void {
CarbonImmutable::setTestNow('2025-06-16 12:00:00');
try {
$user = $this->makeUser();
$savedSearch = $this->makeSavedSearch([]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn([]);
$this->logger->method('info');
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);
$capturedCriteria = null;
$this->activitySearch->expects($this->once())
->method('getOnDemandPageFilterSet')
->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {
$capturedCriteria = $criteria;
return $filterSet;
});
$this->service->getActivityIdsForSavedSearch($savedSearch, $user, $frequency);
$this->assertNotNull($capturedCriteria);
$this->assertSame($expectedStartDate, $capturedCriteria->getStartDate()->format('Y-m-d H:i:s'));
$this->assertSame($expectedEndDate, $capturedCriteria->getEndDate()->format('Y-m-d H:i:s'));
} finally {
CarbonImmutable::setTestNow();
}
}
public function testGetActivityIdsWithNullFrequencyDoesNotInjectDates(): void
{
$user = $this->makeUser();
$savedSearch = $this->makeSavedSearch([]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn([]);
$this->logger->method('info');
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);
$capturedCriteria = null;
$this->activitySearch->expects($this->once())
->method('getOnDemandPageFilterSet')
->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {
$capturedCriteria = $criteria;
return $filterSet;
});
$this->service->getActivityIdsForSavedSearch($savedSearch, $user, null);
$this->assertNotNull($capturedCriteria);
$this->assertNull($capturedCriteria->getStartDate());
$this->assertNull($capturedCriteria->getEndDate());
}
public function testGetActivityIdsWithUnknownFrequencyDoesNotInjectDates(): void
{
$user = $this->makeUser();
$savedSearch = $this->makeSavedSearch([]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn([]);
$this->logger->method('info');
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);
$capturedCriteria = null;
$this->activitySearch->expects($this->once())
->method('getOnDemandPageFilterSet')
->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {
$capturedCriteria = $criteria;
return $filterSet;
});
$this->service->getActivityIdsForSavedSearch($savedSearch, $user, AutomatedReportsService::FREQUENCY_ONE_OFF);
$this->assertNotNull($capturedCriteria);
$this->assertNull($capturedCriteria->getStartDate());
$this->assertNull($capturedCriteria->getEndDate());
}
public function testGetActivityIdsFrequencyDateRangeOverridesSavedSearchDateFilters(): void
{
CarbonImmutable::setTestNow('2025-06-16 12:00:00');
try {
$user = $this->makeUser();
$startDateFilter = $this->makeFilter(ActivityActualDate::PARAM_START_DATE, '2024-01-01 00:00:00');
$endDateFilter = $this->makeFilter(ActivityActualDate::PARAM_END_DATE, '2024-12-31 23:59:59');
$savedSearch = $this->makeSavedSearch([$startDateFilter, $endDateFilter]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn([]);
$this->logger->method('info');
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);
$capturedCriteria = null;
$this->activitySearch->expects($this->once())
->method('getOnDemandPageFilterSet')
->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {
$capturedCriteria = $criteria;
return $filterSet;
});
$this->service->getActivityIdsForSavedSearch($savedSearch, $user, AutomatedReportsService::FREQUENCY_DAILY);
$this->assertNotNull($capturedCriteria);
$this->assertSame('2025-06-15 00:00:00', $capturedCriteria->getStartDate()->format('Y-m-d H:i:s'));
$this->assertSame('2025-06-15 23:59:59', $capturedCriteria->getEndDate()->format('Y-m-d H:i:s'));
} finally {
CarbonImmutable::setTestNow();
}
}
}
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide
app ~/jiminny/app
.circleci
.cursor
.github
.sonarlint
.vscode
.windsurf
app, sources root
Actions
Component
Configuration
Console
Commands
Activities
Analytics
Calendars
Crm
DealInsights
Dev
Dialers
DTOs
Elasticsearch
EngagementStats
GeckoExport
Livestream
Mailboxes
Migrate
PlaybackThemes
Playbooks
Playlists
Postmark
ProphetAi
Reports
AutomatedReportsCommand.php, class
AutomatedReportsRetentionPolicyCommand.php, class
AutomatedReportsSendCommand.php, class
CreateMockAskJiminnyReportResultCommand.php, class
DeleteReportCommand.php, class
GenerateMarketingReport.php, class
Team.php, class
Usage.php, class
Slack
Teams
Tracks
Transcription
Twilio
Users
Vocabulary
Zoom
CoachingFeedbacksUpdateEsActivities.php, class
Command.php, class
CreateDatabaseUsers.php, class
DatabaseTableCount.php, class
DeleteOldAiCrmNotesCommand.php, class
DeleteS3LeftoversCommand.php, class
DevPostmanCommand.php, final class...
|
NULL
|
|
55694
|
1200
|
47
|
2026-04-20T10:01:47.134494+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-20/1776 /Users/lukas/.screenpipe/data/data/2026-04-20/1776679307134_m2.jpg...
|
PhpStorm
|
faVsco.js – AskJiminnyReportActivityServiceTest.ph faVsco.js – AskJiminnyReportActivityServiceTest.php...
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Workspace associated with branch 'JY-18909-aut Workspace associated with branch 'JY-18909-automated-reports-ask-jiminny' has been restored
text/html
text/html
text/html
Rollback
Configure…
More
Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Listeners\Crm;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Str;
use Jiminny\Events\Playbooks\PlaybookCreated;
use Jiminny\Models\Crm\Field;
use Jiminny\Models\Crm\FieldValue;
use Jiminny\Models\PlaybookCategory;
use Jiminny\Repositories\Crm\FieldRepository;
use Jiminny\Repositories\PlaybookCategoryRepository;
use Illuminate\Contracts\Queue\ShouldQueue;
use Jiminny\Services\ResolveTeamCrmConnection;
use stdClass;
class ImportActivityTypes implements ShouldQueue
{
/**
* Create the event listener.
*/
public function __construct(
private readonly ResolveTeamCrmConnection $crmResolver,
private readonly FieldRepository $fieldRepository,
private readonly PlaybookCategoryRepository $repository,
) {
// nothing
}
/**
* Import the standard Event/Task Type picklist options from the CRM.
*/
public function handle(PlaybookCreated $event): void
{
$playbook = $event->playbook;
// Don't run if somehow we already have categories.
if ($playbook->getCategories()->isNotEmpty()) {
return;
}
$crmService = $this->crmResolver->resolveForTeam($playbook->getTeam());
$crmService->syncField($playbook->getActivityField());
$values = $crmService->importPicklistValues($playbook->getActivityField());
if (empty($values)) {
$values = $this->fetchActivityFieldValues($playbook->getActivityField());
}
/** @var stdClass{label: string} $value */
foreach ($values as $value) {
$data = [
'name' => $value->label,
'enabled' => true,
'type' => PlaybookCategory::TYPE_ALL,
];
if (Str::contains(strtolower($value->label), ['sms sent', 'sms out', 'text in'])) {
$data['type'] = PlaybookCategory::TYPE_SMS_OUTBOUND;
}
if (Str::contains(strtolower($value->label), ['sms received', 'sms in', 'text out'])) {
$data['type'] = PlaybookCategory::TYPE_SMS_INBOUND;
}
$this->repository->create($playbook, $data);
}
}
private function fetchActivityFieldValues(Field $field): Collection
{
/** @var Collection<FieldValue> */
return $this->fieldRepository->getPicklistValues($field);
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
3
3
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Services\Kiosk\AutomatedReports;
use Carbon\CarbonImmutable;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityActualDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityUpdatedDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\DealInsights\ClosingPeriodFilter;
use Jiminny\Component\ActivitySearch\FilterDefinitionCollection;
use Jiminny\Component\ActivitySearch\Service\ActivitySearch;
use Jiminny\Models\Activity\Search;
use Jiminny\Models\Activity\SearchFilter;
use Jiminny\Models\User;
use Jiminny\Repositories\ElasticActivityRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AskJiminnyReportActivityService;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Jiminny\VO\Repository\OnDemandActivitySearch\Criteria;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use Psr\Log\LoggerInterface;
class AskJiminnyReportActivityServiceTest extends TestCase
{
private ActivitySearch&MockObject $activitySearch;
private ElasticActivityRepository&MockObject $elasticRepository;
private LoggerInterface&MockObject $logger;
private AskJiminnyReportActivityService $service;
protected function setUp(): void
{
$this->activitySearch = $this->createMock(ActivitySearch::class);
$this->elasticRepository = $this->createMock(ElasticActivityRepository::class);
$this->logger = $this->createMock(LoggerInterface::class);
$this->service = new AskJiminnyReportActivityService(
$this->activitySearch,
$this->elasticRepository,
$this->logger,
);
}
private function makeFilter(string $key, ?string $value): SearchFilter&MockObject
{
$filter = $this->createMock(SearchFilter::class);
$filter->method('getFilterProperty')->willReturn($key);
$filter->method('getFilterValue')->willReturn($value);
return $filter;
}
private function makeUser(): User&MockObject
{
$tz = new \DateTimeZone('UTC');
$user = $this->createMock(User::class);
$user->method('getTimezone')->willReturn($tz);
$user->method('getId')->willReturn(1);
$user->method('getUuid')->willReturn('user-uuid');
return $user;
}
private function makeSavedSearch(array $filters): Search&MockObject
{
$savedSearch = $this->createMock(Search::class);
$savedSearch->method('getId')->willReturn(42);
$savedSearch->method('getFilters')->willReturn(new \Illuminate\Support\LazyCollection($filters));
return $savedSearch;
}
public function testGetActivityIdsForSavedSearchReturnsIds(): void
{
$user = $this->makeUser();
$savedSearch = $this->makeSavedSearch([]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->expects($this->once())
->method('getArrayFilterKeys')
->with($user)
->willReturn([]);
$this->activitySearch->expects($this->once())
->method('getOnDemandPageFilterSet')
->willReturn($filterSet);
$this->elasticRepository->expects($this->once())
->method('onDemandSearchIdsOnly')
->willReturn(['id-1', 'id-2', 'id-3']);
$this->logger->expects($this->once())
->method('info')
->with('[AskJiminnyReport] Fetched activity IDs for saved search');
$result = $this->service->getActivityIdsForSavedSearch($savedSearch, $user);
$this->assertEquals(['id-1', 'id-2', 'id-3'], $result);
}
public function testGetActivityIdsForSavedSearchReturnsEmptyWhenNoResults(): void
{
$user = $this->makeUser();
$savedSearch = $this->makeSavedSearch([]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn([]);
$this->activitySearch->method('getOnDemandPageFilterSet')->willReturn($filterSet);
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);
$this->logger->expects($this->once())->method('info');
$result = $this->service->getActivityIdsForSavedSearch($savedSearch, $user);
$this->assertEmpty($result);
}
public function testGetActivityIdsFiltersOutDateFilters(): void
{
$user = $this->makeUser();
$nonDateFilter = $this->makeFilter('owner_id', '123');
$startDateFilter = $this->makeFilter(ActivityActualDate::PARAM_START_DATE, '2025-01-01 00:00:00');
$endDateFilter = $this->makeFilter(ActivityActualDate::PARAM_END_DATE, '2025-01-31 23:59:59');
$updatedFromFilter = $this->makeFilter(ActivityUpdatedDate::PARAM_UPDATED_FROM, '2025-01-01 00:00:00');
$updatedToFilter = $this->makeFilter(ActivityUpdatedDate::PARAM_UPDATED_TO, '2025-01-31 23:59:59');
$savedSearch = $this->makeSavedSearch([
$nonDateFilter,
$startDateFilter,
$endDateFilter,
$updatedFromFilter,
$updatedToFilter,
]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn([]);
$capturedCriteria = null;
$this->activitySearch->expects($this->once())
->method('getOnDemandPageFilterSet')
->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {
$capturedCriteria = $criteria;
return $filterSet;
});
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);
$this->logger->method('info');
$this->service->getActivityIdsForSavedSearch($savedSearch, $user);
$this->assertNotNull($capturedCriteria);
}
public function testGetActivityIdsFiltersOutClosingPeriodDateFilters(): void
{
$user = $this->makeUser();
$closingStartFilter = $this->makeFilter(ClosingPeriodFilter::KEY_START_DATE, '2025-01-01');
$closingEndFilter = $this->makeFilter(ClosingPeriodFilter::KEY_END_DATE, '2025-03-31');
$regularFilter = $this->makeFilter('rep_id', '99');
$savedSearch = $this->makeSavedSearch([
$closingStartFilter,
$closingEndFilter,
$regularFilter,
]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn([]);
$this->activitySearch->expects($this->once())
->method('getOnDemandPageFilterSet')
->willReturn($filterSet);
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn(['id-1']);
$this->logger->method('info');
$result = $this->service->getActivityIdsForSavedSearch($savedSearch, $user);
$this->assertEquals(['id-1'], $result);
}
public function testGetActivityIdsHandlesArrayFilters(): void
{
$user = $this->makeUser();
$filter1 = $this->makeFilter('outcome', 'positive');
$filter2 = $this->makeFilter('outcome', 'negative');
$savedSearch = $this->makeSavedSearch([$filter1, $filter2]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn(['outcome']);
$this->activitySearch->method('getOnDemandPageFilterSet')->willReturn($filterSet);
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn(['id-1']);
$this->logger->method('info');
$result = $this->service->getActivityIdsForSavedSearch($savedSearch, $user);
$this->assertEquals(['id-1'], $result);
}
public function testGetActivityIdsHandlesScalarFilters(): void
{
$user = $this->makeUser();
$filter = $this->makeFilter('direction', 'inbound');
$savedSearch = $this->makeSavedSearch([$filter]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn([]);
$this->activitySearch->method('getOnDemandPageFilterSet')->willReturn($filterSet);
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn(['id-5']);
$this->logger->method('info');
$result = $this->service->getActivityIdsForSavedSearch($savedSearch, $user);
$this->assertEquals(['id-5'], $result);
}
public function testGetActivityIdsPassesNonZeroSequenceNumberToDisableFirstRequestDefaults(): void
{
$user = $this->makeUser();
$savedSearch = $this->makeSavedSearch([]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn([]);
$capturedCriteria = null;
$this->activitySearch->expects($this->once())
->method('getOnDemandPageFilterSet')
->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {
$capturedCriteria = $criteria;
return $filterSet;
});
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);
$this->logger->method('info');
$this->service->getActivityIdsForSavedSearch($savedSearch, $user);
$this->assertNotNull($capturedCriteria);
$this->assertFalse($capturedCriteria->isFirstRequest());
}
public function testGetActivityIdsLogsWithCorrectContext(): void
{
$user = $this->makeUser();
$savedSearch = $this->makeSavedSearch([]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn([]);
$this->activitySearch->method('getOnDemandPageFilterSet')->willReturn($filterSet);
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn(['a', 'b']);
$this->logger->expects($this->once())
->method('info')
->with(
'[AskJiminnyReport] Fetched activity IDs for saved search',
$this->callback(fn ($context) => $context['saved_search_id'] === 42
&& $context['user_id'] === 1
&& $context['activity_count'] === 2)
);
$this->service->getActivityIdsForSavedSearch($savedSearch, $user);
}
public static function frequencyDateRangeProvider(): array
{
return [
'daily' => [
AutomatedReportsService::FREQUENCY_DAILY,
'2025-06-15 00:00:00',
'2025-06-15 23:59:59',
],
'weekly' => [
AutomatedReportsService::FREQUENCY_WEEKLY,
'2025-06-09 00:00:00',
'2025-06-15 23:59:59',
],
'monthly' => [
AutomatedReportsService::FREQUENCY_MONTHLY,
'2025-05-01 00:00:00',
'2025-05-31 23:59:59',
],
'quarterly' => [
AutomatedReportsService::FREQUENCY_QUARTERLY,
'2025-01-01 00:00:00',
'2025-03-31 23:59:59',
],
];
}
/**
* @dataProvider frequencyDateRangeProvider
*/
public function testGetActivityIdsInjectsDateRangeForFrequency(
string $frequency,
string $expectedStartDate,
string $expectedEndDate,
): void {
CarbonImmutable::setTestNow('2025-06-16 12:00:00');
try {
$user = $this->makeUser();
$savedSearch = $this->makeSavedSearch([]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn([]);
$this->logger->method('info');
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);
$capturedCriteria = null;
$this->activitySearch->expects($this->once())
->method('getOnDemandPageFilterSet')
->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {
$capturedCriteria = $criteria;
return $filterSet;
});
$this->service->getActivityIdsForSavedSearch($savedSearch, $user, $frequency);
$this->assertNotNull($capturedCriteria);
$this->assertSame($expectedStartDate, $capturedCriteria->getStartDate()->format('Y-m-d H:i:s'));
$this->assertSame($expectedEndDate, $capturedCriteria->getEndDate()->format('Y-m-d H:i:s'));
} finally {
CarbonImmutable::setTestNow();
}
}
public function testGetActivityIdsWithNullFrequencyDoesNotInjectDates(): void
{
$user = $this->makeUser();
$savedSearch = $this->makeSavedSearch([]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn([]);
$this->logger->method('info');
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);
$capturedCriteria = null;
$this->activitySearch->expects($this->once())
->method('getOnDemandPageFilterSet')
->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {
$capturedCriteria = $criteria;
return $filterSet;
});
$this->service->getActivityIdsForSavedSearch($savedSearch, $user, null);
$this->assertNotNull($capturedCriteria);
$this->assertNull($capturedCriteria->getStartDate());
$this->assertNull($capturedCriteria->getEndDate());
}
public function testGetActivityIdsWithUnknownFrequencyDoesNotInjectDates(): void
{
$user = $this->makeUser();
$savedSearch = $this->makeSavedSearch([]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn([]);
$this->logger->method('info');
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);
$capturedCriteria = null;
$this->activitySearch->expects($this->once())
->method('getOnDemandPageFilterSet')
->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {
$capturedCriteria = $criteria;
return $filterSet;
});
$this->service->getActivityIdsForSavedSearch($savedSearch, $user, AutomatedReportsService::FREQUENCY_ONE_OFF);
$this->assertNotNull($capturedCriteria);
$this->assertNull($capturedCriteria->getStartDate());
$this->assertNull($capturedCriteria->getEndDate());
}
public function testGetActivityIdsFrequencyDateRangeOverridesSavedSearchDateFilters(): void
{
CarbonImmutable::setTestNow('2025-06-16 12:00:00');
try {
$user = $this->makeUser();
$startDateFilter = $this->makeFilter(ActivityActualDate::PARAM_START_DATE, '2024-01-01 00:00:00');
$endDateFilter = $this->makeFilter(ActivityActualDate::PARAM_END_DATE, '2024-12-31 23:59:59');
$savedSearch = $this->makeSavedSearch([$startDateFilter, $endDateFilter]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn([]);
$this->logger->method('info');
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);
$capturedCriteria = null;
$this->activitySearch->expects($this->once())
->method('getOnDemandPageFilterSet')
->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {
$capturedCriteria = $criteria;
return $filterSet;
});
$this->service->getActivityIdsForSavedSearch($savedSearch, $user, AutomatedReportsService::FREQUENCY_DAILY);
$this->assertNotNull($capturedCriteria);
$this->assertSame('2025-06-15 00:00:00', $capturedCriteria->getStartDate()->format('Y-m-d H:i:s'));
$this->assertSame('2025-06-15 23:59:59', $capturedCriteria->getEndDate()->format('Y-m-d H:i:s'));
} finally {
CarbonImmutable::setTestNow();
}
}
}
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide
app ~/jiminny/app
.circleci
.cursor
.github
.sonarlint
.vscode
.windsurf
app, sources root
Actions
Component
Configuration...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Workspace associated with branch 'JY-18909-automated-reports-ask-jiminny' has been restored","depth":3,"bounds":{"left":0.8753325,"top":0.9018356,"width":0.11037234,"height":0.040702313},"value":"Workspace associated with branch 'JY-18909-automated-reports-ask-jiminny' has been restored","help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"bounds":{"left":0.8753325,"top":0.9018356,"width":0.09773936,"height":0.040702313},"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"Rollback","depth":2,"bounds":{"left":0.8753325,"top":0.9481245,"width":0.017287234,"height":0.013567438},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"Configure…","depth":2,"bounds":{"left":0.89793885,"top":0.9481245,"width":0.023603724,"height":0.013567438},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"More","depth":2,"bounds":{"left":0.27027926,"top":1.0,"width":0.016289894,"height":0.0},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.12134308,"height":0.025538707},"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"bounds":{"left":0.7972075,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"RequestGenerateAskJiminnyReportJobTest","depth":6,"bounds":{"left":0.8125,"top":0.019952115,"width":0.10305851,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9381649,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96609044,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9773936,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9886968,"top":0.019952115,"width":0.011303186,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.3793218,"top":0.22426178,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.38896278,"top":0.22266561,"width":0.00731383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.3962766,"top":0.22266561,"width":0.006981383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\nnamespace Jiminny\\Listeners\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Str;\nuse Jiminny\\Events\\Playbooks\\PlaybookCreated;\nuse Jiminny\\Models\\Crm\\Field;\nuse Jiminny\\Models\\Crm\\FieldValue;\nuse Jiminny\\Models\\PlaybookCategory;\nuse Jiminny\\Repositories\\Crm\\FieldRepository;\nuse Jiminny\\Repositories\\PlaybookCategoryRepository;\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\nuse Jiminny\\Services\\ResolveTeamCrmConnection;\nuse stdClass;\n\nclass ImportActivityTypes implements ShouldQueue\n{\n /**\n * Create the event listener.\n */\n public function __construct(\n private readonly ResolveTeamCrmConnection $crmResolver,\n private readonly FieldRepository $fieldRepository,\n private readonly PlaybookCategoryRepository $repository,\n ) {\n // nothing\n }\n\n /**\n * Import the standard Event/Task Type picklist options from the CRM.\n */\n public function handle(PlaybookCreated $event): void\n {\n $playbook = $event->playbook;\n\n // Don't run if somehow we already have categories.\n if ($playbook->getCategories()->isNotEmpty()) {\n return;\n }\n\n $crmService = $this->crmResolver->resolveForTeam($playbook->getTeam());\n $crmService->syncField($playbook->getActivityField());\n\n $values = $crmService->importPicklistValues($playbook->getActivityField());\n\n if (empty($values)) {\n $values = $this->fetchActivityFieldValues($playbook->getActivityField());\n }\n\n /** @var stdClass{label: string} $value */\n foreach ($values as $value) {\n $data = [\n 'name' => $value->label,\n 'enabled' => true,\n 'type' => PlaybookCategory::TYPE_ALL,\n ];\n\n if (Str::contains(strtolower($value->label), ['sms sent', 'sms out', 'text in'])) {\n $data['type'] = PlaybookCategory::TYPE_SMS_OUTBOUND;\n }\n\n if (Str::contains(strtolower($value->label), ['sms received', 'sms in', 'text out'])) {\n $data['type'] = PlaybookCategory::TYPE_SMS_INBOUND;\n }\n\n $this->repository->create($playbook, $data);\n }\n }\n\n private function fetchActivityFieldValues(Field $field): Collection\n {\n /** @var Collection<FieldValue> */\n return $this->fieldRepository->getPicklistValues($field);\n }\n}","depth":4,"value":"<?php\n\nnamespace Jiminny\\Listeners\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Str;\nuse Jiminny\\Events\\Playbooks\\PlaybookCreated;\nuse Jiminny\\Models\\Crm\\Field;\nuse Jiminny\\Models\\Crm\\FieldValue;\nuse Jiminny\\Models\\PlaybookCategory;\nuse Jiminny\\Repositories\\Crm\\FieldRepository;\nuse Jiminny\\Repositories\\PlaybookCategoryRepository;\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\nuse Jiminny\\Services\\ResolveTeamCrmConnection;\nuse stdClass;\n\nclass ImportActivityTypes implements ShouldQueue\n{\n /**\n * Create the event listener.\n */\n public function __construct(\n private readonly ResolveTeamCrmConnection $crmResolver,\n private readonly FieldRepository $fieldRepository,\n private readonly PlaybookCategoryRepository $repository,\n ) {\n // nothing\n }\n\n /**\n * Import the standard Event/Task Type picklist options from the CRM.\n */\n public function handle(PlaybookCreated $event): void\n {\n $playbook = $event->playbook;\n\n // Don't run if somehow we already have categories.\n if ($playbook->getCategories()->isNotEmpty()) {\n return;\n }\n\n $crmService = $this->crmResolver->resolveForTeam($playbook->getTeam());\n $crmService->syncField($playbook->getActivityField());\n\n $values = $crmService->importPicklistValues($playbook->getActivityField());\n\n if (empty($values)) {\n $values = $this->fetchActivityFieldValues($playbook->getActivityField());\n }\n\n /** @var stdClass{label: string} $value */\n foreach ($values as $value) {\n $data = [\n 'name' => $value->label,\n 'enabled' => true,\n 'type' => PlaybookCategory::TYPE_ALL,\n ];\n\n if (Str::contains(strtolower($value->label), ['sms sent', 'sms out', 'text in'])) {\n $data['type'] = PlaybookCategory::TYPE_SMS_OUTBOUND;\n }\n\n if (Str::contains(strtolower($value->label), ['sms received', 'sms in', 'text out'])) {\n $data['type'] = PlaybookCategory::TYPE_SMS_INBOUND;\n }\n\n $this->repository->create($playbook, $data);\n }\n }\n\n private function fetchActivityFieldValues(Field $field): Collection\n {\n /** @var Collection<FieldValue> */\n return $this->fieldRepository->getPicklistValues($field);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"3","depth":4,"bounds":{"left":0.69514626,"top":0.10055866,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"3","depth":4,"bounds":{"left":0.70511967,"top":0.10055866,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.71476066,"top":0.09896249,"width":0.00731383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.72207445,"top":0.09896249,"width":0.006981383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Services\\Kiosk\\AutomatedReports;\n\nuse Carbon\\CarbonImmutable;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityActualDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityUpdatedDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\DealInsights\\ClosingPeriodFilter;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinitionCollection;\nuse Jiminny\\Component\\ActivitySearch\\Service\\ActivitySearch;\nuse Jiminny\\Models\\Activity\\Search;\nuse Jiminny\\Models\\Activity\\SearchFilter;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\ElasticActivityRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AskJiminnyReportActivityService;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Jiminny\\VO\\Repository\\OnDemandActivitySearch\\Criteria;\nuse PHPUnit\\Framework\\MockObject\\MockObject;\nuse PHPUnit\\Framework\\TestCase;\nuse Psr\\Log\\LoggerInterface;\n\nclass AskJiminnyReportActivityServiceTest extends TestCase\n{\n private ActivitySearch&MockObject $activitySearch;\n private ElasticActivityRepository&MockObject $elasticRepository;\n private LoggerInterface&MockObject $logger;\n private AskJiminnyReportActivityService $service;\n\n protected function setUp(): void\n {\n $this->activitySearch = $this->createMock(ActivitySearch::class);\n $this->elasticRepository = $this->createMock(ElasticActivityRepository::class);\n $this->logger = $this->createMock(LoggerInterface::class);\n\n $this->service = new AskJiminnyReportActivityService(\n $this->activitySearch,\n $this->elasticRepository,\n $this->logger,\n );\n }\n\n private function makeFilter(string $key, ?string $value): SearchFilter&MockObject\n {\n $filter = $this->createMock(SearchFilter::class);\n $filter->method('getFilterProperty')->willReturn($key);\n $filter->method('getFilterValue')->willReturn($value);\n\n return $filter;\n }\n\n private function makeUser(): User&MockObject\n {\n $tz = new \\DateTimeZone('UTC');\n $user = $this->createMock(User::class);\n $user->method('getTimezone')->willReturn($tz);\n $user->method('getId')->willReturn(1);\n $user->method('getUuid')->willReturn('user-uuid');\n\n return $user;\n }\n\n private function makeSavedSearch(array $filters): Search&MockObject\n {\n $savedSearch = $this->createMock(Search::class);\n $savedSearch->method('getId')->willReturn(42);\n $savedSearch->method('getFilters')->willReturn(new \\Illuminate\\Support\\LazyCollection($filters));\n\n return $savedSearch;\n }\n\n public function testGetActivityIdsForSavedSearchReturnsIds(): void\n {\n $user = $this->makeUser();\n $savedSearch = $this->makeSavedSearch([]);\n\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->expects($this->once())\n ->method('getArrayFilterKeys')\n ->with($user)\n ->willReturn([]);\n\n $this->activitySearch->expects($this->once())\n ->method('getOnDemandPageFilterSet')\n ->willReturn($filterSet);\n\n $this->elasticRepository->expects($this->once())\n ->method('onDemandSearchIdsOnly')\n ->willReturn(['id-1', 'id-2', 'id-3']);\n\n $this->logger->expects($this->once())\n ->method('info')\n ->with('[AskJiminnyReport] Fetched activity IDs for saved search');\n\n $result = $this->service->getActivityIdsForSavedSearch($savedSearch, $user);\n\n $this->assertEquals(['id-1', 'id-2', 'id-3'], $result);\n }\n\n public function testGetActivityIdsForSavedSearchReturnsEmptyWhenNoResults(): void\n {\n $user = $this->makeUser();\n $savedSearch = $this->makeSavedSearch([]);\n\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn([]);\n $this->activitySearch->method('getOnDemandPageFilterSet')->willReturn($filterSet);\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);\n\n $this->logger->expects($this->once())->method('info');\n\n $result = $this->service->getActivityIdsForSavedSearch($savedSearch, $user);\n\n $this->assertEmpty($result);\n }\n\n public function testGetActivityIdsFiltersOutDateFilters(): void\n {\n $user = $this->makeUser();\n\n $nonDateFilter = $this->makeFilter('owner_id', '123');\n $startDateFilter = $this->makeFilter(ActivityActualDate::PARAM_START_DATE, '2025-01-01 00:00:00');\n $endDateFilter = $this->makeFilter(ActivityActualDate::PARAM_END_DATE, '2025-01-31 23:59:59');\n $updatedFromFilter = $this->makeFilter(ActivityUpdatedDate::PARAM_UPDATED_FROM, '2025-01-01 00:00:00');\n $updatedToFilter = $this->makeFilter(ActivityUpdatedDate::PARAM_UPDATED_TO, '2025-01-31 23:59:59');\n\n $savedSearch = $this->makeSavedSearch([\n $nonDateFilter,\n $startDateFilter,\n $endDateFilter,\n $updatedFromFilter,\n $updatedToFilter,\n ]);\n\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn([]);\n\n $capturedCriteria = null;\n $this->activitySearch->expects($this->once())\n ->method('getOnDemandPageFilterSet')\n ->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {\n $capturedCriteria = $criteria;\n\n return $filterSet;\n });\n\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);\n $this->logger->method('info');\n\n $this->service->getActivityIdsForSavedSearch($savedSearch, $user);\n\n $this->assertNotNull($capturedCriteria);\n }\n\n public function testGetActivityIdsFiltersOutClosingPeriodDateFilters(): void\n {\n $user = $this->makeUser();\n\n $closingStartFilter = $this->makeFilter(ClosingPeriodFilter::KEY_START_DATE, '2025-01-01');\n $closingEndFilter = $this->makeFilter(ClosingPeriodFilter::KEY_END_DATE, '2025-03-31');\n $regularFilter = $this->makeFilter('rep_id', '99');\n\n $savedSearch = $this->makeSavedSearch([\n $closingStartFilter,\n $closingEndFilter,\n $regularFilter,\n ]);\n\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn([]);\n $this->activitySearch->expects($this->once())\n ->method('getOnDemandPageFilterSet')\n ->willReturn($filterSet);\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn(['id-1']);\n $this->logger->method('info');\n\n $result = $this->service->getActivityIdsForSavedSearch($savedSearch, $user);\n\n $this->assertEquals(['id-1'], $result);\n }\n\n public function testGetActivityIdsHandlesArrayFilters(): void\n {\n $user = $this->makeUser();\n\n $filter1 = $this->makeFilter('outcome', 'positive');\n $filter2 = $this->makeFilter('outcome', 'negative');\n\n $savedSearch = $this->makeSavedSearch([$filter1, $filter2]);\n\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn(['outcome']);\n $this->activitySearch->method('getOnDemandPageFilterSet')->willReturn($filterSet);\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn(['id-1']);\n $this->logger->method('info');\n\n $result = $this->service->getActivityIdsForSavedSearch($savedSearch, $user);\n\n $this->assertEquals(['id-1'], $result);\n }\n\n public function testGetActivityIdsHandlesScalarFilters(): void\n {\n $user = $this->makeUser();\n\n $filter = $this->makeFilter('direction', 'inbound');\n $savedSearch = $this->makeSavedSearch([$filter]);\n\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn([]);\n $this->activitySearch->method('getOnDemandPageFilterSet')->willReturn($filterSet);\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn(['id-5']);\n $this->logger->method('info');\n\n $result = $this->service->getActivityIdsForSavedSearch($savedSearch, $user);\n\n $this->assertEquals(['id-5'], $result);\n }\n\n public function testGetActivityIdsPassesNonZeroSequenceNumberToDisableFirstRequestDefaults(): void\n {\n $user = $this->makeUser();\n $savedSearch = $this->makeSavedSearch([]);\n\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn([]);\n\n $capturedCriteria = null;\n $this->activitySearch->expects($this->once())\n ->method('getOnDemandPageFilterSet')\n ->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {\n $capturedCriteria = $criteria;\n\n return $filterSet;\n });\n\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);\n $this->logger->method('info');\n\n $this->service->getActivityIdsForSavedSearch($savedSearch, $user);\n\n $this->assertNotNull($capturedCriteria);\n $this->assertFalse($capturedCriteria->isFirstRequest());\n }\n\n public function testGetActivityIdsLogsWithCorrectContext(): void\n {\n $user = $this->makeUser();\n $savedSearch = $this->makeSavedSearch([]);\n\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn([]);\n $this->activitySearch->method('getOnDemandPageFilterSet')->willReturn($filterSet);\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn(['a', 'b']);\n\n $this->logger->expects($this->once())\n ->method('info')\n ->with(\n '[AskJiminnyReport] Fetched activity IDs for saved search',\n $this->callback(fn ($context) => $context['saved_search_id'] === 42\n && $context['user_id'] === 1\n && $context['activity_count'] === 2)\n );\n\n $this->service->getActivityIdsForSavedSearch($savedSearch, $user);\n }\n\n public static function frequencyDateRangeProvider(): array\n {\n return [\n 'daily' => [\n AutomatedReportsService::FREQUENCY_DAILY,\n '2025-06-15 00:00:00',\n '2025-06-15 23:59:59',\n ],\n 'weekly' => [\n AutomatedReportsService::FREQUENCY_WEEKLY,\n '2025-06-09 00:00:00',\n '2025-06-15 23:59:59',\n ],\n 'monthly' => [\n AutomatedReportsService::FREQUENCY_MONTHLY,\n '2025-05-01 00:00:00',\n '2025-05-31 23:59:59',\n ],\n 'quarterly' => [\n AutomatedReportsService::FREQUENCY_QUARTERLY,\n '2025-01-01 00:00:00',\n '2025-03-31 23:59:59',\n ],\n ];\n }\n\n /**\n * @dataProvider frequencyDateRangeProvider\n */\n public function testGetActivityIdsInjectsDateRangeForFrequency(\n string $frequency,\n string $expectedStartDate,\n string $expectedEndDate,\n ): void {\n CarbonImmutable::setTestNow('2025-06-16 12:00:00');\n\n try {\n $user = $this->makeUser();\n $savedSearch = $this->makeSavedSearch([]);\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn([]);\n $this->logger->method('info');\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);\n\n $capturedCriteria = null;\n $this->activitySearch->expects($this->once())\n ->method('getOnDemandPageFilterSet')\n ->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {\n $capturedCriteria = $criteria;\n\n return $filterSet;\n });\n\n $this->service->getActivityIdsForSavedSearch($savedSearch, $user, $frequency);\n\n $this->assertNotNull($capturedCriteria);\n $this->assertSame($expectedStartDate, $capturedCriteria->getStartDate()->format('Y-m-d H:i:s'));\n $this->assertSame($expectedEndDate, $capturedCriteria->getEndDate()->format('Y-m-d H:i:s'));\n } finally {\n CarbonImmutable::setTestNow();\n }\n }\n\n public function testGetActivityIdsWithNullFrequencyDoesNotInjectDates(): void\n {\n $user = $this->makeUser();\n $savedSearch = $this->makeSavedSearch([]);\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn([]);\n $this->logger->method('info');\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);\n\n $capturedCriteria = null;\n $this->activitySearch->expects($this->once())\n ->method('getOnDemandPageFilterSet')\n ->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {\n $capturedCriteria = $criteria;\n\n return $filterSet;\n });\n\n $this->service->getActivityIdsForSavedSearch($savedSearch, $user, null);\n\n $this->assertNotNull($capturedCriteria);\n $this->assertNull($capturedCriteria->getStartDate());\n $this->assertNull($capturedCriteria->getEndDate());\n }\n\n public function testGetActivityIdsWithUnknownFrequencyDoesNotInjectDates(): void\n {\n $user = $this->makeUser();\n $savedSearch = $this->makeSavedSearch([]);\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn([]);\n $this->logger->method('info');\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);\n\n $capturedCriteria = null;\n $this->activitySearch->expects($this->once())\n ->method('getOnDemandPageFilterSet')\n ->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {\n $capturedCriteria = $criteria;\n\n return $filterSet;\n });\n\n $this->service->getActivityIdsForSavedSearch($savedSearch, $user, AutomatedReportsService::FREQUENCY_ONE_OFF);\n\n $this->assertNotNull($capturedCriteria);\n $this->assertNull($capturedCriteria->getStartDate());\n $this->assertNull($capturedCriteria->getEndDate());\n }\n\n public function testGetActivityIdsFrequencyDateRangeOverridesSavedSearchDateFilters(): void\n {\n CarbonImmutable::setTestNow('2025-06-16 12:00:00');\n\n try {\n $user = $this->makeUser();\n\n $startDateFilter = $this->makeFilter(ActivityActualDate::PARAM_START_DATE, '2024-01-01 00:00:00');\n $endDateFilter = $this->makeFilter(ActivityActualDate::PARAM_END_DATE, '2024-12-31 23:59:59');\n $savedSearch = $this->makeSavedSearch([$startDateFilter, $endDateFilter]);\n\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn([]);\n $this->logger->method('info');\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);\n\n $capturedCriteria = null;\n $this->activitySearch->expects($this->once())\n ->method('getOnDemandPageFilterSet')\n ->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {\n $capturedCriteria = $criteria;\n\n return $filterSet;\n });\n\n $this->service->getActivityIdsForSavedSearch($savedSearch, $user, AutomatedReportsService::FREQUENCY_DAILY);\n\n $this->assertNotNull($capturedCriteria);\n $this->assertSame('2025-06-15 00:00:00', $capturedCriteria->getStartDate()->format('Y-m-d H:i:s'));\n $this->assertSame('2025-06-15 23:59:59', $capturedCriteria->getEndDate()->format('Y-m-d H:i:s'));\n } finally {\n CarbonImmutable::setTestNow();\n }\n }\n}","depth":4,"bounds":{"left":0.42519948,"top":0.09736632,"width":0.30352393,"height":0.90263367},"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Services\\Kiosk\\AutomatedReports;\n\nuse Carbon\\CarbonImmutable;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityActualDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityUpdatedDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\DealInsights\\ClosingPeriodFilter;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinitionCollection;\nuse Jiminny\\Component\\ActivitySearch\\Service\\ActivitySearch;\nuse Jiminny\\Models\\Activity\\Search;\nuse Jiminny\\Models\\Activity\\SearchFilter;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\ElasticActivityRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AskJiminnyReportActivityService;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Jiminny\\VO\\Repository\\OnDemandActivitySearch\\Criteria;\nuse PHPUnit\\Framework\\MockObject\\MockObject;\nuse PHPUnit\\Framework\\TestCase;\nuse Psr\\Log\\LoggerInterface;\n\nclass AskJiminnyReportActivityServiceTest extends TestCase\n{\n private ActivitySearch&MockObject $activitySearch;\n private ElasticActivityRepository&MockObject $elasticRepository;\n private LoggerInterface&MockObject $logger;\n private AskJiminnyReportActivityService $service;\n\n protected function setUp(): void\n {\n $this->activitySearch = $this->createMock(ActivitySearch::class);\n $this->elasticRepository = $this->createMock(ElasticActivityRepository::class);\n $this->logger = $this->createMock(LoggerInterface::class);\n\n $this->service = new AskJiminnyReportActivityService(\n $this->activitySearch,\n $this->elasticRepository,\n $this->logger,\n );\n }\n\n private function makeFilter(string $key, ?string $value): SearchFilter&MockObject\n {\n $filter = $this->createMock(SearchFilter::class);\n $filter->method('getFilterProperty')->willReturn($key);\n $filter->method('getFilterValue')->willReturn($value);\n\n return $filter;\n }\n\n private function makeUser(): User&MockObject\n {\n $tz = new \\DateTimeZone('UTC');\n $user = $this->createMock(User::class);\n $user->method('getTimezone')->willReturn($tz);\n $user->method('getId')->willReturn(1);\n $user->method('getUuid')->willReturn('user-uuid');\n\n return $user;\n }\n\n private function makeSavedSearch(array $filters): Search&MockObject\n {\n $savedSearch = $this->createMock(Search::class);\n $savedSearch->method('getId')->willReturn(42);\n $savedSearch->method('getFilters')->willReturn(new \\Illuminate\\Support\\LazyCollection($filters));\n\n return $savedSearch;\n }\n\n public function testGetActivityIdsForSavedSearchReturnsIds(): void\n {\n $user = $this->makeUser();\n $savedSearch = $this->makeSavedSearch([]);\n\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->expects($this->once())\n ->method('getArrayFilterKeys')\n ->with($user)\n ->willReturn([]);\n\n $this->activitySearch->expects($this->once())\n ->method('getOnDemandPageFilterSet')\n ->willReturn($filterSet);\n\n $this->elasticRepository->expects($this->once())\n ->method('onDemandSearchIdsOnly')\n ->willReturn(['id-1', 'id-2', 'id-3']);\n\n $this->logger->expects($this->once())\n ->method('info')\n ->with('[AskJiminnyReport] Fetched activity IDs for saved search');\n\n $result = $this->service->getActivityIdsForSavedSearch($savedSearch, $user);\n\n $this->assertEquals(['id-1', 'id-2', 'id-3'], $result);\n }\n\n public function testGetActivityIdsForSavedSearchReturnsEmptyWhenNoResults(): void\n {\n $user = $this->makeUser();\n $savedSearch = $this->makeSavedSearch([]);\n\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn([]);\n $this->activitySearch->method('getOnDemandPageFilterSet')->willReturn($filterSet);\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);\n\n $this->logger->expects($this->once())->method('info');\n\n $result = $this->service->getActivityIdsForSavedSearch($savedSearch, $user);\n\n $this->assertEmpty($result);\n }\n\n public function testGetActivityIdsFiltersOutDateFilters(): void\n {\n $user = $this->makeUser();\n\n $nonDateFilter = $this->makeFilter('owner_id', '123');\n $startDateFilter = $this->makeFilter(ActivityActualDate::PARAM_START_DATE, '2025-01-01 00:00:00');\n $endDateFilter = $this->makeFilter(ActivityActualDate::PARAM_END_DATE, '2025-01-31 23:59:59');\n $updatedFromFilter = $this->makeFilter(ActivityUpdatedDate::PARAM_UPDATED_FROM, '2025-01-01 00:00:00');\n $updatedToFilter = $this->makeFilter(ActivityUpdatedDate::PARAM_UPDATED_TO, '2025-01-31 23:59:59');\n\n $savedSearch = $this->makeSavedSearch([\n $nonDateFilter,\n $startDateFilter,\n $endDateFilter,\n $updatedFromFilter,\n $updatedToFilter,\n ]);\n\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn([]);\n\n $capturedCriteria = null;\n $this->activitySearch->expects($this->once())\n ->method('getOnDemandPageFilterSet')\n ->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {\n $capturedCriteria = $criteria;\n\n return $filterSet;\n });\n\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);\n $this->logger->method('info');\n\n $this->service->getActivityIdsForSavedSearch($savedSearch, $user);\n\n $this->assertNotNull($capturedCriteria);\n }\n\n public function testGetActivityIdsFiltersOutClosingPeriodDateFilters(): void\n {\n $user = $this->makeUser();\n\n $closingStartFilter = $this->makeFilter(ClosingPeriodFilter::KEY_START_DATE, '2025-01-01');\n $closingEndFilter = $this->makeFilter(ClosingPeriodFilter::KEY_END_DATE, '2025-03-31');\n $regularFilter = $this->makeFilter('rep_id', '99');\n\n $savedSearch = $this->makeSavedSearch([\n $closingStartFilter,\n $closingEndFilter,\n $regularFilter,\n ]);\n\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn([]);\n $this->activitySearch->expects($this->once())\n ->method('getOnDemandPageFilterSet')\n ->willReturn($filterSet);\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn(['id-1']);\n $this->logger->method('info');\n\n $result = $this->service->getActivityIdsForSavedSearch($savedSearch, $user);\n\n $this->assertEquals(['id-1'], $result);\n }\n\n public function testGetActivityIdsHandlesArrayFilters(): void\n {\n $user = $this->makeUser();\n\n $filter1 = $this->makeFilter('outcome', 'positive');\n $filter2 = $this->makeFilter('outcome', 'negative');\n\n $savedSearch = $this->makeSavedSearch([$filter1, $filter2]);\n\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn(['outcome']);\n $this->activitySearch->method('getOnDemandPageFilterSet')->willReturn($filterSet);\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn(['id-1']);\n $this->logger->method('info');\n\n $result = $this->service->getActivityIdsForSavedSearch($savedSearch, $user);\n\n $this->assertEquals(['id-1'], $result);\n }\n\n public function testGetActivityIdsHandlesScalarFilters(): void\n {\n $user = $this->makeUser();\n\n $filter = $this->makeFilter('direction', 'inbound');\n $savedSearch = $this->makeSavedSearch([$filter]);\n\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn([]);\n $this->activitySearch->method('getOnDemandPageFilterSet')->willReturn($filterSet);\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn(['id-5']);\n $this->logger->method('info');\n\n $result = $this->service->getActivityIdsForSavedSearch($savedSearch, $user);\n\n $this->assertEquals(['id-5'], $result);\n }\n\n public function testGetActivityIdsPassesNonZeroSequenceNumberToDisableFirstRequestDefaults(): void\n {\n $user = $this->makeUser();\n $savedSearch = $this->makeSavedSearch([]);\n\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn([]);\n\n $capturedCriteria = null;\n $this->activitySearch->expects($this->once())\n ->method('getOnDemandPageFilterSet')\n ->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {\n $capturedCriteria = $criteria;\n\n return $filterSet;\n });\n\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);\n $this->logger->method('info');\n\n $this->service->getActivityIdsForSavedSearch($savedSearch, $user);\n\n $this->assertNotNull($capturedCriteria);\n $this->assertFalse($capturedCriteria->isFirstRequest());\n }\n\n public function testGetActivityIdsLogsWithCorrectContext(): void\n {\n $user = $this->makeUser();\n $savedSearch = $this->makeSavedSearch([]);\n\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn([]);\n $this->activitySearch->method('getOnDemandPageFilterSet')->willReturn($filterSet);\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn(['a', 'b']);\n\n $this->logger->expects($this->once())\n ->method('info')\n ->with(\n '[AskJiminnyReport] Fetched activity IDs for saved search',\n $this->callback(fn ($context) => $context['saved_search_id'] === 42\n && $context['user_id'] === 1\n && $context['activity_count'] === 2)\n );\n\n $this->service->getActivityIdsForSavedSearch($savedSearch, $user);\n }\n\n public static function frequencyDateRangeProvider(): array\n {\n return [\n 'daily' => [\n AutomatedReportsService::FREQUENCY_DAILY,\n '2025-06-15 00:00:00',\n '2025-06-15 23:59:59',\n ],\n 'weekly' => [\n AutomatedReportsService::FREQUENCY_WEEKLY,\n '2025-06-09 00:00:00',\n '2025-06-15 23:59:59',\n ],\n 'monthly' => [\n AutomatedReportsService::FREQUENCY_MONTHLY,\n '2025-05-01 00:00:00',\n '2025-05-31 23:59:59',\n ],\n 'quarterly' => [\n AutomatedReportsService::FREQUENCY_QUARTERLY,\n '2025-01-01 00:00:00',\n '2025-03-31 23:59:59',\n ],\n ];\n }\n\n /**\n * @dataProvider frequencyDateRangeProvider\n */\n public function testGetActivityIdsInjectsDateRangeForFrequency(\n string $frequency,\n string $expectedStartDate,\n string $expectedEndDate,\n ): void {\n CarbonImmutable::setTestNow('2025-06-16 12:00:00');\n\n try {\n $user = $this->makeUser();\n $savedSearch = $this->makeSavedSearch([]);\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn([]);\n $this->logger->method('info');\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);\n\n $capturedCriteria = null;\n $this->activitySearch->expects($this->once())\n ->method('getOnDemandPageFilterSet')\n ->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {\n $capturedCriteria = $criteria;\n\n return $filterSet;\n });\n\n $this->service->getActivityIdsForSavedSearch($savedSearch, $user, $frequency);\n\n $this->assertNotNull($capturedCriteria);\n $this->assertSame($expectedStartDate, $capturedCriteria->getStartDate()->format('Y-m-d H:i:s'));\n $this->assertSame($expectedEndDate, $capturedCriteria->getEndDate()->format('Y-m-d H:i:s'));\n } finally {\n CarbonImmutable::setTestNow();\n }\n }\n\n public function testGetActivityIdsWithNullFrequencyDoesNotInjectDates(): void\n {\n $user = $this->makeUser();\n $savedSearch = $this->makeSavedSearch([]);\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn([]);\n $this->logger->method('info');\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);\n\n $capturedCriteria = null;\n $this->activitySearch->expects($this->once())\n ->method('getOnDemandPageFilterSet')\n ->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {\n $capturedCriteria = $criteria;\n\n return $filterSet;\n });\n\n $this->service->getActivityIdsForSavedSearch($savedSearch, $user, null);\n\n $this->assertNotNull($capturedCriteria);\n $this->assertNull($capturedCriteria->getStartDate());\n $this->assertNull($capturedCriteria->getEndDate());\n }\n\n public function testGetActivityIdsWithUnknownFrequencyDoesNotInjectDates(): void\n {\n $user = $this->makeUser();\n $savedSearch = $this->makeSavedSearch([]);\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn([]);\n $this->logger->method('info');\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);\n\n $capturedCriteria = null;\n $this->activitySearch->expects($this->once())\n ->method('getOnDemandPageFilterSet')\n ->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {\n $capturedCriteria = $criteria;\n\n return $filterSet;\n });\n\n $this->service->getActivityIdsForSavedSearch($savedSearch, $user, AutomatedReportsService::FREQUENCY_ONE_OFF);\n\n $this->assertNotNull($capturedCriteria);\n $this->assertNull($capturedCriteria->getStartDate());\n $this->assertNull($capturedCriteria->getEndDate());\n }\n\n public function testGetActivityIdsFrequencyDateRangeOverridesSavedSearchDateFilters(): void\n {\n CarbonImmutable::setTestNow('2025-06-16 12:00:00');\n\n try {\n $user = $this->makeUser();\n\n $startDateFilter = $this->makeFilter(ActivityActualDate::PARAM_START_DATE, '2024-01-01 00:00:00');\n $endDateFilter = $this->makeFilter(ActivityActualDate::PARAM_END_DATE, '2024-12-31 23:59:59');\n $savedSearch = $this->makeSavedSearch([$startDateFilter, $endDateFilter]);\n\n $filterSet = $this->createMock(FilterDefinitionCollection::class);\n\n $this->activitySearch->method('getArrayFilterKeys')->willReturn([]);\n $this->logger->method('info');\n $this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);\n\n $capturedCriteria = null;\n $this->activitySearch->expects($this->once())\n ->method('getOnDemandPageFilterSet')\n ->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {\n $capturedCriteria = $criteria;\n\n return $filterSet;\n });\n\n $this->service->getActivityIdsForSavedSearch($savedSearch, $user, AutomatedReportsService::FREQUENCY_DAILY);\n\n $this->assertNotNull($capturedCriteria);\n $this->assertSame('2025-06-15 00:00:00', $capturedCriteria->getStartDate()->format('Y-m-d H:i:s'));\n $this->assertSame('2025-06-15 23:59:59', $capturedCriteria->getEndDate()->format('Y-m-d H:i:s'));\n } finally {\n CarbonImmutable::setTestNow();\n }\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.011968086,"top":0.047885075,"width":0.024268618,"height":0.024740623},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"app ~/jiminny/app","depth":6,"role_description":"text"},{"role":"AXStaticText","text":".circleci","depth":7,"role_description":"text"},{"role":"AXStaticText","text":".cursor","depth":7,"role_description":"text"},{"role":"AXStaticText","text":".github","depth":7,"role_description":"text"},{"role":"AXStaticText","text":".sonarlint","depth":7,"role_description":"text"},{"role":"AXStaticText","text":".vscode","depth":7,"role_description":"text"},{"role":"AXStaticText","text":".windsurf","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"app, sources root","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"Actions","depth":8,"role_description":"text"},{"role":"AXStaticText","text":"Component","depth":8,"role_description":"text"},{"role":"AXStaticText","text":"Configuration","depth":8,"role_description":"text"}]...
|
-1984786027757248056
|
941379042777961875
|
visual_change
|
accessibility
|
NULL
|
Workspace associated with branch 'JY-18909-aut Workspace associated with branch 'JY-18909-automated-reports-ask-jiminny' has been restored
text/html
text/html
text/html
Rollback
Configure…
More
Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Listeners\Crm;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Str;
use Jiminny\Events\Playbooks\PlaybookCreated;
use Jiminny\Models\Crm\Field;
use Jiminny\Models\Crm\FieldValue;
use Jiminny\Models\PlaybookCategory;
use Jiminny\Repositories\Crm\FieldRepository;
use Jiminny\Repositories\PlaybookCategoryRepository;
use Illuminate\Contracts\Queue\ShouldQueue;
use Jiminny\Services\ResolveTeamCrmConnection;
use stdClass;
class ImportActivityTypes implements ShouldQueue
{
/**
* Create the event listener.
*/
public function __construct(
private readonly ResolveTeamCrmConnection $crmResolver,
private readonly FieldRepository $fieldRepository,
private readonly PlaybookCategoryRepository $repository,
) {
// nothing
}
/**
* Import the standard Event/Task Type picklist options from the CRM.
*/
public function handle(PlaybookCreated $event): void
{
$playbook = $event->playbook;
// Don't run if somehow we already have categories.
if ($playbook->getCategories()->isNotEmpty()) {
return;
}
$crmService = $this->crmResolver->resolveForTeam($playbook->getTeam());
$crmService->syncField($playbook->getActivityField());
$values = $crmService->importPicklistValues($playbook->getActivityField());
if (empty($values)) {
$values = $this->fetchActivityFieldValues($playbook->getActivityField());
}
/** @var stdClass{label: string} $value */
foreach ($values as $value) {
$data = [
'name' => $value->label,
'enabled' => true,
'type' => PlaybookCategory::TYPE_ALL,
];
if (Str::contains(strtolower($value->label), ['sms sent', 'sms out', 'text in'])) {
$data['type'] = PlaybookCategory::TYPE_SMS_OUTBOUND;
}
if (Str::contains(strtolower($value->label), ['sms received', 'sms in', 'text out'])) {
$data['type'] = PlaybookCategory::TYPE_SMS_INBOUND;
}
$this->repository->create($playbook, $data);
}
}
private function fetchActivityFieldValues(Field $field): Collection
{
/** @var Collection<FieldValue> */
return $this->fieldRepository->getPicklistValues($field);
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
3
3
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Services\Kiosk\AutomatedReports;
use Carbon\CarbonImmutable;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityActualDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityUpdatedDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\DealInsights\ClosingPeriodFilter;
use Jiminny\Component\ActivitySearch\FilterDefinitionCollection;
use Jiminny\Component\ActivitySearch\Service\ActivitySearch;
use Jiminny\Models\Activity\Search;
use Jiminny\Models\Activity\SearchFilter;
use Jiminny\Models\User;
use Jiminny\Repositories\ElasticActivityRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AskJiminnyReportActivityService;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Jiminny\VO\Repository\OnDemandActivitySearch\Criteria;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use Psr\Log\LoggerInterface;
class AskJiminnyReportActivityServiceTest extends TestCase
{
private ActivitySearch&MockObject $activitySearch;
private ElasticActivityRepository&MockObject $elasticRepository;
private LoggerInterface&MockObject $logger;
private AskJiminnyReportActivityService $service;
protected function setUp(): void
{
$this->activitySearch = $this->createMock(ActivitySearch::class);
$this->elasticRepository = $this->createMock(ElasticActivityRepository::class);
$this->logger = $this->createMock(LoggerInterface::class);
$this->service = new AskJiminnyReportActivityService(
$this->activitySearch,
$this->elasticRepository,
$this->logger,
);
}
private function makeFilter(string $key, ?string $value): SearchFilter&MockObject
{
$filter = $this->createMock(SearchFilter::class);
$filter->method('getFilterProperty')->willReturn($key);
$filter->method('getFilterValue')->willReturn($value);
return $filter;
}
private function makeUser(): User&MockObject
{
$tz = new \DateTimeZone('UTC');
$user = $this->createMock(User::class);
$user->method('getTimezone')->willReturn($tz);
$user->method('getId')->willReturn(1);
$user->method('getUuid')->willReturn('user-uuid');
return $user;
}
private function makeSavedSearch(array $filters): Search&MockObject
{
$savedSearch = $this->createMock(Search::class);
$savedSearch->method('getId')->willReturn(42);
$savedSearch->method('getFilters')->willReturn(new \Illuminate\Support\LazyCollection($filters));
return $savedSearch;
}
public function testGetActivityIdsForSavedSearchReturnsIds(): void
{
$user = $this->makeUser();
$savedSearch = $this->makeSavedSearch([]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->expects($this->once())
->method('getArrayFilterKeys')
->with($user)
->willReturn([]);
$this->activitySearch->expects($this->once())
->method('getOnDemandPageFilterSet')
->willReturn($filterSet);
$this->elasticRepository->expects($this->once())
->method('onDemandSearchIdsOnly')
->willReturn(['id-1', 'id-2', 'id-3']);
$this->logger->expects($this->once())
->method('info')
->with('[AskJiminnyReport] Fetched activity IDs for saved search');
$result = $this->service->getActivityIdsForSavedSearch($savedSearch, $user);
$this->assertEquals(['id-1', 'id-2', 'id-3'], $result);
}
public function testGetActivityIdsForSavedSearchReturnsEmptyWhenNoResults(): void
{
$user = $this->makeUser();
$savedSearch = $this->makeSavedSearch([]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn([]);
$this->activitySearch->method('getOnDemandPageFilterSet')->willReturn($filterSet);
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);
$this->logger->expects($this->once())->method('info');
$result = $this->service->getActivityIdsForSavedSearch($savedSearch, $user);
$this->assertEmpty($result);
}
public function testGetActivityIdsFiltersOutDateFilters(): void
{
$user = $this->makeUser();
$nonDateFilter = $this->makeFilter('owner_id', '123');
$startDateFilter = $this->makeFilter(ActivityActualDate::PARAM_START_DATE, '2025-01-01 00:00:00');
$endDateFilter = $this->makeFilter(ActivityActualDate::PARAM_END_DATE, '2025-01-31 23:59:59');
$updatedFromFilter = $this->makeFilter(ActivityUpdatedDate::PARAM_UPDATED_FROM, '2025-01-01 00:00:00');
$updatedToFilter = $this->makeFilter(ActivityUpdatedDate::PARAM_UPDATED_TO, '2025-01-31 23:59:59');
$savedSearch = $this->makeSavedSearch([
$nonDateFilter,
$startDateFilter,
$endDateFilter,
$updatedFromFilter,
$updatedToFilter,
]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn([]);
$capturedCriteria = null;
$this->activitySearch->expects($this->once())
->method('getOnDemandPageFilterSet')
->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {
$capturedCriteria = $criteria;
return $filterSet;
});
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);
$this->logger->method('info');
$this->service->getActivityIdsForSavedSearch($savedSearch, $user);
$this->assertNotNull($capturedCriteria);
}
public function testGetActivityIdsFiltersOutClosingPeriodDateFilters(): void
{
$user = $this->makeUser();
$closingStartFilter = $this->makeFilter(ClosingPeriodFilter::KEY_START_DATE, '2025-01-01');
$closingEndFilter = $this->makeFilter(ClosingPeriodFilter::KEY_END_DATE, '2025-03-31');
$regularFilter = $this->makeFilter('rep_id', '99');
$savedSearch = $this->makeSavedSearch([
$closingStartFilter,
$closingEndFilter,
$regularFilter,
]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn([]);
$this->activitySearch->expects($this->once())
->method('getOnDemandPageFilterSet')
->willReturn($filterSet);
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn(['id-1']);
$this->logger->method('info');
$result = $this->service->getActivityIdsForSavedSearch($savedSearch, $user);
$this->assertEquals(['id-1'], $result);
}
public function testGetActivityIdsHandlesArrayFilters(): void
{
$user = $this->makeUser();
$filter1 = $this->makeFilter('outcome', 'positive');
$filter2 = $this->makeFilter('outcome', 'negative');
$savedSearch = $this->makeSavedSearch([$filter1, $filter2]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn(['outcome']);
$this->activitySearch->method('getOnDemandPageFilterSet')->willReturn($filterSet);
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn(['id-1']);
$this->logger->method('info');
$result = $this->service->getActivityIdsForSavedSearch($savedSearch, $user);
$this->assertEquals(['id-1'], $result);
}
public function testGetActivityIdsHandlesScalarFilters(): void
{
$user = $this->makeUser();
$filter = $this->makeFilter('direction', 'inbound');
$savedSearch = $this->makeSavedSearch([$filter]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn([]);
$this->activitySearch->method('getOnDemandPageFilterSet')->willReturn($filterSet);
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn(['id-5']);
$this->logger->method('info');
$result = $this->service->getActivityIdsForSavedSearch($savedSearch, $user);
$this->assertEquals(['id-5'], $result);
}
public function testGetActivityIdsPassesNonZeroSequenceNumberToDisableFirstRequestDefaults(): void
{
$user = $this->makeUser();
$savedSearch = $this->makeSavedSearch([]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn([]);
$capturedCriteria = null;
$this->activitySearch->expects($this->once())
->method('getOnDemandPageFilterSet')
->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {
$capturedCriteria = $criteria;
return $filterSet;
});
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);
$this->logger->method('info');
$this->service->getActivityIdsForSavedSearch($savedSearch, $user);
$this->assertNotNull($capturedCriteria);
$this->assertFalse($capturedCriteria->isFirstRequest());
}
public function testGetActivityIdsLogsWithCorrectContext(): void
{
$user = $this->makeUser();
$savedSearch = $this->makeSavedSearch([]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn([]);
$this->activitySearch->method('getOnDemandPageFilterSet')->willReturn($filterSet);
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn(['a', 'b']);
$this->logger->expects($this->once())
->method('info')
->with(
'[AskJiminnyReport] Fetched activity IDs for saved search',
$this->callback(fn ($context) => $context['saved_search_id'] === 42
&& $context['user_id'] === 1
&& $context['activity_count'] === 2)
);
$this->service->getActivityIdsForSavedSearch($savedSearch, $user);
}
public static function frequencyDateRangeProvider(): array
{
return [
'daily' => [
AutomatedReportsService::FREQUENCY_DAILY,
'2025-06-15 00:00:00',
'2025-06-15 23:59:59',
],
'weekly' => [
AutomatedReportsService::FREQUENCY_WEEKLY,
'2025-06-09 00:00:00',
'2025-06-15 23:59:59',
],
'monthly' => [
AutomatedReportsService::FREQUENCY_MONTHLY,
'2025-05-01 00:00:00',
'2025-05-31 23:59:59',
],
'quarterly' => [
AutomatedReportsService::FREQUENCY_QUARTERLY,
'2025-01-01 00:00:00',
'2025-03-31 23:59:59',
],
];
}
/**
* @dataProvider frequencyDateRangeProvider
*/
public function testGetActivityIdsInjectsDateRangeForFrequency(
string $frequency,
string $expectedStartDate,
string $expectedEndDate,
): void {
CarbonImmutable::setTestNow('2025-06-16 12:00:00');
try {
$user = $this->makeUser();
$savedSearch = $this->makeSavedSearch([]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn([]);
$this->logger->method('info');
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);
$capturedCriteria = null;
$this->activitySearch->expects($this->once())
->method('getOnDemandPageFilterSet')
->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {
$capturedCriteria = $criteria;
return $filterSet;
});
$this->service->getActivityIdsForSavedSearch($savedSearch, $user, $frequency);
$this->assertNotNull($capturedCriteria);
$this->assertSame($expectedStartDate, $capturedCriteria->getStartDate()->format('Y-m-d H:i:s'));
$this->assertSame($expectedEndDate, $capturedCriteria->getEndDate()->format('Y-m-d H:i:s'));
} finally {
CarbonImmutable::setTestNow();
}
}
public function testGetActivityIdsWithNullFrequencyDoesNotInjectDates(): void
{
$user = $this->makeUser();
$savedSearch = $this->makeSavedSearch([]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn([]);
$this->logger->method('info');
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);
$capturedCriteria = null;
$this->activitySearch->expects($this->once())
->method('getOnDemandPageFilterSet')
->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {
$capturedCriteria = $criteria;
return $filterSet;
});
$this->service->getActivityIdsForSavedSearch($savedSearch, $user, null);
$this->assertNotNull($capturedCriteria);
$this->assertNull($capturedCriteria->getStartDate());
$this->assertNull($capturedCriteria->getEndDate());
}
public function testGetActivityIdsWithUnknownFrequencyDoesNotInjectDates(): void
{
$user = $this->makeUser();
$savedSearch = $this->makeSavedSearch([]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn([]);
$this->logger->method('info');
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);
$capturedCriteria = null;
$this->activitySearch->expects($this->once())
->method('getOnDemandPageFilterSet')
->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {
$capturedCriteria = $criteria;
return $filterSet;
});
$this->service->getActivityIdsForSavedSearch($savedSearch, $user, AutomatedReportsService::FREQUENCY_ONE_OFF);
$this->assertNotNull($capturedCriteria);
$this->assertNull($capturedCriteria->getStartDate());
$this->assertNull($capturedCriteria->getEndDate());
}
public function testGetActivityIdsFrequencyDateRangeOverridesSavedSearchDateFilters(): void
{
CarbonImmutable::setTestNow('2025-06-16 12:00:00');
try {
$user = $this->makeUser();
$startDateFilter = $this->makeFilter(ActivityActualDate::PARAM_START_DATE, '2024-01-01 00:00:00');
$endDateFilter = $this->makeFilter(ActivityActualDate::PARAM_END_DATE, '2024-12-31 23:59:59');
$savedSearch = $this->makeSavedSearch([$startDateFilter, $endDateFilter]);
$filterSet = $this->createMock(FilterDefinitionCollection::class);
$this->activitySearch->method('getArrayFilterKeys')->willReturn([]);
$this->logger->method('info');
$this->elasticRepository->method('onDemandSearchIdsOnly')->willReturn([]);
$capturedCriteria = null;
$this->activitySearch->expects($this->once())
->method('getOnDemandPageFilterSet')
->willReturnCallback(function (Criteria $criteria) use ($filterSet, &$capturedCriteria) {
$capturedCriteria = $criteria;
return $filterSet;
});
$this->service->getActivityIdsForSavedSearch($savedSearch, $user, AutomatedReportsService::FREQUENCY_DAILY);
$this->assertNotNull($capturedCriteria);
$this->assertSame('2025-06-15 00:00:00', $capturedCriteria->getStartDate()->format('Y-m-d H:i:s'));
$this->assertSame('2025-06-15 23:59:59', $capturedCriteria->getEndDate()->format('Y-m-d H:i:s'));
} finally {
CarbonImmutable::setTestNow();
}
}
}
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide
app ~/jiminny/app
.circleci
.cursor
.github
.sonarlint
.vscode
.windsurf
app, sources root
Actions
Component
Configuration...
|
55693
|
|
65105
|
1443
|
18
|
2026-04-21T11:59:47.342025+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-21/1776 /Users/lukas/.screenpipe/data/data/2026-04-21/1776772787342_m1.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsRepository.php
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Unable to find diagrams for the selected elements
Unable to find diagrams for the selected elements
text/html
text/html
text/html
Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
16
6
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Repositories;
use Carbon\CarbonImmutable;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Carbon;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Pagination\LengthAwarePaginator;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Jiminny\Services\Kiosk\AutomatedReports\ReportSort;
use Jiminny\Services\Kiosk\AutomatedReports\ReportSortDirection;
class AutomatedReportsRepository
{
/**
* Create a new automated report
*
* @param array $data
*
* @return AutomatedReport
*/
public function create(array $data): AutomatedReport
{
return AutomatedReport::create($data);
}
/**
* Find an automated report by UUID
*
* @param string $uuid
*
* @return AutomatedReport|null
*/
public function findByUuid(string $uuid): ?AutomatedReport
{
return AutomatedReport::where('uuid', AutomatedReport::toOptimized($uuid))->first();
}
public function findByIdOrUuid(string $idOrUuid): ?AutomatedReport
{
if (is_numeric($idOrUuid)) {
return AutomatedReport::find((int) $idOrUuid);
}
return AutomatedReport::where('uuid', AutomatedReport::toOptimized($idOrUuid))->first();
}
/**
* Retrieve all standard (non-Ask Jiminny) automated reports.
*
* @param string $sortColumn The column to sort by. Allowed values: 'created_by', 'created_at'. Defaults to 'created_at'.
* @param string $sortDirection The sort direction. Allowed values: 'asc', 'desc'. Defaults to 'desc'.
*
* @return Collection<AutomatedReport>
*/
public function getAllStandardReports(
string $sortColumn = 'created_at',
string $sortDirection = 'desc'
): Collection {
return $this->buildSortedQuery($sortColumn, $sortDirection)
->whereNot('type', AutomatedReportsService::TYPE_ASK_JIMINNY)
->get();
}
/**
* Retrieve all Ask Jiminny reports created by the given user.
*
* @param User $user The user whose reports to retrieve.
* @param string $sortColumn The column to sort by. Allowed values: 'created_by', 'created_at'. Defaults to 'created_at'.
* @param string $sortDirection The sort direction. Allowed values: 'asc', 'desc'. Defaults to 'desc'.
*
* @return Collection<AutomatedReport>
*/
public function getAskJiminnyReportsByUser(
User $user,
string $sortColumn = 'created_at',
string $sortDirection = 'desc'
): Collection {
return $this->buildSortedQuery($sortColumn, $sortDirection)
->where('type', AutomatedReportsService::TYPE_ASK_JIMINNY)
->where('created_by', $user->getId())
->get();
}
private function buildSortedQuery(string $sortColumn, string $sortDirection): \Illuminate\Database\Eloquent\Builder
{
$allowedColumns = ['created_by', 'created_at'];
if (! in_array($sortColumn, $allowedColumns)) {
$sortColumn = 'created_at';
}
$sortDirection = strtolower($sortDirection) === 'asc' ? 'asc' : 'desc';
$query = AutomatedReport::query()->with(['creator', 'team']);
if ($sortColumn === 'created_by') {
$query->leftJoin('users', 'users.id', '=', 'automated_reports.created_by')
->orderByRaw("users.name COLLATE utf8mb4_unicode_ci {$sortDirection}")
->select('automated_reports.*');
} else {
$query->orderBy($sortColumn, $sortDirection);
}
return $query;
}
/**
* Get all active Ask Jiminny reports whose expiry date has passed.
*
* @return Collection<AutomatedReport>
*/
public function getExpiredActiveAskJiminnyReports(): Collection
{
return AutomatedReport::where('status', true)
->where('type', AutomatedReportsService::TYPE_ASK_JIMINNY)
->whereNotNull('expires_at')
->where('expires_at', '<', now()->toDateString())
->get();
}
/**
* Get all active and enabled reports with active teams for the specified frequency.
*
* @param string $frequency
*
* @return Collection<AutomatedReport>
*/
public function getActiveReportsByFrequency(string $frequency): Collection
{
return AutomatedReport::where('automated_reports.status', true)
->where('automated_reports.frequency', $frequency)
->join('teams', 'automated_reports.team_id', '=', 'teams.id')
->where('teams.status', Team::STATUS_ACTIVE)
->where(function ($query) {
$query->whereNull('automated_reports.expires_at')
->orWhere('automated_reports.expires_at', '>=', now()->toDateString());
})
->select('automated_reports.*')
->get();
}
/**
* Update an automated report
*
* @param AutomatedReport $report
* @param array $data
*
* @return AutomatedReport
*/
public function update(AutomatedReport $report, array $data): AutomatedReport
{
$report->update($data);
return $report;
}
/**
* Create a new automated report result.
*
* @param array $data The data to create the automated report result with.
*
* @return AutomatedReportResult The newly created automated report result.
*/
public function createResult(array $data): AutomatedReportResult
{
return AutomatedReportResult::create($data);
}
/**
* Find an automated report result by UUID.
*
* @param string $uuid The UUID to find the automated report result with.
*
* @return AutomatedReportResult|null The automated report result if found, otherwise null.
*/
public function findResultByUuid(string $uuid): ?AutomatedReportResult
{
return AutomatedReportResult::where('uuid', AutomatedReportResult::toOptimized($uuid))->first();
}
public function findResultByUuidForUser(string $uuid, User $user): ?AutomatedReportResult
{
return AutomatedReportResult::query()
->where('uuid', AutomatedReportResult::toOptimized($uuid))
->whereHas('report', static function ($query) use ($user): void {
$query->where('team_id', $user->getTeamId())
->where('created_by', $user->getId());
})
->first();
}
public function findChildResult(AutomatedReportResult $result, string $type): ?AutomatedReportResult
{
return AutomatedReportResult::query()
->where('parent_id', $result->getId())
->where('media_type', $type)
->first();
}
public function findLatestDefaultOrFailedResult(AutomatedReport $report): ?AutomatedReportResult
{
return AutomatedReportResult::query()
->where('report_id', $report->getId())
->whereIn('status', [AutomatedReportResult::STATUS_DEFAULT, AutomatedReportResult::STATUS_FAILED])
->latest()
->first();
}
public function getGeneratedNotSentResults(): Collection
{
return AutomatedReportResult::query()
->whereNotNull('generated_at')
->whereNull('sent_at')
->where('status', AutomatedReportResult::STATUS_GENERATED)
->whereHas('report')
->with('report')
->get();
}
public function getPaginatedUserReports(
User $user,
ReportSort $sort,
ReportSortDirection $sortDirection,
int $resultsPerPage,
int $page,
?Carbon $fromDate,
?Carbon $toDate,
array $teamIds,
array $reportTypes,
?string $name,
): LengthAwarePaginator {
$query = AutomatedReportResult::query()
->whereNotNull('automated_report_results.generated_at')
->join('automated_reports', 'automated_report_results.report_id', '=', 'automated_reports.id')
->where('automated_reports.team_id', $user->getTeamId())
->whereJsonContains('automated_reports.recipients->users', $user->getId())
->orderByRaw("$sort->value COLLATE utf8mb4_unicode_ci {$sortDirection->value}")
->select('automated_report_results.*')
->with('report.team');
if ($fromDate !== null && $toDate !== null) {
$query->whereBetween('generated_at', [$fromDate, $toDate]);
}
if (! empty($teamIds)) {
$query->where(function ($q) use ($teamIds) {
foreach ($teamIds as $id) {
$q->orWhereJsonContains('automated_reports.groups', $id);
}
});
}
if (! empty($reportTypes)) {
$query->whereIn('automated_reports.type', $reportTypes);
}
if (! empty($name)) {
$query->whereLike('name', "%$name%");
}
return $query->paginate($resultsPerPage, ['*'], 'page', $page);
}
public function countUserReports(User $user): int
{
return AutomatedReportResult::query()
->whereNotNull('generated_at')
->whereNotNull('sent_at')
->whereHas('report', function ($q) use ($user) {
$q->where('team_id', $user->getTeamId())
->whereJsonContains('recipients->users', $user->getId());
})
->count();
}
/**
* Get report IDs for a specific team
*
* @param Team $team
*
* @return \Illuminate\Support\Collection
*/
public function getReportIdsByTeam(Team $team): \Illuminate\Support\Collection
{
return AutomatedReport::where('team_id', $team->getId())->pluck('id');
}
/**
* Get all reports for a specific team
*
* @param Team $team
*
* @return Collection
*/
public function getReportsByTeam(Team $team): Collection
{
return AutomatedReport::where('team_id', $team->getId())->get();
}
/**
* Get all report results for a specific report
*
* @param AutomatedReport $report
*
* @return Collection
*/
public function getResultsByReport(AutomatedReport $report): Collection
{
return $this->getResultsByReportQuery($report)->get();
}
public function getResultsByReportQuery(AutomatedReport $report): Builder
{
return AutomatedReportResult::where('report_id', $report->getId());
}
public function getReportResultsQueryForRetention(Team $team, CarbonImmutable $retentionDate): Builder
{
$reportIds = $this->getReportIdsByTeam($team);
return AutomatedReportResult::query()->whereIn('report_id', $reportIds)
->whereRaw('IFNULL(generated_at, created_at) <= ?', [$retentionDate]);
}
/**
* @param int|null $teamId Optional team ID to filter results
*
* @return \Illuminate\Support\Collection<int, int> Collection of team IDs
*/
public function getTeamIdsWithReportsResults(?int $teamId = null): \Illuminate\Support\Collection
{
$query = DB::table('automated_reports')
->join('teams', 'automated_reports.team_id', '=', 'teams.id')
->select('teams.id')
->distinct();
if ($teamId !== null) {
$query->where('teams.id', $teamId);
}
return $query->pluck('teams.id');
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set ask_anything_prompt_id = NULL where id = 69;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Unable to find diagrams for the selected elements","depth":2,"value":"Unable to find diagrams for the selected elements","help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":3,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":3,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":3,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny, but local branch is out of sync with remote","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AskJiminnyReportActivityServiceTest","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AskJiminnyReportActivityServiceTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AskJiminnyReportActivityServiceTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"16","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"6","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Repositories;\n\nuse Carbon\\CarbonImmutable;\nuse Illuminate\\Database\\Eloquent\\Builder;\nuse Illuminate\\Support\\Carbon;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Pagination\\LengthAwarePaginator;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\ReportSort;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\ReportSortDirection;\n\nclass AutomatedReportsRepository\n{\n /**\n * Create a new automated report\n *\n * @param array $data\n *\n * @return AutomatedReport\n */\n public function create(array $data): AutomatedReport\n {\n return AutomatedReport::create($data);\n }\n\n /**\n * Find an automated report by UUID\n *\n * @param string $uuid\n *\n * @return AutomatedReport|null\n */\n public function findByUuid(string $uuid): ?AutomatedReport\n {\n return AutomatedReport::where('uuid', AutomatedReport::toOptimized($uuid))->first();\n }\n\n public function findByIdOrUuid(string $idOrUuid): ?AutomatedReport\n {\n if (is_numeric($idOrUuid)) {\n return AutomatedReport::find((int) $idOrUuid);\n }\n\n return AutomatedReport::where('uuid', AutomatedReport::toOptimized($idOrUuid))->first();\n }\n\n /**\n * Retrieve all standard (non-Ask Jiminny) automated reports.\n *\n * @param string $sortColumn The column to sort by. Allowed values: 'created_by', 'created_at'. Defaults to 'created_at'.\n * @param string $sortDirection The sort direction. Allowed values: 'asc', 'desc'. Defaults to 'desc'.\n *\n * @return Collection<AutomatedReport>\n */\n public function getAllStandardReports(\n string $sortColumn = 'created_at',\n string $sortDirection = 'desc'\n ): Collection {\n return $this->buildSortedQuery($sortColumn, $sortDirection)\n ->whereNot('type', AutomatedReportsService::TYPE_ASK_JIMINNY)\n ->get();\n }\n\n /**\n * Retrieve all Ask Jiminny reports created by the given user.\n *\n * @param User $user The user whose reports to retrieve.\n * @param string $sortColumn The column to sort by. Allowed values: 'created_by', 'created_at'. Defaults to 'created_at'.\n * @param string $sortDirection The sort direction. Allowed values: 'asc', 'desc'. Defaults to 'desc'.\n *\n * @return Collection<AutomatedReport>\n */\n public function getAskJiminnyReportsByUser(\n User $user,\n string $sortColumn = 'created_at',\n string $sortDirection = 'desc'\n ): Collection {\n return $this->buildSortedQuery($sortColumn, $sortDirection)\n ->where('type', AutomatedReportsService::TYPE_ASK_JIMINNY)\n ->where('created_by', $user->getId())\n ->get();\n }\n\n private function buildSortedQuery(string $sortColumn, string $sortDirection): \\Illuminate\\Database\\Eloquent\\Builder\n {\n $allowedColumns = ['created_by', 'created_at'];\n if (! in_array($sortColumn, $allowedColumns)) {\n $sortColumn = 'created_at';\n }\n\n $sortDirection = strtolower($sortDirection) === 'asc' ? 'asc' : 'desc';\n\n $query = AutomatedReport::query()->with(['creator', 'team']);\n\n if ($sortColumn === 'created_by') {\n $query->leftJoin('users', 'users.id', '=', 'automated_reports.created_by')\n ->orderByRaw(\"users.name COLLATE utf8mb4_unicode_ci {$sortDirection}\")\n ->select('automated_reports.*');\n } else {\n $query->orderBy($sortColumn, $sortDirection);\n }\n\n return $query;\n }\n\n /**\n * Get all active Ask Jiminny reports whose expiry date has passed.\n *\n * @return Collection<AutomatedReport>\n */\n public function getExpiredActiveAskJiminnyReports(): Collection\n {\n return AutomatedReport::where('status', true)\n ->where('type', AutomatedReportsService::TYPE_ASK_JIMINNY)\n ->whereNotNull('expires_at')\n ->where('expires_at', '<', now()->toDateString())\n ->get();\n }\n\n /**\n * Get all active and enabled reports with active teams for the specified frequency.\n *\n * @param string $frequency\n *\n * @return Collection<AutomatedReport>\n */\n public function getActiveReportsByFrequency(string $frequency): Collection\n {\n return AutomatedReport::where('automated_reports.status', true)\n ->where('automated_reports.frequency', $frequency)\n ->join('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->where('teams.status', Team::STATUS_ACTIVE)\n ->where(function ($query) {\n $query->whereNull('automated_reports.expires_at')\n ->orWhere('automated_reports.expires_at', '>=', now()->toDateString());\n })\n ->select('automated_reports.*')\n ->get();\n }\n\n /**\n * Update an automated report\n *\n * @param AutomatedReport $report\n * @param array $data\n *\n * @return AutomatedReport\n */\n public function update(AutomatedReport $report, array $data): AutomatedReport\n {\n $report->update($data);\n\n return $report;\n }\n\n /**\n * Create a new automated report result.\n *\n * @param array $data The data to create the automated report result with.\n *\n * @return AutomatedReportResult The newly created automated report result.\n */\n public function createResult(array $data): AutomatedReportResult\n {\n return AutomatedReportResult::create($data);\n }\n\n /**\n * Find an automated report result by UUID.\n *\n * @param string $uuid The UUID to find the automated report result with.\n *\n * @return AutomatedReportResult|null The automated report result if found, otherwise null.\n */\n public function findResultByUuid(string $uuid): ?AutomatedReportResult\n {\n return AutomatedReportResult::where('uuid', AutomatedReportResult::toOptimized($uuid))->first();\n }\n\n public function findResultByUuidForUser(string $uuid, User $user): ?AutomatedReportResult\n {\n return AutomatedReportResult::query()\n ->where('uuid', AutomatedReportResult::toOptimized($uuid))\n ->whereHas('report', static function ($query) use ($user): void {\n $query->where('team_id', $user->getTeamId())\n ->where('created_by', $user->getId());\n })\n ->first();\n }\n\n public function findChildResult(AutomatedReportResult $result, string $type): ?AutomatedReportResult\n {\n return AutomatedReportResult::query()\n ->where('parent_id', $result->getId())\n ->where('media_type', $type)\n ->first();\n }\n\n public function findLatestDefaultOrFailedResult(AutomatedReport $report): ?AutomatedReportResult\n {\n return AutomatedReportResult::query()\n ->where('report_id', $report->getId())\n ->whereIn('status', [AutomatedReportResult::STATUS_DEFAULT, AutomatedReportResult::STATUS_FAILED])\n ->latest()\n ->first();\n }\n\n public function getGeneratedNotSentResults(): Collection\n {\n return AutomatedReportResult::query()\n ->whereNotNull('generated_at')\n ->whereNull('sent_at')\n ->where('status', AutomatedReportResult::STATUS_GENERATED)\n ->whereHas('report')\n ->with('report')\n ->get();\n }\n\n public function getPaginatedUserReports(\n User $user,\n ReportSort $sort,\n ReportSortDirection $sortDirection,\n int $resultsPerPage,\n int $page,\n ?Carbon $fromDate,\n ?Carbon $toDate,\n array $teamIds,\n array $reportTypes,\n ?string $name,\n ): LengthAwarePaginator {\n $query = AutomatedReportResult::query()\n ->whereNotNull('automated_report_results.generated_at')\n ->join('automated_reports', 'automated_report_results.report_id', '=', 'automated_reports.id')\n ->where('automated_reports.team_id', $user->getTeamId())\n ->whereJsonContains('automated_reports.recipients->users', $user->getId())\n ->orderByRaw(\"$sort->value COLLATE utf8mb4_unicode_ci {$sortDirection->value}\")\n ->select('automated_report_results.*')\n ->with('report.team');\n\n if ($fromDate !== null && $toDate !== null) {\n $query->whereBetween('generated_at', [$fromDate, $toDate]);\n }\n\n if (! empty($teamIds)) {\n $query->where(function ($q) use ($teamIds) {\n foreach ($teamIds as $id) {\n $q->orWhereJsonContains('automated_reports.groups', $id);\n }\n });\n }\n\n if (! empty($reportTypes)) {\n $query->whereIn('automated_reports.type', $reportTypes);\n }\n\n if (! empty($name)) {\n $query->whereLike('name', \"%$name%\");\n }\n\n return $query->paginate($resultsPerPage, ['*'], 'page', $page);\n }\n\n public function countUserReports(User $user): int\n {\n return AutomatedReportResult::query()\n ->whereNotNull('generated_at')\n ->whereNotNull('sent_at')\n ->whereHas('report', function ($q) use ($user) {\n $q->where('team_id', $user->getTeamId())\n ->whereJsonContains('recipients->users', $user->getId());\n })\n ->count();\n }\n\n /**\n * Get report IDs for a specific team\n *\n * @param Team $team\n *\n * @return \\Illuminate\\Support\\Collection\n */\n public function getReportIdsByTeam(Team $team): \\Illuminate\\Support\\Collection\n {\n return AutomatedReport::where('team_id', $team->getId())->pluck('id');\n }\n\n /**\n * Get all reports for a specific team\n *\n * @param Team $team\n *\n * @return Collection\n */\n public function getReportsByTeam(Team $team): Collection\n {\n return AutomatedReport::where('team_id', $team->getId())->get();\n }\n\n /**\n * Get all report results for a specific report\n *\n * @param AutomatedReport $report\n *\n * @return Collection\n */\n public function getResultsByReport(AutomatedReport $report): Collection\n {\n return $this->getResultsByReportQuery($report)->get();\n }\n\n public function getResultsByReportQuery(AutomatedReport $report): Builder\n {\n return AutomatedReportResult::where('report_id', $report->getId());\n }\n\n public function getReportResultsQueryForRetention(Team $team, CarbonImmutable $retentionDate): Builder\n {\n $reportIds = $this->getReportIdsByTeam($team);\n\n return AutomatedReportResult::query()->whereIn('report_id', $reportIds)\n ->whereRaw('IFNULL(generated_at, created_at) <= ?', [$retentionDate]);\n }\n\n /**\n * @param int|null $teamId Optional team ID to filter results\n *\n * @return \\Illuminate\\Support\\Collection<int, int> Collection of team IDs\n */\n public function getTeamIdsWithReportsResults(?int $teamId = null): \\Illuminate\\Support\\Collection\n {\n $query = DB::table('automated_reports')\n ->join('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->select('teams.id')\n ->distinct();\n\n if ($teamId !== null) {\n $query->where('teams.id', $teamId);\n }\n\n return $query->pluck('teams.id');\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Repositories;\n\nuse Carbon\\CarbonImmutable;\nuse Illuminate\\Database\\Eloquent\\Builder;\nuse Illuminate\\Support\\Carbon;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Pagination\\LengthAwarePaginator;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\ReportSort;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\ReportSortDirection;\n\nclass AutomatedReportsRepository\n{\n /**\n * Create a new automated report\n *\n * @param array $data\n *\n * @return AutomatedReport\n */\n public function create(array $data): AutomatedReport\n {\n return AutomatedReport::create($data);\n }\n\n /**\n * Find an automated report by UUID\n *\n * @param string $uuid\n *\n * @return AutomatedReport|null\n */\n public function findByUuid(string $uuid): ?AutomatedReport\n {\n return AutomatedReport::where('uuid', AutomatedReport::toOptimized($uuid))->first();\n }\n\n public function findByIdOrUuid(string $idOrUuid): ?AutomatedReport\n {\n if (is_numeric($idOrUuid)) {\n return AutomatedReport::find((int) $idOrUuid);\n }\n\n return AutomatedReport::where('uuid', AutomatedReport::toOptimized($idOrUuid))->first();\n }\n\n /**\n * Retrieve all standard (non-Ask Jiminny) automated reports.\n *\n * @param string $sortColumn The column to sort by. Allowed values: 'created_by', 'created_at'. Defaults to 'created_at'.\n * @param string $sortDirection The sort direction. Allowed values: 'asc', 'desc'. Defaults to 'desc'.\n *\n * @return Collection<AutomatedReport>\n */\n public function getAllStandardReports(\n string $sortColumn = 'created_at',\n string $sortDirection = 'desc'\n ): Collection {\n return $this->buildSortedQuery($sortColumn, $sortDirection)\n ->whereNot('type', AutomatedReportsService::TYPE_ASK_JIMINNY)\n ->get();\n }\n\n /**\n * Retrieve all Ask Jiminny reports created by the given user.\n *\n * @param User $user The user whose reports to retrieve.\n * @param string $sortColumn The column to sort by. Allowed values: 'created_by', 'created_at'. Defaults to 'created_at'.\n * @param string $sortDirection The sort direction. Allowed values: 'asc', 'desc'. Defaults to 'desc'.\n *\n * @return Collection<AutomatedReport>\n */\n public function getAskJiminnyReportsByUser(\n User $user,\n string $sortColumn = 'created_at',\n string $sortDirection = 'desc'\n ): Collection {\n return $this->buildSortedQuery($sortColumn, $sortDirection)\n ->where('type', AutomatedReportsService::TYPE_ASK_JIMINNY)\n ->where('created_by', $user->getId())\n ->get();\n }\n\n private function buildSortedQuery(string $sortColumn, string $sortDirection): \\Illuminate\\Database\\Eloquent\\Builder\n {\n $allowedColumns = ['created_by', 'created_at'];\n if (! in_array($sortColumn, $allowedColumns)) {\n $sortColumn = 'created_at';\n }\n\n $sortDirection = strtolower($sortDirection) === 'asc' ? 'asc' : 'desc';\n\n $query = AutomatedReport::query()->with(['creator', 'team']);\n\n if ($sortColumn === 'created_by') {\n $query->leftJoin('users', 'users.id', '=', 'automated_reports.created_by')\n ->orderByRaw(\"users.name COLLATE utf8mb4_unicode_ci {$sortDirection}\")\n ->select('automated_reports.*');\n } else {\n $query->orderBy($sortColumn, $sortDirection);\n }\n\n return $query;\n }\n\n /**\n * Get all active Ask Jiminny reports whose expiry date has passed.\n *\n * @return Collection<AutomatedReport>\n */\n public function getExpiredActiveAskJiminnyReports(): Collection\n {\n return AutomatedReport::where('status', true)\n ->where('type', AutomatedReportsService::TYPE_ASK_JIMINNY)\n ->whereNotNull('expires_at')\n ->where('expires_at', '<', now()->toDateString())\n ->get();\n }\n\n /**\n * Get all active and enabled reports with active teams for the specified frequency.\n *\n * @param string $frequency\n *\n * @return Collection<AutomatedReport>\n */\n public function getActiveReportsByFrequency(string $frequency): Collection\n {\n return AutomatedReport::where('automated_reports.status', true)\n ->where('automated_reports.frequency', $frequency)\n ->join('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->where('teams.status', Team::STATUS_ACTIVE)\n ->where(function ($query) {\n $query->whereNull('automated_reports.expires_at')\n ->orWhere('automated_reports.expires_at', '>=', now()->toDateString());\n })\n ->select('automated_reports.*')\n ->get();\n }\n\n /**\n * Update an automated report\n *\n * @param AutomatedReport $report\n * @param array $data\n *\n * @return AutomatedReport\n */\n public function update(AutomatedReport $report, array $data): AutomatedReport\n {\n $report->update($data);\n\n return $report;\n }\n\n /**\n * Create a new automated report result.\n *\n * @param array $data The data to create the automated report result with.\n *\n * @return AutomatedReportResult The newly created automated report result.\n */\n public function createResult(array $data): AutomatedReportResult\n {\n return AutomatedReportResult::create($data);\n }\n\n /**\n * Find an automated report result by UUID.\n *\n * @param string $uuid The UUID to find the automated report result with.\n *\n * @return AutomatedReportResult|null The automated report result if found, otherwise null.\n */\n public function findResultByUuid(string $uuid): ?AutomatedReportResult\n {\n return AutomatedReportResult::where('uuid', AutomatedReportResult::toOptimized($uuid))->first();\n }\n\n public function findResultByUuidForUser(string $uuid, User $user): ?AutomatedReportResult\n {\n return AutomatedReportResult::query()\n ->where('uuid', AutomatedReportResult::toOptimized($uuid))\n ->whereHas('report', static function ($query) use ($user): void {\n $query->where('team_id', $user->getTeamId())\n ->where('created_by', $user->getId());\n })\n ->first();\n }\n\n public function findChildResult(AutomatedReportResult $result, string $type): ?AutomatedReportResult\n {\n return AutomatedReportResult::query()\n ->where('parent_id', $result->getId())\n ->where('media_type', $type)\n ->first();\n }\n\n public function findLatestDefaultOrFailedResult(AutomatedReport $report): ?AutomatedReportResult\n {\n return AutomatedReportResult::query()\n ->where('report_id', $report->getId())\n ->whereIn('status', [AutomatedReportResult::STATUS_DEFAULT, AutomatedReportResult::STATUS_FAILED])\n ->latest()\n ->first();\n }\n\n public function getGeneratedNotSentResults(): Collection\n {\n return AutomatedReportResult::query()\n ->whereNotNull('generated_at')\n ->whereNull('sent_at')\n ->where('status', AutomatedReportResult::STATUS_GENERATED)\n ->whereHas('report')\n ->with('report')\n ->get();\n }\n\n public function getPaginatedUserReports(\n User $user,\n ReportSort $sort,\n ReportSortDirection $sortDirection,\n int $resultsPerPage,\n int $page,\n ?Carbon $fromDate,\n ?Carbon $toDate,\n array $teamIds,\n array $reportTypes,\n ?string $name,\n ): LengthAwarePaginator {\n $query = AutomatedReportResult::query()\n ->whereNotNull('automated_report_results.generated_at')\n ->join('automated_reports', 'automated_report_results.report_id', '=', 'automated_reports.id')\n ->where('automated_reports.team_id', $user->getTeamId())\n ->whereJsonContains('automated_reports.recipients->users', $user->getId())\n ->orderByRaw(\"$sort->value COLLATE utf8mb4_unicode_ci {$sortDirection->value}\")\n ->select('automated_report_results.*')\n ->with('report.team');\n\n if ($fromDate !== null && $toDate !== null) {\n $query->whereBetween('generated_at', [$fromDate, $toDate]);\n }\n\n if (! empty($teamIds)) {\n $query->where(function ($q) use ($teamIds) {\n foreach ($teamIds as $id) {\n $q->orWhereJsonContains('automated_reports.groups', $id);\n }\n });\n }\n\n if (! empty($reportTypes)) {\n $query->whereIn('automated_reports.type', $reportTypes);\n }\n\n if (! empty($name)) {\n $query->whereLike('name', \"%$name%\");\n }\n\n return $query->paginate($resultsPerPage, ['*'], 'page', $page);\n }\n\n public function countUserReports(User $user): int\n {\n return AutomatedReportResult::query()\n ->whereNotNull('generated_at')\n ->whereNotNull('sent_at')\n ->whereHas('report', function ($q) use ($user) {\n $q->where('team_id', $user->getTeamId())\n ->whereJsonContains('recipients->users', $user->getId());\n })\n ->count();\n }\n\n /**\n * Get report IDs for a specific team\n *\n * @param Team $team\n *\n * @return \\Illuminate\\Support\\Collection\n */\n public function getReportIdsByTeam(Team $team): \\Illuminate\\Support\\Collection\n {\n return AutomatedReport::where('team_id', $team->getId())->pluck('id');\n }\n\n /**\n * Get all reports for a specific team\n *\n * @param Team $team\n *\n * @return Collection\n */\n public function getReportsByTeam(Team $team): Collection\n {\n return AutomatedReport::where('team_id', $team->getId())->get();\n }\n\n /**\n * Get all report results for a specific report\n *\n * @param AutomatedReport $report\n *\n * @return Collection\n */\n public function getResultsByReport(AutomatedReport $report): Collection\n {\n return $this->getResultsByReportQuery($report)->get();\n }\n\n public function getResultsByReportQuery(AutomatedReport $report): Builder\n {\n return AutomatedReportResult::where('report_id', $report->getId());\n }\n\n public function getReportResultsQueryForRetention(Team $team, CarbonImmutable $retentionDate): Builder\n {\n $reportIds = $this->getReportIdsByTeam($team);\n\n return AutomatedReportResult::query()->whereIn('report_id', $reportIds)\n ->whereRaw('IFNULL(generated_at, created_at) <= ?', [$retentionDate]);\n }\n\n /**\n * @param int|null $teamId Optional team ID to filter results\n *\n * @return \\Illuminate\\Support\\Collection<int, int> Collection of team IDs\n */\n public function getTeamIdsWithReportsResults(?int $teamId = null): \\Illuminate\\Support\\Collection\n {\n $query = DB::table('automated_reports')\n ->join('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->select('teams.id')\n ->distinct();\n\n if ($teamId !== null) {\n $query->where('teams.id', $teamId);\n }\n\n return $query->pluck('teams.id');\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"18","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"14","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set ask_anything_prompt_id = NULL where id = 69;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","depth":4,"value":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set ask_anything_prompt_id = NULL where id = 69;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
4755984369087833973
|
-2393068234936543675
|
visual_change
|
accessibility
|
NULL
|
Unable to find diagrams for the selected elements
Unable to find diagrams for the selected elements
text/html
text/html
text/html
Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
16
6
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Repositories;
use Carbon\CarbonImmutable;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Carbon;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Pagination\LengthAwarePaginator;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Jiminny\Services\Kiosk\AutomatedReports\ReportSort;
use Jiminny\Services\Kiosk\AutomatedReports\ReportSortDirection;
class AutomatedReportsRepository
{
/**
* Create a new automated report
*
* @param array $data
*
* @return AutomatedReport
*/
public function create(array $data): AutomatedReport
{
return AutomatedReport::create($data);
}
/**
* Find an automated report by UUID
*
* @param string $uuid
*
* @return AutomatedReport|null
*/
public function findByUuid(string $uuid): ?AutomatedReport
{
return AutomatedReport::where('uuid', AutomatedReport::toOptimized($uuid))->first();
}
public function findByIdOrUuid(string $idOrUuid): ?AutomatedReport
{
if (is_numeric($idOrUuid)) {
return AutomatedReport::find((int) $idOrUuid);
}
return AutomatedReport::where('uuid', AutomatedReport::toOptimized($idOrUuid))->first();
}
/**
* Retrieve all standard (non-Ask Jiminny) automated reports.
*
* @param string $sortColumn The column to sort by. Allowed values: 'created_by', 'created_at'. Defaults to 'created_at'.
* @param string $sortDirection The sort direction. Allowed values: 'asc', 'desc'. Defaults to 'desc'.
*
* @return Collection<AutomatedReport>
*/
public function getAllStandardReports(
string $sortColumn = 'created_at',
string $sortDirection = 'desc'
): Collection {
return $this->buildSortedQuery($sortColumn, $sortDirection)
->whereNot('type', AutomatedReportsService::TYPE_ASK_JIMINNY)
->get();
}
/**
* Retrieve all Ask Jiminny reports created by the given user.
*
* @param User $user The user whose reports to retrieve.
* @param string $sortColumn The column to sort by. Allowed values: 'created_by', 'created_at'. Defaults to 'created_at'.
* @param string $sortDirection The sort direction. Allowed values: 'asc', 'desc'. Defaults to 'desc'.
*
* @return Collection<AutomatedReport>
*/
public function getAskJiminnyReportsByUser(
User $user,
string $sortColumn = 'created_at',
string $sortDirection = 'desc'
): Collection {
return $this->buildSortedQuery($sortColumn, $sortDirection)
->where('type', AutomatedReportsService::TYPE_ASK_JIMINNY)
->where('created_by', $user->getId())
->get();
}
private function buildSortedQuery(string $sortColumn, string $sortDirection): \Illuminate\Database\Eloquent\Builder
{
$allowedColumns = ['created_by', 'created_at'];
if (! in_array($sortColumn, $allowedColumns)) {
$sortColumn = 'created_at';
}
$sortDirection = strtolower($sortDirection) === 'asc' ? 'asc' : 'desc';
$query = AutomatedReport::query()->with(['creator', 'team']);
if ($sortColumn === 'created_by') {
$query->leftJoin('users', 'users.id', '=', 'automated_reports.created_by')
->orderByRaw("users.name COLLATE utf8mb4_unicode_ci {$sortDirection}")
->select('automated_reports.*');
} else {
$query->orderBy($sortColumn, $sortDirection);
}
return $query;
}
/**
* Get all active Ask Jiminny reports whose expiry date has passed.
*
* @return Collection<AutomatedReport>
*/
public function getExpiredActiveAskJiminnyReports(): Collection
{
return AutomatedReport::where('status', true)
->where('type', AutomatedReportsService::TYPE_ASK_JIMINNY)
->whereNotNull('expires_at')
->where('expires_at', '<', now()->toDateString())
->get();
}
/**
* Get all active and enabled reports with active teams for the specified frequency.
*
* @param string $frequency
*
* @return Collection<AutomatedReport>
*/
public function getActiveReportsByFrequency(string $frequency): Collection
{
return AutomatedReport::where('automated_reports.status', true)
->where('automated_reports.frequency', $frequency)
->join('teams', 'automated_reports.team_id', '=', 'teams.id')
->where('teams.status', Team::STATUS_ACTIVE)
->where(function ($query) {
$query->whereNull('automated_reports.expires_at')
->orWhere('automated_reports.expires_at', '>=', now()->toDateString());
})
->select('automated_reports.*')
->get();
}
/**
* Update an automated report
*
* @param AutomatedReport $report
* @param array $data
*
* @return AutomatedReport
*/
public function update(AutomatedReport $report, array $data): AutomatedReport
{
$report->update($data);
return $report;
}
/**
* Create a new automated report result.
*
* @param array $data The data to create the automated report result with.
*
* @return AutomatedReportResult The newly created automated report result.
*/
public function createResult(array $data): AutomatedReportResult
{
return AutomatedReportResult::create($data);
}
/**
* Find an automated report result by UUID.
*
* @param string $uuid The UUID to find the automated report result with.
*
* @return AutomatedReportResult|null The automated report result if found, otherwise null.
*/
public function findResultByUuid(string $uuid): ?AutomatedReportResult
{
return AutomatedReportResult::where('uuid', AutomatedReportResult::toOptimized($uuid))->first();
}
public function findResultByUuidForUser(string $uuid, User $user): ?AutomatedReportResult
{
return AutomatedReportResult::query()
->where('uuid', AutomatedReportResult::toOptimized($uuid))
->whereHas('report', static function ($query) use ($user): void {
$query->where('team_id', $user->getTeamId())
->where('created_by', $user->getId());
})
->first();
}
public function findChildResult(AutomatedReportResult $result, string $type): ?AutomatedReportResult
{
return AutomatedReportResult::query()
->where('parent_id', $result->getId())
->where('media_type', $type)
->first();
}
public function findLatestDefaultOrFailedResult(AutomatedReport $report): ?AutomatedReportResult
{
return AutomatedReportResult::query()
->where('report_id', $report->getId())
->whereIn('status', [AutomatedReportResult::STATUS_DEFAULT, AutomatedReportResult::STATUS_FAILED])
->latest()
->first();
}
public function getGeneratedNotSentResults(): Collection
{
return AutomatedReportResult::query()
->whereNotNull('generated_at')
->whereNull('sent_at')
->where('status', AutomatedReportResult::STATUS_GENERATED)
->whereHas('report')
->with('report')
->get();
}
public function getPaginatedUserReports(
User $user,
ReportSort $sort,
ReportSortDirection $sortDirection,
int $resultsPerPage,
int $page,
?Carbon $fromDate,
?Carbon $toDate,
array $teamIds,
array $reportTypes,
?string $name,
): LengthAwarePaginator {
$query = AutomatedReportResult::query()
->whereNotNull('automated_report_results.generated_at')
->join('automated_reports', 'automated_report_results.report_id', '=', 'automated_reports.id')
->where('automated_reports.team_id', $user->getTeamId())
->whereJsonContains('automated_reports.recipients->users', $user->getId())
->orderByRaw("$sort->value COLLATE utf8mb4_unicode_ci {$sortDirection->value}")
->select('automated_report_results.*')
->with('report.team');
if ($fromDate !== null && $toDate !== null) {
$query->whereBetween('generated_at', [$fromDate, $toDate]);
}
if (! empty($teamIds)) {
$query->where(function ($q) use ($teamIds) {
foreach ($teamIds as $id) {
$q->orWhereJsonContains('automated_reports.groups', $id);
}
});
}
if (! empty($reportTypes)) {
$query->whereIn('automated_reports.type', $reportTypes);
}
if (! empty($name)) {
$query->whereLike('name', "%$name%");
}
return $query->paginate($resultsPerPage, ['*'], 'page', $page);
}
public function countUserReports(User $user): int
{
return AutomatedReportResult::query()
->whereNotNull('generated_at')
->whereNotNull('sent_at')
->whereHas('report', function ($q) use ($user) {
$q->where('team_id', $user->getTeamId())
->whereJsonContains('recipients->users', $user->getId());
})
->count();
}
/**
* Get report IDs for a specific team
*
* @param Team $team
*
* @return \Illuminate\Support\Collection
*/
public function getReportIdsByTeam(Team $team): \Illuminate\Support\Collection
{
return AutomatedReport::where('team_id', $team->getId())->pluck('id');
}
/**
* Get all reports for a specific team
*
* @param Team $team
*
* @return Collection
*/
public function getReportsByTeam(Team $team): Collection
{
return AutomatedReport::where('team_id', $team->getId())->get();
}
/**
* Get all report results for a specific report
*
* @param AutomatedReport $report
*
* @return Collection
*/
public function getResultsByReport(AutomatedReport $report): Collection
{
return $this->getResultsByReportQuery($report)->get();
}
public function getResultsByReportQuery(AutomatedReport $report): Builder
{
return AutomatedReportResult::where('report_id', $report->getId());
}
public function getReportResultsQueryForRetention(Team $team, CarbonImmutable $retentionDate): Builder
{
$reportIds = $this->getReportIdsByTeam($team);
return AutomatedReportResult::query()->whereIn('report_id', $reportIds)
->whereRaw('IFNULL(generated_at, created_at) <= ?', [$retentionDate]);
}
/**
* @param int|null $teamId Optional team ID to filter results
*
* @return \Illuminate\Support\Collection<int, int> Collection of team IDs
*/
public function getTeamIdsWithReportsResults(?int $teamId = null): \Illuminate\Support\Collection
{
$query = DB::table('automated_reports')
->join('teams', 'automated_reports.team_id', '=', 'teams.id')
->select('teams.id')
->distinct();
if ($teamId !== null) {
$query->where('teams.id', $teamId);
}
return $query->pluck('teams.id');
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set ask_anything_prompt_id = NULL where id = 69;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
NULL
|
|
75365
|
1880
|
3
|
2026-04-24T06:21:02.462097+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-24/1777 /Users/lukas/.screenpipe/data/data/2026-04-24/1777011662462_m2.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsServiceTest.php
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
The Hunspell plugin has been deprecated. If you The Hunspell plugin has been deprecated. If you're not writing in Hungarian, you can safely uninstall Hunspell without affecting the dictionaries for other languages.
text/html
text/html
text/html
Loading Data Sources…
Project: faVsco.js, menu
#12011 on JY-20157-AJ-report-not-send-notification, menu
Start Listening for PHP Debug Connections
AutomatedReportsServiceTest
Run 'AutomatedReportsServiceTest'
Debug 'AutomatedReportsServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
Analyzing…
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Services\Kiosk\AutomatedReports;
use Carbon\Carbon;
use Illuminate\Support\Carbon as IlluminateCarbon;
use Illuminate\Contracts\Bus\Dispatcher;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Storage;
use Jiminny\Component\AskAnything\AskAnythingPromptService;
use Jiminny\Component\AskAnything\Dtos\AskAnythingPromptDto;
use Jiminny\Component\UrlGenerator\Webhook;
use Jiminny\Contracts\Repositories\PlaybookCategoryRepository;
use Jiminny\Contracts\Repositories\TeamRepository;
use Jiminny\Contracts\Repositories\UserRepository;
use Jiminny\Exceptions\InvalidArgumentException;
use Jiminny\Exceptions\ModelNotFoundException;
use Illuminate\Support\Collection;
use Jiminny\Models\AskAnything\AskAnythingPrompt;
use Jiminny\Models\AskAnything\AskAnythingPromptTarget;
use Jiminny\Models\Activity\Search;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Feature\FeatureEnum;
use Jiminny\Models\Group;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AskAnythingRepository;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Repositories\GroupRepository;
use Jiminny\Repositories\SearchRepository;
use Jiminny\Repositories\StageRepository;
use Jiminny\Services\Kiosk\AutomatedReports\ActivityTypeService;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Jiminny\Services\Kiosk\AutomatedReports\DealStagesService;
use Jiminny\Services\Kiosk\AutomatedReports\RecipientsService;
use Mockery;
use PHPUnit\Framework\Attributes\DataProvider;
use Tests\TestCase;
class AutomatedReportsServiceTest extends TestCase
{
private AutomatedReportsService $service;
protected function setUp(): void
{
parent::setUp();
// Create a real instance of the service without calling the constructor
$reflection = new \ReflectionClass(AutomatedReportsService::class);
$this->service = $reflection->newInstanceWithoutConstructor();
// Manually set the dependencies using reflection
$dependencies = [
'teamRepository' => TeamRepository::class,
'groupRepository' => GroupRepository::class,
'userRepository' => UserRepository::class,
'stageRepository' => StageRepository::class,
'dealStagesService' => DealStagesService::class,
'recipientsService' => RecipientsService::class,
'automatedReportsRepository' => AutomatedReportsRepository::class,
'webhookService' => Webhook::class,
'dispatcher' => Dispatcher::class,
'activityTypeService' => ActivityTypeService::class,
'playbookCategoryRepository' => PlaybookCategoryRepository::class,
'askAnythingPromptService' => AskAnythingPromptService::class,
'activitySearchRepository' => SearchRepository::class,
'askAnythingRepository' => AskAnythingRepository::class,
];
foreach ($dependencies as $propertyName => $class) {
$property = $reflection->getProperty($propertyName);
$property->setAccessible(true);
$property->setValue($this->service, $this->createMock($class));
}
}
protected function tearDown(): void
{
parent::tearDown();
Mockery::close();
}
private function getService(
$mockUserRepository = null,
$mockStageRepository = null,
$mockTeamRepository = null,
): AutomatedReportsService {
return new AutomatedReportsService(
($mockTeamRepository ?? $this->createMock(TeamRepository::class)),
$this->createMock(GroupRepository::class),
($mockUserRepository ?? $this->createMock(UserRepository::class)),
($mockStageRepository ?? $this->createMock(StageRepository::class)),
$this->createMock(DealStagesService::class),
$this->createMock(RecipientsService::class),
$this->createMock(AutomatedReportsRepository::class),
$this->createMock(Webhook::class),
$this->createMock(Dispatcher::class),
$this->createMock(ActivityTypeService::class),
$this->createMock(PlaybookCategoryRepository::class),
$this->createMock(AskAnythingPromptService::class),
$this->createMock(SearchRepository::class),
$this->createMock(AskAnythingRepository::class),
);
}
#[DataProvider('transformMediaTypesDataProvider')]
public function testTransformMediaTypes(array $mediaTypes, array $expected): void
{
$report = new AutomatedReport(['media_types' => $mediaTypes]);
$reflection = new \ReflectionClass(AutomatedReportsService::class);
$method = $reflection->getMethod('transformMediaTypes');
$result = $method->invoke($this->service, $report);
$this->assertEquals($expected, $result);
}
public function testGetMediaTypeFieldDataWithoutReport(): void
{
$result = $this->service->getMediaTypeFieldData(null);
$this->assertIsArray($result);
$this->assertArrayHasKey('value', $result);
$this->assertEmpty($result['value']);
$this->assertEquals('media_types', $result['id']);
}
public function testGetMediaTypeFieldDataWithReport(): void
{
$mediaTypes = ['pdf', 'podcast'];
$report = new AutomatedReport(['media_types' => $mediaTypes]);
$result = $this->service->getMediaTypeFieldData($report);
$expectedValue = [
['id' => 'pdf', 'name' => 'PDF'],
['id' => 'podcast', 'name' => 'Podcast'],
];
$this->assertIsArray($result);
$this->assertArrayHasKey('value', $result);
$this->assertEquals($expectedValue, $result['value']);
}
public static function transformMediaTypesDataProvider(): array
{
return [
'empty array' => [
'mediaTypes' => [],
'expected' => [],
],
'pdf only' => [
'mediaTypes' => ['pdf'],
'expected' => [
['id' => 'pdf', 'name' => 'PDF'],
],
],
'podcast only' => [
'mediaTypes' => ['podcast'],
'expected' => [
['id' => 'podcast', 'name' => 'Podcast'],
],
],
'both pdf and podcast' => [
'mediaTypes' => ['pdf', 'podcast'],
'expected' => [
['id' => 'pdf', 'name' => 'PDF'],
['id' => 'podcast', 'name' => 'Podcast'],
],
],
'with invalid type' => [
'mediaTypes' => ['pdf', 'invalid', 'podcast'],
'expected' => [
['id' => 'pdf', 'name' => 'PDF'],
['id' => 'podcast', 'name' => 'Podcast'],
],
],
];
}
#[DataProvider('hasCallTypeConferenceDataProvider')]
public function testHasCallTypeConference(array $callTypes, bool $expected): void
{
$report = $this->createMock(AutomatedReport::class);
$report->method('getCallTypes')->willReturn($callTypes);
$result = $this->service->hasCallTypeConference($report);
$this->assertEquals($expected, $result);
}
#[DataProvider('hasCallTypeDialerDataProvider')]
public function testHasCallTypeDialer(array $callTypes, bool $expected): void
{
$report = $this->createMock(AutomatedReport::class);
$report->method('getCallTypes')->willReturn($callTypes);
$result = $this->service->hasCallTypeDialer($report);
$this->assertEquals($expected, $result);
}
public static function hasCallTypeConferenceDataProvider(): array
{
return [
'has conference' => [
'callTypes' => ['conference', 'dialer'],
'expected' => true,
],
'does not have conference' => [
'callTypes' => ['dialer', 'other'],
'expected' => false,
],
'empty call types' => [
'callTypes' => [],
'expected' => false,
],
];
}
public static function hasCallTypeDialerDataProvider(): array
{
return [
'has dialer' => [
'callTypes' => ['conference', 'dialer'],
'expected' => true,
],
'does not have dialer' => [
'callTypes' => ['conference', 'other'],
'expected' => false,
],
'empty call types' => [
'callTypes' => [],
'expected' => false,
],
];
}
public function testTransformReportResultsWithEmptyCollection(): void
{
$emptyCollection = new Collection([]);
$result = $this->service->transformReportResults($emptyCollection);
$this->assertIsArray($result);
$this->assertEmpty($result);
}
public function testTransformReportResultsStructure(): void
{
// Create a mock AutomatedReportResult with minimal setup to test structure
$mockReportResult = $this->createMockReportResult();
$collection = new Collection([$mockReportResult]);
$result = $this->service->transformReportResults($collection);
$this->assertIsArray($result);
$this->assertCount(1, $result);
$transformedResult = $result[0];
// Verify all expected keys are present
$expectedKeys = [
'id', 'name', 'frequency', 'recipients',
'report_type', 'media_type', 'downloadUrl', 'viewUrl', 'generated_at',
];
foreach ($expectedKeys as $key) {
$this->assertArrayHasKey($key, $transformedResult);
}
// Verify structure of nested arrays
$this->assertIsArray($transformedResult['frequency']);
$this->assertArrayHasKey('id', $transformedResult['frequency']);
$this->assertArrayHasKey('name', $transformedResult['frequency']);
$this->assertIsArray($transformedResult['report_type']);
$this->assertArrayHasKey('id', $transformedResult['report_type']);
$this->assertArrayHasKey('name', $transformedResult['report_type']);
$this->assertIsArray($transformedResult['recipients']);
// Verify TODO fields are null as expected
$this->assertEquals(AutomatedReportsService::MEDIA_TYPE_PODCAST, $transformedResult['media_type']);
$this->assertEquals(route('ai-reports.audio.download', ['uuid' => 'test-uuid']), $transformedResult['downloadUrl']);
$this->assertEquals(route('ai-reports.audio.view', ['uuid' => 'test-uuid']), $transformedResult['viewUrl']);
}
public function testTransformReportResultsWithMultipleResults(): void
{
$mockReportResult1 = $this->createMockReportResult('result-uuid-1', 'exec_summary');
$mockReportResult2 = $this->createMockReportResult('result-uuid-2', 'coaching_profiles');
$collection = new Collection([$mockReportResult1, $mockReportResult2]);
$result = $this->service->transformReportResults($collection);
$this->assertIsArray($result);
$this->assertCount(2, $result);
// Verify different UUIDs
$this->assertEquals('result-uuid-1', $result[0]['id']);
$this->assertEquals('result-uuid-2', $result[1]['id']);
// Verify both results have the expected structure
foreach ($result as $transformedResult) {
$this->assertArrayHasKey('id', $transformedResult);
$this->assertArrayHasKey('name', $transformedResult);
$this->assertArrayHasKey('frequency', $transformedResult);
$this->assertArrayHasKey('recipients', $transformedResult);
$this->assertArrayHasKey('report_type', $transformedResult);
}
}
#[DataProvider('isUserRecipientOfReportDataProvider')]
public function testIsUserRecipientOfReport(int $userId, array $recipients, bool $expected): void
{
// Create mock User
$mockUser = $this->createMock(\Jiminny\Models\User::class);
$mockUser->method('getId')->willReturn($userId);
$mockUser->method('getGroupId')->willReturn(null);
// Create mock AutomatedReport
$mockReport = $this->createMock(AutomatedReport::class);
$mockReport->method('getRecipients')->willReturn($recipients);
$mockReport->method('isAskJiminnyReport')->willReturn(false);
$mockReport->method('getGroups')->willReturn([]);
$result = $this->service->isUserRecipientOfReport($mockUser, $mockReport);
$this->assertEquals($expected, $result);
}
#[DataProvider('isUserRecipientOfAskJiminnyReportDataProvider')]
public function testIsUserRecipientOfAskJiminnyReportViaGroup(
int $userId,
?int $groupId,
array $recipients,
array $reportGroups,
bool $expected,
): void {
$mockUser = $this->createMock(\Jiminny\Models\User::class);
$mockUser->method('getId')->willReturn($userId);
$mockUser->method('getGroupId')->willReturn($groupId);
$mockReport = $this->createMock(AutomatedReport::class);
$mockReport->method('getRecipients')->willReturn($recipients);
$mockReport->method('isAskJiminnyReport')->willReturn(true);
$mockReport->method('getGroups')->willReturn($reportGroups);
$this->assertSame($expected, $this->service->isUserRecipientOfReport($mockUser, $mockReport));
}
public function testIsUserRecipientOfNonAskJiminnyReportIgnoresGroups(): void
{
$mockUser = $this->createMock(\Jiminny\Models\User::class);
$mockUser->method('getId')->willReturn(123);
$mockUser->method('getGroupId')->willReturn(5);
$mockReport = $this->createMock(AutomatedReport::class);
$mockReport->method('getRecipients')->willReturn(['users' => []]);
$mockReport->method('isAskJiminnyReport')->willReturn(false);
$mockReport->method('getGroups')->willReturn([5]);
$this->assertFalse($this->service->isUserRecipientOfReport($mockUser, $mockReport));
}
public static function isUserRecipientOfAskJiminnyReportDataProvider(): array
{
return [
'group member - ask jiminny' => [
'userId' => 123,
'groupId' => 7,
'recipients' => ['users' => []],
'reportGroups' => [7],
'expected' => true,
],
'group mismatch - ask jiminny' => [
'userId' => 123,
'groupId' => 9,
'recipients' => ['users' => []],
'reportGroups' => [7, 8],
'expected' => false,
],
'user with no group - ask jiminny' => [
'userId' => 123,
'groupId' => null,
'recipients' => ['users' => []],
'reportGroups' => [7],
'expected' => false,
],
'recipient users take precedence over group' => [
'userId' => 123,
'groupId' => null,
'recipients' => ['users' => [123]],
'reportGroups' => [],
'expected' => true,
],
];
}
public function testIsUserRecipientOfReportWithEmptyRecipients(): void
{
// Create mock User
$mockUser = $this->createMock(\Jiminny\Models\User::class);
$mockUser->method('getId')->willReturn(123);
// Create mock AutomatedReport with no recipients
$mockReport = $this->createMock(AutomatedReport::class);
$mockReport->method('getRecipients')->willReturn([]);
$result = $this->service->isUserRecipientOfReport($mockUser, $mockReport);
$this->assertFalse($result);
}
public function testIsUserRecipientOfReportWithNoUsersKey(): void
{
// Create mock User
$mockUser = $this->createMock(\Jiminny\Models\User::class);
$mockUser->method('getId')->willReturn(123);
// Create mock AutomatedReport with recipients but no 'users' key
$mockReport = $this->createMock(AutomatedReport::class);
$mockReport->method('getRecipients')->willReturn(['other_key' => [456, 789]]);
$result = $this->service->isUserRecipientOfReport($mockUser, $mockReport);
$this->assertFalse($result);
}
public static function isUserRecipientOfReportDataProvider(): array
{
return [
'user is recipient - single user' => [
'userId' => 123,
'recipients' => ['users' => [123]],
'expected' => true,
],
'user is recipient - multiple users' => [
'userId' => 456,
'recipients' => ['users' => [123, 456, 789]],
'expected' => true,
],
'user is not recipient - single user' => [
'userId' => 999,
'recipients' => ['users' => [123]],
'expected' => false,
],
'user is not recipient - multiple users' => [
'userId' => 999,
'recipients' => ['users' => [123, 456, 789]],
'expected' => false,
],
'user is recipient - string IDs converted to int' => [
'userId' => 123,
'recipients' => ['users' => ['123', '456']],
'expected' => true,
],
'user is not recipient - string IDs converted to int' => [
'userId' => 999,
'recipients' => ['users' => ['123', '456']],
'expected' => false,
],
'empty users array' => [
'userId' => 123,
'recipients' => ['users' => []],
'expected' => false,
],
];
}
private function createMockReportResult(string $uuid = 'test-uuid', string $reportType = 'exec_summary'): AutomatedReportResult
{
// Create mock AutomatedReport
$mockReport = $this->createMock(AutomatedReport::class);
$mockReport->method('getFrequency')->willReturn('weekly');
$mockReport->method('getRecipients')->willReturn(['users' => [1, 2]]);
$mockReport->method('getGroups')->willReturn([10, 20]);
$mockReport->method('getType')->willReturn($reportType);
// Create mock Team
$mockTeam = $this->createMock(\Jiminny\Models\Team::class);
// Create mock Group
$mockGroup = $this->createMock(\Jiminny\Models\Group::class);
$mockGroup->method('getUuid')->willReturn('group-uuid-10');
$mockGroup->method('getName')->willReturn('Test Team');
$mockQueryBuilder = Mockery::mock();
$mockQueryBuilder->shouldReceive('where')->andReturnSelf();
$mockQueryBuilder->shouldReceive('first')->andReturn($mockGroup);
$dataRelation = Mockery::mock(HasMany::class);
$dataRelation->shouldReceive('where')->andReturn($mockQueryBuilder);
$dataRelation->shouldReceive('get')->andReturn(
new \Illuminate\Database\Eloquent\Collection([$mockGroup])
);
$mockTeam->method('groups')->willReturn($dataRelation);
$mockReport->method('getTeam')->willReturn($mockTeam);
// Create mock AutomatedReportResult
$mockReportResult = $this->createMock(AutomatedReportResult::class);
$mockReportResult->method('getUuid')->willReturn($uuid);
$mockReportResult->method('getGeneratedAt')->willReturn(
\Illuminate\Support\Carbon::parse('2024-01-15T10:30:00Z')
);
$mockReportResult->method('getReport')->willReturn($mockReport);
// Mock methods used in getReportFileName
$mockReportResult->method('getReportType')->willReturn($reportType);
$mockReportResult->method('getFromDate')->willReturn(
\Illuminate\Support\Carbon::parse('2024-01-08')
);
$mockReportResult->method('getToDate')->willReturn(
\Illuminate\Support\Carbon::parse('2024-01-15')
);
$mockReportResult->method('getGroups')->willReturn([10]);
$mockReportResult->method('getMediaType')->willReturn(AutomatedReportsService::MEDIA_TYPE_PODCAST);
return $mockReportResult;
}
#[DataProvider('getUsersUuidsDataProvider')]
public function testGetUsersUuids(array $recipients, array $mockUsers, array $expectedUuids): void
{
// Create mock UserRepository
$mockUserRepository = $this->createMock(UserRepository::class);
// Configure the mock to return specific users for specific IDs using a callback
$mockUserRepository->method('find')
->willReturnCallback(function ($userId) use ($mockUsers) {
if (! isset($mockUsers[$userId])) {
return null;
}
$userUuid = $mockUsers[$userId]['uuid'] ?? null;
if ($userUuid === null) {
return null;
}
$mockUser = $this->createMock(\Jiminny\Models\User::class);
$mockUser->method('getUuid')->willReturn((string) $userUuid);
return $mockUser;
});
// Create service with mocked UserRepository
$automatedReportsService = $this->getService(mockUserRepository: $mockUserRepository);
// Create mock AutomatedReport
$mockReport = $this->createMock(AutomatedReport::class);
$mockReport->method('getRecipients')->willReturn($recipients);
$result = $automatedReportsService->getUsersUuids($mockReport);
$this->assertEquals($expectedUuids, $result);
}
public function testGetUsersUuidsWithEmptyRecipients(): void
{
// Create mock AutomatedReport with empty recipients
$mockReport = $this->createMock(AutomatedReport::class);
$mockReport->method('getRecipients')->willReturn([]);
$result = $this->service->getUsersUuids($mockReport);
$this->assertEquals([], $result);
}
public function testGetUsersUuidsWithNoUsersKey(): void
{
// Create mock AutomatedReport with recipients but no 'users' key
$mockReport = $this->createMock(AutomatedReport::class);
$mockReport->method('getRecipients')->willReturn(['other_key' => [1, 2, 3]]);
$result = $this->service->getUsersUuids($mockReport);
$this->assertEquals([], $result);
}
public function testGetUsersUuidsWithNonExistentUsers(): void
{
// Create mock UserRepository that returns null for all users
$mockUserRepository = $this->createMock(UserRepository::class);
$mockUserRepository->method('find')->willReturn(null);
// Create service with mocked UserRepository
$automatedReportsService = $this->getService(mockUserRepository: $mockUserRepository);
// Create mock AutomatedReport
$mockReport = $this->createMock(AutomatedReport::class);
$mockReport->method('getRecipients')->willReturn(['users' => [1, 2, 3]]);
$result = $automatedReportsService->getUsersUuids($mockReport);
// Should return array with null values for non-existent users
$this->assertEquals([], $result);
}
public static function getUsersUuidsDataProvider(): array
{
return [
'single user found' => [
'recipients' => ['users' => [123]],
'mockUsers' => [
123 => ['id' => 123, 'uuid' => 'user-uuid-123'],
],
'expectedUuids' => ['user-uuid-123'],
],
'multiple users found' => [
'recipients' => ['users' => [123, 456, 789]],
'mockUsers' => [
123 => ['id' => 123, 'uuid' => 'user-uuid-123'],
456 => ['id' => 456, 'uuid' => 'user-uuid-456'],
789 => ['id' => 789, 'uuid' => 'user-uuid-789'],
],
'expectedUuids' => ['user-uuid-123', 'user-uuid-456', 'user-uuid-789'],
],
'mixed found and not found users' => [
'recipients' => ['users' => [123, 456, 789]],
'mockUsers' => [
123 => ['id' => 123, 'uuid' => 'user-uuid-123'],
// 456 not found in DB
789 => ['id' => 789, 'uuid' => 'user-uuid-789'],
],
'expectedUuids' => ['user-uuid-123', 'user-uuid-789'], // Updated to reflect that nulls are filtered out
],
'empty users array' => [
'recipients' => ['users' => []],
'mockUsers' => [],
'expectedUuids' => [],
],
'all users not found' => [
'recipients' => ['users' => [123, 456]],
'mockUsers' => [], // No users found
'expectedUuids' => [], // Updated to reflect that nulls are filtered out
],
];
}
#[DataProvider('getCurrentDealStagesUuidsDataProvider')]
public function testGetCurrentDealStagesUuids(array $currentDealStages, array $mockStages, array $expectedUuids): void
{
// Create mock StageRepository
$mockStageRepository = $this->createMock(StageRepository::class);
// Configure the mock to return specific stages for specific IDs using a callback
$mockStageRepository->method('find')
->willReturnCallback(function ($stageId) use ($mockStages) {
if (! isset($mockStages[$stageId])) {
return null;
}
$stageUuid = $mockStages[$stageId]['uuid'] ?? null;
if ($stageUuid === null) {
return null;
}
$mockStage = $this->createMock(\Jiminny\Models\Stage::class);
$mockStage->method('getUuid')->willReturn((string) $stageUuid);
return $mockStage;
});
// Create service with mocked StageRepository
$automatedReportsService = $this->getService(mockStageRepository: $mockStageRepository);
// Create mock AutomatedReport
$mockReport = $this->createMock(AutomatedReport::class);
$mockReport->method('getCurrentDealStages')->willReturn($currentDealStages);
$result = $automatedReportsService->getCurrentDealStagesUuids($mockReport);
$this->assertEquals($expectedUuids, $result);
}
public function testGetCurrentDealStagesUuidsWithEmptyStages(): void
{
// Create mock AutomatedReport with empty current deal stages
$mockReport = $this->createMock(AutomatedReport::class);
$mockReport->method('getCurrentDealStages')->willReturn([]);
$result = $this->service->getCurrentDealStagesUuids($mockReport);
$this->assertEquals([], $result);
}
public function testGetCurrentDealStagesUuidsWithNonExistentStages(): void
{
// Create mock StageRepository that returns null for all stages
$mockStageRepository = $this->createMock(StageRepository::class);
$mockStageRepository->method('find')->willReturn(null);
// Create service with mocked StageRepository
$automatedReportsService = $this->getService(mockStageRepository: $mockStageRepository);
// Create mock AutomatedReport
$mockReport = $this->createMock(AutomatedReport::class);
$mockReport->method('getCurrentDealStages')->willReturn([1, 2, 3]);
$result = $automatedReportsService->getCurrentDealStagesUuids($mockReport);
// Should return array with null values for non-existent stages
$this->assertEquals([], $result);
}
public static function getCurrentDealStagesUuidsDataProvider(): array
{
return [
'single stage found' => [
'currentDealStages' => [10],
'mockStages' => [
10 => ['id' => 10, 'uuid' => 'stage-uuid-10'],
],
'expectedUuids' => ['stage-uuid-10'],
],
'multiple stages found' => [
'currentDealStages' => [10, 20, 30],
'mockStages' => [
10 => ['id' => 10, 'uuid' => 'stage-uuid-10'],
20 => ['id' => 20, 'uuid' => 'stage-uuid-20'],
30 => ['id' => 30, 'uuid' => 'stage-uuid-30'],
],
'expectedUuids' => ['stage-uuid-10', 'stage-uuid-20', 'stage-uuid-30'],
],
'mixed found and not found stages' => [
'currentDealStages' => [10, 20, 30],
'mockStages' => [
10 => ['id' => 10, 'uuid' => 'stage-uuid-10'],
// 20 not found in DB
30 => ['id' => 30, 'uuid' => 'stage-uuid-30'],
],
'expectedUuids' => ['stage-uuid-10', 'stage-uuid-30'], // Updated to reflect that nulls are filtered out
],
'empty stages array' => [
'currentDealStages' => [],
'mockStages' => [],
'expectedUuids' => [],
],
'all stages not found' => [
'currentDealStages' => [10, 20],
'mockStages' => [], // No stages found
'expectedUuids' => [], // Updated to reflect that nulls are filtered out
],
];
}
#[DataProvider('getTeamGroupsDataProvider')]
public function testGetTeamGroups(string $teamUuid, ?array $mockTeamData, array $mockGroups, array $expectedResult): void
{
// Create mock TeamRepository
$mockTeamRepository = $this->createMock(TeamRepository::class);
if ($mockTeamData === null) {
// Team not found
$mockTeamRepository->method('idOrUuid')
->with($teamUuid)
->willReturn(null);
} else {
// Team found - create mock team with groups
$mockTeam = $this->createMock(\Jiminny\Models\Team::class);
// Create mock groups collection
$mockGroupsCollection = $this->createMock(\Illuminate\Database\Eloquent\Collection::class);
// Create mock Group objects
$groupObjects = [];
foreach ($mockGroups as $groupData) {
$mockGroup = $this->createMock(\Jiminny\Models\Group::class);
$mockGroup->method('getUuid')->willReturn($groupData['id']);
$mockGroup->method('getName')->willReturn($groupData['name']);
$groupObjects[] = $mockGroup;
}
// Mock the groups collection to return our mock groups
$mockGroupsCollection->method('getIterator')->willReturn(new \ArrayIterator($groupObjects));
// Mock the groups() relation
$mockGroupsRelation = $this->createMock(\Illuminate\Database\Eloquent\Relations\HasMany::class);
$mockGroupsRelation->method('get')->willReturn($mockGroupsCollection);
$mockTeam->method('groups')->willReturn($mockGroupsRelation);
$mockTeamRepository->method('idOrUuid')
->with($teamUuid)
->willReturn($mockTeam);
}
// Create service with mocked TeamRepository
$automatedReportsService = $this->getService(mockTeamRepository: $mockTeamRepository);
$result = $automatedReportsService->getTeamGroups($teamUuid);
$this->assertEquals($expectedResult, $result);
}
public function testGetTeamGroupsWithNonExistentTeam(): void
{
// Create mock TeamRepository that returns null (team not found)
$mockTeamRepository = $this->createMock(TeamRepository::class);
$mockTeamRepository->method('idOrUuid')->willReturn(null);
// Create service with mocked TeamRepository
$automatedReportsService = $this->getService(mockTeamRepository: $mockTeamRepository);
$result = $automatedReportsService->getTeamGroups('non-existent-team-uuid');
$this->assertEquals([], $result);
}
public function testGetTeamGroupsWithEmptyGroups(): void
{
// Create mock team with no groups
$mockTeam = $this->createMock(\Jiminny\Models\Team::class);
// Create empty groups collection
$mockGroupsCollection = $this->createMock(\Illuminate\Database\Eloquent\Collection::class);
$mockGroupsCollection->method('getIterator')->willReturn(new \ArrayIterator([]));
$mockGroupsRelation = $this->createMock(\Illuminate\Database\Eloquent\Relations\HasMany::class);
$mockGroupsRelation->method('get')->willReturn($mockGroupsCollection);
$mockTeam->method('groups')->willReturn($mockGroupsRelation);
// Create mock TeamRepository
$mockTeamRepository = $this->createMock(TeamRepository::class);
$mockTeamRepository->method('idOrUuid')->willReturn($mockTeam);
// Create service with mocked TeamRepository
$automatedReportsService = $this->getService(mockTeamRepository: $mockTeamRepository);
$result = $automatedReportsService->getTeamGroups('team-with-no-groups');
$this->assertEquals([], $result);
}
public static function getTeamGroupsDataProvider(): array
{
return [
'team with single group' => [
'teamUuid' => 'team-uuid-123',
'mockTeamData' => ['id' => 'team-uuid-123', 'name' => 'Test Team'],
'mockGroups' => [
['id' => 'group-uuid-1', 'name' => 'Sales Team'],
],
'expectedResult' => [
['id' => 'group-uuid-1', 'name' => 'Sales Team'],
],
],
'team with multiple groups' => [
'teamUuid' => 'team-uuid-456',
'mockTeamData' => ['id' => 'team-uuid-456', 'name' => 'Another Team'],
'mockGroups' => [
['id' => 'group-uuid-1', 'name' => 'Sales Team'],
['id' => 'group-uuid-2', 'name' => 'Marketing Team'],
['id' => 'group-uuid-3', 'name' => 'Support Team'],
],
'expectedResult' => [
['id' => 'group-uuid-1', 'name' => 'Sales Team'],
['id' => 'group-uuid-2', 'name' => 'Marketing Team'],
['id' => 'group-uuid-3', 'name' => 'Support Team'],
],
],
'team not found' => [
'teamUuid' => 'non-existent-uuid',
'mockTeamData' => null,
'mockGroups' => [],
'expectedResult' => [],
],
'team with no groups' => [
'teamUuid' => 'team-uuid-empty',
'mockTeamData' => ['id' => 'team-uuid-empty', 'name' => 'Empty Team'],
'mockGroups' => [],
'expectedResult' => [],
],
];
}
#[DataProvider('getTeamsDataProvider')]
public function testGetTeams(array $mockTeams, array $expectedResult): void
{
// Create mock TeamRepository
$mockTeamRepository = $this->createMock(TeamRepository::class);
// Create mock Team objects
$teamObjects = [];
foreach ($mockTeams as $teamData) {
$mockTeam = $this->createMock(\Jiminny\Models\Team::class);
$mockTeam->method('getUuid')->willReturn($teamData['id']);
$mockTeam->method('getName')->willReturn($teamData['name']);
$mockTeam->method('hasFeature')
->with(\Jiminny\Models\Feature\FeatureEnum::AUTOMATED_REPORTS)
->willReturn($teamData['hasAutomatedReports']);
$teamObjects[] = $mockTeam;
}
// Mock the repository to return a Collection (not array)
$mockTeamRepository->method('getTeamsForKiosk')
->with('active')
->willReturn(new Collection($teamObjects));
// Create service with mocked TeamRepository
$automatedReportsService = $this->getService(mockTeamRepository: $mockTeamRepository);
$result = $automatedReportsService->getTeams();
$this->assertEquals($expectedResult, $result);
}
public function testGetTeamsWithNoTeams(): void
{
// Create mock TeamRepository that returns empty Collection
$mockTeamRepository = $this->createMock(TeamRepository::class);
$mockTeamRepository->method('getTeamsForKiosk')->willReturn(new Collection([]));
// Create service with mocked TeamRepository
$automatedReportsService = $this->getService(mockTeamRepository: $mockTeamRepository);
$result = $automatedReportsService->getTeams();
$this->assertEquals([], $result);
}
public function testGetTeamsWithAllTeamsWithoutFeature(): void
{
// Create mock teams without AUTOMATED_REPORTS feature
$mockTeam1 = $this->createMock(\Jiminny\Models\Team::class);
$mockTeam1->method('hasFeature')
->with(\Jiminny\Models\Feature\FeatureEnum::AUTOMATED_REPORTS)
->willReturn(false);
$mockTeam2 = $this->createMock(\Jiminny\Models\Team::class);
$mockTeam2->method('hasFeature')
->with(\Jiminny\Models\Feature\FeatureEnum::AUTOMATED_REPORTS)
->willReturn(false);
// Create mock TeamRepository that returns Collection
$mockTeamRepository = $this->createMock(TeamRepository::class);
$mockTeamRepository->method('getTeamsForKiosk')->willReturn(new Collection([$mockTeam1, $mockTeam2]));
// Create service with mocked TeamRepository
$automatedReportsService = $this->getService(mockTeamRepository: $mockTeamRepository);
$result = $automatedReportsService->getTeams();
$this->assertEquals([], $result);
}
public static function getTeamsDataProvider(): array
{
return [
'single team with feature' => [
'mockTeams' => [
[
'id' => 'team-uuid-1',
'name' => 'Sales Team',
'hasAutomatedReports' => true,
],
],
'expectedResult' => [
['id' => 'team-uuid-1', 'name' => 'Sales Team'],
],
],
'multiple teams with feature' => [
'mockTeams' => [
[
'id' => 'team-uuid-1',
'name' => 'Sales Team',
'hasAutomatedReports' => true,
],
[
'id' => 'team-uuid-2',
'name' => 'Marketing Team',
'hasAutomatedReports' => true,
],
[
'id' => 'team-uuid-3',
'name' => 'Support Team',
'hasAutomatedReports' => true,
],
],
'expectedResult' => [
['id' => 'team-uuid-1', 'name' => 'Sales Team'],
['id' => 'team-uuid-2', 'name' => 'Marketing Team'],
['id' => 'team-uuid-3', 'name' => 'Support Team'],
],
],
'mixed teams - some with feature, some without' => [
'mockTeams' => [
[
'id' => 'team-uuid-1',
'name' => 'Sales Team',
'hasAutomatedReports' => true,
],
[
'id' => 'team-uuid-2',
'name' => 'Marketing Team',
'hasAutomatedReports' => false,
],
[
'id' => 'team-uuid-3',
'name' => 'Support Team',
'hasAutomatedReports' => true,
],
],
'expectedResult' => [
['id' => 'team-uuid-1', 'name' => 'Sales Team'],
['id' => 'team-uuid-3', 'name' => 'Support Team'],
],
],
'all teams without feature' => [
'mockTeams' => [
[
'id' => 'team-uuid-1',
'name' => 'Sales Team',
'hasAutomatedReports' => false,
],
[
'id' => 'team-uuid-2',
'name' => 'Marketing Team',
'hasAutomatedReports' => false,
],
],
'expectedResult' => [],
],
'empty teams array' => [
'mockTeams' => [],
'expectedResult' => [],
],
];
}
#[DataProvider('deleteS3FilesDataProvider')]
public function testDeleteS3Files(
string $mediaType,
array $expectedFileExtensions,
array $existingFiles,
string $pathSuffix,
int $expectedDeletes
): void {
// Arrange
$teamUuid = 'team-uuid-123';
$reportUuid = 'report-uuid-456';
$basePath = sprintf('%s/reports/%s', $teamUuid, $reportUuid);
$team = Mockery::mock(Team::class);
$team->allows('getUuid')->andReturn($teamUuid);
$report = Mockery::mock(AutomatedReport::class);
$report->allows('getTeam')->andReturn($team);
$result = Mockery::mock(AutomatedReportResult::class);
$result->allows('getReport')->andReturn($report);
$result->allows('getUuid')->andReturn($reportUuid);
$result->allows('getMediaType')->andReturn($mediaType);
Storage::fake();
Log::shouldReceive('info')->times($expectedDeletes);
foreach ($existingFiles as $extension) {
$filePath = $basePath . $pathSuffix . '.' . $extension;
Storage::put($filePath, 'dummy content');
}
// Act
$this->service->deleteS3Files($result);
// Assert
foreach ($expectedFileExtensions as $extension) {
$filePath = $basePath . $pathSuffix . '.' . $extension;
if (in_array($extension, $existingFiles, true)) {
Storage::assertMissing($filePath);
} else {
// To be sure no unexpected files were created and deleted
Storage::assertMissing($filePath);
}
}
}
public static function deleteS3FilesDataProvider(): array
{
return [
'PDF report, all files exist' => [
'mediaType' => AutomatedReportsService::MEDIA_TYPE_PDF,
'expectedFileExtensions' => ['html', 'MD', 'pdf'],
'existingFiles' => ['html', 'MD', 'pdf'],
'pathSuffix' => '',
'expectedDeletes' => 3,
],
'PDF report, some files exist' => [
'mediaType' => AutomatedReportsService::MEDIA_TYPE_PDF,
'expectedFileExtensions' => ['html', 'MD', 'pdf'],
'existingFiles' => ['html', 'pdf'],
'pathSuffix' => '',
'expectedDeletes' => 2,
],
'PDF report, no files exist' => [
'mediaType' => AutomatedReportsService::MEDIA_TYPE_PDF,
'expectedFileExtensions' => ['html', 'MD', 'pdf'],
'existingFiles' => [],
'pathSuffix' => '',
'expectedDeletes' => 0,
],
'Podcast report, all files exist' => [
'mediaType' => AutomatedReportsService::MEDIA_TYPE_PODCAST,
'expectedFileExtensions' => ['json', 'mp3', 'ssml'],
'existingFiles' => ['json', 'mp3', 'ssml'],
'pathSuffix' => '_podcast',
'expectedDeletes' => 3,
],
'Podcast report, some files exist' => [
'mediaType' => AutomatedReportsService::MEDIA_TYPE_PODCAST,
'expectedFileExtensions' => ['json', 'mp3', 'ssml'],
'existingFiles' => ['mp3'],
'pathSuffix' => '_podcast',
'expectedDeletes' => 1,
],
'Podcast report, no files exist' => [
'mediaType' => AutomatedReportsService::MEDIA_TYPE_PODCAST,
'expectedFileExtensions' => ['json', 'mp3', 'ssml'],
'existingFiles' => [],
'pathSuffix' => '_podcast',
'expectedDeletes' => 0,
],
'Other media type, should do nothing' => [
'mediaType' => 'some_other_type',
'expectedFileExtensions' => [],
'existingFiles' => [],
'pathSuffix' => '',
'expectedDeletes' => 0,
],
];
}
public function testDeleteReportsResultsInRetentionPeriodWithLogging(): void
{
// Create mocks for the test
$automatedReportsService = Mockery::mock(AutomatedReportsService::class);
$team = Mockery::mock(Team::class);
$team->shouldReceive('getId')->andReturn(123);
$from = now()->subDays(30);
$to = now();
$source = 'test-source';
// Expect the method to be called with specific parameters
$automatedReportsService->shouldReceive('deleteReportsResultsInRetentionPeriodWithLogging')
->once()
->with(
$team,
Mockery::on(function ($arg) use ($from) {
return $arg->timestamp === $from->timestamp;
}),
Mockery::on(function ($arg) use ($to) {
return $arg->timestamp === $to->timestamp;
}),
$source
)
->andReturn(5);
// Call the method and verify the result
$result = $automatedReportsService->deleteReportsResultsInRetentionPeriodWithLogging(
$team,
$from,
$to,
$source
);
$this->assertEquals(5, $result);
}
#[DataProvider('sanitizeFileNameDataProvider')]
public function testSanitizeFileName(string $input, string $expected): void
{
$result = $this->service->sanitizeFileName($input);
$this->assertEquals($expected, $result);
}
public static function sanitizeFileNameDataProvider(): array
{
return [
'no special characters' => [
'input' => 'Exec Summary - Sep 2025 - Business Development Team',
'expected' => 'Exec Summary - Sep 2025 - Business Development Team',
],
'forward slash in team name' => [
'input' => 'Exec Summary - Sep 2025 - ND/IRV',
'expected' => 'Exec Summary - Sep 2025 - ND-IRV',
],
'backslash in team name' => [
'input' => 'Exec Summary - Sep 2025 - ND\IRV',
'expected' => 'Exec Summary - Sep 2025 - ND-IRV',
],
'multiple forward slashes' => [
'input' => 'Report - Team A/B/C',
'expected' => 'Report - Team A-B-C',
],
'multiple backslashes' => [
'input' => 'Report - Team A\B\C',
'expected' => 'Report - Team A-B-C',
],
'mixed slashes and backslashes' => [
'input' => 'Report - Team A/B\C',
'expected' => 'Report - Team A-B-C',
],
'complex team name with slashes' => [
'input' => 'Exec Summary - Sep 2025 - Business Development Team - ND/IRV, Net Driven - Acquisition (Sales)',
'expected' => 'Exec Summary - Sep 2025 - Business Development Team - ND-IRV, Net Driven - Acquisition (Sales)',
],
'only slashes' => [
'input' => '//\\\\',
'expected' => '----',
],
'empty string' => [
'input' => '',
'expected' => '',
],
'slash at start' => [
'input' => '/Report Name',
'expected' => '-Report Name',
],
'slash at end' => [
'input' => 'Report Name/',
'expected' => 'Report Name-',
],
];
}
public function testGetReportFileNameSanitizesOutput(): void
{
// Create mock GroupRepository
$mockGroupRepository = $this->createMock(GroupRepository::class);
// Create mock Group with slash in name
$mockGroup = $this->createMock(\Jiminny\Models\Group::class);
$mockGroup->method('getName')->willReturn('ND/IRV, Net...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"The Hunspell plugin has been deprecated. If you're not writing in Hungarian, you can safely uninstall Hunspell without affecting the dictionaries for other languages.","depth":3,"bounds":{"left":0.8753325,"top":0.8172386,"width":0.11037234,"height":0.054269753},"value":"The Hunspell plugin has been deprecated. If you're not writing in Hungarian, you can safely uninstall Hunspell without affecting the dictionaries for other languages.","help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"bounds":{"left":0.8753325,"top":0.8172386,"width":0.095744684,"height":0.054269753},"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Loading Data Sources…","depth":2,"bounds":{"left":0.6775266,"top":0.74461293,"width":0.06948138,"height":0.011173184},"role_description":"text"},{"role":"AXStaticText","text":"","depth":2,"bounds":{"left":0.6775266,"top":0.7765363,"width":0.06948138,"height":0.011173184},"role_description":"text"},{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.25731382,"top":0.019952115,"width":0.03856383,"height":0.025538707},"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#12011 on JY-20157-AJ-report-not-send-notification, menu","depth":5,"bounds":{"left":0.29587767,"top":0.019952115,"width":0.12134308,"height":0.025538707},"help_text":"Pull request #12011 exists for current branch JY-20157-AJ-report-not-send-notification","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"bounds":{"left":0.8218085,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AutomatedReportsServiceTest","depth":6,"bounds":{"left":0.83710104,"top":0.019952115,"width":0.078457445,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsServiceTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsServiceTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9381649,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96609044,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9773936,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9886968,"top":0.019952115,"width":0.011303186,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Analyzing…","depth":4,"bounds":{"left":0.58477396,"top":0.32322428,"width":0.019946808,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.60638297,"top":0.3216281,"width":0.00731383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.6136968,"top":0.3216281,"width":0.006981383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Services\\Kiosk\\AutomatedReports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Support\\Carbon as IlluminateCarbon;\nuse Illuminate\\Contracts\\Bus\\Dispatcher;\nuse Illuminate\\Database\\Eloquent\\Builder;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Illuminate\\Support\\Facades\\Log;\nuse Illuminate\\Support\\Facades\\Storage;\nuse Jiminny\\Component\\AskAnything\\AskAnythingPromptService;\nuse Jiminny\\Component\\AskAnything\\Dtos\\AskAnythingPromptDto;\nuse Jiminny\\Component\\UrlGenerator\\Webhook;\nuse Jiminny\\Contracts\\Repositories\\PlaybookCategoryRepository;\nuse Jiminny\\Contracts\\Repositories\\TeamRepository;\nuse Jiminny\\Contracts\\Repositories\\UserRepository;\nuse Jiminny\\Exceptions\\InvalidArgumentException;\nuse Jiminny\\Exceptions\\ModelNotFoundException;\nuse Illuminate\\Support\\Collection;\nuse Jiminny\\Models\\AskAnything\\AskAnythingPrompt;\nuse Jiminny\\Models\\AskAnything\\AskAnythingPromptTarget;\nuse Jiminny\\Models\\Activity\\Search;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Feature\\FeatureEnum;\nuse Jiminny\\Models\\Group;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AskAnythingRepository;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Repositories\\GroupRepository;\nuse Jiminny\\Repositories\\SearchRepository;\nuse Jiminny\\Repositories\\StageRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\ActivityTypeService;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\DealStagesService;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\RecipientsService;\nuse Mockery;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse Tests\\TestCase;\n\nclass AutomatedReportsServiceTest extends TestCase\n{\n private AutomatedReportsService $service;\n\n protected function setUp(): void\n {\n parent::setUp();\n\n // Create a real instance of the service without calling the constructor\n $reflection = new \\ReflectionClass(AutomatedReportsService::class);\n $this->service = $reflection->newInstanceWithoutConstructor();\n\n // Manually set the dependencies using reflection\n $dependencies = [\n 'teamRepository' => TeamRepository::class,\n 'groupRepository' => GroupRepository::class,\n 'userRepository' => UserRepository::class,\n 'stageRepository' => StageRepository::class,\n 'dealStagesService' => DealStagesService::class,\n 'recipientsService' => RecipientsService::class,\n 'automatedReportsRepository' => AutomatedReportsRepository::class,\n 'webhookService' => Webhook::class,\n 'dispatcher' => Dispatcher::class,\n 'activityTypeService' => ActivityTypeService::class,\n 'playbookCategoryRepository' => PlaybookCategoryRepository::class,\n 'askAnythingPromptService' => AskAnythingPromptService::class,\n 'activitySearchRepository' => SearchRepository::class,\n 'askAnythingRepository' => AskAnythingRepository::class,\n ];\n\n foreach ($dependencies as $propertyName => $class) {\n $property = $reflection->getProperty($propertyName);\n $property->setAccessible(true);\n $property->setValue($this->service, $this->createMock($class));\n }\n }\n\n protected function tearDown(): void\n {\n parent::tearDown();\n Mockery::close();\n }\n\n private function getService(\n $mockUserRepository = null,\n $mockStageRepository = null,\n $mockTeamRepository = null,\n ): AutomatedReportsService {\n return new AutomatedReportsService(\n ($mockTeamRepository ?? $this->createMock(TeamRepository::class)),\n $this->createMock(GroupRepository::class),\n ($mockUserRepository ?? $this->createMock(UserRepository::class)),\n ($mockStageRepository ?? $this->createMock(StageRepository::class)),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n }\n\n #[DataProvider('transformMediaTypesDataProvider')]\n public function testTransformMediaTypes(array $mediaTypes, array $expected): void\n {\n $report = new AutomatedReport(['media_types' => $mediaTypes]);\n\n $reflection = new \\ReflectionClass(AutomatedReportsService::class);\n $method = $reflection->getMethod('transformMediaTypes');\n\n $result = $method->invoke($this->service, $report);\n\n $this->assertEquals($expected, $result);\n }\n\n public function testGetMediaTypeFieldDataWithoutReport(): void\n {\n $result = $this->service->getMediaTypeFieldData(null);\n\n $this->assertIsArray($result);\n $this->assertArrayHasKey('value', $result);\n $this->assertEmpty($result['value']);\n $this->assertEquals('media_types', $result['id']);\n }\n\n public function testGetMediaTypeFieldDataWithReport(): void\n {\n $mediaTypes = ['pdf', 'podcast'];\n $report = new AutomatedReport(['media_types' => $mediaTypes]);\n\n $result = $this->service->getMediaTypeFieldData($report);\n\n $expectedValue = [\n ['id' => 'pdf', 'name' => 'PDF'],\n ['id' => 'podcast', 'name' => 'Podcast'],\n ];\n\n $this->assertIsArray($result);\n $this->assertArrayHasKey('value', $result);\n $this->assertEquals($expectedValue, $result['value']);\n }\n\n public static function transformMediaTypesDataProvider(): array\n {\n return [\n 'empty array' => [\n 'mediaTypes' => [],\n 'expected' => [],\n ],\n 'pdf only' => [\n 'mediaTypes' => ['pdf'],\n 'expected' => [\n ['id' => 'pdf', 'name' => 'PDF'],\n ],\n ],\n 'podcast only' => [\n 'mediaTypes' => ['podcast'],\n 'expected' => [\n ['id' => 'podcast', 'name' => 'Podcast'],\n ],\n ],\n 'both pdf and podcast' => [\n 'mediaTypes' => ['pdf', 'podcast'],\n 'expected' => [\n ['id' => 'pdf', 'name' => 'PDF'],\n ['id' => 'podcast', 'name' => 'Podcast'],\n ],\n ],\n 'with invalid type' => [\n 'mediaTypes' => ['pdf', 'invalid', 'podcast'],\n 'expected' => [\n ['id' => 'pdf', 'name' => 'PDF'],\n ['id' => 'podcast', 'name' => 'Podcast'],\n ],\n ],\n ];\n }\n\n #[DataProvider('hasCallTypeConferenceDataProvider')]\n public function testHasCallTypeConference(array $callTypes, bool $expected): void\n {\n $report = $this->createMock(AutomatedReport::class);\n $report->method('getCallTypes')->willReturn($callTypes);\n\n $result = $this->service->hasCallTypeConference($report);\n\n $this->assertEquals($expected, $result);\n }\n\n #[DataProvider('hasCallTypeDialerDataProvider')]\n public function testHasCallTypeDialer(array $callTypes, bool $expected): void\n {\n $report = $this->createMock(AutomatedReport::class);\n $report->method('getCallTypes')->willReturn($callTypes);\n\n $result = $this->service->hasCallTypeDialer($report);\n\n $this->assertEquals($expected, $result);\n }\n\n public static function hasCallTypeConferenceDataProvider(): array\n {\n return [\n 'has conference' => [\n 'callTypes' => ['conference', 'dialer'],\n 'expected' => true,\n ],\n 'does not have conference' => [\n 'callTypes' => ['dialer', 'other'],\n 'expected' => false,\n ],\n 'empty call types' => [\n 'callTypes' => [],\n 'expected' => false,\n ],\n ];\n }\n\n public static function hasCallTypeDialerDataProvider(): array\n {\n return [\n 'has dialer' => [\n 'callTypes' => ['conference', 'dialer'],\n 'expected' => true,\n ],\n 'does not have dialer' => [\n 'callTypes' => ['conference', 'other'],\n 'expected' => false,\n ],\n 'empty call types' => [\n 'callTypes' => [],\n 'expected' => false,\n ],\n ];\n }\n\n public function testTransformReportResultsWithEmptyCollection(): void\n {\n $emptyCollection = new Collection([]);\n\n $result = $this->service->transformReportResults($emptyCollection);\n\n $this->assertIsArray($result);\n $this->assertEmpty($result);\n }\n\n public function testTransformReportResultsStructure(): void\n {\n // Create a mock AutomatedReportResult with minimal setup to test structure\n $mockReportResult = $this->createMockReportResult();\n $collection = new Collection([$mockReportResult]);\n\n $result = $this->service->transformReportResults($collection);\n\n $this->assertIsArray($result);\n $this->assertCount(1, $result);\n\n $transformedResult = $result[0];\n\n // Verify all expected keys are present\n $expectedKeys = [\n 'id', 'name', 'frequency', 'recipients',\n 'report_type', 'media_type', 'downloadUrl', 'viewUrl', 'generated_at',\n ];\n\n foreach ($expectedKeys as $key) {\n $this->assertArrayHasKey($key, $transformedResult);\n }\n\n // Verify structure of nested arrays\n $this->assertIsArray($transformedResult['frequency']);\n $this->assertArrayHasKey('id', $transformedResult['frequency']);\n $this->assertArrayHasKey('name', $transformedResult['frequency']);\n\n $this->assertIsArray($transformedResult['report_type']);\n $this->assertArrayHasKey('id', $transformedResult['report_type']);\n $this->assertArrayHasKey('name', $transformedResult['report_type']);\n\n $this->assertIsArray($transformedResult['recipients']);\n\n // Verify TODO fields are null as expected\n $this->assertEquals(AutomatedReportsService::MEDIA_TYPE_PODCAST, $transformedResult['media_type']);\n $this->assertEquals(route('ai-reports.audio.download', ['uuid' => 'test-uuid']), $transformedResult['downloadUrl']);\n $this->assertEquals(route('ai-reports.audio.view', ['uuid' => 'test-uuid']), $transformedResult['viewUrl']);\n }\n\n public function testTransformReportResultsWithMultipleResults(): void\n {\n $mockReportResult1 = $this->createMockReportResult('result-uuid-1', 'exec_summary');\n $mockReportResult2 = $this->createMockReportResult('result-uuid-2', 'coaching_profiles');\n $collection = new Collection([$mockReportResult1, $mockReportResult2]);\n\n $result = $this->service->transformReportResults($collection);\n\n $this->assertIsArray($result);\n $this->assertCount(2, $result);\n\n // Verify different UUIDs\n $this->assertEquals('result-uuid-1', $result[0]['id']);\n $this->assertEquals('result-uuid-2', $result[1]['id']);\n\n // Verify both results have the expected structure\n foreach ($result as $transformedResult) {\n $this->assertArrayHasKey('id', $transformedResult);\n $this->assertArrayHasKey('name', $transformedResult);\n $this->assertArrayHasKey('frequency', $transformedResult);\n $this->assertArrayHasKey('recipients', $transformedResult);\n $this->assertArrayHasKey('report_type', $transformedResult);\n }\n }\n\n #[DataProvider('isUserRecipientOfReportDataProvider')]\n public function testIsUserRecipientOfReport(int $userId, array $recipients, bool $expected): void\n {\n // Create mock User\n $mockUser = $this->createMock(\\Jiminny\\Models\\User::class);\n $mockUser->method('getId')->willReturn($userId);\n $mockUser->method('getGroupId')->willReturn(null);\n\n // Create mock AutomatedReport\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getRecipients')->willReturn($recipients);\n $mockReport->method('isAskJiminnyReport')->willReturn(false);\n $mockReport->method('getGroups')->willReturn([]);\n\n $result = $this->service->isUserRecipientOfReport($mockUser, $mockReport);\n\n $this->assertEquals($expected, $result);\n }\n\n #[DataProvider('isUserRecipientOfAskJiminnyReportDataProvider')]\n public function testIsUserRecipientOfAskJiminnyReportViaGroup(\n int $userId,\n ?int $groupId,\n array $recipients,\n array $reportGroups,\n bool $expected,\n ): void {\n $mockUser = $this->createMock(\\Jiminny\\Models\\User::class);\n $mockUser->method('getId')->willReturn($userId);\n $mockUser->method('getGroupId')->willReturn($groupId);\n\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getRecipients')->willReturn($recipients);\n $mockReport->method('isAskJiminnyReport')->willReturn(true);\n $mockReport->method('getGroups')->willReturn($reportGroups);\n\n $this->assertSame($expected, $this->service->isUserRecipientOfReport($mockUser, $mockReport));\n }\n\n public function testIsUserRecipientOfNonAskJiminnyReportIgnoresGroups(): void\n {\n $mockUser = $this->createMock(\\Jiminny\\Models\\User::class);\n $mockUser->method('getId')->willReturn(123);\n $mockUser->method('getGroupId')->willReturn(5);\n\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getRecipients')->willReturn(['users' => []]);\n $mockReport->method('isAskJiminnyReport')->willReturn(false);\n $mockReport->method('getGroups')->willReturn([5]);\n\n $this->assertFalse($this->service->isUserRecipientOfReport($mockUser, $mockReport));\n }\n\n public static function isUserRecipientOfAskJiminnyReportDataProvider(): array\n {\n return [\n 'group member - ask jiminny' => [\n 'userId' => 123,\n 'groupId' => 7,\n 'recipients' => ['users' => []],\n 'reportGroups' => [7],\n 'expected' => true,\n ],\n 'group mismatch - ask jiminny' => [\n 'userId' => 123,\n 'groupId' => 9,\n 'recipients' => ['users' => []],\n 'reportGroups' => [7, 8],\n 'expected' => false,\n ],\n 'user with no group - ask jiminny' => [\n 'userId' => 123,\n 'groupId' => null,\n 'recipients' => ['users' => []],\n 'reportGroups' => [7],\n 'expected' => false,\n ],\n 'recipient users take precedence over group' => [\n 'userId' => 123,\n 'groupId' => null,\n 'recipients' => ['users' => [123]],\n 'reportGroups' => [],\n 'expected' => true,\n ],\n ];\n }\n\n public function testIsUserRecipientOfReportWithEmptyRecipients(): void\n {\n // Create mock User\n $mockUser = $this->createMock(\\Jiminny\\Models\\User::class);\n $mockUser->method('getId')->willReturn(123);\n\n // Create mock AutomatedReport with no recipients\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getRecipients')->willReturn([]);\n\n $result = $this->service->isUserRecipientOfReport($mockUser, $mockReport);\n\n $this->assertFalse($result);\n }\n\n public function testIsUserRecipientOfReportWithNoUsersKey(): void\n {\n // Create mock User\n $mockUser = $this->createMock(\\Jiminny\\Models\\User::class);\n $mockUser->method('getId')->willReturn(123);\n\n // Create mock AutomatedReport with recipients but no 'users' key\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getRecipients')->willReturn(['other_key' => [456, 789]]);\n\n $result = $this->service->isUserRecipientOfReport($mockUser, $mockReport);\n\n $this->assertFalse($result);\n }\n\n public static function isUserRecipientOfReportDataProvider(): array\n {\n return [\n 'user is recipient - single user' => [\n 'userId' => 123,\n 'recipients' => ['users' => [123]],\n 'expected' => true,\n ],\n 'user is recipient - multiple users' => [\n 'userId' => 456,\n 'recipients' => ['users' => [123, 456, 789]],\n 'expected' => true,\n ],\n 'user is not recipient - single user' => [\n 'userId' => 999,\n 'recipients' => ['users' => [123]],\n 'expected' => false,\n ],\n 'user is not recipient - multiple users' => [\n 'userId' => 999,\n 'recipients' => ['users' => [123, 456, 789]],\n 'expected' => false,\n ],\n 'user is recipient - string IDs converted to int' => [\n 'userId' => 123,\n 'recipients' => ['users' => ['123', '456']],\n 'expected' => true,\n ],\n 'user is not recipient - string IDs converted to int' => [\n 'userId' => 999,\n 'recipients' => ['users' => ['123', '456']],\n 'expected' => false,\n ],\n 'empty users array' => [\n 'userId' => 123,\n 'recipients' => ['users' => []],\n 'expected' => false,\n ],\n ];\n }\n\n private function createMockReportResult(string $uuid = 'test-uuid', string $reportType = 'exec_summary'): AutomatedReportResult\n {\n // Create mock AutomatedReport\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getFrequency')->willReturn('weekly');\n $mockReport->method('getRecipients')->willReturn(['users' => [1, 2]]);\n $mockReport->method('getGroups')->willReturn([10, 20]);\n $mockReport->method('getType')->willReturn($reportType);\n\n // Create mock Team\n $mockTeam = $this->createMock(\\Jiminny\\Models\\Team::class);\n\n // Create mock Group\n $mockGroup = $this->createMock(\\Jiminny\\Models\\Group::class);\n $mockGroup->method('getUuid')->willReturn('group-uuid-10');\n $mockGroup->method('getName')->willReturn('Test Team');\n\n $mockQueryBuilder = Mockery::mock();\n $mockQueryBuilder->shouldReceive('where')->andReturnSelf();\n $mockQueryBuilder->shouldReceive('first')->andReturn($mockGroup);\n\n $dataRelation = Mockery::mock(HasMany::class);\n $dataRelation->shouldReceive('where')->andReturn($mockQueryBuilder);\n $dataRelation->shouldReceive('get')->andReturn(\n new \\Illuminate\\Database\\Eloquent\\Collection([$mockGroup])\n );\n\n $mockTeam->method('groups')->willReturn($dataRelation);\n $mockReport->method('getTeam')->willReturn($mockTeam);\n\n // Create mock AutomatedReportResult\n $mockReportResult = $this->createMock(AutomatedReportResult::class);\n $mockReportResult->method('getUuid')->willReturn($uuid);\n $mockReportResult->method('getGeneratedAt')->willReturn(\n \\Illuminate\\Support\\Carbon::parse('2024-01-15T10:30:00Z')\n );\n\n $mockReportResult->method('getReport')->willReturn($mockReport);\n\n // Mock methods used in getReportFileName\n $mockReportResult->method('getReportType')->willReturn($reportType);\n $mockReportResult->method('getFromDate')->willReturn(\n \\Illuminate\\Support\\Carbon::parse('2024-01-08')\n );\n $mockReportResult->method('getToDate')->willReturn(\n \\Illuminate\\Support\\Carbon::parse('2024-01-15')\n );\n $mockReportResult->method('getGroups')->willReturn([10]);\n $mockReportResult->method('getMediaType')->willReturn(AutomatedReportsService::MEDIA_TYPE_PODCAST);\n\n return $mockReportResult;\n }\n\n #[DataProvider('getUsersUuidsDataProvider')]\n public function testGetUsersUuids(array $recipients, array $mockUsers, array $expectedUuids): void\n {\n // Create mock UserRepository\n $mockUserRepository = $this->createMock(UserRepository::class);\n\n // Configure the mock to return specific users for specific IDs using a callback\n $mockUserRepository->method('find')\n ->willReturnCallback(function ($userId) use ($mockUsers) {\n if (! isset($mockUsers[$userId])) {\n return null;\n }\n\n $userUuid = $mockUsers[$userId]['uuid'] ?? null;\n\n if ($userUuid === null) {\n return null;\n }\n\n $mockUser = $this->createMock(\\Jiminny\\Models\\User::class);\n $mockUser->method('getUuid')->willReturn((string) $userUuid);\n\n return $mockUser;\n });\n\n // Create service with mocked UserRepository\n $automatedReportsService = $this->getService(mockUserRepository: $mockUserRepository);\n\n // Create mock AutomatedReport\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getRecipients')->willReturn($recipients);\n\n $result = $automatedReportsService->getUsersUuids($mockReport);\n\n $this->assertEquals($expectedUuids, $result);\n }\n\n public function testGetUsersUuidsWithEmptyRecipients(): void\n {\n // Create mock AutomatedReport with empty recipients\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getRecipients')->willReturn([]);\n\n $result = $this->service->getUsersUuids($mockReport);\n\n $this->assertEquals([], $result);\n }\n\n public function testGetUsersUuidsWithNoUsersKey(): void\n {\n // Create mock AutomatedReport with recipients but no 'users' key\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getRecipients')->willReturn(['other_key' => [1, 2, 3]]);\n\n $result = $this->service->getUsersUuids($mockReport);\n\n $this->assertEquals([], $result);\n }\n\n public function testGetUsersUuidsWithNonExistentUsers(): void\n {\n // Create mock UserRepository that returns null for all users\n $mockUserRepository = $this->createMock(UserRepository::class);\n $mockUserRepository->method('find')->willReturn(null);\n\n // Create service with mocked UserRepository\n $automatedReportsService = $this->getService(mockUserRepository: $mockUserRepository);\n\n // Create mock AutomatedReport\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getRecipients')->willReturn(['users' => [1, 2, 3]]);\n\n $result = $automatedReportsService->getUsersUuids($mockReport);\n\n // Should return array with null values for non-existent users\n $this->assertEquals([], $result);\n }\n\n public static function getUsersUuidsDataProvider(): array\n {\n return [\n 'single user found' => [\n 'recipients' => ['users' => [123]],\n 'mockUsers' => [\n 123 => ['id' => 123, 'uuid' => 'user-uuid-123'],\n ],\n 'expectedUuids' => ['user-uuid-123'],\n ],\n 'multiple users found' => [\n 'recipients' => ['users' => [123, 456, 789]],\n 'mockUsers' => [\n 123 => ['id' => 123, 'uuid' => 'user-uuid-123'],\n 456 => ['id' => 456, 'uuid' => 'user-uuid-456'],\n 789 => ['id' => 789, 'uuid' => 'user-uuid-789'],\n ],\n 'expectedUuids' => ['user-uuid-123', 'user-uuid-456', 'user-uuid-789'],\n ],\n 'mixed found and not found users' => [\n 'recipients' => ['users' => [123, 456, 789]],\n 'mockUsers' => [\n 123 => ['id' => 123, 'uuid' => 'user-uuid-123'],\n // 456 not found in DB\n 789 => ['id' => 789, 'uuid' => 'user-uuid-789'],\n ],\n 'expectedUuids' => ['user-uuid-123', 'user-uuid-789'], // Updated to reflect that nulls are filtered out\n ],\n 'empty users array' => [\n 'recipients' => ['users' => []],\n 'mockUsers' => [],\n 'expectedUuids' => [],\n ],\n 'all users not found' => [\n 'recipients' => ['users' => [123, 456]],\n 'mockUsers' => [], // No users found\n 'expectedUuids' => [], // Updated to reflect that nulls are filtered out\n ],\n ];\n }\n\n #[DataProvider('getCurrentDealStagesUuidsDataProvider')]\n public function testGetCurrentDealStagesUuids(array $currentDealStages, array $mockStages, array $expectedUuids): void\n {\n // Create mock StageRepository\n $mockStageRepository = $this->createMock(StageRepository::class);\n\n // Configure the mock to return specific stages for specific IDs using a callback\n $mockStageRepository->method('find')\n ->willReturnCallback(function ($stageId) use ($mockStages) {\n if (! isset($mockStages[$stageId])) {\n return null;\n }\n\n $stageUuid = $mockStages[$stageId]['uuid'] ?? null;\n\n if ($stageUuid === null) {\n return null;\n }\n\n $mockStage = $this->createMock(\\Jiminny\\Models\\Stage::class);\n $mockStage->method('getUuid')->willReturn((string) $stageUuid);\n\n return $mockStage;\n });\n\n // Create service with mocked StageRepository\n $automatedReportsService = $this->getService(mockStageRepository: $mockStageRepository);\n\n // Create mock AutomatedReport\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getCurrentDealStages')->willReturn($currentDealStages);\n\n $result = $automatedReportsService->getCurrentDealStagesUuids($mockReport);\n\n $this->assertEquals($expectedUuids, $result);\n }\n\n public function testGetCurrentDealStagesUuidsWithEmptyStages(): void\n {\n // Create mock AutomatedReport with empty current deal stages\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getCurrentDealStages')->willReturn([]);\n\n $result = $this->service->getCurrentDealStagesUuids($mockReport);\n\n $this->assertEquals([], $result);\n }\n\n public function testGetCurrentDealStagesUuidsWithNonExistentStages(): void\n {\n // Create mock StageRepository that returns null for all stages\n $mockStageRepository = $this->createMock(StageRepository::class);\n $mockStageRepository->method('find')->willReturn(null);\n\n // Create service with mocked StageRepository\n $automatedReportsService = $this->getService(mockStageRepository: $mockStageRepository);\n\n // Create mock AutomatedReport\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getCurrentDealStages')->willReturn([1, 2, 3]);\n\n $result = $automatedReportsService->getCurrentDealStagesUuids($mockReport);\n\n // Should return array with null values for non-existent stages\n $this->assertEquals([], $result);\n }\n\n public static function getCurrentDealStagesUuidsDataProvider(): array\n {\n return [\n 'single stage found' => [\n 'currentDealStages' => [10],\n 'mockStages' => [\n 10 => ['id' => 10, 'uuid' => 'stage-uuid-10'],\n ],\n 'expectedUuids' => ['stage-uuid-10'],\n ],\n 'multiple stages found' => [\n 'currentDealStages' => [10, 20, 30],\n 'mockStages' => [\n 10 => ['id' => 10, 'uuid' => 'stage-uuid-10'],\n 20 => ['id' => 20, 'uuid' => 'stage-uuid-20'],\n 30 => ['id' => 30, 'uuid' => 'stage-uuid-30'],\n ],\n 'expectedUuids' => ['stage-uuid-10', 'stage-uuid-20', 'stage-uuid-30'],\n ],\n 'mixed found and not found stages' => [\n 'currentDealStages' => [10, 20, 30],\n 'mockStages' => [\n 10 => ['id' => 10, 'uuid' => 'stage-uuid-10'],\n // 20 not found in DB\n 30 => ['id' => 30, 'uuid' => 'stage-uuid-30'],\n ],\n 'expectedUuids' => ['stage-uuid-10', 'stage-uuid-30'], // Updated to reflect that nulls are filtered out\n ],\n 'empty stages array' => [\n 'currentDealStages' => [],\n 'mockStages' => [],\n 'expectedUuids' => [],\n ],\n 'all stages not found' => [\n 'currentDealStages' => [10, 20],\n 'mockStages' => [], // No stages found\n 'expectedUuids' => [], // Updated to reflect that nulls are filtered out\n ],\n ];\n }\n\n #[DataProvider('getTeamGroupsDataProvider')]\n public function testGetTeamGroups(string $teamUuid, ?array $mockTeamData, array $mockGroups, array $expectedResult): void\n {\n // Create mock TeamRepository\n $mockTeamRepository = $this->createMock(TeamRepository::class);\n\n if ($mockTeamData === null) {\n // Team not found\n $mockTeamRepository->method('idOrUuid')\n ->with($teamUuid)\n ->willReturn(null);\n } else {\n // Team found - create mock team with groups\n $mockTeam = $this->createMock(\\Jiminny\\Models\\Team::class);\n\n // Create mock groups collection\n $mockGroupsCollection = $this->createMock(\\Illuminate\\Database\\Eloquent\\Collection::class);\n\n // Create mock Group objects\n $groupObjects = [];\n foreach ($mockGroups as $groupData) {\n $mockGroup = $this->createMock(\\Jiminny\\Models\\Group::class);\n $mockGroup->method('getUuid')->willReturn($groupData['id']);\n $mockGroup->method('getName')->willReturn($groupData['name']);\n $groupObjects[] = $mockGroup;\n }\n\n // Mock the groups collection to return our mock groups\n $mockGroupsCollection->method('getIterator')->willReturn(new \\ArrayIterator($groupObjects));\n\n // Mock the groups() relation\n $mockGroupsRelation = $this->createMock(\\Illuminate\\Database\\Eloquent\\Relations\\HasMany::class);\n $mockGroupsRelation->method('get')->willReturn($mockGroupsCollection);\n $mockTeam->method('groups')->willReturn($mockGroupsRelation);\n\n $mockTeamRepository->method('idOrUuid')\n ->with($teamUuid)\n ->willReturn($mockTeam);\n }\n\n // Create service with mocked TeamRepository\n $automatedReportsService = $this->getService(mockTeamRepository: $mockTeamRepository);\n\n $result = $automatedReportsService->getTeamGroups($teamUuid);\n\n $this->assertEquals($expectedResult, $result);\n }\n\n public function testGetTeamGroupsWithNonExistentTeam(): void\n {\n // Create mock TeamRepository that returns null (team not found)\n $mockTeamRepository = $this->createMock(TeamRepository::class);\n $mockTeamRepository->method('idOrUuid')->willReturn(null);\n\n // Create service with mocked TeamRepository\n $automatedReportsService = $this->getService(mockTeamRepository: $mockTeamRepository);\n\n $result = $automatedReportsService->getTeamGroups('non-existent-team-uuid');\n\n $this->assertEquals([], $result);\n }\n\n public function testGetTeamGroupsWithEmptyGroups(): void\n {\n // Create mock team with no groups\n $mockTeam = $this->createMock(\\Jiminny\\Models\\Team::class);\n\n // Create empty groups collection\n $mockGroupsCollection = $this->createMock(\\Illuminate\\Database\\Eloquent\\Collection::class);\n $mockGroupsCollection->method('getIterator')->willReturn(new \\ArrayIterator([]));\n\n $mockGroupsRelation = $this->createMock(\\Illuminate\\Database\\Eloquent\\Relations\\HasMany::class);\n $mockGroupsRelation->method('get')->willReturn($mockGroupsCollection);\n $mockTeam->method('groups')->willReturn($mockGroupsRelation);\n\n // Create mock TeamRepository\n $mockTeamRepository = $this->createMock(TeamRepository::class);\n $mockTeamRepository->method('idOrUuid')->willReturn($mockTeam);\n\n // Create service with mocked TeamRepository\n $automatedReportsService = $this->getService(mockTeamRepository: $mockTeamRepository);\n\n $result = $automatedReportsService->getTeamGroups('team-with-no-groups');\n\n $this->assertEquals([], $result);\n }\n\n public static function getTeamGroupsDataProvider(): array\n {\n return [\n 'team with single group' => [\n 'teamUuid' => 'team-uuid-123',\n 'mockTeamData' => ['id' => 'team-uuid-123', 'name' => 'Test Team'],\n 'mockGroups' => [\n ['id' => 'group-uuid-1', 'name' => 'Sales Team'],\n ],\n 'expectedResult' => [\n ['id' => 'group-uuid-1', 'name' => 'Sales Team'],\n ],\n ],\n 'team with multiple groups' => [\n 'teamUuid' => 'team-uuid-456',\n 'mockTeamData' => ['id' => 'team-uuid-456', 'name' => 'Another Team'],\n 'mockGroups' => [\n ['id' => 'group-uuid-1', 'name' => 'Sales Team'],\n ['id' => 'group-uuid-2', 'name' => 'Marketing Team'],\n ['id' => 'group-uuid-3', 'name' => 'Support Team'],\n ],\n 'expectedResult' => [\n ['id' => 'group-uuid-1', 'name' => 'Sales Team'],\n ['id' => 'group-uuid-2', 'name' => 'Marketing Team'],\n ['id' => 'group-uuid-3', 'name' => 'Support Team'],\n ],\n ],\n 'team not found' => [\n 'teamUuid' => 'non-existent-uuid',\n 'mockTeamData' => null,\n 'mockGroups' => [],\n 'expectedResult' => [],\n ],\n 'team with no groups' => [\n 'teamUuid' => 'team-uuid-empty',\n 'mockTeamData' => ['id' => 'team-uuid-empty', 'name' => 'Empty Team'],\n 'mockGroups' => [],\n 'expectedResult' => [],\n ],\n ];\n }\n\n #[DataProvider('getTeamsDataProvider')]\n public function testGetTeams(array $mockTeams, array $expectedResult): void\n {\n // Create mock TeamRepository\n $mockTeamRepository = $this->createMock(TeamRepository::class);\n\n // Create mock Team objects\n $teamObjects = [];\n foreach ($mockTeams as $teamData) {\n $mockTeam = $this->createMock(\\Jiminny\\Models\\Team::class);\n $mockTeam->method('getUuid')->willReturn($teamData['id']);\n $mockTeam->method('getName')->willReturn($teamData['name']);\n $mockTeam->method('hasFeature')\n ->with(\\Jiminny\\Models\\Feature\\FeatureEnum::AUTOMATED_REPORTS)\n ->willReturn($teamData['hasAutomatedReports']);\n $teamObjects[] = $mockTeam;\n }\n\n // Mock the repository to return a Collection (not array)\n $mockTeamRepository->method('getTeamsForKiosk')\n ->with('active')\n ->willReturn(new Collection($teamObjects));\n\n // Create service with mocked TeamRepository\n $automatedReportsService = $this->getService(mockTeamRepository: $mockTeamRepository);\n\n $result = $automatedReportsService->getTeams();\n\n $this->assertEquals($expectedResult, $result);\n }\n\n public function testGetTeamsWithNoTeams(): void\n {\n // Create mock TeamRepository that returns empty Collection\n $mockTeamRepository = $this->createMock(TeamRepository::class);\n $mockTeamRepository->method('getTeamsForKiosk')->willReturn(new Collection([]));\n\n // Create service with mocked TeamRepository\n $automatedReportsService = $this->getService(mockTeamRepository: $mockTeamRepository);\n\n $result = $automatedReportsService->getTeams();\n\n $this->assertEquals([], $result);\n }\n\n public function testGetTeamsWithAllTeamsWithoutFeature(): void\n {\n // Create mock teams without AUTOMATED_REPORTS feature\n $mockTeam1 = $this->createMock(\\Jiminny\\Models\\Team::class);\n $mockTeam1->method('hasFeature')\n ->with(\\Jiminny\\Models\\Feature\\FeatureEnum::AUTOMATED_REPORTS)\n ->willReturn(false);\n\n $mockTeam2 = $this->createMock(\\Jiminny\\Models\\Team::class);\n $mockTeam2->method('hasFeature')\n ->with(\\Jiminny\\Models\\Feature\\FeatureEnum::AUTOMATED_REPORTS)\n ->willReturn(false);\n\n // Create mock TeamRepository that returns Collection\n $mockTeamRepository = $this->createMock(TeamRepository::class);\n $mockTeamRepository->method('getTeamsForKiosk')->willReturn(new Collection([$mockTeam1, $mockTeam2]));\n\n // Create service with mocked TeamRepository\n $automatedReportsService = $this->getService(mockTeamRepository: $mockTeamRepository);\n\n $result = $automatedReportsService->getTeams();\n\n $this->assertEquals([], $result);\n }\n\n public static function getTeamsDataProvider(): array\n {\n return [\n 'single team with feature' => [\n 'mockTeams' => [\n [\n 'id' => 'team-uuid-1',\n 'name' => 'Sales Team',\n 'hasAutomatedReports' => true,\n ],\n ],\n 'expectedResult' => [\n ['id' => 'team-uuid-1', 'name' => 'Sales Team'],\n ],\n ],\n 'multiple teams with feature' => [\n 'mockTeams' => [\n [\n 'id' => 'team-uuid-1',\n 'name' => 'Sales Team',\n 'hasAutomatedReports' => true,\n ],\n [\n 'id' => 'team-uuid-2',\n 'name' => 'Marketing Team',\n 'hasAutomatedReports' => true,\n ],\n [\n 'id' => 'team-uuid-3',\n 'name' => 'Support Team',\n 'hasAutomatedReports' => true,\n ],\n ],\n 'expectedResult' => [\n ['id' => 'team-uuid-1', 'name' => 'Sales Team'],\n ['id' => 'team-uuid-2', 'name' => 'Marketing Team'],\n ['id' => 'team-uuid-3', 'name' => 'Support Team'],\n ],\n ],\n 'mixed teams - some with feature, some without' => [\n 'mockTeams' => [\n [\n 'id' => 'team-uuid-1',\n 'name' => 'Sales Team',\n 'hasAutomatedReports' => true,\n ],\n [\n 'id' => 'team-uuid-2',\n 'name' => 'Marketing Team',\n 'hasAutomatedReports' => false,\n ],\n [\n 'id' => 'team-uuid-3',\n 'name' => 'Support Team',\n 'hasAutomatedReports' => true,\n ],\n ],\n 'expectedResult' => [\n ['id' => 'team-uuid-1', 'name' => 'Sales Team'],\n ['id' => 'team-uuid-3', 'name' => 'Support Team'],\n ],\n ],\n 'all teams without feature' => [\n 'mockTeams' => [\n [\n 'id' => 'team-uuid-1',\n 'name' => 'Sales Team',\n 'hasAutomatedReports' => false,\n ],\n [\n 'id' => 'team-uuid-2',\n 'name' => 'Marketing Team',\n 'hasAutomatedReports' => false,\n ],\n ],\n 'expectedResult' => [],\n ],\n 'empty teams array' => [\n 'mockTeams' => [],\n 'expectedResult' => [],\n ],\n ];\n }\n\n #[DataProvider('deleteS3FilesDataProvider')]\n public function testDeleteS3Files(\n string $mediaType,\n array $expectedFileExtensions,\n array $existingFiles,\n string $pathSuffix,\n int $expectedDeletes\n ): void {\n // Arrange\n $teamUuid = 'team-uuid-123';\n $reportUuid = 'report-uuid-456';\n $basePath = sprintf('%s/reports/%s', $teamUuid, $reportUuid);\n\n $team = Mockery::mock(Team::class);\n $team->allows('getUuid')->andReturn($teamUuid);\n\n $report = Mockery::mock(AutomatedReport::class);\n $report->allows('getTeam')->andReturn($team);\n\n $result = Mockery::mock(AutomatedReportResult::class);\n $result->allows('getReport')->andReturn($report);\n $result->allows('getUuid')->andReturn($reportUuid);\n $result->allows('getMediaType')->andReturn($mediaType);\n\n Storage::fake();\n Log::shouldReceive('info')->times($expectedDeletes);\n\n foreach ($existingFiles as $extension) {\n $filePath = $basePath . $pathSuffix . '.' . $extension;\n Storage::put($filePath, 'dummy content');\n }\n\n // Act\n $this->service->deleteS3Files($result);\n\n // Assert\n foreach ($expectedFileExtensions as $extension) {\n $filePath = $basePath . $pathSuffix . '.' . $extension;\n if (in_array($extension, $existingFiles, true)) {\n Storage::assertMissing($filePath);\n } else {\n // To be sure no unexpected files were created and deleted\n Storage::assertMissing($filePath);\n }\n }\n }\n\n public static function deleteS3FilesDataProvider(): array\n {\n return [\n 'PDF report, all files exist' => [\n 'mediaType' => AutomatedReportsService::MEDIA_TYPE_PDF,\n 'expectedFileExtensions' => ['html', 'MD', 'pdf'],\n 'existingFiles' => ['html', 'MD', 'pdf'],\n 'pathSuffix' => '',\n 'expectedDeletes' => 3,\n ],\n 'PDF report, some files exist' => [\n 'mediaType' => AutomatedReportsService::MEDIA_TYPE_PDF,\n 'expectedFileExtensions' => ['html', 'MD', 'pdf'],\n 'existingFiles' => ['html', 'pdf'],\n 'pathSuffix' => '',\n 'expectedDeletes' => 2,\n ],\n 'PDF report, no files exist' => [\n 'mediaType' => AutomatedReportsService::MEDIA_TYPE_PDF,\n 'expectedFileExtensions' => ['html', 'MD', 'pdf'],\n 'existingFiles' => [],\n 'pathSuffix' => '',\n 'expectedDeletes' => 0,\n ],\n 'Podcast report, all files exist' => [\n 'mediaType' => AutomatedReportsService::MEDIA_TYPE_PODCAST,\n 'expectedFileExtensions' => ['json', 'mp3', 'ssml'],\n 'existingFiles' => ['json', 'mp3', 'ssml'],\n 'pathSuffix' => '_podcast',\n 'expectedDeletes' => 3,\n ],\n 'Podcast report, some files exist' => [\n 'mediaType' => AutomatedReportsService::MEDIA_TYPE_PODCAST,\n 'expectedFileExtensions' => ['json', 'mp3', 'ssml'],\n 'existingFiles' => ['mp3'],\n 'pathSuffix' => '_podcast',\n 'expectedDeletes' => 1,\n ],\n 'Podcast report, no files exist' => [\n 'mediaType' => AutomatedReportsService::MEDIA_TYPE_PODCAST,\n 'expectedFileExtensions' => ['json', 'mp3', 'ssml'],\n 'existingFiles' => [],\n 'pathSuffix' => '_podcast',\n 'expectedDeletes' => 0,\n ],\n 'Other media type, should do nothing' => [\n 'mediaType' => 'some_other_type',\n 'expectedFileExtensions' => [],\n 'existingFiles' => [],\n 'pathSuffix' => '',\n 'expectedDeletes' => 0,\n ],\n ];\n }\n\n public function testDeleteReportsResultsInRetentionPeriodWithLogging(): void\n {\n // Create mocks for the test\n $automatedReportsService = Mockery::mock(AutomatedReportsService::class);\n\n $team = Mockery::mock(Team::class);\n $team->shouldReceive('getId')->andReturn(123);\n\n $from = now()->subDays(30);\n $to = now();\n $source = 'test-source';\n\n // Expect the method to be called with specific parameters\n $automatedReportsService->shouldReceive('deleteReportsResultsInRetentionPeriodWithLogging')\n ->once()\n ->with(\n $team,\n Mockery::on(function ($arg) use ($from) {\n return $arg->timestamp === $from->timestamp;\n }),\n Mockery::on(function ($arg) use ($to) {\n return $arg->timestamp === $to->timestamp;\n }),\n $source\n )\n ->andReturn(5);\n\n // Call the method and verify the result\n $result = $automatedReportsService->deleteReportsResultsInRetentionPeriodWithLogging(\n $team,\n $from,\n $to,\n $source\n );\n\n $this->assertEquals(5, $result);\n }\n\n #[DataProvider('sanitizeFileNameDataProvider')]\n public function testSanitizeFileName(string $input, string $expected): void\n {\n $result = $this->service->sanitizeFileName($input);\n\n $this->assertEquals($expected, $result);\n }\n\n public static function sanitizeFileNameDataProvider(): array\n {\n return [\n 'no special characters' => [\n 'input' => 'Exec Summary - Sep 2025 - Business Development Team',\n 'expected' => 'Exec Summary - Sep 2025 - Business Development Team',\n ],\n 'forward slash in team name' => [\n 'input' => 'Exec Summary - Sep 2025 - ND/IRV',\n 'expected' => 'Exec Summary - Sep 2025 - ND-IRV',\n ],\n 'backslash in team name' => [\n 'input' => 'Exec Summary - Sep 2025 - ND\\IRV',\n 'expected' => 'Exec Summary - Sep 2025 - ND-IRV',\n ],\n 'multiple forward slashes' => [\n 'input' => 'Report - Team A/B/C',\n 'expected' => 'Report - Team A-B-C',\n ],\n 'multiple backslashes' => [\n 'input' => 'Report - Team A\\B\\C',\n 'expected' => 'Report - Team A-B-C',\n ],\n 'mixed slashes and backslashes' => [\n 'input' => 'Report - Team A/B\\C',\n 'expected' => 'Report - Team A-B-C',\n ],\n 'complex team name with slashes' => [\n 'input' => 'Exec Summary - Sep 2025 - Business Development Team - ND/IRV, Net Driven - Acquisition (Sales)',\n 'expected' => 'Exec Summary - Sep 2025 - Business Development Team - ND-IRV, Net Driven - Acquisition (Sales)',\n ],\n 'only slashes' => [\n 'input' => '//\\\\\\\\',\n 'expected' => '----',\n ],\n 'empty string' => [\n 'input' => '',\n 'expected' => '',\n ],\n 'slash at start' => [\n 'input' => '/Report Name',\n 'expected' => '-Report Name',\n ],\n 'slash at end' => [\n 'input' => 'Report Name/',\n 'expected' => 'Report Name-',\n ],\n ];\n }\n\n public function testGetReportFileNameSanitizesOutput(): void\n {\n // Create mock GroupRepository\n $mockGroupRepository = $this->createMock(GroupRepository::class);\n\n // Create mock Group with slash in name\n $mockGroup = $this->createMock(\\Jiminny\\Models\\Group::class);\n $mockGroup->method('getName')->willReturn('ND/IRV, Net Driven - Acquisition (Sales)');\n\n $mockGroupRepository->method('find')->willReturn($mockGroup);\n\n // Create service with mocked GroupRepository\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $mockGroupRepository,\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n // Create mock AutomatedReportResult\n $mockReportResult = $this->createMock(AutomatedReportResult::class);\n\n // Create mock AutomatedReport\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getType')->willReturn('exec_summary');\n $mockReport->method('getFrequency')->willReturn('monthly');\n\n $mockReportResult->method('getReport')->willReturn($mockReport);\n $mockReportResult->method('getFromDate')->willReturn(\n \\Illuminate\\Support\\Carbon::parse('2025-09-01')\n );\n $mockReportResult->method('getToDate')->willReturn(\n \\Illuminate\\Support\\Carbon::parse('2025-09-30')\n );\n $mockReportResult->method('getGroups')->willReturn([123]);\n $mockReportResult->method('getMediaType')->willReturn(AutomatedReportsService::MEDIA_TYPE_PDF);\n\n // Call getReportFileName\n $result = $service->getReportFileName($mockReportResult);\n\n // Verify the result does not contain slashes or backslashes\n $this->assertStringNotContainsString('/', $result);\n $this->assertStringNotContainsString('\\\\', $result);\n\n // Verify the slash was replaced with dash\n $this->assertStringContainsString('ND-IRV', $result);\n }\n\n public function testGetReportFileNameWithExtensionSanitizesOutput(): void\n {\n // Create mock GroupRepository\n $mockGroupRepository = $this->createMock(GroupRepository::class);\n\n // Create mock Group with backslash in name\n $mockGroup = $this->createMock(\\Jiminny\\Models\\Group::class);\n $mockGroup->method('getName')->willReturn('Team\\Name');\n\n $mockGroupRepository->method('find')->willReturn($mockGroup);\n\n // Create service with mocked GroupRepository\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $mockGroupRepository,\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n // Create mock AutomatedReportResult\n $mockReportResult = $this->createMock(AutomatedReportResult::class);\n\n // Create mock AutomatedReport\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getType')->willReturn('exec_summary');\n $mockReport->method('getFrequency')->willReturn('monthly');\n\n $mockReportResult->method('getReport')->willReturn($mockReport);\n $mockReportResult->method('getFromDate')->willReturn(\n \\Illuminate\\Support\\Carbon::parse('2025-09-01')\n );\n $mockReportResult->method('getToDate')->willReturn(\n \\Illuminate\\Support\\Carbon::parse('2025-09-30')\n );\n $mockReportResult->method('getGroups')->willReturn([123]);\n $mockReportResult->method('getMediaType')->willReturn(AutomatedReportsService::MEDIA_TYPE_PDF);\n\n // Call getReportFileNameWithExtension\n $result = $service->getReportFileNameWithExtension($mockReportResult);\n\n // Verify the result does not contain backslashes\n $this->assertStringNotContainsString('\\\\', $result);\n $this->assertStringNotContainsString('/', $result);\n\n // Verify the backslash was replaced with dash\n $this->assertStringContainsString('Team-Name', $result);\n\n // Verify extension is added\n $this->assertStringEndsWith('.pdf', $result);\n }\n\n public function testHasPassedScheduledTimeWithNullGeneratedAt(): void\n {\n $result = $this->service->hasPassedScheduledTime(null, 'America/Chicago');\n\n $this->assertFalse($result);\n }\n\n public function testHasPassedScheduledTimeWhenScheduledTimePassed(): void\n {\n Carbon::setTestNow(Carbon::parse('2026-02-24 10:00:00', 'America/Chicago'));\n\n $generatedAt = Carbon::parse('2026-02-24 01:00:00', 'America/Chicago');\n\n $result = $this->service->hasPassedScheduledTime($generatedAt, 'America/Chicago');\n\n $this->assertTrue($result);\n\n Carbon::setTestNow();\n }\n\n public function testHasPassedScheduledTimeWhenGeneratedAfterScheduledTime(): void\n {\n Carbon::setTestNow(Carbon::parse('2026-02-24 10:00:00', 'America/Chicago'));\n\n $generatedAt = Carbon::parse('2026-02-24 06:00:00', 'America/Chicago');\n\n $result = $this->service->hasPassedScheduledTime($generatedAt, 'America/Chicago');\n\n $this->assertFalse($result);\n\n Carbon::setTestNow();\n }\n\n public function testHasPassedScheduledTimeBeforeScheduledTimeToday(): void\n {\n Carbon::setTestNow(Carbon::parse('2026-02-24 04:00:00', 'America/Chicago'));\n\n $generatedAt = Carbon::parse('2026-02-24 01:00:00', 'America/Chicago');\n\n $result = $this->service->hasPassedScheduledTime($generatedAt, 'America/Chicago');\n\n $this->assertFalse($result);\n\n Carbon::setTestNow();\n }\n\n public function testShouldSendReportWithEmptyUsers(): void\n {\n $result = $this->service->shouldSendReport([]);\n\n $this->assertFalse($result);\n }\n\n public function testShouldSendReportAtScheduledTime(): void\n {\n Carbon::setTestNow(Carbon::parse('2026-02-24 05:00:00', 'America/Chicago'));\n\n $users = [\n ['email' => 'test@example.com', 'name' => 'Test User', 'timezone' => 'America/Chicago'],\n ];\n\n $result = $this->service->shouldSendReport($users);\n\n $this->assertTrue($result);\n\n Carbon::setTestNow();\n }\n\n public function testShouldSendReportNotAtScheduledTimeWithoutGeneratedAt(): void\n {\n Carbon::setTestNow(Carbon::parse('2026-02-24 10:00:00', 'America/Chicago'));\n\n $users = [\n ['email' => 'test@example.com', 'name' => 'Test User', 'timezone' => 'America/Chicago'],\n ];\n\n $result = $this->service->shouldSendReport($users);\n\n $this->assertFalse($result);\n\n Carbon::setTestNow();\n }\n\n public function testShouldSendReportWhenScheduledTimeMissed(): void\n {\n Carbon::setTestNow(Carbon::parse('2026-02-24 10:00:00', 'America/Chicago'));\n\n $users = [\n ['email' => 'test@example.com', 'name' => 'Test User', 'timezone' => 'America/Chicago'],\n ];\n\n $generatedAt = Carbon::parse('2026-02-24 01:00:00', 'America/Chicago');\n\n $result = $this->service->shouldSendReport($users, $generatedAt);\n\n $this->assertTrue($result);\n\n Carbon::setTestNow();\n }\n\n public function testShouldSendReportWhenGeneratedAfterScheduledTime(): void\n {\n Carbon::setTestNow(Carbon::parse('2026-02-24 10:00:00', 'America/Chicago'));\n\n $users = [\n ['email' => 'test@example.com', 'name' => 'Test User', 'timezone' => 'America/Chicago'],\n ];\n\n $generatedAt = Carbon::parse('2026-02-24 06:00:00', 'America/Chicago');\n\n $result = $this->service->shouldSendReport($users, $generatedAt);\n\n $this->assertFalse($result);\n\n Carbon::setTestNow();\n }\n\n public function testGetTypes(): void\n {\n $types = AutomatedReportsService::getTypes();\n\n $this->assertIsArray($types);\n $this->assertContains('exec_summary', $types);\n $this->assertContains('coaching_profiles', $types);\n $this->assertContains('loss_analysis', $types);\n $this->assertNotContains('ask_jiminny', $types);\n }\n\n public function testGetCallTypes(): void\n {\n $callTypes = AutomatedReportsService::getCallTypes();\n\n $this->assertIsArray($callTypes);\n $this->assertContains('conference', $callTypes);\n $this->assertContains('dialer', $callTypes);\n }\n\n public function testGetFrequencies(): void\n {\n $frequencies = AutomatedReportsService::getFrequencies();\n\n $this->assertIsArray($frequencies);\n $this->assertContains('weekly', $frequencies);\n $this->assertContains('monthly', $frequencies);\n $this->assertContains('quarterly', $frequencies);\n $this->assertContains('one_off', $frequencies);\n $this->assertNotContains('daily', $frequencies);\n }\n\n public function testGetAskJiminnyFrequencies(): void\n {\n $frequencies = AutomatedReportsService::getAskJiminnyFrequencies();\n\n $this->assertIsArray($frequencies);\n $this->assertContains('daily', $frequencies);\n $this->assertContains('weekly', $frequencies);\n $this->assertContains('monthly', $frequencies);\n $this->assertNotContains('quarterly', $frequencies);\n $this->assertNotContains('one_off', $frequencies);\n }\n\n public function testGetReportEnabledFieldData(): void\n {\n $result = $this->service->getReportEnabledFieldData(true);\n\n $this->assertEquals('report_enabled', $result['id']);\n $this->assertTrue($result['value']);\n }\n\n public function testGetReportEnabledFieldDataDefault(): void\n {\n $result = $this->service->getReportEnabledFieldData();\n\n $this->assertFalse($result['value']);\n }\n\n public function testGetOrganizationFieldDataShortVersion(): void\n {\n $mockTeamRepository = $this->createMock(TeamRepository::class);\n $mockTeamRepository->method('getTeamsForKiosk')->willReturn(new Collection([]));\n\n $service = $this->getService(mockTeamRepository: $mockTeamRepository);\n $result = $service->getOrganizationFieldData(null, true);\n\n $this->assertEquals('organization', $result['id']);\n $this->assertArrayNotHasKey('inputType', $result);\n $this->assertArrayHasKey('options', $result);\n }\n\n public function testGetOrganizationFieldDataFullVersion(): void\n {\n $mockTeamRepository = $this->createMock(TeamRepository::class);\n $mockTeamRepository->method('getTeamsForKiosk')->willReturn(new Collection([]));\n\n $service = $this->getService(mockTeamRepository: $mockTeamRepository);\n $result = $service->getOrganizationFieldData('team-uuid-1', false);\n\n $this->assertEquals('organization', $result['id']);\n $this->assertArrayHasKey('inputType', $result);\n $this->assertEquals('team-uuid-1', $result['value']);\n $this->assertArrayHasKey('dependencies', $result);\n }\n\n public function testGetTeamFieldDataShortVersion(): void\n {\n $result = $this->service->getTeamFieldData([], [], true);\n\n $this->assertEquals('teams', $result['id']);\n $this->assertArrayNotHasKey('inputType', $result);\n }\n\n public function testGetTeamFieldDataFullVersion(): void\n {\n $result = $this->service->getTeamFieldData(['opt1'], ['val1'], false);\n\n $this->assertEquals('teams', $result['id']);\n $this->assertArrayHasKey('inputType', $result);\n $this->assertEquals(['opt1'], $result['options']);\n $this->assertEquals(['val1'], $result['value']);\n }\n\n public function testGetReportTypeFieldDataShortVersion(): void\n {\n $result = $this->service->getReportTypeFieldData(null, true);\n\n $this->assertEquals('report_type', $result['id']);\n $this->assertArrayNotHasKey('inputType', $result);\n }\n\n public function testGetReportTypeFieldDataFullVersion(): void\n {\n $result = $this->service->getReportTypeFieldData('exec_summary', false);\n\n $this->assertEquals('report_type', $result['id']);\n $this->assertArrayHasKey('inputType', $result);\n $this->assertEquals('exec_summary', $result['value']);\n }\n\n public function testGetReportTypeFieldDataWithTeamHavingBothFeatures(): void\n {\n $team = $this->createMock(\\Jiminny\\Models\\Team::class);\n $team->method('hasFeature')->willReturnMap([\n [\\Jiminny\\Models\\Feature\\FeatureEnum::AUTOMATED_REPORTS, true],\n [\\Jiminny\\Models\\Feature\\FeatureEnum::ASK_JIMINNY_REPORTS, true],\n ]);\n\n $result = $this->service->getReportTypeFieldData(null, true, $team);\n\n $ids = array_column($result['options'], 'id');\n $this->assertContains('exec_summary', $ids);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $ids);\n $this->assertLessThan(\n array_search(AutomatedReportsService::TYPE_ASK_JIMINNY, $ids),\n array_search('exec_summary', $ids)\n );\n }\n\n public function testGetReportTypeFieldDataWithTeamHavingOnlyAutomatedReports(): void\n {\n $team = $this->createMock(\\Jiminny\\Models\\Team::class);\n $team->method('hasFeature')->willReturnMap([\n [\\Jiminny\\Models\\Feature\\FeatureEnum::AUTOMATED_REPORTS, true],\n [\\Jiminny\\Models\\Feature\\FeatureEnum::ASK_JIMINNY_REPORTS, false],\n ]);\n\n $result = $this->service->getReportTypeFieldData(null, true, $team);\n\n $ids = array_column($result['options'], 'id');\n $this->assertContains('exec_summary', $ids);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $ids);\n }\n\n public function testGetReportTypeFieldDataWithTeamHavingOnlyAskJiminny(): void\n {\n $team = $this->createMock(\\Jiminny\\Models\\Team::class);\n $team->method('hasFeature')->willReturnMap([\n [\\Jiminny\\Models\\Feature\\FeatureEnum::AUTOMATED_REPORTS, false],\n [\\Jiminny\\Models\\Feature\\FeatureEnum::ASK_JIMINNY_REPORTS, true],\n ]);\n\n $result = $this->service->getReportTypeFieldData(null, true, $team);\n\n $ids = array_column($result['options'], 'id');\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $ids);\n $this->assertNotContains('exec_summary', $ids);\n }\n\n public function testGetReportTypeFieldDataWithNullTeamFallsBackToStandardTypes(): void\n {\n $result = $this->service->getReportTypeFieldData(null, true, null);\n\n $ids = array_column($result['options'], 'id');\n $this->assertContains('exec_summary', $ids);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $ids);\n }\n\n public function testGetFrequencyFieldData(): void\n {\n $result = $this->service->getFrequencyFieldData('weekly');\n\n $this->assertEquals('frequency', $result['id']);\n $this->assertEquals('weekly', $result['value']);\n $this->assertArrayHasKey('options', $result);\n }\n\n public function testGetPeriodFieldData(): void\n {\n $result = $this->service->getPeriodFieldData('2025-01-01', '2025-01-31');\n\n $this->assertEquals('period', $result['id']);\n $this->assertEquals('2025-01-01', $result['value']['startDate']);\n $this->assertEquals('2025-01-31', $result['value']['endDate']);\n }\n\n public function testGetCallDurationFieldData(): void\n {\n $result = $this->service->getCallDurationFieldData(5, 60);\n\n $this->assertEquals('call_duration', $result['id']);\n $this->assertEquals(5, $result['value']['min']);\n $this->assertEquals(60, $result['value']['max']);\n }\n\n public function testGetDealValueFieldData(): void\n {\n $result = $this->service->getDealValueFieldData(1000, 5000);\n\n $this->assertEquals('deal_value', $result['id']);\n $this->assertEquals(1000, $result['value']['min']);\n $this->assertEquals(5000, $result['value']['max']);\n }\n\n public function testGetCustomReportNameFieldData(): void\n {\n $result = $this->service->getCustomReportNameFieldData('My Report');\n\n $this->assertEquals('custom_name', $result['id']);\n $this->assertEquals('My Report', $result['value']);\n }\n\n public function testGetAdditionalPromptInputFieldData(): void\n {\n $result = $this->service->getAdditionalPromptInputFieldData('Some prompt');\n\n $this->assertEquals('additional_prompt_input', $result['id']);\n $this->assertEquals('Some prompt', $result['value']);\n }\n\n public function testGetCallTypeFieldDataBothOn(): void\n {\n $result = $this->service->getCallTypeFieldData(true, true);\n\n $this->assertEquals('call_type', $result['id']);\n $this->assertCount(2, $result['value']);\n }\n\n public function testGetCallTypeFieldDataNoneOn(): void\n {\n $result = $this->service->getCallTypeFieldData(false, false);\n\n $this->assertEquals('call_type', $result['id']);\n $this->assertEmpty($result['value']);\n }\n\n public function testGetCallTypeFieldDataConferenceOnly(): void\n {\n $result = $this->service->getCallTypeFieldData(true, false);\n\n $this->assertCount(1, $result['value']);\n $this->assertEquals('conference', $result['value'][0]['id']);\n }\n\n public function testGetCallTypeFieldDataDialerOnly(): void\n {\n $result = $this->service->getCallTypeFieldData(false, true);\n\n $this->assertCount(1, $result['value']);\n $this->assertEquals('dialer', $result['value'][0]['id']);\n }\n\n public function testTransformDurationToMinutesNull(): void\n {\n $result = $this->service->transformDurationToMinutes(null);\n\n $this->assertNull($result);\n }\n\n public function testTransformDurationToMinutesZero(): void\n {\n $result = $this->service->transformDurationToMinutes(0);\n\n $this->assertNull($result);\n }\n\n public function testTransformDurationToMinutes(): void\n {\n $result = $this->service->transformDurationToMinutes(300);\n\n $this->assertEquals(5, $result);\n }\n\n public function testGetTeam(): void\n {\n $mockTeam = $this->createMock(Team::class);\n $mockTeamRepository = $this->createMock(TeamRepository::class);\n $mockTeamRepository->expects($this->once())\n ->method('idOrUuid')\n ->with('team-uuid')\n ->willReturn($mockTeam);\n\n $service = $this->getService(mockTeamRepository: $mockTeamRepository);\n $result = $service->getTeam('team-uuid');\n\n $this->assertSame($mockTeam, $result);\n }\n\n public function testGetTeamById(): void\n {\n $mockTeam = $this->createMock(Team::class);\n $mockTeamRepository = $this->createMock(TeamRepository::class);\n $mockTeamRepository->expects($this->once())\n ->method('find')\n ->with(42)\n ->willReturn($mockTeam);\n\n $service = $this->getService(mockTeamRepository: $mockTeamRepository);\n $result = $service->getTeamById(42);\n\n $this->assertSame($mockTeam, $result);\n }\n\n public function testGetGroupsUuidsEmpty(): void\n {\n $report = $this->createMock(AutomatedReport::class);\n $report->method('getGroups')->willReturn([]);\n\n $result = $this->service->getGroupsUuids($report);\n\n $this->assertEquals([], $result);\n }\n\n public function testGetGroupsUuidsWithGroups(): void\n {\n $mockGroup = $this->createMock(Group::class);\n $mockGroup->method('getUuid')->willReturn('group-uuid-1');\n\n $mockGroupRepository = $this->createMock(GroupRepository::class);\n $mockGroupRepository->method('find')->willReturnMap([\n [10, $mockGroup],\n [99, null],\n ]);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $mockGroupRepository,\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $report = $this->createMock(AutomatedReport::class);\n $report->method('getGroups')->willReturn([10, 99]);\n\n $result = $service->getGroupsUuids($report);\n\n $this->assertEquals(['group-uuid-1'], $result);\n }\n\n public function testGetPlaybookCategoriesUuidsEmpty(): void\n {\n $report = $this->createMock(AutomatedReport::class);\n $report->method('getPlaybookCategories')->willReturn([]);\n\n $result = $this->service->getPlaybookCategoriesUuids($report);\n\n $this->assertEquals([], $result);\n }\n\n public function testGetPlaybookCategoriesUuidsWithCategories(): void\n {\n $mockCategory = $this->createMock(\\Jiminny\\Models\\PlaybookCategory::class);\n $mockCategory->method('getUuid')->willReturn('cat-uuid-1');\n\n $mockPlaybookCategoryRepository = $this->createMock(PlaybookCategoryRepository::class);\n $mockPlaybookCategoryRepository->method('find')->willReturnMap([\n [1, $mockCategory],\n [2, null],\n ]);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $mockPlaybookCategoryRepository,\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $report = $this->createMock(AutomatedReport::class);\n $report->method('getPlaybookCategories')->willReturn([1, 2]);\n\n $result = $service->getPlaybookCategoriesUuids($report);\n\n $this->assertEquals(['cat-uuid-1'], $result);\n }\n\n public function testGetDealAtCallStagesUuidsEmpty(): void\n {\n $report = $this->createMock(AutomatedReport::class);\n $report->method('getDealAtCallStages')->willReturn([]);\n\n $result = $this->service->getDealAtCallStagesUuids($report);\n\n $this->assertEquals([], $result);\n }\n\n public function testGetDealAtCallStagesUuidsWithStages(): void\n {\n $mockStage = $this->createMock(\\Jiminny\\Models\\Stage::class);\n $mockStage->method('getUuid')->willReturn('stage-uuid-1');\n\n $mockStageRepository = $this->createMock(StageRepository::class);\n $mockStageRepository->method('find')->willReturnMap([\n [5, $mockStage],\n [9, null],\n ]);\n\n $service = $this->getService(mockStageRepository: $mockStageRepository);\n\n $report = $this->createMock(AutomatedReport::class);\n $report->method('getDealAtCallStages')->willReturn([5, 9]);\n\n $result = $service->getDealAtCallStagesUuids($report);\n\n $this->assertEquals(['stage-uuid-1'], $result);\n }\n\n public function testGetJiminnyUsersUuids(): void\n {\n $mockUser = $this->createMock(User::class);\n $mockUser->method('getUuid')->willReturn('user-uuid-1');\n\n $mockUserRepository = $this->createMock(UserRepository::class);\n $mockUserRepository->method('find')->willReturn($mockUser);\n\n $service = $this->getService(mockUserRepository: $mockUserRepository);\n\n $report = $this->createMock(AutomatedReport::class);\n $report->method('getJiminnyRecipients')->willReturn(['users' => [1]]);\n\n $result = $service->getJiminnyUsersUuids($report);\n\n $this->assertEquals(['user-uuid-1'], $result);\n }\n\n public function testGetRecipientUsers(): void\n {\n $mockUser = $this->createMock(User::class);\n $mockUser->method('getEmailAddress')->willReturn('user@test.com');\n $mockUser->method('getName')->willReturn('Test User');\n $timezone = $this->createMock(\\DateTimeZone::class);\n $timezone->method('getName')->willReturn('UTC');\n $mockUser->method('getTimezone')->willReturn($timezone);\n\n $mockUserRepository = $this->createMock(UserRepository::class);\n $mockUserRepository->method('find')->willReturn($mockUser);\n\n $service = $this->getService(mockUserRepository: $mockUserRepository);\n\n $report = $this->createMock(AutomatedReport::class);\n $report->method('getRecipients')->willReturn(['users' => [1]]);\n\n $result = $service->getRecipientUsers($report);\n\n $this->assertCount(1, $result);\n $this->assertEquals('user@test.com', $result[0]['email']);\n $this->assertEquals('Test User', $result[0]['name']);\n }\n\n public function testGetValidRecipientUsersFiltersEmptyEmail(): void\n {\n $mockUserWithEmail = $this->createMock(User::class);\n $mockUserWithEmail->method('getEmailAddress')->willReturn('valid@test.com');\n $mockUserWithEmail->method('getName')->willReturn('Valid User');\n $timezone = $this->createMock(\\DateTimeZone::class);\n $timezone->method('getName')->willReturn('UTC');\n $mockUserWithEmail->method('getTimezone')->willReturn($timezone);\n\n $mockUserNoEmail = $this->createMock(User::class);\n $mockUserNoEmail->method('getEmailAddress')->willReturn('');\n $mockUserNoEmail->method('getName')->willReturn('No Email User');\n $mockUserNoEmail->method('getTimezone')->willReturn($timezone);\n\n $mockUserRepository = $this->createMock(UserRepository::class);\n $mockUserRepository->method('find')->willReturnMap([\n [1, $mockUserWithEmail],\n [2, $mockUserNoEmail],\n ]);\n\n $service = $this->getService(mockUserRepository: $mockUserRepository);\n\n $report = $this->createMock(AutomatedReport::class);\n $report->method('getRecipients')->willReturn(['users' => [1, 2]]);\n $report->method('getJiminnyRecipients')->willReturn(['users' => []]);\n\n $result = $service->getValidRecipientUsers($report);\n\n $this->assertCount(1, $result);\n $this->assertEquals('valid@test.com', $result[0]['email']);\n }\n\n public function testGetValidRecipientUsersWithJiminny(): void\n {\n $tz = $this->createMock(\\DateTimeZone::class);\n $tz->method('getName')->willReturn('UTC');\n\n $mockUser1 = $this->createMock(User::class);\n $mockUser1->method('getEmailAddress')->willReturn('user1@test.com');\n $mockUser1->method('getName')->willReturn('User1');\n $mockUser1->method('getTimezone')->willReturn($tz);\n\n $mockUser2 = $this->createMock(User::class);\n $mockUser2->method('getEmailAddress')->willReturn('jiminny@test.com');\n $mockUser2->method('getName')->willReturn('Jiminny');\n $mockUser2->method('getTimezone')->willReturn($tz);\n\n $mockUserRepository = $this->createMock(UserRepository::class);\n $mockUserRepository->method('find')->willReturnMap([\n [1, $mockUser1],\n [2, $mockUser2],\n ]);\n\n $service = $this->getService(mockUserRepository: $mockUserRepository);\n\n $report = $this->createMock(AutomatedReport::class);\n $report->method('getRecipients')->willReturn(['users' => [1]]);\n $report->method('getJiminnyRecipients')->willReturn(['users' => [2]]);\n\n $result = $service->getValidRecipientUsers($report, true);\n\n $this->assertCount(2, $result);\n }\n\n public function testGetReportTypeName(): void\n {\n $report = $this->createMock(AutomatedReport::class);\n $report->method('getType')->willReturn('exec_summary');\n\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getReport')->willReturn($report);\n\n $result = $this->service->getReportTypeName($mockResult);\n\n $this->assertEquals('Exec Summary', $result);\n }\n\n public function testGetReportPeriodNameThrowsOnNullFrom(): void\n {\n $report = $this->createMock(AutomatedReport::class);\n $report->method('getFrequency')->willReturn('weekly');\n\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getReport')->willReturn($report);\n $mockResult->method('getFromDate')->willReturn(null);\n $mockResult->method('getToDate')->willReturn(IlluminateCarbon::parse('2025-01-15'));\n\n $this->expectException(\\Jiminny\\Exceptions\\ApplicationException::class);\n\n $this->service->getReportPeriodName($mockResult);\n }\n\n public function testGetReportPeriodNameThrowsOnNullTo(): void\n {\n $report = $this->createMock(AutomatedReport::class);\n $report->method('getFrequency')->willReturn('weekly');\n\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getReport')->willReturn($report);\n $mockResult->method('getFromDate')->willReturn(IlluminateCarbon::parse('2025-01-08'));\n $mockResult->method('getToDate')->willReturn(null);\n\n $this->expectException(\\Jiminny\\Exceptions\\ApplicationException::class);\n\n $this->service->getReportPeriodName($mockResult);\n }\n\n #[DataProvider('formatReportPeriodNameDataProvider')]\n public function testGetReportPeriodName(\n string $frequency,\n string $from,\n string $to,\n string $expected\n ): void {\n $report = $this->createMock(AutomatedReport::class);\n $report->method('getFrequency')->willReturn($frequency);\n\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getReport')->willReturn($report);\n $mockResult->method('getFromDate')->willReturn(IlluminateCarbon::parse($from));\n $mockResult->method('getToDate')->willReturn(IlluminateCarbon::parse($to));\n\n $result = $this->service->getReportPeriodName($mockResult);\n\n $this->assertEquals($expected, $result);\n }\n\n public static function formatReportPeriodNameDataProvider(): array\n {\n return [\n 'daily' => [\n 'frequency' => 'daily',\n 'from' => '2025-05-15',\n 'to' => '2025-05-15',\n 'expected' => '15 May 2025',\n ],\n 'monthly same year' => [\n 'frequency' => 'monthly',\n 'from' => '2025-05-01',\n 'to' => '2025-05-31',\n 'expected' => 'May 2025',\n ],\n 'weekly same month' => [\n 'frequency' => 'weekly',\n 'from' => '2025-08-04',\n 'to' => '2025-08-08',\n 'expected' => '4 - 8 Aug 2025',\n ],\n 'weekly different months same year' => [\n 'frequency' => 'weekly',\n 'from' => '2025-10-27',\n 'to' => '2025-11-03',\n 'expected' => '27 Oct - 3 Nov 2025',\n ],\n 'weekly different years' => [\n 'frequency' => 'weekly',\n 'from' => '2024-12-28',\n 'to' => '2025-01-03',\n 'expected' => '28 Dec 2024 - 3 Jan 2025',\n ],\n 'quarterly same year' => [\n 'frequency' => 'quarterly',\n 'from' => '2025-01-01',\n 'to' => '2025-04-01',\n 'expected' => 'Jan - Mar 2025',\n ],\n 'quarterly different years' => [\n 'frequency' => 'quarterly',\n 'from' => '2024-11-01',\n 'to' => '2025-02-01',\n 'expected' => 'Nov 2024 - Jan 2025',\n ],\n 'one_off same month' => [\n 'frequency' => 'one_off',\n 'from' => '2025-05-02',\n 'to' => '2025-05-31',\n 'expected' => '2 - 31 May 2025',\n ],\n 'one_off different months same year' => [\n 'frequency' => 'one_off',\n 'from' => '2025-05-15',\n 'to' => '2025-06-15',\n 'expected' => '15 May - 15 Jun 2025',\n ],\n 'one_off different years' => [\n 'frequency' => 'one_off',\n 'from' => '2024-12-15',\n 'to' => '2025-01-15',\n 'expected' => '15 Dec 2024 - 15 Jan 2025',\n ],\n 'unknown frequency falls back to default' => [\n 'frequency' => 'unknown',\n 'from' => '2025-05-01',\n 'to' => '2025-05-31',\n 'expected' => '1 May 2025 - 31 May 2025',\n ],\n ];\n }\n\n public function testGetReportTeamsNameEmpty(): void\n {\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getGroups')->willReturn([]);\n\n $result = $this->service->getReportTeamsName($mockResult);\n\n $this->assertEquals('All', $result);\n }\n\n public function testGetReportTeamsNameSingleGroup(): void\n {\n $mockGroup = $this->createMock(Group::class);\n $mockGroup->method('getName')->willReturn('Sales Team');\n\n $mockGroupRepository = $this->createMock(GroupRepository::class);\n $mockGroupRepository->method('find')->willReturn($mockGroup);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $mockGroupRepository,\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getGroups')->willReturn([10]);\n\n $result = $service->getReportTeamsName($mockResult);\n\n $this->assertEquals('Sales Team', $result);\n }\n\n public function testGetReportTeamsNameMultipleGroups(): void\n {\n $mockGroup1 = $this->createMock(Group::class);\n $mockGroup1->method('getName')->willReturn('Sales Team');\n\n $mockGroup2 = $this->createMock(Group::class);\n $mockGroup2->method('getName')->willReturn('Marketing Team');\n\n $mockGroupRepository = $this->createMock(GroupRepository::class);\n $mockGroupRepository->method('find')->willReturnMap([\n [10, $mockGroup1],\n [20, $mockGroup2],\n [99, null],\n ]);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $mockGroupRepository,\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getGroups')->willReturn([10, 20, 99]);\n\n $result = $service->getReportTeamsName($mockResult);\n\n $this->assertEquals('Sales Team, Marketing Team', $result);\n }\n\n public function testGetReportFound(): void\n {\n $mockReport = $this->createMock(AutomatedReport::class);\n\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n $mockRepo->expects($this->once())\n ->method('findByUuid')\n ->with('report-uuid')\n ->willReturn($mockReport);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $result = $service->getReport('report-uuid');\n\n $this->assertSame($mockReport, $result);\n }\n\n public function testGetReportNotFound(): void\n {\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n $mockRepo->method('findByUuid')->willReturn(null);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $this->expectException(ModelNotFoundException::class);\n\n $service->getReport('non-existent-uuid');\n }\n\n public function testDeleteReportNotFound(): void\n {\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n $mockRepo->method('findByUuid')->willReturn(null);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $this->expectException(ModelNotFoundException::class);\n\n $service->delete('non-existent-uuid');\n }\n\n public function testDeleteReportSuccess(): void\n {\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->expects($this->once())->method('delete');\n\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n $mockRepo->method('findByUuid')->willReturn($mockReport);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $service->delete('report-uuid');\n }\n\n public function testUpdateStatusNotFound(): void\n {\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n $mockRepo->method('findByUuid')->willReturn(null);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $this->expectException(ModelNotFoundException::class);\n\n $service->updateStatus('non-existent-uuid', ['report_enabled' => true]);\n }\n\n public function testGetReportResultFound(): void\n {\n $mockResult = $this->createMock(AutomatedReportResult::class);\n\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n $mockRepo->expects($this->once())\n ->method('findResultByUuid')\n ->with('result-uuid')\n ->willReturn($mockResult);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $result = $service->getReportResult('result-uuid');\n\n $this->assertSame($mockResult, $result);\n }\n\n public function testGetReportResultNotFound(): void\n {\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n $mockRepo->method('findResultByUuid')->willReturn(null);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $this->expectException(ModelNotFoundException::class);\n\n $service->getReportResult('non-existent-uuid');\n }\n\n public function testFindChildResult(): void\n {\n $mockParent = $this->createMock(AutomatedReportResult::class);\n $mockChild = $this->createMock(AutomatedReportResult::class);\n\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n $mockRepo->expects($this->once())\n ->method('findChildResult')\n ->with($mockParent, 'podcast')\n ->willReturn($mockChild);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $result = $service->findChildResult($mockParent, 'podcast');\n\n $this->assertSame($mockChild, $result);\n }\n\n #[DataProvider('calculateFromAndToDatePeriodDataProvider')]\n public function testCalculateFromAndToDatePeriod(string $frequency): void\n {\n Carbon::setTestNow(Carbon::parse('2025-06-15 12:00:00'));\n\n $result = $this->service->calculateFromAndToDatePeriod($frequency);\n\n $this->assertArrayHasKey('fromDate', $result);\n $this->assertArrayHasKey('toDate', $result);\n $this->assertInstanceOf(Carbon::class, $result['fromDate']);\n $this->assertInstanceOf(Carbon::class, $result['toDate']);\n\n Carbon::setTestNow();\n }\n\n public static function calculateFromAndToDatePeriodDataProvider(): array\n {\n return [\n 'daily' => ['daily'],\n 'weekly' => ['weekly'],\n 'monthly' => ['monthly'],\n 'quarterly' => ['quarterly'],\n ];\n }\n\n public function testCalculateFromAndToDatePeriodOneOff(): void\n {\n $from = IlluminateCarbon::parse('2025-01-01');\n $to = IlluminateCarbon::parse('2025-01-31');\n\n $result = $this->service->calculateFromAndToDatePeriod('one_off', $from, $to);\n\n $this->assertSame($from, $result['fromDate']);\n $this->assertSame($to, $result['toDate']);\n }\n\n public function testCalculateFromAndToDatePeriodInvalidFrequency(): void\n {\n $this->expectException(InvalidArgumentException::class);\n\n $this->service->calculateFromAndToDatePeriod('invalid_frequency');\n }\n\n public function testGetMediaPath(): void\n {\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getMediaType')->willReturn(AutomatedReportsService::MEDIA_TYPE_PDF);\n $mockResult->method('getPdfUrl')->willReturn('https://example.com/reports/file.pdf');\n\n $result = $this->service->getMediaPath($mockResult);\n\n $this->assertEquals('/reports/file.pdf', $result);\n }\n\n public function testGetMediaPathPodcast(): void\n {\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getMediaType')->willReturn(AutomatedReportsService::MEDIA_TYPE_PODCAST);\n $mockResult->method('getPodcastAudioUrl')->willReturn('https://example.com/audio/file.mp3');\n\n $result = $this->service->getMediaPath($mockResult);\n\n $this->assertEquals('/audio/file.mp3', $result);\n }\n\n public function testGetMediaPathNullUrl(): void\n {\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getMediaType')->willReturn('unknown_type');\n\n $result = $this->service->getMediaPath($mockResult);\n\n $this->assertNull($result);\n }\n\n public function testGetMediaPathPdfNullUrl(): void\n {\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getMediaType')->willReturn(AutomatedReportsService::MEDIA_TYPE_PDF);\n $mockResult->method('getPdfUrl')->willReturn(null);\n\n $result = $this->service->getMediaPath($mockResult);\n\n $this->assertNull($result);\n }\n\n public function testGetFilenameSuffixPodcast(): void\n {\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getMediaType')->willReturn(AutomatedReportsService::MEDIA_TYPE_PODCAST);\n\n $result = $this->service->getFilenameSuffix($mockResult);\n\n $this->assertEquals('Podcast', $result);\n }\n\n public function testGetFilenameSuffixPdf(): void\n {\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getMediaType')->willReturn(AutomatedReportsService::MEDIA_TYPE_PDF);\n\n $result = $this->service->getFilenameSuffix($mockResult);\n\n $this->assertNull($result);\n }\n\n public function testGetMailSubjectSuffixPdf(): void\n {\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getMediaType')->willReturn(AutomatedReportsService::MEDIA_TYPE_PDF);\n\n $result = $this->service->getMailSubjectSuffix($mockResult);\n\n $this->assertEquals('report', $result);\n }\n\n public function testGetMailSubjectSuffixPodcast(): void\n {\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getMediaType')->willReturn(AutomatedReportsService::MEDIA_TYPE_PODCAST);\n\n $result = $this->service->getMailSubjectSuffix($mockResult);\n\n $this->assertEquals('podcast', $result);\n }\n\n public function testGetMailSubjectSuffixUnknown(): void\n {\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getMediaType')->willReturn('unknown_type');\n\n $result = $this->service->getMailSubjectSuffix($mockResult);\n\n $this->assertEquals('', $result);\n }\n\n public function testGetMediaTypeMetadataPdf(): void\n {\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getMediaType')->willReturn(AutomatedReportsService::MEDIA_TYPE_PDF);\n\n $result = $this->service->getMediaTypeMetadata($mockResult);\n\n $this->assertEquals('pdf', $result['extension']);\n $this->assertEquals('application/pdf', $result['mime']);\n }\n\n public function testGetMediaTypeMetadataPodcast(): void\n {\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getMediaType')->willReturn(AutomatedReportsService::MEDIA_TYPE_PODCAST);\n\n $result = $this->service->getMediaTypeMetadata($mockResult);\n\n $this->assertEquals('mp3', $result['extension']);\n $this->assertEquals('audio/mpeg', $result['mime']);\n }\n\n public function testGetMediaTypeMetadataUnknown(): void\n {\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getMediaType')->willReturn('unknown');\n\n $result = $this->service->getMediaTypeMetadata($mockResult);\n\n $this->assertNull($result['extension']);\n $this->assertNull($result['mime']);\n }\n\n public function testGetTeamIdsWithReportsResults(): void\n {\n $expected = new Collection([1, 2, 3]);\n\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n $mockRepo->expects($this->once())\n ->method('getTeamIdsWithReportsResults')\n ->with(5)\n ->willReturn($expected);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $result = $service->getTeamIdsWithReportsResults(5);\n\n $this->assertSame($expected, $result);\n }\n\n public function testGetTeamReports(): void\n {\n $mockTeam = $this->createMock(Team::class);\n $expected = new \\Illuminate\\Database\\Eloquent\\Collection();\n\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n $mockRepo->expects($this->once())\n ->method('getReportsByTeam')\n ->with($mockTeam)\n ->willReturn($expected);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $result = $service->getTeamReports($mockTeam);\n\n $this->assertSame($expected, $result);\n }\n\n public function testGetReportResults(): void\n {\n $mockReport = $this->createMock(AutomatedReport::class);\n $expected = new \\Illuminate\\Database\\Eloquent\\Collection();\n\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n $mockRepo->expects($this->once())\n ->method('getResultsByReport')\n ->with($mockReport)\n ->willReturn($expected);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $result = $service->getReportResults($mockReport);\n\n $this->assertSame($expected, $result);\n }\n\n public function testDeleteReportsResultsInRetentionPeriodNoReports(): void\n {\n $mockTeam = $this->createMock(Team::class);\n $retentionDate = \\Carbon\\CarbonImmutable::parse('2025-01-01');\n\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n $mockRepo->expects($this->once())\n ->method('getReportIdsByTeam')\n ->willReturn(new Collection([]));\n $mockRepo->expects($this->never())\n ->method('getReportResultsQueryForRetention');\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $result = $service->deleteReportsResultsInRetentionPeriod($mockTeam, $retentionDate);\n\n $this->assertEquals(0, $result);\n }\n\n public function testDeleteReportsResultsInRetentionPeriodWithNoQueryResults(): void\n {\n $mockTeam = $this->createMock(Team::class);\n $mockTeam->method('getId')->willReturn(1);\n $retentionDate = \\Carbon\\CarbonImmutable::parse('2025-01-01');\n\n $mockQuery = Mockery::mock(Builder::class);\n $mockQuery->shouldReceive('exists')->andReturn(false);\n\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n $mockRepo->method('getReportIdsByTeam')->willReturn(new Collection([1, 2]));\n $mockRepo->method('getReportResultsQueryForRetention')->willReturn($mockQuery);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n Log::shouldReceive('info')->zeroOrMoreTimes();\n\n $result = $service->deleteReportsResultsInRetentionPeriod($mockTeam, $retentionDate);\n\n $this->assertEquals(0, $result);\n }\n\n public function testUpdateAskJiminnyReportStatusNotAskJiminny(): void\n {\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('isAskJiminnyReport')->willReturn(false);\n\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $mockUser = $this->createMock(User::class);\n\n $this->expectException(InvalidArgumentException::class);\n $this->expectExceptionMessage('Report is not an Ask Jiminny report');\n\n $service->updateAskJiminnyReport($mockReport, [], $mockUser);\n }\n\n public function testGetAskJiminnyReportFilters(): void\n {\n $mockUser = $this->createMock(User::class);\n\n $mockSearch = $this->createMock(Search::class);\n $mockSearch->method('getUuid')->willReturn('search-uuid-1');\n $mockSearch->method('getName')->willReturn('My Search');\n\n $mockSearchRepository = $this->createMock(SearchRepository::class);\n $mockSearchRepository->expects($this->once())\n ->method('findByUserOrderedByName')\n ->with($mockUser)\n ->willReturn(new Collection([$mockSearch]));\n\n $mockPromptDto = new AskAnythingPromptDto(\n id: 'prompt-uuid-1',\n title: 'My Prompt',\n content: 'Prompt text',\n target: AskAnythingPromptTarget::on_demand,\n );\n\n $mockPromptService = $this->createMock(AskAnythingPromptService::class);\n $mockPromptService->expects($this->once())\n ->method('get')\n ->with($mockUser, AskAnythingPromptTarget::on_demand)\n ->willReturn([$mockPromptDto]);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $mockPromptService,\n $mockSearchRepository,\n $this->createMock(AskAnythingRepository::class),\n );\n\n $result = $service->getAskJiminnyReportFilters($mockUser);\n\n $this->assertCount(2, $result);\n $promptFilter = collect($result)->firstWhere('id', 'prompt');\n $searchFilter = collect($result)->firstWhere('id', 'saved_search');\n\n $this->assertCount(1, $promptFilter['options']);\n $this->assertEquals('prompt-uuid-1', $promptFilter['options'][0]['id']);\n $this->assertCount(1, $searchFilter['options']);\n $this->assertEquals('search-uuid-1', $searchFilter['options'][0]['id']);\n }\n\n public function testGetAskJiminnyReportFormDataWithoutReport(): void\n {\n $timezone = new \\DateTimeZone('UTC');\n\n $mockUser = $this->createMock(User::class);\n $mockUser->method('getTimezone')->willReturn($timezone);\n\n $mockTeam = $this->createMock(Team::class);\n $mockUser->method('getTeam')->willReturn($mockTeam);\n\n $mockSearchRepository = $this->createMock(SearchRepository::class);\n $mockSearchRepository->method('findByUserOrderedByName')->willReturn(new Collection([]));\n\n $mockPromptService = $this->createMock(AskAnythingPromptService::class);\n $mockPromptService->method('get')->willReturn([]);\n\n $mockGroupRepository = $this->createMock(GroupRepository::class);\n $mockGroupRepository->method('getAllByTeam')->willReturn(new \\Illuminate\\Database\\Eloquent\\Collection([]));\n\n $mockRecipientsService = $this->createMock(RecipientsService::class);\n $mockRecipientsService->method('getRecipientsFieldData')->willReturn(['options' => []]);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $mockGroupRepository,\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $mockRecipientsService,\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $mockPromptService,\n $mockSearchRepository,\n $this->createMock(AskAnythingRepository::class),\n );\n\n $result = $service->getAskJiminnyReportFormData($mockUser);\n\n $this->assertArrayHasKey('fields', $result);\n $this->assertIsArray($result['fields']);\n\n $fieldIds = array_column($result['fields'], 'id');\n $this->assertContains('enabled', $fieldIds);\n $this->assertContains('report_name', $fieldIds);\n $this->assertContains('frequency', $fieldIds);\n $this->assertContains('expires_on', $fieldIds);\n $this->assertContains('saved_search', $fieldIds);\n $this->assertContains('ask_jiminny_prompt', $fieldIds);\n }\n\n public function testGetAskJiminnyReportFormDataWithReport(): void\n {\n $timezone = new \\DateTimeZone('UTC');\n\n $mockUser = $this->createMock(User::class);\n $mockUser->method('getTimezone')->willReturn($timezone);\n\n $mockTeam = $this->createMock(Team::class);\n $mockUser->method('getTeam')->willReturn($mockTeam);\n\n $mockSavedSearch = $this->createMock(Search::class);\n $mockSavedSearch->method('getUuid')->willReturn('search-uuid');\n $mockSavedSearch->method('getName')->willReturn('My Search');\n\n $mockPromptModel = $this->createMock(AskAnythingPrompt::class);\n $mockPromptModel->method('getUuid')->willReturn('prompt-uuid');\n $mockPromptModel->method('getTitle')->willReturn('My Prompt');\n\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getStatus')->willReturn(true);\n $mockReport->method('getCustomName')->willReturn('Test Report');\n $mockReport->method('getFrequency')->willReturn('daily');\n $mockReport->method('getExpiresAt')->willReturn(IlluminateCarbon::parse('2025-12-31'));\n $mockReport->method('getGroups')->willReturn([]);\n $mockReport->method('getRecipients')->willReturn(['users' => []]);\n $mockReport->method('getAttribute')->with('created_by')->willReturn(1);\n $mockReport->method('getSavedSearch')->willReturn($mockSavedSearch);\n $mockReport->method('getAskAnythingPrompt')->willReturn($mockPromptModel);\n\n $mockSearchRepository = $this->createMock(SearchRepository::class);\n $mockSearchRepository->method('findByUserOrderedByName')->willReturn(new Collection([]));\n\n $mockPromptService = $this->createMock(AskAnythingPromptService::class);\n $mockPromptService->method('get')->willReturn([]);\n\n $mockGroupRepository = $this->createMock(GroupRepository::class);\n $mockGroupRepository->method('getAllByTeam')->willReturn(new \\Illuminate\\Database\\Eloquent\\Collection([]));\n\n $mockRecipientsService = $this->createMock(RecipientsService::class);\n $mockRecipientsService->method('getRecipientsFieldData')->willReturn(['options' => []]);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $mockGroupRepository,\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $mockRecipientsService,\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $mockPromptService,\n $mockSearchRepository,\n $this->createMock(AskAnythingRepository::class),\n );\n\n $result = $service->getAskJiminnyReportFormData($mockUser, $mockReport);\n\n $fields = collect($result['fields'])->keyBy('id');\n\n $this->assertTrue($fields['enabled']['value']);\n $this->assertEquals('Test Report', $fields['report_name']['value']);\n }\n\n public function testValidateAskJiminnyReportDataMissingName(): void\n {\n $mockUser = $this->createMock(User::class);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $this->expectException(InvalidArgumentException::class);\n $this->expectExceptionMessage('Report name is required');\n\n $service->createAskJiminnyReport(['report_name' => ''], $mockUser);\n }\n\n public function testValidateAskJiminnyReportDataNameTooLong(): void\n {\n $mockUser = $this->createMock(User::class);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $this->expectException(InvalidArgumentException::class);\n $this->expectExceptionMessage('Report name must be 50 characters or less');\n\n $service->createAskJiminnyReport(['report_name' => str_repeat('a', 51)], $mockUser);\n }\n\n public function testValidateAskJiminnyReportDataInvalidFrequency(): void\n {\n $mockUser = $this->createMock(User::class);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $this->expectException(InvalidArgumentException::class);\n $this->expectExceptionMessage('Frequency must be daily, weekly, or monthly');\n\n $service->createAskJiminnyReport(['report_name' => 'Valid Name', 'frequency' => 'quarterly'], $mockUser);\n }\n\n public function testValidateAskJiminnyReportDataMissingExpiresOn(): void\n {\n $mockUser = $this->createMock(User::class);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $this->expectException(InvalidArgumentException::class);\n $this->expectExceptionMessage('Expiration date is required');\n\n $service->createAskJiminnyReport(\n ['report_name' => 'Valid Name', 'frequency' => 'daily'],\n $mockUser\n );\n }\n\n public function testValidateAskJiminnyReportDataExpiresInPast(): void\n {\n $mockUser = $this->createMock(User::class);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $this->expectException(InvalidArgumentException::class);\n $this->expectExceptionMessage('Expiration date cannot be in the past');\n\n $service->createAskJiminnyReport(\n ['report_name' => 'Valid Name', 'frequency' => 'daily', 'expires_on' => '2020-01-01'],\n $mockUser\n );\n }\n\n public function testValidateAskJiminnyReportDataExpiresTooFar(): void\n {\n $mockUser = $this->createMock(User::class);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $this->expectException(InvalidArgumentException::class);\n $this->expectExceptionMessage('Expiration date cannot be more than 1 year from now');\n\n $service->createAskJiminnyReport(\n ['report_name' => 'Valid Name', 'frequency' => 'daily', 'expires_on' => '2099-01-01'],\n $mockUser\n );\n }\n\n public function testValidateAskJiminnyReportDataExpiresExactlyOneYearLaterTimeOfDayIsAccepted(): void\n {\n Carbon::setTestNow(Carbon::parse('2026-04-20 09:00:00'));\n\n try {\n $mockUser = $this->createMock(User::class);\n $mockUser->method('getId')->willReturn(1);\n $mockUser->method('getTeamId')->willReturn(1);\n\n $savedSearch = $this->createMock(Search::class);\n $savedSearch->method('getId')->willReturn(10);\n\n $prompt = $this->createMock(AskAnythingPrompt::class);\n $prompt->method('getId')->willReturn(5);\n\n $activitySearchRepository = $this->createMock(SearchRepository::class);\n $activitySearchRepository->method('findByUuidAndUser')->willReturn($savedSearch);\n\n $askAnythingRepository = $this->createMock(AskAnythingRepository::class);\n $askAnythingRepository->method('getPromptByUuid')->willReturn($prompt);\n\n $automatedReportsRepository = $this->createMock(AutomatedReportsRepository::class);\n $automatedReportsRepository->method('create')->willReturn($this->createMock(AutomatedReport::class));\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $automatedReportsRepository,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $activitySearchRepository,\n $askAnythingRepository,\n );\n\n $service->createAskJiminnyReport([\n 'report_name' => 'Valid Name',\n 'frequency' => 'daily',\n 'expires_on' => '2027-04-20T23:00:00',\n 'saved_search' => 'some-uuid',\n 'ask_jiminny_prompt' => 'prompt-uuid',\n ], $mockUser);\n\n $this->assertTrue(true);\n } finally {\n Carbon::setTestNow();\n }\n }\n\n public function testValidateAskJiminnyReportDataMissingSavedSearch(): void\n {\n $mockUser = $this->createMock(User::class);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $this->expectException(InvalidArgumentException::class);\n $this->expectExceptionMessage('Saved search is required');\n\n $service->createAskJiminnyReport(\n ['report_name' => 'Valid Name', 'frequency' => 'daily', 'expires_on' => now()->addMonth()->toDateString()],\n $mockUser\n );\n }\n\n public function testValidateAskJiminnyReportDataSavedSearchNotFound(): void\n {\n $mockUser = $this->createMock(User::class);\n\n $mockSearchRepository = $this->createMock(SearchRepository::class);\n $mockSearchRepository->method('findByUuidAndUser')->willReturn(null);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $mockSearchRepository,\n $this->createMock(AskAnythingRepository::class),\n );\n\n $this->expectException(InvalidArgumentException::class);\n $this->expectExceptionMessage('Saved search not found or does not belong to you');\n\n $service->createAskJiminnyReport(\n [\n 'report_name' => 'Valid Name',\n 'frequency' => 'daily',\n 'expires_on' => now()->addMonth()->toDateString(),\n 'saved_search' => 'non-existent-uuid',\n ],\n $mockUser\n );\n }\n\n public function testValidateAskJiminnyReportDataMissingPrompt(): void\n {\n $mockUser = $this->createMock(User::class);\n\n $mockSearch = $this->createMock(Search::class);\n $mockSearchRepository = $this->createMock(SearchRepository::class);\n $mockSearchRepository->method('findByUuidAndUser')->willReturn($mockSearch);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $mockSearchRepository,\n $this->createMock(AskAnythingRepository::class),\n );\n\n $this->expectException(InvalidArgumentException::class);\n $this->expectExceptionMessage('Ask Jiminny prompt is required');\n\n $service->createAskJiminnyReport(\n [\n 'report_name' => 'Valid Name',\n 'frequency' => 'daily',\n 'expires_on' => now()->addMonth()->toDateString(),\n 'saved_search' => 'search-uuid',\n ],\n $mockUser\n );\n }\n\n public function testValidateAskJiminnyReportDataPromptNotFound(): void\n {\n $mockUser = $this->createMock(User::class);\n\n $mockSearch = $this->createMock(Search::class);\n $mockSearchRepository = $this->createMock(SearchRepository::class);\n $mockSearchRepository->method('findByUuidAndUser')->willReturn($mockSearch);\n\n $mockAskAnythingRepository = $this->createMock(AskAnythingRepository::class);\n $mockAskAnythingRepository->method('getPromptByUuid')->willReturn(null);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $mockSearchRepository,\n $mockAskAnythingRepository,\n );\n\n $this->expectException(InvalidArgumentException::class);\n $this->expectExceptionMessage('Ask Jiminny prompt not found');\n\n $service->createAskJiminnyReport(\n [\n 'report_name' => 'Valid Name',\n 'frequency' => 'daily',\n 'expires_on' => now()->addMonth()->toDateString(),\n 'saved_search' => 'search-uuid',\n 'ask_jiminny_prompt' => 'non-existent-prompt-uuid',\n ],\n $mockUser\n );\n }\n\n public function testTransformRecipientsWithNullUsers(): void\n {\n $reflection = new \\ReflectionClass(AutomatedReportsService::class);\n $method = $reflection->getMethod('transformRecipients');\n $method->setAccessible(true);\n\n $result = $method->invoke($this->service, []);\n\n $this->assertEquals([], $result);\n }\n\n public function testTransformRecipientsWithUsersKey(): void\n {\n $mockUser = $this->createMock(User::class);\n $mockUser->method('getUuid')->willReturn('user-uuid-1');\n $mockUser->method('getName')->willReturn('User One');\n $mockUser->method('getEmailAddress')->willReturn('user1@test.com');\n $mockUser->method('getPhotoUrl')->willReturn(null);\n\n $mockUserRepository = $this->createMock(UserRepository::class);\n $mockUserRepository->method('find')->willReturn($mockUser);\n\n $service = $this->getService(mockUserRepository: $mockUserRepository);\n\n $reflection = new \\ReflectionClass(AutomatedReportsService::class);\n $method = $reflection->getMethod('transformRecipients');\n $method->setAccessible(true);\n\n $result = $method->invoke($service, ['users' => [1]]);\n\n $this->assertCount(1, $result);\n $this->assertEquals('user-uuid-1', $result[0]['id']);\n }\n\n public function testGetTeamsGroupsOptions(): void\n {\n $mockTeamRepository = $this->createMock(TeamRepository::class);\n\n $mockTeam = $this->createMock(Team::class);\n $mockTeam->method('getUuid')->willReturn('team-uuid-1');\n $mockTeam->method('getName')->willReturn('Sales Team');\n $mockTeam->method('hasFeature')\n ->with(FeatureEnum::AUTOMATED_REPORTS)\n ->willReturn(true);\n\n $mockGroupsRelation = $this->createMock(HasMany::class);\n $mockGroupsRelation->method('get')->willReturn(new \\Illuminate\\Database\\Eloquent\\Collection([]));\n $mockTeam->method('groups')->willReturn($mockGroupsRelation);\n\n $mockTeamRepository->method('getTeamsForKiosk')->willReturn(new Collection([$mockTeam]));\n $mockTeamRepository->method('idOrUuid')->willReturn($mockTeam);\n\n $service = $this->getService(mockTeamRepository: $mockTeamRepository);\n\n $result = $service->getTeamsGroupsOptions();\n\n $this->assertCount(1, $result);\n $this->assertEquals('Sales Team', $result[0]['label']);\n $this->assertArrayHasKey('groups', $result[0]);\n }\n\n public function testGetTeamsGroupsOptionsWithFilter(): void\n {\n $mockTeamRepository = $this->createMock(TeamRepository::class);\n\n $mockTeam1 = $this->createMock(Team::class);\n $mockTeam1->method('getUuid')->willReturn('team-uuid-1');\n $mockTeam1->method('getName')->willReturn('Sales Team');\n $mockTeam1->method('hasFeature')->willReturn(true);\n\n $mockTeam2 = $this->createMock(Team::class);\n $mockTeam2->method('getUuid')->willReturn('team-uuid-2');\n $mockTeam2->method('getName')->willReturn('Marketing Team');\n $mockTeam2->method('hasFeature')->willReturn(true);\n\n $mockTeamRepository->method('getTeamsForKiosk')\n ->willReturn(new Collection([$mockTeam1, $mockTeam2]));\n\n $mockGroupsRelation = $this->createMock(HasMany::class);\n $mockGroupsRelation->method('get')->willReturn(new \\Illuminate\\Database\\Eloquent\\Collection([]));\n $mockTeam1->method('groups')->willReturn($mockGroupsRelation);\n\n $mockTeamRepository->method('idOrUuid')->willReturn($mockTeam1);\n\n $service = $this->getService(mockTeamRepository: $mockTeamRepository);\n\n $result = $service->getTeamsGroupsOptions(['team-uuid-1']);\n\n $this->assertCount(1, $result);\n $this->assertEquals('Sales Team', $result[0]['label']);\n }\n\n public function testGetReturnsTransformedReport(): void\n {\n $mockTeam = $this->createMock(Team::class);\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getType')->willReturn('exec_summary');\n $mockReport->method('getUuid')->willReturn('report-uuid');\n $mockReport->method('getFrequency')->willReturn('weekly');\n $mockReport->method('getTeam')->willReturn($mockTeam);\n $mockReport->method('getStatus')->willReturn(true);\n $mockReport->method('getFrom')->willReturn(null);\n $mockReport->method('getTo')->willReturn(null);\n $mockReport->method('getDealValueMin')->willReturn(null);\n $mockReport->method('getDealValueMax')->willReturn(null);\n $mockReport->method('getCallTypes')->willReturn([]);\n $mockReport->method('getMediaTypes')->willReturn([]);\n $mockReport->method('getCallDurationMin')->willReturn(null);\n $mockReport->method('getCallDurationMax')->willReturn(null);\n $mockReport->method('getGroups')->willReturn([]);\n $mockReport->method('getDealAtCallStages')->willReturn([]);\n $mockReport->method('getCurrentDealStages')->willReturn([]);\n $mockReport->method('getRecipients')->willReturn([]);\n $mockReport->method('getCreator')->willReturn(null);\n $mockReport->method('getAdditionalPromptInput')->willReturn(null);\n $mockReport->method('getCustomName')->willReturn('My Report');\n $mockReport->method('getCreatedAt')->willReturn(IlluminateCarbon::parse('2025-01-01'));\n $mockReport->method('getUpdatedAt')->willReturn(IlluminateCarbon::parse('2025-01-01'));\n $mockReport->method('getDeletedAt')->willReturn(null);\n\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n $mockRepo->expects($this->once())\n ->method('findByUuid')\n ->with('report-uuid')\n ->willReturn($mockReport);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $result = $service->get('report-uuid');\n\n $this->assertIsArray($result);\n $this->assertEquals('report-uuid', $result['id']);\n }\n\n public function testGetThrowsWhenReportNotFound(): void\n {\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n $mockRepo->method('findByUuid')->willReturn(null);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $this->expectException(ModelNotFoundException::class);\n\n $service->get('missing-uuid');\n }\n\n public function testListReturnsData(): void\n {\n $mockTeam = $this->createMock(Team::class);\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getType')->willReturn('exec_summary');\n $mockReport->method('getUuid')->willReturn('report-uuid');\n $mockReport->method('getFrequency')->willReturn('weekly');\n $mockReport->method('getTeam')->willReturn($mockTeam);\n $mockReport->method('getStatus')->willReturn(true);\n $mockReport->method('getFrom')->willReturn(null);\n $mockReport->method('getTo')->willReturn(null);\n $mockReport->method('getDealValueMin')->willReturn(null);\n $mockReport->method('getDealValueMax')->willReturn(null);\n $mockReport->method('getCallTypes')->willReturn([]);\n $mockReport->method('getMediaTypes')->willReturn([]);\n $mockReport->method('getCallDurationMin')->willReturn(null);\n $mockReport->method('getCallDurationMax')->willReturn(null);\n $mockReport->method('getGroups')->willReturn([]);\n $mockReport->method('getDealAtCallStages')->willReturn([]);\n $mockReport->method('getCurrentDealStages')->willReturn([]);\n $mockReport->method('getRecipients')->willReturn([]);\n $mockReport->method('getCreator')->willReturn(null);\n $mockReport->method('getAdditionalPromptInput')->willReturn(null);\n $mockReport->method('getCustomName')->willReturn('My Report');\n $mockReport->method('getCreatedAt')->willReturn(IlluminateCarbon::parse('2025-01-01'));\n $mockReport->method('getUpdatedAt')->willReturn(IlluminateCarbon::parse('2025-01-01'));\n $mockReport->method('getDeletedAt')->willReturn(null);\n\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n $mockRepo->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn(new \\Illuminate\\Database\\Eloquent\\Collection([$mockReport]));\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $result = $service->list();\n\n $this->assertArrayHasKey('data', $result);\n $this->assertCount(1, $result['data']);\n }\n\n public function testListAskJiminnyReportsReturnsData(): void\n {\n $mockUser = $this->createMock(User::class);\n $mockTeam = $this->createMock(Team::class);\n\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getType')->willReturn('ask_jiminny');\n $mockReport->method('getUuid')->willReturn('report-uuid');\n $mockReport->method('getFrequency')->willReturn('daily');\n $mockReport->method('getTeam')->willReturn($mockTeam);\n $mockReport->method('getStatus')->willReturn(true);\n $mockReport->method('getGroups')->willReturn([]);\n $mockReport->method('getRecipients')->willReturn([]);\n $mockReport->method('getCustomName')->willReturn('AJ Report');\n $mockReport->method('getExpiresAt')->willReturn(null);\n $mockReport->method('getSavedSearch')->willReturn(null);\n $mockReport->method('getAskAnythingPrompt')->willReturn(null);\n $mockReport->method('getAttribute')->with('created_by')->willReturn(null);\n\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n $mockRepo->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($mockUser, 'created_at', 'desc')\n ->willReturn(new \\Illuminate\\Database\\Eloquent\\Collection([$mockReport]));\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $result = $service->listAskJiminnyReports($mockUser);\n\n $this->assertArrayHasKey('data', $result);\n $this->assertCount(1, $result['data']);\n }\n\n public function testGetActivityTypesFieldDataDelegatesToService(): void\n {\n $mockTeam = $this->createMock(Team::class);\n $mockActivityTypeService = $this->createMock(ActivityTypeService::class);\n $mockActivityTypeService->expects($this->once())\n ->method('getActivityTypeFieldData')\n ->with(team: $mockTeam, value: ['a'], groupIds: ['g1'])\n ->willReturn(['id' => 'activity_types', 'options' => []]);\n\n $reflection = new \\ReflectionClass(AutomatedReportsService::class);\n $service = $reflection->newInstanceWithoutConstructor();\n $prop = $reflection->getProperty('activityTypeService');\n $prop->setAccessible(true);\n $prop->setValue($service, $mockActivityTypeService);\n\n $result = $service->getActivityTypesFieldData($mockTeam, ['a'], ['g1']);\n\n $this->assertEquals(['id' => 'activity_types', 'options' => []], $result);\n }\n\n public function testGetDealStageAtCallFieldDataDelegatesToService(): void\n {\n $mockTeam = $this->createMock(Team::class);\n $mockDealStagesService = $this->createMock(DealStagesService::class);\n $mockDealStagesService->expects($this->once())\n ->method('getDealStageAtCallFieldData')\n ->with(team: $mockTeam, value: [])\n ->willReturn(['id' => 'deal_stage_at_call']);\n\n $reflection = new \\ReflectionClass(AutomatedReportsService::class);\n $service = $reflection->newInstanceWithoutConstructor();\n $prop = $reflection->getProperty('dealStagesService');\n $prop->setAccessible(true);\n $prop->setValue($service, $mockDealStagesService);\n\n $result = $service->getDealStageAtCallFieldData($mockTeam);\n\n $this->assertEquals(['id' => 'deal_stage_at_call'], $result);\n }\n\n public function testGetCurrentDealStageFieldDataDelegatesToService(): void\n {\n $mockTeam = $this->createMock(Team::class);\n $mockDealStagesService = $this->createMock(DealStagesService::class);\n $mockDealStagesService->expects($this->once())\n ->method('getCurrentDealStageFieldData')\n ->with(team: $mockTeam, value: [])\n ->willReturn(['id' => 'current_deal_stage']);\n\n $reflection = new \\ReflectionClass(AutomatedReportsService::class);\n $service = $reflection->newInstanceWithoutConstructor();\n $prop = $reflection->getProperty('dealStagesService');\n $prop->setAccessible(true);\n $prop->setValue($service, $mockDealStagesService);\n\n $result = $service->getCurrentDealStageFieldData($mockTeam);\n\n $this->assertEquals(['id' => 'current_deal_stage'], $result);\n }\n\n public function testGetRecipientsFieldDataDelegatesToService(): void\n {\n $mockTeam = $this->createMock(Team::class);\n $mockRecipientsService = $this->createMock(RecipientsService::class);\n $mockRecipientsService->expects($this->once())\n ->method('getRecipientsFieldData')\n ->with(team: $mockTeam, value: [])\n ->willReturn(['id' => 'recipients']);\n\n $reflection = new \\ReflectionClass(AutomatedReportsService::class);\n $service = $reflection->newInstanceWithoutConstructor();\n $prop = $reflection->getProperty('recipientsService');\n $prop->setAccessible(true);\n $prop->setValue($service, $mockRecipientsService);\n\n $result = $service->getRecipientsFieldData($mockTeam);\n\n $this->assertEquals(['id' => 'recipients'], $result);\n }\n\n public function testGetJiminnyRecipientsFieldDataDelegatesToService(): void\n {\n $mockRecipientsService = $this->createMock(RecipientsService::class);\n $mockRecipientsService->expects($this->once())\n ->method('getJiminnyRecipientsFieldData')\n ->with(['user-1'])\n ->willReturn(['id' => 'jiminny_recipients']);\n\n $reflection = new \\ReflectionClass(AutomatedReportsService::class);\n $service = $reflection->newInstanceWithoutConstructor();\n $prop = $reflection->getProperty('recipientsService');\n $prop->setAccessible(true);\n $prop->setValue($service, $mockRecipientsService);\n\n $result = $service->getJiminnyRecipientsFieldData(['user-1']);\n\n $this->assertEquals(['id' => 'jiminny_recipients'], $result);\n }\n\n public function testCreateReportResultDelegatesToRepository(): void\n {\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getId')->willReturn(42);\n\n $mockResult = $this->createMock(AutomatedReportResult::class);\n\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n $mockRepo->expects($this->once())\n ->method('createResult')\n ->willReturn($mockResult);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $result = $service->createReportResult($mockReport);\n\n $this->assertSame($mockResult, $result);\n }\n\n public function testDeleteReportResultDeletesS3AndModel(): void\n {\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getReport')->willReturn($this->createMock(AutomatedReport::class));\n $mockResult->method('getMediaType')->willReturn(AutomatedReportsService::MEDIA_TYPE_PDF);\n $mockResult->expects($this->once())->method('delete');\n\n $reflection = new \\ReflectionClass(AutomatedReportsService::class);\n $service = $reflection->newInstanceWithoutConstructor();\n\n foreach ([\n 'teamRepository' => TeamRepository::class,\n 'groupRepository' => GroupRepository::class,\n 'userRepository' => UserRepository::class,\n 'stageRepository' => StageRepository::class,\n 'dealStagesService' => DealStagesService::class,\n 'recipientsService' => RecipientsService::class,\n 'automatedReportsRepository' => AutomatedReportsRepository::class,\n 'webhookService' => Webhook::class,\n 'dispatcher' => Dispatcher::class,\n 'activityTypeService' => ActivityTypeService::class,\n 'playbookCategoryRepository' => PlaybookCategoryRepository::class,\n 'askAnythingPromptService' => AskAnythingPromptService::class,\n 'activitySearchRepository' => SearchRepository::class,\n 'askAnythingRepository' => AskAnythingRepository::class,\n ] as $propName => $class) {\n $prop = $reflection->getProperty($propName);\n $prop->setAccessible(true);\n $prop->setValue($service, $this->createMock($class));\n }\n\n Storage::shouldReceive('exists')->andReturn(false);\n Log::shouldReceive('info')->zeroOrMoreTimes();\n\n $service->deleteReportResult($mockResult);\n }\n\n public function testDeleteAllReportResultsIteratesAndDeletes(): void\n {\n $mockResult1 = $this->createMock(AutomatedReportResult::class);\n $mockResult1->method('getId')->willReturn(1);\n $mockResult1->method('getReport')->willReturn($this->createMock(AutomatedReport::class));\n $mockResult1->method('getMediaType')->willReturn(AutomatedReportsService::MEDIA_TYPE_PDF);\n $mockResult1->expects($this->once())->method('delete');\n\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getId')->willReturn(10);\n\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n $mockRepo->expects($this->once())\n ->method('getResultsByReport')\n ->with($mockReport)\n ->willReturn(new \\Illuminate\\Database\\Eloquent\\Collection([$mockResult1]));\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n Storage::shouldReceive('exists')->andReturn(false);\n Log::shouldReceive('info')->zeroOrMoreTimes();\n\n $service->deleteAllReportResults($mockReport);\n }\n\n public function testDeleteAllDataDeletesReportsAndResults(): void\n {\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getId')->willReturn(1);\n $mockResult->method('getReport')->willReturn($this->createMock(AutomatedReport::class));\n $mockResult->method('getMediaType')->willReturn(AutomatedReportsService::MEDIA_TYPE_PDF);\n $mockResult->expects($this->once())->method('delete');\n\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getId')->willReturn(10);\n $mockReport->expects($this->once())->method('delete');\n\n $mockTeam = $this->createMock(Team::class);\n $mockTeam->method('getId')->willReturn(1);\n\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n $mockRepo->expects($this->once())\n ->method('getReportsByTeam')\n ->with($mockTeam)\n ->willReturn(new \\Illuminate\\Database\\Eloquent\\Collection([$mockReport]));\n $mockRepo->expects($this->once())\n ->method('getResultsByReport')\n ->with($mockReport)\n ->willReturn(new \\Illuminate\\Database\\Eloquent\\Collection([$mockResult]));\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n Storage::shouldReceive('exists')->andReturn(false);\n Log::shouldReceive('info')->zeroOrMoreTimes();\n\n $service->deleteAllData($mockTeam);\n }\n\n public function testDeleteReportResultsThrowsWhenReportNotFound(): void\n {\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n $mockRepo->method('findByUuid')->willReturn(null);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $this->expectException(ModelNotFoundException::class);\n\n $service->deleteReportResults('missing-uuid');\n }\n\n public function testGetValidRecipientUsersAskJiminnyIncludesCreator(): void\n {\n $tz = $this->createMock(\\DateTimeZone::class);\n $tz->method('getName')->willReturn('UTC');\n\n $creator = $this->createMock(User::class);\n $creator->method('getEmailAddress')->willReturn('creator@test.com');\n $creator->method('getName')->willReturn('Creator');\n $creator->method('getTimezone')->willReturn($tz);\n\n $mockUserRepository = $this->createMock(UserRepository::class);\n $mockUserRepository->method('find')->willReturn($creator);\n\n $mockGroupRepository = $this->createMock(GroupRepository::class);\n $mockGroupRepository->method('find')->willReturn(null);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $mockGroupRepository,\n $mockUserRepository,\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $report = $this->createMock(AutomatedReport::class);\n $report->method('isAskJiminnyReport')->willReturn(true);\n $report->method('getCreator')->willReturn($creator);\n $report->method('getRecipients')->willReturn(['users' => []]);\n $report->method('getGroups')->willReturn([]);\n\n $result = $service->getValidRecipientUsers($report);\n\n $this->assertCount(1, $result);\n $this->assertEquals('creator@test.com', $result[0]['email']);\n }\n\n public function testGetValidRecipientUsersAskJiminnyDeduplicatesCreatorAndExplicitRecipient(): void\n {\n $tz = $this->createMock(\\DateTimeZone::class);\n $tz->method('getName')->willReturn('UTC');\n\n $creator = $this->createMock(User::class);\n $creator->method('getEmailAddress')->willReturn('shared@test.com');\n $creator->method('getName')->willReturn('Creator');\n $creator->method('getTimezone')->willReturn($tz);\n\n $mockUserRepository = $this->createMock(UserRepository::class);\n $mockUserRepository->method('find')->willReturn($creator);\n\n $mockGroupRepository = $this->createMock(GroupRepository::class);\n $mockGroupRepository->method('find')->willReturn(null);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $mockGroupRepository,\n $mockUserRepository,\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $report = $this->createMock(AutomatedReport::class);\n $report->method('isAskJiminnyReport')->willReturn(true);\n $report->method('getCreator')->willReturn($creator);\n $report->method('getRecipients')->willReturn(['users' => [1]]);\n $report->method('getGroups')->willReturn([]);\n\n $result = $service->getValidRecipientUsers($report);\n\n $this->assertCount(1, $result);\n $this->assertEquals('shared@test.com', $result[0]['email']);\n }\n\n public function testGetValidRecipientUsersAskJiminnyIncludesGroupMembers(): void\n {\n $tz = $this->createMock(\\DateTimeZone::class);\n $tz->method('getName')->willReturn('UTC');\n\n $creator = $this->createMock(User::class);\n $creator->method('getEmailAddress')->willReturn('creator@test.com');\n $creator->method('getName')->willReturn('Creator');\n $creator->method('getTimezone')->willReturn($tz);\n\n $member = $this->createMock(User::class);\n $member->method('getEmailAddress')->willReturn('member@test.com');\n $member->method('getName')->willReturn('Member');\n $member->method('getTimezone')->willReturn($tz);\n\n $mockUserRepository = $this->createMock(UserRepository::class);\n $mockUserRepository->method('find')->willReturn($creator);\n\n $mockGroup = $this->createMock(Group::class);\n $mockGroup->method('getMembers')->willReturn(new \\Illuminate\\Database\\Eloquent\\Collection([$member]));\n\n $mockGroupRepository = $this->createMock(GroupRepository::class);\n $mockGroupRepository->method('find')->willReturn($mockGroup);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $mockGroupRepository,\n $mockUserRepository,\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $report = $this->createMock(AutomatedReport::class);\n $report->method('isAskJiminnyReport')->willReturn(true);\n $report->method('getCreator')->willReturn($creator);\n $report->method('getRecipients')->willReturn(['users' => []]);\n $report->method('getGroups')->willReturn([10]);\n\n $result = $service->getValidRecipientUsers($report);\n\n $this->assertCount(2, $result);\n $emails = array_column($result, 'email');\n $this->assertContains('creator@test.com', $emails);\n $this->assertContains('member@test.com', $emails);\n }\n\n public function testGetValidRecipientUsersAskJiminnyNullCreatorSkipped(): void\n {\n $tz = $this->createMock(\\DateTimeZone::class);\n $tz->method('getName')->willReturn('UTC');\n\n $shareUser = $this->createMock(User::class);\n $shareUser->method('getEmailAddress')->willReturn('shared@test.com');\n $shareUser->method('getName')->willReturn('Shared');\n $shareUser->method('getTimezone')->willReturn($tz);\n\n $mockUserRepository = $this->createMock(UserRepository::class);\n $mockUserRepository->method('find')->willReturnMap([\n [1, null],\n [2, $shareUser],\n ]);\n\n $mockGroupRepository = $this->createMock(GroupRepository::class);\n $mockGroupRepository->method('find')->willReturn(null);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $mockGroupRepository,\n $mockUserRepository,\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $report = $this->createMock(AutomatedReport::class);\n $report->method('isAskJiminnyReport')->willReturn(true);\n $report->method('getCreator')->willReturn(null);\n $report->method('getRecipients')->willReturn(['users' => [2]]);\n $report->method('getGroups')->willReturn([]);\n\n $result = $service->getValidRecipientUsers($report);\n\n $this->assertCount(1, $result);\n $this->assertEquals('shared@test.com', $result[0]['email']);\n }\n\n public function testGetValidRecipientUsersStandardReportDoesNotIncludeCreator(): void\n {\n $tz = $this->createMock(\\DateTimeZone::class);\n $tz->method('getName')->willReturn('UTC');\n\n $user = $this->createMock(User::class);\n $user->method('getEmailAddress')->willReturn('user@test.com');\n $user->method('getName')->willReturn('User');\n $user->method('getTimezone')->willReturn($tz);\n\n $mockUserRepository = $this->createMock(UserRepository::class);\n $mockUserRepository->method('find')->willReturn($user);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $mockUserRepository,\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $report = $this->createMock(AutomatedReport::class);\n $report->method('isAskJiminnyReport')->willReturn(false);\n $report->method('getRecipients')->willReturn(['users' => [5]]);\n $report->method('getJiminnyRecipients')->willReturn(['users' => []]);\n $report->method('getGroups')->willReturn([]);\n\n $result = $service->getValidRecipientUsers($report);\n\n $this->assertCount(1, $result);\n $this->assertEquals('user@test.com', $result[0]['email']);\n }\n\n public function testGetReportPeriodNameAskJiminnyMonthlyFallback(): void\n {\n Carbon::setTestNow(Carbon::parse('2026-03-07 00:00:00'));\n\n $report = $this->createMock(AutomatedReport::class);\n $report->method('getFrequency')->willReturn('monthly');\n $report->method('isAskJiminnyReport')->willReturn(true);\n\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getReport')->willReturn($report);\n $mockResult->method('getFromDate')->willReturn(null);\n $mockResult->method('getToDate')->willReturn(null);\n\n $result = $this->service->getReportPeriodName($mockResult);\n\n $this->assertMatchesRegularExpression('/^[A-Z][a-z]+ \\d{4}$/', $result);\n $this->assertStringContainsString('2026', $result);\n\n Carbon::setTestNow();\n }\n\n public function testGetReportPeriodNameAskJiminnyWeeklyFallback(): void\n {\n Carbon::setTestNow(Carbon::parse('2026-04-07 00:00:00'));\n\n $report = $this->createMock(AutomatedReport::class);\n $report->method('getFrequency')->willReturn('weekly');\n $report->method('isAskJiminnyReport')->willReturn(true);\n\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getReport')->willReturn($report);\n $mockResult->method('getFromDate')->willReturn(null);\n $mockResult->method('getToDate')->willReturn(null);\n\n $result = $this->service->getReportPeriodName($mockResult);\n\n $this->assertStringContainsString(' - ', $result);\n $this->assertStringContainsString('2026', $result);\n\n Carbon::setTestNow();\n }\n\n public function testGetReportPeriodNameAskJiminnyDailyFallback(): void\n {\n Carbon::setTestNow(Carbon::parse('2026-04-07 00:00:00'));\n\n $report = $this->createMock(AutomatedReport::class);\n $report->method('getFrequency')->willReturn('daily');\n $report->method('isAskJiminnyReport')->willReturn(true);\n\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getReport')->willReturn($report);\n $mockResult->method('getFromDate')->willReturn(null);\n $mockResult->method('getToDate')->willReturn(null);\n\n $result = $this->service->getReportPeriodName($mockResult);\n\n $this->assertStringNotContainsString(' - ', $result);\n $this->assertStringContainsString('2026', $result);\n\n Carbon::setTestNow();\n }\n\n public function testGetReportPeriodNameAskJiminnyWithExplicitDates(): void\n {\n $report = $this->createMock(AutomatedReport::class);\n $report->method('getFrequency')->willReturn('monthly');\n $report->method('isAskJiminnyReport')->willReturn(true);\n\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getReport')->willReturn($report);\n $mockResult->method('getFromDate')->willReturn(IlluminateCarbon::parse('2026-02-07'));\n $mockResult->method('getToDate')->willReturn(IlluminateCarbon::parse('2026-03-07'));\n\n $result = $this->service->getReportPeriodName($mockResult);\n\n $this->assertEquals('Feb 2026', $result);\n }\n}","depth":4,"bounds":{"left":0.38231382,"top":0.3200319,"width":0.3600399,"height":0.6799681},"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Services\\Kiosk\\AutomatedReports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Support\\Carbon as IlluminateCarbon;\nuse Illuminate\\Contracts\\Bus\\Dispatcher;\nuse Illuminate\\Database\\Eloquent\\Builder;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Illuminate\\Support\\Facades\\Log;\nuse Illuminate\\Support\\Facades\\Storage;\nuse Jiminny\\Component\\AskAnything\\AskAnythingPromptService;\nuse Jiminny\\Component\\AskAnything\\Dtos\\AskAnythingPromptDto;\nuse Jiminny\\Component\\UrlGenerator\\Webhook;\nuse Jiminny\\Contracts\\Repositories\\PlaybookCategoryRepository;\nuse Jiminny\\Contracts\\Repositories\\TeamRepository;\nuse Jiminny\\Contracts\\Repositories\\UserRepository;\nuse Jiminny\\Exceptions\\InvalidArgumentException;\nuse Jiminny\\Exceptions\\ModelNotFoundException;\nuse Illuminate\\Support\\Collection;\nuse Jiminny\\Models\\AskAnything\\AskAnythingPrompt;\nuse Jiminny\\Models\\AskAnything\\AskAnythingPromptTarget;\nuse Jiminny\\Models\\Activity\\Search;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Feature\\FeatureEnum;\nuse Jiminny\\Models\\Group;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AskAnythingRepository;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Repositories\\GroupRepository;\nuse Jiminny\\Repositories\\SearchRepository;\nuse Jiminny\\Repositories\\StageRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\ActivityTypeService;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\DealStagesService;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\RecipientsService;\nuse Mockery;\nuse PHPUnit\\Framework\\Attributes\\DataProvider;\nuse Tests\\TestCase;\n\nclass AutomatedReportsServiceTest extends TestCase\n{\n private AutomatedReportsService $service;\n\n protected function setUp(): void\n {\n parent::setUp();\n\n // Create a real instance of the service without calling the constructor\n $reflection = new \\ReflectionClass(AutomatedReportsService::class);\n $this->service = $reflection->newInstanceWithoutConstructor();\n\n // Manually set the dependencies using reflection\n $dependencies = [\n 'teamRepository' => TeamRepository::class,\n 'groupRepository' => GroupRepository::class,\n 'userRepository' => UserRepository::class,\n 'stageRepository' => StageRepository::class,\n 'dealStagesService' => DealStagesService::class,\n 'recipientsService' => RecipientsService::class,\n 'automatedReportsRepository' => AutomatedReportsRepository::class,\n 'webhookService' => Webhook::class,\n 'dispatcher' => Dispatcher::class,\n 'activityTypeService' => ActivityTypeService::class,\n 'playbookCategoryRepository' => PlaybookCategoryRepository::class,\n 'askAnythingPromptService' => AskAnythingPromptService::class,\n 'activitySearchRepository' => SearchRepository::class,\n 'askAnythingRepository' => AskAnythingRepository::class,\n ];\n\n foreach ($dependencies as $propertyName => $class) {\n $property = $reflection->getProperty($propertyName);\n $property->setAccessible(true);\n $property->setValue($this->service, $this->createMock($class));\n }\n }\n\n protected function tearDown(): void\n {\n parent::tearDown();\n Mockery::close();\n }\n\n private function getService(\n $mockUserRepository = null,\n $mockStageRepository = null,\n $mockTeamRepository = null,\n ): AutomatedReportsService {\n return new AutomatedReportsService(\n ($mockTeamRepository ?? $this->createMock(TeamRepository::class)),\n $this->createMock(GroupRepository::class),\n ($mockUserRepository ?? $this->createMock(UserRepository::class)),\n ($mockStageRepository ?? $this->createMock(StageRepository::class)),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n }\n\n #[DataProvider('transformMediaTypesDataProvider')]\n public function testTransformMediaTypes(array $mediaTypes, array $expected): void\n {\n $report = new AutomatedReport(['media_types' => $mediaTypes]);\n\n $reflection = new \\ReflectionClass(AutomatedReportsService::class);\n $method = $reflection->getMethod('transformMediaTypes');\n\n $result = $method->invoke($this->service, $report);\n\n $this->assertEquals($expected, $result);\n }\n\n public function testGetMediaTypeFieldDataWithoutReport(): void\n {\n $result = $this->service->getMediaTypeFieldData(null);\n\n $this->assertIsArray($result);\n $this->assertArrayHasKey('value', $result);\n $this->assertEmpty($result['value']);\n $this->assertEquals('media_types', $result['id']);\n }\n\n public function testGetMediaTypeFieldDataWithReport(): void\n {\n $mediaTypes = ['pdf', 'podcast'];\n $report = new AutomatedReport(['media_types' => $mediaTypes]);\n\n $result = $this->service->getMediaTypeFieldData($report);\n\n $expectedValue = [\n ['id' => 'pdf', 'name' => 'PDF'],\n ['id' => 'podcast', 'name' => 'Podcast'],\n ];\n\n $this->assertIsArray($result);\n $this->assertArrayHasKey('value', $result);\n $this->assertEquals($expectedValue, $result['value']);\n }\n\n public static function transformMediaTypesDataProvider(): array\n {\n return [\n 'empty array' => [\n 'mediaTypes' => [],\n 'expected' => [],\n ],\n 'pdf only' => [\n 'mediaTypes' => ['pdf'],\n 'expected' => [\n ['id' => 'pdf', 'name' => 'PDF'],\n ],\n ],\n 'podcast only' => [\n 'mediaTypes' => ['podcast'],\n 'expected' => [\n ['id' => 'podcast', 'name' => 'Podcast'],\n ],\n ],\n 'both pdf and podcast' => [\n 'mediaTypes' => ['pdf', 'podcast'],\n 'expected' => [\n ['id' => 'pdf', 'name' => 'PDF'],\n ['id' => 'podcast', 'name' => 'Podcast'],\n ],\n ],\n 'with invalid type' => [\n 'mediaTypes' => ['pdf', 'invalid', 'podcast'],\n 'expected' => [\n ['id' => 'pdf', 'name' => 'PDF'],\n ['id' => 'podcast', 'name' => 'Podcast'],\n ],\n ],\n ];\n }\n\n #[DataProvider('hasCallTypeConferenceDataProvider')]\n public function testHasCallTypeConference(array $callTypes, bool $expected): void\n {\n $report = $this->createMock(AutomatedReport::class);\n $report->method('getCallTypes')->willReturn($callTypes);\n\n $result = $this->service->hasCallTypeConference($report);\n\n $this->assertEquals($expected, $result);\n }\n\n #[DataProvider('hasCallTypeDialerDataProvider')]\n public function testHasCallTypeDialer(array $callTypes, bool $expected): void\n {\n $report = $this->createMock(AutomatedReport::class);\n $report->method('getCallTypes')->willReturn($callTypes);\n\n $result = $this->service->hasCallTypeDialer($report);\n\n $this->assertEquals($expected, $result);\n }\n\n public static function hasCallTypeConferenceDataProvider(): array\n {\n return [\n 'has conference' => [\n 'callTypes' => ['conference', 'dialer'],\n 'expected' => true,\n ],\n 'does not have conference' => [\n 'callTypes' => ['dialer', 'other'],\n 'expected' => false,\n ],\n 'empty call types' => [\n 'callTypes' => [],\n 'expected' => false,\n ],\n ];\n }\n\n public static function hasCallTypeDialerDataProvider(): array\n {\n return [\n 'has dialer' => [\n 'callTypes' => ['conference', 'dialer'],\n 'expected' => true,\n ],\n 'does not have dialer' => [\n 'callTypes' => ['conference', 'other'],\n 'expected' => false,\n ],\n 'empty call types' => [\n 'callTypes' => [],\n 'expected' => false,\n ],\n ];\n }\n\n public function testTransformReportResultsWithEmptyCollection(): void\n {\n $emptyCollection = new Collection([]);\n\n $result = $this->service->transformReportResults($emptyCollection);\n\n $this->assertIsArray($result);\n $this->assertEmpty($result);\n }\n\n public function testTransformReportResultsStructure(): void\n {\n // Create a mock AutomatedReportResult with minimal setup to test structure\n $mockReportResult = $this->createMockReportResult();\n $collection = new Collection([$mockReportResult]);\n\n $result = $this->service->transformReportResults($collection);\n\n $this->assertIsArray($result);\n $this->assertCount(1, $result);\n\n $transformedResult = $result[0];\n\n // Verify all expected keys are present\n $expectedKeys = [\n 'id', 'name', 'frequency', 'recipients',\n 'report_type', 'media_type', 'downloadUrl', 'viewUrl', 'generated_at',\n ];\n\n foreach ($expectedKeys as $key) {\n $this->assertArrayHasKey($key, $transformedResult);\n }\n\n // Verify structure of nested arrays\n $this->assertIsArray($transformedResult['frequency']);\n $this->assertArrayHasKey('id', $transformedResult['frequency']);\n $this->assertArrayHasKey('name', $transformedResult['frequency']);\n\n $this->assertIsArray($transformedResult['report_type']);\n $this->assertArrayHasKey('id', $transformedResult['report_type']);\n $this->assertArrayHasKey('name', $transformedResult['report_type']);\n\n $this->assertIsArray($transformedResult['recipients']);\n\n // Verify TODO fields are null as expected\n $this->assertEquals(AutomatedReportsService::MEDIA_TYPE_PODCAST, $transformedResult['media_type']);\n $this->assertEquals(route('ai-reports.audio.download', ['uuid' => 'test-uuid']), $transformedResult['downloadUrl']);\n $this->assertEquals(route('ai-reports.audio.view', ['uuid' => 'test-uuid']), $transformedResult['viewUrl']);\n }\n\n public function testTransformReportResultsWithMultipleResults(): void\n {\n $mockReportResult1 = $this->createMockReportResult('result-uuid-1', 'exec_summary');\n $mockReportResult2 = $this->createMockReportResult('result-uuid-2', 'coaching_profiles');\n $collection = new Collection([$mockReportResult1, $mockReportResult2]);\n\n $result = $this->service->transformReportResults($collection);\n\n $this->assertIsArray($result);\n $this->assertCount(2, $result);\n\n // Verify different UUIDs\n $this->assertEquals('result-uuid-1', $result[0]['id']);\n $this->assertEquals('result-uuid-2', $result[1]['id']);\n\n // Verify both results have the expected structure\n foreach ($result as $transformedResult) {\n $this->assertArrayHasKey('id', $transformedResult);\n $this->assertArrayHasKey('name', $transformedResult);\n $this->assertArrayHasKey('frequency', $transformedResult);\n $this->assertArrayHasKey('recipients', $transformedResult);\n $this->assertArrayHasKey('report_type', $transformedResult);\n }\n }\n\n #[DataProvider('isUserRecipientOfReportDataProvider')]\n public function testIsUserRecipientOfReport(int $userId, array $recipients, bool $expected): void\n {\n // Create mock User\n $mockUser = $this->createMock(\\Jiminny\\Models\\User::class);\n $mockUser->method('getId')->willReturn($userId);\n $mockUser->method('getGroupId')->willReturn(null);\n\n // Create mock AutomatedReport\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getRecipients')->willReturn($recipients);\n $mockReport->method('isAskJiminnyReport')->willReturn(false);\n $mockReport->method('getGroups')->willReturn([]);\n\n $result = $this->service->isUserRecipientOfReport($mockUser, $mockReport);\n\n $this->assertEquals($expected, $result);\n }\n\n #[DataProvider('isUserRecipientOfAskJiminnyReportDataProvider')]\n public function testIsUserRecipientOfAskJiminnyReportViaGroup(\n int $userId,\n ?int $groupId,\n array $recipients,\n array $reportGroups,\n bool $expected,\n ): void {\n $mockUser = $this->createMock(\\Jiminny\\Models\\User::class);\n $mockUser->method('getId')->willReturn($userId);\n $mockUser->method('getGroupId')->willReturn($groupId);\n\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getRecipients')->willReturn($recipients);\n $mockReport->method('isAskJiminnyReport')->willReturn(true);\n $mockReport->method('getGroups')->willReturn($reportGroups);\n\n $this->assertSame($expected, $this->service->isUserRecipientOfReport($mockUser, $mockReport));\n }\n\n public function testIsUserRecipientOfNonAskJiminnyReportIgnoresGroups(): void\n {\n $mockUser = $this->createMock(\\Jiminny\\Models\\User::class);\n $mockUser->method('getId')->willReturn(123);\n $mockUser->method('getGroupId')->willReturn(5);\n\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getRecipients')->willReturn(['users' => []]);\n $mockReport->method('isAskJiminnyReport')->willReturn(false);\n $mockReport->method('getGroups')->willReturn([5]);\n\n $this->assertFalse($this->service->isUserRecipientOfReport($mockUser, $mockReport));\n }\n\n public static function isUserRecipientOfAskJiminnyReportDataProvider(): array\n {\n return [\n 'group member - ask jiminny' => [\n 'userId' => 123,\n 'groupId' => 7,\n 'recipients' => ['users' => []],\n 'reportGroups' => [7],\n 'expected' => true,\n ],\n 'group mismatch - ask jiminny' => [\n 'userId' => 123,\n 'groupId' => 9,\n 'recipients' => ['users' => []],\n 'reportGroups' => [7, 8],\n 'expected' => false,\n ],\n 'user with no group - ask jiminny' => [\n 'userId' => 123,\n 'groupId' => null,\n 'recipients' => ['users' => []],\n 'reportGroups' => [7],\n 'expected' => false,\n ],\n 'recipient users take precedence over group' => [\n 'userId' => 123,\n 'groupId' => null,\n 'recipients' => ['users' => [123]],\n 'reportGroups' => [],\n 'expected' => true,\n ],\n ];\n }\n\n public function testIsUserRecipientOfReportWithEmptyRecipients(): void\n {\n // Create mock User\n $mockUser = $this->createMock(\\Jiminny\\Models\\User::class);\n $mockUser->method('getId')->willReturn(123);\n\n // Create mock AutomatedReport with no recipients\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getRecipients')->willReturn([]);\n\n $result = $this->service->isUserRecipientOfReport($mockUser, $mockReport);\n\n $this->assertFalse($result);\n }\n\n public function testIsUserRecipientOfReportWithNoUsersKey(): void\n {\n // Create mock User\n $mockUser = $this->createMock(\\Jiminny\\Models\\User::class);\n $mockUser->method('getId')->willReturn(123);\n\n // Create mock AutomatedReport with recipients but no 'users' key\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getRecipients')->willReturn(['other_key' => [456, 789]]);\n\n $result = $this->service->isUserRecipientOfReport($mockUser, $mockReport);\n\n $this->assertFalse($result);\n }\n\n public static function isUserRecipientOfReportDataProvider(): array\n {\n return [\n 'user is recipient - single user' => [\n 'userId' => 123,\n 'recipients' => ['users' => [123]],\n 'expected' => true,\n ],\n 'user is recipient - multiple users' => [\n 'userId' => 456,\n 'recipients' => ['users' => [123, 456, 789]],\n 'expected' => true,\n ],\n 'user is not recipient - single user' => [\n 'userId' => 999,\n 'recipients' => ['users' => [123]],\n 'expected' => false,\n ],\n 'user is not recipient - multiple users' => [\n 'userId' => 999,\n 'recipients' => ['users' => [123, 456, 789]],\n 'expected' => false,\n ],\n 'user is recipient - string IDs converted to int' => [\n 'userId' => 123,\n 'recipients' => ['users' => ['123', '456']],\n 'expected' => true,\n ],\n 'user is not recipient - string IDs converted to int' => [\n 'userId' => 999,\n 'recipients' => ['users' => ['123', '456']],\n 'expected' => false,\n ],\n 'empty users array' => [\n 'userId' => 123,\n 'recipients' => ['users' => []],\n 'expected' => false,\n ],\n ];\n }\n\n private function createMockReportResult(string $uuid = 'test-uuid', string $reportType = 'exec_summary'): AutomatedReportResult\n {\n // Create mock AutomatedReport\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getFrequency')->willReturn('weekly');\n $mockReport->method('getRecipients')->willReturn(['users' => [1, 2]]);\n $mockReport->method('getGroups')->willReturn([10, 20]);\n $mockReport->method('getType')->willReturn($reportType);\n\n // Create mock Team\n $mockTeam = $this->createMock(\\Jiminny\\Models\\Team::class);\n\n // Create mock Group\n $mockGroup = $this->createMock(\\Jiminny\\Models\\Group::class);\n $mockGroup->method('getUuid')->willReturn('group-uuid-10');\n $mockGroup->method('getName')->willReturn('Test Team');\n\n $mockQueryBuilder = Mockery::mock();\n $mockQueryBuilder->shouldReceive('where')->andReturnSelf();\n $mockQueryBuilder->shouldReceive('first')->andReturn($mockGroup);\n\n $dataRelation = Mockery::mock(HasMany::class);\n $dataRelation->shouldReceive('where')->andReturn($mockQueryBuilder);\n $dataRelation->shouldReceive('get')->andReturn(\n new \\Illuminate\\Database\\Eloquent\\Collection([$mockGroup])\n );\n\n $mockTeam->method('groups')->willReturn($dataRelation);\n $mockReport->method('getTeam')->willReturn($mockTeam);\n\n // Create mock AutomatedReportResult\n $mockReportResult = $this->createMock(AutomatedReportResult::class);\n $mockReportResult->method('getUuid')->willReturn($uuid);\n $mockReportResult->method('getGeneratedAt')->willReturn(\n \\Illuminate\\Support\\Carbon::parse('2024-01-15T10:30:00Z')\n );\n\n $mockReportResult->method('getReport')->willReturn($mockReport);\n\n // Mock methods used in getReportFileName\n $mockReportResult->method('getReportType')->willReturn($reportType);\n $mockReportResult->method('getFromDate')->willReturn(\n \\Illuminate\\Support\\Carbon::parse('2024-01-08')\n );\n $mockReportResult->method('getToDate')->willReturn(\n \\Illuminate\\Support\\Carbon::parse('2024-01-15')\n );\n $mockReportResult->method('getGroups')->willReturn([10]);\n $mockReportResult->method('getMediaType')->willReturn(AutomatedReportsService::MEDIA_TYPE_PODCAST);\n\n return $mockReportResult;\n }\n\n #[DataProvider('getUsersUuidsDataProvider')]\n public function testGetUsersUuids(array $recipients, array $mockUsers, array $expectedUuids): void\n {\n // Create mock UserRepository\n $mockUserRepository = $this->createMock(UserRepository::class);\n\n // Configure the mock to return specific users for specific IDs using a callback\n $mockUserRepository->method('find')\n ->willReturnCallback(function ($userId) use ($mockUsers) {\n if (! isset($mockUsers[$userId])) {\n return null;\n }\n\n $userUuid = $mockUsers[$userId]['uuid'] ?? null;\n\n if ($userUuid === null) {\n return null;\n }\n\n $mockUser = $this->createMock(\\Jiminny\\Models\\User::class);\n $mockUser->method('getUuid')->willReturn((string) $userUuid);\n\n return $mockUser;\n });\n\n // Create service with mocked UserRepository\n $automatedReportsService = $this->getService(mockUserRepository: $mockUserRepository);\n\n // Create mock AutomatedReport\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getRecipients')->willReturn($recipients);\n\n $result = $automatedReportsService->getUsersUuids($mockReport);\n\n $this->assertEquals($expectedUuids, $result);\n }\n\n public function testGetUsersUuidsWithEmptyRecipients(): void\n {\n // Create mock AutomatedReport with empty recipients\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getRecipients')->willReturn([]);\n\n $result = $this->service->getUsersUuids($mockReport);\n\n $this->assertEquals([], $result);\n }\n\n public function testGetUsersUuidsWithNoUsersKey(): void\n {\n // Create mock AutomatedReport with recipients but no 'users' key\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getRecipients')->willReturn(['other_key' => [1, 2, 3]]);\n\n $result = $this->service->getUsersUuids($mockReport);\n\n $this->assertEquals([], $result);\n }\n\n public function testGetUsersUuidsWithNonExistentUsers(): void\n {\n // Create mock UserRepository that returns null for all users\n $mockUserRepository = $this->createMock(UserRepository::class);\n $mockUserRepository->method('find')->willReturn(null);\n\n // Create service with mocked UserRepository\n $automatedReportsService = $this->getService(mockUserRepository: $mockUserRepository);\n\n // Create mock AutomatedReport\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getRecipients')->willReturn(['users' => [1, 2, 3]]);\n\n $result = $automatedReportsService->getUsersUuids($mockReport);\n\n // Should return array with null values for non-existent users\n $this->assertEquals([], $result);\n }\n\n public static function getUsersUuidsDataProvider(): array\n {\n return [\n 'single user found' => [\n 'recipients' => ['users' => [123]],\n 'mockUsers' => [\n 123 => ['id' => 123, 'uuid' => 'user-uuid-123'],\n ],\n 'expectedUuids' => ['user-uuid-123'],\n ],\n 'multiple users found' => [\n 'recipients' => ['users' => [123, 456, 789]],\n 'mockUsers' => [\n 123 => ['id' => 123, 'uuid' => 'user-uuid-123'],\n 456 => ['id' => 456, 'uuid' => 'user-uuid-456'],\n 789 => ['id' => 789, 'uuid' => 'user-uuid-789'],\n ],\n 'expectedUuids' => ['user-uuid-123', 'user-uuid-456', 'user-uuid-789'],\n ],\n 'mixed found and not found users' => [\n 'recipients' => ['users' => [123, 456, 789]],\n 'mockUsers' => [\n 123 => ['id' => 123, 'uuid' => 'user-uuid-123'],\n // 456 not found in DB\n 789 => ['id' => 789, 'uuid' => 'user-uuid-789'],\n ],\n 'expectedUuids' => ['user-uuid-123', 'user-uuid-789'], // Updated to reflect that nulls are filtered out\n ],\n 'empty users array' => [\n 'recipients' => ['users' => []],\n 'mockUsers' => [],\n 'expectedUuids' => [],\n ],\n 'all users not found' => [\n 'recipients' => ['users' => [123, 456]],\n 'mockUsers' => [], // No users found\n 'expectedUuids' => [], // Updated to reflect that nulls are filtered out\n ],\n ];\n }\n\n #[DataProvider('getCurrentDealStagesUuidsDataProvider')]\n public function testGetCurrentDealStagesUuids(array $currentDealStages, array $mockStages, array $expectedUuids): void\n {\n // Create mock StageRepository\n $mockStageRepository = $this->createMock(StageRepository::class);\n\n // Configure the mock to return specific stages for specific IDs using a callback\n $mockStageRepository->method('find')\n ->willReturnCallback(function ($stageId) use ($mockStages) {\n if (! isset($mockStages[$stageId])) {\n return null;\n }\n\n $stageUuid = $mockStages[$stageId]['uuid'] ?? null;\n\n if ($stageUuid === null) {\n return null;\n }\n\n $mockStage = $this->createMock(\\Jiminny\\Models\\Stage::class);\n $mockStage->method('getUuid')->willReturn((string) $stageUuid);\n\n return $mockStage;\n });\n\n // Create service with mocked StageRepository\n $automatedReportsService = $this->getService(mockStageRepository: $mockStageRepository);\n\n // Create mock AutomatedReport\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getCurrentDealStages')->willReturn($currentDealStages);\n\n $result = $automatedReportsService->getCurrentDealStagesUuids($mockReport);\n\n $this->assertEquals($expectedUuids, $result);\n }\n\n public function testGetCurrentDealStagesUuidsWithEmptyStages(): void\n {\n // Create mock AutomatedReport with empty current deal stages\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getCurrentDealStages')->willReturn([]);\n\n $result = $this->service->getCurrentDealStagesUuids($mockReport);\n\n $this->assertEquals([], $result);\n }\n\n public function testGetCurrentDealStagesUuidsWithNonExistentStages(): void\n {\n // Create mock StageRepository that returns null for all stages\n $mockStageRepository = $this->createMock(StageRepository::class);\n $mockStageRepository->method('find')->willReturn(null);\n\n // Create service with mocked StageRepository\n $automatedReportsService = $this->getService(mockStageRepository: $mockStageRepository);\n\n // Create mock AutomatedReport\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getCurrentDealStages')->willReturn([1, 2, 3]);\n\n $result = $automatedReportsService->getCurrentDealStagesUuids($mockReport);\n\n // Should return array with null values for non-existent stages\n $this->assertEquals([], $result);\n }\n\n public static function getCurrentDealStagesUuidsDataProvider(): array\n {\n return [\n 'single stage found' => [\n 'currentDealStages' => [10],\n 'mockStages' => [\n 10 => ['id' => 10, 'uuid' => 'stage-uuid-10'],\n ],\n 'expectedUuids' => ['stage-uuid-10'],\n ],\n 'multiple stages found' => [\n 'currentDealStages' => [10, 20, 30],\n 'mockStages' => [\n 10 => ['id' => 10, 'uuid' => 'stage-uuid-10'],\n 20 => ['id' => 20, 'uuid' => 'stage-uuid-20'],\n 30 => ['id' => 30, 'uuid' => 'stage-uuid-30'],\n ],\n 'expectedUuids' => ['stage-uuid-10', 'stage-uuid-20', 'stage-uuid-30'],\n ],\n 'mixed found and not found stages' => [\n 'currentDealStages' => [10, 20, 30],\n 'mockStages' => [\n 10 => ['id' => 10, 'uuid' => 'stage-uuid-10'],\n // 20 not found in DB\n 30 => ['id' => 30, 'uuid' => 'stage-uuid-30'],\n ],\n 'expectedUuids' => ['stage-uuid-10', 'stage-uuid-30'], // Updated to reflect that nulls are filtered out\n ],\n 'empty stages array' => [\n 'currentDealStages' => [],\n 'mockStages' => [],\n 'expectedUuids' => [],\n ],\n 'all stages not found' => [\n 'currentDealStages' => [10, 20],\n 'mockStages' => [], // No stages found\n 'expectedUuids' => [], // Updated to reflect that nulls are filtered out\n ],\n ];\n }\n\n #[DataProvider('getTeamGroupsDataProvider')]\n public function testGetTeamGroups(string $teamUuid, ?array $mockTeamData, array $mockGroups, array $expectedResult): void\n {\n // Create mock TeamRepository\n $mockTeamRepository = $this->createMock(TeamRepository::class);\n\n if ($mockTeamData === null) {\n // Team not found\n $mockTeamRepository->method('idOrUuid')\n ->with($teamUuid)\n ->willReturn(null);\n } else {\n // Team found - create mock team with groups\n $mockTeam = $this->createMock(\\Jiminny\\Models\\Team::class);\n\n // Create mock groups collection\n $mockGroupsCollection = $this->createMock(\\Illuminate\\Database\\Eloquent\\Collection::class);\n\n // Create mock Group objects\n $groupObjects = [];\n foreach ($mockGroups as $groupData) {\n $mockGroup = $this->createMock(\\Jiminny\\Models\\Group::class);\n $mockGroup->method('getUuid')->willReturn($groupData['id']);\n $mockGroup->method('getName')->willReturn($groupData['name']);\n $groupObjects[] = $mockGroup;\n }\n\n // Mock the groups collection to return our mock groups\n $mockGroupsCollection->method('getIterator')->willReturn(new \\ArrayIterator($groupObjects));\n\n // Mock the groups() relation\n $mockGroupsRelation = $this->createMock(\\Illuminate\\Database\\Eloquent\\Relations\\HasMany::class);\n $mockGroupsRelation->method('get')->willReturn($mockGroupsCollection);\n $mockTeam->method('groups')->willReturn($mockGroupsRelation);\n\n $mockTeamRepository->method('idOrUuid')\n ->with($teamUuid)\n ->willReturn($mockTeam);\n }\n\n // Create service with mocked TeamRepository\n $automatedReportsService = $this->getService(mockTeamRepository: $mockTeamRepository);\n\n $result = $automatedReportsService->getTeamGroups($teamUuid);\n\n $this->assertEquals($expectedResult, $result);\n }\n\n public function testGetTeamGroupsWithNonExistentTeam(): void\n {\n // Create mock TeamRepository that returns null (team not found)\n $mockTeamRepository = $this->createMock(TeamRepository::class);\n $mockTeamRepository->method('idOrUuid')->willReturn(null);\n\n // Create service with mocked TeamRepository\n $automatedReportsService = $this->getService(mockTeamRepository: $mockTeamRepository);\n\n $result = $automatedReportsService->getTeamGroups('non-existent-team-uuid');\n\n $this->assertEquals([], $result);\n }\n\n public function testGetTeamGroupsWithEmptyGroups(): void\n {\n // Create mock team with no groups\n $mockTeam = $this->createMock(\\Jiminny\\Models\\Team::class);\n\n // Create empty groups collection\n $mockGroupsCollection = $this->createMock(\\Illuminate\\Database\\Eloquent\\Collection::class);\n $mockGroupsCollection->method('getIterator')->willReturn(new \\ArrayIterator([]));\n\n $mockGroupsRelation = $this->createMock(\\Illuminate\\Database\\Eloquent\\Relations\\HasMany::class);\n $mockGroupsRelation->method('get')->willReturn($mockGroupsCollection);\n $mockTeam->method('groups')->willReturn($mockGroupsRelation);\n\n // Create mock TeamRepository\n $mockTeamRepository = $this->createMock(TeamRepository::class);\n $mockTeamRepository->method('idOrUuid')->willReturn($mockTeam);\n\n // Create service with mocked TeamRepository\n $automatedReportsService = $this->getService(mockTeamRepository: $mockTeamRepository);\n\n $result = $automatedReportsService->getTeamGroups('team-with-no-groups');\n\n $this->assertEquals([], $result);\n }\n\n public static function getTeamGroupsDataProvider(): array\n {\n return [\n 'team with single group' => [\n 'teamUuid' => 'team-uuid-123',\n 'mockTeamData' => ['id' => 'team-uuid-123', 'name' => 'Test Team'],\n 'mockGroups' => [\n ['id' => 'group-uuid-1', 'name' => 'Sales Team'],\n ],\n 'expectedResult' => [\n ['id' => 'group-uuid-1', 'name' => 'Sales Team'],\n ],\n ],\n 'team with multiple groups' => [\n 'teamUuid' => 'team-uuid-456',\n 'mockTeamData' => ['id' => 'team-uuid-456', 'name' => 'Another Team'],\n 'mockGroups' => [\n ['id' => 'group-uuid-1', 'name' => 'Sales Team'],\n ['id' => 'group-uuid-2', 'name' => 'Marketing Team'],\n ['id' => 'group-uuid-3', 'name' => 'Support Team'],\n ],\n 'expectedResult' => [\n ['id' => 'group-uuid-1', 'name' => 'Sales Team'],\n ['id' => 'group-uuid-2', 'name' => 'Marketing Team'],\n ['id' => 'group-uuid-3', 'name' => 'Support Team'],\n ],\n ],\n 'team not found' => [\n 'teamUuid' => 'non-existent-uuid',\n 'mockTeamData' => null,\n 'mockGroups' => [],\n 'expectedResult' => [],\n ],\n 'team with no groups' => [\n 'teamUuid' => 'team-uuid-empty',\n 'mockTeamData' => ['id' => 'team-uuid-empty', 'name' => 'Empty Team'],\n 'mockGroups' => [],\n 'expectedResult' => [],\n ],\n ];\n }\n\n #[DataProvider('getTeamsDataProvider')]\n public function testGetTeams(array $mockTeams, array $expectedResult): void\n {\n // Create mock TeamRepository\n $mockTeamRepository = $this->createMock(TeamRepository::class);\n\n // Create mock Team objects\n $teamObjects = [];\n foreach ($mockTeams as $teamData) {\n $mockTeam = $this->createMock(\\Jiminny\\Models\\Team::class);\n $mockTeam->method('getUuid')->willReturn($teamData['id']);\n $mockTeam->method('getName')->willReturn($teamData['name']);\n $mockTeam->method('hasFeature')\n ->with(\\Jiminny\\Models\\Feature\\FeatureEnum::AUTOMATED_REPORTS)\n ->willReturn($teamData['hasAutomatedReports']);\n $teamObjects[] = $mockTeam;\n }\n\n // Mock the repository to return a Collection (not array)\n $mockTeamRepository->method('getTeamsForKiosk')\n ->with('active')\n ->willReturn(new Collection($teamObjects));\n\n // Create service with mocked TeamRepository\n $automatedReportsService = $this->getService(mockTeamRepository: $mockTeamRepository);\n\n $result = $automatedReportsService->getTeams();\n\n $this->assertEquals($expectedResult, $result);\n }\n\n public function testGetTeamsWithNoTeams(): void\n {\n // Create mock TeamRepository that returns empty Collection\n $mockTeamRepository = $this->createMock(TeamRepository::class);\n $mockTeamRepository->method('getTeamsForKiosk')->willReturn(new Collection([]));\n\n // Create service with mocked TeamRepository\n $automatedReportsService = $this->getService(mockTeamRepository: $mockTeamRepository);\n\n $result = $automatedReportsService->getTeams();\n\n $this->assertEquals([], $result);\n }\n\n public function testGetTeamsWithAllTeamsWithoutFeature(): void\n {\n // Create mock teams without AUTOMATED_REPORTS feature\n $mockTeam1 = $this->createMock(\\Jiminny\\Models\\Team::class);\n $mockTeam1->method('hasFeature')\n ->with(\\Jiminny\\Models\\Feature\\FeatureEnum::AUTOMATED_REPORTS)\n ->willReturn(false);\n\n $mockTeam2 = $this->createMock(\\Jiminny\\Models\\Team::class);\n $mockTeam2->method('hasFeature')\n ->with(\\Jiminny\\Models\\Feature\\FeatureEnum::AUTOMATED_REPORTS)\n ->willReturn(false);\n\n // Create mock TeamRepository that returns Collection\n $mockTeamRepository = $this->createMock(TeamRepository::class);\n $mockTeamRepository->method('getTeamsForKiosk')->willReturn(new Collection([$mockTeam1, $mockTeam2]));\n\n // Create service with mocked TeamRepository\n $automatedReportsService = $this->getService(mockTeamRepository: $mockTeamRepository);\n\n $result = $automatedReportsService->getTeams();\n\n $this->assertEquals([], $result);\n }\n\n public static function getTeamsDataProvider(): array\n {\n return [\n 'single team with feature' => [\n 'mockTeams' => [\n [\n 'id' => 'team-uuid-1',\n 'name' => 'Sales Team',\n 'hasAutomatedReports' => true,\n ],\n ],\n 'expectedResult' => [\n ['id' => 'team-uuid-1', 'name' => 'Sales Team'],\n ],\n ],\n 'multiple teams with feature' => [\n 'mockTeams' => [\n [\n 'id' => 'team-uuid-1',\n 'name' => 'Sales Team',\n 'hasAutomatedReports' => true,\n ],\n [\n 'id' => 'team-uuid-2',\n 'name' => 'Marketing Team',\n 'hasAutomatedReports' => true,\n ],\n [\n 'id' => 'team-uuid-3',\n 'name' => 'Support Team',\n 'hasAutomatedReports' => true,\n ],\n ],\n 'expectedResult' => [\n ['id' => 'team-uuid-1', 'name' => 'Sales Team'],\n ['id' => 'team-uuid-2', 'name' => 'Marketing Team'],\n ['id' => 'team-uuid-3', 'name' => 'Support Team'],\n ],\n ],\n 'mixed teams - some with feature, some without' => [\n 'mockTeams' => [\n [\n 'id' => 'team-uuid-1',\n 'name' => 'Sales Team',\n 'hasAutomatedReports' => true,\n ],\n [\n 'id' => 'team-uuid-2',\n 'name' => 'Marketing Team',\n 'hasAutomatedReports' => false,\n ],\n [\n 'id' => 'team-uuid-3',\n 'name' => 'Support Team',\n 'hasAutomatedReports' => true,\n ],\n ],\n 'expectedResult' => [\n ['id' => 'team-uuid-1', 'name' => 'Sales Team'],\n ['id' => 'team-uuid-3', 'name' => 'Support Team'],\n ],\n ],\n 'all teams without feature' => [\n 'mockTeams' => [\n [\n 'id' => 'team-uuid-1',\n 'name' => 'Sales Team',\n 'hasAutomatedReports' => false,\n ],\n [\n 'id' => 'team-uuid-2',\n 'name' => 'Marketing Team',\n 'hasAutomatedReports' => false,\n ],\n ],\n 'expectedResult' => [],\n ],\n 'empty teams array' => [\n 'mockTeams' => [],\n 'expectedResult' => [],\n ],\n ];\n }\n\n #[DataProvider('deleteS3FilesDataProvider')]\n public function testDeleteS3Files(\n string $mediaType,\n array $expectedFileExtensions,\n array $existingFiles,\n string $pathSuffix,\n int $expectedDeletes\n ): void {\n // Arrange\n $teamUuid = 'team-uuid-123';\n $reportUuid = 'report-uuid-456';\n $basePath = sprintf('%s/reports/%s', $teamUuid, $reportUuid);\n\n $team = Mockery::mock(Team::class);\n $team->allows('getUuid')->andReturn($teamUuid);\n\n $report = Mockery::mock(AutomatedReport::class);\n $report->allows('getTeam')->andReturn($team);\n\n $result = Mockery::mock(AutomatedReportResult::class);\n $result->allows('getReport')->andReturn($report);\n $result->allows('getUuid')->andReturn($reportUuid);\n $result->allows('getMediaType')->andReturn($mediaType);\n\n Storage::fake();\n Log::shouldReceive('info')->times($expectedDeletes);\n\n foreach ($existingFiles as $extension) {\n $filePath = $basePath . $pathSuffix . '.' . $extension;\n Storage::put($filePath, 'dummy content');\n }\n\n // Act\n $this->service->deleteS3Files($result);\n\n // Assert\n foreach ($expectedFileExtensions as $extension) {\n $filePath = $basePath . $pathSuffix . '.' . $extension;\n if (in_array($extension, $existingFiles, true)) {\n Storage::assertMissing($filePath);\n } else {\n // To be sure no unexpected files were created and deleted\n Storage::assertMissing($filePath);\n }\n }\n }\n\n public static function deleteS3FilesDataProvider(): array\n {\n return [\n 'PDF report, all files exist' => [\n 'mediaType' => AutomatedReportsService::MEDIA_TYPE_PDF,\n 'expectedFileExtensions' => ['html', 'MD', 'pdf'],\n 'existingFiles' => ['html', 'MD', 'pdf'],\n 'pathSuffix' => '',\n 'expectedDeletes' => 3,\n ],\n 'PDF report, some files exist' => [\n 'mediaType' => AutomatedReportsService::MEDIA_TYPE_PDF,\n 'expectedFileExtensions' => ['html', 'MD', 'pdf'],\n 'existingFiles' => ['html', 'pdf'],\n 'pathSuffix' => '',\n 'expectedDeletes' => 2,\n ],\n 'PDF report, no files exist' => [\n 'mediaType' => AutomatedReportsService::MEDIA_TYPE_PDF,\n 'expectedFileExtensions' => ['html', 'MD', 'pdf'],\n 'existingFiles' => [],\n 'pathSuffix' => '',\n 'expectedDeletes' => 0,\n ],\n 'Podcast report, all files exist' => [\n 'mediaType' => AutomatedReportsService::MEDIA_TYPE_PODCAST,\n 'expectedFileExtensions' => ['json', 'mp3', 'ssml'],\n 'existingFiles' => ['json', 'mp3', 'ssml'],\n 'pathSuffix' => '_podcast',\n 'expectedDeletes' => 3,\n ],\n 'Podcast report, some files exist' => [\n 'mediaType' => AutomatedReportsService::MEDIA_TYPE_PODCAST,\n 'expectedFileExtensions' => ['json', 'mp3', 'ssml'],\n 'existingFiles' => ['mp3'],\n 'pathSuffix' => '_podcast',\n 'expectedDeletes' => 1,\n ],\n 'Podcast report, no files exist' => [\n 'mediaType' => AutomatedReportsService::MEDIA_TYPE_PODCAST,\n 'expectedFileExtensions' => ['json', 'mp3', 'ssml'],\n 'existingFiles' => [],\n 'pathSuffix' => '_podcast',\n 'expectedDeletes' => 0,\n ],\n 'Other media type, should do nothing' => [\n 'mediaType' => 'some_other_type',\n 'expectedFileExtensions' => [],\n 'existingFiles' => [],\n 'pathSuffix' => '',\n 'expectedDeletes' => 0,\n ],\n ];\n }\n\n public function testDeleteReportsResultsInRetentionPeriodWithLogging(): void\n {\n // Create mocks for the test\n $automatedReportsService = Mockery::mock(AutomatedReportsService::class);\n\n $team = Mockery::mock(Team::class);\n $team->shouldReceive('getId')->andReturn(123);\n\n $from = now()->subDays(30);\n $to = now();\n $source = 'test-source';\n\n // Expect the method to be called with specific parameters\n $automatedReportsService->shouldReceive('deleteReportsResultsInRetentionPeriodWithLogging')\n ->once()\n ->with(\n $team,\n Mockery::on(function ($arg) use ($from) {\n return $arg->timestamp === $from->timestamp;\n }),\n Mockery::on(function ($arg) use ($to) {\n return $arg->timestamp === $to->timestamp;\n }),\n $source\n )\n ->andReturn(5);\n\n // Call the method and verify the result\n $result = $automatedReportsService->deleteReportsResultsInRetentionPeriodWithLogging(\n $team,\n $from,\n $to,\n $source\n );\n\n $this->assertEquals(5, $result);\n }\n\n #[DataProvider('sanitizeFileNameDataProvider')]\n public function testSanitizeFileName(string $input, string $expected): void\n {\n $result = $this->service->sanitizeFileName($input);\n\n $this->assertEquals($expected, $result);\n }\n\n public static function sanitizeFileNameDataProvider(): array\n {\n return [\n 'no special characters' => [\n 'input' => 'Exec Summary - Sep 2025 - Business Development Team',\n 'expected' => 'Exec Summary - Sep 2025 - Business Development Team',\n ],\n 'forward slash in team name' => [\n 'input' => 'Exec Summary - Sep 2025 - ND/IRV',\n 'expected' => 'Exec Summary - Sep 2025 - ND-IRV',\n ],\n 'backslash in team name' => [\n 'input' => 'Exec Summary - Sep 2025 - ND\\IRV',\n 'expected' => 'Exec Summary - Sep 2025 - ND-IRV',\n ],\n 'multiple forward slashes' => [\n 'input' => 'Report - Team A/B/C',\n 'expected' => 'Report - Team A-B-C',\n ],\n 'multiple backslashes' => [\n 'input' => 'Report - Team A\\B\\C',\n 'expected' => 'Report - Team A-B-C',\n ],\n 'mixed slashes and backslashes' => [\n 'input' => 'Report - Team A/B\\C',\n 'expected' => 'Report - Team A-B-C',\n ],\n 'complex team name with slashes' => [\n 'input' => 'Exec Summary - Sep 2025 - Business Development Team - ND/IRV, Net Driven - Acquisition (Sales)',\n 'expected' => 'Exec Summary - Sep 2025 - Business Development Team - ND-IRV, Net Driven - Acquisition (Sales)',\n ],\n 'only slashes' => [\n 'input' => '//\\\\\\\\',\n 'expected' => '----',\n ],\n 'empty string' => [\n 'input' => '',\n 'expected' => '',\n ],\n 'slash at start' => [\n 'input' => '/Report Name',\n 'expected' => '-Report Name',\n ],\n 'slash at end' => [\n 'input' => 'Report Name/',\n 'expected' => 'Report Name-',\n ],\n ];\n }\n\n public function testGetReportFileNameSanitizesOutput(): void\n {\n // Create mock GroupRepository\n $mockGroupRepository = $this->createMock(GroupRepository::class);\n\n // Create mock Group with slash in name\n $mockGroup = $this->createMock(\\Jiminny\\Models\\Group::class);\n $mockGroup->method('getName')->willReturn('ND/IRV, Net Driven - Acquisition (Sales)');\n\n $mockGroupRepository->method('find')->willReturn($mockGroup);\n\n // Create service with mocked GroupRepository\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $mockGroupRepository,\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n // Create mock AutomatedReportResult\n $mockReportResult = $this->createMock(AutomatedReportResult::class);\n\n // Create mock AutomatedReport\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getType')->willReturn('exec_summary');\n $mockReport->method('getFrequency')->willReturn('monthly');\n\n $mockReportResult->method('getReport')->willReturn($mockReport);\n $mockReportResult->method('getFromDate')->willReturn(\n \\Illuminate\\Support\\Carbon::parse('2025-09-01')\n );\n $mockReportResult->method('getToDate')->willReturn(\n \\Illuminate\\Support\\Carbon::parse('2025-09-30')\n );\n $mockReportResult->method('getGroups')->willReturn([123]);\n $mockReportResult->method('getMediaType')->willReturn(AutomatedReportsService::MEDIA_TYPE_PDF);\n\n // Call getReportFileName\n $result = $service->getReportFileName($mockReportResult);\n\n // Verify the result does not contain slashes or backslashes\n $this->assertStringNotContainsString('/', $result);\n $this->assertStringNotContainsString('\\\\', $result);\n\n // Verify the slash was replaced with dash\n $this->assertStringContainsString('ND-IRV', $result);\n }\n\n public function testGetReportFileNameWithExtensionSanitizesOutput(): void\n {\n // Create mock GroupRepository\n $mockGroupRepository = $this->createMock(GroupRepository::class);\n\n // Create mock Group with backslash in name\n $mockGroup = $this->createMock(\\Jiminny\\Models\\Group::class);\n $mockGroup->method('getName')->willReturn('Team\\Name');\n\n $mockGroupRepository->method('find')->willReturn($mockGroup);\n\n // Create service with mocked GroupRepository\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $mockGroupRepository,\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n // Create mock AutomatedReportResult\n $mockReportResult = $this->createMock(AutomatedReportResult::class);\n\n // Create mock AutomatedReport\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getType')->willReturn('exec_summary');\n $mockReport->method('getFrequency')->willReturn('monthly');\n\n $mockReportResult->method('getReport')->willReturn($mockReport);\n $mockReportResult->method('getFromDate')->willReturn(\n \\Illuminate\\Support\\Carbon::parse('2025-09-01')\n );\n $mockReportResult->method('getToDate')->willReturn(\n \\Illuminate\\Support\\Carbon::parse('2025-09-30')\n );\n $mockReportResult->method('getGroups')->willReturn([123]);\n $mockReportResult->method('getMediaType')->willReturn(AutomatedReportsService::MEDIA_TYPE_PDF);\n\n // Call getReportFileNameWithExtension\n $result = $service->getReportFileNameWithExtension($mockReportResult);\n\n // Verify the result does not contain backslashes\n $this->assertStringNotContainsString('\\\\', $result);\n $this->assertStringNotContainsString('/', $result);\n\n // Verify the backslash was replaced with dash\n $this->assertStringContainsString('Team-Name', $result);\n\n // Verify extension is added\n $this->assertStringEndsWith('.pdf', $result);\n }\n\n public function testHasPassedScheduledTimeWithNullGeneratedAt(): void\n {\n $result = $this->service->hasPassedScheduledTime(null, 'America/Chicago');\n\n $this->assertFalse($result);\n }\n\n public function testHasPassedScheduledTimeWhenScheduledTimePassed(): void\n {\n Carbon::setTestNow(Carbon::parse('2026-02-24 10:00:00', 'America/Chicago'));\n\n $generatedAt = Carbon::parse('2026-02-24 01:00:00', 'America/Chicago');\n\n $result = $this->service->hasPassedScheduledTime($generatedAt, 'America/Chicago');\n\n $this->assertTrue($result);\n\n Carbon::setTestNow();\n }\n\n public function testHasPassedScheduledTimeWhenGeneratedAfterScheduledTime(): void\n {\n Carbon::setTestNow(Carbon::parse('2026-02-24 10:00:00', 'America/Chicago'));\n\n $generatedAt = Carbon::parse('2026-02-24 06:00:00', 'America/Chicago');\n\n $result = $this->service->hasPassedScheduledTime($generatedAt, 'America/Chicago');\n\n $this->assertFalse($result);\n\n Carbon::setTestNow();\n }\n\n public function testHasPassedScheduledTimeBeforeScheduledTimeToday(): void\n {\n Carbon::setTestNow(Carbon::parse('2026-02-24 04:00:00', 'America/Chicago'));\n\n $generatedAt = Carbon::parse('2026-02-24 01:00:00', 'America/Chicago');\n\n $result = $this->service->hasPassedScheduledTime($generatedAt, 'America/Chicago');\n\n $this->assertFalse($result);\n\n Carbon::setTestNow();\n }\n\n public function testShouldSendReportWithEmptyUsers(): void\n {\n $result = $this->service->shouldSendReport([]);\n\n $this->assertFalse($result);\n }\n\n public function testShouldSendReportAtScheduledTime(): void\n {\n Carbon::setTestNow(Carbon::parse('2026-02-24 05:00:00', 'America/Chicago'));\n\n $users = [\n ['email' => 'test@example.com', 'name' => 'Test User', 'timezone' => 'America/Chicago'],\n ];\n\n $result = $this->service->shouldSendReport($users);\n\n $this->assertTrue($result);\n\n Carbon::setTestNow();\n }\n\n public function testShouldSendReportNotAtScheduledTimeWithoutGeneratedAt(): void\n {\n Carbon::setTestNow(Carbon::parse('2026-02-24 10:00:00', 'America/Chicago'));\n\n $users = [\n ['email' => 'test@example.com', 'name' => 'Test User', 'timezone' => 'America/Chicago'],\n ];\n\n $result = $this->service->shouldSendReport($users);\n\n $this->assertFalse($result);\n\n Carbon::setTestNow();\n }\n\n public function testShouldSendReportWhenScheduledTimeMissed(): void\n {\n Carbon::setTestNow(Carbon::parse('2026-02-24 10:00:00', 'America/Chicago'));\n\n $users = [\n ['email' => 'test@example.com', 'name' => 'Test User', 'timezone' => 'America/Chicago'],\n ];\n\n $generatedAt = Carbon::parse('2026-02-24 01:00:00', 'America/Chicago');\n\n $result = $this->service->shouldSendReport($users, $generatedAt);\n\n $this->assertTrue($result);\n\n Carbon::setTestNow();\n }\n\n public function testShouldSendReportWhenGeneratedAfterScheduledTime(): void\n {\n Carbon::setTestNow(Carbon::parse('2026-02-24 10:00:00', 'America/Chicago'));\n\n $users = [\n ['email' => 'test@example.com', 'name' => 'Test User', 'timezone' => 'America/Chicago'],\n ];\n\n $generatedAt = Carbon::parse('2026-02-24 06:00:00', 'America/Chicago');\n\n $result = $this->service->shouldSendReport($users, $generatedAt);\n\n $this->assertFalse($result);\n\n Carbon::setTestNow();\n }\n\n public function testGetTypes(): void\n {\n $types = AutomatedReportsService::getTypes();\n\n $this->assertIsArray($types);\n $this->assertContains('exec_summary', $types);\n $this->assertContains('coaching_profiles', $types);\n $this->assertContains('loss_analysis', $types);\n $this->assertNotContains('ask_jiminny', $types);\n }\n\n public function testGetCallTypes(): void\n {\n $callTypes = AutomatedReportsService::getCallTypes();\n\n $this->assertIsArray($callTypes);\n $this->assertContains('conference', $callTypes);\n $this->assertContains('dialer', $callTypes);\n }\n\n public function testGetFrequencies(): void\n {\n $frequencies = AutomatedReportsService::getFrequencies();\n\n $this->assertIsArray($frequencies);\n $this->assertContains('weekly', $frequencies);\n $this->assertContains('monthly', $frequencies);\n $this->assertContains('quarterly', $frequencies);\n $this->assertContains('one_off', $frequencies);\n $this->assertNotContains('daily', $frequencies);\n }\n\n public function testGetAskJiminnyFrequencies(): void\n {\n $frequencies = AutomatedReportsService::getAskJiminnyFrequencies();\n\n $this->assertIsArray($frequencies);\n $this->assertContains('daily', $frequencies);\n $this->assertContains('weekly', $frequencies);\n $this->assertContains('monthly', $frequencies);\n $this->assertNotContains('quarterly', $frequencies);\n $this->assertNotContains('one_off', $frequencies);\n }\n\n public function testGetReportEnabledFieldData(): void\n {\n $result = $this->service->getReportEnabledFieldData(true);\n\n $this->assertEquals('report_enabled', $result['id']);\n $this->assertTrue($result['value']);\n }\n\n public function testGetReportEnabledFieldDataDefault(): void\n {\n $result = $this->service->getReportEnabledFieldData();\n\n $this->assertFalse($result['value']);\n }\n\n public function testGetOrganizationFieldDataShortVersion(): void\n {\n $mockTeamRepository = $this->createMock(TeamRepository::class);\n $mockTeamRepository->method('getTeamsForKiosk')->willReturn(new Collection([]));\n\n $service = $this->getService(mockTeamRepository: $mockTeamRepository);\n $result = $service->getOrganizationFieldData(null, true);\n\n $this->assertEquals('organization', $result['id']);\n $this->assertArrayNotHasKey('inputType', $result);\n $this->assertArrayHasKey('options', $result);\n }\n\n public function testGetOrganizationFieldDataFullVersion(): void\n {\n $mockTeamRepository = $this->createMock(TeamRepository::class);\n $mockTeamRepository->method('getTeamsForKiosk')->willReturn(new Collection([]));\n\n $service = $this->getService(mockTeamRepository: $mockTeamRepository);\n $result = $service->getOrganizationFieldData('team-uuid-1', false);\n\n $this->assertEquals('organization', $result['id']);\n $this->assertArrayHasKey('inputType', $result);\n $this->assertEquals('team-uuid-1', $result['value']);\n $this->assertArrayHasKey('dependencies', $result);\n }\n\n public function testGetTeamFieldDataShortVersion(): void\n {\n $result = $this->service->getTeamFieldData([], [], true);\n\n $this->assertEquals('teams', $result['id']);\n $this->assertArrayNotHasKey('inputType', $result);\n }\n\n public function testGetTeamFieldDataFullVersion(): void\n {\n $result = $this->service->getTeamFieldData(['opt1'], ['val1'], false);\n\n $this->assertEquals('teams', $result['id']);\n $this->assertArrayHasKey('inputType', $result);\n $this->assertEquals(['opt1'], $result['options']);\n $this->assertEquals(['val1'], $result['value']);\n }\n\n public function testGetReportTypeFieldDataShortVersion(): void\n {\n $result = $this->service->getReportTypeFieldData(null, true);\n\n $this->assertEquals('report_type', $result['id']);\n $this->assertArrayNotHasKey('inputType', $result);\n }\n\n public function testGetReportTypeFieldDataFullVersion(): void\n {\n $result = $this->service->getReportTypeFieldData('exec_summary', false);\n\n $this->assertEquals('report_type', $result['id']);\n $this->assertArrayHasKey('inputType', $result);\n $this->assertEquals('exec_summary', $result['value']);\n }\n\n public function testGetReportTypeFieldDataWithTeamHavingBothFeatures(): void\n {\n $team = $this->createMock(\\Jiminny\\Models\\Team::class);\n $team->method('hasFeature')->willReturnMap([\n [\\Jiminny\\Models\\Feature\\FeatureEnum::AUTOMATED_REPORTS, true],\n [\\Jiminny\\Models\\Feature\\FeatureEnum::ASK_JIMINNY_REPORTS, true],\n ]);\n\n $result = $this->service->getReportTypeFieldData(null, true, $team);\n\n $ids = array_column($result['options'], 'id');\n $this->assertContains('exec_summary', $ids);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $ids);\n $this->assertLessThan(\n array_search(AutomatedReportsService::TYPE_ASK_JIMINNY, $ids),\n array_search('exec_summary', $ids)\n );\n }\n\n public function testGetReportTypeFieldDataWithTeamHavingOnlyAutomatedReports(): void\n {\n $team = $this->createMock(\\Jiminny\\Models\\Team::class);\n $team->method('hasFeature')->willReturnMap([\n [\\Jiminny\\Models\\Feature\\FeatureEnum::AUTOMATED_REPORTS, true],\n [\\Jiminny\\Models\\Feature\\FeatureEnum::ASK_JIMINNY_REPORTS, false],\n ]);\n\n $result = $this->service->getReportTypeFieldData(null, true, $team);\n\n $ids = array_column($result['options'], 'id');\n $this->assertContains('exec_summary', $ids);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $ids);\n }\n\n public function testGetReportTypeFieldDataWithTeamHavingOnlyAskJiminny(): void\n {\n $team = $this->createMock(\\Jiminny\\Models\\Team::class);\n $team->method('hasFeature')->willReturnMap([\n [\\Jiminny\\Models\\Feature\\FeatureEnum::AUTOMATED_REPORTS, false],\n [\\Jiminny\\Models\\Feature\\FeatureEnum::ASK_JIMINNY_REPORTS, true],\n ]);\n\n $result = $this->service->getReportTypeFieldData(null, true, $team);\n\n $ids = array_column($result['options'], 'id');\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $ids);\n $this->assertNotContains('exec_summary', $ids);\n }\n\n public function testGetReportTypeFieldDataWithNullTeamFallsBackToStandardTypes(): void\n {\n $result = $this->service->getReportTypeFieldData(null, true, null);\n\n $ids = array_column($result['options'], 'id');\n $this->assertContains('exec_summary', $ids);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $ids);\n }\n\n public function testGetFrequencyFieldData(): void\n {\n $result = $this->service->getFrequencyFieldData('weekly');\n\n $this->assertEquals('frequency', $result['id']);\n $this->assertEquals('weekly', $result['value']);\n $this->assertArrayHasKey('options', $result);\n }\n\n public function testGetPeriodFieldData(): void\n {\n $result = $this->service->getPeriodFieldData('2025-01-01', '2025-01-31');\n\n $this->assertEquals('period', $result['id']);\n $this->assertEquals('2025-01-01', $result['value']['startDate']);\n $this->assertEquals('2025-01-31', $result['value']['endDate']);\n }\n\n public function testGetCallDurationFieldData(): void\n {\n $result = $this->service->getCallDurationFieldData(5, 60);\n\n $this->assertEquals('call_duration', $result['id']);\n $this->assertEquals(5, $result['value']['min']);\n $this->assertEquals(60, $result['value']['max']);\n }\n\n public function testGetDealValueFieldData(): void\n {\n $result = $this->service->getDealValueFieldData(1000, 5000);\n\n $this->assertEquals('deal_value', $result['id']);\n $this->assertEquals(1000, $result['value']['min']);\n $this->assertEquals(5000, $result['value']['max']);\n }\n\n public function testGetCustomReportNameFieldData(): void\n {\n $result = $this->service->getCustomReportNameFieldData('My Report');\n\n $this->assertEquals('custom_name', $result['id']);\n $this->assertEquals('My Report', $result['value']);\n }\n\n public function testGetAdditionalPromptInputFieldData(): void\n {\n $result = $this->service->getAdditionalPromptInputFieldData('Some prompt');\n\n $this->assertEquals('additional_prompt_input', $result['id']);\n $this->assertEquals('Some prompt', $result['value']);\n }\n\n public function testGetCallTypeFieldDataBothOn(): void\n {\n $result = $this->service->getCallTypeFieldData(true, true);\n\n $this->assertEquals('call_type', $result['id']);\n $this->assertCount(2, $result['value']);\n }\n\n public function testGetCallTypeFieldDataNoneOn(): void\n {\n $result = $this->service->getCallTypeFieldData(false, false);\n\n $this->assertEquals('call_type', $result['id']);\n $this->assertEmpty($result['value']);\n }\n\n public function testGetCallTypeFieldDataConferenceOnly(): void\n {\n $result = $this->service->getCallTypeFieldData(true, false);\n\n $this->assertCount(1, $result['value']);\n $this->assertEquals('conference', $result['value'][0]['id']);\n }\n\n public function testGetCallTypeFieldDataDialerOnly(): void\n {\n $result = $this->service->getCallTypeFieldData(false, true);\n\n $this->assertCount(1, $result['value']);\n $this->assertEquals('dialer', $result['value'][0]['id']);\n }\n\n public function testTransformDurationToMinutesNull(): void\n {\n $result = $this->service->transformDurationToMinutes(null);\n\n $this->assertNull($result);\n }\n\n public function testTransformDurationToMinutesZero(): void\n {\n $result = $this->service->transformDurationToMinutes(0);\n\n $this->assertNull($result);\n }\n\n public function testTransformDurationToMinutes(): void\n {\n $result = $this->service->transformDurationToMinutes(300);\n\n $this->assertEquals(5, $result);\n }\n\n public function testGetTeam(): void\n {\n $mockTeam = $this->createMock(Team::class);\n $mockTeamRepository = $this->createMock(TeamRepository::class);\n $mockTeamRepository->expects($this->once())\n ->method('idOrUuid')\n ->with('team-uuid')\n ->willReturn($mockTeam);\n\n $service = $this->getService(mockTeamRepository: $mockTeamRepository);\n $result = $service->getTeam('team-uuid');\n\n $this->assertSame($mockTeam, $result);\n }\n\n public function testGetTeamById(): void\n {\n $mockTeam = $this->createMock(Team::class);\n $mockTeamRepository = $this->createMock(TeamRepository::class);\n $mockTeamRepository->expects($this->once())\n ->method('find')\n ->with(42)\n ->willReturn($mockTeam);\n\n $service = $this->getService(mockTeamRepository: $mockTeamRepository);\n $result = $service->getTeamById(42);\n\n $this->assertSame($mockTeam, $result);\n }\n\n public function testGetGroupsUuidsEmpty(): void\n {\n $report = $this->createMock(AutomatedReport::class);\n $report->method('getGroups')->willReturn([]);\n\n $result = $this->service->getGroupsUuids($report);\n\n $this->assertEquals([], $result);\n }\n\n public function testGetGroupsUuidsWithGroups(): void\n {\n $mockGroup = $this->createMock(Group::class);\n $mockGroup->method('getUuid')->willReturn('group-uuid-1');\n\n $mockGroupRepository = $this->createMock(GroupRepository::class);\n $mockGroupRepository->method('find')->willReturnMap([\n [10, $mockGroup],\n [99, null],\n ]);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $mockGroupRepository,\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $report = $this->createMock(AutomatedReport::class);\n $report->method('getGroups')->willReturn([10, 99]);\n\n $result = $service->getGroupsUuids($report);\n\n $this->assertEquals(['group-uuid-1'], $result);\n }\n\n public function testGetPlaybookCategoriesUuidsEmpty(): void\n {\n $report = $this->createMock(AutomatedReport::class);\n $report->method('getPlaybookCategories')->willReturn([]);\n\n $result = $this->service->getPlaybookCategoriesUuids($report);\n\n $this->assertEquals([], $result);\n }\n\n public function testGetPlaybookCategoriesUuidsWithCategories(): void\n {\n $mockCategory = $this->createMock(\\Jiminny\\Models\\PlaybookCategory::class);\n $mockCategory->method('getUuid')->willReturn('cat-uuid-1');\n\n $mockPlaybookCategoryRepository = $this->createMock(PlaybookCategoryRepository::class);\n $mockPlaybookCategoryRepository->method('find')->willReturnMap([\n [1, $mockCategory],\n [2, null],\n ]);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $mockPlaybookCategoryRepository,\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $report = $this->createMock(AutomatedReport::class);\n $report->method('getPlaybookCategories')->willReturn([1, 2]);\n\n $result = $service->getPlaybookCategoriesUuids($report);\n\n $this->assertEquals(['cat-uuid-1'], $result);\n }\n\n public function testGetDealAtCallStagesUuidsEmpty(): void\n {\n $report = $this->createMock(AutomatedReport::class);\n $report->method('getDealAtCallStages')->willReturn([]);\n\n $result = $this->service->getDealAtCallStagesUuids($report);\n\n $this->assertEquals([], $result);\n }\n\n public function testGetDealAtCallStagesUuidsWithStages(): void\n {\n $mockStage = $this->createMock(\\Jiminny\\Models\\Stage::class);\n $mockStage->method('getUuid')->willReturn('stage-uuid-1');\n\n $mockStageRepository = $this->createMock(StageRepository::class);\n $mockStageRepository->method('find')->willReturnMap([\n [5, $mockStage],\n [9, null],\n ]);\n\n $service = $this->getService(mockStageRepository: $mockStageRepository);\n\n $report = $this->createMock(AutomatedReport::class);\n $report->method('getDealAtCallStages')->willReturn([5, 9]);\n\n $result = $service->getDealAtCallStagesUuids($report);\n\n $this->assertEquals(['stage-uuid-1'], $result);\n }\n\n public function testGetJiminnyUsersUuids(): void\n {\n $mockUser = $this->createMock(User::class);\n $mockUser->method('getUuid')->willReturn('user-uuid-1');\n\n $mockUserRepository = $this->createMock(UserRepository::class);\n $mockUserRepository->method('find')->willReturn($mockUser);\n\n $service = $this->getService(mockUserRepository: $mockUserRepository);\n\n $report = $this->createMock(AutomatedReport::class);\n $report->method('getJiminnyRecipients')->willReturn(['users' => [1]]);\n\n $result = $service->getJiminnyUsersUuids($report);\n\n $this->assertEquals(['user-uuid-1'], $result);\n }\n\n public function testGetRecipientUsers(): void\n {\n $mockUser = $this->createMock(User::class);\n $mockUser->method('getEmailAddress')->willReturn('user@test.com');\n $mockUser->method('getName')->willReturn('Test User');\n $timezone = $this->createMock(\\DateTimeZone::class);\n $timezone->method('getName')->willReturn('UTC');\n $mockUser->method('getTimezone')->willReturn($timezone);\n\n $mockUserRepository = $this->createMock(UserRepository::class);\n $mockUserRepository->method('find')->willReturn($mockUser);\n\n $service = $this->getService(mockUserRepository: $mockUserRepository);\n\n $report = $this->createMock(AutomatedReport::class);\n $report->method('getRecipients')->willReturn(['users' => [1]]);\n\n $result = $service->getRecipientUsers($report);\n\n $this->assertCount(1, $result);\n $this->assertEquals('user@test.com', $result[0]['email']);\n $this->assertEquals('Test User', $result[0]['name']);\n }\n\n public function testGetValidRecipientUsersFiltersEmptyEmail(): void\n {\n $mockUserWithEmail = $this->createMock(User::class);\n $mockUserWithEmail->method('getEmailAddress')->willReturn('valid@test.com');\n $mockUserWithEmail->method('getName')->willReturn('Valid User');\n $timezone = $this->createMock(\\DateTimeZone::class);\n $timezone->method('getName')->willReturn('UTC');\n $mockUserWithEmail->method('getTimezone')->willReturn($timezone);\n\n $mockUserNoEmail = $this->createMock(User::class);\n $mockUserNoEmail->method('getEmailAddress')->willReturn('');\n $mockUserNoEmail->method('getName')->willReturn('No Email User');\n $mockUserNoEmail->method('getTimezone')->willReturn($timezone);\n\n $mockUserRepository = $this->createMock(UserRepository::class);\n $mockUserRepository->method('find')->willReturnMap([\n [1, $mockUserWithEmail],\n [2, $mockUserNoEmail],\n ]);\n\n $service = $this->getService(mockUserRepository: $mockUserRepository);\n\n $report = $this->createMock(AutomatedReport::class);\n $report->method('getRecipients')->willReturn(['users' => [1, 2]]);\n $report->method('getJiminnyRecipients')->willReturn(['users' => []]);\n\n $result = $service->getValidRecipientUsers($report);\n\n $this->assertCount(1, $result);\n $this->assertEquals('valid@test.com', $result[0]['email']);\n }\n\n public function testGetValidRecipientUsersWithJiminny(): void\n {\n $tz = $this->createMock(\\DateTimeZone::class);\n $tz->method('getName')->willReturn('UTC');\n\n $mockUser1 = $this->createMock(User::class);\n $mockUser1->method('getEmailAddress')->willReturn('user1@test.com');\n $mockUser1->method('getName')->willReturn('User1');\n $mockUser1->method('getTimezone')->willReturn($tz);\n\n $mockUser2 = $this->createMock(User::class);\n $mockUser2->method('getEmailAddress')->willReturn('jiminny@test.com');\n $mockUser2->method('getName')->willReturn('Jiminny');\n $mockUser2->method('getTimezone')->willReturn($tz);\n\n $mockUserRepository = $this->createMock(UserRepository::class);\n $mockUserRepository->method('find')->willReturnMap([\n [1, $mockUser1],\n [2, $mockUser2],\n ]);\n\n $service = $this->getService(mockUserRepository: $mockUserRepository);\n\n $report = $this->createMock(AutomatedReport::class);\n $report->method('getRecipients')->willReturn(['users' => [1]]);\n $report->method('getJiminnyRecipients')->willReturn(['users' => [2]]);\n\n $result = $service->getValidRecipientUsers($report, true);\n\n $this->assertCount(2, $result);\n }\n\n public function testGetReportTypeName(): void\n {\n $report = $this->createMock(AutomatedReport::class);\n $report->method('getType')->willReturn('exec_summary');\n\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getReport')->willReturn($report);\n\n $result = $this->service->getReportTypeName($mockResult);\n\n $this->assertEquals('Exec Summary', $result);\n }\n\n public function testGetReportPeriodNameThrowsOnNullFrom(): void\n {\n $report = $this->createMock(AutomatedReport::class);\n $report->method('getFrequency')->willReturn('weekly');\n\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getReport')->willReturn($report);\n $mockResult->method('getFromDate')->willReturn(null);\n $mockResult->method('getToDate')->willReturn(IlluminateCarbon::parse('2025-01-15'));\n\n $this->expectException(\\Jiminny\\Exceptions\\ApplicationException::class);\n\n $this->service->getReportPeriodName($mockResult);\n }\n\n public function testGetReportPeriodNameThrowsOnNullTo(): void\n {\n $report = $this->createMock(AutomatedReport::class);\n $report->method('getFrequency')->willReturn('weekly');\n\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getReport')->willReturn($report);\n $mockResult->method('getFromDate')->willReturn(IlluminateCarbon::parse('2025-01-08'));\n $mockResult->method('getToDate')->willReturn(null);\n\n $this->expectException(\\Jiminny\\Exceptions\\ApplicationException::class);\n\n $this->service->getReportPeriodName($mockResult);\n }\n\n #[DataProvider('formatReportPeriodNameDataProvider')]\n public function testGetReportPeriodName(\n string $frequency,\n string $from,\n string $to,\n string $expected\n ): void {\n $report = $this->createMock(AutomatedReport::class);\n $report->method('getFrequency')->willReturn($frequency);\n\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getReport')->willReturn($report);\n $mockResult->method('getFromDate')->willReturn(IlluminateCarbon::parse($from));\n $mockResult->method('getToDate')->willReturn(IlluminateCarbon::parse($to));\n\n $result = $this->service->getReportPeriodName($mockResult);\n\n $this->assertEquals($expected, $result);\n }\n\n public static function formatReportPeriodNameDataProvider(): array\n {\n return [\n 'daily' => [\n 'frequency' => 'daily',\n 'from' => '2025-05-15',\n 'to' => '2025-05-15',\n 'expected' => '15 May 2025',\n ],\n 'monthly same year' => [\n 'frequency' => 'monthly',\n 'from' => '2025-05-01',\n 'to' => '2025-05-31',\n 'expected' => 'May 2025',\n ],\n 'weekly same month' => [\n 'frequency' => 'weekly',\n 'from' => '2025-08-04',\n 'to' => '2025-08-08',\n 'expected' => '4 - 8 Aug 2025',\n ],\n 'weekly different months same year' => [\n 'frequency' => 'weekly',\n 'from' => '2025-10-27',\n 'to' => '2025-11-03',\n 'expected' => '27 Oct - 3 Nov 2025',\n ],\n 'weekly different years' => [\n 'frequency' => 'weekly',\n 'from' => '2024-12-28',\n 'to' => '2025-01-03',\n 'expected' => '28 Dec 2024 - 3 Jan 2025',\n ],\n 'quarterly same year' => [\n 'frequency' => 'quarterly',\n 'from' => '2025-01-01',\n 'to' => '2025-04-01',\n 'expected' => 'Jan - Mar 2025',\n ],\n 'quarterly different years' => [\n 'frequency' => 'quarterly',\n 'from' => '2024-11-01',\n 'to' => '2025-02-01',\n 'expected' => 'Nov 2024 - Jan 2025',\n ],\n 'one_off same month' => [\n 'frequency' => 'one_off',\n 'from' => '2025-05-02',\n 'to' => '2025-05-31',\n 'expected' => '2 - 31 May 2025',\n ],\n 'one_off different months same year' => [\n 'frequency' => 'one_off',\n 'from' => '2025-05-15',\n 'to' => '2025-06-15',\n 'expected' => '15 May - 15 Jun 2025',\n ],\n 'one_off different years' => [\n 'frequency' => 'one_off',\n 'from' => '2024-12-15',\n 'to' => '2025-01-15',\n 'expected' => '15 Dec 2024 - 15 Jan 2025',\n ],\n 'unknown frequency falls back to default' => [\n 'frequency' => 'unknown',\n 'from' => '2025-05-01',\n 'to' => '2025-05-31',\n 'expected' => '1 May 2025 - 31 May 2025',\n ],\n ];\n }\n\n public function testGetReportTeamsNameEmpty(): void\n {\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getGroups')->willReturn([]);\n\n $result = $this->service->getReportTeamsName($mockResult);\n\n $this->assertEquals('All', $result);\n }\n\n public function testGetReportTeamsNameSingleGroup(): void\n {\n $mockGroup = $this->createMock(Group::class);\n $mockGroup->method('getName')->willReturn('Sales Team');\n\n $mockGroupRepository = $this->createMock(GroupRepository::class);\n $mockGroupRepository->method('find')->willReturn($mockGroup);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $mockGroupRepository,\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getGroups')->willReturn([10]);\n\n $result = $service->getReportTeamsName($mockResult);\n\n $this->assertEquals('Sales Team', $result);\n }\n\n public function testGetReportTeamsNameMultipleGroups(): void\n {\n $mockGroup1 = $this->createMock(Group::class);\n $mockGroup1->method('getName')->willReturn('Sales Team');\n\n $mockGroup2 = $this->createMock(Group::class);\n $mockGroup2->method('getName')->willReturn('Marketing Team');\n\n $mockGroupRepository = $this->createMock(GroupRepository::class);\n $mockGroupRepository->method('find')->willReturnMap([\n [10, $mockGroup1],\n [20, $mockGroup2],\n [99, null],\n ]);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $mockGroupRepository,\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getGroups')->willReturn([10, 20, 99]);\n\n $result = $service->getReportTeamsName($mockResult);\n\n $this->assertEquals('Sales Team, Marketing Team', $result);\n }\n\n public function testGetReportFound(): void\n {\n $mockReport = $this->createMock(AutomatedReport::class);\n\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n $mockRepo->expects($this->once())\n ->method('findByUuid')\n ->with('report-uuid')\n ->willReturn($mockReport);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $result = $service->getReport('report-uuid');\n\n $this->assertSame($mockReport, $result);\n }\n\n public function testGetReportNotFound(): void\n {\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n $mockRepo->method('findByUuid')->willReturn(null);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $this->expectException(ModelNotFoundException::class);\n\n $service->getReport('non-existent-uuid');\n }\n\n public function testDeleteReportNotFound(): void\n {\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n $mockRepo->method('findByUuid')->willReturn(null);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $this->expectException(ModelNotFoundException::class);\n\n $service->delete('non-existent-uuid');\n }\n\n public function testDeleteReportSuccess(): void\n {\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->expects($this->once())->method('delete');\n\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n $mockRepo->method('findByUuid')->willReturn($mockReport);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $service->delete('report-uuid');\n }\n\n public function testUpdateStatusNotFound(): void\n {\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n $mockRepo->method('findByUuid')->willReturn(null);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $this->expectException(ModelNotFoundException::class);\n\n $service->updateStatus('non-existent-uuid', ['report_enabled' => true]);\n }\n\n public function testGetReportResultFound(): void\n {\n $mockResult = $this->createMock(AutomatedReportResult::class);\n\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n $mockRepo->expects($this->once())\n ->method('findResultByUuid')\n ->with('result-uuid')\n ->willReturn($mockResult);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $result = $service->getReportResult('result-uuid');\n\n $this->assertSame($mockResult, $result);\n }\n\n public function testGetReportResultNotFound(): void\n {\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n $mockRepo->method('findResultByUuid')->willReturn(null);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $this->expectException(ModelNotFoundException::class);\n\n $service->getReportResult('non-existent-uuid');\n }\n\n public function testFindChildResult(): void\n {\n $mockParent = $this->createMock(AutomatedReportResult::class);\n $mockChild = $this->createMock(AutomatedReportResult::class);\n\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n $mockRepo->expects($this->once())\n ->method('findChildResult')\n ->with($mockParent, 'podcast')\n ->willReturn($mockChild);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $result = $service->findChildResult($mockParent, 'podcast');\n\n $this->assertSame($mockChild, $result);\n }\n\n #[DataProvider('calculateFromAndToDatePeriodDataProvider')]\n public function testCalculateFromAndToDatePeriod(string $frequency): void\n {\n Carbon::setTestNow(Carbon::parse('2025-06-15 12:00:00'));\n\n $result = $this->service->calculateFromAndToDatePeriod($frequency);\n\n $this->assertArrayHasKey('fromDate', $result);\n $this->assertArrayHasKey('toDate', $result);\n $this->assertInstanceOf(Carbon::class, $result['fromDate']);\n $this->assertInstanceOf(Carbon::class, $result['toDate']);\n\n Carbon::setTestNow();\n }\n\n public static function calculateFromAndToDatePeriodDataProvider(): array\n {\n return [\n 'daily' => ['daily'],\n 'weekly' => ['weekly'],\n 'monthly' => ['monthly'],\n 'quarterly' => ['quarterly'],\n ];\n }\n\n public function testCalculateFromAndToDatePeriodOneOff(): void\n {\n $from = IlluminateCarbon::parse('2025-01-01');\n $to = IlluminateCarbon::parse('2025-01-31');\n\n $result = $this->service->calculateFromAndToDatePeriod('one_off', $from, $to);\n\n $this->assertSame($from, $result['fromDate']);\n $this->assertSame($to, $result['toDate']);\n }\n\n public function testCalculateFromAndToDatePeriodInvalidFrequency(): void\n {\n $this->expectException(InvalidArgumentException::class);\n\n $this->service->calculateFromAndToDatePeriod('invalid_frequency');\n }\n\n public function testGetMediaPath(): void\n {\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getMediaType')->willReturn(AutomatedReportsService::MEDIA_TYPE_PDF);\n $mockResult->method('getPdfUrl')->willReturn('https://example.com/reports/file.pdf');\n\n $result = $this->service->getMediaPath($mockResult);\n\n $this->assertEquals('/reports/file.pdf', $result);\n }\n\n public function testGetMediaPathPodcast(): void\n {\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getMediaType')->willReturn(AutomatedReportsService::MEDIA_TYPE_PODCAST);\n $mockResult->method('getPodcastAudioUrl')->willReturn('https://example.com/audio/file.mp3');\n\n $result = $this->service->getMediaPath($mockResult);\n\n $this->assertEquals('/audio/file.mp3', $result);\n }\n\n public function testGetMediaPathNullUrl(): void\n {\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getMediaType')->willReturn('unknown_type');\n\n $result = $this->service->getMediaPath($mockResult);\n\n $this->assertNull($result);\n }\n\n public function testGetMediaPathPdfNullUrl(): void\n {\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getMediaType')->willReturn(AutomatedReportsService::MEDIA_TYPE_PDF);\n $mockResult->method('getPdfUrl')->willReturn(null);\n\n $result = $this->service->getMediaPath($mockResult);\n\n $this->assertNull($result);\n }\n\n public function testGetFilenameSuffixPodcast(): void\n {\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getMediaType')->willReturn(AutomatedReportsService::MEDIA_TYPE_PODCAST);\n\n $result = $this->service->getFilenameSuffix($mockResult);\n\n $this->assertEquals('Podcast', $result);\n }\n\n public function testGetFilenameSuffixPdf(): void\n {\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getMediaType')->willReturn(AutomatedReportsService::MEDIA_TYPE_PDF);\n\n $result = $this->service->getFilenameSuffix($mockResult);\n\n $this->assertNull($result);\n }\n\n public function testGetMailSubjectSuffixPdf(): void\n {\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getMediaType')->willReturn(AutomatedReportsService::MEDIA_TYPE_PDF);\n\n $result = $this->service->getMailSubjectSuffix($mockResult);\n\n $this->assertEquals('report', $result);\n }\n\n public function testGetMailSubjectSuffixPodcast(): void\n {\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getMediaType')->willReturn(AutomatedReportsService::MEDIA_TYPE_PODCAST);\n\n $result = $this->service->getMailSubjectSuffix($mockResult);\n\n $this->assertEquals('podcast', $result);\n }\n\n public function testGetMailSubjectSuffixUnknown(): void\n {\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getMediaType')->willReturn('unknown_type');\n\n $result = $this->service->getMailSubjectSuffix($mockResult);\n\n $this->assertEquals('', $result);\n }\n\n public function testGetMediaTypeMetadataPdf(): void\n {\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getMediaType')->willReturn(AutomatedReportsService::MEDIA_TYPE_PDF);\n\n $result = $this->service->getMediaTypeMetadata($mockResult);\n\n $this->assertEquals('pdf', $result['extension']);\n $this->assertEquals('application/pdf', $result['mime']);\n }\n\n public function testGetMediaTypeMetadataPodcast(): void\n {\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getMediaType')->willReturn(AutomatedReportsService::MEDIA_TYPE_PODCAST);\n\n $result = $this->service->getMediaTypeMetadata($mockResult);\n\n $this->assertEquals('mp3', $result['extension']);\n $this->assertEquals('audio/mpeg', $result['mime']);\n }\n\n public function testGetMediaTypeMetadataUnknown(): void\n {\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getMediaType')->willReturn('unknown');\n\n $result = $this->service->getMediaTypeMetadata($mockResult);\n\n $this->assertNull($result['extension']);\n $this->assertNull($result['mime']);\n }\n\n public function testGetTeamIdsWithReportsResults(): void\n {\n $expected = new Collection([1, 2, 3]);\n\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n $mockRepo->expects($this->once())\n ->method('getTeamIdsWithReportsResults')\n ->with(5)\n ->willReturn($expected);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $result = $service->getTeamIdsWithReportsResults(5);\n\n $this->assertSame($expected, $result);\n }\n\n public function testGetTeamReports(): void\n {\n $mockTeam = $this->createMock(Team::class);\n $expected = new \\Illuminate\\Database\\Eloquent\\Collection();\n\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n $mockRepo->expects($this->once())\n ->method('getReportsByTeam')\n ->with($mockTeam)\n ->willReturn($expected);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $result = $service->getTeamReports($mockTeam);\n\n $this->assertSame($expected, $result);\n }\n\n public function testGetReportResults(): void\n {\n $mockReport = $this->createMock(AutomatedReport::class);\n $expected = new \\Illuminate\\Database\\Eloquent\\Collection();\n\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n $mockRepo->expects($this->once())\n ->method('getResultsByReport')\n ->with($mockReport)\n ->willReturn($expected);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $result = $service->getReportResults($mockReport);\n\n $this->assertSame($expected, $result);\n }\n\n public function testDeleteReportsResultsInRetentionPeriodNoReports(): void\n {\n $mockTeam = $this->createMock(Team::class);\n $retentionDate = \\Carbon\\CarbonImmutable::parse('2025-01-01');\n\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n $mockRepo->expects($this->once())\n ->method('getReportIdsByTeam')\n ->willReturn(new Collection([]));\n $mockRepo->expects($this->never())\n ->method('getReportResultsQueryForRetention');\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $result = $service->deleteReportsResultsInRetentionPeriod($mockTeam, $retentionDate);\n\n $this->assertEquals(0, $result);\n }\n\n public function testDeleteReportsResultsInRetentionPeriodWithNoQueryResults(): void\n {\n $mockTeam = $this->createMock(Team::class);\n $mockTeam->method('getId')->willReturn(1);\n $retentionDate = \\Carbon\\CarbonImmutable::parse('2025-01-01');\n\n $mockQuery = Mockery::mock(Builder::class);\n $mockQuery->shouldReceive('exists')->andReturn(false);\n\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n $mockRepo->method('getReportIdsByTeam')->willReturn(new Collection([1, 2]));\n $mockRepo->method('getReportResultsQueryForRetention')->willReturn($mockQuery);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n Log::shouldReceive('info')->zeroOrMoreTimes();\n\n $result = $service->deleteReportsResultsInRetentionPeriod($mockTeam, $retentionDate);\n\n $this->assertEquals(0, $result);\n }\n\n public function testUpdateAskJiminnyReportStatusNotAskJiminny(): void\n {\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('isAskJiminnyReport')->willReturn(false);\n\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $mockUser = $this->createMock(User::class);\n\n $this->expectException(InvalidArgumentException::class);\n $this->expectExceptionMessage('Report is not an Ask Jiminny report');\n\n $service->updateAskJiminnyReport($mockReport, [], $mockUser);\n }\n\n public function testGetAskJiminnyReportFilters(): void\n {\n $mockUser = $this->createMock(User::class);\n\n $mockSearch = $this->createMock(Search::class);\n $mockSearch->method('getUuid')->willReturn('search-uuid-1');\n $mockSearch->method('getName')->willReturn('My Search');\n\n $mockSearchRepository = $this->createMock(SearchRepository::class);\n $mockSearchRepository->expects($this->once())\n ->method('findByUserOrderedByName')\n ->with($mockUser)\n ->willReturn(new Collection([$mockSearch]));\n\n $mockPromptDto = new AskAnythingPromptDto(\n id: 'prompt-uuid-1',\n title: 'My Prompt',\n content: 'Prompt text',\n target: AskAnythingPromptTarget::on_demand,\n );\n\n $mockPromptService = $this->createMock(AskAnythingPromptService::class);\n $mockPromptService->expects($this->once())\n ->method('get')\n ->with($mockUser, AskAnythingPromptTarget::on_demand)\n ->willReturn([$mockPromptDto]);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $mockPromptService,\n $mockSearchRepository,\n $this->createMock(AskAnythingRepository::class),\n );\n\n $result = $service->getAskJiminnyReportFilters($mockUser);\n\n $this->assertCount(2, $result);\n $promptFilter = collect($result)->firstWhere('id', 'prompt');\n $searchFilter = collect($result)->firstWhere('id', 'saved_search');\n\n $this->assertCount(1, $promptFilter['options']);\n $this->assertEquals('prompt-uuid-1', $promptFilter['options'][0]['id']);\n $this->assertCount(1, $searchFilter['options']);\n $this->assertEquals('search-uuid-1', $searchFilter['options'][0]['id']);\n }\n\n public function testGetAskJiminnyReportFormDataWithoutReport(): void\n {\n $timezone = new \\DateTimeZone('UTC');\n\n $mockUser = $this->createMock(User::class);\n $mockUser->method('getTimezone')->willReturn($timezone);\n\n $mockTeam = $this->createMock(Team::class);\n $mockUser->method('getTeam')->willReturn($mockTeam);\n\n $mockSearchRepository = $this->createMock(SearchRepository::class);\n $mockSearchRepository->method('findByUserOrderedByName')->willReturn(new Collection([]));\n\n $mockPromptService = $this->createMock(AskAnythingPromptService::class);\n $mockPromptService->method('get')->willReturn([]);\n\n $mockGroupRepository = $this->createMock(GroupRepository::class);\n $mockGroupRepository->method('getAllByTeam')->willReturn(new \\Illuminate\\Database\\Eloquent\\Collection([]));\n\n $mockRecipientsService = $this->createMock(RecipientsService::class);\n $mockRecipientsService->method('getRecipientsFieldData')->willReturn(['options' => []]);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $mockGroupRepository,\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $mockRecipientsService,\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $mockPromptService,\n $mockSearchRepository,\n $this->createMock(AskAnythingRepository::class),\n );\n\n $result = $service->getAskJiminnyReportFormData($mockUser);\n\n $this->assertArrayHasKey('fields', $result);\n $this->assertIsArray($result['fields']);\n\n $fieldIds = array_column($result['fields'], 'id');\n $this->assertContains('enabled', $fieldIds);\n $this->assertContains('report_name', $fieldIds);\n $this->assertContains('frequency', $fieldIds);\n $this->assertContains('expires_on', $fieldIds);\n $this->assertContains('saved_search', $fieldIds);\n $this->assertContains('ask_jiminny_prompt', $fieldIds);\n }\n\n public function testGetAskJiminnyReportFormDataWithReport(): void\n {\n $timezone = new \\DateTimeZone('UTC');\n\n $mockUser = $this->createMock(User::class);\n $mockUser->method('getTimezone')->willReturn($timezone);\n\n $mockTeam = $this->createMock(Team::class);\n $mockUser->method('getTeam')->willReturn($mockTeam);\n\n $mockSavedSearch = $this->createMock(Search::class);\n $mockSavedSearch->method('getUuid')->willReturn('search-uuid');\n $mockSavedSearch->method('getName')->willReturn('My Search');\n\n $mockPromptModel = $this->createMock(AskAnythingPrompt::class);\n $mockPromptModel->method('getUuid')->willReturn('prompt-uuid');\n $mockPromptModel->method('getTitle')->willReturn('My Prompt');\n\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getStatus')->willReturn(true);\n $mockReport->method('getCustomName')->willReturn('Test Report');\n $mockReport->method('getFrequency')->willReturn('daily');\n $mockReport->method('getExpiresAt')->willReturn(IlluminateCarbon::parse('2025-12-31'));\n $mockReport->method('getGroups')->willReturn([]);\n $mockReport->method('getRecipients')->willReturn(['users' => []]);\n $mockReport->method('getAttribute')->with('created_by')->willReturn(1);\n $mockReport->method('getSavedSearch')->willReturn($mockSavedSearch);\n $mockReport->method('getAskAnythingPrompt')->willReturn($mockPromptModel);\n\n $mockSearchRepository = $this->createMock(SearchRepository::class);\n $mockSearchRepository->method('findByUserOrderedByName')->willReturn(new Collection([]));\n\n $mockPromptService = $this->createMock(AskAnythingPromptService::class);\n $mockPromptService->method('get')->willReturn([]);\n\n $mockGroupRepository = $this->createMock(GroupRepository::class);\n $mockGroupRepository->method('getAllByTeam')->willReturn(new \\Illuminate\\Database\\Eloquent\\Collection([]));\n\n $mockRecipientsService = $this->createMock(RecipientsService::class);\n $mockRecipientsService->method('getRecipientsFieldData')->willReturn(['options' => []]);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $mockGroupRepository,\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $mockRecipientsService,\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $mockPromptService,\n $mockSearchRepository,\n $this->createMock(AskAnythingRepository::class),\n );\n\n $result = $service->getAskJiminnyReportFormData($mockUser, $mockReport);\n\n $fields = collect($result['fields'])->keyBy('id');\n\n $this->assertTrue($fields['enabled']['value']);\n $this->assertEquals('Test Report', $fields['report_name']['value']);\n }\n\n public function testValidateAskJiminnyReportDataMissingName(): void\n {\n $mockUser = $this->createMock(User::class);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $this->expectException(InvalidArgumentException::class);\n $this->expectExceptionMessage('Report name is required');\n\n $service->createAskJiminnyReport(['report_name' => ''], $mockUser);\n }\n\n public function testValidateAskJiminnyReportDataNameTooLong(): void\n {\n $mockUser = $this->createMock(User::class);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $this->expectException(InvalidArgumentException::class);\n $this->expectExceptionMessage('Report name must be 50 characters or less');\n\n $service->createAskJiminnyReport(['report_name' => str_repeat('a', 51)], $mockUser);\n }\n\n public function testValidateAskJiminnyReportDataInvalidFrequency(): void\n {\n $mockUser = $this->createMock(User::class);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $this->expectException(InvalidArgumentException::class);\n $this->expectExceptionMessage('Frequency must be daily, weekly, or monthly');\n\n $service->createAskJiminnyReport(['report_name' => 'Valid Name', 'frequency' => 'quarterly'], $mockUser);\n }\n\n public function testValidateAskJiminnyReportDataMissingExpiresOn(): void\n {\n $mockUser = $this->createMock(User::class);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $this->expectException(InvalidArgumentException::class);\n $this->expectExceptionMessage('Expiration date is required');\n\n $service->createAskJiminnyReport(\n ['report_name' => 'Valid Name', 'frequency' => 'daily'],\n $mockUser\n );\n }\n\n public function testValidateAskJiminnyReportDataExpiresInPast(): void\n {\n $mockUser = $this->createMock(User::class);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $this->expectException(InvalidArgumentException::class);\n $this->expectExceptionMessage('Expiration date cannot be in the past');\n\n $service->createAskJiminnyReport(\n ['report_name' => 'Valid Name', 'frequency' => 'daily', 'expires_on' => '2020-01-01'],\n $mockUser\n );\n }\n\n public function testValidateAskJiminnyReportDataExpiresTooFar(): void\n {\n $mockUser = $this->createMock(User::class);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $this->expectException(InvalidArgumentException::class);\n $this->expectExceptionMessage('Expiration date cannot be more than 1 year from now');\n\n $service->createAskJiminnyReport(\n ['report_name' => 'Valid Name', 'frequency' => 'daily', 'expires_on' => '2099-01-01'],\n $mockUser\n );\n }\n\n public function testValidateAskJiminnyReportDataExpiresExactlyOneYearLaterTimeOfDayIsAccepted(): void\n {\n Carbon::setTestNow(Carbon::parse('2026-04-20 09:00:00'));\n\n try {\n $mockUser = $this->createMock(User::class);\n $mockUser->method('getId')->willReturn(1);\n $mockUser->method('getTeamId')->willReturn(1);\n\n $savedSearch = $this->createMock(Search::class);\n $savedSearch->method('getId')->willReturn(10);\n\n $prompt = $this->createMock(AskAnythingPrompt::class);\n $prompt->method('getId')->willReturn(5);\n\n $activitySearchRepository = $this->createMock(SearchRepository::class);\n $activitySearchRepository->method('findByUuidAndUser')->willReturn($savedSearch);\n\n $askAnythingRepository = $this->createMock(AskAnythingRepository::class);\n $askAnythingRepository->method('getPromptByUuid')->willReturn($prompt);\n\n $automatedReportsRepository = $this->createMock(AutomatedReportsRepository::class);\n $automatedReportsRepository->method('create')->willReturn($this->createMock(AutomatedReport::class));\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $automatedReportsRepository,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $activitySearchRepository,\n $askAnythingRepository,\n );\n\n $service->createAskJiminnyReport([\n 'report_name' => 'Valid Name',\n 'frequency' => 'daily',\n 'expires_on' => '2027-04-20T23:00:00',\n 'saved_search' => 'some-uuid',\n 'ask_jiminny_prompt' => 'prompt-uuid',\n ], $mockUser);\n\n $this->assertTrue(true);\n } finally {\n Carbon::setTestNow();\n }\n }\n\n public function testValidateAskJiminnyReportDataMissingSavedSearch(): void\n {\n $mockUser = $this->createMock(User::class);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $this->expectException(InvalidArgumentException::class);\n $this->expectExceptionMessage('Saved search is required');\n\n $service->createAskJiminnyReport(\n ['report_name' => 'Valid Name', 'frequency' => 'daily', 'expires_on' => now()->addMonth()->toDateString()],\n $mockUser\n );\n }\n\n public function testValidateAskJiminnyReportDataSavedSearchNotFound(): void\n {\n $mockUser = $this->createMock(User::class);\n\n $mockSearchRepository = $this->createMock(SearchRepository::class);\n $mockSearchRepository->method('findByUuidAndUser')->willReturn(null);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $mockSearchRepository,\n $this->createMock(AskAnythingRepository::class),\n );\n\n $this->expectException(InvalidArgumentException::class);\n $this->expectExceptionMessage('Saved search not found or does not belong to you');\n\n $service->createAskJiminnyReport(\n [\n 'report_name' => 'Valid Name',\n 'frequency' => 'daily',\n 'expires_on' => now()->addMonth()->toDateString(),\n 'saved_search' => 'non-existent-uuid',\n ],\n $mockUser\n );\n }\n\n public function testValidateAskJiminnyReportDataMissingPrompt(): void\n {\n $mockUser = $this->createMock(User::class);\n\n $mockSearch = $this->createMock(Search::class);\n $mockSearchRepository = $this->createMock(SearchRepository::class);\n $mockSearchRepository->method('findByUuidAndUser')->willReturn($mockSearch);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $mockSearchRepository,\n $this->createMock(AskAnythingRepository::class),\n );\n\n $this->expectException(InvalidArgumentException::class);\n $this->expectExceptionMessage('Ask Jiminny prompt is required');\n\n $service->createAskJiminnyReport(\n [\n 'report_name' => 'Valid Name',\n 'frequency' => 'daily',\n 'expires_on' => now()->addMonth()->toDateString(),\n 'saved_search' => 'search-uuid',\n ],\n $mockUser\n );\n }\n\n public function testValidateAskJiminnyReportDataPromptNotFound(): void\n {\n $mockUser = $this->createMock(User::class);\n\n $mockSearch = $this->createMock(Search::class);\n $mockSearchRepository = $this->createMock(SearchRepository::class);\n $mockSearchRepository->method('findByUuidAndUser')->willReturn($mockSearch);\n\n $mockAskAnythingRepository = $this->createMock(AskAnythingRepository::class);\n $mockAskAnythingRepository->method('getPromptByUuid')->willReturn(null);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $mockSearchRepository,\n $mockAskAnythingRepository,\n );\n\n $this->expectException(InvalidArgumentException::class);\n $this->expectExceptionMessage('Ask Jiminny prompt not found');\n\n $service->createAskJiminnyReport(\n [\n 'report_name' => 'Valid Name',\n 'frequency' => 'daily',\n 'expires_on' => now()->addMonth()->toDateString(),\n 'saved_search' => 'search-uuid',\n 'ask_jiminny_prompt' => 'non-existent-prompt-uuid',\n ],\n $mockUser\n );\n }\n\n public function testTransformRecipientsWithNullUsers(): void\n {\n $reflection = new \\ReflectionClass(AutomatedReportsService::class);\n $method = $reflection->getMethod('transformRecipients');\n $method->setAccessible(true);\n\n $result = $method->invoke($this->service, []);\n\n $this->assertEquals([], $result);\n }\n\n public function testTransformRecipientsWithUsersKey(): void\n {\n $mockUser = $this->createMock(User::class);\n $mockUser->method('getUuid')->willReturn('user-uuid-1');\n $mockUser->method('getName')->willReturn('User One');\n $mockUser->method('getEmailAddress')->willReturn('user1@test.com');\n $mockUser->method('getPhotoUrl')->willReturn(null);\n\n $mockUserRepository = $this->createMock(UserRepository::class);\n $mockUserRepository->method('find')->willReturn($mockUser);\n\n $service = $this->getService(mockUserRepository: $mockUserRepository);\n\n $reflection = new \\ReflectionClass(AutomatedReportsService::class);\n $method = $reflection->getMethod('transformRecipients');\n $method->setAccessible(true);\n\n $result = $method->invoke($service, ['users' => [1]]);\n\n $this->assertCount(1, $result);\n $this->assertEquals('user-uuid-1', $result[0]['id']);\n }\n\n public function testGetTeamsGroupsOptions(): void\n {\n $mockTeamRepository = $this->createMock(TeamRepository::class);\n\n $mockTeam = $this->createMock(Team::class);\n $mockTeam->method('getUuid')->willReturn('team-uuid-1');\n $mockTeam->method('getName')->willReturn('Sales Team');\n $mockTeam->method('hasFeature')\n ->with(FeatureEnum::AUTOMATED_REPORTS)\n ->willReturn(true);\n\n $mockGroupsRelation = $this->createMock(HasMany::class);\n $mockGroupsRelation->method('get')->willReturn(new \\Illuminate\\Database\\Eloquent\\Collection([]));\n $mockTeam->method('groups')->willReturn($mockGroupsRelation);\n\n $mockTeamRepository->method('getTeamsForKiosk')->willReturn(new Collection([$mockTeam]));\n $mockTeamRepository->method('idOrUuid')->willReturn($mockTeam);\n\n $service = $this->getService(mockTeamRepository: $mockTeamRepository);\n\n $result = $service->getTeamsGroupsOptions();\n\n $this->assertCount(1, $result);\n $this->assertEquals('Sales Team', $result[0]['label']);\n $this->assertArrayHasKey('groups', $result[0]);\n }\n\n public function testGetTeamsGroupsOptionsWithFilter(): void\n {\n $mockTeamRepository = $this->createMock(TeamRepository::class);\n\n $mockTeam1 = $this->createMock(Team::class);\n $mockTeam1->method('getUuid')->willReturn('team-uuid-1');\n $mockTeam1->method('getName')->willReturn('Sales Team');\n $mockTeam1->method('hasFeature')->willReturn(true);\n\n $mockTeam2 = $this->createMock(Team::class);\n $mockTeam2->method('getUuid')->willReturn('team-uuid-2');\n $mockTeam2->method('getName')->willReturn('Marketing Team');\n $mockTeam2->method('hasFeature')->willReturn(true);\n\n $mockTeamRepository->method('getTeamsForKiosk')\n ->willReturn(new Collection([$mockTeam1, $mockTeam2]));\n\n $mockGroupsRelation = $this->createMock(HasMany::class);\n $mockGroupsRelation->method('get')->willReturn(new \\Illuminate\\Database\\Eloquent\\Collection([]));\n $mockTeam1->method('groups')->willReturn($mockGroupsRelation);\n\n $mockTeamRepository->method('idOrUuid')->willReturn($mockTeam1);\n\n $service = $this->getService(mockTeamRepository: $mockTeamRepository);\n\n $result = $service->getTeamsGroupsOptions(['team-uuid-1']);\n\n $this->assertCount(1, $result);\n $this->assertEquals('Sales Team', $result[0]['label']);\n }\n\n public function testGetReturnsTransformedReport(): void\n {\n $mockTeam = $this->createMock(Team::class);\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getType')->willReturn('exec_summary');\n $mockReport->method('getUuid')->willReturn('report-uuid');\n $mockReport->method('getFrequency')->willReturn('weekly');\n $mockReport->method('getTeam')->willReturn($mockTeam);\n $mockReport->method('getStatus')->willReturn(true);\n $mockReport->method('getFrom')->willReturn(null);\n $mockReport->method('getTo')->willReturn(null);\n $mockReport->method('getDealValueMin')->willReturn(null);\n $mockReport->method('getDealValueMax')->willReturn(null);\n $mockReport->method('getCallTypes')->willReturn([]);\n $mockReport->method('getMediaTypes')->willReturn([]);\n $mockReport->method('getCallDurationMin')->willReturn(null);\n $mockReport->method('getCallDurationMax')->willReturn(null);\n $mockReport->method('getGroups')->willReturn([]);\n $mockReport->method('getDealAtCallStages')->willReturn([]);\n $mockReport->method('getCurrentDealStages')->willReturn([]);\n $mockReport->method('getRecipients')->willReturn([]);\n $mockReport->method('getCreator')->willReturn(null);\n $mockReport->method('getAdditionalPromptInput')->willReturn(null);\n $mockReport->method('getCustomName')->willReturn('My Report');\n $mockReport->method('getCreatedAt')->willReturn(IlluminateCarbon::parse('2025-01-01'));\n $mockReport->method('getUpdatedAt')->willReturn(IlluminateCarbon::parse('2025-01-01'));\n $mockReport->method('getDeletedAt')->willReturn(null);\n\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n $mockRepo->expects($this->once())\n ->method('findByUuid')\n ->with('report-uuid')\n ->willReturn($mockReport);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $result = $service->get('report-uuid');\n\n $this->assertIsArray($result);\n $this->assertEquals('report-uuid', $result['id']);\n }\n\n public function testGetThrowsWhenReportNotFound(): void\n {\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n $mockRepo->method('findByUuid')->willReturn(null);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $this->expectException(ModelNotFoundException::class);\n\n $service->get('missing-uuid');\n }\n\n public function testListReturnsData(): void\n {\n $mockTeam = $this->createMock(Team::class);\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getType')->willReturn('exec_summary');\n $mockReport->method('getUuid')->willReturn('report-uuid');\n $mockReport->method('getFrequency')->willReturn('weekly');\n $mockReport->method('getTeam')->willReturn($mockTeam);\n $mockReport->method('getStatus')->willReturn(true);\n $mockReport->method('getFrom')->willReturn(null);\n $mockReport->method('getTo')->willReturn(null);\n $mockReport->method('getDealValueMin')->willReturn(null);\n $mockReport->method('getDealValueMax')->willReturn(null);\n $mockReport->method('getCallTypes')->willReturn([]);\n $mockReport->method('getMediaTypes')->willReturn([]);\n $mockReport->method('getCallDurationMin')->willReturn(null);\n $mockReport->method('getCallDurationMax')->willReturn(null);\n $mockReport->method('getGroups')->willReturn([]);\n $mockReport->method('getDealAtCallStages')->willReturn([]);\n $mockReport->method('getCurrentDealStages')->willReturn([]);\n $mockReport->method('getRecipients')->willReturn([]);\n $mockReport->method('getCreator')->willReturn(null);\n $mockReport->method('getAdditionalPromptInput')->willReturn(null);\n $mockReport->method('getCustomName')->willReturn('My Report');\n $mockReport->method('getCreatedAt')->willReturn(IlluminateCarbon::parse('2025-01-01'));\n $mockReport->method('getUpdatedAt')->willReturn(IlluminateCarbon::parse('2025-01-01'));\n $mockReport->method('getDeletedAt')->willReturn(null);\n\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n $mockRepo->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn(new \\Illuminate\\Database\\Eloquent\\Collection([$mockReport]));\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $result = $service->list();\n\n $this->assertArrayHasKey('data', $result);\n $this->assertCount(1, $result['data']);\n }\n\n public function testListAskJiminnyReportsReturnsData(): void\n {\n $mockUser = $this->createMock(User::class);\n $mockTeam = $this->createMock(Team::class);\n\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getType')->willReturn('ask_jiminny');\n $mockReport->method('getUuid')->willReturn('report-uuid');\n $mockReport->method('getFrequency')->willReturn('daily');\n $mockReport->method('getTeam')->willReturn($mockTeam);\n $mockReport->method('getStatus')->willReturn(true);\n $mockReport->method('getGroups')->willReturn([]);\n $mockReport->method('getRecipients')->willReturn([]);\n $mockReport->method('getCustomName')->willReturn('AJ Report');\n $mockReport->method('getExpiresAt')->willReturn(null);\n $mockReport->method('getSavedSearch')->willReturn(null);\n $mockReport->method('getAskAnythingPrompt')->willReturn(null);\n $mockReport->method('getAttribute')->with('created_by')->willReturn(null);\n\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n $mockRepo->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($mockUser, 'created_at', 'desc')\n ->willReturn(new \\Illuminate\\Database\\Eloquent\\Collection([$mockReport]));\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $result = $service->listAskJiminnyReports($mockUser);\n\n $this->assertArrayHasKey('data', $result);\n $this->assertCount(1, $result['data']);\n }\n\n public function testGetActivityTypesFieldDataDelegatesToService(): void\n {\n $mockTeam = $this->createMock(Team::class);\n $mockActivityTypeService = $this->createMock(ActivityTypeService::class);\n $mockActivityTypeService->expects($this->once())\n ->method('getActivityTypeFieldData')\n ->with(team: $mockTeam, value: ['a'], groupIds: ['g1'])\n ->willReturn(['id' => 'activity_types', 'options' => []]);\n\n $reflection = new \\ReflectionClass(AutomatedReportsService::class);\n $service = $reflection->newInstanceWithoutConstructor();\n $prop = $reflection->getProperty('activityTypeService');\n $prop->setAccessible(true);\n $prop->setValue($service, $mockActivityTypeService);\n\n $result = $service->getActivityTypesFieldData($mockTeam, ['a'], ['g1']);\n\n $this->assertEquals(['id' => 'activity_types', 'options' => []], $result);\n }\n\n public function testGetDealStageAtCallFieldDataDelegatesToService(): void\n {\n $mockTeam = $this->createMock(Team::class);\n $mockDealStagesService = $this->createMock(DealStagesService::class);\n $mockDealStagesService->expects($this->once())\n ->method('getDealStageAtCallFieldData')\n ->with(team: $mockTeam, value: [])\n ->willReturn(['id' => 'deal_stage_at_call']);\n\n $reflection = new \\ReflectionClass(AutomatedReportsService::class);\n $service = $reflection->newInstanceWithoutConstructor();\n $prop = $reflection->getProperty('dealStagesService');\n $prop->setAccessible(true);\n $prop->setValue($service, $mockDealStagesService);\n\n $result = $service->getDealStageAtCallFieldData($mockTeam);\n\n $this->assertEquals(['id' => 'deal_stage_at_call'], $result);\n }\n\n public function testGetCurrentDealStageFieldDataDelegatesToService(): void\n {\n $mockTeam = $this->createMock(Team::class);\n $mockDealStagesService = $this->createMock(DealStagesService::class);\n $mockDealStagesService->expects($this->once())\n ->method('getCurrentDealStageFieldData')\n ->with(team: $mockTeam, value: [])\n ->willReturn(['id' => 'current_deal_stage']);\n\n $reflection = new \\ReflectionClass(AutomatedReportsService::class);\n $service = $reflection->newInstanceWithoutConstructor();\n $prop = $reflection->getProperty('dealStagesService');\n $prop->setAccessible(true);\n $prop->setValue($service, $mockDealStagesService);\n\n $result = $service->getCurrentDealStageFieldData($mockTeam);\n\n $this->assertEquals(['id' => 'current_deal_stage'], $result);\n }\n\n public function testGetRecipientsFieldDataDelegatesToService(): void\n {\n $mockTeam = $this->createMock(Team::class);\n $mockRecipientsService = $this->createMock(RecipientsService::class);\n $mockRecipientsService->expects($this->once())\n ->method('getRecipientsFieldData')\n ->with(team: $mockTeam, value: [])\n ->willReturn(['id' => 'recipients']);\n\n $reflection = new \\ReflectionClass(AutomatedReportsService::class);\n $service = $reflection->newInstanceWithoutConstructor();\n $prop = $reflection->getProperty('recipientsService');\n $prop->setAccessible(true);\n $prop->setValue($service, $mockRecipientsService);\n\n $result = $service->getRecipientsFieldData($mockTeam);\n\n $this->assertEquals(['id' => 'recipients'], $result);\n }\n\n public function testGetJiminnyRecipientsFieldDataDelegatesToService(): void\n {\n $mockRecipientsService = $this->createMock(RecipientsService::class);\n $mockRecipientsService->expects($this->once())\n ->method('getJiminnyRecipientsFieldData')\n ->with(['user-1'])\n ->willReturn(['id' => 'jiminny_recipients']);\n\n $reflection = new \\ReflectionClass(AutomatedReportsService::class);\n $service = $reflection->newInstanceWithoutConstructor();\n $prop = $reflection->getProperty('recipientsService');\n $prop->setAccessible(true);\n $prop->setValue($service, $mockRecipientsService);\n\n $result = $service->getJiminnyRecipientsFieldData(['user-1']);\n\n $this->assertEquals(['id' => 'jiminny_recipients'], $result);\n }\n\n public function testCreateReportResultDelegatesToRepository(): void\n {\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getId')->willReturn(42);\n\n $mockResult = $this->createMock(AutomatedReportResult::class);\n\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n $mockRepo->expects($this->once())\n ->method('createResult')\n ->willReturn($mockResult);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $result = $service->createReportResult($mockReport);\n\n $this->assertSame($mockResult, $result);\n }\n\n public function testDeleteReportResultDeletesS3AndModel(): void\n {\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getReport')->willReturn($this->createMock(AutomatedReport::class));\n $mockResult->method('getMediaType')->willReturn(AutomatedReportsService::MEDIA_TYPE_PDF);\n $mockResult->expects($this->once())->method('delete');\n\n $reflection = new \\ReflectionClass(AutomatedReportsService::class);\n $service = $reflection->newInstanceWithoutConstructor();\n\n foreach ([\n 'teamRepository' => TeamRepository::class,\n 'groupRepository' => GroupRepository::class,\n 'userRepository' => UserRepository::class,\n 'stageRepository' => StageRepository::class,\n 'dealStagesService' => DealStagesService::class,\n 'recipientsService' => RecipientsService::class,\n 'automatedReportsRepository' => AutomatedReportsRepository::class,\n 'webhookService' => Webhook::class,\n 'dispatcher' => Dispatcher::class,\n 'activityTypeService' => ActivityTypeService::class,\n 'playbookCategoryRepository' => PlaybookCategoryRepository::class,\n 'askAnythingPromptService' => AskAnythingPromptService::class,\n 'activitySearchRepository' => SearchRepository::class,\n 'askAnythingRepository' => AskAnythingRepository::class,\n ] as $propName => $class) {\n $prop = $reflection->getProperty($propName);\n $prop->setAccessible(true);\n $prop->setValue($service, $this->createMock($class));\n }\n\n Storage::shouldReceive('exists')->andReturn(false);\n Log::shouldReceive('info')->zeroOrMoreTimes();\n\n $service->deleteReportResult($mockResult);\n }\n\n public function testDeleteAllReportResultsIteratesAndDeletes(): void\n {\n $mockResult1 = $this->createMock(AutomatedReportResult::class);\n $mockResult1->method('getId')->willReturn(1);\n $mockResult1->method('getReport')->willReturn($this->createMock(AutomatedReport::class));\n $mockResult1->method('getMediaType')->willReturn(AutomatedReportsService::MEDIA_TYPE_PDF);\n $mockResult1->expects($this->once())->method('delete');\n\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getId')->willReturn(10);\n\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n $mockRepo->expects($this->once())\n ->method('getResultsByReport')\n ->with($mockReport)\n ->willReturn(new \\Illuminate\\Database\\Eloquent\\Collection([$mockResult1]));\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n Storage::shouldReceive('exists')->andReturn(false);\n Log::shouldReceive('info')->zeroOrMoreTimes();\n\n $service->deleteAllReportResults($mockReport);\n }\n\n public function testDeleteAllDataDeletesReportsAndResults(): void\n {\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getId')->willReturn(1);\n $mockResult->method('getReport')->willReturn($this->createMock(AutomatedReport::class));\n $mockResult->method('getMediaType')->willReturn(AutomatedReportsService::MEDIA_TYPE_PDF);\n $mockResult->expects($this->once())->method('delete');\n\n $mockReport = $this->createMock(AutomatedReport::class);\n $mockReport->method('getId')->willReturn(10);\n $mockReport->expects($this->once())->method('delete');\n\n $mockTeam = $this->createMock(Team::class);\n $mockTeam->method('getId')->willReturn(1);\n\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n $mockRepo->expects($this->once())\n ->method('getReportsByTeam')\n ->with($mockTeam)\n ->willReturn(new \\Illuminate\\Database\\Eloquent\\Collection([$mockReport]));\n $mockRepo->expects($this->once())\n ->method('getResultsByReport')\n ->with($mockReport)\n ->willReturn(new \\Illuminate\\Database\\Eloquent\\Collection([$mockResult]));\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n Storage::shouldReceive('exists')->andReturn(false);\n Log::shouldReceive('info')->zeroOrMoreTimes();\n\n $service->deleteAllData($mockTeam);\n }\n\n public function testDeleteReportResultsThrowsWhenReportNotFound(): void\n {\n $mockRepo = $this->createMock(AutomatedReportsRepository::class);\n $mockRepo->method('findByUuid')->willReturn(null);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $this->createMock(UserRepository::class),\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $mockRepo,\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $this->expectException(ModelNotFoundException::class);\n\n $service->deleteReportResults('missing-uuid');\n }\n\n public function testGetValidRecipientUsersAskJiminnyIncludesCreator(): void\n {\n $tz = $this->createMock(\\DateTimeZone::class);\n $tz->method('getName')->willReturn('UTC');\n\n $creator = $this->createMock(User::class);\n $creator->method('getEmailAddress')->willReturn('creator@test.com');\n $creator->method('getName')->willReturn('Creator');\n $creator->method('getTimezone')->willReturn($tz);\n\n $mockUserRepository = $this->createMock(UserRepository::class);\n $mockUserRepository->method('find')->willReturn($creator);\n\n $mockGroupRepository = $this->createMock(GroupRepository::class);\n $mockGroupRepository->method('find')->willReturn(null);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $mockGroupRepository,\n $mockUserRepository,\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $report = $this->createMock(AutomatedReport::class);\n $report->method('isAskJiminnyReport')->willReturn(true);\n $report->method('getCreator')->willReturn($creator);\n $report->method('getRecipients')->willReturn(['users' => []]);\n $report->method('getGroups')->willReturn([]);\n\n $result = $service->getValidRecipientUsers($report);\n\n $this->assertCount(1, $result);\n $this->assertEquals('creator@test.com', $result[0]['email']);\n }\n\n public function testGetValidRecipientUsersAskJiminnyDeduplicatesCreatorAndExplicitRecipient(): void\n {\n $tz = $this->createMock(\\DateTimeZone::class);\n $tz->method('getName')->willReturn('UTC');\n\n $creator = $this->createMock(User::class);\n $creator->method('getEmailAddress')->willReturn('shared@test.com');\n $creator->method('getName')->willReturn('Creator');\n $creator->method('getTimezone')->willReturn($tz);\n\n $mockUserRepository = $this->createMock(UserRepository::class);\n $mockUserRepository->method('find')->willReturn($creator);\n\n $mockGroupRepository = $this->createMock(GroupRepository::class);\n $mockGroupRepository->method('find')->willReturn(null);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $mockGroupRepository,\n $mockUserRepository,\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $report = $this->createMock(AutomatedReport::class);\n $report->method('isAskJiminnyReport')->willReturn(true);\n $report->method('getCreator')->willReturn($creator);\n $report->method('getRecipients')->willReturn(['users' => [1]]);\n $report->method('getGroups')->willReturn([]);\n\n $result = $service->getValidRecipientUsers($report);\n\n $this->assertCount(1, $result);\n $this->assertEquals('shared@test.com', $result[0]['email']);\n }\n\n public function testGetValidRecipientUsersAskJiminnyIncludesGroupMembers(): void\n {\n $tz = $this->createMock(\\DateTimeZone::class);\n $tz->method('getName')->willReturn('UTC');\n\n $creator = $this->createMock(User::class);\n $creator->method('getEmailAddress')->willReturn('creator@test.com');\n $creator->method('getName')->willReturn('Creator');\n $creator->method('getTimezone')->willReturn($tz);\n\n $member = $this->createMock(User::class);\n $member->method('getEmailAddress')->willReturn('member@test.com');\n $member->method('getName')->willReturn('Member');\n $member->method('getTimezone')->willReturn($tz);\n\n $mockUserRepository = $this->createMock(UserRepository::class);\n $mockUserRepository->method('find')->willReturn($creator);\n\n $mockGroup = $this->createMock(Group::class);\n $mockGroup->method('getMembers')->willReturn(new \\Illuminate\\Database\\Eloquent\\Collection([$member]));\n\n $mockGroupRepository = $this->createMock(GroupRepository::class);\n $mockGroupRepository->method('find')->willReturn($mockGroup);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $mockGroupRepository,\n $mockUserRepository,\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $report = $this->createMock(AutomatedReport::class);\n $report->method('isAskJiminnyReport')->willReturn(true);\n $report->method('getCreator')->willReturn($creator);\n $report->method('getRecipients')->willReturn(['users' => []]);\n $report->method('getGroups')->willReturn([10]);\n\n $result = $service->getValidRecipientUsers($report);\n\n $this->assertCount(2, $result);\n $emails = array_column($result, 'email');\n $this->assertContains('creator@test.com', $emails);\n $this->assertContains('member@test.com', $emails);\n }\n\n public function testGetValidRecipientUsersAskJiminnyNullCreatorSkipped(): void\n {\n $tz = $this->createMock(\\DateTimeZone::class);\n $tz->method('getName')->willReturn('UTC');\n\n $shareUser = $this->createMock(User::class);\n $shareUser->method('getEmailAddress')->willReturn('shared@test.com');\n $shareUser->method('getName')->willReturn('Shared');\n $shareUser->method('getTimezone')->willReturn($tz);\n\n $mockUserRepository = $this->createMock(UserRepository::class);\n $mockUserRepository->method('find')->willReturnMap([\n [1, null],\n [2, $shareUser],\n ]);\n\n $mockGroupRepository = $this->createMock(GroupRepository::class);\n $mockGroupRepository->method('find')->willReturn(null);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $mockGroupRepository,\n $mockUserRepository,\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $report = $this->createMock(AutomatedReport::class);\n $report->method('isAskJiminnyReport')->willReturn(true);\n $report->method('getCreator')->willReturn(null);\n $report->method('getRecipients')->willReturn(['users' => [2]]);\n $report->method('getGroups')->willReturn([]);\n\n $result = $service->getValidRecipientUsers($report);\n\n $this->assertCount(1, $result);\n $this->assertEquals('shared@test.com', $result[0]['email']);\n }\n\n public function testGetValidRecipientUsersStandardReportDoesNotIncludeCreator(): void\n {\n $tz = $this->createMock(\\DateTimeZone::class);\n $tz->method('getName')->willReturn('UTC');\n\n $user = $this->createMock(User::class);\n $user->method('getEmailAddress')->willReturn('user@test.com');\n $user->method('getName')->willReturn('User');\n $user->method('getTimezone')->willReturn($tz);\n\n $mockUserRepository = $this->createMock(UserRepository::class);\n $mockUserRepository->method('find')->willReturn($user);\n\n $service = new AutomatedReportsService(\n $this->createMock(TeamRepository::class),\n $this->createMock(GroupRepository::class),\n $mockUserRepository,\n $this->createMock(StageRepository::class),\n $this->createMock(DealStagesService::class),\n $this->createMock(RecipientsService::class),\n $this->createMock(AutomatedReportsRepository::class),\n $this->createMock(Webhook::class),\n $this->createMock(Dispatcher::class),\n $this->createMock(ActivityTypeService::class),\n $this->createMock(PlaybookCategoryRepository::class),\n $this->createMock(AskAnythingPromptService::class),\n $this->createMock(SearchRepository::class),\n $this->createMock(AskAnythingRepository::class),\n );\n\n $report = $this->createMock(AutomatedReport::class);\n $report->method('isAskJiminnyReport')->willReturn(false);\n $report->method('getRecipients')->willReturn(['users' => [5]]);\n $report->method('getJiminnyRecipients')->willReturn(['users' => []]);\n $report->method('getGroups')->willReturn([]);\n\n $result = $service->getValidRecipientUsers($report);\n\n $this->assertCount(1, $result);\n $this->assertEquals('user@test.com', $result[0]['email']);\n }\n\n public function testGetReportPeriodNameAskJiminnyMonthlyFallback(): void\n {\n Carbon::setTestNow(Carbon::parse('2026-03-07 00:00:00'));\n\n $report = $this->createMock(AutomatedReport::class);\n $report->method('getFrequency')->willReturn('monthly');\n $report->method('isAskJiminnyReport')->willReturn(true);\n\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getReport')->willReturn($report);\n $mockResult->method('getFromDate')->willReturn(null);\n $mockResult->method('getToDate')->willReturn(null);\n\n $result = $this->service->getReportPeriodName($mockResult);\n\n $this->assertMatchesRegularExpression('/^[A-Z][a-z]+ \\d{4}$/', $result);\n $this->assertStringContainsString('2026', $result);\n\n Carbon::setTestNow();\n }\n\n public function testGetReportPeriodNameAskJiminnyWeeklyFallback(): void\n {\n Carbon::setTestNow(Carbon::parse('2026-04-07 00:00:00'));\n\n $report = $this->createMock(AutomatedReport::class);\n $report->method('getFrequency')->willReturn('weekly');\n $report->method('isAskJiminnyReport')->willReturn(true);\n\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getReport')->willReturn($report);\n $mockResult->method('getFromDate')->willReturn(null);\n $mockResult->method('getToDate')->willReturn(null);\n\n $result = $this->service->getReportPeriodName($mockResult);\n\n $this->assertStringContainsString(' - ', $result);\n $this->assertStringContainsString('2026', $result);\n\n Carbon::setTestNow();\n }\n\n public function testGetReportPeriodNameAskJiminnyDailyFallback(): void\n {\n Carbon::setTestNow(Carbon::parse('2026-04-07 00:00:00'));\n\n $report = $this->createMock(AutomatedReport::class);\n $report->method('getFrequency')->willReturn('daily');\n $report->method('isAskJiminnyReport')->willReturn(true);\n\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getReport')->willReturn($report);\n $mockResult->method('getFromDate')->willReturn(null);\n $mockResult->method('getToDate')->willReturn(null);\n\n $result = $this->service->getReportPeriodName($mockResult);\n\n $this->assertStringNotContainsString(' - ', $result);\n $this->assertStringContainsString('2026', $result);\n\n Carbon::setTestNow();\n }\n\n public function testGetReportPeriodNameAskJiminnyWithExplicitDates(): void\n {\n $report = $this->createMock(AutomatedReport::class);\n $report->method('getFrequency')->willReturn('monthly');\n $report->method('isAskJiminnyReport')->willReturn(true);\n\n $mockResult = $this->createMock(AutomatedReportResult::class);\n $mockResult->method('getReport')->willReturn($report);\n $mockResult->method('getFromDate')->willReturn(IlluminateCarbon::parse('2026-02-07'));\n $mockResult->method('getToDate')->willReturn(IlluminateCarbon::parse('2026-03-07'));\n\n $result = $this->service->getReportPeriodName($mockResult);\n\n $this->assertEquals('Feb 2026', $result);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.24335106,"top":0.047885075,"width":0.024268618,"height":0.024740623},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-680464163007607990
|
-404082269151709463
|
visual_change
|
accessibility
|
NULL
|
The Hunspell plugin has been deprecated. If you The Hunspell plugin has been deprecated. If you're not writing in Hungarian, you can safely uninstall Hunspell without affecting the dictionaries for other languages.
text/html
text/html
text/html
Loading Data Sources…
Project: faVsco.js, menu
#12011 on JY-20157-AJ-report-not-send-notification, menu
Start Listening for PHP Debug Connections
AutomatedReportsServiceTest
Run 'AutomatedReportsServiceTest'
Debug 'AutomatedReportsServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
Analyzing…
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Services\Kiosk\AutomatedReports;
use Carbon\Carbon;
use Illuminate\Support\Carbon as IlluminateCarbon;
use Illuminate\Contracts\Bus\Dispatcher;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Storage;
use Jiminny\Component\AskAnything\AskAnythingPromptService;
use Jiminny\Component\AskAnything\Dtos\AskAnythingPromptDto;
use Jiminny\Component\UrlGenerator\Webhook;
use Jiminny\Contracts\Repositories\PlaybookCategoryRepository;
use Jiminny\Contracts\Repositories\TeamRepository;
use Jiminny\Contracts\Repositories\UserRepository;
use Jiminny\Exceptions\InvalidArgumentException;
use Jiminny\Exceptions\ModelNotFoundException;
use Illuminate\Support\Collection;
use Jiminny\Models\AskAnything\AskAnythingPrompt;
use Jiminny\Models\AskAnything\AskAnythingPromptTarget;
use Jiminny\Models\Activity\Search;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Feature\FeatureEnum;
use Jiminny\Models\Group;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AskAnythingRepository;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Repositories\GroupRepository;
use Jiminny\Repositories\SearchRepository;
use Jiminny\Repositories\StageRepository;
use Jiminny\Services\Kiosk\AutomatedReports\ActivityTypeService;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Jiminny\Services\Kiosk\AutomatedReports\DealStagesService;
use Jiminny\Services\Kiosk\AutomatedReports\RecipientsService;
use Mockery;
use PHPUnit\Framework\Attributes\DataProvider;
use Tests\TestCase;
class AutomatedReportsServiceTest extends TestCase
{
private AutomatedReportsService $service;
protected function setUp(): void
{
parent::setUp();
// Create a real instance of the service without calling the constructor
$reflection = new \ReflectionClass(AutomatedReportsService::class);
$this->service = $reflection->newInstanceWithoutConstructor();
// Manually set the dependencies using reflection
$dependencies = [
'teamRepository' => TeamRepository::class,
'groupRepository' => GroupRepository::class,
'userRepository' => UserRepository::class,
'stageRepository' => StageRepository::class,
'dealStagesService' => DealStagesService::class,
'recipientsService' => RecipientsService::class,
'automatedReportsRepository' => AutomatedReportsRepository::class,
'webhookService' => Webhook::class,
'dispatcher' => Dispatcher::class,
'activityTypeService' => ActivityTypeService::class,
'playbookCategoryRepository' => PlaybookCategoryRepository::class,
'askAnythingPromptService' => AskAnythingPromptService::class,
'activitySearchRepository' => SearchRepository::class,
'askAnythingRepository' => AskAnythingRepository::class,
];
foreach ($dependencies as $propertyName => $class) {
$property = $reflection->getProperty($propertyName);
$property->setAccessible(true);
$property->setValue($this->service, $this->createMock($class));
}
}
protected function tearDown(): void
{
parent::tearDown();
Mockery::close();
}
private function getService(
$mockUserRepository = null,
$mockStageRepository = null,
$mockTeamRepository = null,
): AutomatedReportsService {
return new AutomatedReportsService(
($mockTeamRepository ?? $this->createMock(TeamRepository::class)),
$this->createMock(GroupRepository::class),
($mockUserRepository ?? $this->createMock(UserRepository::class)),
($mockStageRepository ?? $this->createMock(StageRepository::class)),
$this->createMock(DealStagesService::class),
$this->createMock(RecipientsService::class),
$this->createMock(AutomatedReportsRepository::class),
$this->createMock(Webhook::class),
$this->createMock(Dispatcher::class),
$this->createMock(ActivityTypeService::class),
$this->createMock(PlaybookCategoryRepository::class),
$this->createMock(AskAnythingPromptService::class),
$this->createMock(SearchRepository::class),
$this->createMock(AskAnythingRepository::class),
);
}
#[DataProvider('transformMediaTypesDataProvider')]
public function testTransformMediaTypes(array $mediaTypes, array $expected): void
{
$report = new AutomatedReport(['media_types' => $mediaTypes]);
$reflection = new \ReflectionClass(AutomatedReportsService::class);
$method = $reflection->getMethod('transformMediaTypes');
$result = $method->invoke($this->service, $report);
$this->assertEquals($expected, $result);
}
public function testGetMediaTypeFieldDataWithoutReport(): void
{
$result = $this->service->getMediaTypeFieldData(null);
$this->assertIsArray($result);
$this->assertArrayHasKey('value', $result);
$this->assertEmpty($result['value']);
$this->assertEquals('media_types', $result['id']);
}
public function testGetMediaTypeFieldDataWithReport(): void
{
$mediaTypes = ['pdf', 'podcast'];
$report = new AutomatedReport(['media_types' => $mediaTypes]);
$result = $this->service->getMediaTypeFieldData($report);
$expectedValue = [
['id' => 'pdf', 'name' => 'PDF'],
['id' => 'podcast', 'name' => 'Podcast'],
];
$this->assertIsArray($result);
$this->assertArrayHasKey('value', $result);
$this->assertEquals($expectedValue, $result['value']);
}
public static function transformMediaTypesDataProvider(): array
{
return [
'empty array' => [
'mediaTypes' => [],
'expected' => [],
],
'pdf only' => [
'mediaTypes' => ['pdf'],
'expected' => [
['id' => 'pdf', 'name' => 'PDF'],
],
],
'podcast only' => [
'mediaTypes' => ['podcast'],
'expected' => [
['id' => 'podcast', 'name' => 'Podcast'],
],
],
'both pdf and podcast' => [
'mediaTypes' => ['pdf', 'podcast'],
'expected' => [
['id' => 'pdf', 'name' => 'PDF'],
['id' => 'podcast', 'name' => 'Podcast'],
],
],
'with invalid type' => [
'mediaTypes' => ['pdf', 'invalid', 'podcast'],
'expected' => [
['id' => 'pdf', 'name' => 'PDF'],
['id' => 'podcast', 'name' => 'Podcast'],
],
],
];
}
#[DataProvider('hasCallTypeConferenceDataProvider')]
public function testHasCallTypeConference(array $callTypes, bool $expected): void
{
$report = $this->createMock(AutomatedReport::class);
$report->method('getCallTypes')->willReturn($callTypes);
$result = $this->service->hasCallTypeConference($report);
$this->assertEquals($expected, $result);
}
#[DataProvider('hasCallTypeDialerDataProvider')]
public function testHasCallTypeDialer(array $callTypes, bool $expected): void
{
$report = $this->createMock(AutomatedReport::class);
$report->method('getCallTypes')->willReturn($callTypes);
$result = $this->service->hasCallTypeDialer($report);
$this->assertEquals($expected, $result);
}
public static function hasCallTypeConferenceDataProvider(): array
{
return [
'has conference' => [
'callTypes' => ['conference', 'dialer'],
'expected' => true,
],
'does not have conference' => [
'callTypes' => ['dialer', 'other'],
'expected' => false,
],
'empty call types' => [
'callTypes' => [],
'expected' => false,
],
];
}
public static function hasCallTypeDialerDataProvider(): array
{
return [
'has dialer' => [
'callTypes' => ['conference', 'dialer'],
'expected' => true,
],
'does not have dialer' => [
'callTypes' => ['conference', 'other'],
'expected' => false,
],
'empty call types' => [
'callTypes' => [],
'expected' => false,
],
];
}
public function testTransformReportResultsWithEmptyCollection(): void
{
$emptyCollection = new Collection([]);
$result = $this->service->transformReportResults($emptyCollection);
$this->assertIsArray($result);
$this->assertEmpty($result);
}
public function testTransformReportResultsStructure(): void
{
// Create a mock AutomatedReportResult with minimal setup to test structure
$mockReportResult = $this->createMockReportResult();
$collection = new Collection([$mockReportResult]);
$result = $this->service->transformReportResults($collection);
$this->assertIsArray($result);
$this->assertCount(1, $result);
$transformedResult = $result[0];
// Verify all expected keys are present
$expectedKeys = [
'id', 'name', 'frequency', 'recipients',
'report_type', 'media_type', 'downloadUrl', 'viewUrl', 'generated_at',
];
foreach ($expectedKeys as $key) {
$this->assertArrayHasKey($key, $transformedResult);
}
// Verify structure of nested arrays
$this->assertIsArray($transformedResult['frequency']);
$this->assertArrayHasKey('id', $transformedResult['frequency']);
$this->assertArrayHasKey('name', $transformedResult['frequency']);
$this->assertIsArray($transformedResult['report_type']);
$this->assertArrayHasKey('id', $transformedResult['report_type']);
$this->assertArrayHasKey('name', $transformedResult['report_type']);
$this->assertIsArray($transformedResult['recipients']);
// Verify TODO fields are null as expected
$this->assertEquals(AutomatedReportsService::MEDIA_TYPE_PODCAST, $transformedResult['media_type']);
$this->assertEquals(route('ai-reports.audio.download', ['uuid' => 'test-uuid']), $transformedResult['downloadUrl']);
$this->assertEquals(route('ai-reports.audio.view', ['uuid' => 'test-uuid']), $transformedResult['viewUrl']);
}
public function testTransformReportResultsWithMultipleResults(): void
{
$mockReportResult1 = $this->createMockReportResult('result-uuid-1', 'exec_summary');
$mockReportResult2 = $this->createMockReportResult('result-uuid-2', 'coaching_profiles');
$collection = new Collection([$mockReportResult1, $mockReportResult2]);
$result = $this->service->transformReportResults($collection);
$this->assertIsArray($result);
$this->assertCount(2, $result);
// Verify different UUIDs
$this->assertEquals('result-uuid-1', $result[0]['id']);
$this->assertEquals('result-uuid-2', $result[1]['id']);
// Verify both results have the expected structure
foreach ($result as $transformedResult) {
$this->assertArrayHasKey('id', $transformedResult);
$this->assertArrayHasKey('name', $transformedResult);
$this->assertArrayHasKey('frequency', $transformedResult);
$this->assertArrayHasKey('recipients', $transformedResult);
$this->assertArrayHasKey('report_type', $transformedResult);
}
}
#[DataProvider('isUserRecipientOfReportDataProvider')]
public function testIsUserRecipientOfReport(int $userId, array $recipients, bool $expected): void
{
// Create mock User
$mockUser = $this->createMock(\Jiminny\Models\User::class);
$mockUser->method('getId')->willReturn($userId);
$mockUser->method('getGroupId')->willReturn(null);
// Create mock AutomatedReport
$mockReport = $this->createMock(AutomatedReport::class);
$mockReport->method('getRecipients')->willReturn($recipients);
$mockReport->method('isAskJiminnyReport')->willReturn(false);
$mockReport->method('getGroups')->willReturn([]);
$result = $this->service->isUserRecipientOfReport($mockUser, $mockReport);
$this->assertEquals($expected, $result);
}
#[DataProvider('isUserRecipientOfAskJiminnyReportDataProvider')]
public function testIsUserRecipientOfAskJiminnyReportViaGroup(
int $userId,
?int $groupId,
array $recipients,
array $reportGroups,
bool $expected,
): void {
$mockUser = $this->createMock(\Jiminny\Models\User::class);
$mockUser->method('getId')->willReturn($userId);
$mockUser->method('getGroupId')->willReturn($groupId);
$mockReport = $this->createMock(AutomatedReport::class);
$mockReport->method('getRecipients')->willReturn($recipients);
$mockReport->method('isAskJiminnyReport')->willReturn(true);
$mockReport->method('getGroups')->willReturn($reportGroups);
$this->assertSame($expected, $this->service->isUserRecipientOfReport($mockUser, $mockReport));
}
public function testIsUserRecipientOfNonAskJiminnyReportIgnoresGroups(): void
{
$mockUser = $this->createMock(\Jiminny\Models\User::class);
$mockUser->method('getId')->willReturn(123);
$mockUser->method('getGroupId')->willReturn(5);
$mockReport = $this->createMock(AutomatedReport::class);
$mockReport->method('getRecipients')->willReturn(['users' => []]);
$mockReport->method('isAskJiminnyReport')->willReturn(false);
$mockReport->method('getGroups')->willReturn([5]);
$this->assertFalse($this->service->isUserRecipientOfReport($mockUser, $mockReport));
}
public static function isUserRecipientOfAskJiminnyReportDataProvider(): array
{
return [
'group member - ask jiminny' => [
'userId' => 123,
'groupId' => 7,
'recipients' => ['users' => []],
'reportGroups' => [7],
'expected' => true,
],
'group mismatch - ask jiminny' => [
'userId' => 123,
'groupId' => 9,
'recipients' => ['users' => []],
'reportGroups' => [7, 8],
'expected' => false,
],
'user with no group - ask jiminny' => [
'userId' => 123,
'groupId' => null,
'recipients' => ['users' => []],
'reportGroups' => [7],
'expected' => false,
],
'recipient users take precedence over group' => [
'userId' => 123,
'groupId' => null,
'recipients' => ['users' => [123]],
'reportGroups' => [],
'expected' => true,
],
];
}
public function testIsUserRecipientOfReportWithEmptyRecipients(): void
{
// Create mock User
$mockUser = $this->createMock(\Jiminny\Models\User::class);
$mockUser->method('getId')->willReturn(123);
// Create mock AutomatedReport with no recipients
$mockReport = $this->createMock(AutomatedReport::class);
$mockReport->method('getRecipients')->willReturn([]);
$result = $this->service->isUserRecipientOfReport($mockUser, $mockReport);
$this->assertFalse($result);
}
public function testIsUserRecipientOfReportWithNoUsersKey(): void
{
// Create mock User
$mockUser = $this->createMock(\Jiminny\Models\User::class);
$mockUser->method('getId')->willReturn(123);
// Create mock AutomatedReport with recipients but no 'users' key
$mockReport = $this->createMock(AutomatedReport::class);
$mockReport->method('getRecipients')->willReturn(['other_key' => [456, 789]]);
$result = $this->service->isUserRecipientOfReport($mockUser, $mockReport);
$this->assertFalse($result);
}
public static function isUserRecipientOfReportDataProvider(): array
{
return [
'user is recipient - single user' => [
'userId' => 123,
'recipients' => ['users' => [123]],
'expected' => true,
],
'user is recipient - multiple users' => [
'userId' => 456,
'recipients' => ['users' => [123, 456, 789]],
'expected' => true,
],
'user is not recipient - single user' => [
'userId' => 999,
'recipients' => ['users' => [123]],
'expected' => false,
],
'user is not recipient - multiple users' => [
'userId' => 999,
'recipients' => ['users' => [123, 456, 789]],
'expected' => false,
],
'user is recipient - string IDs converted to int' => [
'userId' => 123,
'recipients' => ['users' => ['123', '456']],
'expected' => true,
],
'user is not recipient - string IDs converted to int' => [
'userId' => 999,
'recipients' => ['users' => ['123', '456']],
'expected' => false,
],
'empty users array' => [
'userId' => 123,
'recipients' => ['users' => []],
'expected' => false,
],
];
}
private function createMockReportResult(string $uuid = 'test-uuid', string $reportType = 'exec_summary'): AutomatedReportResult
{
// Create mock AutomatedReport
$mockReport = $this->createMock(AutomatedReport::class);
$mockReport->method('getFrequency')->willReturn('weekly');
$mockReport->method('getRecipients')->willReturn(['users' => [1, 2]]);
$mockReport->method('getGroups')->willReturn([10, 20]);
$mockReport->method('getType')->willReturn($reportType);
// Create mock Team
$mockTeam = $this->createMock(\Jiminny\Models\Team::class);
// Create mock Group
$mockGroup = $this->createMock(\Jiminny\Models\Group::class);
$mockGroup->method('getUuid')->willReturn('group-uuid-10');
$mockGroup->method('getName')->willReturn('Test Team');
$mockQueryBuilder = Mockery::mock();
$mockQueryBuilder->shouldReceive('where')->andReturnSelf();
$mockQueryBuilder->shouldReceive('first')->andReturn($mockGroup);
$dataRelation = Mockery::mock(HasMany::class);
$dataRelation->shouldReceive('where')->andReturn($mockQueryBuilder);
$dataRelation->shouldReceive('get')->andReturn(
new \Illuminate\Database\Eloquent\Collection([$mockGroup])
);
$mockTeam->method('groups')->willReturn($dataRelation);
$mockReport->method('getTeam')->willReturn($mockTeam);
// Create mock AutomatedReportResult
$mockReportResult = $this->createMock(AutomatedReportResult::class);
$mockReportResult->method('getUuid')->willReturn($uuid);
$mockReportResult->method('getGeneratedAt')->willReturn(
\Illuminate\Support\Carbon::parse('2024-01-15T10:30:00Z')
);
$mockReportResult->method('getReport')->willReturn($mockReport);
// Mock methods used in getReportFileName
$mockReportResult->method('getReportType')->willReturn($reportType);
$mockReportResult->method('getFromDate')->willReturn(
\Illuminate\Support\Carbon::parse('2024-01-08')
);
$mockReportResult->method('getToDate')->willReturn(
\Illuminate\Support\Carbon::parse('2024-01-15')
);
$mockReportResult->method('getGroups')->willReturn([10]);
$mockReportResult->method('getMediaType')->willReturn(AutomatedReportsService::MEDIA_TYPE_PODCAST);
return $mockReportResult;
}
#[DataProvider('getUsersUuidsDataProvider')]
public function testGetUsersUuids(array $recipients, array $mockUsers, array $expectedUuids): void
{
// Create mock UserRepository
$mockUserRepository = $this->createMock(UserRepository::class);
// Configure the mock to return specific users for specific IDs using a callback
$mockUserRepository->method('find')
->willReturnCallback(function ($userId) use ($mockUsers) {
if (! isset($mockUsers[$userId])) {
return null;
}
$userUuid = $mockUsers[$userId]['uuid'] ?? null;
if ($userUuid === null) {
return null;
}
$mockUser = $this->createMock(\Jiminny\Models\User::class);
$mockUser->method('getUuid')->willReturn((string) $userUuid);
return $mockUser;
});
// Create service with mocked UserRepository
$automatedReportsService = $this->getService(mockUserRepository: $mockUserRepository);
// Create mock AutomatedReport
$mockReport = $this->createMock(AutomatedReport::class);
$mockReport->method('getRecipients')->willReturn($recipients);
$result = $automatedReportsService->getUsersUuids($mockReport);
$this->assertEquals($expectedUuids, $result);
}
public function testGetUsersUuidsWithEmptyRecipients(): void
{
// Create mock AutomatedReport with empty recipients
$mockReport = $this->createMock(AutomatedReport::class);
$mockReport->method('getRecipients')->willReturn([]);
$result = $this->service->getUsersUuids($mockReport);
$this->assertEquals([], $result);
}
public function testGetUsersUuidsWithNoUsersKey(): void
{
// Create mock AutomatedReport with recipients but no 'users' key
$mockReport = $this->createMock(AutomatedReport::class);
$mockReport->method('getRecipients')->willReturn(['other_key' => [1, 2, 3]]);
$result = $this->service->getUsersUuids($mockReport);
$this->assertEquals([], $result);
}
public function testGetUsersUuidsWithNonExistentUsers(): void
{
// Create mock UserRepository that returns null for all users
$mockUserRepository = $this->createMock(UserRepository::class);
$mockUserRepository->method('find')->willReturn(null);
// Create service with mocked UserRepository
$automatedReportsService = $this->getService(mockUserRepository: $mockUserRepository);
// Create mock AutomatedReport
$mockReport = $this->createMock(AutomatedReport::class);
$mockReport->method('getRecipients')->willReturn(['users' => [1, 2, 3]]);
$result = $automatedReportsService->getUsersUuids($mockReport);
// Should return array with null values for non-existent users
$this->assertEquals([], $result);
}
public static function getUsersUuidsDataProvider(): array
{
return [
'single user found' => [
'recipients' => ['users' => [123]],
'mockUsers' => [
123 => ['id' => 123, 'uuid' => 'user-uuid-123'],
],
'expectedUuids' => ['user-uuid-123'],
],
'multiple users found' => [
'recipients' => ['users' => [123, 456, 789]],
'mockUsers' => [
123 => ['id' => 123, 'uuid' => 'user-uuid-123'],
456 => ['id' => 456, 'uuid' => 'user-uuid-456'],
789 => ['id' => 789, 'uuid' => 'user-uuid-789'],
],
'expectedUuids' => ['user-uuid-123', 'user-uuid-456', 'user-uuid-789'],
],
'mixed found and not found users' => [
'recipients' => ['users' => [123, 456, 789]],
'mockUsers' => [
123 => ['id' => 123, 'uuid' => 'user-uuid-123'],
// 456 not found in DB
789 => ['id' => 789, 'uuid' => 'user-uuid-789'],
],
'expectedUuids' => ['user-uuid-123', 'user-uuid-789'], // Updated to reflect that nulls are filtered out
],
'empty users array' => [
'recipients' => ['users' => []],
'mockUsers' => [],
'expectedUuids' => [],
],
'all users not found' => [
'recipients' => ['users' => [123, 456]],
'mockUsers' => [], // No users found
'expectedUuids' => [], // Updated to reflect that nulls are filtered out
],
];
}
#[DataProvider('getCurrentDealStagesUuidsDataProvider')]
public function testGetCurrentDealStagesUuids(array $currentDealStages, array $mockStages, array $expectedUuids): void
{
// Create mock StageRepository
$mockStageRepository = $this->createMock(StageRepository::class);
// Configure the mock to return specific stages for specific IDs using a callback
$mockStageRepository->method('find')
->willReturnCallback(function ($stageId) use ($mockStages) {
if (! isset($mockStages[$stageId])) {
return null;
}
$stageUuid = $mockStages[$stageId]['uuid'] ?? null;
if ($stageUuid === null) {
return null;
}
$mockStage = $this->createMock(\Jiminny\Models\Stage::class);
$mockStage->method('getUuid')->willReturn((string) $stageUuid);
return $mockStage;
});
// Create service with mocked StageRepository
$automatedReportsService = $this->getService(mockStageRepository: $mockStageRepository);
// Create mock AutomatedReport
$mockReport = $this->createMock(AutomatedReport::class);
$mockReport->method('getCurrentDealStages')->willReturn($currentDealStages);
$result = $automatedReportsService->getCurrentDealStagesUuids($mockReport);
$this->assertEquals($expectedUuids, $result);
}
public function testGetCurrentDealStagesUuidsWithEmptyStages(): void
{
// Create mock AutomatedReport with empty current deal stages
$mockReport = $this->createMock(AutomatedReport::class);
$mockReport->method('getCurrentDealStages')->willReturn([]);
$result = $this->service->getCurrentDealStagesUuids($mockReport);
$this->assertEquals([], $result);
}
public function testGetCurrentDealStagesUuidsWithNonExistentStages(): void
{
// Create mock StageRepository that returns null for all stages
$mockStageRepository = $this->createMock(StageRepository::class);
$mockStageRepository->method('find')->willReturn(null);
// Create service with mocked StageRepository
$automatedReportsService = $this->getService(mockStageRepository: $mockStageRepository);
// Create mock AutomatedReport
$mockReport = $this->createMock(AutomatedReport::class);
$mockReport->method('getCurrentDealStages')->willReturn([1, 2, 3]);
$result = $automatedReportsService->getCurrentDealStagesUuids($mockReport);
// Should return array with null values for non-existent stages
$this->assertEquals([], $result);
}
public static function getCurrentDealStagesUuidsDataProvider(): array
{
return [
'single stage found' => [
'currentDealStages' => [10],
'mockStages' => [
10 => ['id' => 10, 'uuid' => 'stage-uuid-10'],
],
'expectedUuids' => ['stage-uuid-10'],
],
'multiple stages found' => [
'currentDealStages' => [10, 20, 30],
'mockStages' => [
10 => ['id' => 10, 'uuid' => 'stage-uuid-10'],
20 => ['id' => 20, 'uuid' => 'stage-uuid-20'],
30 => ['id' => 30, 'uuid' => 'stage-uuid-30'],
],
'expectedUuids' => ['stage-uuid-10', 'stage-uuid-20', 'stage-uuid-30'],
],
'mixed found and not found stages' => [
'currentDealStages' => [10, 20, 30],
'mockStages' => [
10 => ['id' => 10, 'uuid' => 'stage-uuid-10'],
// 20 not found in DB
30 => ['id' => 30, 'uuid' => 'stage-uuid-30'],
],
'expectedUuids' => ['stage-uuid-10', 'stage-uuid-30'], // Updated to reflect that nulls are filtered out
],
'empty stages array' => [
'currentDealStages' => [],
'mockStages' => [],
'expectedUuids' => [],
],
'all stages not found' => [
'currentDealStages' => [10, 20],
'mockStages' => [], // No stages found
'expectedUuids' => [], // Updated to reflect that nulls are filtered out
],
];
}
#[DataProvider('getTeamGroupsDataProvider')]
public function testGetTeamGroups(string $teamUuid, ?array $mockTeamData, array $mockGroups, array $expectedResult): void
{
// Create mock TeamRepository
$mockTeamRepository = $this->createMock(TeamRepository::class);
if ($mockTeamData === null) {
// Team not found
$mockTeamRepository->method('idOrUuid')
->with($teamUuid)
->willReturn(null);
} else {
// Team found - create mock team with groups
$mockTeam = $this->createMock(\Jiminny\Models\Team::class);
// Create mock groups collection
$mockGroupsCollection = $this->createMock(\Illuminate\Database\Eloquent\Collection::class);
// Create mock Group objects
$groupObjects = [];
foreach ($mockGroups as $groupData) {
$mockGroup = $this->createMock(\Jiminny\Models\Group::class);
$mockGroup->method('getUuid')->willReturn($groupData['id']);
$mockGroup->method('getName')->willReturn($groupData['name']);
$groupObjects[] = $mockGroup;
}
// Mock the groups collection to return our mock groups
$mockGroupsCollection->method('getIterator')->willReturn(new \ArrayIterator($groupObjects));
// Mock the groups() relation
$mockGroupsRelation = $this->createMock(\Illuminate\Database\Eloquent\Relations\HasMany::class);
$mockGroupsRelation->method('get')->willReturn($mockGroupsCollection);
$mockTeam->method('groups')->willReturn($mockGroupsRelation);
$mockTeamRepository->method('idOrUuid')
->with($teamUuid)
->willReturn($mockTeam);
}
// Create service with mocked TeamRepository
$automatedReportsService = $this->getService(mockTeamRepository: $mockTeamRepository);
$result = $automatedReportsService->getTeamGroups($teamUuid);
$this->assertEquals($expectedResult, $result);
}
public function testGetTeamGroupsWithNonExistentTeam(): void
{
// Create mock TeamRepository that returns null (team not found)
$mockTeamRepository = $this->createMock(TeamRepository::class);
$mockTeamRepository->method('idOrUuid')->willReturn(null);
// Create service with mocked TeamRepository
$automatedReportsService = $this->getService(mockTeamRepository: $mockTeamRepository);
$result = $automatedReportsService->getTeamGroups('non-existent-team-uuid');
$this->assertEquals([], $result);
}
public function testGetTeamGroupsWithEmptyGroups(): void
{
// Create mock team with no groups
$mockTeam = $this->createMock(\Jiminny\Models\Team::class);
// Create empty groups collection
$mockGroupsCollection = $this->createMock(\Illuminate\Database\Eloquent\Collection::class);
$mockGroupsCollection->method('getIterator')->willReturn(new \ArrayIterator([]));
$mockGroupsRelation = $this->createMock(\Illuminate\Database\Eloquent\Relations\HasMany::class);
$mockGroupsRelation->method('get')->willReturn($mockGroupsCollection);
$mockTeam->method('groups')->willReturn($mockGroupsRelation);
// Create mock TeamRepository
$mockTeamRepository = $this->createMock(TeamRepository::class);
$mockTeamRepository->method('idOrUuid')->willReturn($mockTeam);
// Create service with mocked TeamRepository
$automatedReportsService = $this->getService(mockTeamRepository: $mockTeamRepository);
$result = $automatedReportsService->getTeamGroups('team-with-no-groups');
$this->assertEquals([], $result);
}
public static function getTeamGroupsDataProvider(): array
{
return [
'team with single group' => [
'teamUuid' => 'team-uuid-123',
'mockTeamData' => ['id' => 'team-uuid-123', 'name' => 'Test Team'],
'mockGroups' => [
['id' => 'group-uuid-1', 'name' => 'Sales Team'],
],
'expectedResult' => [
['id' => 'group-uuid-1', 'name' => 'Sales Team'],
],
],
'team with multiple groups' => [
'teamUuid' => 'team-uuid-456',
'mockTeamData' => ['id' => 'team-uuid-456', 'name' => 'Another Team'],
'mockGroups' => [
['id' => 'group-uuid-1', 'name' => 'Sales Team'],
['id' => 'group-uuid-2', 'name' => 'Marketing Team'],
['id' => 'group-uuid-3', 'name' => 'Support Team'],
],
'expectedResult' => [
['id' => 'group-uuid-1', 'name' => 'Sales Team'],
['id' => 'group-uuid-2', 'name' => 'Marketing Team'],
['id' => 'group-uuid-3', 'name' => 'Support Team'],
],
],
'team not found' => [
'teamUuid' => 'non-existent-uuid',
'mockTeamData' => null,
'mockGroups' => [],
'expectedResult' => [],
],
'team with no groups' => [
'teamUuid' => 'team-uuid-empty',
'mockTeamData' => ['id' => 'team-uuid-empty', 'name' => 'Empty Team'],
'mockGroups' => [],
'expectedResult' => [],
],
];
}
#[DataProvider('getTeamsDataProvider')]
public function testGetTeams(array $mockTeams, array $expectedResult): void
{
// Create mock TeamRepository
$mockTeamRepository = $this->createMock(TeamRepository::class);
// Create mock Team objects
$teamObjects = [];
foreach ($mockTeams as $teamData) {
$mockTeam = $this->createMock(\Jiminny\Models\Team::class);
$mockTeam->method('getUuid')->willReturn($teamData['id']);
$mockTeam->method('getName')->willReturn($teamData['name']);
$mockTeam->method('hasFeature')
->with(\Jiminny\Models\Feature\FeatureEnum::AUTOMATED_REPORTS)
->willReturn($teamData['hasAutomatedReports']);
$teamObjects[] = $mockTeam;
}
// Mock the repository to return a Collection (not array)
$mockTeamRepository->method('getTeamsForKiosk')
->with('active')
->willReturn(new Collection($teamObjects));
// Create service with mocked TeamRepository
$automatedReportsService = $this->getService(mockTeamRepository: $mockTeamRepository);
$result = $automatedReportsService->getTeams();
$this->assertEquals($expectedResult, $result);
}
public function testGetTeamsWithNoTeams(): void
{
// Create mock TeamRepository that returns empty Collection
$mockTeamRepository = $this->createMock(TeamRepository::class);
$mockTeamRepository->method('getTeamsForKiosk')->willReturn(new Collection([]));
// Create service with mocked TeamRepository
$automatedReportsService = $this->getService(mockTeamRepository: $mockTeamRepository);
$result = $automatedReportsService->getTeams();
$this->assertEquals([], $result);
}
public function testGetTeamsWithAllTeamsWithoutFeature(): void
{
// Create mock teams without AUTOMATED_REPORTS feature
$mockTeam1 = $this->createMock(\Jiminny\Models\Team::class);
$mockTeam1->method('hasFeature')
->with(\Jiminny\Models\Feature\FeatureEnum::AUTOMATED_REPORTS)
->willReturn(false);
$mockTeam2 = $this->createMock(\Jiminny\Models\Team::class);
$mockTeam2->method('hasFeature')
->with(\Jiminny\Models\Feature\FeatureEnum::AUTOMATED_REPORTS)
->willReturn(false);
// Create mock TeamRepository that returns Collection
$mockTeamRepository = $this->createMock(TeamRepository::class);
$mockTeamRepository->method('getTeamsForKiosk')->willReturn(new Collection([$mockTeam1, $mockTeam2]));
// Create service with mocked TeamRepository
$automatedReportsService = $this->getService(mockTeamRepository: $mockTeamRepository);
$result = $automatedReportsService->getTeams();
$this->assertEquals([], $result);
}
public static function getTeamsDataProvider(): array
{
return [
'single team with feature' => [
'mockTeams' => [
[
'id' => 'team-uuid-1',
'name' => 'Sales Team',
'hasAutomatedReports' => true,
],
],
'expectedResult' => [
['id' => 'team-uuid-1', 'name' => 'Sales Team'],
],
],
'multiple teams with feature' => [
'mockTeams' => [
[
'id' => 'team-uuid-1',
'name' => 'Sales Team',
'hasAutomatedReports' => true,
],
[
'id' => 'team-uuid-2',
'name' => 'Marketing Team',
'hasAutomatedReports' => true,
],
[
'id' => 'team-uuid-3',
'name' => 'Support Team',
'hasAutomatedReports' => true,
],
],
'expectedResult' => [
['id' => 'team-uuid-1', 'name' => 'Sales Team'],
['id' => 'team-uuid-2', 'name' => 'Marketing Team'],
['id' => 'team-uuid-3', 'name' => 'Support Team'],
],
],
'mixed teams - some with feature, some without' => [
'mockTeams' => [
[
'id' => 'team-uuid-1',
'name' => 'Sales Team',
'hasAutomatedReports' => true,
],
[
'id' => 'team-uuid-2',
'name' => 'Marketing Team',
'hasAutomatedReports' => false,
],
[
'id' => 'team-uuid-3',
'name' => 'Support Team',
'hasAutomatedReports' => true,
],
],
'expectedResult' => [
['id' => 'team-uuid-1', 'name' => 'Sales Team'],
['id' => 'team-uuid-3', 'name' => 'Support Team'],
],
],
'all teams without feature' => [
'mockTeams' => [
[
'id' => 'team-uuid-1',
'name' => 'Sales Team',
'hasAutomatedReports' => false,
],
[
'id' => 'team-uuid-2',
'name' => 'Marketing Team',
'hasAutomatedReports' => false,
],
],
'expectedResult' => [],
],
'empty teams array' => [
'mockTeams' => [],
'expectedResult' => [],
],
];
}
#[DataProvider('deleteS3FilesDataProvider')]
public function testDeleteS3Files(
string $mediaType,
array $expectedFileExtensions,
array $existingFiles,
string $pathSuffix,
int $expectedDeletes
): void {
// Arrange
$teamUuid = 'team-uuid-123';
$reportUuid = 'report-uuid-456';
$basePath = sprintf('%s/reports/%s', $teamUuid, $reportUuid);
$team = Mockery::mock(Team::class);
$team->allows('getUuid')->andReturn($teamUuid);
$report = Mockery::mock(AutomatedReport::class);
$report->allows('getTeam')->andReturn($team);
$result = Mockery::mock(AutomatedReportResult::class);
$result->allows('getReport')->andReturn($report);
$result->allows('getUuid')->andReturn($reportUuid);
$result->allows('getMediaType')->andReturn($mediaType);
Storage::fake();
Log::shouldReceive('info')->times($expectedDeletes);
foreach ($existingFiles as $extension) {
$filePath = $basePath . $pathSuffix . '.' . $extension;
Storage::put($filePath, 'dummy content');
}
// Act
$this->service->deleteS3Files($result);
// Assert
foreach ($expectedFileExtensions as $extension) {
$filePath = $basePath . $pathSuffix . '.' . $extension;
if (in_array($extension, $existingFiles, true)) {
Storage::assertMissing($filePath);
} else {
// To be sure no unexpected files were created and deleted
Storage::assertMissing($filePath);
}
}
}
public static function deleteS3FilesDataProvider(): array
{
return [
'PDF report, all files exist' => [
'mediaType' => AutomatedReportsService::MEDIA_TYPE_PDF,
'expectedFileExtensions' => ['html', 'MD', 'pdf'],
'existingFiles' => ['html', 'MD', 'pdf'],
'pathSuffix' => '',
'expectedDeletes' => 3,
],
'PDF report, some files exist' => [
'mediaType' => AutomatedReportsService::MEDIA_TYPE_PDF,
'expectedFileExtensions' => ['html', 'MD', 'pdf'],
'existingFiles' => ['html', 'pdf'],
'pathSuffix' => '',
'expectedDeletes' => 2,
],
'PDF report, no files exist' => [
'mediaType' => AutomatedReportsService::MEDIA_TYPE_PDF,
'expectedFileExtensions' => ['html', 'MD', 'pdf'],
'existingFiles' => [],
'pathSuffix' => '',
'expectedDeletes' => 0,
],
'Podcast report, all files exist' => [
'mediaType' => AutomatedReportsService::MEDIA_TYPE_PODCAST,
'expectedFileExtensions' => ['json', 'mp3', 'ssml'],
'existingFiles' => ['json', 'mp3', 'ssml'],
'pathSuffix' => '_podcast',
'expectedDeletes' => 3,
],
'Podcast report, some files exist' => [
'mediaType' => AutomatedReportsService::MEDIA_TYPE_PODCAST,
'expectedFileExtensions' => ['json', 'mp3', 'ssml'],
'existingFiles' => ['mp3'],
'pathSuffix' => '_podcast',
'expectedDeletes' => 1,
],
'Podcast report, no files exist' => [
'mediaType' => AutomatedReportsService::MEDIA_TYPE_PODCAST,
'expectedFileExtensions' => ['json', 'mp3', 'ssml'],
'existingFiles' => [],
'pathSuffix' => '_podcast',
'expectedDeletes' => 0,
],
'Other media type, should do nothing' => [
'mediaType' => 'some_other_type',
'expectedFileExtensions' => [],
'existingFiles' => [],
'pathSuffix' => '',
'expectedDeletes' => 0,
],
];
}
public function testDeleteReportsResultsInRetentionPeriodWithLogging(): void
{
// Create mocks for the test
$automatedReportsService = Mockery::mock(AutomatedReportsService::class);
$team = Mockery::mock(Team::class);
$team->shouldReceive('getId')->andReturn(123);
$from = now()->subDays(30);
$to = now();
$source = 'test-source';
// Expect the method to be called with specific parameters
$automatedReportsService->shouldReceive('deleteReportsResultsInRetentionPeriodWithLogging')
->once()
->with(
$team,
Mockery::on(function ($arg) use ($from) {
return $arg->timestamp === $from->timestamp;
}),
Mockery::on(function ($arg) use ($to) {
return $arg->timestamp === $to->timestamp;
}),
$source
)
->andReturn(5);
// Call the method and verify the result
$result = $automatedReportsService->deleteReportsResultsInRetentionPeriodWithLogging(
$team,
$from,
$to,
$source
);
$this->assertEquals(5, $result);
}
#[DataProvider('sanitizeFileNameDataProvider')]
public function testSanitizeFileName(string $input, string $expected): void
{
$result = $this->service->sanitizeFileName($input);
$this->assertEquals($expected, $result);
}
public static function sanitizeFileNameDataProvider(): array
{
return [
'no special characters' => [
'input' => 'Exec Summary - Sep 2025 - Business Development Team',
'expected' => 'Exec Summary - Sep 2025 - Business Development Team',
],
'forward slash in team name' => [
'input' => 'Exec Summary - Sep 2025 - ND/IRV',
'expected' => 'Exec Summary - Sep 2025 - ND-IRV',
],
'backslash in team name' => [
'input' => 'Exec Summary - Sep 2025 - ND\IRV',
'expected' => 'Exec Summary - Sep 2025 - ND-IRV',
],
'multiple forward slashes' => [
'input' => 'Report - Team A/B/C',
'expected' => 'Report - Team A-B-C',
],
'multiple backslashes' => [
'input' => 'Report - Team A\B\C',
'expected' => 'Report - Team A-B-C',
],
'mixed slashes and backslashes' => [
'input' => 'Report - Team A/B\C',
'expected' => 'Report - Team A-B-C',
],
'complex team name with slashes' => [
'input' => 'Exec Summary - Sep 2025 - Business Development Team - ND/IRV, Net Driven - Acquisition (Sales)',
'expected' => 'Exec Summary - Sep 2025 - Business Development Team - ND-IRV, Net Driven - Acquisition (Sales)',
],
'only slashes' => [
'input' => '//\\\\',
'expected' => '----',
],
'empty string' => [
'input' => '',
'expected' => '',
],
'slash at start' => [
'input' => '/Report Name',
'expected' => '-Report Name',
],
'slash at end' => [
'input' => 'Report Name/',
'expected' => 'Report Name-',
],
];
}
public function testGetReportFileNameSanitizesOutput(): void
{
// Create mock GroupRepository
$mockGroupRepository = $this->createMock(GroupRepository::class);
// Create mock Group with slash in name
$mockGroup = $this->createMock(\Jiminny\Models\Group::class);
$mockGroup->method('getName')->willReturn('ND/IRV, Net...
|
NULL
|
|
53465
|
1156
|
19
|
2026-04-20T08:13:44.957492+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-20/1776 /Users/lukas/.screenpipe/data/data/2026-04-20/1776672824957_m1.jpg...
|
PhpStorm
|
faVsco.js – TrackAutomatedReportGeneratedEvent.php
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Tests passed: 7
text/html
text/html
text/html
Proj Tests passed: 7
text/html
text/html
text/html
Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
TrackAutomatedReportGeneratedEventTest
Run 'TrackAutomatedReportGeneratedEventTest'
Debug 'TrackAutomatedReportGeneratedEventTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
1
2
1
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Listeners\AutomatedReports\UserPilot;
use GuzzleHttp\Exception\GuzzleException;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Jiminny\Component\Queue\Constants;
use Jiminny\Events\AutomatedReports\AutomatedReportGenerated;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\Contracts\UserContract;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Jiminny\Services\UserPilot\UserPilotClient;
class TrackAutomatedReportGeneratedEvent implements ShouldQueue
{
use InteractsWithQueue;
private const string EVENT_NAME_AUTOMATED_REPORT = 'automated-report-generated';
private const string EVENT_NAME_ASK_JIMINNY_REPORT = 'ask-jiminny-report-generated';
public string $queue = Constants::QUEUE_DELAYABLE;
public function __construct(
private readonly UserPilotClient $userPilotClient,
private readonly AutomatedReportsService $automatedReportsService,
) {
}
public function handle(AutomatedReportGenerated $event): void
{
if (config('services.userpilot.token') === null) {
return;
}
$automatedReport = $event->automatedReport;
$payload = $this->buildPayload($automatedReport);
$eventName = $this->resolveEventName($automatedReport);
try {
foreach ($this->resolveUsers($automatedReport) as $user) {
$this->userPilotClient->track($user, $eventName, $payload);
}
} catch (GuzzleException $e) {
$this->release(3600);
}
}
/**
* @return array<UserContract>
*/
private function resolveUsers(AutomatedReport $automatedReport): array
{
if ($automatedReport->isAskJiminnyReport()) {
$creator = $automatedReport->getCreator();
return $creator !== null ? [$creator] : [];
}
return $this->automatedReportsService->getRecipientUserObjects($automatedReport);
}
private function buildPayload(AutomatedReport $automatedReport): array
{
return [
'report_type' => $automatedReport->getType(),
'frequency' => $automatedReport->getFrequency(),
];
}
private function resolveEventName(AutomatedReport $automatedReport): string
{
if ($automatedReport->isAskJiminnyReport()) {
return self::EVENT_NAME_ASK_JIMINNY_REPORT;
}
return self::EVENT_NAME_AUTOMATED_REPORT;
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
27
9
23
3
105
Previous Highlighted Error
Next Highlighted Error
SELECT * FROM team_features where team_id = 1;
SELECT * FROM teams WHERE name LIKE '%Vixio%'; # 340,270,11922
SELECT * FROM users WHERE team_id = 340; # 12015
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 340
and sa.provider = 'salesforce';
# and sa.provider = 'salesloft';
select * from crm_fields where crm_configuration_id = 270 and object_type = 'event';
# 125558 - Event Type - Event_Type__c
# 125552 - Event Status - Event_Status__c
SELECT * FROM sidekick_settings WHERE team_id = 340;
SELECT * FROM crm_field_values WHERE crm_field_id in (125552);
select * from activities where crm_configuration_id = 270
and type = 'conference' and crm_provider_id IS NOT NULL
and actual_start_time > '2024-09-16 09:00:00' order by scheduled_start_time;
SELECT * FROM activities WHERE id = 20871677;
SELECT * FROM crm_field_data WHERE activity_id = 20871677;
select * from crm_layouts where crm_configuration_id = 270;
select * from crm_layout_entities where crm_layout_id in (886,887);
SELECT * FROM crm_configurations WHERE id = 270;
select * from playbooks where team_id = 340; # 1514
select * from groups where team_id = 340;
SELECT * FROM crm_fields WHERE id IN (125393, 125401);
select g.name as 'team name', p.name as 'playbook name', f.label as 'activity type field' from groups g
join playbooks p on g.playbook_id = p.id
join crm_fields f on p.activity_field_id = f.id
where g.team_id = 340;
SELECT * FROM activities WHERE uuid_to_bin('0c180357-67d2-419e-a8c3-b832a3490770') = uuid; # 20448716
select * from crm_field_data where object_id = 20448716;
select * from activities where crm_configuration_id = 270 and provider = 'salesloft' order by id desc;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%CybSafe%'; # 343,273,12008
select * from opportunities where team_id = 343;
select * from opportunities where team_id = 343 and crm_provider_id = '18099102526';
select * from opportunities where team_id = 343 and account_id = 945217482;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 343
and sa.provider = 'hubspot';
select * from accounts where team_id = 343 order by name asc;
select * from stages where crm_configuration_id = 273 and type = 'opportunity';
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Voyado%'; # 353,283,12143
SELECT * FROM activities WHERE crm_configuration_id = 283 and account_id = 3777844 order by id desc;
SELECT * FROM accounts WHERE team_id = 353 AND name LIKE '%Salesloft%';
SELECT * FROM activities WHERE id = 20717903;
select * from participants where activity_id IN (20929172,20928605,20928468,20926272,20926271,20926270,20926269,20916499,20916454,20916436,20916435,20900015,20900014,20900013,20897312,20897243,20897241,20897237,20897232,20897229,20893648,20893231,20893230,20893229,20893228,20889784,20885039,20885038,20885037,20885036,20885035,20882728,20882708,20882703,20882702,20869828,20869811,20869806,20869801,20869799,20869798,20869796,20869795,20869794,20869761,20869760,20869759,20868688,20868687,20850340,20847195,20841710,20833967,20827021,20825307,20825305,20825297,20824615,20824400,20823927,20821760,20795588,20794233,20794057,20793710,20785811,20781789,20781394,20781307,20762651,20758453,20758282,20757323,20756643,20756636,20756629,20756627,20756606,20756605,20756604,20756603,20756602,20756600,20756599,20756598,20756595,20756594,20756589,20756587,20756577,20756573,20748918,20748386,20748385,20748384,20748383,20748382,20748381,20748380,20748379,20748377,20748375,20748373,20743301,20717905,20717904,20717903,20717901,20717899);
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 353
and sa.provider = 'salesforce';
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%modern world business solutions%'; # 345,275,12016, [EMAIL]
SELECT * FROM activities WHERE uuid_to_bin('3921d399-3fef-4609-a291-b0097a166d43') = uuid;
# id: 20940638, user: 12022, contact: 5305871
SELECT * FROM activity_summary_logs WHERE activity_id = 20940638;
select * from contacts where team_id = 345 and crm_provider_id = '30891432415' order by name asc; # 5305871
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 345
and sa.provider = 'hubspot';
select * from users where team_id = 345 and id = 12022;
SELECT * FROM crm_profiles WHERE user_id = 12022;
SELECT * FROM participants WHERE activity_id = 20940638;
SELECT * FROM users u
JOIN crm_profiles cp ON u.id = cp.user_id
WHERE u.team_id = 345;
select * from contacts where team_id = 345 and crm_provider_id = '30880813535' order by name desc; # 5305871
select * from team_features where team_id = 345;
SELECT * FROM activities WHERE uuid_to_bin('11701e2d-2f82-4dab-a616-1db4fad238df') = uuid; # 21115197
SELECT * FROM participants WHERE activity_id = 20897406;
SELECT * FROM activities WHERE uuid_to_bin('63ba55cd-1abc-447d-83da-0137000005b7') = uuid; # 20953912
SELECT * FROM activities WHERE crm_configuration_id = 275 and provider = 'ringcentral' and title like '%1252629100%';
SELECT * FROM activities WHERE id = 20946641;
SELECT * FROM crm_profiles WHERE user_id = 10211;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Lunio%'; # 120,97,10984, [EMAIL]
SELECT * FROM opportunities WHERE crm_configuration_id = 97 and crm_provider_id = '006N1000006c5PpIAI';
select * from stages where crm_configuration_id = 97 and type = 'opportunity';
select * from opportunities where team_id = 120;
select * from crm_configurations crm join teams t on crm.id = t.crm_id
where 1=1
AND t.current_billing_plan IS NOT NULL
AND crm.auto_sync_activity = 0
and crm.provider = 'hubspot';
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Exclaimer%'; # 270,205,10053,[EMAIL]
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 270
and sa.provider = 'salesforce';
SELECT * FROM activities WHERE uuid_to_bin('b54df794-2a9a-4957-8d80-09a600ead5f8') = uuid; # 21637956
SELECT * FROM crm_profiles WHERE user_id = 11446;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Cygnetise%'; # 372,300,12554, [EMAIL]
select * from playbooks where team_id = 372;
select * from crm_fields where crm_configuration_id = 300 and object_type = 'event'; # 141340
SELECT * FROM crm_field_values WHERE crm_field_id = 141340;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 372
and sa.provider = 'salesforce';
select * from crm_profiles where crm_configuration_id = 300;
SELECT * FROM crm_configurations WHERE team_id = 372;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Planday%'; # 291,242,11501,[EMAIL]
SELECT * FROM opportunities WHERE team_id = 291 and crm_provider_id = '006bG000005DO86QAG'; # 3207756
select * from crm_field_data where object_id = 3207756;
SELECT * FROM crm_fields WHERE id = 111834;
select f.id, f.crm_provider_id AS field_name, f.label, fd.object_id AS dealId, fd.value
FROM crm_fields f
JOIN crm_field_data fd ON f.id = fd.crm_field_id
WHERE f.crm_configuration_id = 242
AND f.object_type = 'opportunity'
AND fd.object_id IN (3207756)
ORDER BY fd.object_id, fd.updated_at;
SELECT * FROM crm_configurations WHERE auto_connect = 1;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Tour%'; # 187,209,8150,[EMAIL]
select * from group_deal_risk_types drgt join groups g on drgt.group_id = g.id
where g.team_id = 187;
select * from `groups` where team_id = 187;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 187
and sa.provider = 'salesforce';
# Destination - 98870 - Destination__c
# Stage - 79014 - StageName
# Land Arrangement - 98856 - Land_Arrangement__c
# Flight - 98848 - Flight__c
# Last activity date - 98812 - LastActivityDate
# Last modified date - 98809 - LastModifiedDate
# Last inbound mail timestamp - 99151 - Last_Inbound_Mail_Timestamp__c
# next call - 98864 - Next_Call__c
select * from crm_fields where crm_configuration_id = 209 and object_type = 'opportunity';
SELECT * FROM crm_layouts WHERE crm_configuration_id = 209;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 682;
select * from opportunities where team_id = 187 and name LIKE'%Muriel Sal%';
select * from opportunities where team_id = 187 and user_id = 9951 and is_closed = 0;
select * from activities where opportunity_id = 3538248;
SELECT * FROM crm_profiles WHERE user_id = 8150;
select * from deal_risks where opportunity_id = 3538248;
select * from teams where crm_id IS NULL;
SELECT opp.id AS opportunity_id,
u.group_id AS group_id,
MAX(
CASE
WHEN a.type IN ("sms-inbound", "sms-outbound") THEN a.created_at
ELSE a.actual_end_time
END) as last_date
FROM opportunities opp
left join activities a on a.opportunity_id = opp.id
inner join users u on opp.user_id = u.id
where opp.user_id IN (9951)
AND opp.is_closed = 0
and a.status IN ('completed', 'received', 'delivered') OR a.status IS NULL
group by opp.id;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Cybsafe%'; # 343,301,12008,[EMAIL]
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 343
and sa.provider = 'hubspot';
SELECT * FROM crm_profiles WHERE crm_configuration_id = 301;
SELECT * FROM contacts WHERE id = 6612363;
SELECT * FROM accounts WHERE id = 4235676;
SELECT * FROM opportunities WHERE crm_configuration_id = 301 and crm_provider_id = 32983784868;
select * from opportunity_stages where opportunity_id = 4503759;
# SELECT * FROM opportunities WHERE id = 4569937;
select * from activities where crm_configuration_id = 301;
SELECT * FROM activities WHERE uuid_to_bin('d3b2b28b-c3d0-4c2d-8ed0-eef42855278a') = uuid; # 26330370
SELECT * FROM participants WHERE activity_id = 26330370;
SELECT * FROM teams WHERE id = 375;
select * from playbooks where team_id = 375;
select * from stages where crm_configuration_id = 301 and type = 'opportunity';
select * from teams;
select * from contact_roles;
SELECT * FROM opportunities WHERE team_id = 343 and user_id = 12871 and close_date >= '2024-11-01';
select * from users u join crm_profiles cp on cp.user_id = u.id where u.team_id = 343;
SELECT * FROM crm_field_data WHERE object_id = 3771706;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 343
and sa.provider = 'hubspot';
SELECT * FROM crm_fields WHERE crm_configuration_id = 301 and object_type = 'opportunity'
and crm_provider_id LIKE "%traffic_light%";
SELECT * FROM crm_field_values WHERE crm_field_id IN (144020,144048,144111,144113,144126,144481,144508,144531);
SELECT fd.* FROM opportunities o
JOIN crm_field_data fd ON o.id = fd.object_id
WHERE o.team_id = 343
# and o.user_id IS NOT NULL
and fd.crm_field_id IN (144020,144048,144111,144113,144126,144481,144508,144531)
and fd.value != ''
order by value desc
# group by o.id
;
SELECT * FROM opportunities WHERE id = 3769843;
SELECT * FROM teams WHERE name LIKE '%Tour%'; # 187,209,8150, [EMAIL]
SELECT * FROM crm_layouts WHERE crm_configuration_id = 209;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 682;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Funding Circle%'; # 220,177,8603,[EMAIL]
SELECT * FROM activities WHERE uuid_to_bin('7a40e99b-3b37-4bb1-b983-325b81801c01') = uuid; # 23139839
SELECT * FROM opportunities WHERE id = 3855992;
SELECT * FROM users WHERE name LIKE '%Angus Pollard%'; # 8988
SELECT * FROM teams WHERE name LIKE '%Story Terrace%'; # 379, 307, 12894
SELECT * FROM crm_fields WHERE crm_configuration_id = 307 and object_type != 'opportunity';
select * from contacts where team_id = 379 and name like '%bebro%'; # 5874411, crm: 77229348507
SELECT * FROM crm_field_data WHERE object_id = 5874411;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 379
and sa.provider = 'hubspot';
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%mentio%'; # 117, 94, 6371, [EMAIL]
SELECT * FROM activities WHERE uuid_to_bin('82939311-1af0-4506-8546-21e8d1fdf2c1') = uuid;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Tourlane%'; # 187, 209, 8150, [EMAIL]
SELECT * FROM opportunities WHERE team_id = 187 and crm_provider_id = '006Se000008xfvNIAQ'; # 3537793
select * from generic_ai_prompts where subject_id = 3537793;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Lunio%'; # 120, 97, 10984, [EMAIL]
SELECT * FROM crm_configurations WHERE id = 97;
SELECT * FROM crm_layouts WHERE crm_configuration_id = 97;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 355;
SELECT * FROM crm_fields WHERE id = 32682;
select cfd.value, o.* from opportunities o
join crm_field_data cfd on o.id = cfd.object_id and cfd.crm_field_id = 32682
where team_id = 120
and cfd.value != ''
;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 120
and sa.provider = 'salesforce';
select * from opportunities where team_id = 120 and crm_provider_id = '006N1000007X8MAIA0';
SELECT * FROM crm_field_data WHERE object_id = 2313439;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE id = 410;
SELECT * FROM teams WHERE name LIKE '%Local Business Oxford%';
select * from scorecards where team_id = 410;
select * from scorecard_rules;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Funding%'; # 220, 177, 8603, [EMAIL]
select * from activities a
join opportunities o on a.opportunity_id = o.id
join users u on o.user_id = u.id
where a.crm_configuration_id = 177 and a.type LIKE '%email-out%'
# and a.actual_end_time > '2024-12-16 00:00:00'
# and o.remotely_created_at > '2024-12-01 00:00:00'
# and u.group_id = 1014
and u.id = 9021
order by a.id desc;
SELECT * FROM opportunities WHERE id in (3981384,4017346);
SELECT * FROM users WHERE team_id = 220 and id IN (8775, 11435);
select * from users where id = 9021;
select * from inboxes where user_id = 9021;
select * from inbox_emails where inbox_id = 1349 and email_date > '2024-12-18 00:00:00';
select * from email_messages where team_id = 220
and orig_date > '2024-12-16 00:00:00' and orig_date < '2024-12-19 00:00:00'
and subject LIKE '%Personal%'
# and 'from' = '[EMAIL]'
;
select * from activities a
join opportunities o on a.opportunity_id = o.id
where a.user_id = 9021 and a.type LIKE '%email-out%'
and a.actual_end_time > '2024-12-18 00:00:00'
and o.user_id IS NOT NULL
and o.remotely_created_at > '2024-12-01 00:00:00'
order by a.id desc;
SELECT * FROM opportunities WHERE team_id = 220 and name LIKE '%Right Car move Limited%' and id = 3966852;
select * from activities where crm_configuration_id = 177 and type LIKE '%email%' and opportunity_id = 3966852 order by id desc;
select * from team_settings where name IN ('useCloseDate');
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Hurree%'; # 104, 81, 6175, [EMAIL]
SELECT * FROM opportunities WHERE team_id = 104 and name = 'PropOp';
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 104
and sa.provider = 'hubspot';
select * from crm_configurations where last_synced_at > '2025-01-19 01:00:00'
select * from teams where crm_id IS NULL;
select t.name as 'team', u.name as 'owner', u.email, u.phone
from teams t
join activity_providers ap on t.id = ap.team_id
join users u on t.owner_id = u.id
where 1=1
and t.status = 'active'
and ap.is_enabled = 1
# and u.status = 1
and ap.provider = 'ms-teams';
select * from crm_configurations where provider = 'bullhorn'; # 344
SELECT * FROM teams WHERE id = 442; # 14293
select * from users where team_id = 442;
select * from social_accounts sa where sa.sociable_id = 14293;
select * from invitations where team_id = 442;
# [PASSWORD_DOTS]
SELECT * FROM users WHERE email LIKE '%[EMAIL]%'; # 14022
SELECT * FROM teams WHERE id = 429;
select * from opportunities where team_id = 429 and crm_provider_id IN (16157415775, 22246219645);
select * from activities where opportunity_id in (4340436,4353519);
select * from transcription where activity_id IN (25630961,25381771);
select * from generic_ai_prompts where subject_id IN (4353519);
SELECT
a.id as activity_id,
a.opportunity_id,
a.type as activity_type,
a.language,
CONCAT(a.title, a.description) AS mail_content,
e.from AS mail_from,
e.to AS mail_to,
e.subject AS mail_subject,
e.body AS mail_body,
p.type as prompt_type,
p.status as prompt_status,
p.content AS prompt_content,
a.actual_start_time as created_at
FROM activities a
LEFT JOIN ai_prompts p ON a.transcription_id = p.transcription_id AND p.deleted_at IS NULL
LEFT JOIN email_messages e ON a.id = e.activity_id
WHERE a.actual_start_time > '2024-01-01 00:00:00'
AND a.opportunity_id IN (4353519)
AND a.status IN ('completed', 'received', 'delivered')
AND a.deleted_at IS NULL
AND a.type NOT IN ('sms-inbound', 'sms-outbound')
ORDER BY a.opportunity_id ASC, a.id ASC;
SELECT * FROM users WHERE name LIKE '%George Fierstone%'; # 14293
SELECT * FROM teams WHERE id = 442;
SELECT * FROM crm_configurations WHERE id = 344;
select * from team_features where team_id = 442;
select * from groups where team_id = 442;
select * from playbooks where team_id = 442;
select * from playbook_categories where playbook_id = 1729;
select * from crm_fields where crm_configuration_id = 344 and id = 172024;
SELECT * FROM crm_field_values WHERE crm_field_id = 172024;
select * from crm_layouts where crm_configuration_id = 344;
select * from playbook_layouts where playbook_id = 1729;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Learning%'; # 260, 221, 9444
select s.*
# , s.sent_at, u.name, a.*
from activity_summary_logs s
inner join activities a on a.id = s.activity_id
inner join users u on u.id = a.user_id
where a.crm_configuration_id = 356
and s.sent_at > date_sub(now(), interval 60 day)
order by a.actual_end_time desc;
select * from activities a
# inner join activity_summary_logs s on s.activity_id = a.id
where a.crm_configuration_id = 356 and a.actual_end_time > date_sub(now(), interval 60 day)
# and a.crm_provider_id is not null
# and provider <> 'ringcentral'
and status = 'completed'
order by a.actual_end_time desc;
select * from teams order by id desc; # 17328, 32, 17830, [EMAIL]
SELECT * FROM users;
SELECT * FROM users where team_id = 260 and status = 1; # 201 - 150 active
SELECT * FROM teams WHERE id = 260;
select * from team_settings where team_id = 260;
select * from crm_configurations where team_id = 260;
SELECT * FROM crm_layouts WHERE crm_configuration_id = 356;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 1184;
select * from accounts where crm_configuration_id = 221 order by id desc; # 7000
select * from leads where crm_configuration_id = 221 order by id desc; # 0
select * from contacts where crm_configuration_id = 221 order by id desc; # 200 000
select * from opportunities where crm_configuration_id = 221 order by id desc; # 0
select * from crm_profiles where crm_configuration_id = 221 order by id desc; # 23
select * from crm_fields where crm_configuration_id = 221;
select * from crm_field_values where crm_field_id = 5302 order by id desc;
select * from crm_layouts where crm_configuration_id = 221 order by id desc;
select * from stages where crm_configuration_id = 221 order by id desc;
select * from accounts where crm_configuration_id = 356 order by id desc; # 7000
select * from leads where crm_configuration_id = 356 order by id desc; # 0
select * from contacts where crm_configuration_id = 356 order by id desc; # 200 000
select * from opportunities where crm_configuration_id = 356 order by id desc; # 0
select * from crm_profiles where crm_configuration_id = 356 order by id desc; # 23
select * from crm_fields where crm_configuration_id = 356;
select * from crm_field_values where crm_field_id = 5302 order by id desc;
select * from crm_layouts where crm_configuration_id = 356 order by id desc;
select * from stages where crm_configuration_id = 356 order by id desc;
select * from playbooks where team_id = 260 order by id desc; # 4 (2 deleted)
select * from groups where team_id = 260 order by id desc; # 27 groups, (2 deleted)
select * from playbook_layouts where playbook_id IN (1410,1409,1276,1254); # 4
select ce.* from calendars c
join users u on c.user_id = u.id
join calendar_events ce on c.id = ce.calendar_id
where u.team_id = 260
and (ce.start_time > '2025-02-21 00:00:00')
;
# calendar events 1207
#
select * from opportunities where team_id = 260;
SELECT * FROM crm_field_data WHERE object_id = 4696496;
select * from activities where crm_configuration_id = 356 and crm_provider_id IS NOT NULL;
select * from activities where crm_configuration_id IN (221) and provider NOT IN ('ms-teams', 'uploader', 'zoom-bot')
# and type = 'conference' and status = 'scheduled' and activities.is_internal = 0
and created_at > '2024-03-01 00:00:00'
order by id desc; # 880 000, ringcentral, avaya
SELECT * FROM participants WHERE activity_id = 26371744;
# all activities 942 000 +
# conference 7385 - scheduled 984 - external 343
select * from activities where id = 26321812;
select * from participants where activity_id = 26321812;
select * from participants where activity_id in (26414510,26414514,26414516,26414604,26414653,26414655);
select * from leads where id in (720428,689175,731546,645866,621037);
select * from users where id = 13841;
select * from opportunities where user_id = 9541;
select * from stages where id = 15900;
select * from accounts where
# id IN (4160055,5053725,4965303,4896434)
id in (4584518,3249934,3218025,3891133,3399450,4172999,4485161,3101785,4587203,3070816,2870343,2870341,3563940,4550846,3424464,3249963,2870342)
;
select * from activities where id = 26654935;
SELECT * FROM opportunities WHERE id = 4803458;
SELECT * FROM opportunities where team_id = 260 and user_id = 13841 AND stage_id = 15900;
SELECT id, uuid, provider, type, lead_id, account_id, contact_id, opportunity_id, stage_id, status, recording_state, title, actual_start_time, actual_end_time
FROM activities WHERE user_id = 13841 AND opportunity_id IN (4729783, 4731717, 4731726, 4732064, 4732849, 4803458, 4813213);
SELECT DISTINCT
o.id, o.stage_id, s.name, a.title,
a.*
FROM activities a
# INNER JOIN tracks t ON a.id = t.activity_id
INNER JOIN users u ON a.user_id = u.id
INNER JOIN teams team ON u.team_id = team.id
INNER JOIN groups g ON u.group_id = g.id
INNER JOIN opportunities o ON a.opportunity_id = o.id
INNER JOIN stages s ON o.stage_id = s.id
WHERE
a.crm_configuration_id = 356
AND a.status IN ('completed', 'failed')
AND a.recording_state != 'stopped'
# and a.user_id = 13841
AND u.uuid = uuid_to_bin('6f40e4b8-c340-4059-b4ac-1728e87ea99e')
AND team.uuid = uuid_to_bin('a607fba7-452e-4683-b2af-00d6cb52c93c')
AND g.uuid = uuid_to_bin('b5d69e40-24a0-4c16-810b-5fa462299f94')
AND a.type IN ('softphone', 'softphone-inbound', 'conference', 'sms-inbound', 'sms-outbound')
# AND t.type IN ('audio', 'video')
AND (
(a.actual_start_time BETWEEN '2025-03-13 00:00:00' AND '2025-03-18 07:59:59')
OR
(
a.actual_start_time IS NULL
AND a.type IN ('sms-outbound', 'sms-inbound')
AND a.created_at BETWEEN '2025-03-13 00:00:00' AND '2025-03-18 07:59:59'
)
)
AND (
a.is_private = 0
OR (
a.is_private = 1
AND u.uuid = uuid_to_bin('6f40e4b8-c340-4059-b4ac-1728e87ea99e')
)
)
AND (
# s.id = 15900
s.uuid = uuid_to_bin('04ca1c26-c666-4268-a129-419c0acffd73')
OR s.uuid IS NULL -- Include records without opportunity stage
)
ORDER BY a.actual_end_time DESC;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Lead Forensics%'; # 190, 162, 8474, [EMAIL]
SELECT * FROM users WHERE team_id = 190;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 190
and sa.provider = 'hubspot';
select * from role_user where user_id = 8474;
select * from crm_configurations where provider = 'bullhorn';
SELECT * FROM opportunities WHERE uuid_to_bin('94578249-65ec-4205-90f2-7d1a7d5ab64a') = uuid;
SELECT * FROM users WHERE uuid_to_bin('26dbadeb-926f-4150-b11b-771b9d4c2f9a') = uuid;
SELECT * FROM opportunities WHERE id = 4732493;
select * from activities where opportunity_id = 4732493;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE id = 443; # 358, 14315, [EMAIL]
SELECT * FROM opportunities WHERE team_id = 443;
SELECT a.id, a.type, a.user_id, a.status, a.deleted_at, u.name, u.email, u.team_id as activity_team_id, u.status, u.deleted_at, t.name, t.status, s.team_id as stage_team_id
FROM activities AS a
JOIN stages AS s ON a.stage_id = s.id
JOIN users AS u ON u.id = a.user_id
JOIN teams AS t ON t.id = s.team_id
WHERE u.team_id <> s.team_id and t.id > 135;
SELECT
crm_configuration_id,
crm_provider_id,
COUNT(*) as duplicate_count,
GROUP_CONCAT(id) as stage_ids,
GROUP_CONCAT(name) as stage_names
FROM stages
GROUP BY crm_configuration_id, crm_provider_id
HAVING COUNT(*) > 1
ORDER BY duplicate_count DESC;
select * from stages where id IN (14898,14907);
select * from business_processes;
SELECT *
FROM crm_configurations
WHERE team_id IN (
SELECT team_id
FROM crm_configurations
GROUP BY team_id
HAVING COUNT(*) > 1
)
ORDER BY team_id;
SELECT *
FROM teams
WHERE crm_id IN (
SELECT crm_id
FROM teams
GROUP BY crm_id
HAVING COUNT(*) > 1
)
ORDER BY crm_id;
# [PASSWORD_DOTS]
select * from crm_configurations where provider = 'integration-app';
SELECT * FROM teams WHERE id = 443; # Correre Naturale 358 14315 [EMAIL]
select * from activities where crm_configuration_id = 358 order by actual_end_time desc;
select id, uuid, actual_end_time, crm_provider_id, is_internal, playbook_category_id, type, user_id, lead_id, contact_id, account_id, opportunity_id, status, title from activities where crm_configuration_id = 358 order by actual_end_time desc;
select * from team_features where team_id = 358;
select * from activity_summary_logs;
select * from teams where id = 406;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Sportfive%'; # 267, 202, 14637, [EMAIL]
select * from activities where crm_configuration_id = 202 order by actual_end_time desc;
SELECT * FROM users where id = 14637;
SELECT * FROM teams where id = 267;
SELECT * FROM groups where id = 1118;
select g.name, a.title, uuid_from_bin(a.uuid), a.external_id, a.status, a.recording_state, a.recording_reason_code, a.scheduled_start_time, a.scheduled_end_time, a.actual_start_time, a.actual_end_time from activities a
inner join users u on u.id = a.user_id
inner join groups g on g.id = u.group_id
where a.crm_configuration_id = 202
and a.is_internal = 0
and (a.scheduled_start_time between '2025-03-19 00:00:00' and '2025-03-21 00:00:00')
and a.type = 'conference'
and a.status != 'completed'
and a.external_id is not null
order by a.scheduled_start_time desc;
SELECT * FROM activities
WHERE crm_configuration_id = 202
AND status IN ('completed', 'failed')
AND recording_state != 'stopped'
AND type IN ('softphone', 'softphone-inbound', 'conference', 'sms-inbound', 'sms-outbound')
AND (is_private = 0 OR user_id = 14637)
AND (
(
actual_start_time BETWEEN '2025-03-12 12:00:00' AND '2025-03-24 11:59:59'
) OR (
actual_start_time IS NULL
AND type IN ('sms-outbound', 'sms-inbound')
AND created_at BETWEEN '2025-03-12 12:00:00' AND '2025-03-24 11:59:59'
)
)
AND NOT EXISTS (
SELECT 1
FROM tracks
WHERE
tracks.activity_id = activities.id
AND tracks.type IN ('audio', 'video')
)
ORDER BY actual_end_time DESC;
SELECT DISTINCT
a.*
FROM activities a
INNER JOIN tracks t ON a.id = t.activity_id
INNER JOIN users u ON a.user_id = u.id
INNER JOIN teams team ON u.team_id = team.id
WHERE
a.crm_configuration_id = 202
AND a.status IN ('completed', 'failed')
AND a.recording_state != 'stopped'
# and a.user_id = 14637
AND a.type IN ('softphone', 'softphone-inbound', 'conference', 'sms-inbound', 'sms-outbound')
# AND t.type IN ('audio', 'video')
AND (
(a.actual_start_time BETWEEN '2025-03-12 12:00:00' AND '2025-03-24 11:59:59')
OR
(
a.actual_start_time IS NULL
AND a.type IN ('sms-outbound', 'sms-inbound')
AND a.created_at BETWEEN '2025-03-12 12:00:00' AND '2025-03-24 11:59:59'
)
)
AND (
a.is_private = 0
OR (
a.is_private = 1
AND a.user_id = 14637
)
)
ORDER BY a.actual_end_time DESC
;
SELECT DISTINCT a.*
FROM activities a
INNER JOIN users u ON a.user_id = u.id
INNER JOIN teams t ON u.team_id = t.id
# INNER JOIN tracks tr ON a.id = tr.activity_id
# INNER JOIN groups g ON u.group_id = g.id
WHERE 1=1
AND t.id = 267
# AND t.uuid = uuid_to_bin('aed4927b-f1ea-499e-94c3-83762fd233e8')
AND a.status IN ('completed', 'failed')
AND a.recording_state != 'stopped'
AND a.type IN ('softphone', 'softphone-inbound', 'conference', 'sms-inbound', 'sms-outbound')
# AND tr.type NOT IN ('audio', 'video')
AND (
a.is_private = 0
OR a.user_id = 14637
)
AND (
(a.actual_start_time BETWEEN '2025-03-19 00:00:00' AND '2025-03-21 23:59:59')
OR (
a.actual_start_time IS NULL
AND a.type IN ('sms-outbound', 'sms-inbound')
AND a.created_at BETWEEN '2025-03-19 00:00:00' AND '2025-03-21 23:59:59'
)
)
# and NOT EXISTS (
# SELECT 1
# FROM tracks t
# WHERE t.activity_id = a.id
# AND t.type IN ('audio', 'video')
# )
ORDER BY a.actual_end_time DESC;
SELECT * FROM tracks WHERE activity_id = 26485995;
select a.is_private, a.title, uuid_from_bin(a.uuid), a.external_id, a.status, a.recording_state, a.recording_reason_code, a.scheduled_start_time, a.scheduled_end_time, a.actual_start_time, a.actual_end_time from activities a
inner join users u on u.id = a.user_id
where a.crm_configuration_id = 202
# and a.is_internal = 0
and (a.actual_start_time between '2025-03-19 00:00:00' and '2025-03-21 00:00:00')
and a.type IN ("softphone","softphone-inbound","conference","sms-inbound")
and a.status IN ('completed', 'failed')
# and a.external_id is not null
order by a.actual_end_time desc;
select * from activities a where a.crm_configuration_id = 202
and a.actual_start_time between '2025-03-20 00:00:00' and '2025-03-21 00:00:00'
# AND a.type IN ('softphone', 'softphone-inbound', 'conference', 'sms-inbound', 'sms-outbound')
select g.name, a.title, uuid_from_bin(a.uuid), a.external_id, a.status, a.recording_state, a.recording_reason_code, a.scheduled_start_time, a.scheduled_end_time, a.actual_start_time, a.actual_end_time from activities a
inner join users u on u.id = a.user_id
inner join groups g on g.id = u.group_id
where a.crm_configuration_id = 202
and a.is_internal = 0
and (a.scheduled_start_time between '2025-03-19 00:00:00' and '2025-03-21 00:00:00')
and a.type = 'conference'
and a.status != 'completed'
and a.external_id is not null
order by a.scheduled_start_time desc;
SELECT * FROM teams WHERE name LIKE '%Tourlane%';
SELECT * FROM crm_fields WHERE crm_configuration_id = 209 and object_type = 'opportunity';
SELECT * FROM crm_field_data WHERE crm_field_id = 98809;
select * from users where status = 1 AND timezone = 'MDT';
select * from opportunities where id = 3769814;
select * from deal_risks where opportunity_id = 3769814;
select cp.* from crm_profiles cp
join users u on cp.user_id = u.id
join crm_configurations crm on cp.crm_configuration_id = crm.id
where crm.provider = 'hubspot' AND u.status = 1 AND log_notes != 'none';
select * from crm_fields where id = 154575;
select * from team_features where feature = 'SUPPORTS_SYNC_MISSING_CALL_DISPOSITIONS';
SELECT * FROM teams WHERE id = 176; # crm 148
select * from activities where crm_configuration_id = 148 and provider = 'hubspot' order by id desc;
select * from activity_providers where provider = 'amazon-connect';
select * from crm_fields cf
join crm_configurations crm on crm.id = cf.crm_configuration_id
where crm.provider = 'hubspot' and cf.object_type IN ('account', 'contact');
# [PASSWORD_DOTS]
SELECT * FROM users WHERE id IN (15415, 15418);
SELECT * FROM groups WHERE id IN (1805,1806);
SELECT * FROM playbooks WHERE id = 1860;
SELECT * FROM playbook_categories WHERE id = 38634;
SELECT * FROM crm_fields WHERE id = 189962;
SELECT * FROM teams WHERE name = 'Pulsar Group'; # 472, 380, 15138 [EMAIL]
SELECT * FROM crm_profiles WHERE user_id = 15415;
SELECT * FROM social_accounts WHERE sociable_id = 15415 and provider = 'salesforce';
select * from sidekick_settings where team_id = 472;
SELECT * FROM activities WHERE uuid_to_bin('452c58c7-b87c-4fdd-953e-d7af185e9588') = uuid; # 28617536, user: 15418
SELECT * FROM activities WHERE uuid_to_bin('399114ee-d3a8-458c-bff5-5f654658db0a') = uuid; # 28344407, user: 15415
SELECT * FROM activities WHERE uuid_to_bin('f0aa567f-0ab1-4bbb-96aa-37dcf184676b') = uuid; # 28580288, user: 15415
SELECT * FROM activities WHERE uuid_to_bin('50c086b1-2770-4bca-b5ae-6bac22ec426b') = uuid; # 28566069, user: 15415
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%TeamTailor%'; # 109, 218, 13969, [EMAIL]
select * from crm_configurations where id = 218;
SELECT * FROM activities WHERE uuid_to_bin('e39b5857-7fdb-4f5a-951a-8d3ca69bb1b0') = uuid; # 28338765
SELECT * FROM users WHERE id IN (13232, 13230);
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 109
and sa.provider = 'salesforce';
0057R00000EPL5HQAX Inez Ekblad
1091cb81-5ea1-4951-a0ed-f00b568f0140 Triman Kaur
SELECT * FROM crm_profiles WHERE user_id IN (13232, 13230);
############################################################################################
SELECT * FROM activities WHERE uuid_to_bin('675eeaeb-5681-42db-90bc-54c07a604408') = uuid; # 28655939 00UVg00000FLvnSMAT
SELECT * FROM crm_field_data WHERE activity_id = 28655939;
SELECT * FROM crm_fields WHERE id IN (94491,94493,94498);
SELECT * FROM users WHERE id = 13658;
SELECT * FROM teams WHERE id = 109;
SELECT * FROM crm_configurations WHERE id = 218;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 109
and sa.provider = 'salesforce';
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Strengthscope%'; # 481, 390, 15420, [EMAIL]
SELECT * FROM stages WHERE crm_configuration_id = 390;
select * from business_processes where team_id = 481 and crm_configuration_id = 390;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 481
and sa.provider = 'salesforce';
SELECT * FROM users WHERE id = 15780; # team 462
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 462
and sa.provider = 'hubspot';
select * from teams where id = 495;
SELECT * FROM users WHERE id = 15794;
select * from social_accounts where sociable_id = 15794;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Flight%'; # 427, 333, 13752
SELECT * FROM accounts WHERE team_id = 427 and crm_provider_id = '668731000183444517';
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Group GTI%'; # 495, 407, 15794
SELECT * FROM activities WHERE crm_configuration_id = 407
and status = 'completed' and type = 'conference'
order by id desc;
select ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id
join permission_role pr on pr.role_id = ru.role_id
join permissions p on p.id = pr.permission_id
where team_id = 495 and p.name IN ('dial');
select * from permission_role;
select * from activities where crm_configuration_id = 407 and status = 'completed' order by id desc;
SELECT * FROM activities WHERE id = 29512773;
SELECT * FROM activities WHERE id IN (29042721,28991325,29002874);
SELECT al.* from activity_summary_logs al join activities a on a.id = al.activity_id
where a.crm_configuration_id = 407
# and a.id IN (29042721,28991325,29002874);
SELECT * FROM users WHERE id = 15794;
SELECT * FROM users WHERE team_id = 495;
SELECT * FROM social_accounts WHERE sociable_id = 15794;
SELECT * FROM opportunities WHERE team_id = 495 and name like '%OC:%';
SELECT * FROM contacts WHERE team_id = 495;
SELECT * FROM leads WHERE team_id = 495;
SELECT * FROM accounts WHERE team_id = 495;
SELECT * FROM crm_profiles WHERE crm_configuration_id = 407;
SELECT * FROM crm_fields WHERE crm_configuration_id = 407;
SELECT * FROM crm_configurations WHERE id = 407;
SELECT * FROM opportunities WHERE team_id = 495 and close_date BETWEEN '2025-06-01' AND '2025-07-01'
and user_id IS NOT NULL and is_closed = 1 and is_won = 1;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Hamilton Court FX LLP%'; # 249, 187, 10103
SELECT * FROM activities WHERE uuid_to_bin('4659c2bb-9a49-484e-9327-a3d66f1e028c') = uuid; # 28951064
SELECT * FROM crm_fields WHERE crm_configuration_id = 187 and object_type IN ('tasks', 'event');
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Checkstep%'; # 325, 256, 11753
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 325
and sa.provider = 'hubspot';
SELECT * FROM activities WHERE uuid_to_bin('7be372e2-1916-4d79-a2f3-ca3db1346db3') = uuid; # 28611085
SELECT * FROM activities WHERE uuid_to_bin('980f0336-840b-4185-a5a9-30cf8b0749a8') = uuid; # 28719733
SELECT * FROM activity_summary_logs where activity_id = 28719733;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Learning%'; # 260, 356, 9444
SELECT * FROM activity_summary_logs where sent_at BETWEEN '2025-06-09 11:38:00' AND '2025-06-09 11:40:00';
SELECT * FROM leads WHERE crm_configuration_id = 356 and crm_provider_id = '230045001502770504'; # 823630
select * from activities where crm_configuration_id = 356 and lead_id = 841732;
SELECT * from activity_summary_logs al join activities a on a.id = al.activity_id
where a.crm_configuration_id = 356;
select * from activities where crm_configuration_id = 356
and actual_end_time between '2025-06-09 11:00:00' and '2025-06-09 12:00:00'
order by id desc;
select * from accounts where crm_configuration_id = 356 and crm_provider_id = '230045001514403366' order by id desc;
select * from leads where crm_configuration_id = 356 and crm_provider_id = '230045001514275654' order by id desc;
select * from contacts where crm_configuration_id = 356 and crm_provider_id = '230045001514403366' order by id desc;
select * from opportunities where crm_configuration_id = 356 and crm_provider_id = '230045001514403366' order by id desc;
select * from team_features where team_id = 260;
select * from features where id IN (1,2,4,6,18,19,20,9,10,3,23,24,25,26,27);
SELECT * FROM activities WHERE uuid_to_bin('7be372e2-1916-4d79-a2f3-ca3db1346db3') = uuid;
select * from crm_fields;
select * from crm_layout_entities;
SELECT * FROM teams WHERE name LIKE '%Optable%';
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Teamtailor%'; # 109, 218, 13969
SELECT * FROM crm_configurations WHERE id = 218;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 109
and sa.provider = 'salesforce';
SELECT * FROM activities WHERE uuid_to_bin('675eeaeb-5681-42db-90bc-54c07a604408') = uuid; # 28655939
SELECT * FROM crm_field_data WHERE activity_id = 28655939;
SELECT * FROM crm_fields WHERE id in (94491,94493,94498);
select * from teams where crm_id IS NULL;
SELECT * FROM activities WHERE uuid_to_bin('71aa8a0c-9652-4ff6-bee7-d98ae60abef6') = uuid;
# [PASSWORD_DOTS]
select * from team_domains where team_id = 399;
SELECT * FROM teams WHERE name LIKE '%Rydoo%'; # 399, 318, 13207
select * from calendar_events where id = 5163781;
SELECT * FROM activities WHERE uuid_to_bin('be2cbc52-7fda-46a0-9ae0-25d9553eafc0') = uuid; # 29443896
SELECT * FROM participants WHERE activity_id = 29443896;
select * from contacts where crm_configuration_id = 318 and email = '[EMAIL]';
select * from leads where crm_configuration_id = 318 and email = '[EMAIL]';
select * from activities where user_id = 14937 order by created_at ;
select * from users where id = 14937;
select * from contacts where crm_configuration_id = 318 and email LIKE '%@strawberry.se';
select * from opportunities where crm_configuration_id = 318 and crm_provider_id = '006Sf00000D1WOAIA3';
select * from activities a join participants p on a.id = p.activity_id
where crm_configuration_id = 318 and a.updated_at > '2025-06-23T08:18:43Z';
# [PASSWORD_DOTS]
SELECT * FROM opportunities WHERE team_id = 379 and crm_provider_id = '39334518886';
SELECT * FROM opportunities WHERE team_id = 379 order by id desc;
SELECT * FROM teams WHERE id = 379;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 379 and sociable_id = 13852
and sa.provider = 'hubspot';
SELECT * FROM crm_configurations WHERE id = 307;
SELECT * FROM crm_layouts WHERE crm_configuration_id = 307;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 1027;
SELECT * FROM crm_fields WHERE crm_configuration_id = 307
and id IN (144750,144855,145158,155227);
SELECT * FROM activities;
select * from activities
where created_at > '2025-07-01 00:00:00'
# and created_at < '2025-08-01 00:00:00'
and type not in ('email-outbound', 'email-inbound')
and account_id is null
and contact_id is null
and lead_id is null
and opportunity_id is not null
;
SELECT * FROM activities WHERE id IN (25344155, 25344296, 25501909, 28692187);
SELECT * FROM crm_configurations WHERE id in (335,301,200);
select * from crm_fields where crm_configuration_id = 230 and crm_provider_id = 'Age2__c';
SELECT * FROM teams WHERE name LIKE '%Resights%';
select * from crm_fields where crm_configuration_id = 1 and object_type = 'opportunity';
select * from crm_configurations where provider = 'bullhorn'; # 344
select * from teams where id IN (442);
select * from activities
where crm_configuration_id = 177
and provider = 'amazon-connect'
order by id desc;
# and source <> 'gong';
select * from activity_providers where provider = 'amazon-connect';
SELECT * FROM activities WHERE uuid_to_bin('cec1993b-a7e5-4164-b74d-d680ea51d2f2') = uuid;
select * from crm_configurations where store_transcript = 1;
SELECT * FROM teams WHERE id IN (80);
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Sedna%'; # 277, 213, 12594
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 277
and sa.provider = 'salesforce';
select * from activities where crm_configuration_id = 213 and account_id = 2511502;
select * from crm_configurations where id = 213;
SELECT * FROM activities WHERE uuid_to_bin('35aa790a-8569-4544-8268-66f9a4a26804') = uuid; # 33981604
SELECT * FROM participants WHERE activity_id = 33981604;
SELECT * FROM crm_fields WHERE crm_configuration_id = 337 and object_type = 'task';
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 431
and sa.provider = 'salesforce';
SELECT * FROM activities WHERE uuid_to_bin('b5476c7d-19a8-491b-869d-676ea1e857b6') = uuid; # 33997223
select * from activity_summary_logs where activity_id = 33997223;
select * from activity_notes where activity_id =...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Tests passed: 7","depth":3,"value":"Tests passed: 7","help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"TrackAutomatedReportGeneratedEventTest","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'TrackAutomatedReportGeneratedEventTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'TrackAutomatedReportGeneratedEventTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"1","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Listeners\\AutomatedReports\\UserPilot;\n\nuse GuzzleHttp\\Exception\\GuzzleException;\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\nuse Illuminate\\Queue\\InteractsWithQueue;\nuse Jiminny\\Component\\Queue\\Constants;\nuse Jiminny\\Events\\AutomatedReports\\AutomatedReportGenerated;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\Contracts\\UserContract;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Jiminny\\Services\\UserPilot\\UserPilotClient;\n\nclass TrackAutomatedReportGeneratedEvent implements ShouldQueue\n{\n use InteractsWithQueue;\n\n private const string EVENT_NAME_AUTOMATED_REPORT = 'automated-report-generated';\n private const string EVENT_NAME_ASK_JIMINNY_REPORT = 'ask-jiminny-report-generated';\n\n public string $queue = Constants::QUEUE_DELAYABLE;\n\n public function __construct(\n private readonly UserPilotClient $userPilotClient,\n private readonly AutomatedReportsService $automatedReportsService,\n ) {\n }\n\n public function handle(AutomatedReportGenerated $event): void\n {\n if (config('services.userpilot.token') === null) {\n return;\n }\n\n $automatedReport = $event->automatedReport;\n $payload = $this->buildPayload($automatedReport);\n\n $eventName = $this->resolveEventName($automatedReport);\n\n try {\n foreach ($this->resolveUsers($automatedReport) as $user) {\n $this->userPilotClient->track($user, $eventName, $payload);\n }\n } catch (GuzzleException $e) {\n $this->release(3600);\n }\n }\n\n /**\n * @return array<UserContract>\n */\n private function resolveUsers(AutomatedReport $automatedReport): array\n {\n if ($automatedReport->isAskJiminnyReport()) {\n $creator = $automatedReport->getCreator();\n\n return $creator !== null ? [$creator] : [];\n }\n\n return $this->automatedReportsService->getRecipientUserObjects($automatedReport);\n }\n\n private function buildPayload(AutomatedReport $automatedReport): array\n {\n return [\n 'report_type' => $automatedReport->getType(),\n 'frequency' => $automatedReport->getFrequency(),\n ];\n }\n\n private function resolveEventName(AutomatedReport $automatedReport): string\n {\n if ($automatedReport->isAskJiminnyReport()) {\n return self::EVENT_NAME_ASK_JIMINNY_REPORT;\n }\n\n return self::EVENT_NAME_AUTOMATED_REPORT;\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Listeners\\AutomatedReports\\UserPilot;\n\nuse GuzzleHttp\\Exception\\GuzzleException;\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\nuse Illuminate\\Queue\\InteractsWithQueue;\nuse Jiminny\\Component\\Queue\\Constants;\nuse Jiminny\\Events\\AutomatedReports\\AutomatedReportGenerated;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\Contracts\\UserContract;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Jiminny\\Services\\UserPilot\\UserPilotClient;\n\nclass TrackAutomatedReportGeneratedEvent implements ShouldQueue\n{\n use InteractsWithQueue;\n\n private const string EVENT_NAME_AUTOMATED_REPORT = 'automated-report-generated';\n private const string EVENT_NAME_ASK_JIMINNY_REPORT = 'ask-jiminny-report-generated';\n\n public string $queue = Constants::QUEUE_DELAYABLE;\n\n public function __construct(\n private readonly UserPilotClient $userPilotClient,\n private readonly AutomatedReportsService $automatedReportsService,\n ) {\n }\n\n public function handle(AutomatedReportGenerated $event): void\n {\n if (config('services.userpilot.token') === null) {\n return;\n }\n\n $automatedReport = $event->automatedReport;\n $payload = $this->buildPayload($automatedReport);\n\n $eventName = $this->resolveEventName($automatedReport);\n\n try {\n foreach ($this->resolveUsers($automatedReport) as $user) {\n $this->userPilotClient->track($user, $eventName, $payload);\n }\n } catch (GuzzleException $e) {\n $this->release(3600);\n }\n }\n\n /**\n * @return array<UserContract>\n */\n private function resolveUsers(AutomatedReport $automatedReport): array\n {\n if ($automatedReport->isAskJiminnyReport()) {\n $creator = $automatedReport->getCreator();\n\n return $creator !== null ? [$creator] : [];\n }\n\n return $this->automatedReportsService->getRecipientUserObjects($automatedReport);\n }\n\n private function buildPayload(AutomatedReport $automatedReport): array\n {\n return [\n 'report_type' => $automatedReport->getType(),\n 'frequency' => $automatedReport->getFrequency(),\n ];\n }\n\n private function resolveEventName(AutomatedReport $automatedReport): string\n {\n if ($automatedReport->isAskJiminnyReport()) {\n return self::EVENT_NAME_ASK_JIMINNY_REPORT;\n }\n\n return self::EVENT_NAME_AUTOMATED_REPORT;\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"27","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"9","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"23","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"3","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"105","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT * FROM team_features where team_id = 1;\n\nSELECT * FROM teams WHERE name LIKE '%Vixio%'; # 340,270,11922\nSELECT * FROM users WHERE team_id = 340; # 12015\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 340\nand sa.provider = 'salesforce';\n# and sa.provider = 'salesloft';\n\nselect * from crm_fields where crm_configuration_id = 270 and object_type = 'event';\n# 125558 - Event Type - Event_Type__c\n# 125552 - Event Status - Event_Status__c\n\nSELECT * FROM sidekick_settings WHERE team_id = 340;\n\nSELECT * FROM crm_field_values WHERE crm_field_id in (125552);\n\nselect * from activities where crm_configuration_id = 270\nand type = 'conference' and crm_provider_id IS NOT NULL\nand actual_start_time > '2024-09-16 09:00:00' order by scheduled_start_time;\n\nSELECT * FROM activities WHERE id = 20871677;\nSELECT * FROM crm_field_data WHERE activity_id = 20871677;\n\nselect * from crm_layouts where crm_configuration_id = 270;\nselect * from crm_layout_entities where crm_layout_id in (886,887);\n\nSELECT * FROM crm_configurations WHERE id = 270;\n\nselect * from playbooks where team_id = 340; # 1514\nselect * from groups where team_id = 340;\nSELECT * FROM crm_fields WHERE id IN (125393, 125401);\n\nselect g.name as 'team name', p.name as 'playbook name', f.label as 'activity type field' from groups g\njoin playbooks p on g.playbook_id = p.id\njoin crm_fields f on p.activity_field_id = f.id\nwhere g.team_id = 340;\n\nSELECT * FROM activities WHERE uuid_to_bin('0c180357-67d2-419e-a8c3-b832a3490770') = uuid; # 20448716\nselect * from crm_field_data where object_id = 20448716;\n\nselect * from activities where crm_configuration_id = 270 and provider = 'salesloft' order by id desc;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%CybSafe%'; # 343,273,12008\nselect * from opportunities where team_id = 343;\nselect * from opportunities where team_id = 343 and crm_provider_id = '18099102526';\nselect * from opportunities where team_id = 343 and account_id = 945217482;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 343\nand sa.provider = 'hubspot';\n\nselect * from accounts where team_id = 343 order by name asc;\n\nselect * from stages where crm_configuration_id = 273 and type = 'opportunity';\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Voyado%'; # 353,283,12143\nSELECT * FROM activities WHERE crm_configuration_id = 283 and account_id = 3777844 order by id desc;\nSELECT * FROM accounts WHERE team_id = 353 AND name LIKE '%Salesloft%';\nSELECT * FROM activities WHERE id = 20717903;\n\nselect * from participants where activity_id IN (20929172,20928605,20928468,20926272,20926271,20926270,20926269,20916499,20916454,20916436,20916435,20900015,20900014,20900013,20897312,20897243,20897241,20897237,20897232,20897229,20893648,20893231,20893230,20893229,20893228,20889784,20885039,20885038,20885037,20885036,20885035,20882728,20882708,20882703,20882702,20869828,20869811,20869806,20869801,20869799,20869798,20869796,20869795,20869794,20869761,20869760,20869759,20868688,20868687,20850340,20847195,20841710,20833967,20827021,20825307,20825305,20825297,20824615,20824400,20823927,20821760,20795588,20794233,20794057,20793710,20785811,20781789,20781394,20781307,20762651,20758453,20758282,20757323,20756643,20756636,20756629,20756627,20756606,20756605,20756604,20756603,20756602,20756600,20756599,20756598,20756595,20756594,20756589,20756587,20756577,20756573,20748918,20748386,20748385,20748384,20748383,20748382,20748381,20748380,20748379,20748377,20748375,20748373,20743301,20717905,20717904,20717903,20717901,20717899);\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 353\nand sa.provider = 'salesforce';\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%modern world business solutions%'; # 345,275,12016, l.atkinson@mwbsolutions.co.uk\nSELECT * FROM activities WHERE uuid_to_bin('3921d399-3fef-4609-a291-b0097a166d43') = uuid;\n# id: 20940638, user: 12022, contact: 5305871\nSELECT * FROM activity_summary_logs WHERE activity_id = 20940638;\nselect * from contacts where team_id = 345 and crm_provider_id = '30891432415' order by name asc; # 5305871\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 345\nand sa.provider = 'hubspot';\n\nselect * from users where team_id = 345 and id = 12022;\nSELECT * FROM crm_profiles WHERE user_id = 12022;\nSELECT * FROM participants WHERE activity_id = 20940638;\nSELECT * FROM users u\nJOIN crm_profiles cp ON u.id = cp.user_id\nWHERE u.team_id = 345;\n\nselect * from contacts where team_id = 345 and crm_provider_id = '30880813535' order by name desc; # 5305871\n\nselect * from team_features where team_id = 345;\nSELECT * FROM activities WHERE uuid_to_bin('11701e2d-2f82-4dab-a616-1db4fad238df') = uuid; # 21115197\nSELECT * FROM participants WHERE activity_id = 20897406;\n\n\n\nSELECT * FROM activities WHERE uuid_to_bin('63ba55cd-1abc-447d-83da-0137000005b7') = uuid; # 20953912\nSELECT * FROM activities WHERE crm_configuration_id = 275 and provider = 'ringcentral' and title like '%1252629100%';\n\n\nSELECT * FROM activities WHERE id = 20946641;\nSELECT * FROM crm_profiles WHERE user_id = 10211;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Lunio%'; # 120,97,10984, triger@lunio.ai\nSELECT * FROM opportunities WHERE crm_configuration_id = 97 and crm_provider_id = '006N1000006c5PpIAI';\nselect * from stages where crm_configuration_id = 97 and type = 'opportunity';\nselect * from opportunities where team_id = 120;\n\n\nselect * from crm_configurations crm join teams t on crm.id = t.crm_id\nwhere 1=1\nAND t.current_billing_plan IS NOT NULL\nAND crm.auto_sync_activity = 0\nand crm.provider = 'hubspot';\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Exclaimer%'; # 270,205,10053,james.lewendon@exclaimer.com\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 270\nand sa.provider = 'salesforce';\nSELECT * FROM activities WHERE uuid_to_bin('b54df794-2a9a-4957-8d80-09a600ead5f8') = uuid; # 21637956\nSELECT * FROM crm_profiles WHERE user_id = 11446;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Cygnetise%'; # 372,300,12554, alex.chikly@cygnetise.com\nselect * from playbooks where team_id = 372;\nselect * from crm_fields where crm_configuration_id = 300 and object_type = 'event'; # 141340\nSELECT * FROM crm_field_values WHERE crm_field_id = 141340;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 372\nand sa.provider = 'salesforce';\n\nselect * from crm_profiles where crm_configuration_id = 300;\nSELECT * FROM crm_configurations WHERE team_id = 372;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Planday%'; # 291,242,11501,mfa@planday.com\nSELECT * FROM opportunities WHERE team_id = 291 and crm_provider_id = '006bG000005DO86QAG'; # 3207756\nselect * from crm_field_data where object_id = 3207756;\nSELECT * FROM crm_fields WHERE id = 111834;\n\nselect f.id, f.crm_provider_id AS field_name, f.label, fd.object_id AS dealId, fd.value\nFROM crm_fields f\nJOIN crm_field_data fd ON f.id = fd.crm_field_id\nWHERE f.crm_configuration_id = 242\nAND f.object_type = 'opportunity'\nAND fd.object_id IN (3207756)\nORDER BY fd.object_id, fd.updated_at;\n\nSELECT * FROM crm_configurations WHERE auto_connect = 1;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Tour%'; # 187,209,8150,salesforce-admin@tourlane.com\nselect * from group_deal_risk_types drgt join groups g on drgt.group_id = g.id\nwhere g.team_id = 187;\n\nselect * from `groups` where team_id = 187;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 187\nand sa.provider = 'salesforce';\n\n# Destination - 98870 - Destination__c\n# Stage - 79014 - StageName\n# Land Arrangement - 98856 - Land_Arrangement__c\n# Flight - 98848 - Flight__c\n# Last activity date - 98812 - LastActivityDate\n# Last modified date - 98809 - LastModifiedDate\n# Last inbound mail timestamp - 99151 - Last_Inbound_Mail_Timestamp__c\n# next call - 98864 - Next_Call__c\n\nselect * from crm_fields where crm_configuration_id = 209 and object_type = 'opportunity';\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 209;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 682;\n\nselect * from opportunities where team_id = 187 and name LIKE'%Muriel Sal%';\nselect * from opportunities where team_id = 187 and user_id = 9951 and is_closed = 0;\nselect * from activities where opportunity_id = 3538248;\n\nSELECT * FROM crm_profiles WHERE user_id = 8150;\n\nselect * from deal_risks where opportunity_id = 3538248;\n\nselect * from teams where crm_id IS NULL;\n\nSELECT opp.id AS opportunity_id,\n u.group_id AS group_id,\n MAX(\n CASE\n WHEN a.type IN (\"sms-inbound\", \"sms-outbound\") THEN a.created_at\n ELSE a.actual_end_time\n END) as last_date\nFROM opportunities opp\nleft join activities a on a.opportunity_id = opp.id\ninner join users u on opp.user_id = u.id\nwhere opp.user_id IN (9951)\n\nAND opp.is_closed = 0\nand a.status IN ('completed', 'received', 'delivered') OR a.status IS NULL\ngroup by opp.id;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Cybsafe%'; # 343,301,12008,polly.morphew@cybsafe.com\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 343\nand sa.provider = 'hubspot';\n\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 301;\nSELECT * FROM contacts WHERE id = 6612363;\nSELECT * FROM accounts WHERE id = 4235676;\nSELECT * FROM opportunities WHERE crm_configuration_id = 301 and crm_provider_id = 32983784868;\nselect * from opportunity_stages where opportunity_id = 4503759;\n# SELECT * FROM opportunities WHERE id = 4569937;\n\nselect * from activities where crm_configuration_id = 301;\nSELECT * FROM activities WHERE uuid_to_bin('d3b2b28b-c3d0-4c2d-8ed0-eef42855278a') = uuid; # 26330370\nSELECT * FROM participants WHERE activity_id = 26330370;\n\nSELECT * FROM teams WHERE id = 375;\nselect * from playbooks where team_id = 375;\n\nselect * from stages where crm_configuration_id = 301 and type = 'opportunity';\n\nselect * from teams;\nselect * from contact_roles;\n\nSELECT * FROM opportunities WHERE team_id = 343 and user_id = 12871 and close_date >= '2024-11-01';\n\nselect * from users u join crm_profiles cp on cp.user_id = u.id where u.team_id = 343;\n\nSELECT * FROM crm_field_data WHERE object_id = 3771706;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 343\nand sa.provider = 'hubspot';\n\nSELECT * FROM crm_fields WHERE crm_configuration_id = 301 and object_type = 'opportunity'\nand crm_provider_id LIKE \"%traffic_light%\";\nSELECT * FROM crm_field_values WHERE crm_field_id IN (144020,144048,144111,144113,144126,144481,144508,144531);\n\nSELECT fd.* FROM opportunities o\nJOIN crm_field_data fd ON o.id = fd.object_id\nWHERE o.team_id = 343\n# and o.user_id IS NOT NULL\nand fd.crm_field_id IN (144020,144048,144111,144113,144126,144481,144508,144531)\nand fd.value != ''\norder by value desc\n# group by o.id\n;\n\nSELECT * FROM opportunities WHERE id = 3769843;\n\nSELECT * FROM teams WHERE name LIKE '%Tour%'; # 187,209,8150, salesforce-admin@tourlane.com\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 209;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 682;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Funding Circle%'; # 220,177,8603,aswini.mishra@fundingcircle.com\nSELECT * FROM activities WHERE uuid_to_bin('7a40e99b-3b37-4bb1-b983-325b81801c01') = uuid; # 23139839\n\n\nSELECT * FROM opportunities WHERE id = 3855992;\n\nSELECT * FROM users WHERE name LIKE '%Angus Pollard%'; # 8988\n\nSELECT * FROM teams WHERE name LIKE '%Story Terrace%'; # 379, 307, 12894\nSELECT * FROM crm_fields WHERE crm_configuration_id = 307 and object_type != 'opportunity';\n\nselect * from contacts where team_id = 379 and name like '%bebro%'; # 5874411, crm: 77229348507\nSELECT * FROM crm_field_data WHERE object_id = 5874411;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 379\nand sa.provider = 'hubspot';\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%mentio%'; # 117, 94, 6371, nikhil.kumar@mention-me.com\nSELECT * FROM activities WHERE uuid_to_bin('82939311-1af0-4506-8546-21e8d1fdf2c1') = uuid;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Tourlane%'; # 187, 209, 8150, salesforce-admin@tourlane.com\nSELECT * FROM opportunities WHERE team_id = 187 and crm_provider_id = '006Se000008xfvNIAQ'; # 3537793\nselect * from generic_ai_prompts where subject_id = 3537793;\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Lunio%'; # 120, 97, 10984, triger@lunio.ai\nSELECT * FROM crm_configurations WHERE id = 97;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 97;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 355;\nSELECT * FROM crm_fields WHERE id = 32682;\n\nselect cfd.value, o.* from opportunities o\njoin crm_field_data cfd on o.id = cfd.object_id and cfd.crm_field_id = 32682\nwhere team_id = 120\nand cfd.value != ''\n;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 120\nand sa.provider = 'salesforce';\n\nselect * from opportunities where team_id = 120 and crm_provider_id = '006N1000007X8MAIA0';\nSELECT * FROM crm_field_data WHERE object_id = 2313439;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE id = 410;\nSELECT * FROM teams WHERE name LIKE '%Local Business Oxford%';\nselect * from scorecards where team_id = 410;\nselect * from scorecard_rules;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Funding%'; # 220, 177, 8603, aswini.mishra@fundingcircle.com\nselect * from activities a\njoin opportunities o on a.opportunity_id = o.id\njoin users u on o.user_id = u.id\nwhere a.crm_configuration_id = 177 and a.type LIKE '%email-out%'\n# and a.actual_end_time > '2024-12-16 00:00:00'\n# and o.remotely_created_at > '2024-12-01 00:00:00'\n# and u.group_id = 1014\nand u.id = 9021\norder by a.id desc;\nSELECT * FROM opportunities WHERE id in (3981384,4017346);\nSELECT * FROM users WHERE team_id = 220 and id IN (8775, 11435);\n\nselect * from users where id = 9021;\nselect * from inboxes where user_id = 9021;\n\nselect * from inbox_emails where inbox_id = 1349 and email_date > '2024-12-18 00:00:00';\n\nselect * from email_messages where team_id = 220\nand orig_date > '2024-12-16 00:00:00' and orig_date < '2024-12-19 00:00:00'\nand subject LIKE '%Personal%'\n# and 'from' = 'credit@fundingcircle.com'\n;\n\nselect * from activities a\njoin opportunities o on a.opportunity_id = o.id\nwhere a.user_id = 9021 and a.type LIKE '%email-out%'\nand a.actual_end_time > '2024-12-18 00:00:00'\nand o.user_id IS NOT NULL\nand o.remotely_created_at > '2024-12-01 00:00:00'\norder by a.id desc;\n\nSELECT * FROM opportunities WHERE team_id = 220 and name LIKE '%Right Car move Limited%' and id = 3966852;\nselect * from activities where crm_configuration_id = 177 and type LIKE '%email%' and opportunity_id = 3966852 order by id desc;\n\nselect * from team_settings where name IN ('useCloseDate');\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Hurree%'; # 104, 81, 6175, jfarrell@hurree.co\nSELECT * FROM opportunities WHERE team_id = 104 and name = 'PropOp';\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 104\nand sa.provider = 'hubspot';\n\nselect * from crm_configurations where last_synced_at > '2025-01-19 01:00:00'\nselect * from teams where crm_id IS NULL;\n\nselect t.name as 'team', u.name as 'owner', u.email, u.phone\nfrom teams t\njoin activity_providers ap on t.id = ap.team_id\njoin users u on t.owner_id = u.id\nwhere 1=1\n and t.status = 'active'\n and ap.is_enabled = 1\n# and u.status = 1\n and ap.provider = 'ms-teams';\n\nselect * from crm_configurations where provider = 'bullhorn'; # 344\nSELECT * FROM teams WHERE id = 442; # 14293\nselect * from users where team_id = 442;\nselect * from social_accounts sa where sa.sociable_id = 14293;\nselect * from invitations where team_id = 442;\n\n# ********************************************************************************************************\nSELECT * FROM users WHERE email LIKE '%nea.liikamaa@eletive.com%'; # 14022\nSELECT * FROM teams WHERE id = 429;\nselect * from opportunities where team_id = 429 and crm_provider_id IN (16157415775, 22246219645);\nselect * from activities where opportunity_id in (4340436,4353519);\n\nselect * from transcription where activity_id IN (25630961,25381771);\nselect * from generic_ai_prompts where subject_id IN (4353519);\n\nSELECT\n a.id as activity_id,\n a.opportunity_id,\n a.type as activity_type,\n a.language,\n CONCAT(a.title, a.description) AS mail_content,\n e.from AS mail_from,\n e.to AS mail_to,\n e.subject AS mail_subject,\n e.body AS mail_body,\n p.type as prompt_type,\n p.status as prompt_status,\n p.content AS prompt_content,\n a.actual_start_time as created_at\nFROM activities a\n LEFT JOIN ai_prompts p ON a.transcription_id = p.transcription_id AND p.deleted_at IS NULL\n LEFT JOIN email_messages e ON a.id = e.activity_id\nWHERE a.actual_start_time > '2024-01-01 00:00:00'\n AND a.opportunity_id IN (4353519)\n AND a.status IN ('completed', 'received', 'delivered')\n AND a.deleted_at IS NULL\n AND a.type NOT IN ('sms-inbound', 'sms-outbound')\nORDER BY a.opportunity_id ASC, a.id ASC;\n\nSELECT * FROM users WHERE name LIKE '%George Fierstone%'; # 14293\nSELECT * FROM teams WHERE id = 442;\nSELECT * FROM crm_configurations WHERE id = 344;\nselect * from team_features where team_id = 442;\nselect * from groups where team_id = 442;\nselect * from playbooks where team_id = 442;\nselect * from playbook_categories where playbook_id = 1729;\nselect * from crm_fields where crm_configuration_id = 344 and id = 172024;\nSELECT * FROM crm_field_values WHERE crm_field_id = 172024;\nselect * from crm_layouts where crm_configuration_id = 344;\nselect * from playbook_layouts where playbook_id = 1729;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Learning%'; # 260, 221, 9444\n\nselect s.*\n# , s.sent_at, u.name, a.*\nfrom activity_summary_logs s\ninner join activities a on a.id = s.activity_id\ninner join users u on u.id = a.user_id\nwhere a.crm_configuration_id = 356\nand s.sent_at > date_sub(now(), interval 60 day)\norder by a.actual_end_time desc;\n\nselect * from activities a\n# inner join activity_summary_logs s on s.activity_id = a.id\nwhere a.crm_configuration_id = 356 and a.actual_end_time > date_sub(now(), interval 60 day)\n# and a.crm_provider_id is not null\n# and provider <> 'ringcentral'\nand status = 'completed'\norder by a.actual_end_time desc;\n\nselect * from teams order by id desc; # 17328, 32, 17830, integration-account@jiminny.com\nSELECT * FROM users;\nSELECT * FROM users where team_id = 260 and status = 1; # 201 - 150 active\nSELECT * FROM teams WHERE id = 260;\nselect * from team_settings where team_id = 260;\nselect * from crm_configurations where team_id = 260;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 356;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 1184;\n\nselect * from accounts where crm_configuration_id = 221 order by id desc; # 7000\nselect * from leads where crm_configuration_id = 221 order by id desc; # 0\nselect * from contacts where crm_configuration_id = 221 order by id desc; # 200 000\nselect * from opportunities where crm_configuration_id = 221 order by id desc; # 0\nselect * from crm_profiles where crm_configuration_id = 221 order by id desc; # 23\nselect * from crm_fields where crm_configuration_id = 221;\nselect * from crm_field_values where crm_field_id = 5302 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 221 order by id desc;\nselect * from stages where crm_configuration_id = 221 order by id desc;\n\nselect * from accounts where crm_configuration_id = 356 order by id desc; # 7000\nselect * from leads where crm_configuration_id = 356 order by id desc; # 0\nselect * from contacts where crm_configuration_id = 356 order by id desc; # 200 000\nselect * from opportunities where crm_configuration_id = 356 order by id desc; # 0\nselect * from crm_profiles where crm_configuration_id = 356 order by id desc; # 23\nselect * from crm_fields where crm_configuration_id = 356;\nselect * from crm_field_values where crm_field_id = 5302 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 356 order by id desc;\nselect * from stages where crm_configuration_id = 356 order by id desc;\n\nselect * from playbooks where team_id = 260 order by id desc; # 4 (2 deleted)\nselect * from groups where team_id = 260 order by id desc; # 27 groups, (2 deleted)\nselect * from playbook_layouts where playbook_id IN (1410,1409,1276,1254); # 4\nselect ce.* from calendars c\njoin users u on c.user_id = u.id\njoin calendar_events ce on c.id = ce.calendar_id\nwhere u.team_id = 260\nand (ce.start_time > '2025-02-21 00:00:00')\n;\n# calendar events 1207\n#\n\nselect * from opportunities where team_id = 260;\nSELECT * FROM crm_field_data WHERE object_id = 4696496;\n\nselect * from activities where crm_configuration_id = 356 and crm_provider_id IS NOT NULL;\nselect * from activities where crm_configuration_id IN (221) and provider NOT IN ('ms-teams', 'uploader', 'zoom-bot')\n# and type = 'conference' and status = 'scheduled' and activities.is_internal = 0\nand created_at > '2024-03-01 00:00:00'\norder by id desc; # 880 000, ringcentral, avaya\nSELECT * FROM participants WHERE activity_id = 26371744;\n\n# all activities 942 000 +\n# conference 7385 - scheduled 984 - external 343\n\nselect * from activities where id = 26321812;\nselect * from participants where activity_id = 26321812;\nselect * from participants where activity_id in (26414510,26414514,26414516,26414604,26414653,26414655);\nselect * from leads where id in (720428,689175,731546,645866,621037);\n\nselect * from users where id = 13841;\nselect * from opportunities where user_id = 9541;\nselect * from stages where id = 15900;\n\nselect * from accounts where\n# id IN (4160055,5053725,4965303,4896434)\nid in (4584518,3249934,3218025,3891133,3399450,4172999,4485161,3101785,4587203,3070816,2870343,2870341,3563940,4550846,3424464,3249963,2870342)\n;\n\nselect * from activities where id = 26654935;\nSELECT * FROM opportunities WHERE id = 4803458;\n\nSELECT * FROM opportunities where team_id = 260 and user_id = 13841 AND stage_id = 15900;\nSELECT id, uuid, provider, type, lead_id, account_id, contact_id, opportunity_id, stage_id, status, recording_state, title, actual_start_time, actual_end_time\nFROM activities WHERE user_id = 13841 AND opportunity_id IN (4729783, 4731717, 4731726, 4732064, 4732849, 4803458, 4813213);\n\nSELECT DISTINCT\n o.id, o.stage_id, s.name, a.title,\n a.*\nFROM activities a\n# INNER JOIN tracks t ON a.id = t.activity_id\nINNER JOIN users u ON a.user_id = u.id\nINNER JOIN teams team ON u.team_id = team.id\nINNER JOIN groups g ON u.group_id = g.id\nINNER JOIN opportunities o ON a.opportunity_id = o.id\nINNER JOIN stages s ON o.stage_id = s.id\nWHERE\n a.crm_configuration_id = 356\n AND a.status IN ('completed', 'failed')\n AND a.recording_state != 'stopped'\n# and a.user_id = 13841\n AND u.uuid = uuid_to_bin('6f40e4b8-c340-4059-b4ac-1728e87ea99e')\n AND team.uuid = uuid_to_bin('a607fba7-452e-4683-b2af-00d6cb52c93c')\n AND g.uuid = uuid_to_bin('b5d69e40-24a0-4c16-810b-5fa462299f94')\n\n AND a.type IN ('softphone', 'softphone-inbound', 'conference', 'sms-inbound', 'sms-outbound')\n# AND t.type IN ('audio', 'video')\n AND (\n (a.actual_start_time BETWEEN '2025-03-13 00:00:00' AND '2025-03-18 07:59:59')\n OR\n (\n a.actual_start_time IS NULL\n AND a.type IN ('sms-outbound', 'sms-inbound')\n AND a.created_at BETWEEN '2025-03-13 00:00:00' AND '2025-03-18 07:59:59'\n )\n )\n AND (\n a.is_private = 0\n OR (\n a.is_private = 1\n AND u.uuid = uuid_to_bin('6f40e4b8-c340-4059-b4ac-1728e87ea99e')\n )\n )\n AND (\n# s.id = 15900\n s.uuid = uuid_to_bin('04ca1c26-c666-4268-a129-419c0acffd73')\n OR s.uuid IS NULL -- Include records without opportunity stage\n )\n\nORDER BY a.actual_end_time DESC;\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Lead Forensics%'; # 190, 162, 8474, willsc@leadforensics.com\nSELECT * FROM users WHERE team_id = 190;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 190\nand sa.provider = 'hubspot';\n\nselect * from role_user where user_id = 8474;\n\nselect * from crm_configurations where provider = 'bullhorn';\n\nSELECT * FROM opportunities WHERE uuid_to_bin('94578249-65ec-4205-90f2-7d1a7d5ab64a') = uuid;\nSELECT * FROM users WHERE uuid_to_bin('26dbadeb-926f-4150-b11b-771b9d4c2f9a') = uuid;\n\nSELECT * FROM opportunities WHERE id = 4732493;\nselect * from activities where opportunity_id = 4732493;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE id = 443; # 358, 14315, andrea.romano@correrenaturale.com\nSELECT * FROM opportunities WHERE team_id = 443;\n\nSELECT a.id, a.type, a.user_id, a.status, a.deleted_at, u.name, u.email, u.team_id as activity_team_id, u.status, u.deleted_at, t.name, t.status, s.team_id as stage_team_id\nFROM activities AS a\nJOIN stages AS s ON a.stage_id = s.id\nJOIN users AS u ON u.id = a.user_id\nJOIN teams AS t ON t.id = s.team_id\nWHERE u.team_id <> s.team_id and t.id > 135;\n\n\nSELECT\n crm_configuration_id,\n crm_provider_id,\n COUNT(*) as duplicate_count,\n GROUP_CONCAT(id) as stage_ids,\n GROUP_CONCAT(name) as stage_names\nFROM stages\nGROUP BY crm_configuration_id, crm_provider_id\nHAVING COUNT(*) > 1\nORDER BY duplicate_count DESC;\n\nselect * from stages where id IN (14898,14907);\n\nselect * from business_processes;\n\nSELECT *\nFROM crm_configurations\nWHERE team_id IN (\n SELECT team_id\n FROM crm_configurations\n GROUP BY team_id\n HAVING COUNT(*) > 1\n)\nORDER BY team_id;\n\nSELECT *\nFROM teams\nWHERE crm_id IN (\n SELECT crm_id\n FROM teams\n GROUP BY crm_id\n HAVING COUNT(*) > 1\n)\nORDER BY crm_id;\n\n# ***************************************************************************\nselect * from crm_configurations where provider = 'integration-app';\nSELECT * FROM teams WHERE id = 443; # Correre Naturale 358 14315 andrea.romano@correrenaturale.com\nselect * from activities where crm_configuration_id = 358 order by actual_end_time desc;\nselect id, uuid, actual_end_time, crm_provider_id, is_internal, playbook_category_id, type, user_id, lead_id, contact_id, account_id, opportunity_id, status, title from activities where crm_configuration_id = 358 order by actual_end_time desc;\nselect * from team_features where team_id = 358;\nselect * from activity_summary_logs;\n\nselect * from teams where id = 406;\n\n# ************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Sportfive%'; # 267, 202, 14637, srv.salesforce@sportfive.com\nselect * from activities where crm_configuration_id = 202 order by actual_end_time desc;\n\nSELECT * FROM users where id = 14637;\nSELECT * FROM teams where id = 267;\nSELECT * FROM groups where id = 1118;\n\nselect g.name, a.title, uuid_from_bin(a.uuid), a.external_id, a.status, a.recording_state, a.recording_reason_code, a.scheduled_start_time, a.scheduled_end_time, a.actual_start_time, a.actual_end_time from activities a\ninner join users u on u.id = a.user_id\ninner join groups g on g.id = u.group_id\nwhere a.crm_configuration_id = 202\nand a.is_internal = 0\nand (a.scheduled_start_time between '2025-03-19 00:00:00' and '2025-03-21 00:00:00')\nand a.type = 'conference'\nand a.status != 'completed'\nand a.external_id is not null\norder by a.scheduled_start_time desc;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 202\n AND status IN ('completed', 'failed')\n AND recording_state != 'stopped'\n AND type IN ('softphone', 'softphone-inbound', 'conference', 'sms-inbound', 'sms-outbound')\n AND (is_private = 0 OR user_id = 14637)\n AND (\n (\n actual_start_time BETWEEN '2025-03-12 12:00:00' AND '2025-03-24 11:59:59'\n ) OR (\n actual_start_time IS NULL\n AND type IN ('sms-outbound', 'sms-inbound')\n AND created_at BETWEEN '2025-03-12 12:00:00' AND '2025-03-24 11:59:59'\n )\n )\n AND NOT EXISTS (\n SELECT 1\n FROM tracks\n WHERE\n tracks.activity_id = activities.id\n AND tracks.type IN ('audio', 'video')\n )\nORDER BY actual_end_time DESC;\n\nSELECT DISTINCT\n a.*\nFROM activities a\nINNER JOIN tracks t ON a.id = t.activity_id\nINNER JOIN users u ON a.user_id = u.id\nINNER JOIN teams team ON u.team_id = team.id\nWHERE\n a.crm_configuration_id = 202\n AND a.status IN ('completed', 'failed')\n AND a.recording_state != 'stopped'\n# and a.user_id = 14637\n AND a.type IN ('softphone', 'softphone-inbound', 'conference', 'sms-inbound', 'sms-outbound')\n# AND t.type IN ('audio', 'video')\n AND (\n (a.actual_start_time BETWEEN '2025-03-12 12:00:00' AND '2025-03-24 11:59:59')\n OR\n (\n a.actual_start_time IS NULL\n AND a.type IN ('sms-outbound', 'sms-inbound')\n AND a.created_at BETWEEN '2025-03-12 12:00:00' AND '2025-03-24 11:59:59'\n )\n )\n AND (\n a.is_private = 0\n OR (\n a.is_private = 1\n AND a.user_id = 14637\n )\n )\n\nORDER BY a.actual_end_time DESC\n;\n\nSELECT DISTINCT a.*\nFROM activities a\nINNER JOIN users u ON a.user_id = u.id\nINNER JOIN teams t ON u.team_id = t.id\n# INNER JOIN tracks tr ON a.id = tr.activity_id\n# INNER JOIN groups g ON u.group_id = g.id\nWHERE 1=1\n AND t.id = 267\n# AND t.uuid = uuid_to_bin('aed4927b-f1ea-499e-94c3-83762fd233e8')\n AND a.status IN ('completed', 'failed')\n AND a.recording_state != 'stopped'\n AND a.type IN ('softphone', 'softphone-inbound', 'conference', 'sms-inbound', 'sms-outbound')\n# AND tr.type NOT IN ('audio', 'video')\n AND (\n a.is_private = 0\n OR a.user_id = 14637\n )\n AND (\n (a.actual_start_time BETWEEN '2025-03-19 00:00:00' AND '2025-03-21 23:59:59')\n OR (\n a.actual_start_time IS NULL\n AND a.type IN ('sms-outbound', 'sms-inbound')\n AND a.created_at BETWEEN '2025-03-19 00:00:00' AND '2025-03-21 23:59:59'\n )\n )\n# and NOT EXISTS (\n# SELECT 1\n# FROM tracks t\n# WHERE t.activity_id = a.id\n# AND t.type IN ('audio', 'video')\n# )\n\nORDER BY a.actual_end_time DESC;\n\nSELECT * FROM tracks WHERE activity_id = 26485995;\n\nselect a.is_private, a.title, uuid_from_bin(a.uuid), a.external_id, a.status, a.recording_state, a.recording_reason_code, a.scheduled_start_time, a.scheduled_end_time, a.actual_start_time, a.actual_end_time from activities a\ninner join users u on u.id = a.user_id\nwhere a.crm_configuration_id = 202\n# and a.is_internal = 0\nand (a.actual_start_time between '2025-03-19 00:00:00' and '2025-03-21 00:00:00')\nand a.type IN (\"softphone\",\"softphone-inbound\",\"conference\",\"sms-inbound\")\nand a.status IN ('completed', 'failed')\n# and a.external_id is not null\norder by a.actual_end_time desc;\n\nselect * from activities a where a.crm_configuration_id = 202\nand a.actual_start_time between '2025-03-20 00:00:00' and '2025-03-21 00:00:00'\n# AND a.type IN ('softphone', 'softphone-inbound', 'conference', 'sms-inbound', 'sms-outbound')\n\nselect g.name, a.title, uuid_from_bin(a.uuid), a.external_id, a.status, a.recording_state, a.recording_reason_code, a.scheduled_start_time, a.scheduled_end_time, a.actual_start_time, a.actual_end_time from activities a\ninner join users u on u.id = a.user_id\ninner join groups g on g.id = u.group_id\nwhere a.crm_configuration_id = 202\nand a.is_internal = 0\nand (a.scheduled_start_time between '2025-03-19 00:00:00' and '2025-03-21 00:00:00')\nand a.type = 'conference'\nand a.status != 'completed'\nand a.external_id is not null\norder by a.scheduled_start_time desc;\n\nSELECT * FROM teams WHERE name LIKE '%Tourlane%';\nSELECT * FROM crm_fields WHERE crm_configuration_id = 209 and object_type = 'opportunity';\nSELECT * FROM crm_field_data WHERE crm_field_id = 98809;\n\nselect * from users where status = 1 AND timezone = 'MDT';\n\nselect * from opportunities where id = 3769814;\nselect * from deal_risks where opportunity_id = 3769814;\n\nselect cp.* from crm_profiles cp\njoin users u on cp.user_id = u.id\njoin crm_configurations crm on cp.crm_configuration_id = crm.id\nwhere crm.provider = 'hubspot' AND u.status = 1 AND log_notes != 'none';\n\nselect * from crm_fields where id = 154575;\n\nselect * from team_features where feature = 'SUPPORTS_SYNC_MISSING_CALL_DISPOSITIONS';\nSELECT * FROM teams WHERE id = 176; # crm 148\nselect * from activities where crm_configuration_id = 148 and provider = 'hubspot' order by id desc;\n\nselect * from activity_providers where provider = 'amazon-connect';\n\nselect * from crm_fields cf\njoin crm_configurations crm on crm.id = cf.crm_configuration_id\nwhere crm.provider = 'hubspot' and cf.object_type IN ('account', 'contact');\n\n# *********************************************************************************************\nSELECT * FROM users WHERE id IN (15415, 15418);\nSELECT * FROM groups WHERE id IN (1805,1806);\nSELECT * FROM playbooks WHERE id = 1860;\nSELECT * FROM playbook_categories WHERE id = 38634;\nSELECT * FROM crm_fields WHERE id = 189962;\n\nSELECT * FROM teams WHERE name = 'Pulsar Group'; # 472, 380, 15138 raza.gilani@vuelio.com\n\nSELECT * FROM crm_profiles WHERE user_id = 15415;\nSELECT * FROM social_accounts WHERE sociable_id = 15415 and provider = 'salesforce';\n\nselect * from sidekick_settings where team_id = 472;\n\nSELECT * FROM activities WHERE uuid_to_bin('452c58c7-b87c-4fdd-953e-d7af185e9588') = uuid; # 28617536, user: 15418\nSELECT * FROM activities WHERE uuid_to_bin('399114ee-d3a8-458c-bff5-5f654658db0a') = uuid; # 28344407, user: 15415\nSELECT * FROM activities WHERE uuid_to_bin('f0aa567f-0ab1-4bbb-96aa-37dcf184676b') = uuid; # 28580288, user: 15415\nSELECT * FROM activities WHERE uuid_to_bin('50c086b1-2770-4bca-b5ae-6bac22ec426b') = uuid; # 28566069, user: 15415\n\n# *********************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%TeamTailor%'; # 109, 218, 13969, salesforce-integrations@teamtailor.com\nselect * from crm_configurations where id = 218;\nSELECT * FROM activities WHERE uuid_to_bin('e39b5857-7fdb-4f5a-951a-8d3ca69bb1b0') = uuid; # 28338765\nSELECT * FROM users WHERE id IN (13232, 13230);\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 109\nand sa.provider = 'salesforce';\n\n0057R00000EPL5HQAX Inez Ekblad\n\n1091cb81-5ea1-4951-a0ed-f00b568f0140 Triman Kaur\n\nSELECT * FROM crm_profiles WHERE user_id IN (13232, 13230);\n\n############################################################################################\nSELECT * FROM activities WHERE uuid_to_bin('675eeaeb-5681-42db-90bc-54c07a604408') = uuid; # 28655939 00UVg00000FLvnSMAT\nSELECT * FROM crm_field_data WHERE activity_id = 28655939;\nSELECT * FROM crm_fields WHERE id IN (94491,94493,94498);\nSELECT * FROM users WHERE id = 13658;\nSELECT * FROM teams WHERE id = 109;\nSELECT * FROM crm_configurations WHERE id = 218;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 109\nand sa.provider = 'salesforce';\n\n# ********************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Strengthscope%'; # 481, 390, 15420, katy.holden@strengthscope.comk\nSELECT * FROM stages WHERE crm_configuration_id = 390;\nselect * from business_processes where team_id = 481 and crm_configuration_id = 390;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 481\nand sa.provider = 'salesforce';\n\n\nSELECT * FROM users WHERE id = 15780; # team 462\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 462\nand sa.provider = 'hubspot';\n\n\nselect * from teams where id = 495;\nSELECT * FROM users WHERE id = 15794;\nselect * from social_accounts where sociable_id = 15794;\n\n# ********************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Flight%'; # 427, 333, 13752\nSELECT * FROM accounts WHERE team_id = 427 and crm_provider_id = '668731000183444517';\n\n# ********************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Group GTI%'; # 495, 407, 15794\nSELECT * FROM activities WHERE crm_configuration_id = 407\nand status = 'completed' and type = 'conference'\norder by id desc;\n\nselect ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id\njoin permission_role pr on pr.role_id = ru.role_id\n join permissions p on p.id = pr.permission_id\nwhere team_id = 495 and p.name IN ('dial');\n\nselect * from permission_role;\n\nselect * from activities where crm_configuration_id = 407 and status = 'completed' order by id desc;\nSELECT * FROM activities WHERE id = 29512773;\nSELECT * FROM activities WHERE id IN (29042721,28991325,29002874);\n\nSELECT al.* from activity_summary_logs al join activities a on a.id = al.activity_id\nwhere a.crm_configuration_id = 407\n# and a.id IN (29042721,28991325,29002874);\n\nSELECT * FROM users WHERE id = 15794;\nSELECT * FROM users WHERE team_id = 495;\nSELECT * FROM social_accounts WHERE sociable_id = 15794;\nSELECT * FROM opportunities WHERE team_id = 495 and name like '%OC:%';\nSELECT * FROM contacts WHERE team_id = 495;\nSELECT * FROM leads WHERE team_id = 495;\nSELECT * FROM accounts WHERE team_id = 495;\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 407;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 407;\nSELECT * FROM crm_configurations WHERE id = 407;\nSELECT * FROM opportunities WHERE team_id = 495 and close_date BETWEEN '2025-06-01' AND '2025-07-01'\nand user_id IS NOT NULL and is_closed = 1 and is_won = 1;\n\n# ********************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Hamilton Court FX LLP%'; # 249, 187, 10103\nSELECT * FROM activities WHERE uuid_to_bin('4659c2bb-9a49-484e-9327-a3d66f1e028c') = uuid; # 28951064\nSELECT * FROM crm_fields WHERE crm_configuration_id = 187 and object_type IN ('tasks', 'event');\n\n# *********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Checkstep%'; # 325, 256, 11753\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 325\nand sa.provider = 'hubspot';\n\nSELECT * FROM activities WHERE uuid_to_bin('7be372e2-1916-4d79-a2f3-ca3db1346db3') = uuid; # 28611085\nSELECT * FROM activities WHERE uuid_to_bin('980f0336-840b-4185-a5a9-30cf8b0749a8') = uuid; # 28719733\nSELECT * FROM activity_summary_logs where activity_id = 28719733;\n\n# *************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Learning%'; # 260, 356, 9444\nSELECT * FROM activity_summary_logs where sent_at BETWEEN '2025-06-09 11:38:00' AND '2025-06-09 11:40:00';\nSELECT * FROM leads WHERE crm_configuration_id = 356 and crm_provider_id = '230045001502770504'; # 823630\nselect * from activities where crm_configuration_id = 356 and lead_id = 841732;\n\nSELECT * from activity_summary_logs al join activities a on a.id = al.activity_id\nwhere a.crm_configuration_id = 356;\n\nselect * from activities where crm_configuration_id = 356\nand actual_end_time between '2025-06-09 11:00:00' and '2025-06-09 12:00:00'\norder by id desc;\n\nselect * from accounts where crm_configuration_id = 356 and crm_provider_id = '230045001514403366' order by id desc;\nselect * from leads where crm_configuration_id = 356 and crm_provider_id = '230045001514275654' order by id desc;\nselect * from contacts where crm_configuration_id = 356 and crm_provider_id = '230045001514403366' order by id desc;\nselect * from opportunities where crm_configuration_id = 356 and crm_provider_id = '230045001514403366' order by id desc;\n\nselect * from team_features where team_id = 260;\nselect * from features where id IN (1,2,4,6,18,19,20,9,10,3,23,24,25,26,27);\n\nSELECT * FROM activities WHERE uuid_to_bin('7be372e2-1916-4d79-a2f3-ca3db1346db3') = uuid;\n\nselect * from crm_fields;\nselect * from crm_layout_entities;\n\nSELECT * FROM teams WHERE name LIKE '%Optable%';\n\n# *************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Teamtailor%'; # 109, 218, 13969\nSELECT * FROM crm_configurations WHERE id = 218;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 109\nand sa.provider = 'salesforce';\nSELECT * FROM activities WHERE uuid_to_bin('675eeaeb-5681-42db-90bc-54c07a604408') = uuid; # 28655939\nSELECT * FROM crm_field_data WHERE activity_id = 28655939;\nSELECT * FROM crm_fields WHERE id in (94491,94493,94498);\n\nselect * from teams where crm_id IS NULL;\n\nSELECT * FROM activities WHERE uuid_to_bin('71aa8a0c-9652-4ff6-bee7-d98ae60abef6') = uuid;\n\n# *************************************************************************************************\nselect * from team_domains where team_id = 399;\nSELECT * FROM teams WHERE name LIKE '%Rydoo%'; # 399, 318, 13207\n\nselect * from calendar_events where id = 5163781;\nSELECT * FROM activities WHERE uuid_to_bin('be2cbc52-7fda-46a0-9ae0-25d9553eafc0') = uuid; # 29443896\nSELECT * FROM participants WHERE activity_id = 29443896;\nselect * from contacts where crm_configuration_id = 318 and email = 'marianne.westeng@strawberry.no';\nselect * from leads where crm_configuration_id = 318 and email = 'marianne.westeng@strawberry.no';\n\nselect * from activities where user_id = 14937 order by created_at ;\n\nselect * from users where id = 14937;\n\nselect * from contacts where crm_configuration_id = 318 and email LIKE '%@strawberry.se';\nselect * from opportunities where crm_configuration_id = 318 and crm_provider_id = '006Sf00000D1WOAIA3';\n\nselect * from activities a join participants p on a.id = p.activity_id\nwhere crm_configuration_id = 318 and a.updated_at > '2025-06-23T08:18:43Z';\n\n# *************************************************************************************************\nSELECT * FROM opportunities WHERE team_id = 379 and crm_provider_id = '39334518886';\nSELECT * FROM opportunities WHERE team_id = 379 order by id desc;\nSELECT * FROM teams WHERE id = 379;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 379 and sociable_id = 13852\nand sa.provider = 'hubspot';\n\nSELECT * FROM crm_configurations WHERE id = 307;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 307;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 1027;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 307\n and id IN (144750,144855,145158,155227);\n\nSELECT * FROM activities;\n\n\nselect * from activities\nwhere created_at > '2025-07-01 00:00:00'\n# and created_at < '2025-08-01 00:00:00'\nand type not in ('email-outbound', 'email-inbound')\nand account_id is null\nand contact_id is null\nand lead_id is null\nand opportunity_id is not null\n;\nSELECT * FROM activities WHERE id IN (25344155, 25344296, 25501909, 28692187);\nSELECT * FROM crm_configurations WHERE id in (335,301,200);\n\nselect * from crm_fields where crm_configuration_id = 230 and crm_provider_id = 'Age2__c';\n\nSELECT * FROM teams WHERE name LIKE '%Resights%';\nselect * from crm_fields where crm_configuration_id = 1 and object_type = 'opportunity';\n\nselect * from crm_configurations where provider = 'bullhorn'; # 344\nselect * from teams where id IN (442);\n\nselect * from activities\nwhere crm_configuration_id = 177\nand provider = 'amazon-connect'\n order by id desc;\n# and source <> 'gong';\n\nselect * from activity_providers where provider = 'amazon-connect';\n\nSELECT * FROM activities WHERE uuid_to_bin('cec1993b-a7e5-4164-b74d-d680ea51d2f2') = uuid;\n\n\nselect * from crm_configurations where store_transcript = 1;\nSELECT * FROM teams WHERE id IN (80);\n\n# *************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Sedna%'; # 277, 213, 12594\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 277\nand sa.provider = 'salesforce';\n\nselect * from activities where crm_configuration_id = 213 and account_id = 2511502;\n\nselect * from crm_configurations where id = 213;\n\nSELECT * FROM activities WHERE uuid_to_bin('35aa790a-8569-4544-8268-66f9a4a26804') = uuid; # 33981604\nSELECT * FROM participants WHERE activity_id = 33981604;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 337 and object_type = 'task';\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 431\nand sa.provider = 'salesforce';\nSELECT * FROM activities WHERE uuid_to_bin('b5476c7d-19a8-491b-869d-676ea1e857b6') = uuid; # 33997223\nselect * from activity_summary_logs where activity_id = 33997223;\nselect * from activity_notes where activity_id = 33997223;\n\n# ***********************************\nSELECT * FROM teams WHERE name LIKE '%Abode%';\n\n\nselect * from features;\nselect * from teams t\nwhere t.status = 'active'\nand id NOT IN (select team_id from team_features where feature_id = 9)\n;\n\n\nselect * from playbook_layouts where playbook_id = 1725;\nSELECT * FROM activities WHERE uuid_to_bin('65cc283c-4849-49e6-927f-4c281c8fea19') = uuid; # 34297473\nselect * from teams where id = 318;\nselect * from crm_configurations where team_id = 318;\nselect * from playbooks where team_id = 318;\nSELECT * FROM crm_layouts where crm_configuration_id = 381;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 1259;\nSELECT * FROM crm_fields WHERE id IN (192938,192936,192939);\n\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 1266;\nSELECT * FROM crm_fields WHERE id IN (192980,192991,192997,192998,193064,193067);\n\nSELECT * FROM activities WHERE uuid_to_bin('a902289b-285c-48eb-9cc2-6ad6c5d938f5') = uuid; # 34297533\n\n\n\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 927;\nSELECT * FROM crm_fields WHERE id IN (131668,131669,131670,131671,131676,131797);\n\nSELECT * FROM teams WHERE name LIKE '%Peripass%'; # 351, 281, 12124\nselect * from crm_layouts where crm_configuration_id = 281;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 927;\nselect * from crm_fields where crm_configuration_id = 281 and id in (131668,131669,131670,131671,131676,131797);\nselect * from opportunities where crm_configuration_id = 281;\n\nSELECT * FROM activities WHERE id IN (34211315, 34130075);\nSELECT * FROM crm_field_data WHERE object_id IN (34211315, 34130075);\n\nselect cf.crm_configuration_id, cle.crm_layout_id, cle.id, cf.id from crm_field_data cfd\njoin crm_layout_entities cle on cle.id = cfd.crm_layout_entity_id\njoin crm_fields cf on cle.crm_field_id = cf.id\nwhere cf.deleted_at IS NOT NULL\nGROUP BY cle.id, cf.id;\n\nselect * from crm_layouts where id IN (355);\nselect u.email, t.crm_id, t.* from teams t\njoin users u on u.id = t.owner_id\nwhere crm_id IN (97);\n\nSELECT * FROM crm_fields WHERE id = 96492;\n\nselect * from permissions;\nselect * from permission_role where permission_id = 247;\nselect * from roles;\n\nselect * from migrations;\n# *****************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('291e3c21-11cc-4728-aee7-6e4bedf86d72') = uuid; # 34262174\nSELECT * FROM crm_configurations WHERE id = 301;\nSELECT * FROM teams WHERE id = 343;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 343\nand sa.provider = 'hubspot';\n\nselect * from participants where activity_id = 34262174;\n\nselect * from contacts where crm_configuration_id = 301 and id = 6976326;\nselect * from accounts where crm_configuration_id = 301 and id IN (4647626, 4815829); # 30761335403\n\nselect * from activity_summary_logs where activity_id = 34262174;\n\nselect * from users where status = 1 AND timezone = 'EST';\n\n# ****************************************************************************\nSELECT * FROM users WHERE id = 13869;\nSELECT * FROM crm_configurations WHERE id = 320;\nSELECT * FROM teams WHERE id = 401;\n\nSELECT * FROM activities WHERE uuid_to_bin('2228c16f-10be-48d5-90d4-67385219dc01') = uuid; # 29670601\n\nSELECT * FROM accounts WHERE id = 7761483;\nSELECT * FROM opportunities WHERE id = 6051814;\n\nSELECT * FROM teams WHERE name LIKE '%Seedlegals%';\n\n;select * from opportunities where updated_at > '2025-10-11' AND crm_provider_id = '34713761166';\n\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 177;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 577;\nSELECT * FROM crm_fields WHERE id IN (68458,68459,68480,68497,68524,68530,68554,68618,68662,68781,68810,68898,68981,69049,97467);\n\nSELECT t.id, crm.id, t.name, crm.sync_objects, crm.provider, crm.last_synced_at FROM crm_configurations crm join teams t on t.crm_id = crm.id\nwhere t.status = 'active' AND crm.provider = 'hubspot' AND crm.last_synced_at < '2025-10-22 00:00:00';\n\nSELECT * FROM activities WHERE uuid_to_bin('fa09449f-cba9-496a-b8f3-865cd3c72351') = uuid;\nSELECT * FROM crm_configurations where id = 184;\nSELECT * FROM teams WHERE id = 246;\nSELECT * FROM social_accounts WHERE sociable_id = 9259 and provider = 'hubspot';\n\nSELECT * FROM users WHERE email LIKE '%rhian.old@bud.co.uk%'; # 17700\nSELECT * FROM teams WHERE id = 551;\n\nSELECT * FROM crm_configurations WHERE id = 471;\nSELECT * FROM activities WHERE crm_configuration_id = 471 and crm_provider_id IS NOT NULL;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 471;\nSELECT * FROM crm_fields WHERE id = 307260;\nSELECT * FROM crm_field_values WHERE crm_field_id = 307260;\n\nselect * from crm_layouts where crm_configuration_id = 471;\n\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 1547;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 1548;\n\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 551 and sa.provider = 'hubspot';\n\nSELECT * FROM teams WHERE name LIKE '%$PCS%';\n\n# ********************************************************************************************************\nselect * from crm_configurations crm\njoin teams t on t.crm_id = crm.id\nwhere t.status = 'active'\nand crm.provider = 'hubspot';\n\n# $slug = 'HUBSPOT_WEBHOOK_SYNC';\n# $team = Jiminny\\Models\\Team::find(2);\n# $feature = Feature::query()->where('slug', $slug)->first();\n# TeamFeature::query()->create(['feature_id' => $feature->getId(),'team_id' => $team->getId()]);\n\n# hubspot_webhook_metrics\n\nselect * from crm_configurations where id = 331; # 416\nSELECT * FROM teams WHERE id = 416;\nSELECT * FROM opportunities WHERE team_id = 190;\n\nSELECT * FROM teams WHERE name LIKE '%Lead Forensics%';\nSELECT sa.id,\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 190 and sa.provider = 'hubspot';\n\n\n\nSELECT * FROM teams WHERE name LIKE '%Rapaport%'; # 431, 337\nSELECT * FROM teams where id = 431;\nSELECT * FROM crm_configurations where team_id = 431;\nSELECT * FROM activity_providers where team_id = 431;\nSELECT * FROM activities where crm_configuration_id = 337 and type IN ('softphone', 'softphone-outbound')\nand provider NOT IN ('hubspot', 'aircall')\n# and telephony_provider_id = '019c1131-a22f-4792-b9ea-20adf6a02ed0'\norder by id desc;\nSELECT sa.id,\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 431 and sa.provider = 'salesforce';\n\nSELECT * FROM teams WHERE name LIKE '%BiP%'; # 401, 320\nSELECT * FROM teams where id = 401;\nSELECT * FROM crm_configurations where team_id = 401;\nSELECT * FROM activity_providers where team_id = 401;\nSELECT * FROM activities where crm_configuration_id = 320 and type IN ('softphone', 'softphone-outbound')\nand provider NOT IN ('hubspot', 'aircall')\n# and telephony_provider_id = '019c1131-a22f-4792-b9ea-20adf6a02ed0'\norder by id desc;\nSELECT sa.id,\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 401 and sa.provider = 'salesforce';\n\n\n# ********************************************************************\nSELECT * FROM crm_configurations where id = 307; # 379 - Story Terrace Inc , portalId: 3921157\nSELECT * FROM contacts WHERE team_id = 379 and updated_at > '2026-01-31 11:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 379 and updated_at > '2026-02-01 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 379 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 379 and sa.provider = 'hubspot';\n\n# ********************************************************************\nSELECT * FROM crm_configurations where id = 485; # 563 - LATUS Group (ad94d501-5d09-44fd-878f-ca3a9f8865c3) , portalId: 3904501\nSELECT * FROM opportunities WHERE team_id = 563 and updated_at > '2026-02-02 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 563 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 338; # 432 - Formalize , portalId: 9214205\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 432 and sa.provider = 'hubspot';\nSELECT * FROM opportunities WHERE team_id = 432 and updated_at > '2026-02-02 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 432 and updated_at > '2026-02-10 00:00:00' order by updated_at desc;\n\n# ********************************************************************\nSELECT * FROM crm_configurations where id = 436; # 519 - Moxso , portalId: 25531989\nSELECT * FROM opportunities WHERE team_id = 519 and updated_at > '2026-02-02 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 519 and updated_at > '2026-02-04 11:00:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 96; # 119 - Nourish Care , portalId: 26617984\nSELECT * FROM opportunities WHERE team_id = 119 and updated_at > '2026-02-02 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 119 and updated_at > '2026-02-04 11:00:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 331; # 416 - The National College , portalId: 7213852\nSELECT * FROM opportunities WHERE team_id = 416 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 416 and updated_at > '2026-02-04 11:00:00' order by updated_at desc;\n\n# ********************************************************************\nSELECT * FROM crm_configurations where id = 308; # 380 - Foodles , portalId: 7723616\nSELECT * FROM opportunities WHERE team_id = 380 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 380 and updated_at > '2026-02-06 10:30:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 379; # 471 - imat-uve , portalId: 9177354\nSELECT * FROM opportunities WHERE team_id = 471 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 471 and updated_at > '2026-02-06 10:30:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 465; # 545 - Spotler , portalId: 144759271\nSELECT * FROM opportunities WHERE team_id = 545 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 545 and updated_at > '2026-02-06 10:30:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 455; # 537 - indevis , portalId: 25666868\nSELECT * FROM opportunities WHERE team_id = 537 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 537 and updated_at > '2026-02-06 10:30:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 200; # 265 - Jobadder , portalId: 6426676\nSELECT * FROM opportunities WHERE team_id = 265 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 265 and updated_at > '2026-02-06 10:30:00' order by updated_at desc;\n# ********************************************************************\nSELECT * FROM crm_configurations where id = 335; # 429 - Eletive , portalId: 6110563\nSELECT * FROM opportunities WHERE team_id = 429 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 429 and updated_at > '2026-02-09 10:30:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 363; # 456 - Global Group , portalId: 8901981\nSELECT * FROM opportunities WHERE team_id = 456 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 456 and updated_at > '2026-02-09 10:30:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 297; # 369 - Unbiased , portalId: 9229005\nSELECT * FROM opportunities WHERE team_id = 369 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 369 and updated_at > '2026-02-09 10:30:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 353; # 449 - Fuuse , portalId: 25781745\nSELECT * FROM opportunities WHERE team_id = 449 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 449 and updated_at > '2026-02-09 10:30:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 487; # 566 - Nimbus , portalId: 39982590\nSELECT * FROM opportunities WHERE team_id = 566 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 566 and updated_at > '2026-02-09 10:30:00' order by updated_at desc;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 487;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 1630;\nselect * from crm_fields where crm_configuration_id = 487 and\n(uuid_to_bin('4c6b2971-64d4-45b8-b377-427be758b5a5') = uuid or uuid_to_bin('59e368d8-65a0-4b77-b611-db37c99fbe68') = uuid);\nSELECT * FROM crm_field_values WHERE crm_field_id = 375177;\n# ********************************************************************\nSELECT * FROM crm_configurations where id = 420; # 506 - voiio , portalId: 145629154\nSELECT * FROM opportunities WHERE team_id = 506 and updated_at > '2026-02-10 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 506 and updated_at > '2026-02-10 15:00:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 479; # 558 - Momice , portalId: 535962\nSELECT * FROM opportunities WHERE team_id = 558 and updated_at > '2026-02-10 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 558 and updated_at > '2026-02-10 15:00:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 59; # 80 - Storyclash GmbH , portalId: 4268479\nSELECT * FROM opportunities WHERE team_id = 80 and updated_at > '2026-02-10 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 80 and updated_at > '2026-02-10 15:00:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 175; # 203 - Team iAM , portalId: 5534732\nSELECT * FROM opportunities WHERE team_id = 203 and updated_at > '2026-02-10 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 203 and updated_at > '2026-02-10 15:00:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 368; # 460 - OneTouch Health , portalId: 5534732183355\nSELECT * FROM opportunities WHERE team_id = 460 and updated_at > '2026-02-10 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 460 and updated_at > '2026-02-10 15:00:00' order by updated_at desc;\n\n\n\nselect * from users where id = 29643;\nSELECT * FROM crm_field_values WHERE crm_field_id = 375177;\n# ********************************************************************\nSELECT * FROM teams WHERE name LIKE '%Buynomics%'; # 462, 482, 14910\nSELECT * FROM activities WHERE crm_configuration_id = 482\nand type NOT IN ('email-inbound', 'email-outbound')\n# and description like '%The call focused on understanding Welch%'\norder by id desc;\n\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 462 and sa.provider = 'salesforce';\n\nselect * from contacts where crm_configuration_id = 482 and name = 'Cyndall Hill'; # 15504749\nselect * from contacts where id = 10891096; # 482\nSELECT * FROM activities WHERE crm_configuration_id = 482\nand type NOT IN ('email-inbound', 'email-outbound')\nand contact_id = 15504749\norder by id desc;\n\nselect * from activities where id = 36793003; # 96cc7bc1-8622-4d27-92f4-baf664fc1a56, 00UOf00000PDdOXMA1\nselect * from transcription where id = 7646782;\nselect * from ai_prompts where transcription_id = 7646782;\n\n# ********************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('7a8471a3-847e-4822-802b-ddf426bbc252') = uuid; # 37370018\nSELECT * FROM activity_summary_logs WHERE activity_id = 37370018;\nSELECT * FROM teams WHERE id = 555;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 555 and sa.provider = 'hubspot';\n\n# ********************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('7c17b8aa-09df-4f85-a0f7-51f47afd712d') = uuid; # 37395250\nSELECT * FROM activities WHERE uuid_to_bin('14d60388-260d-494b-aa0d-63fdb1c78026') = uuid; # 37395250\n\nSELECT a.* FROM activities a JOIN crm_configurations c on c.id = a.crm_configuration_id\nwhere a.type IN ('softphone', 'softphone-outbound') and c.provider = 'hubspot'\nand a.provider NOT IN ('hubspot')\n# and a.provider IN ('salesloft')\n# and c.id NOT IN (70)\n# and a.duration > 30\n# and actual_start_time > '2026-02-05 00:00:00'\norder by a.id desc;\n\nSELECT * FROM activities WHERE id = 37549787;\nSELECT * FROM crm_profiles WHERE user_id = 17613;\n\nSELECT * FROM crm_configurations WHERE id = 70;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 93 and sa.provider = 'hubspot';\n\nSELECT asf.activity_search_id, asf.id, asf.value\nFROM activity_search_filters asf\nWHERE asf.filter = 'group_id'\nAND asf.value IN (\n SELECT CONCAT(\n HEX(SUBSTR(uuid, 5, 4)), '-',\n HEX(SUBSTR(uuid, 3, 2)), '-',\n HEX(SUBSTR(uuid, 1, 2)), '-',\n HEX(SUBSTR(uuid, 9, 2)), '-',\n HEX(SUBSTR(uuid, 11))\n )\n FROM groups\n WHERE deleted_at IS NOT NULL\n);\n\nSELECT * FROM crm_configurations WHERE id = 373; # KPSBremen.de 465 # - no social account\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 465 and sa.provider = 'hubspot';\n\nselect * from crm_configurations where id = 494;\n\nSELECT * FROM teams WHERE name LIKE '%splose%'; # 572, 495, 18708\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 572 and sa.provider = 'pipedrive';\n\nselect * from opportunities where team_id = 572\n# and name like '%Onebright%'\n# and is_closed = 1 and is_won = 0\n order by id desc;\n\n\nselect * from users where deleted_at is null and status = 2;\n\nselect * from contacts where id = 17900517;\nselect * from accounts where id = 10109838;\nselect * from opportunities where id = 6955880;\n\nselect * from opportunity_contacts where opportunity_id = 6955880;\nselect * from opportunity_contacts where contact_id = 17900517;\n\nselect * from contact_roles cr join crm_configurations crm on cr.crm_configuration_id = crm.id\nwhere crm.provider != 'salesforce';\n\nSELECT * FROM activities WHERE uuid_to_bin('adcb8331-5988-4353-834e-383a355abba2') = uuid; # 38056424, crm 104659682404\nselect * from teams where id = 456;\nSELECT * FROM crm_configurations WHERE id = 363;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 456 and sa.provider = 'hubspot';\n\nselect * from crm_layouts where crm_configuration_id = 363;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id IN (1203, 1204, 1635);\nSELECT * FROM crm_fields WHERE id IN (181536, 181538, 213455);\n\nSELECT * FROM teams WHERE name LIKE '%Electric%'; # 342, 272, 12767\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 342 and sa.provider = 'pipedrive';\nSELECT * FROM opportunities WHERE crm_configuration_id = 272 and name like 'NORTHUMBRIA POL%'; # and updated_at > '2025-07-01 00:00:00';\nSELECT * FROM opportunities WHERE crm_configuration_id = 272 order by remotely_created_at asc; # and updated_at > '2025-07-01 00:00:00';\nSELECT * FROM opportunities WHERE crm_configuration_id = 272 and updated_at > '2026-01-01 00:00:00';\nSELECT * FROM crm_fields WHERE crm_configuration_id = 272 and object_type = 'opportunity';\nSELECT * FROM crm_field_values WHERE crm_field_id = 127164;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 342 and sa.provider = 'pipedrive';\n\nSELECT * FROM teams WHERE id = 472;\nSELECT * FROM crm_configurations WHERE id = 380;\nselect * from activities where id = 38285673; # 38285673\nSELECT * FROM users WHERE id = 16942;\nSELECT * FROM groups WHERE id = 1964;\nSELECT * FROM playbooks WHERE id = 2033;\n\nselect * from teams where created_at > '2026-03-09';\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 499; # 1065\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 1678;\n\nSELECT * FROM teams WHERE id = 575;\nselect * from opportunities where team_id = 575;\n\nSELECT * FROM activities WHERE uuid_to_bin('96b1261f-2357-49f9-ab38-23ce12008ea0') = uuid;\n\nselect * from contacts c\nwhere c.crm_configuration_id = 370 order by c.updated_at desc;\n\nSELECT * FROM participants where activity_id = 38833541;\nSELECT * FROM participants where activity_id = 39216301;\nSELECT * FROM activity_summary_logs where activity_id = 39216301;\nSELECT * FROM activities WHERE uuid_to_bin('c7d99fbe-1fb1-41f2-8f4d-52e2bf70e1e9') = uuid; # 38833541, crm 478116564181\nSELECT * FROM activities WHERE uuid_to_bin('2e6ff4d3-9faa-447a-a8c1-9acde4d885ae') = uuid; # 39216301, crm 480171536586\nselect * from crm_profiles where crm_configuration_id = 319 and crm_provider_id = 525785080;\nselect * from opportunities where crm_configuration_id = 319 and crm_provider_id = 410150124747;\nselect * from accounts where crm_configuration_id = 319 and crm_provider_id = 47150650569;\nselect * from contacts where crm_configuration_id = 319 and crm_provider_id IN ('665587441856', '742723347700');\n# owner 13236 525785080\n# contact 1 16779180 665587441856 - activity - Alex Howes alex@supportroom.com created 2026-01-26\n# contact 2 19247563 742723347700 - ash@supportroom.com 2026-03-24\n# company 4176133 47150650569\n# deal 7100953 410150124747\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 400 and sa.provider = 'hubspot';\n\nselect * from features;\nselect * from team_features where feature_id = 40;\n\nselect * from teams where id = 556; # owner: 18101, crm: 477\nselect * from crm_configurations where id = 477;\nSELECT * FROM users WHERE id = 18101;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 556 and sa.provider = 'integration-app';\n\nselect * from opportunities where id = 7594349;\nselect * from opportunity_stages where opportunity_id = 7594349 order by created_at desc;\nselect * from business_processes where id = 6024;\nselect * from business_process_stages where stage_id = 16352;\nselect * from business_process_stages where business_process_id = 6024;\nselect * from stages where team_id = 459;\nselect * from teams where id = 459;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 459 and sa.provider = 'hubspot';\n\nSELECT os.stage_id, s.crm_provider_id, s.name, COUNT(*) as cnt\nFROM opportunity_stages os\nJOIN stages s ON s.id = os.stage_id\nWHERE os.opportunity_id = 7594349\nGROUP BY os.stage_id, s.crm_provider_id, s.name\nORDER BY cnt DESC;\n\nSELECT s.id, s.crm_provider_id, s.name, s.team_id, s.crm_configuration_id\nFROM stages s\nJOIN business_process_stages bps ON bps.stage_id = s.id\nWHERE bps.business_process_id = 6024\nAND s.crm_provider_id = 'contractsent';\n\nselect * from stages where id IN (16352,20612,18281,7344,16378,16309,5036,15223,14535,6293,12098,11607)\n\nSELECT * FROM teams WHERE name LIKE '%Pulsar Group%'; # 472, 380, 15138, raza.gilani@vuelio.com\nselect * from playbooks where team_id = 472; # event 226147\nSELECT * FROM playbook_categories WHERE playbook_id = 2288;\nSELECT * FROM crm_fields WHERE id = 226147;\nSELECT * FROM crm_field_values WHERE crm_field_id = 226147;\n\nSELECT * FROM crm_configurations WHERE id = 380;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 472 and sa.provider = 'salesforce';","depth":4,"value":"SELECT * FROM team_features where team_id = 1;\n\nSELECT * FROM teams WHERE name LIKE '%Vixio%'; # 340,270,11922\nSELECT * FROM users WHERE team_id = 340; # 12015\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 340\nand sa.provider = 'salesforce';\n# and sa.provider = 'salesloft';\n\nselect * from crm_fields where crm_configuration_id = 270 and object_type = 'event';\n# 125558 - Event Type - Event_Type__c\n# 125552 - Event Status - Event_Status__c\n\nSELECT * FROM sidekick_settings WHERE team_id = 340;\n\nSELECT * FROM crm_field_values WHERE crm_field_id in (125552);\n\nselect * from activities where crm_configuration_id = 270\nand type = 'conference' and crm_provider_id IS NOT NULL\nand actual_start_time > '2024-09-16 09:00:00' order by scheduled_start_time;\n\nSELECT * FROM activities WHERE id = 20871677;\nSELECT * FROM crm_field_data WHERE activity_id = 20871677;\n\nselect * from crm_layouts where crm_configuration_id = 270;\nselect * from crm_layout_entities where crm_layout_id in (886,887);\n\nSELECT * FROM crm_configurations WHERE id = 270;\n\nselect * from playbooks where team_id = 340; # 1514\nselect * from groups where team_id = 340;\nSELECT * FROM crm_fields WHERE id IN (125393, 125401);\n\nselect g.name as 'team name', p.name as 'playbook name', f.label as 'activity type field' from groups g\njoin playbooks p on g.playbook_id = p.id\njoin crm_fields f on p.activity_field_id = f.id\nwhere g.team_id = 340;\n\nSELECT * FROM activities WHERE uuid_to_bin('0c180357-67d2-419e-a8c3-b832a3490770') = uuid; # 20448716\nselect * from crm_field_data where object_id = 20448716;\n\nselect * from activities where crm_configuration_id = 270 and provider = 'salesloft' order by id desc;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%CybSafe%'; # 343,273,12008\nselect * from opportunities where team_id = 343;\nselect * from opportunities where team_id = 343 and crm_provider_id = '18099102526';\nselect * from opportunities where team_id = 343 and account_id = 945217482;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 343\nand sa.provider = 'hubspot';\n\nselect * from accounts where team_id = 343 order by name asc;\n\nselect * from stages where crm_configuration_id = 273 and type = 'opportunity';\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Voyado%'; # 353,283,12143\nSELECT * FROM activities WHERE crm_configuration_id = 283 and account_id = 3777844 order by id desc;\nSELECT * FROM accounts WHERE team_id = 353 AND name LIKE '%Salesloft%';\nSELECT * FROM activities WHERE id = 20717903;\n\nselect * from participants where activity_id IN (20929172,20928605,20928468,20926272,20926271,20926270,20926269,20916499,20916454,20916436,20916435,20900015,20900014,20900013,20897312,20897243,20897241,20897237,20897232,20897229,20893648,20893231,20893230,20893229,20893228,20889784,20885039,20885038,20885037,20885036,20885035,20882728,20882708,20882703,20882702,20869828,20869811,20869806,20869801,20869799,20869798,20869796,20869795,20869794,20869761,20869760,20869759,20868688,20868687,20850340,20847195,20841710,20833967,20827021,20825307,20825305,20825297,20824615,20824400,20823927,20821760,20795588,20794233,20794057,20793710,20785811,20781789,20781394,20781307,20762651,20758453,20758282,20757323,20756643,20756636,20756629,20756627,20756606,20756605,20756604,20756603,20756602,20756600,20756599,20756598,20756595,20756594,20756589,20756587,20756577,20756573,20748918,20748386,20748385,20748384,20748383,20748382,20748381,20748380,20748379,20748377,20748375,20748373,20743301,20717905,20717904,20717903,20717901,20717899);\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 353\nand sa.provider = 'salesforce';\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%modern world business solutions%'; # 345,275,12016, l.atkinson@mwbsolutions.co.uk\nSELECT * FROM activities WHERE uuid_to_bin('3921d399-3fef-4609-a291-b0097a166d43') = uuid;\n# id: 20940638, user: 12022, contact: 5305871\nSELECT * FROM activity_summary_logs WHERE activity_id = 20940638;\nselect * from contacts where team_id = 345 and crm_provider_id = '30891432415' order by name asc; # 5305871\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 345\nand sa.provider = 'hubspot';\n\nselect * from users where team_id = 345 and id = 12022;\nSELECT * FROM crm_profiles WHERE user_id = 12022;\nSELECT * FROM participants WHERE activity_id = 20940638;\nSELECT * FROM users u\nJOIN crm_profiles cp ON u.id = cp.user_id\nWHERE u.team_id = 345;\n\nselect * from contacts where team_id = 345 and crm_provider_id = '30880813535' order by name desc; # 5305871\n\nselect * from team_features where team_id = 345;\nSELECT * FROM activities WHERE uuid_to_bin('11701e2d-2f82-4dab-a616-1db4fad238df') = uuid; # 21115197\nSELECT * FROM participants WHERE activity_id = 20897406;\n\n\n\nSELECT * FROM activities WHERE uuid_to_bin('63ba55cd-1abc-447d-83da-0137000005b7') = uuid; # 20953912\nSELECT * FROM activities WHERE crm_configuration_id = 275 and provider = 'ringcentral' and title like '%1252629100%';\n\n\nSELECT * FROM activities WHERE id = 20946641;\nSELECT * FROM crm_profiles WHERE user_id = 10211;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Lunio%'; # 120,97,10984, triger@lunio.ai\nSELECT * FROM opportunities WHERE crm_configuration_id = 97 and crm_provider_id = '006N1000006c5PpIAI';\nselect * from stages where crm_configuration_id = 97 and type = 'opportunity';\nselect * from opportunities where team_id = 120;\n\n\nselect * from crm_configurations crm join teams t on crm.id = t.crm_id\nwhere 1=1\nAND t.current_billing_plan IS NOT NULL\nAND crm.auto_sync_activity = 0\nand crm.provider = 'hubspot';\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Exclaimer%'; # 270,205,10053,james.lewendon@exclaimer.com\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 270\nand sa.provider = 'salesforce';\nSELECT * FROM activities WHERE uuid_to_bin('b54df794-2a9a-4957-8d80-09a600ead5f8') = uuid; # 21637956\nSELECT * FROM crm_profiles WHERE user_id = 11446;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Cygnetise%'; # 372,300,12554, alex.chikly@cygnetise.com\nselect * from playbooks where team_id = 372;\nselect * from crm_fields where crm_configuration_id = 300 and object_type = 'event'; # 141340\nSELECT * FROM crm_field_values WHERE crm_field_id = 141340;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 372\nand sa.provider = 'salesforce';\n\nselect * from crm_profiles where crm_configuration_id = 300;\nSELECT * FROM crm_configurations WHERE team_id = 372;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Planday%'; # 291,242,11501,mfa@planday.com\nSELECT * FROM opportunities WHERE team_id = 291 and crm_provider_id = '006bG000005DO86QAG'; # 3207756\nselect * from crm_field_data where object_id = 3207756;\nSELECT * FROM crm_fields WHERE id = 111834;\n\nselect f.id, f.crm_provider_id AS field_name, f.label, fd.object_id AS dealId, fd.value\nFROM crm_fields f\nJOIN crm_field_data fd ON f.id = fd.crm_field_id\nWHERE f.crm_configuration_id = 242\nAND f.object_type = 'opportunity'\nAND fd.object_id IN (3207756)\nORDER BY fd.object_id, fd.updated_at;\n\nSELECT * FROM crm_configurations WHERE auto_connect = 1;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Tour%'; # 187,209,8150,salesforce-admin@tourlane.com\nselect * from group_deal_risk_types drgt join groups g on drgt.group_id = g.id\nwhere g.team_id = 187;\n\nselect * from `groups` where team_id = 187;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 187\nand sa.provider = 'salesforce';\n\n# Destination - 98870 - Destination__c\n# Stage - 79014 - StageName\n# Land Arrangement - 98856 - Land_Arrangement__c\n# Flight - 98848 - Flight__c\n# Last activity date - 98812 - LastActivityDate\n# Last modified date - 98809 - LastModifiedDate\n# Last inbound mail timestamp - 99151 - Last_Inbound_Mail_Timestamp__c\n# next call - 98864 - Next_Call__c\n\nselect * from crm_fields where crm_configuration_id = 209 and object_type = 'opportunity';\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 209;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 682;\n\nselect * from opportunities where team_id = 187 and name LIKE'%Muriel Sal%';\nselect * from opportunities where team_id = 187 and user_id = 9951 and is_closed = 0;\nselect * from activities where opportunity_id = 3538248;\n\nSELECT * FROM crm_profiles WHERE user_id = 8150;\n\nselect * from deal_risks where opportunity_id = 3538248;\n\nselect * from teams where crm_id IS NULL;\n\nSELECT opp.id AS opportunity_id,\n u.group_id AS group_id,\n MAX(\n CASE\n WHEN a.type IN (\"sms-inbound\", \"sms-outbound\") THEN a.created_at\n ELSE a.actual_end_time\n END) as last_date\nFROM opportunities opp\nleft join activities a on a.opportunity_id = opp.id\ninner join users u on opp.user_id = u.id\nwhere opp.user_id IN (9951)\n\nAND opp.is_closed = 0\nand a.status IN ('completed', 'received', 'delivered') OR a.status IS NULL\ngroup by opp.id;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Cybsafe%'; # 343,301,12008,polly.morphew@cybsafe.com\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 343\nand sa.provider = 'hubspot';\n\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 301;\nSELECT * FROM contacts WHERE id = 6612363;\nSELECT * FROM accounts WHERE id = 4235676;\nSELECT * FROM opportunities WHERE crm_configuration_id = 301 and crm_provider_id = 32983784868;\nselect * from opportunity_stages where opportunity_id = 4503759;\n# SELECT * FROM opportunities WHERE id = 4569937;\n\nselect * from activities where crm_configuration_id = 301;\nSELECT * FROM activities WHERE uuid_to_bin('d3b2b28b-c3d0-4c2d-8ed0-eef42855278a') = uuid; # 26330370\nSELECT * FROM participants WHERE activity_id = 26330370;\n\nSELECT * FROM teams WHERE id = 375;\nselect * from playbooks where team_id = 375;\n\nselect * from stages where crm_configuration_id = 301 and type = 'opportunity';\n\nselect * from teams;\nselect * from contact_roles;\n\nSELECT * FROM opportunities WHERE team_id = 343 and user_id = 12871 and close_date >= '2024-11-01';\n\nselect * from users u join crm_profiles cp on cp.user_id = u.id where u.team_id = 343;\n\nSELECT * FROM crm_field_data WHERE object_id = 3771706;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 343\nand sa.provider = 'hubspot';\n\nSELECT * FROM crm_fields WHERE crm_configuration_id = 301 and object_type = 'opportunity'\nand crm_provider_id LIKE \"%traffic_light%\";\nSELECT * FROM crm_field_values WHERE crm_field_id IN (144020,144048,144111,144113,144126,144481,144508,144531);\n\nSELECT fd.* FROM opportunities o\nJOIN crm_field_data fd ON o.id = fd.object_id\nWHERE o.team_id = 343\n# and o.user_id IS NOT NULL\nand fd.crm_field_id IN (144020,144048,144111,144113,144126,144481,144508,144531)\nand fd.value != ''\norder by value desc\n# group by o.id\n;\n\nSELECT * FROM opportunities WHERE id = 3769843;\n\nSELECT * FROM teams WHERE name LIKE '%Tour%'; # 187,209,8150, salesforce-admin@tourlane.com\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 209;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 682;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Funding Circle%'; # 220,177,8603,aswini.mishra@fundingcircle.com\nSELECT * FROM activities WHERE uuid_to_bin('7a40e99b-3b37-4bb1-b983-325b81801c01') = uuid; # 23139839\n\n\nSELECT * FROM opportunities WHERE id = 3855992;\n\nSELECT * FROM users WHERE name LIKE '%Angus Pollard%'; # 8988\n\nSELECT * FROM teams WHERE name LIKE '%Story Terrace%'; # 379, 307, 12894\nSELECT * FROM crm_fields WHERE crm_configuration_id = 307 and object_type != 'opportunity';\n\nselect * from contacts where team_id = 379 and name like '%bebro%'; # 5874411, crm: 77229348507\nSELECT * FROM crm_field_data WHERE object_id = 5874411;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 379\nand sa.provider = 'hubspot';\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%mentio%'; # 117, 94, 6371, nikhil.kumar@mention-me.com\nSELECT * FROM activities WHERE uuid_to_bin('82939311-1af0-4506-8546-21e8d1fdf2c1') = uuid;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Tourlane%'; # 187, 209, 8150, salesforce-admin@tourlane.com\nSELECT * FROM opportunities WHERE team_id = 187 and crm_provider_id = '006Se000008xfvNIAQ'; # 3537793\nselect * from generic_ai_prompts where subject_id = 3537793;\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Lunio%'; # 120, 97, 10984, triger@lunio.ai\nSELECT * FROM crm_configurations WHERE id = 97;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 97;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 355;\nSELECT * FROM crm_fields WHERE id = 32682;\n\nselect cfd.value, o.* from opportunities o\njoin crm_field_data cfd on o.id = cfd.object_id and cfd.crm_field_id = 32682\nwhere team_id = 120\nand cfd.value != ''\n;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 120\nand sa.provider = 'salesforce';\n\nselect * from opportunities where team_id = 120 and crm_provider_id = '006N1000007X8MAIA0';\nSELECT * FROM crm_field_data WHERE object_id = 2313439;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE id = 410;\nSELECT * FROM teams WHERE name LIKE '%Local Business Oxford%';\nselect * from scorecards where team_id = 410;\nselect * from scorecard_rules;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Funding%'; # 220, 177, 8603, aswini.mishra@fundingcircle.com\nselect * from activities a\njoin opportunities o on a.opportunity_id = o.id\njoin users u on o.user_id = u.id\nwhere a.crm_configuration_id = 177 and a.type LIKE '%email-out%'\n# and a.actual_end_time > '2024-12-16 00:00:00'\n# and o.remotely_created_at > '2024-12-01 00:00:00'\n# and u.group_id = 1014\nand u.id = 9021\norder by a.id desc;\nSELECT * FROM opportunities WHERE id in (3981384,4017346);\nSELECT * FROM users WHERE team_id = 220 and id IN (8775, 11435);\n\nselect * from users where id = 9021;\nselect * from inboxes where user_id = 9021;\n\nselect * from inbox_emails where inbox_id = 1349 and email_date > '2024-12-18 00:00:00';\n\nselect * from email_messages where team_id = 220\nand orig_date > '2024-12-16 00:00:00' and orig_date < '2024-12-19 00:00:00'\nand subject LIKE '%Personal%'\n# and 'from' = 'credit@fundingcircle.com'\n;\n\nselect * from activities a\njoin opportunities o on a.opportunity_id = o.id\nwhere a.user_id = 9021 and a.type LIKE '%email-out%'\nand a.actual_end_time > '2024-12-18 00:00:00'\nand o.user_id IS NOT NULL\nand o.remotely_created_at > '2024-12-01 00:00:00'\norder by a.id desc;\n\nSELECT * FROM opportunities WHERE team_id = 220 and name LIKE '%Right Car move Limited%' and id = 3966852;\nselect * from activities where crm_configuration_id = 177 and type LIKE '%email%' and opportunity_id = 3966852 order by id desc;\n\nselect * from team_settings where name IN ('useCloseDate');\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Hurree%'; # 104, 81, 6175, jfarrell@hurree.co\nSELECT * FROM opportunities WHERE team_id = 104 and name = 'PropOp';\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 104\nand sa.provider = 'hubspot';\n\nselect * from crm_configurations where last_synced_at > '2025-01-19 01:00:00'\nselect * from teams where crm_id IS NULL;\n\nselect t.name as 'team', u.name as 'owner', u.email, u.phone\nfrom teams t\njoin activity_providers ap on t.id = ap.team_id\njoin users u on t.owner_id = u.id\nwhere 1=1\n and t.status = 'active'\n and ap.is_enabled = 1\n# and u.status = 1\n and ap.provider = 'ms-teams';\n\nselect * from crm_configurations where provider = 'bullhorn'; # 344\nSELECT * FROM teams WHERE id = 442; # 14293\nselect * from users where team_id = 442;\nselect * from social_accounts sa where sa.sociable_id = 14293;\nselect * from invitations where team_id = 442;\n\n# ********************************************************************************************************\nSELECT * FROM users WHERE email LIKE '%nea.liikamaa@eletive.com%'; # 14022\nSELECT * FROM teams WHERE id = 429;\nselect * from opportunities where team_id = 429 and crm_provider_id IN (16157415775, 22246219645);\nselect * from activities where opportunity_id in (4340436,4353519);\n\nselect * from transcription where activity_id IN (25630961,25381771);\nselect * from generic_ai_prompts where subject_id IN (4353519);\n\nSELECT\n a.id as activity_id,\n a.opportunity_id,\n a.type as activity_type,\n a.language,\n CONCAT(a.title, a.description) AS mail_content,\n e.from AS mail_from,\n e.to AS mail_to,\n e.subject AS mail_subject,\n e.body AS mail_body,\n p.type as prompt_type,\n p.status as prompt_status,\n p.content AS prompt_content,\n a.actual_start_time as created_at\nFROM activities a\n LEFT JOIN ai_prompts p ON a.transcription_id = p.transcription_id AND p.deleted_at IS NULL\n LEFT JOIN email_messages e ON a.id = e.activity_id\nWHERE a.actual_start_time > '2024-01-01 00:00:00'\n AND a.opportunity_id IN (4353519)\n AND a.status IN ('completed', 'received', 'delivered')\n AND a.deleted_at IS NULL\n AND a.type NOT IN ('sms-inbound', 'sms-outbound')\nORDER BY a.opportunity_id ASC, a.id ASC;\n\nSELECT * FROM users WHERE name LIKE '%George Fierstone%'; # 14293\nSELECT * FROM teams WHERE id = 442;\nSELECT * FROM crm_configurations WHERE id = 344;\nselect * from team_features where team_id = 442;\nselect * from groups where team_id = 442;\nselect * from playbooks where team_id = 442;\nselect * from playbook_categories where playbook_id = 1729;\nselect * from crm_fields where crm_configuration_id = 344 and id = 172024;\nSELECT * FROM crm_field_values WHERE crm_field_id = 172024;\nselect * from crm_layouts where crm_configuration_id = 344;\nselect * from playbook_layouts where playbook_id = 1729;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Learning%'; # 260, 221, 9444\n\nselect s.*\n# , s.sent_at, u.name, a.*\nfrom activity_summary_logs s\ninner join activities a on a.id = s.activity_id\ninner join users u on u.id = a.user_id\nwhere a.crm_configuration_id = 356\nand s.sent_at > date_sub(now(), interval 60 day)\norder by a.actual_end_time desc;\n\nselect * from activities a\n# inner join activity_summary_logs s on s.activity_id = a.id\nwhere a.crm_configuration_id = 356 and a.actual_end_time > date_sub(now(), interval 60 day)\n# and a.crm_provider_id is not null\n# and provider <> 'ringcentral'\nand status = 'completed'\norder by a.actual_end_time desc;\n\nselect * from teams order by id desc; # 17328, 32, 17830, integration-account@jiminny.com\nSELECT * FROM users;\nSELECT * FROM users where team_id = 260 and status = 1; # 201 - 150 active\nSELECT * FROM teams WHERE id = 260;\nselect * from team_settings where team_id = 260;\nselect * from crm_configurations where team_id = 260;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 356;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 1184;\n\nselect * from accounts where crm_configuration_id = 221 order by id desc; # 7000\nselect * from leads where crm_configuration_id = 221 order by id desc; # 0\nselect * from contacts where crm_configuration_id = 221 order by id desc; # 200 000\nselect * from opportunities where crm_configuration_id = 221 order by id desc; # 0\nselect * from crm_profiles where crm_configuration_id = 221 order by id desc; # 23\nselect * from crm_fields where crm_configuration_id = 221;\nselect * from crm_field_values where crm_field_id = 5302 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 221 order by id desc;\nselect * from stages where crm_configuration_id = 221 order by id desc;\n\nselect * from accounts where crm_configuration_id = 356 order by id desc; # 7000\nselect * from leads where crm_configuration_id = 356 order by id desc; # 0\nselect * from contacts where crm_configuration_id = 356 order by id desc; # 200 000\nselect * from opportunities where crm_configuration_id = 356 order by id desc; # 0\nselect * from crm_profiles where crm_configuration_id = 356 order by id desc; # 23\nselect * from crm_fields where crm_configuration_id = 356;\nselect * from crm_field_values where crm_field_id = 5302 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 356 order by id desc;\nselect * from stages where crm_configuration_id = 356 order by id desc;\n\nselect * from playbooks where team_id = 260 order by id desc; # 4 (2 deleted)\nselect * from groups where team_id = 260 order by id desc; # 27 groups, (2 deleted)\nselect * from playbook_layouts where playbook_id IN (1410,1409,1276,1254); # 4\nselect ce.* from calendars c\njoin users u on c.user_id = u.id\njoin calendar_events ce on c.id = ce.calendar_id\nwhere u.team_id = 260\nand (ce.start_time > '2025-02-21 00:00:00')\n;\n# calendar events 1207\n#\n\nselect * from opportunities where team_id = 260;\nSELECT * FROM crm_field_data WHERE object_id = 4696496;\n\nselect * from activities where crm_configuration_id = 356 and crm_provider_id IS NOT NULL;\nselect * from activities where crm_configuration_id IN (221) and provider NOT IN ('ms-teams', 'uploader', 'zoom-bot')\n# and type = 'conference' and status = 'scheduled' and activities.is_internal = 0\nand created_at > '2024-03-01 00:00:00'\norder by id desc; # 880 000, ringcentral, avaya\nSELECT * FROM participants WHERE activity_id = 26371744;\n\n# all activities 942 000 +\n# conference 7385 - scheduled 984 - external 343\n\nselect * from activities where id = 26321812;\nselect * from participants where activity_id = 26321812;\nselect * from participants where activity_id in (26414510,26414514,26414516,26414604,26414653,26414655);\nselect * from leads where id in (720428,689175,731546,645866,621037);\n\nselect * from users where id = 13841;\nselect * from opportunities where user_id = 9541;\nselect * from stages where id = 15900;\n\nselect * from accounts where\n# id IN (4160055,5053725,4965303,4896434)\nid in (4584518,3249934,3218025,3891133,3399450,4172999,4485161,3101785,4587203,3070816,2870343,2870341,3563940,4550846,3424464,3249963,2870342)\n;\n\nselect * from activities where id = 26654935;\nSELECT * FROM opportunities WHERE id = 4803458;\n\nSELECT * FROM opportunities where team_id = 260 and user_id = 13841 AND stage_id = 15900;\nSELECT id, uuid, provider, type, lead_id, account_id, contact_id, opportunity_id, stage_id, status, recording_state, title, actual_start_time, actual_end_time\nFROM activities WHERE user_id = 13841 AND opportunity_id IN (4729783, 4731717, 4731726, 4732064, 4732849, 4803458, 4813213);\n\nSELECT DISTINCT\n o.id, o.stage_id, s.name, a.title,\n a.*\nFROM activities a\n# INNER JOIN tracks t ON a.id = t.activity_id\nINNER JOIN users u ON a.user_id = u.id\nINNER JOIN teams team ON u.team_id = team.id\nINNER JOIN groups g ON u.group_id = g.id\nINNER JOIN opportunities o ON a.opportunity_id = o.id\nINNER JOIN stages s ON o.stage_id = s.id\nWHERE\n a.crm_configuration_id = 356\n AND a.status IN ('completed', 'failed')\n AND a.recording_state != 'stopped'\n# and a.user_id = 13841\n AND u.uuid = uuid_to_bin('6f40e4b8-c340-4059-b4ac-1728e87ea99e')\n AND team.uuid = uuid_to_bin('a607fba7-452e-4683-b2af-00d6cb52c93c')\n AND g.uuid = uuid_to_bin('b5d69e40-24a0-4c16-810b-5fa462299f94')\n\n AND a.type IN ('softphone', 'softphone-inbound', 'conference', 'sms-inbound', 'sms-outbound')\n# AND t.type IN ('audio', 'video')\n AND (\n (a.actual_start_time BETWEEN '2025-03-13 00:00:00' AND '2025-03-18 07:59:59')\n OR\n (\n a.actual_start_time IS NULL\n AND a.type IN ('sms-outbound', 'sms-inbound')\n AND a.created_at BETWEEN '2025-03-13 00:00:00' AND '2025-03-18 07:59:59'\n )\n )\n AND (\n a.is_private = 0\n OR (\n a.is_private = 1\n AND u.uuid = uuid_to_bin('6f40e4b8-c340-4059-b4ac-1728e87ea99e')\n )\n )\n AND (\n# s.id = 15900\n s.uuid = uuid_to_bin('04ca1c26-c666-4268-a129-419c0acffd73')\n OR s.uuid IS NULL -- Include records without opportunity stage\n )\n\nORDER BY a.actual_end_time DESC;\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Lead Forensics%'; # 190, 162, 8474, willsc@leadforensics.com\nSELECT * FROM users WHERE team_id = 190;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 190\nand sa.provider = 'hubspot';\n\nselect * from role_user where user_id = 8474;\n\nselect * from crm_configurations where provider = 'bullhorn';\n\nSELECT * FROM opportunities WHERE uuid_to_bin('94578249-65ec-4205-90f2-7d1a7d5ab64a') = uuid;\nSELECT * FROM users WHERE uuid_to_bin('26dbadeb-926f-4150-b11b-771b9d4c2f9a') = uuid;\n\nSELECT * FROM opportunities WHERE id = 4732493;\nselect * from activities where opportunity_id = 4732493;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE id = 443; # 358, 14315, andrea.romano@correrenaturale.com\nSELECT * FROM opportunities WHERE team_id = 443;\n\nSELECT a.id, a.type, a.user_id, a.status, a.deleted_at, u.name, u.email, u.team_id as activity_team_id, u.status, u.deleted_at, t.name, t.status, s.team_id as stage_team_id\nFROM activities AS a\nJOIN stages AS s ON a.stage_id = s.id\nJOIN users AS u ON u.id = a.user_id\nJOIN teams AS t ON t.id = s.team_id\nWHERE u.team_id <> s.team_id and t.id > 135;\n\n\nSELECT\n crm_configuration_id,\n crm_provider_id,\n COUNT(*) as duplicate_count,\n GROUP_CONCAT(id) as stage_ids,\n GROUP_CONCAT(name) as stage_names\nFROM stages\nGROUP BY crm_configuration_id, crm_provider_id\nHAVING COUNT(*) > 1\nORDER BY duplicate_count DESC;\n\nselect * from stages where id IN (14898,14907);\n\nselect * from business_processes;\n\nSELECT *\nFROM crm_configurations\nWHERE team_id IN (\n SELECT team_id\n FROM crm_configurations\n GROUP BY team_id\n HAVING COUNT(*) > 1\n)\nORDER BY team_id;\n\nSELECT *\nFROM teams\nWHERE crm_id IN (\n SELECT crm_id\n FROM teams\n GROUP BY crm_id\n HAVING COUNT(*) > 1\n)\nORDER BY crm_id;\n\n# ***************************************************************************\nselect * from crm_configurations where provider = 'integration-app';\nSELECT * FROM teams WHERE id = 443; # Correre Naturale 358 14315 andrea.romano@correrenaturale.com\nselect * from activities where crm_configuration_id = 358 order by actual_end_time desc;\nselect id, uuid, actual_end_time, crm_provider_id, is_internal, playbook_category_id, type, user_id, lead_id, contact_id, account_id, opportunity_id, status, title from activities where crm_configuration_id = 358 order by actual_end_time desc;\nselect * from team_features where team_id = 358;\nselect * from activity_summary_logs;\n\nselect * from teams where id = 406;\n\n# ************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Sportfive%'; # 267, 202, 14637, srv.salesforce@sportfive.com\nselect * from activities where crm_configuration_id = 202 order by actual_end_time desc;\n\nSELECT * FROM users where id = 14637;\nSELECT * FROM teams where id = 267;\nSELECT * FROM groups where id = 1118;\n\nselect g.name, a.title, uuid_from_bin(a.uuid), a.external_id, a.status, a.recording_state, a.recording_reason_code, a.scheduled_start_time, a.scheduled_end_time, a.actual_start_time, a.actual_end_time from activities a\ninner join users u on u.id = a.user_id\ninner join groups g on g.id = u.group_id\nwhere a.crm_configuration_id = 202\nand a.is_internal = 0\nand (a.scheduled_start_time between '2025-03-19 00:00:00' and '2025-03-21 00:00:00')\nand a.type = 'conference'\nand a.status != 'completed'\nand a.external_id is not null\norder by a.scheduled_start_time desc;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 202\n AND status IN ('completed', 'failed')\n AND recording_state != 'stopped'\n AND type IN ('softphone', 'softphone-inbound', 'conference', 'sms-inbound', 'sms-outbound')\n AND (is_private = 0 OR user_id = 14637)\n AND (\n (\n actual_start_time BETWEEN '2025-03-12 12:00:00' AND '2025-03-24 11:59:59'\n ) OR (\n actual_start_time IS NULL\n AND type IN ('sms-outbound', 'sms-inbound')\n AND created_at BETWEEN '2025-03-12 12:00:00' AND '2025-03-24 11:59:59'\n )\n )\n AND NOT EXISTS (\n SELECT 1\n FROM tracks\n WHERE\n tracks.activity_id = activities.id\n AND tracks.type IN ('audio', 'video')\n )\nORDER BY actual_end_time DESC;\n\nSELECT DISTINCT\n a.*\nFROM activities a\nINNER JOIN tracks t ON a.id = t.activity_id\nINNER JOIN users u ON a.user_id = u.id\nINNER JOIN teams team ON u.team_id = team.id\nWHERE\n a.crm_configuration_id = 202\n AND a.status IN ('completed', 'failed')\n AND a.recording_state != 'stopped'\n# and a.user_id = 14637\n AND a.type IN ('softphone', 'softphone-inbound', 'conference', 'sms-inbound', 'sms-outbound')\n# AND t.type IN ('audio', 'video')\n AND (\n (a.actual_start_time BETWEEN '2025-03-12 12:00:00' AND '2025-03-24 11:59:59')\n OR\n (\n a.actual_start_time IS NULL\n AND a.type IN ('sms-outbound', 'sms-inbound')\n AND a.created_at BETWEEN '2025-03-12 12:00:00' AND '2025-03-24 11:59:59'\n )\n )\n AND (\n a.is_private = 0\n OR (\n a.is_private = 1\n AND a.user_id = 14637\n )\n )\n\nORDER BY a.actual_end_time DESC\n;\n\nSELECT DISTINCT a.*\nFROM activities a\nINNER JOIN users u ON a.user_id = u.id\nINNER JOIN teams t ON u.team_id = t.id\n# INNER JOIN tracks tr ON a.id = tr.activity_id\n# INNER JOIN groups g ON u.group_id = g.id\nWHERE 1=1\n AND t.id = 267\n# AND t.uuid = uuid_to_bin('aed4927b-f1ea-499e-94c3-83762fd233e8')\n AND a.status IN ('completed', 'failed')\n AND a.recording_state != 'stopped'\n AND a.type IN ('softphone', 'softphone-inbound', 'conference', 'sms-inbound', 'sms-outbound')\n# AND tr.type NOT IN ('audio', 'video')\n AND (\n a.is_private = 0\n OR a.user_id = 14637\n )\n AND (\n (a.actual_start_time BETWEEN '2025-03-19 00:00:00' AND '2025-03-21 23:59:59')\n OR (\n a.actual_start_time IS NULL\n AND a.type IN ('sms-outbound', 'sms-inbound')\n AND a.created_at BETWEEN '2025-03-19 00:00:00' AND '2025-03-21 23:59:59'\n )\n )\n# and NOT EXISTS (\n# SELECT 1\n# FROM tracks t\n# WHERE t.activity_id = a.id\n# AND t.type IN ('audio', 'video')\n# )\n\nORDER BY a.actual_end_time DESC;\n\nSELECT * FROM tracks WHERE activity_id = 26485995;\n\nselect a.is_private, a.title, uuid_from_bin(a.uuid), a.external_id, a.status, a.recording_state, a.recording_reason_code, a.scheduled_start_time, a.scheduled_end_time, a.actual_start_time, a.actual_end_time from activities a\ninner join users u on u.id = a.user_id\nwhere a.crm_configuration_id = 202\n# and a.is_internal = 0\nand (a.actual_start_time between '2025-03-19 00:00:00' and '2025-03-21 00:00:00')\nand a.type IN (\"softphone\",\"softphone-inbound\",\"conference\",\"sms-inbound\")\nand a.status IN ('completed', 'failed')\n# and a.external_id is not null\norder by a.actual_end_time desc;\n\nselect * from activities a where a.crm_configuration_id = 202\nand a.actual_start_time between '2025-03-20 00:00:00' and '2025-03-21 00:00:00'\n# AND a.type IN ('softphone', 'softphone-inbound', 'conference', 'sms-inbound', 'sms-outbound')\n\nselect g.name, a.title, uuid_from_bin(a.uuid), a.external_id, a.status, a.recording_state, a.recording_reason_code, a.scheduled_start_time, a.scheduled_end_time, a.actual_start_time, a.actual_end_time from activities a\ninner join users u on u.id = a.user_id\ninner join groups g on g.id = u.group_id\nwhere a.crm_configuration_id = 202\nand a.is_internal = 0\nand (a.scheduled_start_time between '2025-03-19 00:00:00' and '2025-03-21 00:00:00')\nand a.type = 'conference'\nand a.status != 'completed'\nand a.external_id is not null\norder by a.scheduled_start_time desc;\n\nSELECT * FROM teams WHERE name LIKE '%Tourlane%';\nSELECT * FROM crm_fields WHERE crm_configuration_id = 209 and object_type = 'opportunity';\nSELECT * FROM crm_field_data WHERE crm_field_id = 98809;\n\nselect * from users where status = 1 AND timezone = 'MDT';\n\nselect * from opportunities where id = 3769814;\nselect * from deal_risks where opportunity_id = 3769814;\n\nselect cp.* from crm_profiles cp\njoin users u on cp.user_id = u.id\njoin crm_configurations crm on cp.crm_configuration_id = crm.id\nwhere crm.provider = 'hubspot' AND u.status = 1 AND log_notes != 'none';\n\nselect * from crm_fields where id = 154575;\n\nselect * from team_features where feature = 'SUPPORTS_SYNC_MISSING_CALL_DISPOSITIONS';\nSELECT * FROM teams WHERE id = 176; # crm 148\nselect * from activities where crm_configuration_id = 148 and provider = 'hubspot' order by id desc;\n\nselect * from activity_providers where provider = 'amazon-connect';\n\nselect * from crm_fields cf\njoin crm_configurations crm on crm.id = cf.crm_configuration_id\nwhere crm.provider = 'hubspot' and cf.object_type IN ('account', 'contact');\n\n# *********************************************************************************************\nSELECT * FROM users WHERE id IN (15415, 15418);\nSELECT * FROM groups WHERE id IN (1805,1806);\nSELECT * FROM playbooks WHERE id = 1860;\nSELECT * FROM playbook_categories WHERE id = 38634;\nSELECT * FROM crm_fields WHERE id = 189962;\n\nSELECT * FROM teams WHERE name = 'Pulsar Group'; # 472, 380, 15138 raza.gilani@vuelio.com\n\nSELECT * FROM crm_profiles WHERE user_id = 15415;\nSELECT * FROM social_accounts WHERE sociable_id = 15415 and provider = 'salesforce';\n\nselect * from sidekick_settings where team_id = 472;\n\nSELECT * FROM activities WHERE uuid_to_bin('452c58c7-b87c-4fdd-953e-d7af185e9588') = uuid; # 28617536, user: 15418\nSELECT * FROM activities WHERE uuid_to_bin('399114ee-d3a8-458c-bff5-5f654658db0a') = uuid; # 28344407, user: 15415\nSELECT * FROM activities WHERE uuid_to_bin('f0aa567f-0ab1-4bbb-96aa-37dcf184676b') = uuid; # 28580288, user: 15415\nSELECT * FROM activities WHERE uuid_to_bin('50c086b1-2770-4bca-b5ae-6bac22ec426b') = uuid; # 28566069, user: 15415\n\n# *********************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%TeamTailor%'; # 109, 218, 13969, salesforce-integrations@teamtailor.com\nselect * from crm_configurations where id = 218;\nSELECT * FROM activities WHERE uuid_to_bin('e39b5857-7fdb-4f5a-951a-8d3ca69bb1b0') = uuid; # 28338765\nSELECT * FROM users WHERE id IN (13232, 13230);\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 109\nand sa.provider = 'salesforce';\n\n0057R00000EPL5HQAX Inez Ekblad\n\n1091cb81-5ea1-4951-a0ed-f00b568f0140 Triman Kaur\n\nSELECT * FROM crm_profiles WHERE user_id IN (13232, 13230);\n\n############################################################################################\nSELECT * FROM activities WHERE uuid_to_bin('675eeaeb-5681-42db-90bc-54c07a604408') = uuid; # 28655939 00UVg00000FLvnSMAT\nSELECT * FROM crm_field_data WHERE activity_id = 28655939;\nSELECT * FROM crm_fields WHERE id IN (94491,94493,94498);\nSELECT * FROM users WHERE id = 13658;\nSELECT * FROM teams WHERE id = 109;\nSELECT * FROM crm_configurations WHERE id = 218;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 109\nand sa.provider = 'salesforce';\n\n# ********************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Strengthscope%'; # 481, 390, 15420, katy.holden@strengthscope.comk\nSELECT * FROM stages WHERE crm_configuration_id = 390;\nselect * from business_processes where team_id = 481 and crm_configuration_id = 390;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 481\nand sa.provider = 'salesforce';\n\n\nSELECT * FROM users WHERE id = 15780; # team 462\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 462\nand sa.provider = 'hubspot';\n\n\nselect * from teams where id = 495;\nSELECT * FROM users WHERE id = 15794;\nselect * from social_accounts where sociable_id = 15794;\n\n# ********************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Flight%'; # 427, 333, 13752\nSELECT * FROM accounts WHERE team_id = 427 and crm_provider_id = '668731000183444517';\n\n# ********************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Group GTI%'; # 495, 407, 15794\nSELECT * FROM activities WHERE crm_configuration_id = 407\nand status = 'completed' and type = 'conference'\norder by id desc;\n\nselect ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id\njoin permission_role pr on pr.role_id = ru.role_id\n join permissions p on p.id = pr.permission_id\nwhere team_id = 495 and p.name IN ('dial');\n\nselect * from permission_role;\n\nselect * from activities where crm_configuration_id = 407 and status = 'completed' order by id desc;\nSELECT * FROM activities WHERE id = 29512773;\nSELECT * FROM activities WHERE id IN (29042721,28991325,29002874);\n\nSELECT al.* from activity_summary_logs al join activities a on a.id = al.activity_id\nwhere a.crm_configuration_id = 407\n# and a.id IN (29042721,28991325,29002874);\n\nSELECT * FROM users WHERE id = 15794;\nSELECT * FROM users WHERE team_id = 495;\nSELECT * FROM social_accounts WHERE sociable_id = 15794;\nSELECT * FROM opportunities WHERE team_id = 495 and name like '%OC:%';\nSELECT * FROM contacts WHERE team_id = 495;\nSELECT * FROM leads WHERE team_id = 495;\nSELECT * FROM accounts WHERE team_id = 495;\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 407;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 407;\nSELECT * FROM crm_configurations WHERE id = 407;\nSELECT * FROM opportunities WHERE team_id = 495 and close_date BETWEEN '2025-06-01' AND '2025-07-01'\nand user_id IS NOT NULL and is_closed = 1 and is_won = 1;\n\n# ********************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Hamilton Court FX LLP%'; # 249, 187, 10103\nSELECT * FROM activities WHERE uuid_to_bin('4659c2bb-9a49-484e-9327-a3d66f1e028c') = uuid; # 28951064\nSELECT * FROM crm_fields WHERE crm_configuration_id = 187 and object_type IN ('tasks', 'event');\n\n# *********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Checkstep%'; # 325, 256, 11753\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 325\nand sa.provider = 'hubspot';\n\nSELECT * FROM activities WHERE uuid_to_bin('7be372e2-1916-4d79-a2f3-ca3db1346db3') = uuid; # 28611085\nSELECT * FROM activities WHERE uuid_to_bin('980f0336-840b-4185-a5a9-30cf8b0749a8') = uuid; # 28719733\nSELECT * FROM activity_summary_logs where activity_id = 28719733;\n\n# *************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Learning%'; # 260, 356, 9444\nSELECT * FROM activity_summary_logs where sent_at BETWEEN '2025-06-09 11:38:00' AND '2025-06-09 11:40:00';\nSELECT * FROM leads WHERE crm_configuration_id = 356 and crm_provider_id = '230045001502770504'; # 823630\nselect * from activities where crm_configuration_id = 356 and lead_id = 841732;\n\nSELECT * from activity_summary_logs al join activities a on a.id = al.activity_id\nwhere a.crm_configuration_id = 356;\n\nselect * from activities where crm_configuration_id = 356\nand actual_end_time between '2025-06-09 11:00:00' and '2025-06-09 12:00:00'\norder by id desc;\n\nselect * from accounts where crm_configuration_id = 356 and crm_provider_id = '230045001514403366' order by id desc;\nselect * from leads where crm_configuration_id = 356 and crm_provider_id = '230045001514275654' order by id desc;\nselect * from contacts where crm_configuration_id = 356 and crm_provider_id = '230045001514403366' order by id desc;\nselect * from opportunities where crm_configuration_id = 356 and crm_provider_id = '230045001514403366' order by id desc;\n\nselect * from team_features where team_id = 260;\nselect * from features where id IN (1,2,4,6,18,19,20,9,10,3,23,24,25,26,27);\n\nSELECT * FROM activities WHERE uuid_to_bin('7be372e2-1916-4d79-a2f3-ca3db1346db3') = uuid;\n\nselect * from crm_fields;\nselect * from crm_layout_entities;\n\nSELECT * FROM teams WHERE name LIKE '%Optable%';\n\n# *************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Teamtailor%'; # 109, 218, 13969\nSELECT * FROM crm_configurations WHERE id = 218;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 109\nand sa.provider = 'salesforce';\nSELECT * FROM activities WHERE uuid_to_bin('675eeaeb-5681-42db-90bc-54c07a604408') = uuid; # 28655939\nSELECT * FROM crm_field_data WHERE activity_id = 28655939;\nSELECT * FROM crm_fields WHERE id in (94491,94493,94498);\n\nselect * from teams where crm_id IS NULL;\n\nSELECT * FROM activities WHERE uuid_to_bin('71aa8a0c-9652-4ff6-bee7-d98ae60abef6') = uuid;\n\n# *************************************************************************************************\nselect * from team_domains where team_id = 399;\nSELECT * FROM teams WHERE name LIKE '%Rydoo%'; # 399, 318, 13207\n\nselect * from calendar_events where id = 5163781;\nSELECT * FROM activities WHERE uuid_to_bin('be2cbc52-7fda-46a0-9ae0-25d9553eafc0') = uuid; # 29443896\nSELECT * FROM participants WHERE activity_id = 29443896;\nselect * from contacts where crm_configuration_id = 318 and email = 'marianne.westeng@strawberry.no';\nselect * from leads where crm_configuration_id = 318 and email = 'marianne.westeng@strawberry.no';\n\nselect * from activities where user_id = 14937 order by created_at ;\n\nselect * from users where id = 14937;\n\nselect * from contacts where crm_configuration_id = 318 and email LIKE '%@strawberry.se';\nselect * from opportunities where crm_configuration_id = 318 and crm_provider_id = '006Sf00000D1WOAIA3';\n\nselect * from activities a join participants p on a.id = p.activity_id\nwhere crm_configuration_id = 318 and a.updated_at > '2025-06-23T08:18:43Z';\n\n# *************************************************************************************************\nSELECT * FROM opportunities WHERE team_id = 379 and crm_provider_id = '39334518886';\nSELECT * FROM opportunities WHERE team_id = 379 order by id desc;\nSELECT * FROM teams WHERE id = 379;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 379 and sociable_id = 13852\nand sa.provider = 'hubspot';\n\nSELECT * FROM crm_configurations WHERE id = 307;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 307;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 1027;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 307\n and id IN (144750,144855,145158,155227);\n\nSELECT * FROM activities;\n\n\nselect * from activities\nwhere created_at > '2025-07-01 00:00:00'\n# and created_at < '2025-08-01 00:00:00'\nand type not in ('email-outbound', 'email-inbound')\nand account_id is null\nand contact_id is null\nand lead_id is null\nand opportunity_id is not null\n;\nSELECT * FROM activities WHERE id IN (25344155, 25344296, 25501909, 28692187);\nSELECT * FROM crm_configurations WHERE id in (335,301,200);\n\nselect * from crm_fields where crm_configuration_id = 230 and crm_provider_id = 'Age2__c';\n\nSELECT * FROM teams WHERE name LIKE '%Resights%';\nselect * from crm_fields where crm_configuration_id = 1 and object_type = 'opportunity';\n\nselect * from crm_configurations where provider = 'bullhorn'; # 344\nselect * from teams where id IN (442);\n\nselect * from activities\nwhere crm_configuration_id = 177\nand provider = 'amazon-connect'\n order by id desc;\n# and source <> 'gong';\n\nselect * from activity_providers where provider = 'amazon-connect';\n\nSELECT * FROM activities WHERE uuid_to_bin('cec1993b-a7e5-4164-b74d-d680ea51d2f2') = uuid;\n\n\nselect * from crm_configurations where store_transcript = 1;\nSELECT * FROM teams WHERE id IN (80);\n\n# *************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Sedna%'; # 277, 213, 12594\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 277\nand sa.provider = 'salesforce';\n\nselect * from activities where crm_configuration_id = 213 and account_id = 2511502;\n\nselect * from crm_configurations where id = 213;\n\nSELECT * FROM activities WHERE uuid_to_bin('35aa790a-8569-4544-8268-66f9a4a26804') = uuid; # 33981604\nSELECT * FROM participants WHERE activity_id = 33981604;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 337 and object_type = 'task';\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 431\nand sa.provider = 'salesforce';\nSELECT * FROM activities WHERE uuid_to_bin('b5476c7d-19a8-491b-869d-676ea1e857b6') = uuid; # 33997223\nselect * from activity_summary_logs where activity_id = 33997223;\nselect * from activity_notes where activity_id = 33997223;\n\n# ***********************************\nSELECT * FROM teams WHERE name LIKE '%Abode%';\n\n\nselect * from features;\nselect * from teams t\nwhere t.status = 'active'\nand id NOT IN (select team_id from team_features where feature_id = 9)\n;\n\n\nselect * from playbook_layouts where playbook_id = 1725;\nSELECT * FROM activities WHERE uuid_to_bin('65cc283c-4849-49e6-927f-4c281c8fea19') = uuid; # 34297473\nselect * from teams where id = 318;\nselect * from crm_configurations where team_id = 318;\nselect * from playbooks where team_id = 318;\nSELECT * FROM crm_layouts where crm_configuration_id = 381;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 1259;\nSELECT * FROM crm_fields WHERE id IN (192938,192936,192939);\n\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 1266;\nSELECT * FROM crm_fields WHERE id IN (192980,192991,192997,192998,193064,193067);\n\nSELECT * FROM activities WHERE uuid_to_bin('a902289b-285c-48eb-9cc2-6ad6c5d938f5') = uuid; # 34297533\n\n\n\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 927;\nSELECT * FROM crm_fields WHERE id IN (131668,131669,131670,131671,131676,131797);\n\nSELECT * FROM teams WHERE name LIKE '%Peripass%'; # 351, 281, 12124\nselect * from crm_layouts where crm_configuration_id = 281;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 927;\nselect * from crm_fields where crm_configuration_id = 281 and id in (131668,131669,131670,131671,131676,131797);\nselect * from opportunities where crm_configuration_id = 281;\n\nSELECT * FROM activities WHERE id IN (34211315, 34130075);\nSELECT * FROM crm_field_data WHERE object_id IN (34211315, 34130075);\n\nselect cf.crm_configuration_id, cle.crm_layout_id, cle.id, cf.id from crm_field_data cfd\njoin crm_layout_entities cle on cle.id = cfd.crm_layout_entity_id\njoin crm_fields cf on cle.crm_field_id = cf.id\nwhere cf.deleted_at IS NOT NULL\nGROUP BY cle.id, cf.id;\n\nselect * from crm_layouts where id IN (355);\nselect u.email, t.crm_id, t.* from teams t\njoin users u on u.id = t.owner_id\nwhere crm_id IN (97);\n\nSELECT * FROM crm_fields WHERE id = 96492;\n\nselect * from permissions;\nselect * from permission_role where permission_id = 247;\nselect * from roles;\n\nselect * from migrations;\n# *****************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('291e3c21-11cc-4728-aee7-6e4bedf86d72') = uuid; # 34262174\nSELECT * FROM crm_configurations WHERE id = 301;\nSELECT * FROM teams WHERE id = 343;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 343\nand sa.provider = 'hubspot';\n\nselect * from participants where activity_id = 34262174;\n\nselect * from contacts where crm_configuration_id = 301 and id = 6976326;\nselect * from accounts where crm_configuration_id = 301 and id IN (4647626, 4815829); # 30761335403\n\nselect * from activity_summary_logs where activity_id = 34262174;\n\nselect * from users where status = 1 AND timezone = 'EST';\n\n# ****************************************************************************\nSELECT * FROM users WHERE id = 13869;\nSELECT * FROM crm_configurations WHERE id = 320;\nSELECT * FROM teams WHERE id = 401;\n\nSELECT * FROM activities WHERE uuid_to_bin('2228c16f-10be-48d5-90d4-67385219dc01') = uuid; # 29670601\n\nSELECT * FROM accounts WHERE id = 7761483;\nSELECT * FROM opportunities WHERE id = 6051814;\n\nSELECT * FROM teams WHERE name LIKE '%Seedlegals%';\n\n;select * from opportunities where updated_at > '2025-10-11' AND crm_provider_id = '34713761166';\n\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 177;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 577;\nSELECT * FROM crm_fields WHERE id IN (68458,68459,68480,68497,68524,68530,68554,68618,68662,68781,68810,68898,68981,69049,97467);\n\nSELECT t.id, crm.id, t.name, crm.sync_objects, crm.provider, crm.last_synced_at FROM crm_configurations crm join teams t on t.crm_id = crm.id\nwhere t.status = 'active' AND crm.provider = 'hubspot' AND crm.last_synced_at < '2025-10-22 00:00:00';\n\nSELECT * FROM activities WHERE uuid_to_bin('fa09449f-cba9-496a-b8f3-865cd3c72351') = uuid;\nSELECT * FROM crm_configurations where id = 184;\nSELECT * FROM teams WHERE id = 246;\nSELECT * FROM social_accounts WHERE sociable_id = 9259 and provider = 'hubspot';\n\nSELECT * FROM users WHERE email LIKE '%rhian.old@bud.co.uk%'; # 17700\nSELECT * FROM teams WHERE id = 551;\n\nSELECT * FROM crm_configurations WHERE id = 471;\nSELECT * FROM activities WHERE crm_configuration_id = 471 and crm_provider_id IS NOT NULL;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 471;\nSELECT * FROM crm_fields WHERE id = 307260;\nSELECT * FROM crm_field_values WHERE crm_field_id = 307260;\n\nselect * from crm_layouts where crm_configuration_id = 471;\n\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 1547;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 1548;\n\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 551 and sa.provider = 'hubspot';\n\nSELECT * FROM teams WHERE name LIKE '%$PCS%';\n\n# ********************************************************************************************************\nselect * from crm_configurations crm\njoin teams t on t.crm_id = crm.id\nwhere t.status = 'active'\nand crm.provider = 'hubspot';\n\n# $slug = 'HUBSPOT_WEBHOOK_SYNC';\n# $team = Jiminny\\Models\\Team::find(2);\n# $feature = Feature::query()->where('slug', $slug)->first();\n# TeamFeature::query()->create(['feature_id' => $feature->getId(),'team_id' => $team->getId()]);\n\n# hubspot_webhook_metrics\n\nselect * from crm_configurations where id = 331; # 416\nSELECT * FROM teams WHERE id = 416;\nSELECT * FROM opportunities WHERE team_id = 190;\n\nSELECT * FROM teams WHERE name LIKE '%Lead Forensics%';\nSELECT sa.id,\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 190 and sa.provider = 'hubspot';\n\n\n\nSELECT * FROM teams WHERE name LIKE '%Rapaport%'; # 431, 337\nSELECT * FROM teams where id = 431;\nSELECT * FROM crm_configurations where team_id = 431;\nSELECT * FROM activity_providers where team_id = 431;\nSELECT * FROM activities where crm_configuration_id = 337 and type IN ('softphone', 'softphone-outbound')\nand provider NOT IN ('hubspot', 'aircall')\n# and telephony_provider_id = '019c1131-a22f-4792-b9ea-20adf6a02ed0'\norder by id desc;\nSELECT sa.id,\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 431 and sa.provider = 'salesforce';\n\nSELECT * FROM teams WHERE name LIKE '%BiP%'; # 401, 320\nSELECT * FROM teams where id = 401;\nSELECT * FROM crm_configurations where team_id = 401;\nSELECT * FROM activity_providers where team_id = 401;\nSELECT * FROM activities where crm_configuration_id = 320 and type IN ('softphone', 'softphone-outbound')\nand provider NOT IN ('hubspot', 'aircall')\n# and telephony_provider_id = '019c1131-a22f-4792-b9ea-20adf6a02ed0'\norder by id desc;\nSELECT sa.id,\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 401 and sa.provider = 'salesforce';\n\n\n# ********************************************************************\nSELECT * FROM crm_configurations where id = 307; # 379 - Story Terrace Inc , portalId: 3921157\nSELECT * FROM contacts WHERE team_id = 379 and updated_at > '2026-01-31 11:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 379 and updated_at > '2026-02-01 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 379 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 379 and sa.provider = 'hubspot';\n\n# ********************************************************************\nSELECT * FROM crm_configurations where id = 485; # 563 - LATUS Group (ad94d501-5d09-44fd-878f-ca3a9f8865c3) , portalId: 3904501\nSELECT * FROM opportunities WHERE team_id = 563 and updated_at > '2026-02-02 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 563 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 338; # 432 - Formalize , portalId: 9214205\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 432 and sa.provider = 'hubspot';\nSELECT * FROM opportunities WHERE team_id = 432 and updated_at > '2026-02-02 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 432 and updated_at > '2026-02-10 00:00:00' order by updated_at desc;\n\n# ********************************************************************\nSELECT * FROM crm_configurations where id = 436; # 519 - Moxso , portalId: 25531989\nSELECT * FROM opportunities WHERE team_id = 519 and updated_at > '2026-02-02 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 519 and updated_at > '2026-02-04 11:00:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 96; # 119 - Nourish Care , portalId: 26617984\nSELECT * FROM opportunities WHERE team_id = 119 and updated_at > '2026-02-02 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 119 and updated_at > '2026-02-04 11:00:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 331; # 416 - The National College , portalId: 7213852\nSELECT * FROM opportunities WHERE team_id = 416 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 416 and updated_at > '2026-02-04 11:00:00' order by updated_at desc;\n\n# ********************************************************************\nSELECT * FROM crm_configurations where id = 308; # 380 - Foodles , portalId: 7723616\nSELECT * FROM opportunities WHERE team_id = 380 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 380 and updated_at > '2026-02-06 10:30:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 379; # 471 - imat-uve , portalId: 9177354\nSELECT * FROM opportunities WHERE team_id = 471 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 471 and updated_at > '2026-02-06 10:30:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 465; # 545 - Spotler , portalId: 144759271\nSELECT * FROM opportunities WHERE team_id = 545 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 545 and updated_at > '2026-02-06 10:30:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 455; # 537 - indevis , portalId: 25666868\nSELECT * FROM opportunities WHERE team_id = 537 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 537 and updated_at > '2026-02-06 10:30:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 200; # 265 - Jobadder , portalId: 6426676\nSELECT * FROM opportunities WHERE team_id = 265 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 265 and updated_at > '2026-02-06 10:30:00' order by updated_at desc;\n# ********************************************************************\nSELECT * FROM crm_configurations where id = 335; # 429 - Eletive , portalId: 6110563\nSELECT * FROM opportunities WHERE team_id = 429 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 429 and updated_at > '2026-02-09 10:30:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 363; # 456 - Global Group , portalId: 8901981\nSELECT * FROM opportunities WHERE team_id = 456 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 456 and updated_at > '2026-02-09 10:30:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 297; # 369 - Unbiased , portalId: 9229005\nSELECT * FROM opportunities WHERE team_id = 369 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 369 and updated_at > '2026-02-09 10:30:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 353; # 449 - Fuuse , portalId: 25781745\nSELECT * FROM opportunities WHERE team_id = 449 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 449 and updated_at > '2026-02-09 10:30:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 487; # 566 - Nimbus , portalId: 39982590\nSELECT * FROM opportunities WHERE team_id = 566 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 566 and updated_at > '2026-02-09 10:30:00' order by updated_at desc;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 487;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 1630;\nselect * from crm_fields where crm_configuration_id = 487 and\n(uuid_to_bin('4c6b2971-64d4-45b8-b377-427be758b5a5') = uuid or uuid_to_bin('59e368d8-65a0-4b77-b611-db37c99fbe68') = uuid);\nSELECT * FROM crm_field_values WHERE crm_field_id = 375177;\n# ********************************************************************\nSELECT * FROM crm_configurations where id = 420; # 506 - voiio , portalId: 145629154\nSELECT * FROM opportunities WHERE team_id = 506 and updated_at > '2026-02-10 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 506 and updated_at > '2026-02-10 15:00:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 479; # 558 - Momice , portalId: 535962\nSELECT * FROM opportunities WHERE team_id = 558 and updated_at > '2026-02-10 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 558 and updated_at > '2026-02-10 15:00:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 59; # 80 - Storyclash GmbH , portalId: 4268479\nSELECT * FROM opportunities WHERE team_id = 80 and updated_at > '2026-02-10 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 80 and updated_at > '2026-02-10 15:00:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 175; # 203 - Team iAM , portalId: 5534732\nSELECT * FROM opportunities WHERE team_id = 203 and updated_at > '2026-02-10 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 203 and updated_at > '2026-02-10 15:00:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 368; # 460 - OneTouch Health , portalId: 5534732183355\nSELECT * FROM opportunities WHERE team_id = 460 and updated_at > '2026-02-10 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 460 and updated_at > '2026-02-10 15:00:00' order by updated_at desc;\n\n\n\nselect * from users where id = 29643;\nSELECT * FROM crm_field_values WHERE crm_field_id = 375177;\n# ********************************************************************\nSELECT * FROM teams WHERE name LIKE '%Buynomics%'; # 462, 482, 14910\nSELECT * FROM activities WHERE crm_configuration_id = 482\nand type NOT IN ('email-inbound', 'email-outbound')\n# and description like '%The call focused on understanding Welch%'\norder by id desc;\n\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 462 and sa.provider = 'salesforce';\n\nselect * from contacts where crm_configuration_id = 482 and name = 'Cyndall Hill'; # 15504749\nselect * from contacts where id = 10891096; # 482\nSELECT * FROM activities WHERE crm_configuration_id = 482\nand type NOT IN ('email-inbound', 'email-outbound')\nand contact_id = 15504749\norder by id desc;\n\nselect * from activities where id = 36793003; # 96cc7bc1-8622-4d27-92f4-baf664fc1a56, 00UOf00000PDdOXMA1\nselect * from transcription where id = 7646782;\nselect * from ai_prompts where transcription_id = 7646782;\n\n# ********************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('7a8471a3-847e-4822-802b-ddf426bbc252') = uuid; # 37370018\nSELECT * FROM activity_summary_logs WHERE activity_id = 37370018;\nSELECT * FROM teams WHERE id = 555;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 555 and sa.provider = 'hubspot';\n\n# ********************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('7c17b8aa-09df-4f85-a0f7-51f47afd712d') = uuid; # 37395250\nSELECT * FROM activities WHERE uuid_to_bin('14d60388-260d-494b-aa0d-63fdb1c78026') = uuid; # 37395250\n\nSELECT a.* FROM activities a JOIN crm_configurations c on c.id = a.crm_configuration_id\nwhere a.type IN ('softphone', 'softphone-outbound') and c.provider = 'hubspot'\nand a.provider NOT IN ('hubspot')\n# and a.provider IN ('salesloft')\n# and c.id NOT IN (70)\n# and a.duration > 30\n# and actual_start_time > '2026-02-05 00:00:00'\norder by a.id desc;\n\nSELECT * FROM activities WHERE id = 37549787;\nSELECT * FROM crm_profiles WHERE user_id = 17613;\n\nSELECT * FROM crm_configurations WHERE id = 70;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 93 and sa.provider = 'hubspot';\n\nSELECT asf.activity_search_id, asf.id, asf.value\nFROM activity_search_filters asf\nWHERE asf.filter = 'group_id'\nAND asf.value IN (\n SELECT CONCAT(\n HEX(SUBSTR(uuid, 5, 4)), '-',\n HEX(SUBSTR(uuid, 3, 2)), '-',\n HEX(SUBSTR(uuid, 1, 2)), '-',\n HEX(SUBSTR(uuid, 9, 2)), '-',\n HEX(SUBSTR(uuid, 11))\n )\n FROM groups\n WHERE deleted_at IS NOT NULL\n);\n\nSELECT * FROM crm_configurations WHERE id = 373; # KPSBremen.de 465 # - no social account\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 465 and sa.provider = 'hubspot';\n\nselect * from crm_configurations where id = 494;\n\nSELECT * FROM teams WHERE name LIKE '%splose%'; # 572, 495, 18708\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 572 and sa.provider = 'pipedrive';\n\nselect * from opportunities where team_id = 572\n# and name like '%Onebright%'\n# and is_closed = 1 and is_won = 0\n order by id desc;\n\n\nselect * from users where deleted_at is null and status = 2;\n\nselect * from contacts where id = 17900517;\nselect * from accounts where id = 10109838;\nselect * from opportunities where id = 6955880;\n\nselect * from opportunity_contacts where opportunity_id = 6955880;\nselect * from opportunity_contacts where contact_id = 17900517;\n\nselect * from contact_roles cr join crm_configurations crm on cr.crm_configuration_id = crm.id\nwhere crm.provider != 'salesforce';\n\nSELECT * FROM activities WHERE uuid_to_bin('adcb8331-5988-4353-834e-383a355abba2') = uuid; # 38056424, crm 104659682404\nselect * from teams where id = 456;\nSELECT * FROM crm_configurations WHERE id = 363;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 456 and sa.provider = 'hubspot';\n\nselect * from crm_layouts where crm_configuration_id = 363;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id IN (1203, 1204, 1635);\nSELECT * FROM crm_fields WHERE id IN (181536, 181538, 213455);\n\nSELECT * FROM teams WHERE name LIKE '%Electric%'; # 342, 272, 12767\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 342 and sa.provider = 'pipedrive';\nSELECT * FROM opportunities WHERE crm_configuration_id = 272 and name like 'NORTHUMBRIA POL%'; # and updated_at > '2025-07-01 00:00:00';\nSELECT * FROM opportunities WHERE crm_configuration_id = 272 order by remotely_created_at asc; # and updated_at > '2025-07-01 00:00:00';\nSELECT * FROM opportunities WHERE crm_configuration_id = 272 and updated_at > '2026-01-01 00:00:00';\nSELECT * FROM crm_fields WHERE crm_configuration_id = 272 and object_type = 'opportunity';\nSELECT * FROM crm_field_values WHERE crm_field_id = 127164;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 342 and sa.provider = 'pipedrive';\n\nSELECT * FROM teams WHERE id = 472;\nSELECT * FROM crm_configurations WHERE id = 380;\nselect * from activities where id = 38285673; # 38285673\nSELECT * FROM users WHERE id = 16942;\nSELECT * FROM groups WHERE id = 1964;\nSELECT * FROM playbooks WHERE id = 2033;\n\nselect * from teams where created_at > '2026-03-09';\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 499; # 1065\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 1678;\n\nSELECT * FROM teams WHERE id = 575;\nselect * from opportunities where team_id = 575;\n\nSELECT * FROM activities WHERE uuid_to_bin('96b1261f-2357-49f9-ab38-23ce12008ea0') = uuid;\n\nselect * from contacts c\nwhere c.crm_configuration_id = 370 order by c.updated_at desc;\n\nSELECT * FROM participants where activity_id = 38833541;\nSELECT * FROM participants where activity_id = 39216301;\nSELECT * FROM activity_summary_logs where activity_id = 39216301;\nSELECT * FROM activities WHERE uuid_to_bin('c7d99fbe-1fb1-41f2-8f4d-52e2bf70e1e9') = uuid; # 38833541, crm 478116564181\nSELECT * FROM activities WHERE uuid_to_bin('2e6ff4d3-9faa-447a-a8c1-9acde4d885ae') = uuid; # 39216301, crm 480171536586\nselect * from crm_profiles where crm_configuration_id = 319 and crm_provider_id = 525785080;\nselect * from opportunities where crm_configuration_id = 319 and crm_provider_id = 410150124747;\nselect * from accounts where crm_configuration_id = 319 and crm_provider_id = 47150650569;\nselect * from contacts where crm_configuration_id = 319 and crm_provider_id IN ('665587441856', '742723347700');\n# owner 13236 525785080\n# contact 1 16779180 665587441856 - activity - Alex Howes alex@supportroom.com created 2026-01-26\n# contact 2 19247563 742723347700 - ash@supportroom.com 2026-03-24\n# company 4176133 47150650569\n# deal 7100953 410150124747\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 400 and sa.provider = 'hubspot';\n\nselect * from features;\nselect * from team_features where feature_id = 40;\n\nselect * from teams where id = 556; # owner: 18101, crm: 477\nselect * from crm_configurations where id = 477;\nSELECT * FROM users WHERE id = 18101;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 556 and sa.provider = 'integration-app';\n\nselect * from opportunities where id = 7594349;\nselect * from opportunity_stages where opportunity_id = 7594349 order by created_at desc;\nselect * from business_processes where id = 6024;\nselect * from business_process_stages where stage_id = 16352;\nselect * from business_process_stages where business_process_id = 6024;\nselect * from stages where team_id = 459;\nselect * from teams where id = 459;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 459 and sa.provider = 'hubspot';\n\nSELECT os.stage_id, s.crm_provider_id, s.name, COUNT(*) as cnt\nFROM opportunity_stages os\nJOIN stages s ON s.id = os.stage_id\nWHERE os.opportunity_id = 7594349\nGROUP BY os.stage_id, s.crm_provider_id, s.name\nORDER BY cnt DESC;\n\nSELECT s.id, s.crm_provider_id, s.name, s.team_id, s.crm_configuration_id\nFROM stages s\nJOIN business_process_stages bps ON bps.stage_id = s.id\nWHERE bps.business_process_id = 6024\nAND s.crm_provider_id = 'contractsent';\n\nselect * from stages where id IN (16352,20612,18281,7344,16378,16309,5036,15223,14535,6293,12098,11607)\n\nSELECT * FROM teams WHERE name LIKE '%Pulsar Group%'; # 472, 380, 15138, raza.gilani@vuelio.com\nselect * from playbooks where team_id = 472; # event 226147\nSELECT * FROM playbook_categories WHERE playbook_id = 2288;\nSELECT * FROM crm_fields WHERE id = 226147;\nSELECT * FROM crm_field_values WHERE crm_field_id = 226147;\n\nSELECT * FROM crm_configurations WHERE id = 380;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 472 and sa.provider = 'salesforce';","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-7558096554454067353
|
2146738311620114029
|
click
|
accessibility
|
NULL
|
Tests passed: 7
text/html
text/html
text/html
Proj Tests passed: 7
text/html
text/html
text/html
Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
TrackAutomatedReportGeneratedEventTest
Run 'TrackAutomatedReportGeneratedEventTest'
Debug 'TrackAutomatedReportGeneratedEventTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
1
2
1
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Listeners\AutomatedReports\UserPilot;
use GuzzleHttp\Exception\GuzzleException;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Jiminny\Component\Queue\Constants;
use Jiminny\Events\AutomatedReports\AutomatedReportGenerated;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\Contracts\UserContract;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Jiminny\Services\UserPilot\UserPilotClient;
class TrackAutomatedReportGeneratedEvent implements ShouldQueue
{
use InteractsWithQueue;
private const string EVENT_NAME_AUTOMATED_REPORT = 'automated-report-generated';
private const string EVENT_NAME_ASK_JIMINNY_REPORT = 'ask-jiminny-report-generated';
public string $queue = Constants::QUEUE_DELAYABLE;
public function __construct(
private readonly UserPilotClient $userPilotClient,
private readonly AutomatedReportsService $automatedReportsService,
) {
}
public function handle(AutomatedReportGenerated $event): void
{
if (config('services.userpilot.token') === null) {
return;
}
$automatedReport = $event->automatedReport;
$payload = $this->buildPayload($automatedReport);
$eventName = $this->resolveEventName($automatedReport);
try {
foreach ($this->resolveUsers($automatedReport) as $user) {
$this->userPilotClient->track($user, $eventName, $payload);
}
} catch (GuzzleException $e) {
$this->release(3600);
}
}
/**
* @return array<UserContract>
*/
private function resolveUsers(AutomatedReport $automatedReport): array
{
if ($automatedReport->isAskJiminnyReport()) {
$creator = $automatedReport->getCreator();
return $creator !== null ? [$creator] : [];
}
return $this->automatedReportsService->getRecipientUserObjects($automatedReport);
}
private function buildPayload(AutomatedReport $automatedReport): array
{
return [
'report_type' => $automatedReport->getType(),
'frequency' => $automatedReport->getFrequency(),
];
}
private function resolveEventName(AutomatedReport $automatedReport): string
{
if ($automatedReport->isAskJiminnyReport()) {
return self::EVENT_NAME_ASK_JIMINNY_REPORT;
}
return self::EVENT_NAME_AUTOMATED_REPORT;
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
27
9
23
3
105
Previous Highlighted Error
Next Highlighted Error
SELECT * FROM team_features where team_id = 1;
SELECT * FROM teams WHERE name LIKE '%Vixio%'; # 340,270,11922
SELECT * FROM users WHERE team_id = 340; # 12015
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 340
and sa.provider = 'salesforce';
# and sa.provider = 'salesloft';
select * from crm_fields where crm_configuration_id = 270 and object_type = 'event';
# 125558 - Event Type - Event_Type__c
# 125552 - Event Status - Event_Status__c
SELECT * FROM sidekick_settings WHERE team_id = 340;
SELECT * FROM crm_field_values WHERE crm_field_id in (125552);
select * from activities where crm_configuration_id = 270
and type = 'conference' and crm_provider_id IS NOT NULL
and actual_start_time > '2024-09-16 09:00:00' order by scheduled_start_time;
SELECT * FROM activities WHERE id = 20871677;
SELECT * FROM crm_field_data WHERE activity_id = 20871677;
select * from crm_layouts where crm_configuration_id = 270;
select * from crm_layout_entities where crm_layout_id in (886,887);
SELECT * FROM crm_configurations WHERE id = 270;
select * from playbooks where team_id = 340; # 1514
select * from groups where team_id = 340;
SELECT * FROM crm_fields WHERE id IN (125393, 125401);
select g.name as 'team name', p.name as 'playbook name', f.label as 'activity type field' from groups g
join playbooks p on g.playbook_id = p.id
join crm_fields f on p.activity_field_id = f.id
where g.team_id = 340;
SELECT * FROM activities WHERE uuid_to_bin('0c180357-67d2-419e-a8c3-b832a3490770') = uuid; # 20448716
select * from crm_field_data where object_id = 20448716;
select * from activities where crm_configuration_id = 270 and provider = 'salesloft' order by id desc;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%CybSafe%'; # 343,273,12008
select * from opportunities where team_id = 343;
select * from opportunities where team_id = 343 and crm_provider_id = '18099102526';
select * from opportunities where team_id = 343 and account_id = 945217482;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 343
and sa.provider = 'hubspot';
select * from accounts where team_id = 343 order by name asc;
select * from stages where crm_configuration_id = 273 and type = 'opportunity';
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Voyado%'; # 353,283,12143
SELECT * FROM activities WHERE crm_configuration_id = 283 and account_id = 3777844 order by id desc;
SELECT * FROM accounts WHERE team_id = 353 AND name LIKE '%Salesloft%';
SELECT * FROM activities WHERE id = 20717903;
select * from participants where activity_id IN (20929172,20928605,20928468,20926272,20926271,20926270,20926269,20916499,20916454,20916436,20916435,20900015,20900014,20900013,20897312,20897243,20897241,20897237,20897232,20897229,20893648,20893231,20893230,20893229,20893228,20889784,20885039,20885038,20885037,20885036,20885035,20882728,20882708,20882703,20882702,20869828,20869811,20869806,20869801,20869799,20869798,20869796,20869795,20869794,20869761,20869760,20869759,20868688,20868687,20850340,20847195,20841710,20833967,20827021,20825307,20825305,20825297,20824615,20824400,20823927,20821760,20795588,20794233,20794057,20793710,20785811,20781789,20781394,20781307,20762651,20758453,20758282,20757323,20756643,20756636,20756629,20756627,20756606,20756605,20756604,20756603,20756602,20756600,20756599,20756598,20756595,20756594,20756589,20756587,20756577,20756573,20748918,20748386,20748385,20748384,20748383,20748382,20748381,20748380,20748379,20748377,20748375,20748373,20743301,20717905,20717904,20717903,20717901,20717899);
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 353
and sa.provider = 'salesforce';
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%modern world business solutions%'; # 345,275,12016, [EMAIL]
SELECT * FROM activities WHERE uuid_to_bin('3921d399-3fef-4609-a291-b0097a166d43') = uuid;
# id: 20940638, user: 12022, contact: 5305871
SELECT * FROM activity_summary_logs WHERE activity_id = 20940638;
select * from contacts where team_id = 345 and crm_provider_id = '30891432415' order by name asc; # 5305871
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 345
and sa.provider = 'hubspot';
select * from users where team_id = 345 and id = 12022;
SELECT * FROM crm_profiles WHERE user_id = 12022;
SELECT * FROM participants WHERE activity_id = 20940638;
SELECT * FROM users u
JOIN crm_profiles cp ON u.id = cp.user_id
WHERE u.team_id = 345;
select * from contacts where team_id = 345 and crm_provider_id = '30880813535' order by name desc; # 5305871
select * from team_features where team_id = 345;
SELECT * FROM activities WHERE uuid_to_bin('11701e2d-2f82-4dab-a616-1db4fad238df') = uuid; # 21115197
SELECT * FROM participants WHERE activity_id = 20897406;
SELECT * FROM activities WHERE uuid_to_bin('63ba55cd-1abc-447d-83da-0137000005b7') = uuid; # 20953912
SELECT * FROM activities WHERE crm_configuration_id = 275 and provider = 'ringcentral' and title like '%1252629100%';
SELECT * FROM activities WHERE id = 20946641;
SELECT * FROM crm_profiles WHERE user_id = 10211;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Lunio%'; # 120,97,10984, [EMAIL]
SELECT * FROM opportunities WHERE crm_configuration_id = 97 and crm_provider_id = '006N1000006c5PpIAI';
select * from stages where crm_configuration_id = 97 and type = 'opportunity';
select * from opportunities where team_id = 120;
select * from crm_configurations crm join teams t on crm.id = t.crm_id
where 1=1
AND t.current_billing_plan IS NOT NULL
AND crm.auto_sync_activity = 0
and crm.provider = 'hubspot';
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Exclaimer%'; # 270,205,10053,[EMAIL]
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 270
and sa.provider = 'salesforce';
SELECT * FROM activities WHERE uuid_to_bin('b54df794-2a9a-4957-8d80-09a600ead5f8') = uuid; # 21637956
SELECT * FROM crm_profiles WHERE user_id = 11446;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Cygnetise%'; # 372,300,12554, [EMAIL]
select * from playbooks where team_id = 372;
select * from crm_fields where crm_configuration_id = 300 and object_type = 'event'; # 141340
SELECT * FROM crm_field_values WHERE crm_field_id = 141340;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 372
and sa.provider = 'salesforce';
select * from crm_profiles where crm_configuration_id = 300;
SELECT * FROM crm_configurations WHERE team_id = 372;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Planday%'; # 291,242,11501,[EMAIL]
SELECT * FROM opportunities WHERE team_id = 291 and crm_provider_id = '006bG000005DO86QAG'; # 3207756
select * from crm_field_data where object_id = 3207756;
SELECT * FROM crm_fields WHERE id = 111834;
select f.id, f.crm_provider_id AS field_name, f.label, fd.object_id AS dealId, fd.value
FROM crm_fields f
JOIN crm_field_data fd ON f.id = fd.crm_field_id
WHERE f.crm_configuration_id = 242
AND f.object_type = 'opportunity'
AND fd.object_id IN (3207756)
ORDER BY fd.object_id, fd.updated_at;
SELECT * FROM crm_configurations WHERE auto_connect = 1;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Tour%'; # 187,209,8150,[EMAIL]
select * from group_deal_risk_types drgt join groups g on drgt.group_id = g.id
where g.team_id = 187;
select * from `groups` where team_id = 187;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 187
and sa.provider = 'salesforce';
# Destination - 98870 - Destination__c
# Stage - 79014 - StageName
# Land Arrangement - 98856 - Land_Arrangement__c
# Flight - 98848 - Flight__c
# Last activity date - 98812 - LastActivityDate
# Last modified date - 98809 - LastModifiedDate
# Last inbound mail timestamp - 99151 - Last_Inbound_Mail_Timestamp__c
# next call - 98864 - Next_Call__c
select * from crm_fields where crm_configuration_id = 209 and object_type = 'opportunity';
SELECT * FROM crm_layouts WHERE crm_configuration_id = 209;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 682;
select * from opportunities where team_id = 187 and name LIKE'%Muriel Sal%';
select * from opportunities where team_id = 187 and user_id = 9951 and is_closed = 0;
select * from activities where opportunity_id = 3538248;
SELECT * FROM crm_profiles WHERE user_id = 8150;
select * from deal_risks where opportunity_id = 3538248;
select * from teams where crm_id IS NULL;
SELECT opp.id AS opportunity_id,
u.group_id AS group_id,
MAX(
CASE
WHEN a.type IN ("sms-inbound", "sms-outbound") THEN a.created_at
ELSE a.actual_end_time
END) as last_date
FROM opportunities opp
left join activities a on a.opportunity_id = opp.id
inner join users u on opp.user_id = u.id
where opp.user_id IN (9951)
AND opp.is_closed = 0
and a.status IN ('completed', 'received', 'delivered') OR a.status IS NULL
group by opp.id;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Cybsafe%'; # 343,301,12008,[EMAIL]
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 343
and sa.provider = 'hubspot';
SELECT * FROM crm_profiles WHERE crm_configuration_id = 301;
SELECT * FROM contacts WHERE id = 6612363;
SELECT * FROM accounts WHERE id = 4235676;
SELECT * FROM opportunities WHERE crm_configuration_id = 301 and crm_provider_id = 32983784868;
select * from opportunity_stages where opportunity_id = 4503759;
# SELECT * FROM opportunities WHERE id = 4569937;
select * from activities where crm_configuration_id = 301;
SELECT * FROM activities WHERE uuid_to_bin('d3b2b28b-c3d0-4c2d-8ed0-eef42855278a') = uuid; # 26330370
SELECT * FROM participants WHERE activity_id = 26330370;
SELECT * FROM teams WHERE id = 375;
select * from playbooks where team_id = 375;
select * from stages where crm_configuration_id = 301 and type = 'opportunity';
select * from teams;
select * from contact_roles;
SELECT * FROM opportunities WHERE team_id = 343 and user_id = 12871 and close_date >= '2024-11-01';
select * from users u join crm_profiles cp on cp.user_id = u.id where u.team_id = 343;
SELECT * FROM crm_field_data WHERE object_id = 3771706;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 343
and sa.provider = 'hubspot';
SELECT * FROM crm_fields WHERE crm_configuration_id = 301 and object_type = 'opportunity'
and crm_provider_id LIKE "%traffic_light%";
SELECT * FROM crm_field_values WHERE crm_field_id IN (144020,144048,144111,144113,144126,144481,144508,144531);
SELECT fd.* FROM opportunities o
JOIN crm_field_data fd ON o.id = fd.object_id
WHERE o.team_id = 343
# and o.user_id IS NOT NULL
and fd.crm_field_id IN (144020,144048,144111,144113,144126,144481,144508,144531)
and fd.value != ''
order by value desc
# group by o.id
;
SELECT * FROM opportunities WHERE id = 3769843;
SELECT * FROM teams WHERE name LIKE '%Tour%'; # 187,209,8150, [EMAIL]
SELECT * FROM crm_layouts WHERE crm_configuration_id = 209;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 682;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Funding Circle%'; # 220,177,8603,[EMAIL]
SELECT * FROM activities WHERE uuid_to_bin('7a40e99b-3b37-4bb1-b983-325b81801c01') = uuid; # 23139839
SELECT * FROM opportunities WHERE id = 3855992;
SELECT * FROM users WHERE name LIKE '%Angus Pollard%'; # 8988
SELECT * FROM teams WHERE name LIKE '%Story Terrace%'; # 379, 307, 12894
SELECT * FROM crm_fields WHERE crm_configuration_id = 307 and object_type != 'opportunity';
select * from contacts where team_id = 379 and name like '%bebro%'; # 5874411, crm: 77229348507
SELECT * FROM crm_field_data WHERE object_id = 5874411;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 379
and sa.provider = 'hubspot';
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%mentio%'; # 117, 94, 6371, [EMAIL]
SELECT * FROM activities WHERE uuid_to_bin('82939311-1af0-4506-8546-21e8d1fdf2c1') = uuid;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Tourlane%'; # 187, 209, 8150, [EMAIL]
SELECT * FROM opportunities WHERE team_id = 187 and crm_provider_id = '006Se000008xfvNIAQ'; # 3537793
select * from generic_ai_prompts where subject_id = 3537793;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Lunio%'; # 120, 97, 10984, [EMAIL]
SELECT * FROM crm_configurations WHERE id = 97;
SELECT * FROM crm_layouts WHERE crm_configuration_id = 97;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 355;
SELECT * FROM crm_fields WHERE id = 32682;
select cfd.value, o.* from opportunities o
join crm_field_data cfd on o.id = cfd.object_id and cfd.crm_field_id = 32682
where team_id = 120
and cfd.value != ''
;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 120
and sa.provider = 'salesforce';
select * from opportunities where team_id = 120 and crm_provider_id = '006N1000007X8MAIA0';
SELECT * FROM crm_field_data WHERE object_id = 2313439;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE id = 410;
SELECT * FROM teams WHERE name LIKE '%Local Business Oxford%';
select * from scorecards where team_id = 410;
select * from scorecard_rules;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Funding%'; # 220, 177, 8603, [EMAIL]
select * from activities a
join opportunities o on a.opportunity_id = o.id
join users u on o.user_id = u.id
where a.crm_configuration_id = 177 and a.type LIKE '%email-out%'
# and a.actual_end_time > '2024-12-16 00:00:00'
# and o.remotely_created_at > '2024-12-01 00:00:00'
# and u.group_id = 1014
and u.id = 9021
order by a.id desc;
SELECT * FROM opportunities WHERE id in (3981384,4017346);
SELECT * FROM users WHERE team_id = 220 and id IN (8775, 11435);
select * from users where id = 9021;
select * from inboxes where user_id = 9021;
select * from inbox_emails where inbox_id = 1349 and email_date > '2024-12-18 00:00:00';
select * from email_messages where team_id = 220
and orig_date > '2024-12-16 00:00:00' and orig_date < '2024-12-19 00:00:00'
and subject LIKE '%Personal%'
# and 'from' = '[EMAIL]'
;
select * from activities a
join opportunities o on a.opportunity_id = o.id
where a.user_id = 9021 and a.type LIKE '%email-out%'
and a.actual_end_time > '2024-12-18 00:00:00'
and o.user_id IS NOT NULL
and o.remotely_created_at > '2024-12-01 00:00:00'
order by a.id desc;
SELECT * FROM opportunities WHERE team_id = 220 and name LIKE '%Right Car move Limited%' and id = 3966852;
select * from activities where crm_configuration_id = 177 and type LIKE '%email%' and opportunity_id = 3966852 order by id desc;
select * from team_settings where name IN ('useCloseDate');
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Hurree%'; # 104, 81, 6175, [EMAIL]
SELECT * FROM opportunities WHERE team_id = 104 and name = 'PropOp';
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 104
and sa.provider = 'hubspot';
select * from crm_configurations where last_synced_at > '2025-01-19 01:00:00'
select * from teams where crm_id IS NULL;
select t.name as 'team', u.name as 'owner', u.email, u.phone
from teams t
join activity_providers ap on t.id = ap.team_id
join users u on t.owner_id = u.id
where 1=1
and t.status = 'active'
and ap.is_enabled = 1
# and u.status = 1
and ap.provider = 'ms-teams';
select * from crm_configurations where provider = 'bullhorn'; # 344
SELECT * FROM teams WHERE id = 442; # 14293
select * from users where team_id = 442;
select * from social_accounts sa where sa.sociable_id = 14293;
select * from invitations where team_id = 442;
# [PASSWORD_DOTS]
SELECT * FROM users WHERE email LIKE '%[EMAIL]%'; # 14022
SELECT * FROM teams WHERE id = 429;
select * from opportunities where team_id = 429 and crm_provider_id IN (16157415775, 22246219645);
select * from activities where opportunity_id in (4340436,4353519);
select * from transcription where activity_id IN (25630961,25381771);
select * from generic_ai_prompts where subject_id IN (4353519);
SELECT
a.id as activity_id,
a.opportunity_id,
a.type as activity_type,
a.language,
CONCAT(a.title, a.description) AS mail_content,
e.from AS mail_from,
e.to AS mail_to,
e.subject AS mail_subject,
e.body AS mail_body,
p.type as prompt_type,
p.status as prompt_status,
p.content AS prompt_content,
a.actual_start_time as created_at
FROM activities a
LEFT JOIN ai_prompts p ON a.transcription_id = p.transcription_id AND p.deleted_at IS NULL
LEFT JOIN email_messages e ON a.id = e.activity_id
WHERE a.actual_start_time > '2024-01-01 00:00:00'
AND a.opportunity_id IN (4353519)
AND a.status IN ('completed', 'received', 'delivered')
AND a.deleted_at IS NULL
AND a.type NOT IN ('sms-inbound', 'sms-outbound')
ORDER BY a.opportunity_id ASC, a.id ASC;
SELECT * FROM users WHERE name LIKE '%George Fierstone%'; # 14293
SELECT * FROM teams WHERE id = 442;
SELECT * FROM crm_configurations WHERE id = 344;
select * from team_features where team_id = 442;
select * from groups where team_id = 442;
select * from playbooks where team_id = 442;
select * from playbook_categories where playbook_id = 1729;
select * from crm_fields where crm_configuration_id = 344 and id = 172024;
SELECT * FROM crm_field_values WHERE crm_field_id = 172024;
select * from crm_layouts where crm_configuration_id = 344;
select * from playbook_layouts where playbook_id = 1729;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Learning%'; # 260, 221, 9444
select s.*
# , s.sent_at, u.name, a.*
from activity_summary_logs s
inner join activities a on a.id = s.activity_id
inner join users u on u.id = a.user_id
where a.crm_configuration_id = 356
and s.sent_at > date_sub(now(), interval 60 day)
order by a.actual_end_time desc;
select * from activities a
# inner join activity_summary_logs s on s.activity_id = a.id
where a.crm_configuration_id = 356 and a.actual_end_time > date_sub(now(), interval 60 day)
# and a.crm_provider_id is not null
# and provider <> 'ringcentral'
and status = 'completed'
order by a.actual_end_time desc;
select * from teams order by id desc; # 17328, 32, 17830, [EMAIL]
SELECT * FROM users;
SELECT * FROM users where team_id = 260 and status = 1; # 201 - 150 active
SELECT * FROM teams WHERE id = 260;
select * from team_settings where team_id = 260;
select * from crm_configurations where team_id = 260;
SELECT * FROM crm_layouts WHERE crm_configuration_id = 356;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 1184;
select * from accounts where crm_configuration_id = 221 order by id desc; # 7000
select * from leads where crm_configuration_id = 221 order by id desc; # 0
select * from contacts where crm_configuration_id = 221 order by id desc; # 200 000
select * from opportunities where crm_configuration_id = 221 order by id desc; # 0
select * from crm_profiles where crm_configuration_id = 221 order by id desc; # 23
select * from crm_fields where crm_configuration_id = 221;
select * from crm_field_values where crm_field_id = 5302 order by id desc;
select * from crm_layouts where crm_configuration_id = 221 order by id desc;
select * from stages where crm_configuration_id = 221 order by id desc;
select * from accounts where crm_configuration_id = 356 order by id desc; # 7000
select * from leads where crm_configuration_id = 356 order by id desc; # 0
select * from contacts where crm_configuration_id = 356 order by id desc; # 200 000
select * from opportunities where crm_configuration_id = 356 order by id desc; # 0
select * from crm_profiles where crm_configuration_id = 356 order by id desc; # 23
select * from crm_fields where crm_configuration_id = 356;
select * from crm_field_values where crm_field_id = 5302 order by id desc;
select * from crm_layouts where crm_configuration_id = 356 order by id desc;
select * from stages where crm_configuration_id = 356 order by id desc;
select * from playbooks where team_id = 260 order by id desc; # 4 (2 deleted)
select * from groups where team_id = 260 order by id desc; # 27 groups, (2 deleted)
select * from playbook_layouts where playbook_id IN (1410,1409,1276,1254); # 4
select ce.* from calendars c
join users u on c.user_id = u.id
join calendar_events ce on c.id = ce.calendar_id
where u.team_id = 260
and (ce.start_time > '2025-02-21 00:00:00')
;
# calendar events 1207
#
select * from opportunities where team_id = 260;
SELECT * FROM crm_field_data WHERE object_id = 4696496;
select * from activities where crm_configuration_id = 356 and crm_provider_id IS NOT NULL;
select * from activities where crm_configuration_id IN (221) and provider NOT IN ('ms-teams', 'uploader', 'zoom-bot')
# and type = 'conference' and status = 'scheduled' and activities.is_internal = 0
and created_at > '2024-03-01 00:00:00'
order by id desc; # 880 000, ringcentral, avaya
SELECT * FROM participants WHERE activity_id = 26371744;
# all activities 942 000 +
# conference 7385 - scheduled 984 - external 343
select * from activities where id = 26321812;
select * from participants where activity_id = 26321812;
select * from participants where activity_id in (26414510,26414514,26414516,26414604,26414653,26414655);
select * from leads where id in (720428,689175,731546,645866,621037);
select * from users where id = 13841;
select * from opportunities where user_id = 9541;
select * from stages where id = 15900;
select * from accounts where
# id IN (4160055,5053725,4965303,4896434)
id in (4584518,3249934,3218025,3891133,3399450,4172999,4485161,3101785,4587203,3070816,2870343,2870341,3563940,4550846,3424464,3249963,2870342)
;
select * from activities where id = 26654935;
SELECT * FROM opportunities WHERE id = 4803458;
SELECT * FROM opportunities where team_id = 260 and user_id = 13841 AND stage_id = 15900;
SELECT id, uuid, provider, type, lead_id, account_id, contact_id, opportunity_id, stage_id, status, recording_state, title, actual_start_time, actual_end_time
FROM activities WHERE user_id = 13841 AND opportunity_id IN (4729783, 4731717, 4731726, 4732064, 4732849, 4803458, 4813213);
SELECT DISTINCT
o.id, o.stage_id, s.name, a.title,
a.*
FROM activities a
# INNER JOIN tracks t ON a.id = t.activity_id
INNER JOIN users u ON a.user_id = u.id
INNER JOIN teams team ON u.team_id = team.id
INNER JOIN groups g ON u.group_id = g.id
INNER JOIN opportunities o ON a.opportunity_id = o.id
INNER JOIN stages s ON o.stage_id = s.id
WHERE
a.crm_configuration_id = 356
AND a.status IN ('completed', 'failed')
AND a.recording_state != 'stopped'
# and a.user_id = 13841
AND u.uuid = uuid_to_bin('6f40e4b8-c340-4059-b4ac-1728e87ea99e')
AND team.uuid = uuid_to_bin('a607fba7-452e-4683-b2af-00d6cb52c93c')
AND g.uuid = uuid_to_bin('b5d69e40-24a0-4c16-810b-5fa462299f94')
AND a.type IN ('softphone', 'softphone-inbound', 'conference', 'sms-inbound', 'sms-outbound')
# AND t.type IN ('audio', 'video')
AND (
(a.actual_start_time BETWEEN '2025-03-13 00:00:00' AND '2025-03-18 07:59:59')
OR
(
a.actual_start_time IS NULL
AND a.type IN ('sms-outbound', 'sms-inbound')
AND a.created_at BETWEEN '2025-03-13 00:00:00' AND '2025-03-18 07:59:59'
)
)
AND (
a.is_private = 0
OR (
a.is_private = 1
AND u.uuid = uuid_to_bin('6f40e4b8-c340-4059-b4ac-1728e87ea99e')
)
)
AND (
# s.id = 15900
s.uuid = uuid_to_bin('04ca1c26-c666-4268-a129-419c0acffd73')
OR s.uuid IS NULL -- Include records without opportunity stage
)
ORDER BY a.actual_end_time DESC;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Lead Forensics%'; # 190, 162, 8474, [EMAIL]
SELECT * FROM users WHERE team_id = 190;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 190
and sa.provider = 'hubspot';
select * from role_user where user_id = 8474;
select * from crm_configurations where provider = 'bullhorn';
SELECT * FROM opportunities WHERE uuid_to_bin('94578249-65ec-4205-90f2-7d1a7d5ab64a') = uuid;
SELECT * FROM users WHERE uuid_to_bin('26dbadeb-926f-4150-b11b-771b9d4c2f9a') = uuid;
SELECT * FROM opportunities WHERE id = 4732493;
select * from activities where opportunity_id = 4732493;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE id = 443; # 358, 14315, [EMAIL]
SELECT * FROM opportunities WHERE team_id = 443;
SELECT a.id, a.type, a.user_id, a.status, a.deleted_at, u.name, u.email, u.team_id as activity_team_id, u.status, u.deleted_at, t.name, t.status, s.team_id as stage_team_id
FROM activities AS a
JOIN stages AS s ON a.stage_id = s.id
JOIN users AS u ON u.id = a.user_id
JOIN teams AS t ON t.id = s.team_id
WHERE u.team_id <> s.team_id and t.id > 135;
SELECT
crm_configuration_id,
crm_provider_id,
COUNT(*) as duplicate_count,
GROUP_CONCAT(id) as stage_ids,
GROUP_CONCAT(name) as stage_names
FROM stages
GROUP BY crm_configuration_id, crm_provider_id
HAVING COUNT(*) > 1
ORDER BY duplicate_count DESC;
select * from stages where id IN (14898,14907);
select * from business_processes;
SELECT *
FROM crm_configurations
WHERE team_id IN (
SELECT team_id
FROM crm_configurations
GROUP BY team_id
HAVING COUNT(*) > 1
)
ORDER BY team_id;
SELECT *
FROM teams
WHERE crm_id IN (
SELECT crm_id
FROM teams
GROUP BY crm_id
HAVING COUNT(*) > 1
)
ORDER BY crm_id;
# [PASSWORD_DOTS]
select * from crm_configurations where provider = 'integration-app';
SELECT * FROM teams WHERE id = 443; # Correre Naturale 358 14315 [EMAIL]
select * from activities where crm_configuration_id = 358 order by actual_end_time desc;
select id, uuid, actual_end_time, crm_provider_id, is_internal, playbook_category_id, type, user_id, lead_id, contact_id, account_id, opportunity_id, status, title from activities where crm_configuration_id = 358 order by actual_end_time desc;
select * from team_features where team_id = 358;
select * from activity_summary_logs;
select * from teams where id = 406;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Sportfive%'; # 267, 202, 14637, [EMAIL]
select * from activities where crm_configuration_id = 202 order by actual_end_time desc;
SELECT * FROM users where id = 14637;
SELECT * FROM teams where id = 267;
SELECT * FROM groups where id = 1118;
select g.name, a.title, uuid_from_bin(a.uuid), a.external_id, a.status, a.recording_state, a.recording_reason_code, a.scheduled_start_time, a.scheduled_end_time, a.actual_start_time, a.actual_end_time from activities a
inner join users u on u.id = a.user_id
inner join groups g on g.id = u.group_id
where a.crm_configuration_id = 202
and a.is_internal = 0
and (a.scheduled_start_time between '2025-03-19 00:00:00' and '2025-03-21 00:00:00')
and a.type = 'conference'
and a.status != 'completed'
and a.external_id is not null
order by a.scheduled_start_time desc;
SELECT * FROM activities
WHERE crm_configuration_id = 202
AND status IN ('completed', 'failed')
AND recording_state != 'stopped'
AND type IN ('softphone', 'softphone-inbound', 'conference', 'sms-inbound', 'sms-outbound')
AND (is_private = 0 OR user_id = 14637)
AND (
(
actual_start_time BETWEEN '2025-03-12 12:00:00' AND '2025-03-24 11:59:59'
) OR (
actual_start_time IS NULL
AND type IN ('sms-outbound', 'sms-inbound')
AND created_at BETWEEN '2025-03-12 12:00:00' AND '2025-03-24 11:59:59'
)
)
AND NOT EXISTS (
SELECT 1
FROM tracks
WHERE
tracks.activity_id = activities.id
AND tracks.type IN ('audio', 'video')
)
ORDER BY actual_end_time DESC;
SELECT DISTINCT
a.*
FROM activities a
INNER JOIN tracks t ON a.id = t.activity_id
INNER JOIN users u ON a.user_id = u.id
INNER JOIN teams team ON u.team_id = team.id
WHERE
a.crm_configuration_id = 202
AND a.status IN ('completed', 'failed')
AND a.recording_state != 'stopped'
# and a.user_id = 14637
AND a.type IN ('softphone', 'softphone-inbound', 'conference', 'sms-inbound', 'sms-outbound')
# AND t.type IN ('audio', 'video')
AND (
(a.actual_start_time BETWEEN '2025-03-12 12:00:00' AND '2025-03-24 11:59:59')
OR
(
a.actual_start_time IS NULL
AND a.type IN ('sms-outbound', 'sms-inbound')
AND a.created_at BETWEEN '2025-03-12 12:00:00' AND '2025-03-24 11:59:59'
)
)
AND (
a.is_private = 0
OR (
a.is_private = 1
AND a.user_id = 14637
)
)
ORDER BY a.actual_end_time DESC
;
SELECT DISTINCT a.*
FROM activities a
INNER JOIN users u ON a.user_id = u.id
INNER JOIN teams t ON u.team_id = t.id
# INNER JOIN tracks tr ON a.id = tr.activity_id
# INNER JOIN groups g ON u.group_id = g.id
WHERE 1=1
AND t.id = 267
# AND t.uuid = uuid_to_bin('aed4927b-f1ea-499e-94c3-83762fd233e8')
AND a.status IN ('completed', 'failed')
AND a.recording_state != 'stopped'
AND a.type IN ('softphone', 'softphone-inbound', 'conference', 'sms-inbound', 'sms-outbound')
# AND tr.type NOT IN ('audio', 'video')
AND (
a.is_private = 0
OR a.user_id = 14637
)
AND (
(a.actual_start_time BETWEEN '2025-03-19 00:00:00' AND '2025-03-21 23:59:59')
OR (
a.actual_start_time IS NULL
AND a.type IN ('sms-outbound', 'sms-inbound')
AND a.created_at BETWEEN '2025-03-19 00:00:00' AND '2025-03-21 23:59:59'
)
)
# and NOT EXISTS (
# SELECT 1
# FROM tracks t
# WHERE t.activity_id = a.id
# AND t.type IN ('audio', 'video')
# )
ORDER BY a.actual_end_time DESC;
SELECT * FROM tracks WHERE activity_id = 26485995;
select a.is_private, a.title, uuid_from_bin(a.uuid), a.external_id, a.status, a.recording_state, a.recording_reason_code, a.scheduled_start_time, a.scheduled_end_time, a.actual_start_time, a.actual_end_time from activities a
inner join users u on u.id = a.user_id
where a.crm_configuration_id = 202
# and a.is_internal = 0
and (a.actual_start_time between '2025-03-19 00:00:00' and '2025-03-21 00:00:00')
and a.type IN ("softphone","softphone-inbound","conference","sms-inbound")
and a.status IN ('completed', 'failed')
# and a.external_id is not null
order by a.actual_end_time desc;
select * from activities a where a.crm_configuration_id = 202
and a.actual_start_time between '2025-03-20 00:00:00' and '2025-03-21 00:00:00'
# AND a.type IN ('softphone', 'softphone-inbound', 'conference', 'sms-inbound', 'sms-outbound')
select g.name, a.title, uuid_from_bin(a.uuid), a.external_id, a.status, a.recording_state, a.recording_reason_code, a.scheduled_start_time, a.scheduled_end_time, a.actual_start_time, a.actual_end_time from activities a
inner join users u on u.id = a.user_id
inner join groups g on g.id = u.group_id
where a.crm_configuration_id = 202
and a.is_internal = 0
and (a.scheduled_start_time between '2025-03-19 00:00:00' and '2025-03-21 00:00:00')
and a.type = 'conference'
and a.status != 'completed'
and a.external_id is not null
order by a.scheduled_start_time desc;
SELECT * FROM teams WHERE name LIKE '%Tourlane%';
SELECT * FROM crm_fields WHERE crm_configuration_id = 209 and object_type = 'opportunity';
SELECT * FROM crm_field_data WHERE crm_field_id = 98809;
select * from users where status = 1 AND timezone = 'MDT';
select * from opportunities where id = 3769814;
select * from deal_risks where opportunity_id = 3769814;
select cp.* from crm_profiles cp
join users u on cp.user_id = u.id
join crm_configurations crm on cp.crm_configuration_id = crm.id
where crm.provider = 'hubspot' AND u.status = 1 AND log_notes != 'none';
select * from crm_fields where id = 154575;
select * from team_features where feature = 'SUPPORTS_SYNC_MISSING_CALL_DISPOSITIONS';
SELECT * FROM teams WHERE id = 176; # crm 148
select * from activities where crm_configuration_id = 148 and provider = 'hubspot' order by id desc;
select * from activity_providers where provider = 'amazon-connect';
select * from crm_fields cf
join crm_configurations crm on crm.id = cf.crm_configuration_id
where crm.provider = 'hubspot' and cf.object_type IN ('account', 'contact');
# [PASSWORD_DOTS]
SELECT * FROM users WHERE id IN (15415, 15418);
SELECT * FROM groups WHERE id IN (1805,1806);
SELECT * FROM playbooks WHERE id = 1860;
SELECT * FROM playbook_categories WHERE id = 38634;
SELECT * FROM crm_fields WHERE id = 189962;
SELECT * FROM teams WHERE name = 'Pulsar Group'; # 472, 380, 15138 [EMAIL]
SELECT * FROM crm_profiles WHERE user_id = 15415;
SELECT * FROM social_accounts WHERE sociable_id = 15415 and provider = 'salesforce';
select * from sidekick_settings where team_id = 472;
SELECT * FROM activities WHERE uuid_to_bin('452c58c7-b87c-4fdd-953e-d7af185e9588') = uuid; # 28617536, user: 15418
SELECT * FROM activities WHERE uuid_to_bin('399114ee-d3a8-458c-bff5-5f654658db0a') = uuid; # 28344407, user: 15415
SELECT * FROM activities WHERE uuid_to_bin('f0aa567f-0ab1-4bbb-96aa-37dcf184676b') = uuid; # 28580288, user: 15415
SELECT * FROM activities WHERE uuid_to_bin('50c086b1-2770-4bca-b5ae-6bac22ec426b') = uuid; # 28566069, user: 15415
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%TeamTailor%'; # 109, 218, 13969, [EMAIL]
select * from crm_configurations where id = 218;
SELECT * FROM activities WHERE uuid_to_bin('e39b5857-7fdb-4f5a-951a-8d3ca69bb1b0') = uuid; # 28338765
SELECT * FROM users WHERE id IN (13232, 13230);
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 109
and sa.provider = 'salesforce';
0057R00000EPL5HQAX Inez Ekblad
1091cb81-5ea1-4951-a0ed-f00b568f0140 Triman Kaur
SELECT * FROM crm_profiles WHERE user_id IN (13232, 13230);
############################################################################################
SELECT * FROM activities WHERE uuid_to_bin('675eeaeb-5681-42db-90bc-54c07a604408') = uuid; # 28655939 00UVg00000FLvnSMAT
SELECT * FROM crm_field_data WHERE activity_id = 28655939;
SELECT * FROM crm_fields WHERE id IN (94491,94493,94498);
SELECT * FROM users WHERE id = 13658;
SELECT * FROM teams WHERE id = 109;
SELECT * FROM crm_configurations WHERE id = 218;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 109
and sa.provider = 'salesforce';
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Strengthscope%'; # 481, 390, 15420, [EMAIL]
SELECT * FROM stages WHERE crm_configuration_id = 390;
select * from business_processes where team_id = 481 and crm_configuration_id = 390;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 481
and sa.provider = 'salesforce';
SELECT * FROM users WHERE id = 15780; # team 462
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 462
and sa.provider = 'hubspot';
select * from teams where id = 495;
SELECT * FROM users WHERE id = 15794;
select * from social_accounts where sociable_id = 15794;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Flight%'; # 427, 333, 13752
SELECT * FROM accounts WHERE team_id = 427 and crm_provider_id = '668731000183444517';
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Group GTI%'; # 495, 407, 15794
SELECT * FROM activities WHERE crm_configuration_id = 407
and status = 'completed' and type = 'conference'
order by id desc;
select ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id
join permission_role pr on pr.role_id = ru.role_id
join permissions p on p.id = pr.permission_id
where team_id = 495 and p.name IN ('dial');
select * from permission_role;
select * from activities where crm_configuration_id = 407 and status = 'completed' order by id desc;
SELECT * FROM activities WHERE id = 29512773;
SELECT * FROM activities WHERE id IN (29042721,28991325,29002874);
SELECT al.* from activity_summary_logs al join activities a on a.id = al.activity_id
where a.crm_configuration_id = 407
# and a.id IN (29042721,28991325,29002874);
SELECT * FROM users WHERE id = 15794;
SELECT * FROM users WHERE team_id = 495;
SELECT * FROM social_accounts WHERE sociable_id = 15794;
SELECT * FROM opportunities WHERE team_id = 495 and name like '%OC:%';
SELECT * FROM contacts WHERE team_id = 495;
SELECT * FROM leads WHERE team_id = 495;
SELECT * FROM accounts WHERE team_id = 495;
SELECT * FROM crm_profiles WHERE crm_configuration_id = 407;
SELECT * FROM crm_fields WHERE crm_configuration_id = 407;
SELECT * FROM crm_configurations WHERE id = 407;
SELECT * FROM opportunities WHERE team_id = 495 and close_date BETWEEN '2025-06-01' AND '2025-07-01'
and user_id IS NOT NULL and is_closed = 1 and is_won = 1;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Hamilton Court FX LLP%'; # 249, 187, 10103
SELECT * FROM activities WHERE uuid_to_bin('4659c2bb-9a49-484e-9327-a3d66f1e028c') = uuid; # 28951064
SELECT * FROM crm_fields WHERE crm_configuration_id = 187 and object_type IN ('tasks', 'event');
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Checkstep%'; # 325, 256, 11753
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 325
and sa.provider = 'hubspot';
SELECT * FROM activities WHERE uuid_to_bin('7be372e2-1916-4d79-a2f3-ca3db1346db3') = uuid; # 28611085
SELECT * FROM activities WHERE uuid_to_bin('980f0336-840b-4185-a5a9-30cf8b0749a8') = uuid; # 28719733
SELECT * FROM activity_summary_logs where activity_id = 28719733;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Learning%'; # 260, 356, 9444
SELECT * FROM activity_summary_logs where sent_at BETWEEN '2025-06-09 11:38:00' AND '2025-06-09 11:40:00';
SELECT * FROM leads WHERE crm_configuration_id = 356 and crm_provider_id = '230045001502770504'; # 823630
select * from activities where crm_configuration_id = 356 and lead_id = 841732;
SELECT * from activity_summary_logs al join activities a on a.id = al.activity_id
where a.crm_configuration_id = 356;
select * from activities where crm_configuration_id = 356
and actual_end_time between '2025-06-09 11:00:00' and '2025-06-09 12:00:00'
order by id desc;
select * from accounts where crm_configuration_id = 356 and crm_provider_id = '230045001514403366' order by id desc;
select * from leads where crm_configuration_id = 356 and crm_provider_id = '230045001514275654' order by id desc;
select * from contacts where crm_configuration_id = 356 and crm_provider_id = '230045001514403366' order by id desc;
select * from opportunities where crm_configuration_id = 356 and crm_provider_id = '230045001514403366' order by id desc;
select * from team_features where team_id = 260;
select * from features where id IN (1,2,4,6,18,19,20,9,10,3,23,24,25,26,27);
SELECT * FROM activities WHERE uuid_to_bin('7be372e2-1916-4d79-a2f3-ca3db1346db3') = uuid;
select * from crm_fields;
select * from crm_layout_entities;
SELECT * FROM teams WHERE name LIKE '%Optable%';
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Teamtailor%'; # 109, 218, 13969
SELECT * FROM crm_configurations WHERE id = 218;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 109
and sa.provider = 'salesforce';
SELECT * FROM activities WHERE uuid_to_bin('675eeaeb-5681-42db-90bc-54c07a604408') = uuid; # 28655939
SELECT * FROM crm_field_data WHERE activity_id = 28655939;
SELECT * FROM crm_fields WHERE id in (94491,94493,94498);
select * from teams where crm_id IS NULL;
SELECT * FROM activities WHERE uuid_to_bin('71aa8a0c-9652-4ff6-bee7-d98ae60abef6') = uuid;
# [PASSWORD_DOTS]
select * from team_domains where team_id = 399;
SELECT * FROM teams WHERE name LIKE '%Rydoo%'; # 399, 318, 13207
select * from calendar_events where id = 5163781;
SELECT * FROM activities WHERE uuid_to_bin('be2cbc52-7fda-46a0-9ae0-25d9553eafc0') = uuid; # 29443896
SELECT * FROM participants WHERE activity_id = 29443896;
select * from contacts where crm_configuration_id = 318 and email = '[EMAIL]';
select * from leads where crm_configuration_id = 318 and email = '[EMAIL]';
select * from activities where user_id = 14937 order by created_at ;
select * from users where id = 14937;
select * from contacts where crm_configuration_id = 318 and email LIKE '%@strawberry.se';
select * from opportunities where crm_configuration_id = 318 and crm_provider_id = '006Sf00000D1WOAIA3';
select * from activities a join participants p on a.id = p.activity_id
where crm_configuration_id = 318 and a.updated_at > '2025-06-23T08:18:43Z';
# [PASSWORD_DOTS]
SELECT * FROM opportunities WHERE team_id = 379 and crm_provider_id = '39334518886';
SELECT * FROM opportunities WHERE team_id = 379 order by id desc;
SELECT * FROM teams WHERE id = 379;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 379 and sociable_id = 13852
and sa.provider = 'hubspot';
SELECT * FROM crm_configurations WHERE id = 307;
SELECT * FROM crm_layouts WHERE crm_configuration_id = 307;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 1027;
SELECT * FROM crm_fields WHERE crm_configuration_id = 307
and id IN (144750,144855,145158,155227);
SELECT * FROM activities;
select * from activities
where created_at > '2025-07-01 00:00:00'
# and created_at < '2025-08-01 00:00:00'
and type not in ('email-outbound', 'email-inbound')
and account_id is null
and contact_id is null
and lead_id is null
and opportunity_id is not null
;
SELECT * FROM activities WHERE id IN (25344155, 25344296, 25501909, 28692187);
SELECT * FROM crm_configurations WHERE id in (335,301,200);
select * from crm_fields where crm_configuration_id = 230 and crm_provider_id = 'Age2__c';
SELECT * FROM teams WHERE name LIKE '%Resights%';
select * from crm_fields where crm_configuration_id = 1 and object_type = 'opportunity';
select * from crm_configurations where provider = 'bullhorn'; # 344
select * from teams where id IN (442);
select * from activities
where crm_configuration_id = 177
and provider = 'amazon-connect'
order by id desc;
# and source <> 'gong';
select * from activity_providers where provider = 'amazon-connect';
SELECT * FROM activities WHERE uuid_to_bin('cec1993b-a7e5-4164-b74d-d680ea51d2f2') = uuid;
select * from crm_configurations where store_transcript = 1;
SELECT * FROM teams WHERE id IN (80);
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Sedna%'; # 277, 213, 12594
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 277
and sa.provider = 'salesforce';
select * from activities where crm_configuration_id = 213 and account_id = 2511502;
select * from crm_configurations where id = 213;
SELECT * FROM activities WHERE uuid_to_bin('35aa790a-8569-4544-8268-66f9a4a26804') = uuid; # 33981604
SELECT * FROM participants WHERE activity_id = 33981604;
SELECT * FROM crm_fields WHERE crm_configuration_id = 337 and object_type = 'task';
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 431
and sa.provider = 'salesforce';
SELECT * FROM activities WHERE uuid_to_bin('b5476c7d-19a8-491b-869d-676ea1e857b6') = uuid; # 33997223
select * from activity_summary_logs where activity_id = 33997223;
select * from activity_notes where activity_id =...
|
53463
|
|
53466
|
1157
|
38
|
2026-04-20T08:13:44.958433+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-20/1776 /Users/lukas/.screenpipe/data/data/2026-04-20/1776672824958_m2.jpg...
|
PhpStorm
|
faVsco.js – TrackAutomatedReportGeneratedEvent.php
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Tests passed: 7
text/html
text/html
text/html
Proj Tests passed: 7
text/html
text/html
text/html
Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
TrackAutomatedReportGeneratedEventTest
Run 'TrackAutomatedReportGeneratedEventTest'
Debug 'TrackAutomatedReportGeneratedEventTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
1
2
1
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Listeners\AutomatedReports\UserPilot;
use GuzzleHttp\Exception\GuzzleException;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Jiminny\Component\Queue\Constants;
use Jiminny\Events\AutomatedReports\AutomatedReportGenerated;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\Contracts\UserContract;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Jiminny\Services\UserPilot\UserPilotClient;
class TrackAutomatedReportGeneratedEvent implements ShouldQueue
{
use InteractsWithQueue;
private const string EVENT_NAME_AUTOMATED_REPORT = 'automated-report-generated';
private const string EVENT_NAME_ASK_JIMINNY_REPORT = 'ask-jiminny-report-generated';
public string $queue = Constants::QUEUE_DELAYABLE;
public function __construct(
private readonly UserPilotClient $userPilotClient,
private readonly AutomatedReportsService $automatedReportsService,
) {
}
public function handle(AutomatedReportGenerated $event): void
{
if (config('services.userpilot.token') === null) {
return;
}
$automatedReport = $event->automatedReport;
$payload = $this->buildPayload($automatedReport);
$eventName = $this->resolveEventName($automatedReport);
try {
foreach ($this->resolveUsers($automatedReport) as $user) {
$this->userPilotClient->track($user, $eventName, $payload);
}
} catch (GuzzleException $e) {
$this->release(3600);
}
}
/**
* @return array<UserContract>
*/
private function resolveUsers(AutomatedReport $automatedReport): array
{
if ($automatedReport->isAskJiminnyReport()) {
$creator = $automatedReport->getCreator();
return $creator !== null ? [$creator] : [];
}
return $this->automatedReportsService->getRecipientUserObjects($automatedReport);
}
private function buildPayload(AutomatedReport $automatedReport): array
{
return [
'report_type' => $automatedReport->getType(),
'frequency' => $automatedReport->getFrequency(),
];
}
private function resolveEventName(AutomatedReport $automatedReport): string
{
if ($automatedReport->isAskJiminnyReport()) {
return self::EVENT_NAME_ASK_JIMINNY_REPORT;
}
return self::EVENT_NAME_AUTOMATED_REPORT;
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
27
9
23
3
105
Previous Highlighted Error
Next Highlighted Error
SELECT * FROM team_features where team_id = 1;
SELECT * FROM teams WHERE name LIKE '%Vixio%'; # 340,270,11922
SELECT * FROM users WHERE team_id = 340; # 12015
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 340
and sa.provider = 'salesforce';
# and sa.provider = 'salesloft';
select * from crm_fields where crm_configuration_id = 270 and object_type = 'event';
# 125558 - Event Type - Event_Type__c
# 125552 - Event Status - Event_Status__c
SELECT * FROM sidekick_settings WHERE team_id = 340;
SELECT * FROM crm_field_values WHERE crm_field_id in (125552);
select * from activities where crm_configuration_id = 270
and type = 'conference' and crm_provider_id IS NOT NULL
and actual_start_time > '2024-09-16 09:00:00' order by scheduled_start_time;
SELECT * FROM activities WHERE id = 20871677;
SELECT * FROM crm_field_data WHERE activity_id = 20871677;
select * from crm_layouts where crm_configuration_id = 270;
select * from crm_layout_entities where crm_layout_id in (886,887);
SELECT * FROM crm_configurations WHERE id = 270;
select * from playbooks where team_id = 340; # 1514
select * from groups where team_id = 340;
SELECT * FROM crm_fields WHERE id IN (125393, 125401);
select g.name as 'team name', p.name as 'playbook name', f.label as 'activity type field' from groups g
join playbooks p on g.playbook_id = p.id
join crm_fields f on p.activity_field_id = f.id
where g.team_id = 340;
SELECT * FROM activities WHERE uuid_to_bin('0c180357-67d2-419e-a8c3-b832a3490770') = uuid; # 20448716
select * from crm_field_data where object_id = 20448716;
select * from activities where crm_configuration_id = 270 and provider = 'salesloft' order by id desc;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%CybSafe%'; # 343,273,12008
select * from opportunities where team_id = 343;
select * from opportunities where team_id = 343 and crm_provider_id = '18099102526';
select * from opportunities where team_id = 343 and account_id = 945217482;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 343
and sa.provider = 'hubspot';
select * from accounts where team_id = 343 order by name asc;
select * from stages where crm_configuration_id = 273 and type = 'opportunity';
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Voyado%'; # 353,283,12143
SELECT * FROM activities WHERE crm_configuration_id = 283 and account_id = 3777844 order by id desc;
SELECT * FROM accounts WHERE team_id = 353 AND name LIKE '%Salesloft%';
SELECT * FROM activities WHERE id = 20717903;
select * from participants where activity_id IN (20929172,20928605,20928468,20926272,20926271,20926270,20926269,20916499,20916454,20916436,20916435,20900015,20900014,20900013,20897312,20897243,20897241,20897237,20897232,20897229,20893648,20893231,20893230,20893229,20893228,20889784,20885039,20885038,20885037,20885036,20885035,20882728,20882708,20882703,20882702,20869828,20869811,20869806,20869801,20869799,20869798,20869796,20869795,20869794,20869761,20869760,20869759,20868688,20868687,20850340,20847195,20841710,20833967,20827021,20825307,20825305,20825297,20824615,20824400,20823927,20821760,20795588,20794233,20794057,20793710,20785811,20781789,20781394,20781307,20762651,20758453,20758282,20757323,20756643,20756636,20756629,20756627,20756606,20756605,20756604,20756603,20756602,20756600,20756599,20756598,20756595,20756594,20756589,20756587,20756577,20756573,20748918,20748386,20748385,20748384,20748383,20748382,20748381,20748380,20748379,20748377,20748375,20748373,20743301,20717905,20717904,20717903,20717901,20717899);
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 353
and sa.provider = 'salesforce';
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%modern world business solutions%'; # 345,275,12016, [EMAIL]
SELECT * FROM activities WHERE uuid_to_bin('3921d399-3fef-4609-a291-b0097a166d43') = uuid;
# id: 20940638, user: 12022, contact: 5305871
SELECT * FROM activity_summary_logs WHERE activity_id = 20940638;
select * from contacts where team_id = 345 and crm_provider_id = '30891432415' order by name asc; # 5305871
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 345
and sa.provider = 'hubspot';
select * from users where team_id = 345 and id = 12022;
SELECT * FROM crm_profiles WHERE user_id = 12022;
SELECT * FROM participants WHERE activity_id = 20940638;
SELECT * FROM users u
JOIN crm_profiles cp ON u.id = cp.user_id
WHERE u.team_id = 345;
select * from contacts where team_id = 345 and crm_provider_id = '30880813535' order by name desc; # 5305871
select * from team_features where team_id = 345;
SELECT * FROM activities WHERE uuid_to_bin('11701e2d-2f82-4dab-a616-1db4fad238df') = uuid; # 21115197
SELECT * FROM participants WHERE activity_id = 20897406;
SELECT * FROM activities WHERE uuid_to_bin('63ba55cd-1abc-447d-83da-0137000005b7') = uuid; # 20953912
SELECT * FROM activities WHERE crm_configuration_id = 275 and provider = 'ringcentral' and title like '%1252629100%';
SELECT * FROM activities WHERE id = 20946641;
SELECT * FROM crm_profiles WHERE user_id = 10211;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Lunio%'; # 120,97,10984, [EMAIL]
SELECT * FROM opportunities WHERE crm_configuration_id = 97 and crm_provider_id = '006N1000006c5PpIAI';
select * from stages where crm_configuration_id = 97 and type = 'opportunity';
select * from opportunities where team_id = 120;
select * from crm_configurations crm join teams t on crm.id = t.crm_id
where 1=1
AND t.current_billing_plan IS NOT NULL
AND crm.auto_sync_activity = 0
and crm.provider = 'hubspot';
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Exclaimer%'; # 270,205,10053,[EMAIL]
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 270
and sa.provider = 'salesforce';
SELECT * FROM activities WHERE uuid_to_bin('b54df794-2a9a-4957-8d80-09a600ead5f8') = uuid; # 21637956
SELECT * FROM crm_profiles WHERE user_id = 11446;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Cygnetise%'; # 372,300,12554, [EMAIL]
select * from playbooks where team_id = 372;
select * from crm_fields where crm_configuration_id = 300 and object_type = 'event'; # 141340
SELECT * FROM crm_field_values WHERE crm_field_id = 141340;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 372
and sa.provider = 'salesforce';
select * from crm_profiles where crm_configuration_id = 300;
SELECT * FROM crm_configurations WHERE team_id = 372;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Planday%'; # 291,242,11501,[EMAIL]
SELECT * FROM opportunities WHERE team_id = 291 and crm_provider_id = '006bG000005DO86QAG'; # 3207756
select * from crm_field_data where object_id = 3207756;
SELECT * FROM crm_fields WHERE id = 111834;
select f.id, f.crm_provider_id AS field_name, f.label, fd.object_id AS dealId, fd.value
FROM crm_fields f
JOIN crm_field_data fd ON f.id = fd.crm_field_id
WHERE f.crm_configuration_id = 242
AND f.object_type = 'opportunity'
AND fd.object_id IN (3207756)
ORDER BY fd.object_id, fd.updated_at;
SELECT * FROM crm_configurations WHERE auto_connect = 1;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Tour%'; # 187,209,8150,[EMAIL]
select * from group_deal_risk_types drgt join groups g on drgt.group_id = g.id
where g.team_id = 187;
select * from `groups` where team_id = 187;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 187
and sa.provider = 'salesforce';
# Destination - 98870 - Destination__c
# Stage - 79014 - StageName
# Land Arrangement - 98856 - Land_Arrangement__c
# Flight - 98848 - Flight__c
# Last activity date - 98812 - LastActivityDate
# Last modified date - 98809 - LastModifiedDate
# Last inbound mail timestamp - 99151 - Last_Inbound_Mail_Timestamp__c
# next call - 98864 - Next_Call__c
select * from crm_fields where crm_configuration_id = 209 and object_type = 'opportunity';
SELECT * FROM crm_layouts WHERE crm_configuration_id = 209;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 682;
select * from opportunities where team_id = 187 and name LIKE'%Muriel Sal%';
select * from opportunities where team_id = 187 and user_id = 9951 and is_closed = 0;
select * from activities where opportunity_id = 3538248;
SELECT * FROM crm_profiles WHERE user_id = 8150;
select * from deal_risks where opportunity_id = 3538248;
select * from teams where crm_id IS NULL;
SELECT opp.id AS opportunity_id,
u.group_id AS group_id,
MAX(
CASE
WHEN a.type IN ("sms-inbound", "sms-outbound") THEN a.created_at
ELSE a.actual_end_time
END) as last_date
FROM opportunities opp
left join activities a on a.opportunity_id = opp.id
inner join users u on opp.user_id = u.id
where opp.user_id IN (9951)
AND opp.is_closed = 0
and a.status IN ('completed', 'received', 'delivered') OR a.status IS NULL
group by opp.id;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Cybsafe%'; # 343,301,12008,[EMAIL]
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 343
and sa.provider = 'hubspot';
SELECT * FROM crm_profiles WHERE crm_configuration_id = 301;
SELECT * FROM contacts WHERE id = 6612363;
SELECT * FROM accounts WHERE id = 4235676;
SELECT * FROM opportunities WHERE crm_configuration_id = 301 and crm_provider_id = 32983784868;
select * from opportunity_stages where opportunity_id = 4503759;
# SELECT * FROM opportunities WHERE id = 4569937;
select * from activities where crm_configuration_id = 301;
SELECT * FROM activities WHERE uuid_to_bin('d3b2b28b-c3d0-4c2d-8ed0-eef42855278a') = uuid; # 26330370
SELECT * FROM participants WHERE activity_id = 26330370;
SELECT * FROM teams WHERE id = 375;
select * from playbooks where team_id = 375;
select * from stages where crm_configuration_id = 301 and type = 'opportunity';
select * from teams;
select * from contact_roles;
SELECT * FROM opportunities WHERE team_id = 343 and user_id = 12871 and close_date >= '2024-11-01';
select * from users u join crm_profiles cp on cp.user_id = u.id where u.team_id = 343;
SELECT * FROM crm_field_data WHERE object_id = 3771706;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 343
and sa.provider = 'hubspot';
SELECT * FROM crm_fields WHERE crm_configuration_id = 301 and object_type = 'opportunity'
and crm_provider_id LIKE "%traffic_light%";
SELECT * FROM crm_field_values WHERE crm_field_id IN (144020,144048,144111,144113,144126,144481,144508,144531);
SELECT fd.* FROM opportunities o
JOIN crm_field_data fd ON o.id = fd.object_id
WHERE o.team_id = 343
# and o.user_id IS NOT NULL
and fd.crm_field_id IN (144020,144048,144111,144113,144126,144481,144508,144531)
and fd.value != ''
order by value desc
# group by o.id
;
SELECT * FROM opportunities WHERE id = 3769843;
SELECT * FROM teams WHERE name LIKE '%Tour%'; # 187,209,8150, [EMAIL]
SELECT * FROM crm_layouts WHERE crm_configuration_id = 209;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 682;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Funding Circle%'; # 220,177,8603,[EMAIL]
SELECT * FROM activities WHERE uuid_to_bin('7a40e99b-3b37-4bb1-b983-325b81801c01') = uuid; # 23139839
SELECT * FROM opportunities WHERE id = 3855992;
SELECT * FROM users WHERE name LIKE '%Angus Pollard%'; # 8988
SELECT * FROM teams WHERE name LIKE '%Story Terrace%'; # 379, 307, 12894
SELECT * FROM crm_fields WHERE crm_configuration_id = 307 and object_type != 'opportunity';
select * from contacts where team_id = 379 and name like '%bebro%'; # 5874411, crm: 77229348507
SELECT * FROM crm_field_data WHERE object_id = 5874411;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 379
and sa.provider = 'hubspot';
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%mentio%'; # 117, 94, 6371, [EMAIL]
SELECT * FROM activities WHERE uuid_to_bin('82939311-1af0-4506-8546-21e8d1fdf2c1') = uuid;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Tourlane%'; # 187, 209, 8150, [EMAIL]
SELECT * FROM opportunities WHERE team_id = 187 and crm_provider_id = '006Se000008xfvNIAQ'; # 3537793
select * from generic_ai_prompts where subject_id = 3537793;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Lunio%'; # 120, 97, 10984, [EMAIL]
SELECT * FROM crm_configurations WHERE id = 97;
SELECT * FROM crm_layouts WHERE crm_configuration_id = 97;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 355;
SELECT * FROM crm_fields WHERE id = 32682;
select cfd.value, o.* from opportunities o
join crm_field_data cfd on o.id = cfd.object_id and cfd.crm_field_id = 32682
where team_id = 120
and cfd.value != ''
;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 120
and sa.provider = 'salesforce';
select * from opportunities where team_id = 120 and crm_provider_id = '006N1000007X8MAIA0';
SELECT * FROM crm_field_data WHERE object_id = 2313439;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE id = 410;
SELECT * FROM teams WHERE name LIKE '%Local Business Oxford%';
select * from scorecards where team_id = 410;
select * from scorecard_rules;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Funding%'; # 220, 177, 8603, [EMAIL]
select * from activities a
join opportunities o on a.opportunity_id = o.id
join users u on o.user_id = u.id
where a.crm_configuration_id = 177 and a.type LIKE '%email-out%'
# and a.actual_end_time > '2024-12-16 00:00:00'
# and o.remotely_created_at > '2024-12-01 00:00:00'
# and u.group_id = 1014
and u.id = 9021
order by a.id desc;
SELECT * FROM opportunities WHERE id in (3981384,4017346);
SELECT * FROM users WHERE team_id = 220 and id IN (8775, 11435);
select * from users where id = 9021;
select * from inboxes where user_id = 9021;
select * from inbox_emails where inbox_id = 1349 and email_date > '2024-12-18 00:00:00';
select * from email_messages where team_id = 220
and orig_date > '2024-12-16 00:00:00' and orig_date < '2024-12-19 00:00:00'
and subject LIKE '%Personal%'
# and 'from' = '[EMAIL]'
;
select * from activities a
join opportunities o on a.opportunity_id = o.id
where a.user_id = 9021 and a.type LIKE '%email-out%'
and a.actual_end_time > '2024-12-18 00:00:00'
and o.user_id IS NOT NULL
and o.remotely_created_at > '2024-12-01 00:00:00'
order by a.id desc;
SELECT * FROM opportunities WHERE team_id = 220 and name LIKE '%Right Car move Limited%' and id = 3966852;
select * from activities where crm_configuration_id = 177 and type LIKE '%email%' and opportunity_id = 3966852 order by id desc;
select * from team_settings where name IN ('useCloseDate');
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Hurree%'; # 104, 81, 6175, [EMAIL]
SELECT * FROM opportunities WHERE team_id = 104 and name = 'PropOp';
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 104
and sa.provider = 'hubspot';
select * from crm_configurations where last_synced_at > '2025-01-19 01:00:00'
select * from teams where crm_id IS NULL;
select t.name as 'team', u.name as 'owner', u.email, u.phone
from teams t
join activity_providers ap on t.id = ap.team_id
join users u on t.owner_id = u.id
where 1=1
and t.status = 'active'
and ap.is_enabled = 1
# and u.status = 1
and ap.provider = 'ms-teams';
select * from crm_configurations where provider = 'bullhorn'; # 344
SELECT * FROM teams WHERE id = 442; # 14293
select * from users where team_id = 442;
select * from social_accounts sa where sa.sociable_id = 14293;
select * from invitations where team_id = 442;
# [PASSWORD_DOTS]
SELECT * FROM users WHERE email LIKE '%[EMAIL]%'; # 14022
SELECT * FROM teams WHERE id = 429;
select * from opportunities where team_id = 429 and crm_provider_id IN (16157415775, 22246219645);
select * from activities where opportunity_id in (4340436,4353519);
select * from transcription where activity_id IN (25630961,25381771);
select * from generic_ai_prompts where subject_id IN (4353519);
SELECT
a.id as activity_id,
a.opportunity_id,
a.type as activity_type,
a.language,
CONCAT(a.title, a.description) AS mail_content,
e.from AS mail_from,
e.to AS mail_to,
e.subject AS mail_subject,
e.body AS mail_body,
p.type as prompt_type,
p.status as prompt_status,
p.content AS prompt_content,
a.actual_start_time as created_at
FROM activities a
LEFT JOIN ai_prompts p ON a.transcription_id = p.transcription_id AND p.deleted_at IS NULL
LEFT JOIN email_messages e ON a.id = e.activity_id
WHERE a.actual_start_time > '2024-01-01 00:00:00'
AND a.opportunity_id IN (4353519)
AND a.status IN ('completed', 'received', 'delivered')
AND a.deleted_at IS NULL
AND a.type NOT IN ('sms-inbound', 'sms-outbound')
ORDER BY a.opportunity_id ASC, a.id ASC;
SELECT * FROM users WHERE name LIKE '%George Fierstone%'; # 14293
SELECT * FROM teams WHERE id = 442;
SELECT * FROM crm_configurations WHERE id = 344;
select * from team_features where team_id = 442;
select * from groups where team_id = 442;
select * from playbooks where team_id = 442;
select * from playbook_categories where playbook_id = 1729;
select * from crm_fields where crm_configuration_id = 344 and id = 172024;
SELECT * FROM crm_field_values WHERE crm_field_id = 172024;
select * from crm_layouts where crm_configuration_id = 344;
select * from playbook_layouts where playbook_id = 1729;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Learning%'; # 260, 221, 9444
select s.*
# , s.sent_at, u.name, a.*
from activity_summary_logs s
inner join activities a on a.id = s.activity_id
inner join users u on u.id = a.user_id
where a.crm_configuration_id = 356
and s.sent_at > date_sub(now(), interval 60 day)
order by a.actual_end_time desc;
select * from activities a
# inner join activity_summary_logs s on s.activity_id = a.id
where a.crm_configuration_id = 356 and a.actual_end_time > date_sub(now(), interval 60 day)
# and a.crm_provider_id is not null
# and provider <> 'ringcentral'
and status = 'completed'
order by a.actual_end_time desc;
select * from teams order by id desc; # 17328, 32, 17830, [EMAIL]
SELECT * FROM users;
SELECT * FROM users where team_id = 260 and status = 1; # 201 - 150 active
SELECT * FROM teams WHERE id = 260;
select * from team_settings where team_id = 260;
select * from crm_configurations where team_id = 260;
SELECT * FROM crm_layouts WHERE crm_configuration_id = 356;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 1184;
select * from accounts where crm_configuration_id = 221 order by id desc; # 7000
select * from leads where crm_configuration_id = 221 order by id desc; # 0
select * from contacts where crm_configuration_id = 221 order by id desc; # 200 000
select * from opportunities where crm_configuration_id = 221 order by id desc; # 0
select * from crm_profiles where crm_configuration_id = 221 order by id desc; # 23
select * from crm_fields where crm_configuration_id = 221;
select * from crm_field_values where crm_field_id = 5302 order by id desc;
select * from crm_layouts where crm_configuration_id = 221 order by id desc;
select * from stages where crm_configuration_id = 221 order by id desc;
select * from accounts where crm_configuration_id = 356 order by id desc; # 7000
select * from leads where crm_configuration_id = 356 order by id desc; # 0
select * from contacts where crm_configuration_id = 356 order by id desc; # 200 000
select * from opportunities where crm_configuration_id = 356 order by id desc; # 0
select * from crm_profiles where crm_configuration_id = 356 order by id desc; # 23
select * from crm_fields where crm_configuration_id = 356;
select * from crm_field_values where crm_field_id = 5302 order by id desc;
select * from crm_layouts where crm_configuration_id = 356 order by id desc;
select * from stages where crm_configuration_id = 356 order by id desc;
select * from playbooks where team_id = 260 order by id desc; # 4 (2 deleted)
select * from groups where team_id = 260 order by id desc; # 27 groups, (2 deleted)
select * from playbook_layouts where playbook_id IN (1410,1409,1276,1254); # 4
select ce.* from calendars c
join users u on c.user_id = u.id
join calendar_events ce on c.id = ce.calendar_id
where u.team_id = 260
and (ce.start_time > '2025-02-21 00:00:00')
;
# calendar events 1207
#
select * from opportunities where team_id = 260;
SELECT * FROM crm_field_data WHERE object_id = 4696496;
select * from activities where crm_configuration_id = 356 and crm_provider_id IS NOT NULL;
select * from activities where crm_configuration_id IN (221) and provider NOT IN ('ms-teams', 'uploader', 'zoom-bot')
# and type = 'conference' and status = 'scheduled' and activities.is_internal = 0
and created_at > '2024-03-01 00:00:00'
order by id desc; # 880 000, ringcentral, avaya
SELECT * FROM participants WHERE activity_id = 26371744;
# all activities 942 000 +
# conference 7385 - scheduled 984 - external 343
select * from activities where id = 26321812;
select * from participants where activity_id = 26321812;
select * from participants where activity_id in (26414510,26414514,26414516,26414604,26414653,26414655);
select * from leads where id in (720428,689175,731546,645866,621037);
select * from users where id = 13841;
select * from opportunities where user_id = 9541;
select * from stages where id = 15900;
select * from accounts where
# id IN (4160055,5053725,4965303,4896434)
id in (4584518,3249934,3218025,3891133,3399450,4172999,4485161,3101785,4587203,3070816,2870343,2870341,3563940,4550846,3424464,3249963,2870342)
;
select * from activities where id = 26654935;
SELECT * FROM opportunities WHERE id = 4803458;
SELECT * FROM opportunities where team_id = 260 and user_id = 13841 AND stage_id = 15900;
SELECT id, uuid, provider, type, lead_id, account_id, contact_id, opportunity_id, stage_id, status, recording_state, title, actual_start_time, actual_end_time
FROM activities WHERE user_id = 13841 AND opportunity_id IN (4729783, 4731717, 4731726, 4732064, 4732849, 4803458, 4813213);
SELECT DISTINCT
o.id, o.stage_id, s.name, a.title,
a.*
FROM activities a
# INNER JOIN tracks t ON a.id = t.activity_id
INNER JOIN users u ON a.user_id = u.id
INNER JOIN teams team ON u.team_id = team.id
INNER JOIN groups g ON u.group_id = g.id
INNER JOIN opportunities o ON a.opportunity_id = o.id
INNER JOIN stages s ON o.stage_id = s.id
WHERE
a.crm_configuration_id = 356
AND a.status IN ('completed', 'failed')
AND a.recording_state != 'stopped'
# and a.user_id = 13841
AND u.uuid = uuid_to_bin('6f40e4b8-c340-4059-b4ac-1728e87ea99e')
AND team.uuid = uuid_to_bin('a607fba7-452e-4683-b2af-00d6cb52c93c')
AND g.uuid = uuid_to_bin('b5d69e40-24a0-4c16-810b-5fa462299f94')
AND a.type IN ('softphone', 'softphone-inbound', 'conference', 'sms-inbound', 'sms-outbound')
# AND t.type IN ('audio', 'video')
AND (
(a.actual_start_time BETWEEN '2025-03-13 00:00:00' AND '2025-03-18 07:59:59')
OR
(
a.actual_start_time IS NULL
AND a.type IN ('sms-outbound', 'sms-inbound')
AND a.created_at BETWEEN '2025-03-13 00:00:00' AND '2025-03-18 07:59:59'
)
)
AND (
a.is_private = 0
OR (
a.is_private = 1
AND u.uuid = uuid_to_bin('6f40e4b8-c340-4059-b4ac-1728e87ea99e')
)
)
AND (
# s.id = 15900
s.uuid = uuid_to_bin('04ca1c26-c666-4268-a129-419c0acffd73')
OR s.uuid IS NULL -- Include records without opportunity stage
)
ORDER BY a.actual_end_time DESC;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Lead Forensics%'; # 190, 162, 8474, [EMAIL]
SELECT * FROM users WHERE team_id = 190;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 190
and sa.provider = 'hubspot';
select * from role_user where user_id = 8474;
select * from crm_configurations where provider = 'bullhorn';
SELECT * FROM opportunities WHERE uuid_to_bin('94578249-65ec-4205-90f2-7d1a7d5ab64a') = uuid;
SELECT * FROM users WHERE uuid_to_bin('26dbadeb-926f-4150-b11b-771b9d4c2f9a') = uuid;
SELECT * FROM opportunities WHERE id = 4732493;
select * from activities where opportunity_id = 4732493;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE id = 443; # 358, 14315, [EMAIL]
SELECT * FROM opportunities WHERE team_id = 443;
SELECT a.id, a.type, a.user_id, a.status, a.deleted_at, u.name, u.email, u.team_id as activity_team_id, u.status, u.deleted_at, t.name, t.status, s.team_id as stage_team_id
FROM activities AS a
JOIN stages AS s ON a.stage_id = s.id
JOIN users AS u ON u.id = a.user_id
JOIN teams AS t ON t.id = s.team_id
WHERE u.team_id <> s.team_id and t.id > 135;
SELECT
crm_configuration_id,
crm_provider_id,
COUNT(*) as duplicate_count,
GROUP_CONCAT(id) as stage_ids,
GROUP_CONCAT(name) as stage_names
FROM stages
GROUP BY crm_configuration_id, crm_provider_id
HAVING COUNT(*) > 1
ORDER BY duplicate_count DESC;
select * from stages where id IN (14898,14907);
select * from business_processes;
SELECT *
FROM crm_configurations
WHERE team_id IN (
SELECT team_id
FROM crm_configurations
GROUP BY team_id
HAVING COUNT(*) > 1
)
ORDER BY team_id;
SELECT *
FROM teams
WHERE crm_id IN (
SELECT crm_id
FROM teams
GROUP BY crm_id
HAVING COUNT(*) > 1
)
ORDER BY crm_id;
# [PASSWORD_DOTS]
select * from crm_configurations where provider = 'integration-app';
SELECT * FROM teams WHERE id = 443; # Correre Naturale 358 14315 [EMAIL]
select * from activities where crm_configuration_id = 358 order by actual_end_time desc;
select id, uuid, actual_end_time, crm_provider_id, is_internal, playbook_category_id, type, user_id, lead_id, contact_id, account_id, opportunity_id, status, title from activities where crm_configuration_id = 358 order by actual_end_time desc;
select * from team_features where team_id = 358;
select * from activity_summary_logs;
select * from teams where id = 406;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Sportfive%'; # 267, 202, 14637, [EMAIL]
select * from activities where crm_configuration_id = 202 order by actual_end_time desc;
SELECT * FROM users where id = 14637;
SELECT * FROM teams where id = 267;
SELECT * FROM groups where id = 1118;
select g.name, a.title, uuid_from_bin(a.uuid), a.external_id, a.status, a.recording_state, a.recording_reason_code, a.scheduled_start_time, a.scheduled_end_time, a.actual_start_time, a.actual_end_time from activities a
inner join users u on u.id = a.user_id
inner join groups g on g.id = u.group_id
where a.crm_configuration_id = 202
and a.is_internal = 0
and (a.scheduled_start_time between '2025-03-19 00:00:00' and '2025-03-21 00:00:00')
and a.type = 'conference'
and a.status != 'completed'
and a.external_id is not null
order by a.scheduled_start_time desc;
SELECT * FROM activities
WHERE crm_configuration_id = 202
AND status IN ('completed', 'failed')
AND recording_state != 'stopped'
AND type IN ('softphone', 'softphone-inbound', 'conference', 'sms-inbound', 'sms-outbound')
AND (is_private = 0 OR user_id = 14637)
AND (
(
actual_start_time BETWEEN '2025-03-12 12:00:00' AND '2025-03-24 11:59:59'
) OR (
actual_start_time IS NULL
AND type IN ('sms-outbound', 'sms-inbound')
AND created_at BETWEEN '2025-03-12 12:00:00' AND '2025-03-24 11:59:59'
)
)
AND NOT EXISTS (
SELECT 1
FROM tracks
WHERE
tracks.activity_id = activities.id
AND tracks.type IN ('audio', 'video')
)
ORDER BY actual_end_time DESC;
SELECT DISTINCT
a.*
FROM activities a
INNER JOIN tracks t ON a.id = t.activity_id
INNER JOIN users u ON a.user_id = u.id
INNER JOIN teams team ON u.team_id = team.id
WHERE
a.crm_configuration_id = 202
AND a.status IN ('completed', 'failed')
AND a.recording_state != 'stopped'
# and a.user_id = 14637
AND a.type IN ('softphone', 'softphone-inbound', 'conference', 'sms-inbound', 'sms-outbound')
# AND t.type IN ('audio', 'video')
AND (
(a.actual_start_time BETWEEN '2025-03-12 12:00:00' AND '2025-03-24 11:59:59')
OR
(
a.actual_start_time IS NULL
AND a.type IN ('sms-outbound', 'sms-inbound')
AND a.created_at BETWEEN '2025-03-12 12:00:00' AND '2025-03-24 11:59:59'
)
)
AND (
a.is_private = 0
OR (
a.is_private = 1
AND a.user_id = 14637
)
)
ORDER BY a.actual_end_time DESC
;
SELECT DISTINCT a.*
FROM activities a
INNER JOIN users u ON a.user_id = u.id
INNER JOIN teams t ON u.team_id = t.id
# INNER JOIN tracks tr ON a.id = tr.activity_id
# INNER JOIN groups g ON u.group_id = g.id
WHERE 1=1
AND t.id = 267
# AND t.uuid = uuid_to_bin('aed4927b-f1ea-499e-94c3-83762fd233e8')
AND a.status IN ('completed', 'failed')
AND a.recording_state != 'stopped'
AND a.type IN ('softphone', 'softphone-inbound', 'conference', 'sms-inbound', 'sms-outbound')
# AND tr.type NOT IN ('audio', 'video')
AND (
a.is_private = 0
OR a.user_id = 14637
)
AND (
(a.actual_start_time BETWEEN '2025-03-19 00:00:00' AND '2025-03-21 23:59:59')
OR (
a.actual_start_time IS NULL
AND a.type IN ('sms-outbound', 'sms-inbound')
AND a.created_at BETWEEN '2025-03-19 00:00:00' AND '2025-03-21 23:59:59'
)
)
# and NOT EXISTS (
# SELECT 1
# FROM tracks t
# WHERE t.activity_id = a.id
# AND t.type IN ('audio', 'video')
# )
ORDER BY a.actual_end_time DESC;
SELECT * FROM tracks WHERE activity_id = 26485995;
select a.is_private, a.title, uuid_from_bin(a.uuid), a.external_id, a.status, a.recording_state, a.recording_reason_code, a.scheduled_start_time, a.scheduled_end_time, a.actual_start_time, a.actual_end_time from activities a
inner join users u on u.id = a.user_id
where a.crm_configuration_id = 202
# and a.is_internal = 0
and (a.actual_start_time between '2025-03-19 00:00:00' and '2025-03-21 00:00:00')
and a.type IN ("softphone","softphone-inbound","conference","sms-inbound")
and a.status IN ('completed', 'failed')
# and a.external_id is not null
order by a.actual_end_time desc;
select * from activities a where a.crm_configuration_id = 202
and a.actual_start_time between '2025-03-20 00:00:00' and '2025-03-21 00:00:00'
# AND a.type IN ('softphone', 'softphone-inbound', 'conference', 'sms-inbound', 'sms-outbound')
select g.name, a.title, uuid_from_bin(a.uuid), a.external_id, a.status, a.recording_state, a.recording_reason_code, a.scheduled_start_time, a.scheduled_end_time, a.actual_start_time, a.actual_end_time from activities a
inner join users u on u.id = a.user_id
inner join groups g on g.id = u.group_id
where a.crm_configuration_id = 202
and a.is_internal = 0
and (a.scheduled_start_time between '2025-03-19 00:00:00' and '2025-03-21 00:00:00')
and a.type = 'conference'
and a.status != 'completed'
and a.external_id is not null
order by a.scheduled_start_time desc;
SELECT * FROM teams WHERE name LIKE '%Tourlane%';
SELECT * FROM crm_fields WHERE crm_configuration_id = 209 and object_type = 'opportunity';
SELECT * FROM crm_field_data WHERE crm_field_id = 98809;
select * from users where status = 1 AND timezone = 'MDT';
select * from opportunities where id = 3769814;
select * from deal_risks where opportunity_id = 3769814;
select cp.* from crm_profiles cp
join users u on cp.user_id = u.id
join crm_configurations crm on cp.crm_configuration_id = crm.id
where crm.provider = 'hubspot' AND u.status = 1 AND log_notes != 'none';
select * from crm_fields where id = 154575;
select * from team_features where feature = 'SUPPORTS_SYNC_MISSING_CALL_DISPOSITIONS';
SELECT * FROM teams WHERE id = 176; # crm 148
select * from activities where crm_configuration_id = 148 and provider = 'hubspot' order by id desc;
select * from activity_providers where provider = 'amazon-connect';
select * from crm_fields cf
join crm_configurations crm on crm.id = cf.crm_configuration_id
where crm.provider = 'hubspot' and cf.object_type IN ('account', 'contact');
# [PASSWORD_DOTS]
SELECT * FROM users WHERE id IN (15415, 15418);
SELECT * FROM groups WHERE id IN (1805,1806);
SELECT * FROM playbooks WHERE id = 1860;
SELECT * FROM playbook_categories WHERE id = 38634;
SELECT * FROM crm_fields WHERE id = 189962;
SELECT * FROM teams WHERE name = 'Pulsar Group'; # 472, 380, 15138 [EMAIL]
SELECT * FROM crm_profiles WHERE user_id = 15415;
SELECT * FROM social_accounts WHERE sociable_id = 15415 and provider = 'salesforce';
select * from sidekick_settings where team_id = 472;
SELECT * FROM activities WHERE uuid_to_bin('452c58c7-b87c-4fdd-953e-d7af185e9588') = uuid; # 28617536, user: 15418
SELECT * FROM activities WHERE uuid_to_bin('399114ee-d3a8-458c-bff5-5f654658db0a') = uuid; # 28344407, user: 15415
SELECT * FROM activities WHERE uuid_to_bin('f0aa567f-0ab1-4bbb-96aa-37dcf184676b') = uuid; # 28580288, user: 15415
SELECT * FROM activities WHERE uuid_to_bin('50c086b1-2770-4bca-b5ae-6bac22ec426b') = uuid; # 28566069, user: 15415
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%TeamTailor%'; # 109, 218, 13969, [EMAIL]
select * from crm_configurations where id = 218;
SELECT * FROM activities WHERE uuid_to_bin('e39b5857-7fdb-4f5a-951a-8d3ca69bb1b0') = uuid; # 28338765
SELECT * FROM users WHERE id IN (13232, 13230);
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 109
and sa.provider = 'salesforce';
0057R00000EPL5HQAX Inez Ekblad
1091cb81-5ea1-4951-a0ed-f00b568f0140 Triman Kaur
SELECT * FROM crm_profiles WHERE user_id IN (13232, 13230);
############################################################################################
SELECT * FROM activities WHERE uuid_to_bin('675eeaeb-5681-42db-90bc-54c07a604408') = uuid; # 28655939 00UVg00000FLvnSMAT
SELECT * FROM crm_field_data WHERE activity_id = 28655939;
SELECT * FROM crm_fields WHERE id IN (94491,94493,94498);
SELECT * FROM users WHERE id = 13658;
SELECT * FROM teams WHERE id = 109;
SELECT * FROM crm_configurations WHERE id = 218;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 109
and sa.provider = 'salesforce';
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Strengthscope%'; # 481, 390, 15420, [EMAIL]
SELECT * FROM stages WHERE crm_configuration_id = 390;
select * from business_processes where team_id = 481 and crm_configuration_id = 390;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 481
and sa.provider = 'salesforce';
SELECT * FROM users WHERE id = 15780; # team 462
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 462
and sa.provider = 'hubspot';
select * from teams where id = 495;
SELECT * FROM users WHERE id = 15794;
select * from social_accounts where sociable_id = 15794;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Flight%'; # 427, 333, 13752
SELECT * FROM accounts WHERE team_id = 427 and crm_provider_id = '668731000183444517';
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Group GTI%'; # 495, 407, 15794
SELECT * FROM activities WHERE crm_configuration_id = 407
and status = 'completed' and type = 'conference'
order by id desc;
select ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id
join permission_role pr on pr.role_id = ru.role_id
join permissions p on p.id = pr.permission_id
where team_id = 495 and p.name IN ('dial');
select * from permission_role;
select * from activities where crm_configuration_id = 407 and status = 'completed' order by id desc;
SELECT * FROM activities WHERE id = 29512773;
SELECT * FROM activities WHERE id IN (29042721,28991325,29002874);
SELECT al.* from activity_summary_logs al join activities a on a.id = al.activity_id
where a.crm_configuration_id = 407
# and a.id IN (29042721,28991325,29002874);
SELECT * FROM users WHERE id = 15794;
SELECT * FROM users WHERE team_id = 495;
SELECT * FROM social_accounts WHERE sociable_id = 15794;
SELECT * FROM opportunities WHERE team_id = 495 and name like '%OC:%';
SELECT * FROM contacts WHERE team_id = 495;
SELECT * FROM leads WHERE team_id = 495;
SELECT * FROM accounts WHERE team_id = 495;
SELECT * FROM crm_profiles WHERE crm_configuration_id = 407;
SELECT * FROM crm_fields WHERE crm_configuration_id = 407;
SELECT * FROM crm_configurations WHERE id = 407;
SELECT * FROM opportunities WHERE team_id = 495 and close_date BETWEEN '2025-06-01' AND '2025-07-01'
and user_id IS NOT NULL and is_closed = 1 and is_won = 1;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Hamilton Court FX LLP%'; # 249, 187, 10103
SELECT * FROM activities WHERE uuid_to_bin('4659c2bb-9a49-484e-9327-a3d66f1e028c') = uuid; # 28951064
SELECT * FROM crm_fields WHERE crm_configuration_id = 187 and object_type IN ('tasks', 'event');
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Checkstep%'; # 325, 256, 11753
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 325
and sa.provider = 'hubspot';
SELECT * FROM activities WHERE uuid_to_bin('7be372e2-1916-4d79-a2f3-ca3db1346db3') = uuid; # 28611085
SELECT * FROM activities WHERE uuid_to_bin('980f0336-840b-4185-a5a9-30cf8b0749a8') = uuid; # 28719733
SELECT * FROM activity_summary_logs where activity_id = 28719733;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Learning%'; # 260, 356, 9444
SELECT * FROM activity_summary_logs where sent_at BETWEEN '2025-06-09 11:38:00' AND '2025-06-09 11:40:00';
SELECT * FROM leads WHERE crm_configuration_id = 356 and crm_provider_id = '230045001502770504'; # 823630
select * from activities where crm_configuration_id = 356 and lead_id = 841732;
SELECT * from activity_summary_logs al join activities a on a.id = al.activity_id
where a.crm_configuration_id = 356;
select * from activities where crm_configuration_id = 356
and actual_end_time between '2025-06-09 11:00:00' and '2025-06-09 12:00:00'
order by id desc;
select * from accounts where crm_configuration_id = 356 and crm_provider_id = '230045001514403366' order by id desc;
select * from leads where crm_configuration_id = 356 and crm_provider_id = '230045001514275654' order by id desc;
select * from contacts where crm_configuration_id = 356 and crm_provider_id = '230045001514403366' order by id desc;
select * from opportunities where crm_configuration_id = 356 and crm_provider_id = '230045001514403366' order by id desc;
select * from team_features where team_id = 260;
select * from features where id IN (1,2,4,6,18,19,20,9,10,3,23,24,25,26,27);
SELECT * FROM activities WHERE uuid_to_bin('7be372e2-1916-4d79-a2f3-ca3db1346db3') = uuid;
select * from crm_fields;
select * from crm_layout_entities;
SELECT * FROM teams WHERE name LIKE '%Optable%';
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Teamtailor%'; # 109, 218, 13969
SELECT * FROM crm_configurations WHERE id = 218;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 109
and sa.provider = 'salesforce';
SELECT * FROM activities WHERE uuid_to_bin('675eeaeb-5681-42db-90bc-54c07a604408') = uuid; # 28655939
SELECT * FROM crm_field_data WHERE activity_id = 28655939;
SELECT * FROM crm_fields WHERE id in (94491,94493,94498);
select * from teams where crm_id IS NULL;
SELECT * FROM activities WHERE uuid_to_bin('71aa8a0c-9652-4ff6-bee7-d98ae60abef6') = uuid;
# [PASSWORD_DOTS]
select * from team_domains where team_id = 399;
SELECT * FROM teams WHERE name LIKE '%Rydoo%'; # 399, 318, 13207
select * from calendar_events where id = 5163781;
SELECT * FROM activities WHERE uuid_to_bin('be2cbc52-7fda-46a0-9ae0-25d9553eafc0') = uuid; # 29443896
SELECT * FROM participants WHERE activity_id = 29443896;
select * from contacts where crm_configuration_id = 318 and email = '[EMAIL]';
select * from leads where crm_configuration_id = 318 and email = '[EMAIL]';
select * from activities where user_id = 14937 order by created_at ;
select * from users where id = 14937;
select * from contacts where crm_configuration_id = 318 and email LIKE '%@strawberry.se';
select * from opportunities where crm_configuration_id = 318 and crm_provider_id = '006Sf00000D1WOAIA3';
select * from activities a join participants p on a.id = p.activity_id
where crm_configuration_id = 318 and a.updated_at > '2025-06-23T08:18:43Z';
# [PASSWORD_DOTS]
SELECT * FROM opportunities WHERE team_id = 379 and crm_provider_id = '39334518886';
SELECT * FROM opportunities WHERE team_id = 379 order by id desc;
SELECT * FROM teams WHERE id = 379;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 379 and sociable_id = 13852
and sa.provider = 'hubspot';
SELECT * FROM crm_configurations WHERE id = 307;
SELECT * FROM crm_layouts WHERE crm_configuration_id = 307;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 1027;
SELECT * FROM crm_fields WHERE crm_configuration_id = 307
and id IN (144750,144855,145158,155227);
SELECT * FROM activities;
select * from activities
where created_at > '2025-07-01 00:00:00'
# and created_at < '2025-08-01 00:00:00'
and type not in ('email-outbound', 'email-inbound')
and account_id is null
and contact_id is null
and lead_id is null
and opportunity_id is not null
;
SELECT * FROM activities WHERE id IN (25344155, 25344296, 25501909, 28692187);
SELECT * FROM crm_configurations WHERE id in (335,301,200);
select * from crm_fields where crm_configuration_id = 230 and crm_provider_id = 'Age2__c';
SELECT * FROM teams WHERE name LIKE '%Resights%';
select * from crm_fields where crm_configuration_id = 1 and object_type = 'opportunity';
select * from crm_configurations where provider = 'bullhorn'; # 344
select * from teams where id IN (442);
select * from activities
where crm_configuration_id = 177
and provider = 'amazon-connect'
order by id desc;
# and source <> 'gong';
select * from activity_providers where provider = 'amazon-connect';
SELECT * FROM activities WHERE uuid_to_bin('cec1993b-a7e5-4164-b74d-d680ea51d2f2') = uuid;
select * from crm_configurations where store_transcript = 1;
SELECT * FROM teams WHERE id IN (80);
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Sedna%'; # 277, 213, 12594
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 277
and sa.provider = 'salesforce';
select * from activities where crm_configuration_id = 213 and account_id = 2511502;
select * from crm_configurations where id = 213;
SELECT * FROM activities WHERE uuid_to_bin('35aa790a-8569-4544-8268-66f9a4a26804') = uuid; # 33981604
SELECT * FROM participants WHERE activity_id = 33981604;
SELECT * FROM crm_fields WHERE crm_configuration_id = 337 and object_type = 'task';
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 431
and sa.provider = 'salesforce';
SELECT * FROM activities WHERE uuid_to_bin('b5476c7d-19a8-491b-869d-676ea1e857b6') = uuid; # 33997223
select * from activity_summary_logs where activity_id = 33997223;
select * from activity_notes where activity_id =...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Tests passed: 7","depth":3,"bounds":{"left":0.95079786,"top":0.12849163,"width":0.032247342,"height":0.013567438},"value":"Tests passed: 7","help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"bounds":{"left":0.95079786,"top":0.12849163,"width":0.032247342,"height":0.013567438},"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.12732713,"height":0.025538707},"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"bounds":{"left":0.796875,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"TrackAutomatedReportGeneratedEventTest","depth":6,"bounds":{"left":0.8121675,"top":0.019952115,"width":0.103390954,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'TrackAutomatedReportGeneratedEventTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'TrackAutomatedReportGeneratedEventTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9381649,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96609044,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9773936,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9886968,"top":0.019952115,"width":0.011303186,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"1","depth":4,"bounds":{"left":0.36103722,"top":0.273743,"width":0.00731383,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.37034574,"top":0.273743,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"bounds":{"left":0.38031915,"top":0.273743,"width":0.00731383,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.38929522,"top":0.27214685,"width":0.00731383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.39660904,"top":0.27214685,"width":0.006981383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Listeners\\AutomatedReports\\UserPilot;\n\nuse GuzzleHttp\\Exception\\GuzzleException;\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\nuse Illuminate\\Queue\\InteractsWithQueue;\nuse Jiminny\\Component\\Queue\\Constants;\nuse Jiminny\\Events\\AutomatedReports\\AutomatedReportGenerated;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\Contracts\\UserContract;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Jiminny\\Services\\UserPilot\\UserPilotClient;\n\nclass TrackAutomatedReportGeneratedEvent implements ShouldQueue\n{\n use InteractsWithQueue;\n\n private const string EVENT_NAME_AUTOMATED_REPORT = 'automated-report-generated';\n private const string EVENT_NAME_ASK_JIMINNY_REPORT = 'ask-jiminny-report-generated';\n\n public string $queue = Constants::QUEUE_DELAYABLE;\n\n public function __construct(\n private readonly UserPilotClient $userPilotClient,\n private readonly AutomatedReportsService $automatedReportsService,\n ) {\n }\n\n public function handle(AutomatedReportGenerated $event): void\n {\n if (config('services.userpilot.token') === null) {\n return;\n }\n\n $automatedReport = $event->automatedReport;\n $payload = $this->buildPayload($automatedReport);\n\n $eventName = $this->resolveEventName($automatedReport);\n\n try {\n foreach ($this->resolveUsers($automatedReport) as $user) {\n $this->userPilotClient->track($user, $eventName, $payload);\n }\n } catch (GuzzleException $e) {\n $this->release(3600);\n }\n }\n\n /**\n * @return array<UserContract>\n */\n private function resolveUsers(AutomatedReport $automatedReport): array\n {\n if ($automatedReport->isAskJiminnyReport()) {\n $creator = $automatedReport->getCreator();\n\n return $creator !== null ? [$creator] : [];\n }\n\n return $this->automatedReportsService->getRecipientUserObjects($automatedReport);\n }\n\n private function buildPayload(AutomatedReport $automatedReport): array\n {\n return [\n 'report_type' => $automatedReport->getType(),\n 'frequency' => $automatedReport->getFrequency(),\n ];\n }\n\n private function resolveEventName(AutomatedReport $automatedReport): string\n {\n if ($automatedReport->isAskJiminnyReport()) {\n return self::EVENT_NAME_ASK_JIMINNY_REPORT;\n }\n\n return self::EVENT_NAME_AUTOMATED_REPORT;\n }\n}","depth":4,"bounds":{"left":0.13597074,"top":0.27055067,"width":0.26728722,"height":0.72944933},"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Listeners\\AutomatedReports\\UserPilot;\n\nuse GuzzleHttp\\Exception\\GuzzleException;\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\nuse Illuminate\\Queue\\InteractsWithQueue;\nuse Jiminny\\Component\\Queue\\Constants;\nuse Jiminny\\Events\\AutomatedReports\\AutomatedReportGenerated;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\Contracts\\UserContract;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Jiminny\\Services\\UserPilot\\UserPilotClient;\n\nclass TrackAutomatedReportGeneratedEvent implements ShouldQueue\n{\n use InteractsWithQueue;\n\n private const string EVENT_NAME_AUTOMATED_REPORT = 'automated-report-generated';\n private const string EVENT_NAME_ASK_JIMINNY_REPORT = 'ask-jiminny-report-generated';\n\n public string $queue = Constants::QUEUE_DELAYABLE;\n\n public function __construct(\n private readonly UserPilotClient $userPilotClient,\n private readonly AutomatedReportsService $automatedReportsService,\n ) {\n }\n\n public function handle(AutomatedReportGenerated $event): void\n {\n if (config('services.userpilot.token') === null) {\n return;\n }\n\n $automatedReport = $event->automatedReport;\n $payload = $this->buildPayload($automatedReport);\n\n $eventName = $this->resolveEventName($automatedReport);\n\n try {\n foreach ($this->resolveUsers($automatedReport) as $user) {\n $this->userPilotClient->track($user, $eventName, $payload);\n }\n } catch (GuzzleException $e) {\n $this->release(3600);\n }\n }\n\n /**\n * @return array<UserContract>\n */\n private function resolveUsers(AutomatedReport $automatedReport): array\n {\n if ($automatedReport->isAskJiminnyReport()) {\n $creator = $automatedReport->getCreator();\n\n return $creator !== null ? [$creator] : [];\n }\n\n return $this->automatedReportsService->getRecipientUserObjects($automatedReport);\n }\n\n private function buildPayload(AutomatedReport $automatedReport): array\n {\n return [\n 'report_type' => $automatedReport->getType(),\n 'frequency' => $automatedReport->getFrequency(),\n ];\n }\n\n private function resolveEventName(AutomatedReport $automatedReport): string\n {\n if ($automatedReport->isAskJiminnyReport()) {\n return self::EVENT_NAME_ASK_JIMINNY_REPORT;\n }\n\n return self::EVENT_NAME_AUTOMATED_REPORT;\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"bounds":{"left":0.40492022,"top":0.09896249,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"bounds":{"left":0.41356382,"top":0.09896249,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"bounds":{"left":0.4245346,"top":0.09896249,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"bounds":{"left":0.4331782,"top":0.09896249,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"bounds":{"left":0.4418218,"top":0.09896249,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"bounds":{"left":0.45279256,"top":0.09896249,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"bounds":{"left":0.4637633,"top":0.09896249,"width":0.024268618,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"bounds":{"left":0.49035904,"top":0.09896249,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"bounds":{"left":0.5013298,"top":0.09896249,"width":0.029587766,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"bounds":{"left":0.69913566,"top":0.09896249,"width":0.02825798,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"27","depth":4,"bounds":{"left":0.6565825,"top":0.123703115,"width":0.009973404,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"9","depth":4,"bounds":{"left":0.66855055,"top":0.123703115,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"23","depth":4,"bounds":{"left":0.67852396,"top":0.123703115,"width":0.010305851,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"3","depth":4,"bounds":{"left":0.69082445,"top":0.123703115,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"105","depth":4,"bounds":{"left":0.70079786,"top":0.123703115,"width":0.011968086,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.7144282,"top":0.12210695,"width":0.00731383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.72174203,"top":0.12210695,"width":0.006981383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT * FROM team_features where team_id = 1;\n\nSELECT * FROM teams WHERE name LIKE '%Vixio%'; # 340,270,11922\nSELECT * FROM users WHERE team_id = 340; # 12015\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 340\nand sa.provider = 'salesforce';\n# and sa.provider = 'salesloft';\n\nselect * from crm_fields where crm_configuration_id = 270 and object_type = 'event';\n# 125558 - Event Type - Event_Type__c\n# 125552 - Event Status - Event_Status__c\n\nSELECT * FROM sidekick_settings WHERE team_id = 340;\n\nSELECT * FROM crm_field_values WHERE crm_field_id in (125552);\n\nselect * from activities where crm_configuration_id = 270\nand type = 'conference' and crm_provider_id IS NOT NULL\nand actual_start_time > '2024-09-16 09:00:00' order by scheduled_start_time;\n\nSELECT * FROM activities WHERE id = 20871677;\nSELECT * FROM crm_field_data WHERE activity_id = 20871677;\n\nselect * from crm_layouts where crm_configuration_id = 270;\nselect * from crm_layout_entities where crm_layout_id in (886,887);\n\nSELECT * FROM crm_configurations WHERE id = 270;\n\nselect * from playbooks where team_id = 340; # 1514\nselect * from groups where team_id = 340;\nSELECT * FROM crm_fields WHERE id IN (125393, 125401);\n\nselect g.name as 'team name', p.name as 'playbook name', f.label as 'activity type field' from groups g\njoin playbooks p on g.playbook_id = p.id\njoin crm_fields f on p.activity_field_id = f.id\nwhere g.team_id = 340;\n\nSELECT * FROM activities WHERE uuid_to_bin('0c180357-67d2-419e-a8c3-b832a3490770') = uuid; # 20448716\nselect * from crm_field_data where object_id = 20448716;\n\nselect * from activities where crm_configuration_id = 270 and provider = 'salesloft' order by id desc;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%CybSafe%'; # 343,273,12008\nselect * from opportunities where team_id = 343;\nselect * from opportunities where team_id = 343 and crm_provider_id = '18099102526';\nselect * from opportunities where team_id = 343 and account_id = 945217482;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 343\nand sa.provider = 'hubspot';\n\nselect * from accounts where team_id = 343 order by name asc;\n\nselect * from stages where crm_configuration_id = 273 and type = 'opportunity';\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Voyado%'; # 353,283,12143\nSELECT * FROM activities WHERE crm_configuration_id = 283 and account_id = 3777844 order by id desc;\nSELECT * FROM accounts WHERE team_id = 353 AND name LIKE '%Salesloft%';\nSELECT * FROM activities WHERE id = 20717903;\n\nselect * from participants where activity_id IN (20929172,20928605,20928468,20926272,20926271,20926270,20926269,20916499,20916454,20916436,20916435,20900015,20900014,20900013,20897312,20897243,20897241,20897237,20897232,20897229,20893648,20893231,20893230,20893229,20893228,20889784,20885039,20885038,20885037,20885036,20885035,20882728,20882708,20882703,20882702,20869828,20869811,20869806,20869801,20869799,20869798,20869796,20869795,20869794,20869761,20869760,20869759,20868688,20868687,20850340,20847195,20841710,20833967,20827021,20825307,20825305,20825297,20824615,20824400,20823927,20821760,20795588,20794233,20794057,20793710,20785811,20781789,20781394,20781307,20762651,20758453,20758282,20757323,20756643,20756636,20756629,20756627,20756606,20756605,20756604,20756603,20756602,20756600,20756599,20756598,20756595,20756594,20756589,20756587,20756577,20756573,20748918,20748386,20748385,20748384,20748383,20748382,20748381,20748380,20748379,20748377,20748375,20748373,20743301,20717905,20717904,20717903,20717901,20717899);\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 353\nand sa.provider = 'salesforce';\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%modern world business solutions%'; # 345,275,12016, l.atkinson@mwbsolutions.co.uk\nSELECT * FROM activities WHERE uuid_to_bin('3921d399-3fef-4609-a291-b0097a166d43') = uuid;\n# id: 20940638, user: 12022, contact: 5305871\nSELECT * FROM activity_summary_logs WHERE activity_id = 20940638;\nselect * from contacts where team_id = 345 and crm_provider_id = '30891432415' order by name asc; # 5305871\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 345\nand sa.provider = 'hubspot';\n\nselect * from users where team_id = 345 and id = 12022;\nSELECT * FROM crm_profiles WHERE user_id = 12022;\nSELECT * FROM participants WHERE activity_id = 20940638;\nSELECT * FROM users u\nJOIN crm_profiles cp ON u.id = cp.user_id\nWHERE u.team_id = 345;\n\nselect * from contacts where team_id = 345 and crm_provider_id = '30880813535' order by name desc; # 5305871\n\nselect * from team_features where team_id = 345;\nSELECT * FROM activities WHERE uuid_to_bin('11701e2d-2f82-4dab-a616-1db4fad238df') = uuid; # 21115197\nSELECT * FROM participants WHERE activity_id = 20897406;\n\n\n\nSELECT * FROM activities WHERE uuid_to_bin('63ba55cd-1abc-447d-83da-0137000005b7') = uuid; # 20953912\nSELECT * FROM activities WHERE crm_configuration_id = 275 and provider = 'ringcentral' and title like '%1252629100%';\n\n\nSELECT * FROM activities WHERE id = 20946641;\nSELECT * FROM crm_profiles WHERE user_id = 10211;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Lunio%'; # 120,97,10984, triger@lunio.ai\nSELECT * FROM opportunities WHERE crm_configuration_id = 97 and crm_provider_id = '006N1000006c5PpIAI';\nselect * from stages where crm_configuration_id = 97 and type = 'opportunity';\nselect * from opportunities where team_id = 120;\n\n\nselect * from crm_configurations crm join teams t on crm.id = t.crm_id\nwhere 1=1\nAND t.current_billing_plan IS NOT NULL\nAND crm.auto_sync_activity = 0\nand crm.provider = 'hubspot';\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Exclaimer%'; # 270,205,10053,james.lewendon@exclaimer.com\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 270\nand sa.provider = 'salesforce';\nSELECT * FROM activities WHERE uuid_to_bin('b54df794-2a9a-4957-8d80-09a600ead5f8') = uuid; # 21637956\nSELECT * FROM crm_profiles WHERE user_id = 11446;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Cygnetise%'; # 372,300,12554, alex.chikly@cygnetise.com\nselect * from playbooks where team_id = 372;\nselect * from crm_fields where crm_configuration_id = 300 and object_type = 'event'; # 141340\nSELECT * FROM crm_field_values WHERE crm_field_id = 141340;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 372\nand sa.provider = 'salesforce';\n\nselect * from crm_profiles where crm_configuration_id = 300;\nSELECT * FROM crm_configurations WHERE team_id = 372;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Planday%'; # 291,242,11501,mfa@planday.com\nSELECT * FROM opportunities WHERE team_id = 291 and crm_provider_id = '006bG000005DO86QAG'; # 3207756\nselect * from crm_field_data where object_id = 3207756;\nSELECT * FROM crm_fields WHERE id = 111834;\n\nselect f.id, f.crm_provider_id AS field_name, f.label, fd.object_id AS dealId, fd.value\nFROM crm_fields f\nJOIN crm_field_data fd ON f.id = fd.crm_field_id\nWHERE f.crm_configuration_id = 242\nAND f.object_type = 'opportunity'\nAND fd.object_id IN (3207756)\nORDER BY fd.object_id, fd.updated_at;\n\nSELECT * FROM crm_configurations WHERE auto_connect = 1;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Tour%'; # 187,209,8150,salesforce-admin@tourlane.com\nselect * from group_deal_risk_types drgt join groups g on drgt.group_id = g.id\nwhere g.team_id = 187;\n\nselect * from `groups` where team_id = 187;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 187\nand sa.provider = 'salesforce';\n\n# Destination - 98870 - Destination__c\n# Stage - 79014 - StageName\n# Land Arrangement - 98856 - Land_Arrangement__c\n# Flight - 98848 - Flight__c\n# Last activity date - 98812 - LastActivityDate\n# Last modified date - 98809 - LastModifiedDate\n# Last inbound mail timestamp - 99151 - Last_Inbound_Mail_Timestamp__c\n# next call - 98864 - Next_Call__c\n\nselect * from crm_fields where crm_configuration_id = 209 and object_type = 'opportunity';\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 209;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 682;\n\nselect * from opportunities where team_id = 187 and name LIKE'%Muriel Sal%';\nselect * from opportunities where team_id = 187 and user_id = 9951 and is_closed = 0;\nselect * from activities where opportunity_id = 3538248;\n\nSELECT * FROM crm_profiles WHERE user_id = 8150;\n\nselect * from deal_risks where opportunity_id = 3538248;\n\nselect * from teams where crm_id IS NULL;\n\nSELECT opp.id AS opportunity_id,\n u.group_id AS group_id,\n MAX(\n CASE\n WHEN a.type IN (\"sms-inbound\", \"sms-outbound\") THEN a.created_at\n ELSE a.actual_end_time\n END) as last_date\nFROM opportunities opp\nleft join activities a on a.opportunity_id = opp.id\ninner join users u on opp.user_id = u.id\nwhere opp.user_id IN (9951)\n\nAND opp.is_closed = 0\nand a.status IN ('completed', 'received', 'delivered') OR a.status IS NULL\ngroup by opp.id;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Cybsafe%'; # 343,301,12008,polly.morphew@cybsafe.com\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 343\nand sa.provider = 'hubspot';\n\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 301;\nSELECT * FROM contacts WHERE id = 6612363;\nSELECT * FROM accounts WHERE id = 4235676;\nSELECT * FROM opportunities WHERE crm_configuration_id = 301 and crm_provider_id = 32983784868;\nselect * from opportunity_stages where opportunity_id = 4503759;\n# SELECT * FROM opportunities WHERE id = 4569937;\n\nselect * from activities where crm_configuration_id = 301;\nSELECT * FROM activities WHERE uuid_to_bin('d3b2b28b-c3d0-4c2d-8ed0-eef42855278a') = uuid; # 26330370\nSELECT * FROM participants WHERE activity_id = 26330370;\n\nSELECT * FROM teams WHERE id = 375;\nselect * from playbooks where team_id = 375;\n\nselect * from stages where crm_configuration_id = 301 and type = 'opportunity';\n\nselect * from teams;\nselect * from contact_roles;\n\nSELECT * FROM opportunities WHERE team_id = 343 and user_id = 12871 and close_date >= '2024-11-01';\n\nselect * from users u join crm_profiles cp on cp.user_id = u.id where u.team_id = 343;\n\nSELECT * FROM crm_field_data WHERE object_id = 3771706;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 343\nand sa.provider = 'hubspot';\n\nSELECT * FROM crm_fields WHERE crm_configuration_id = 301 and object_type = 'opportunity'\nand crm_provider_id LIKE \"%traffic_light%\";\nSELECT * FROM crm_field_values WHERE crm_field_id IN (144020,144048,144111,144113,144126,144481,144508,144531);\n\nSELECT fd.* FROM opportunities o\nJOIN crm_field_data fd ON o.id = fd.object_id\nWHERE o.team_id = 343\n# and o.user_id IS NOT NULL\nand fd.crm_field_id IN (144020,144048,144111,144113,144126,144481,144508,144531)\nand fd.value != ''\norder by value desc\n# group by o.id\n;\n\nSELECT * FROM opportunities WHERE id = 3769843;\n\nSELECT * FROM teams WHERE name LIKE '%Tour%'; # 187,209,8150, salesforce-admin@tourlane.com\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 209;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 682;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Funding Circle%'; # 220,177,8603,aswini.mishra@fundingcircle.com\nSELECT * FROM activities WHERE uuid_to_bin('7a40e99b-3b37-4bb1-b983-325b81801c01') = uuid; # 23139839\n\n\nSELECT * FROM opportunities WHERE id = 3855992;\n\nSELECT * FROM users WHERE name LIKE '%Angus Pollard%'; # 8988\n\nSELECT * FROM teams WHERE name LIKE '%Story Terrace%'; # 379, 307, 12894\nSELECT * FROM crm_fields WHERE crm_configuration_id = 307 and object_type != 'opportunity';\n\nselect * from contacts where team_id = 379 and name like '%bebro%'; # 5874411, crm: 77229348507\nSELECT * FROM crm_field_data WHERE object_id = 5874411;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 379\nand sa.provider = 'hubspot';\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%mentio%'; # 117, 94, 6371, nikhil.kumar@mention-me.com\nSELECT * FROM activities WHERE uuid_to_bin('82939311-1af0-4506-8546-21e8d1fdf2c1') = uuid;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Tourlane%'; # 187, 209, 8150, salesforce-admin@tourlane.com\nSELECT * FROM opportunities WHERE team_id = 187 and crm_provider_id = '006Se000008xfvNIAQ'; # 3537793\nselect * from generic_ai_prompts where subject_id = 3537793;\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Lunio%'; # 120, 97, 10984, triger@lunio.ai\nSELECT * FROM crm_configurations WHERE id = 97;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 97;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 355;\nSELECT * FROM crm_fields WHERE id = 32682;\n\nselect cfd.value, o.* from opportunities o\njoin crm_field_data cfd on o.id = cfd.object_id and cfd.crm_field_id = 32682\nwhere team_id = 120\nand cfd.value != ''\n;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 120\nand sa.provider = 'salesforce';\n\nselect * from opportunities where team_id = 120 and crm_provider_id = '006N1000007X8MAIA0';\nSELECT * FROM crm_field_data WHERE object_id = 2313439;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE id = 410;\nSELECT * FROM teams WHERE name LIKE '%Local Business Oxford%';\nselect * from scorecards where team_id = 410;\nselect * from scorecard_rules;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Funding%'; # 220, 177, 8603, aswini.mishra@fundingcircle.com\nselect * from activities a\njoin opportunities o on a.opportunity_id = o.id\njoin users u on o.user_id = u.id\nwhere a.crm_configuration_id = 177 and a.type LIKE '%email-out%'\n# and a.actual_end_time > '2024-12-16 00:00:00'\n# and o.remotely_created_at > '2024-12-01 00:00:00'\n# and u.group_id = 1014\nand u.id = 9021\norder by a.id desc;\nSELECT * FROM opportunities WHERE id in (3981384,4017346);\nSELECT * FROM users WHERE team_id = 220 and id IN (8775, 11435);\n\nselect * from users where id = 9021;\nselect * from inboxes where user_id = 9021;\n\nselect * from inbox_emails where inbox_id = 1349 and email_date > '2024-12-18 00:00:00';\n\nselect * from email_messages where team_id = 220\nand orig_date > '2024-12-16 00:00:00' and orig_date < '2024-12-19 00:00:00'\nand subject LIKE '%Personal%'\n# and 'from' = 'credit@fundingcircle.com'\n;\n\nselect * from activities a\njoin opportunities o on a.opportunity_id = o.id\nwhere a.user_id = 9021 and a.type LIKE '%email-out%'\nand a.actual_end_time > '2024-12-18 00:00:00'\nand o.user_id IS NOT NULL\nand o.remotely_created_at > '2024-12-01 00:00:00'\norder by a.id desc;\n\nSELECT * FROM opportunities WHERE team_id = 220 and name LIKE '%Right Car move Limited%' and id = 3966852;\nselect * from activities where crm_configuration_id = 177 and type LIKE '%email%' and opportunity_id = 3966852 order by id desc;\n\nselect * from team_settings where name IN ('useCloseDate');\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Hurree%'; # 104, 81, 6175, jfarrell@hurree.co\nSELECT * FROM opportunities WHERE team_id = 104 and name = 'PropOp';\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 104\nand sa.provider = 'hubspot';\n\nselect * from crm_configurations where last_synced_at > '2025-01-19 01:00:00'\nselect * from teams where crm_id IS NULL;\n\nselect t.name as 'team', u.name as 'owner', u.email, u.phone\nfrom teams t\njoin activity_providers ap on t.id = ap.team_id\njoin users u on t.owner_id = u.id\nwhere 1=1\n and t.status = 'active'\n and ap.is_enabled = 1\n# and u.status = 1\n and ap.provider = 'ms-teams';\n\nselect * from crm_configurations where provider = 'bullhorn'; # 344\nSELECT * FROM teams WHERE id = 442; # 14293\nselect * from users where team_id = 442;\nselect * from social_accounts sa where sa.sociable_id = 14293;\nselect * from invitations where team_id = 442;\n\n# ********************************************************************************************************\nSELECT * FROM users WHERE email LIKE '%nea.liikamaa@eletive.com%'; # 14022\nSELECT * FROM teams WHERE id = 429;\nselect * from opportunities where team_id = 429 and crm_provider_id IN (16157415775, 22246219645);\nselect * from activities where opportunity_id in (4340436,4353519);\n\nselect * from transcription where activity_id IN (25630961,25381771);\nselect * from generic_ai_prompts where subject_id IN (4353519);\n\nSELECT\n a.id as activity_id,\n a.opportunity_id,\n a.type as activity_type,\n a.language,\n CONCAT(a.title, a.description) AS mail_content,\n e.from AS mail_from,\n e.to AS mail_to,\n e.subject AS mail_subject,\n e.body AS mail_body,\n p.type as prompt_type,\n p.status as prompt_status,\n p.content AS prompt_content,\n a.actual_start_time as created_at\nFROM activities a\n LEFT JOIN ai_prompts p ON a.transcription_id = p.transcription_id AND p.deleted_at IS NULL\n LEFT JOIN email_messages e ON a.id = e.activity_id\nWHERE a.actual_start_time > '2024-01-01 00:00:00'\n AND a.opportunity_id IN (4353519)\n AND a.status IN ('completed', 'received', 'delivered')\n AND a.deleted_at IS NULL\n AND a.type NOT IN ('sms-inbound', 'sms-outbound')\nORDER BY a.opportunity_id ASC, a.id ASC;\n\nSELECT * FROM users WHERE name LIKE '%George Fierstone%'; # 14293\nSELECT * FROM teams WHERE id = 442;\nSELECT * FROM crm_configurations WHERE id = 344;\nselect * from team_features where team_id = 442;\nselect * from groups where team_id = 442;\nselect * from playbooks where team_id = 442;\nselect * from playbook_categories where playbook_id = 1729;\nselect * from crm_fields where crm_configuration_id = 344 and id = 172024;\nSELECT * FROM crm_field_values WHERE crm_field_id = 172024;\nselect * from crm_layouts where crm_configuration_id = 344;\nselect * from playbook_layouts where playbook_id = 1729;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Learning%'; # 260, 221, 9444\n\nselect s.*\n# , s.sent_at, u.name, a.*\nfrom activity_summary_logs s\ninner join activities a on a.id = s.activity_id\ninner join users u on u.id = a.user_id\nwhere a.crm_configuration_id = 356\nand s.sent_at > date_sub(now(), interval 60 day)\norder by a.actual_end_time desc;\n\nselect * from activities a\n# inner join activity_summary_logs s on s.activity_id = a.id\nwhere a.crm_configuration_id = 356 and a.actual_end_time > date_sub(now(), interval 60 day)\n# and a.crm_provider_id is not null\n# and provider <> 'ringcentral'\nand status = 'completed'\norder by a.actual_end_time desc;\n\nselect * from teams order by id desc; # 17328, 32, 17830, integration-account@jiminny.com\nSELECT * FROM users;\nSELECT * FROM users where team_id = 260 and status = 1; # 201 - 150 active\nSELECT * FROM teams WHERE id = 260;\nselect * from team_settings where team_id = 260;\nselect * from crm_configurations where team_id = 260;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 356;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 1184;\n\nselect * from accounts where crm_configuration_id = 221 order by id desc; # 7000\nselect * from leads where crm_configuration_id = 221 order by id desc; # 0\nselect * from contacts where crm_configuration_id = 221 order by id desc; # 200 000\nselect * from opportunities where crm_configuration_id = 221 order by id desc; # 0\nselect * from crm_profiles where crm_configuration_id = 221 order by id desc; # 23\nselect * from crm_fields where crm_configuration_id = 221;\nselect * from crm_field_values where crm_field_id = 5302 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 221 order by id desc;\nselect * from stages where crm_configuration_id = 221 order by id desc;\n\nselect * from accounts where crm_configuration_id = 356 order by id desc; # 7000\nselect * from leads where crm_configuration_id = 356 order by id desc; # 0\nselect * from contacts where crm_configuration_id = 356 order by id desc; # 200 000\nselect * from opportunities where crm_configuration_id = 356 order by id desc; # 0\nselect * from crm_profiles where crm_configuration_id = 356 order by id desc; # 23\nselect * from crm_fields where crm_configuration_id = 356;\nselect * from crm_field_values where crm_field_id = 5302 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 356 order by id desc;\nselect * from stages where crm_configuration_id = 356 order by id desc;\n\nselect * from playbooks where team_id = 260 order by id desc; # 4 (2 deleted)\nselect * from groups where team_id = 260 order by id desc; # 27 groups, (2 deleted)\nselect * from playbook_layouts where playbook_id IN (1410,1409,1276,1254); # 4\nselect ce.* from calendars c\njoin users u on c.user_id = u.id\njoin calendar_events ce on c.id = ce.calendar_id\nwhere u.team_id = 260\nand (ce.start_time > '2025-02-21 00:00:00')\n;\n# calendar events 1207\n#\n\nselect * from opportunities where team_id = 260;\nSELECT * FROM crm_field_data WHERE object_id = 4696496;\n\nselect * from activities where crm_configuration_id = 356 and crm_provider_id IS NOT NULL;\nselect * from activities where crm_configuration_id IN (221) and provider NOT IN ('ms-teams', 'uploader', 'zoom-bot')\n# and type = 'conference' and status = 'scheduled' and activities.is_internal = 0\nand created_at > '2024-03-01 00:00:00'\norder by id desc; # 880 000, ringcentral, avaya\nSELECT * FROM participants WHERE activity_id = 26371744;\n\n# all activities 942 000 +\n# conference 7385 - scheduled 984 - external 343\n\nselect * from activities where id = 26321812;\nselect * from participants where activity_id = 26321812;\nselect * from participants where activity_id in (26414510,26414514,26414516,26414604,26414653,26414655);\nselect * from leads where id in (720428,689175,731546,645866,621037);\n\nselect * from users where id = 13841;\nselect * from opportunities where user_id = 9541;\nselect * from stages where id = 15900;\n\nselect * from accounts where\n# id IN (4160055,5053725,4965303,4896434)\nid in (4584518,3249934,3218025,3891133,3399450,4172999,4485161,3101785,4587203,3070816,2870343,2870341,3563940,4550846,3424464,3249963,2870342)\n;\n\nselect * from activities where id = 26654935;\nSELECT * FROM opportunities WHERE id = 4803458;\n\nSELECT * FROM opportunities where team_id = 260 and user_id = 13841 AND stage_id = 15900;\nSELECT id, uuid, provider, type, lead_id, account_id, contact_id, opportunity_id, stage_id, status, recording_state, title, actual_start_time, actual_end_time\nFROM activities WHERE user_id = 13841 AND opportunity_id IN (4729783, 4731717, 4731726, 4732064, 4732849, 4803458, 4813213);\n\nSELECT DISTINCT\n o.id, o.stage_id, s.name, a.title,\n a.*\nFROM activities a\n# INNER JOIN tracks t ON a.id = t.activity_id\nINNER JOIN users u ON a.user_id = u.id\nINNER JOIN teams team ON u.team_id = team.id\nINNER JOIN groups g ON u.group_id = g.id\nINNER JOIN opportunities o ON a.opportunity_id = o.id\nINNER JOIN stages s ON o.stage_id = s.id\nWHERE\n a.crm_configuration_id = 356\n AND a.status IN ('completed', 'failed')\n AND a.recording_state != 'stopped'\n# and a.user_id = 13841\n AND u.uuid = uuid_to_bin('6f40e4b8-c340-4059-b4ac-1728e87ea99e')\n AND team.uuid = uuid_to_bin('a607fba7-452e-4683-b2af-00d6cb52c93c')\n AND g.uuid = uuid_to_bin('b5d69e40-24a0-4c16-810b-5fa462299f94')\n\n AND a.type IN ('softphone', 'softphone-inbound', 'conference', 'sms-inbound', 'sms-outbound')\n# AND t.type IN ('audio', 'video')\n AND (\n (a.actual_start_time BETWEEN '2025-03-13 00:00:00' AND '2025-03-18 07:59:59')\n OR\n (\n a.actual_start_time IS NULL\n AND a.type IN ('sms-outbound', 'sms-inbound')\n AND a.created_at BETWEEN '2025-03-13 00:00:00' AND '2025-03-18 07:59:59'\n )\n )\n AND (\n a.is_private = 0\n OR (\n a.is_private = 1\n AND u.uuid = uuid_to_bin('6f40e4b8-c340-4059-b4ac-1728e87ea99e')\n )\n )\n AND (\n# s.id = 15900\n s.uuid = uuid_to_bin('04ca1c26-c666-4268-a129-419c0acffd73')\n OR s.uuid IS NULL -- Include records without opportunity stage\n )\n\nORDER BY a.actual_end_time DESC;\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Lead Forensics%'; # 190, 162, 8474, willsc@leadforensics.com\nSELECT * FROM users WHERE team_id = 190;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 190\nand sa.provider = 'hubspot';\n\nselect * from role_user where user_id = 8474;\n\nselect * from crm_configurations where provider = 'bullhorn';\n\nSELECT * FROM opportunities WHERE uuid_to_bin('94578249-65ec-4205-90f2-7d1a7d5ab64a') = uuid;\nSELECT * FROM users WHERE uuid_to_bin('26dbadeb-926f-4150-b11b-771b9d4c2f9a') = uuid;\n\nSELECT * FROM opportunities WHERE id = 4732493;\nselect * from activities where opportunity_id = 4732493;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE id = 443; # 358, 14315, andrea.romano@correrenaturale.com\nSELECT * FROM opportunities WHERE team_id = 443;\n\nSELECT a.id, a.type, a.user_id, a.status, a.deleted_at, u.name, u.email, u.team_id as activity_team_id, u.status, u.deleted_at, t.name, t.status, s.team_id as stage_team_id\nFROM activities AS a\nJOIN stages AS s ON a.stage_id = s.id\nJOIN users AS u ON u.id = a.user_id\nJOIN teams AS t ON t.id = s.team_id\nWHERE u.team_id <> s.team_id and t.id > 135;\n\n\nSELECT\n crm_configuration_id,\n crm_provider_id,\n COUNT(*) as duplicate_count,\n GROUP_CONCAT(id) as stage_ids,\n GROUP_CONCAT(name) as stage_names\nFROM stages\nGROUP BY crm_configuration_id, crm_provider_id\nHAVING COUNT(*) > 1\nORDER BY duplicate_count DESC;\n\nselect * from stages where id IN (14898,14907);\n\nselect * from business_processes;\n\nSELECT *\nFROM crm_configurations\nWHERE team_id IN (\n SELECT team_id\n FROM crm_configurations\n GROUP BY team_id\n HAVING COUNT(*) > 1\n)\nORDER BY team_id;\n\nSELECT *\nFROM teams\nWHERE crm_id IN (\n SELECT crm_id\n FROM teams\n GROUP BY crm_id\n HAVING COUNT(*) > 1\n)\nORDER BY crm_id;\n\n# ***************************************************************************\nselect * from crm_configurations where provider = 'integration-app';\nSELECT * FROM teams WHERE id = 443; # Correre Naturale 358 14315 andrea.romano@correrenaturale.com\nselect * from activities where crm_configuration_id = 358 order by actual_end_time desc;\nselect id, uuid, actual_end_time, crm_provider_id, is_internal, playbook_category_id, type, user_id, lead_id, contact_id, account_id, opportunity_id, status, title from activities where crm_configuration_id = 358 order by actual_end_time desc;\nselect * from team_features where team_id = 358;\nselect * from activity_summary_logs;\n\nselect * from teams where id = 406;\n\n# ************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Sportfive%'; # 267, 202, 14637, srv.salesforce@sportfive.com\nselect * from activities where crm_configuration_id = 202 order by actual_end_time desc;\n\nSELECT * FROM users where id = 14637;\nSELECT * FROM teams where id = 267;\nSELECT * FROM groups where id = 1118;\n\nselect g.name, a.title, uuid_from_bin(a.uuid), a.external_id, a.status, a.recording_state, a.recording_reason_code, a.scheduled_start_time, a.scheduled_end_time, a.actual_start_time, a.actual_end_time from activities a\ninner join users u on u.id = a.user_id\ninner join groups g on g.id = u.group_id\nwhere a.crm_configuration_id = 202\nand a.is_internal = 0\nand (a.scheduled_start_time between '2025-03-19 00:00:00' and '2025-03-21 00:00:00')\nand a.type = 'conference'\nand a.status != 'completed'\nand a.external_id is not null\norder by a.scheduled_start_time desc;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 202\n AND status IN ('completed', 'failed')\n AND recording_state != 'stopped'\n AND type IN ('softphone', 'softphone-inbound', 'conference', 'sms-inbound', 'sms-outbound')\n AND (is_private = 0 OR user_id = 14637)\n AND (\n (\n actual_start_time BETWEEN '2025-03-12 12:00:00' AND '2025-03-24 11:59:59'\n ) OR (\n actual_start_time IS NULL\n AND type IN ('sms-outbound', 'sms-inbound')\n AND created_at BETWEEN '2025-03-12 12:00:00' AND '2025-03-24 11:59:59'\n )\n )\n AND NOT EXISTS (\n SELECT 1\n FROM tracks\n WHERE\n tracks.activity_id = activities.id\n AND tracks.type IN ('audio', 'video')\n )\nORDER BY actual_end_time DESC;\n\nSELECT DISTINCT\n a.*\nFROM activities a\nINNER JOIN tracks t ON a.id = t.activity_id\nINNER JOIN users u ON a.user_id = u.id\nINNER JOIN teams team ON u.team_id = team.id\nWHERE\n a.crm_configuration_id = 202\n AND a.status IN ('completed', 'failed')\n AND a.recording_state != 'stopped'\n# and a.user_id = 14637\n AND a.type IN ('softphone', 'softphone-inbound', 'conference', 'sms-inbound', 'sms-outbound')\n# AND t.type IN ('audio', 'video')\n AND (\n (a.actual_start_time BETWEEN '2025-03-12 12:00:00' AND '2025-03-24 11:59:59')\n OR\n (\n a.actual_start_time IS NULL\n AND a.type IN ('sms-outbound', 'sms-inbound')\n AND a.created_at BETWEEN '2025-03-12 12:00:00' AND '2025-03-24 11:59:59'\n )\n )\n AND (\n a.is_private = 0\n OR (\n a.is_private = 1\n AND a.user_id = 14637\n )\n )\n\nORDER BY a.actual_end_time DESC\n;\n\nSELECT DISTINCT a.*\nFROM activities a\nINNER JOIN users u ON a.user_id = u.id\nINNER JOIN teams t ON u.team_id = t.id\n# INNER JOIN tracks tr ON a.id = tr.activity_id\n# INNER JOIN groups g ON u.group_id = g.id\nWHERE 1=1\n AND t.id = 267\n# AND t.uuid = uuid_to_bin('aed4927b-f1ea-499e-94c3-83762fd233e8')\n AND a.status IN ('completed', 'failed')\n AND a.recording_state != 'stopped'\n AND a.type IN ('softphone', 'softphone-inbound', 'conference', 'sms-inbound', 'sms-outbound')\n# AND tr.type NOT IN ('audio', 'video')\n AND (\n a.is_private = 0\n OR a.user_id = 14637\n )\n AND (\n (a.actual_start_time BETWEEN '2025-03-19 00:00:00' AND '2025-03-21 23:59:59')\n OR (\n a.actual_start_time IS NULL\n AND a.type IN ('sms-outbound', 'sms-inbound')\n AND a.created_at BETWEEN '2025-03-19 00:00:00' AND '2025-03-21 23:59:59'\n )\n )\n# and NOT EXISTS (\n# SELECT 1\n# FROM tracks t\n# WHERE t.activity_id = a.id\n# AND t.type IN ('audio', 'video')\n# )\n\nORDER BY a.actual_end_time DESC;\n\nSELECT * FROM tracks WHERE activity_id = 26485995;\n\nselect a.is_private, a.title, uuid_from_bin(a.uuid), a.external_id, a.status, a.recording_state, a.recording_reason_code, a.scheduled_start_time, a.scheduled_end_time, a.actual_start_time, a.actual_end_time from activities a\ninner join users u on u.id = a.user_id\nwhere a.crm_configuration_id = 202\n# and a.is_internal = 0\nand (a.actual_start_time between '2025-03-19 00:00:00' and '2025-03-21 00:00:00')\nand a.type IN (\"softphone\",\"softphone-inbound\",\"conference\",\"sms-inbound\")\nand a.status IN ('completed', 'failed')\n# and a.external_id is not null\norder by a.actual_end_time desc;\n\nselect * from activities a where a.crm_configuration_id = 202\nand a.actual_start_time between '2025-03-20 00:00:00' and '2025-03-21 00:00:00'\n# AND a.type IN ('softphone', 'softphone-inbound', 'conference', 'sms-inbound', 'sms-outbound')\n\nselect g.name, a.title, uuid_from_bin(a.uuid), a.external_id, a.status, a.recording_state, a.recording_reason_code, a.scheduled_start_time, a.scheduled_end_time, a.actual_start_time, a.actual_end_time from activities a\ninner join users u on u.id = a.user_id\ninner join groups g on g.id = u.group_id\nwhere a.crm_configuration_id = 202\nand a.is_internal = 0\nand (a.scheduled_start_time between '2025-03-19 00:00:00' and '2025-03-21 00:00:00')\nand a.type = 'conference'\nand a.status != 'completed'\nand a.external_id is not null\norder by a.scheduled_start_time desc;\n\nSELECT * FROM teams WHERE name LIKE '%Tourlane%';\nSELECT * FROM crm_fields WHERE crm_configuration_id = 209 and object_type = 'opportunity';\nSELECT * FROM crm_field_data WHERE crm_field_id = 98809;\n\nselect * from users where status = 1 AND timezone = 'MDT';\n\nselect * from opportunities where id = 3769814;\nselect * from deal_risks where opportunity_id = 3769814;\n\nselect cp.* from crm_profiles cp\njoin users u on cp.user_id = u.id\njoin crm_configurations crm on cp.crm_configuration_id = crm.id\nwhere crm.provider = 'hubspot' AND u.status = 1 AND log_notes != 'none';\n\nselect * from crm_fields where id = 154575;\n\nselect * from team_features where feature = 'SUPPORTS_SYNC_MISSING_CALL_DISPOSITIONS';\nSELECT * FROM teams WHERE id = 176; # crm 148\nselect * from activities where crm_configuration_id = 148 and provider = 'hubspot' order by id desc;\n\nselect * from activity_providers where provider = 'amazon-connect';\n\nselect * from crm_fields cf\njoin crm_configurations crm on crm.id = cf.crm_configuration_id\nwhere crm.provider = 'hubspot' and cf.object_type IN ('account', 'contact');\n\n# *********************************************************************************************\nSELECT * FROM users WHERE id IN (15415, 15418);\nSELECT * FROM groups WHERE id IN (1805,1806);\nSELECT * FROM playbooks WHERE id = 1860;\nSELECT * FROM playbook_categories WHERE id = 38634;\nSELECT * FROM crm_fields WHERE id = 189962;\n\nSELECT * FROM teams WHERE name = 'Pulsar Group'; # 472, 380, 15138 raza.gilani@vuelio.com\n\nSELECT * FROM crm_profiles WHERE user_id = 15415;\nSELECT * FROM social_accounts WHERE sociable_id = 15415 and provider = 'salesforce';\n\nselect * from sidekick_settings where team_id = 472;\n\nSELECT * FROM activities WHERE uuid_to_bin('452c58c7-b87c-4fdd-953e-d7af185e9588') = uuid; # 28617536, user: 15418\nSELECT * FROM activities WHERE uuid_to_bin('399114ee-d3a8-458c-bff5-5f654658db0a') = uuid; # 28344407, user: 15415\nSELECT * FROM activities WHERE uuid_to_bin('f0aa567f-0ab1-4bbb-96aa-37dcf184676b') = uuid; # 28580288, user: 15415\nSELECT * FROM activities WHERE uuid_to_bin('50c086b1-2770-4bca-b5ae-6bac22ec426b') = uuid; # 28566069, user: 15415\n\n# *********************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%TeamTailor%'; # 109, 218, 13969, salesforce-integrations@teamtailor.com\nselect * from crm_configurations where id = 218;\nSELECT * FROM activities WHERE uuid_to_bin('e39b5857-7fdb-4f5a-951a-8d3ca69bb1b0') = uuid; # 28338765\nSELECT * FROM users WHERE id IN (13232, 13230);\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 109\nand sa.provider = 'salesforce';\n\n0057R00000EPL5HQAX Inez Ekblad\n\n1091cb81-5ea1-4951-a0ed-f00b568f0140 Triman Kaur\n\nSELECT * FROM crm_profiles WHERE user_id IN (13232, 13230);\n\n############################################################################################\nSELECT * FROM activities WHERE uuid_to_bin('675eeaeb-5681-42db-90bc-54c07a604408') = uuid; # 28655939 00UVg00000FLvnSMAT\nSELECT * FROM crm_field_data WHERE activity_id = 28655939;\nSELECT * FROM crm_fields WHERE id IN (94491,94493,94498);\nSELECT * FROM users WHERE id = 13658;\nSELECT * FROM teams WHERE id = 109;\nSELECT * FROM crm_configurations WHERE id = 218;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 109\nand sa.provider = 'salesforce';\n\n# ********************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Strengthscope%'; # 481, 390, 15420, katy.holden@strengthscope.comk\nSELECT * FROM stages WHERE crm_configuration_id = 390;\nselect * from business_processes where team_id = 481 and crm_configuration_id = 390;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 481\nand sa.provider = 'salesforce';\n\n\nSELECT * FROM users WHERE id = 15780; # team 462\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 462\nand sa.provider = 'hubspot';\n\n\nselect * from teams where id = 495;\nSELECT * FROM users WHERE id = 15794;\nselect * from social_accounts where sociable_id = 15794;\n\n# ********************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Flight%'; # 427, 333, 13752\nSELECT * FROM accounts WHERE team_id = 427 and crm_provider_id = '668731000183444517';\n\n# ********************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Group GTI%'; # 495, 407, 15794\nSELECT * FROM activities WHERE crm_configuration_id = 407\nand status = 'completed' and type = 'conference'\norder by id desc;\n\nselect ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id\njoin permission_role pr on pr.role_id = ru.role_id\n join permissions p on p.id = pr.permission_id\nwhere team_id = 495 and p.name IN ('dial');\n\nselect * from permission_role;\n\nselect * from activities where crm_configuration_id = 407 and status = 'completed' order by id desc;\nSELECT * FROM activities WHERE id = 29512773;\nSELECT * FROM activities WHERE id IN (29042721,28991325,29002874);\n\nSELECT al.* from activity_summary_logs al join activities a on a.id = al.activity_id\nwhere a.crm_configuration_id = 407\n# and a.id IN (29042721,28991325,29002874);\n\nSELECT * FROM users WHERE id = 15794;\nSELECT * FROM users WHERE team_id = 495;\nSELECT * FROM social_accounts WHERE sociable_id = 15794;\nSELECT * FROM opportunities WHERE team_id = 495 and name like '%OC:%';\nSELECT * FROM contacts WHERE team_id = 495;\nSELECT * FROM leads WHERE team_id = 495;\nSELECT * FROM accounts WHERE team_id = 495;\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 407;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 407;\nSELECT * FROM crm_configurations WHERE id = 407;\nSELECT * FROM opportunities WHERE team_id = 495 and close_date BETWEEN '2025-06-01' AND '2025-07-01'\nand user_id IS NOT NULL and is_closed = 1 and is_won = 1;\n\n# ********************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Hamilton Court FX LLP%'; # 249, 187, 10103\nSELECT * FROM activities WHERE uuid_to_bin('4659c2bb-9a49-484e-9327-a3d66f1e028c') = uuid; # 28951064\nSELECT * FROM crm_fields WHERE crm_configuration_id = 187 and object_type IN ('tasks', 'event');\n\n# *********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Checkstep%'; # 325, 256, 11753\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 325\nand sa.provider = 'hubspot';\n\nSELECT * FROM activities WHERE uuid_to_bin('7be372e2-1916-4d79-a2f3-ca3db1346db3') = uuid; # 28611085\nSELECT * FROM activities WHERE uuid_to_bin('980f0336-840b-4185-a5a9-30cf8b0749a8') = uuid; # 28719733\nSELECT * FROM activity_summary_logs where activity_id = 28719733;\n\n# *************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Learning%'; # 260, 356, 9444\nSELECT * FROM activity_summary_logs where sent_at BETWEEN '2025-06-09 11:38:00' AND '2025-06-09 11:40:00';\nSELECT * FROM leads WHERE crm_configuration_id = 356 and crm_provider_id = '230045001502770504'; # 823630\nselect * from activities where crm_configuration_id = 356 and lead_id = 841732;\n\nSELECT * from activity_summary_logs al join activities a on a.id = al.activity_id\nwhere a.crm_configuration_id = 356;\n\nselect * from activities where crm_configuration_id = 356\nand actual_end_time between '2025-06-09 11:00:00' and '2025-06-09 12:00:00'\norder by id desc;\n\nselect * from accounts where crm_configuration_id = 356 and crm_provider_id = '230045001514403366' order by id desc;\nselect * from leads where crm_configuration_id = 356 and crm_provider_id = '230045001514275654' order by id desc;\nselect * from contacts where crm_configuration_id = 356 and crm_provider_id = '230045001514403366' order by id desc;\nselect * from opportunities where crm_configuration_id = 356 and crm_provider_id = '230045001514403366' order by id desc;\n\nselect * from team_features where team_id = 260;\nselect * from features where id IN (1,2,4,6,18,19,20,9,10,3,23,24,25,26,27);\n\nSELECT * FROM activities WHERE uuid_to_bin('7be372e2-1916-4d79-a2f3-ca3db1346db3') = uuid;\n\nselect * from crm_fields;\nselect * from crm_layout_entities;\n\nSELECT * FROM teams WHERE name LIKE '%Optable%';\n\n# *************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Teamtailor%'; # 109, 218, 13969\nSELECT * FROM crm_configurations WHERE id = 218;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 109\nand sa.provider = 'salesforce';\nSELECT * FROM activities WHERE uuid_to_bin('675eeaeb-5681-42db-90bc-54c07a604408') = uuid; # 28655939\nSELECT * FROM crm_field_data WHERE activity_id = 28655939;\nSELECT * FROM crm_fields WHERE id in (94491,94493,94498);\n\nselect * from teams where crm_id IS NULL;\n\nSELECT * FROM activities WHERE uuid_to_bin('71aa8a0c-9652-4ff6-bee7-d98ae60abef6') = uuid;\n\n# *************************************************************************************************\nselect * from team_domains where team_id = 399;\nSELECT * FROM teams WHERE name LIKE '%Rydoo%'; # 399, 318, 13207\n\nselect * from calendar_events where id = 5163781;\nSELECT * FROM activities WHERE uuid_to_bin('be2cbc52-7fda-46a0-9ae0-25d9553eafc0') = uuid; # 29443896\nSELECT * FROM participants WHERE activity_id = 29443896;\nselect * from contacts where crm_configuration_id = 318 and email = 'marianne.westeng@strawberry.no';\nselect * from leads where crm_configuration_id = 318 and email = 'marianne.westeng@strawberry.no';\n\nselect * from activities where user_id = 14937 order by created_at ;\n\nselect * from users where id = 14937;\n\nselect * from contacts where crm_configuration_id = 318 and email LIKE '%@strawberry.se';\nselect * from opportunities where crm_configuration_id = 318 and crm_provider_id = '006Sf00000D1WOAIA3';\n\nselect * from activities a join participants p on a.id = p.activity_id\nwhere crm_configuration_id = 318 and a.updated_at > '2025-06-23T08:18:43Z';\n\n# *************************************************************************************************\nSELECT * FROM opportunities WHERE team_id = 379 and crm_provider_id = '39334518886';\nSELECT * FROM opportunities WHERE team_id = 379 order by id desc;\nSELECT * FROM teams WHERE id = 379;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 379 and sociable_id = 13852\nand sa.provider = 'hubspot';\n\nSELECT * FROM crm_configurations WHERE id = 307;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 307;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 1027;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 307\n and id IN (144750,144855,145158,155227);\n\nSELECT * FROM activities;\n\n\nselect * from activities\nwhere created_at > '2025-07-01 00:00:00'\n# and created_at < '2025-08-01 00:00:00'\nand type not in ('email-outbound', 'email-inbound')\nand account_id is null\nand contact_id is null\nand lead_id is null\nand opportunity_id is not null\n;\nSELECT * FROM activities WHERE id IN (25344155, 25344296, 25501909, 28692187);\nSELECT * FROM crm_configurations WHERE id in (335,301,200);\n\nselect * from crm_fields where crm_configuration_id = 230 and crm_provider_id = 'Age2__c';\n\nSELECT * FROM teams WHERE name LIKE '%Resights%';\nselect * from crm_fields where crm_configuration_id = 1 and object_type = 'opportunity';\n\nselect * from crm_configurations where provider = 'bullhorn'; # 344\nselect * from teams where id IN (442);\n\nselect * from activities\nwhere crm_configuration_id = 177\nand provider = 'amazon-connect'\n order by id desc;\n# and source <> 'gong';\n\nselect * from activity_providers where provider = 'amazon-connect';\n\nSELECT * FROM activities WHERE uuid_to_bin('cec1993b-a7e5-4164-b74d-d680ea51d2f2') = uuid;\n\n\nselect * from crm_configurations where store_transcript = 1;\nSELECT * FROM teams WHERE id IN (80);\n\n# *************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Sedna%'; # 277, 213, 12594\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 277\nand sa.provider = 'salesforce';\n\nselect * from activities where crm_configuration_id = 213 and account_id = 2511502;\n\nselect * from crm_configurations where id = 213;\n\nSELECT * FROM activities WHERE uuid_to_bin('35aa790a-8569-4544-8268-66f9a4a26804') = uuid; # 33981604\nSELECT * FROM participants WHERE activity_id = 33981604;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 337 and object_type = 'task';\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 431\nand sa.provider = 'salesforce';\nSELECT * FROM activities WHERE uuid_to_bin('b5476c7d-19a8-491b-869d-676ea1e857b6') = uuid; # 33997223\nselect * from activity_summary_logs where activity_id = 33997223;\nselect * from activity_notes where activity_id = 33997223;\n\n# ***********************************\nSELECT * FROM teams WHERE name LIKE '%Abode%';\n\n\nselect * from features;\nselect * from teams t\nwhere t.status = 'active'\nand id NOT IN (select team_id from team_features where feature_id = 9)\n;\n\n\nselect * from playbook_layouts where playbook_id = 1725;\nSELECT * FROM activities WHERE uuid_to_bin('65cc283c-4849-49e6-927f-4c281c8fea19') = uuid; # 34297473\nselect * from teams where id = 318;\nselect * from crm_configurations where team_id = 318;\nselect * from playbooks where team_id = 318;\nSELECT * FROM crm_layouts where crm_configuration_id = 381;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 1259;\nSELECT * FROM crm_fields WHERE id IN (192938,192936,192939);\n\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 1266;\nSELECT * FROM crm_fields WHERE id IN (192980,192991,192997,192998,193064,193067);\n\nSELECT * FROM activities WHERE uuid_to_bin('a902289b-285c-48eb-9cc2-6ad6c5d938f5') = uuid; # 34297533\n\n\n\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 927;\nSELECT * FROM crm_fields WHERE id IN (131668,131669,131670,131671,131676,131797);\n\nSELECT * FROM teams WHERE name LIKE '%Peripass%'; # 351, 281, 12124\nselect * from crm_layouts where crm_configuration_id = 281;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 927;\nselect * from crm_fields where crm_configuration_id = 281 and id in (131668,131669,131670,131671,131676,131797);\nselect * from opportunities where crm_configuration_id = 281;\n\nSELECT * FROM activities WHERE id IN (34211315, 34130075);\nSELECT * FROM crm_field_data WHERE object_id IN (34211315, 34130075);\n\nselect cf.crm_configuration_id, cle.crm_layout_id, cle.id, cf.id from crm_field_data cfd\njoin crm_layout_entities cle on cle.id = cfd.crm_layout_entity_id\njoin crm_fields cf on cle.crm_field_id = cf.id\nwhere cf.deleted_at IS NOT NULL\nGROUP BY cle.id, cf.id;\n\nselect * from crm_layouts where id IN (355);\nselect u.email, t.crm_id, t.* from teams t\njoin users u on u.id = t.owner_id\nwhere crm_id IN (97);\n\nSELECT * FROM crm_fields WHERE id = 96492;\n\nselect * from permissions;\nselect * from permission_role where permission_id = 247;\nselect * from roles;\n\nselect * from migrations;\n# *****************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('291e3c21-11cc-4728-aee7-6e4bedf86d72') = uuid; # 34262174\nSELECT * FROM crm_configurations WHERE id = 301;\nSELECT * FROM teams WHERE id = 343;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 343\nand sa.provider = 'hubspot';\n\nselect * from participants where activity_id = 34262174;\n\nselect * from contacts where crm_configuration_id = 301 and id = 6976326;\nselect * from accounts where crm_configuration_id = 301 and id IN (4647626, 4815829); # 30761335403\n\nselect * from activity_summary_logs where activity_id = 34262174;\n\nselect * from users where status = 1 AND timezone = 'EST';\n\n# ****************************************************************************\nSELECT * FROM users WHERE id = 13869;\nSELECT * FROM crm_configurations WHERE id = 320;\nSELECT * FROM teams WHERE id = 401;\n\nSELECT * FROM activities WHERE uuid_to_bin('2228c16f-10be-48d5-90d4-67385219dc01') = uuid; # 29670601\n\nSELECT * FROM accounts WHERE id = 7761483;\nSELECT * FROM opportunities WHERE id = 6051814;\n\nSELECT * FROM teams WHERE name LIKE '%Seedlegals%';\n\n;select * from opportunities where updated_at > '2025-10-11' AND crm_provider_id = '34713761166';\n\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 177;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 577;\nSELECT * FROM crm_fields WHERE id IN (68458,68459,68480,68497,68524,68530,68554,68618,68662,68781,68810,68898,68981,69049,97467);\n\nSELECT t.id, crm.id, t.name, crm.sync_objects, crm.provider, crm.last_synced_at FROM crm_configurations crm join teams t on t.crm_id = crm.id\nwhere t.status = 'active' AND crm.provider = 'hubspot' AND crm.last_synced_at < '2025-10-22 00:00:00';\n\nSELECT * FROM activities WHERE uuid_to_bin('fa09449f-cba9-496a-b8f3-865cd3c72351') = uuid;\nSELECT * FROM crm_configurations where id = 184;\nSELECT * FROM teams WHERE id = 246;\nSELECT * FROM social_accounts WHERE sociable_id = 9259 and provider = 'hubspot';\n\nSELECT * FROM users WHERE email LIKE '%rhian.old@bud.co.uk%'; # 17700\nSELECT * FROM teams WHERE id = 551;\n\nSELECT * FROM crm_configurations WHERE id = 471;\nSELECT * FROM activities WHERE crm_configuration_id = 471 and crm_provider_id IS NOT NULL;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 471;\nSELECT * FROM crm_fields WHERE id = 307260;\nSELECT * FROM crm_field_values WHERE crm_field_id = 307260;\n\nselect * from crm_layouts where crm_configuration_id = 471;\n\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 1547;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 1548;\n\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 551 and sa.provider = 'hubspot';\n\nSELECT * FROM teams WHERE name LIKE '%$PCS%';\n\n# ********************************************************************************************************\nselect * from crm_configurations crm\njoin teams t on t.crm_id = crm.id\nwhere t.status = 'active'\nand crm.provider = 'hubspot';\n\n# $slug = 'HUBSPOT_WEBHOOK_SYNC';\n# $team = Jiminny\\Models\\Team::find(2);\n# $feature = Feature::query()->where('slug', $slug)->first();\n# TeamFeature::query()->create(['feature_id' => $feature->getId(),'team_id' => $team->getId()]);\n\n# hubspot_webhook_metrics\n\nselect * from crm_configurations where id = 331; # 416\nSELECT * FROM teams WHERE id = 416;\nSELECT * FROM opportunities WHERE team_id = 190;\n\nSELECT * FROM teams WHERE name LIKE '%Lead Forensics%';\nSELECT sa.id,\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 190 and sa.provider = 'hubspot';\n\n\n\nSELECT * FROM teams WHERE name LIKE '%Rapaport%'; # 431, 337\nSELECT * FROM teams where id = 431;\nSELECT * FROM crm_configurations where team_id = 431;\nSELECT * FROM activity_providers where team_id = 431;\nSELECT * FROM activities where crm_configuration_id = 337 and type IN ('softphone', 'softphone-outbound')\nand provider NOT IN ('hubspot', 'aircall')\n# and telephony_provider_id = '019c1131-a22f-4792-b9ea-20adf6a02ed0'\norder by id desc;\nSELECT sa.id,\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 431 and sa.provider = 'salesforce';\n\nSELECT * FROM teams WHERE name LIKE '%BiP%'; # 401, 320\nSELECT * FROM teams where id = 401;\nSELECT * FROM crm_configurations where team_id = 401;\nSELECT * FROM activity_providers where team_id = 401;\nSELECT * FROM activities where crm_configuration_id = 320 and type IN ('softphone', 'softphone-outbound')\nand provider NOT IN ('hubspot', 'aircall')\n# and telephony_provider_id = '019c1131-a22f-4792-b9ea-20adf6a02ed0'\norder by id desc;\nSELECT sa.id,\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 401 and sa.provider = 'salesforce';\n\n\n# ********************************************************************\nSELECT * FROM crm_configurations where id = 307; # 379 - Story Terrace Inc , portalId: 3921157\nSELECT * FROM contacts WHERE team_id = 379 and updated_at > '2026-01-31 11:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 379 and updated_at > '2026-02-01 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 379 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 379 and sa.provider = 'hubspot';\n\n# ********************************************************************\nSELECT * FROM crm_configurations where id = 485; # 563 - LATUS Group (ad94d501-5d09-44fd-878f-ca3a9f8865c3) , portalId: 3904501\nSELECT * FROM opportunities WHERE team_id = 563 and updated_at > '2026-02-02 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 563 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 338; # 432 - Formalize , portalId: 9214205\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 432 and sa.provider = 'hubspot';\nSELECT * FROM opportunities WHERE team_id = 432 and updated_at > '2026-02-02 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 432 and updated_at > '2026-02-10 00:00:00' order by updated_at desc;\n\n# ********************************************************************\nSELECT * FROM crm_configurations where id = 436; # 519 - Moxso , portalId: 25531989\nSELECT * FROM opportunities WHERE team_id = 519 and updated_at > '2026-02-02 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 519 and updated_at > '2026-02-04 11:00:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 96; # 119 - Nourish Care , portalId: 26617984\nSELECT * FROM opportunities WHERE team_id = 119 and updated_at > '2026-02-02 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 119 and updated_at > '2026-02-04 11:00:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 331; # 416 - The National College , portalId: 7213852\nSELECT * FROM opportunities WHERE team_id = 416 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 416 and updated_at > '2026-02-04 11:00:00' order by updated_at desc;\n\n# ********************************************************************\nSELECT * FROM crm_configurations where id = 308; # 380 - Foodles , portalId: 7723616\nSELECT * FROM opportunities WHERE team_id = 380 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 380 and updated_at > '2026-02-06 10:30:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 379; # 471 - imat-uve , portalId: 9177354\nSELECT * FROM opportunities WHERE team_id = 471 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 471 and updated_at > '2026-02-06 10:30:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 465; # 545 - Spotler , portalId: 144759271\nSELECT * FROM opportunities WHERE team_id = 545 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 545 and updated_at > '2026-02-06 10:30:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 455; # 537 - indevis , portalId: 25666868\nSELECT * FROM opportunities WHERE team_id = 537 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 537 and updated_at > '2026-02-06 10:30:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 200; # 265 - Jobadder , portalId: 6426676\nSELECT * FROM opportunities WHERE team_id = 265 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 265 and updated_at > '2026-02-06 10:30:00' order by updated_at desc;\n# ********************************************************************\nSELECT * FROM crm_configurations where id = 335; # 429 - Eletive , portalId: 6110563\nSELECT * FROM opportunities WHERE team_id = 429 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 429 and updated_at > '2026-02-09 10:30:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 363; # 456 - Global Group , portalId: 8901981\nSELECT * FROM opportunities WHERE team_id = 456 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 456 and updated_at > '2026-02-09 10:30:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 297; # 369 - Unbiased , portalId: 9229005\nSELECT * FROM opportunities WHERE team_id = 369 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 369 and updated_at > '2026-02-09 10:30:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 353; # 449 - Fuuse , portalId: 25781745\nSELECT * FROM opportunities WHERE team_id = 449 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 449 and updated_at > '2026-02-09 10:30:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 487; # 566 - Nimbus , portalId: 39982590\nSELECT * FROM opportunities WHERE team_id = 566 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 566 and updated_at > '2026-02-09 10:30:00' order by updated_at desc;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 487;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 1630;\nselect * from crm_fields where crm_configuration_id = 487 and\n(uuid_to_bin('4c6b2971-64d4-45b8-b377-427be758b5a5') = uuid or uuid_to_bin('59e368d8-65a0-4b77-b611-db37c99fbe68') = uuid);\nSELECT * FROM crm_field_values WHERE crm_field_id = 375177;\n# ********************************************************************\nSELECT * FROM crm_configurations where id = 420; # 506 - voiio , portalId: 145629154\nSELECT * FROM opportunities WHERE team_id = 506 and updated_at > '2026-02-10 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 506 and updated_at > '2026-02-10 15:00:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 479; # 558 - Momice , portalId: 535962\nSELECT * FROM opportunities WHERE team_id = 558 and updated_at > '2026-02-10 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 558 and updated_at > '2026-02-10 15:00:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 59; # 80 - Storyclash GmbH , portalId: 4268479\nSELECT * FROM opportunities WHERE team_id = 80 and updated_at > '2026-02-10 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 80 and updated_at > '2026-02-10 15:00:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 175; # 203 - Team iAM , portalId: 5534732\nSELECT * FROM opportunities WHERE team_id = 203 and updated_at > '2026-02-10 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 203 and updated_at > '2026-02-10 15:00:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 368; # 460 - OneTouch Health , portalId: 5534732183355\nSELECT * FROM opportunities WHERE team_id = 460 and updated_at > '2026-02-10 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 460 and updated_at > '2026-02-10 15:00:00' order by updated_at desc;\n\n\n\nselect * from users where id = 29643;\nSELECT * FROM crm_field_values WHERE crm_field_id = 375177;\n# ********************************************************************\nSELECT * FROM teams WHERE name LIKE '%Buynomics%'; # 462, 482, 14910\nSELECT * FROM activities WHERE crm_configuration_id = 482\nand type NOT IN ('email-inbound', 'email-outbound')\n# and description like '%The call focused on understanding Welch%'\norder by id desc;\n\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 462 and sa.provider = 'salesforce';\n\nselect * from contacts where crm_configuration_id = 482 and name = 'Cyndall Hill'; # 15504749\nselect * from contacts where id = 10891096; # 482\nSELECT * FROM activities WHERE crm_configuration_id = 482\nand type NOT IN ('email-inbound', 'email-outbound')\nand contact_id = 15504749\norder by id desc;\n\nselect * from activities where id = 36793003; # 96cc7bc1-8622-4d27-92f4-baf664fc1a56, 00UOf00000PDdOXMA1\nselect * from transcription where id = 7646782;\nselect * from ai_prompts where transcription_id = 7646782;\n\n# ********************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('7a8471a3-847e-4822-802b-ddf426bbc252') = uuid; # 37370018\nSELECT * FROM activity_summary_logs WHERE activity_id = 37370018;\nSELECT * FROM teams WHERE id = 555;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 555 and sa.provider = 'hubspot';\n\n# ********************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('7c17b8aa-09df-4f85-a0f7-51f47afd712d') = uuid; # 37395250\nSELECT * FROM activities WHERE uuid_to_bin('14d60388-260d-494b-aa0d-63fdb1c78026') = uuid; # 37395250\n\nSELECT a.* FROM activities a JOIN crm_configurations c on c.id = a.crm_configuration_id\nwhere a.type IN ('softphone', 'softphone-outbound') and c.provider = 'hubspot'\nand a.provider NOT IN ('hubspot')\n# and a.provider IN ('salesloft')\n# and c.id NOT IN (70)\n# and a.duration > 30\n# and actual_start_time > '2026-02-05 00:00:00'\norder by a.id desc;\n\nSELECT * FROM activities WHERE id = 37549787;\nSELECT * FROM crm_profiles WHERE user_id = 17613;\n\nSELECT * FROM crm_configurations WHERE id = 70;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 93 and sa.provider = 'hubspot';\n\nSELECT asf.activity_search_id, asf.id, asf.value\nFROM activity_search_filters asf\nWHERE asf.filter = 'group_id'\nAND asf.value IN (\n SELECT CONCAT(\n HEX(SUBSTR(uuid, 5, 4)), '-',\n HEX(SUBSTR(uuid, 3, 2)), '-',\n HEX(SUBSTR(uuid, 1, 2)), '-',\n HEX(SUBSTR(uuid, 9, 2)), '-',\n HEX(SUBSTR(uuid, 11))\n )\n FROM groups\n WHERE deleted_at IS NOT NULL\n);\n\nSELECT * FROM crm_configurations WHERE id = 373; # KPSBremen.de 465 # - no social account\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 465 and sa.provider = 'hubspot';\n\nselect * from crm_configurations where id = 494;\n\nSELECT * FROM teams WHERE name LIKE '%splose%'; # 572, 495, 18708\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 572 and sa.provider = 'pipedrive';\n\nselect * from opportunities where team_id = 572\n# and name like '%Onebright%'\n# and is_closed = 1 and is_won = 0\n order by id desc;\n\n\nselect * from users where deleted_at is null and status = 2;\n\nselect * from contacts where id = 17900517;\nselect * from accounts where id = 10109838;\nselect * from opportunities where id = 6955880;\n\nselect * from opportunity_contacts where opportunity_id = 6955880;\nselect * from opportunity_contacts where contact_id = 17900517;\n\nselect * from contact_roles cr join crm_configurations crm on cr.crm_configuration_id = crm.id\nwhere crm.provider != 'salesforce';\n\nSELECT * FROM activities WHERE uuid_to_bin('adcb8331-5988-4353-834e-383a355abba2') = uuid; # 38056424, crm 104659682404\nselect * from teams where id = 456;\nSELECT * FROM crm_configurations WHERE id = 363;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 456 and sa.provider = 'hubspot';\n\nselect * from crm_layouts where crm_configuration_id = 363;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id IN (1203, 1204, 1635);\nSELECT * FROM crm_fields WHERE id IN (181536, 181538, 213455);\n\nSELECT * FROM teams WHERE name LIKE '%Electric%'; # 342, 272, 12767\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 342 and sa.provider = 'pipedrive';\nSELECT * FROM opportunities WHERE crm_configuration_id = 272 and name like 'NORTHUMBRIA POL%'; # and updated_at > '2025-07-01 00:00:00';\nSELECT * FROM opportunities WHERE crm_configuration_id = 272 order by remotely_created_at asc; # and updated_at > '2025-07-01 00:00:00';\nSELECT * FROM opportunities WHERE crm_configuration_id = 272 and updated_at > '2026-01-01 00:00:00';\nSELECT * FROM crm_fields WHERE crm_configuration_id = 272 and object_type = 'opportunity';\nSELECT * FROM crm_field_values WHERE crm_field_id = 127164;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 342 and sa.provider = 'pipedrive';\n\nSELECT * FROM teams WHERE id = 472;\nSELECT * FROM crm_configurations WHERE id = 380;\nselect * from activities where id = 38285673; # 38285673\nSELECT * FROM users WHERE id = 16942;\nSELECT * FROM groups WHERE id = 1964;\nSELECT * FROM playbooks WHERE id = 2033;\n\nselect * from teams where created_at > '2026-03-09';\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 499; # 1065\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 1678;\n\nSELECT * FROM teams WHERE id = 575;\nselect * from opportunities where team_id = 575;\n\nSELECT * FROM activities WHERE uuid_to_bin('96b1261f-2357-49f9-ab38-23ce12008ea0') = uuid;\n\nselect * from contacts c\nwhere c.crm_configuration_id = 370 order by c.updated_at desc;\n\nSELECT * FROM participants where activity_id = 38833541;\nSELECT * FROM participants where activity_id = 39216301;\nSELECT * FROM activity_summary_logs where activity_id = 39216301;\nSELECT * FROM activities WHERE uuid_to_bin('c7d99fbe-1fb1-41f2-8f4d-52e2bf70e1e9') = uuid; # 38833541, crm 478116564181\nSELECT * FROM activities WHERE uuid_to_bin('2e6ff4d3-9faa-447a-a8c1-9acde4d885ae') = uuid; # 39216301, crm 480171536586\nselect * from crm_profiles where crm_configuration_id = 319 and crm_provider_id = 525785080;\nselect * from opportunities where crm_configuration_id = 319 and crm_provider_id = 410150124747;\nselect * from accounts where crm_configuration_id = 319 and crm_provider_id = 47150650569;\nselect * from contacts where crm_configuration_id = 319 and crm_provider_id IN ('665587441856', '742723347700');\n# owner 13236 525785080\n# contact 1 16779180 665587441856 - activity - Alex Howes alex@supportroom.com created 2026-01-26\n# contact 2 19247563 742723347700 - ash@supportroom.com 2026-03-24\n# company 4176133 47150650569\n# deal 7100953 410150124747\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 400 and sa.provider = 'hubspot';\n\nselect * from features;\nselect * from team_features where feature_id = 40;\n\nselect * from teams where id = 556; # owner: 18101, crm: 477\nselect * from crm_configurations where id = 477;\nSELECT * FROM users WHERE id = 18101;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 556 and sa.provider = 'integration-app';\n\nselect * from opportunities where id = 7594349;\nselect * from opportunity_stages where opportunity_id = 7594349 order by created_at desc;\nselect * from business_processes where id = 6024;\nselect * from business_process_stages where stage_id = 16352;\nselect * from business_process_stages where business_process_id = 6024;\nselect * from stages where team_id = 459;\nselect * from teams where id = 459;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 459 and sa.provider = 'hubspot';\n\nSELECT os.stage_id, s.crm_provider_id, s.name, COUNT(*) as cnt\nFROM opportunity_stages os\nJOIN stages s ON s.id = os.stage_id\nWHERE os.opportunity_id = 7594349\nGROUP BY os.stage_id, s.crm_provider_id, s.name\nORDER BY cnt DESC;\n\nSELECT s.id, s.crm_provider_id, s.name, s.team_id, s.crm_configuration_id\nFROM stages s\nJOIN business_process_stages bps ON bps.stage_id = s.id\nWHERE bps.business_process_id = 6024\nAND s.crm_provider_id = 'contractsent';\n\nselect * from stages where id IN (16352,20612,18281,7344,16378,16309,5036,15223,14535,6293,12098,11607)\n\nSELECT * FROM teams WHERE name LIKE '%Pulsar Group%'; # 472, 380, 15138, raza.gilani@vuelio.com\nselect * from playbooks where team_id = 472; # event 226147\nSELECT * FROM playbook_categories WHERE playbook_id = 2288;\nSELECT * FROM crm_fields WHERE id = 226147;\nSELECT * FROM crm_field_values WHERE crm_field_id = 226147;\n\nSELECT * FROM crm_configurations WHERE id = 380;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 472 and sa.provider = 'salesforce';","depth":4,"value":"SELECT * FROM team_features where team_id = 1;\n\nSELECT * FROM teams WHERE name LIKE '%Vixio%'; # 340,270,11922\nSELECT * FROM users WHERE team_id = 340; # 12015\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 340\nand sa.provider = 'salesforce';\n# and sa.provider = 'salesloft';\n\nselect * from crm_fields where crm_configuration_id = 270 and object_type = 'event';\n# 125558 - Event Type - Event_Type__c\n# 125552 - Event Status - Event_Status__c\n\nSELECT * FROM sidekick_settings WHERE team_id = 340;\n\nSELECT * FROM crm_field_values WHERE crm_field_id in (125552);\n\nselect * from activities where crm_configuration_id = 270\nand type = 'conference' and crm_provider_id IS NOT NULL\nand actual_start_time > '2024-09-16 09:00:00' order by scheduled_start_time;\n\nSELECT * FROM activities WHERE id = 20871677;\nSELECT * FROM crm_field_data WHERE activity_id = 20871677;\n\nselect * from crm_layouts where crm_configuration_id = 270;\nselect * from crm_layout_entities where crm_layout_id in (886,887);\n\nSELECT * FROM crm_configurations WHERE id = 270;\n\nselect * from playbooks where team_id = 340; # 1514\nselect * from groups where team_id = 340;\nSELECT * FROM crm_fields WHERE id IN (125393, 125401);\n\nselect g.name as 'team name', p.name as 'playbook name', f.label as 'activity type field' from groups g\njoin playbooks p on g.playbook_id = p.id\njoin crm_fields f on p.activity_field_id = f.id\nwhere g.team_id = 340;\n\nSELECT * FROM activities WHERE uuid_to_bin('0c180357-67d2-419e-a8c3-b832a3490770') = uuid; # 20448716\nselect * from crm_field_data where object_id = 20448716;\n\nselect * from activities where crm_configuration_id = 270 and provider = 'salesloft' order by id desc;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%CybSafe%'; # 343,273,12008\nselect * from opportunities where team_id = 343;\nselect * from opportunities where team_id = 343 and crm_provider_id = '18099102526';\nselect * from opportunities where team_id = 343 and account_id = 945217482;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 343\nand sa.provider = 'hubspot';\n\nselect * from accounts where team_id = 343 order by name asc;\n\nselect * from stages where crm_configuration_id = 273 and type = 'opportunity';\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Voyado%'; # 353,283,12143\nSELECT * FROM activities WHERE crm_configuration_id = 283 and account_id = 3777844 order by id desc;\nSELECT * FROM accounts WHERE team_id = 353 AND name LIKE '%Salesloft%';\nSELECT * FROM activities WHERE id = 20717903;\n\nselect * from participants where activity_id IN (20929172,20928605,20928468,20926272,20926271,20926270,20926269,20916499,20916454,20916436,20916435,20900015,20900014,20900013,20897312,20897243,20897241,20897237,20897232,20897229,20893648,20893231,20893230,20893229,20893228,20889784,20885039,20885038,20885037,20885036,20885035,20882728,20882708,20882703,20882702,20869828,20869811,20869806,20869801,20869799,20869798,20869796,20869795,20869794,20869761,20869760,20869759,20868688,20868687,20850340,20847195,20841710,20833967,20827021,20825307,20825305,20825297,20824615,20824400,20823927,20821760,20795588,20794233,20794057,20793710,20785811,20781789,20781394,20781307,20762651,20758453,20758282,20757323,20756643,20756636,20756629,20756627,20756606,20756605,20756604,20756603,20756602,20756600,20756599,20756598,20756595,20756594,20756589,20756587,20756577,20756573,20748918,20748386,20748385,20748384,20748383,20748382,20748381,20748380,20748379,20748377,20748375,20748373,20743301,20717905,20717904,20717903,20717901,20717899);\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 353\nand sa.provider = 'salesforce';\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%modern world business solutions%'; # 345,275,12016, l.atkinson@mwbsolutions.co.uk\nSELECT * FROM activities WHERE uuid_to_bin('3921d399-3fef-4609-a291-b0097a166d43') = uuid;\n# id: 20940638, user: 12022, contact: 5305871\nSELECT * FROM activity_summary_logs WHERE activity_id = 20940638;\nselect * from contacts where team_id = 345 and crm_provider_id = '30891432415' order by name asc; # 5305871\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 345\nand sa.provider = 'hubspot';\n\nselect * from users where team_id = 345 and id = 12022;\nSELECT * FROM crm_profiles WHERE user_id = 12022;\nSELECT * FROM participants WHERE activity_id = 20940638;\nSELECT * FROM users u\nJOIN crm_profiles cp ON u.id = cp.user_id\nWHERE u.team_id = 345;\n\nselect * from contacts where team_id = 345 and crm_provider_id = '30880813535' order by name desc; # 5305871\n\nselect * from team_features where team_id = 345;\nSELECT * FROM activities WHERE uuid_to_bin('11701e2d-2f82-4dab-a616-1db4fad238df') = uuid; # 21115197\nSELECT * FROM participants WHERE activity_id = 20897406;\n\n\n\nSELECT * FROM activities WHERE uuid_to_bin('63ba55cd-1abc-447d-83da-0137000005b7') = uuid; # 20953912\nSELECT * FROM activities WHERE crm_configuration_id = 275 and provider = 'ringcentral' and title like '%1252629100%';\n\n\nSELECT * FROM activities WHERE id = 20946641;\nSELECT * FROM crm_profiles WHERE user_id = 10211;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Lunio%'; # 120,97,10984, triger@lunio.ai\nSELECT * FROM opportunities WHERE crm_configuration_id = 97 and crm_provider_id = '006N1000006c5PpIAI';\nselect * from stages where crm_configuration_id = 97 and type = 'opportunity';\nselect * from opportunities where team_id = 120;\n\n\nselect * from crm_configurations crm join teams t on crm.id = t.crm_id\nwhere 1=1\nAND t.current_billing_plan IS NOT NULL\nAND crm.auto_sync_activity = 0\nand crm.provider = 'hubspot';\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Exclaimer%'; # 270,205,10053,james.lewendon@exclaimer.com\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 270\nand sa.provider = 'salesforce';\nSELECT * FROM activities WHERE uuid_to_bin('b54df794-2a9a-4957-8d80-09a600ead5f8') = uuid; # 21637956\nSELECT * FROM crm_profiles WHERE user_id = 11446;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Cygnetise%'; # 372,300,12554, alex.chikly@cygnetise.com\nselect * from playbooks where team_id = 372;\nselect * from crm_fields where crm_configuration_id = 300 and object_type = 'event'; # 141340\nSELECT * FROM crm_field_values WHERE crm_field_id = 141340;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 372\nand sa.provider = 'salesforce';\n\nselect * from crm_profiles where crm_configuration_id = 300;\nSELECT * FROM crm_configurations WHERE team_id = 372;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Planday%'; # 291,242,11501,mfa@planday.com\nSELECT * FROM opportunities WHERE team_id = 291 and crm_provider_id = '006bG000005DO86QAG'; # 3207756\nselect * from crm_field_data where object_id = 3207756;\nSELECT * FROM crm_fields WHERE id = 111834;\n\nselect f.id, f.crm_provider_id AS field_name, f.label, fd.object_id AS dealId, fd.value\nFROM crm_fields f\nJOIN crm_field_data fd ON f.id = fd.crm_field_id\nWHERE f.crm_configuration_id = 242\nAND f.object_type = 'opportunity'\nAND fd.object_id IN (3207756)\nORDER BY fd.object_id, fd.updated_at;\n\nSELECT * FROM crm_configurations WHERE auto_connect = 1;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Tour%'; # 187,209,8150,salesforce-admin@tourlane.com\nselect * from group_deal_risk_types drgt join groups g on drgt.group_id = g.id\nwhere g.team_id = 187;\n\nselect * from `groups` where team_id = 187;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 187\nand sa.provider = 'salesforce';\n\n# Destination - 98870 - Destination__c\n# Stage - 79014 - StageName\n# Land Arrangement - 98856 - Land_Arrangement__c\n# Flight - 98848 - Flight__c\n# Last activity date - 98812 - LastActivityDate\n# Last modified date - 98809 - LastModifiedDate\n# Last inbound mail timestamp - 99151 - Last_Inbound_Mail_Timestamp__c\n# next call - 98864 - Next_Call__c\n\nselect * from crm_fields where crm_configuration_id = 209 and object_type = 'opportunity';\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 209;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 682;\n\nselect * from opportunities where team_id = 187 and name LIKE'%Muriel Sal%';\nselect * from opportunities where team_id = 187 and user_id = 9951 and is_closed = 0;\nselect * from activities where opportunity_id = 3538248;\n\nSELECT * FROM crm_profiles WHERE user_id = 8150;\n\nselect * from deal_risks where opportunity_id = 3538248;\n\nselect * from teams where crm_id IS NULL;\n\nSELECT opp.id AS opportunity_id,\n u.group_id AS group_id,\n MAX(\n CASE\n WHEN a.type IN (\"sms-inbound\", \"sms-outbound\") THEN a.created_at\n ELSE a.actual_end_time\n END) as last_date\nFROM opportunities opp\nleft join activities a on a.opportunity_id = opp.id\ninner join users u on opp.user_id = u.id\nwhere opp.user_id IN (9951)\n\nAND opp.is_closed = 0\nand a.status IN ('completed', 'received', 'delivered') OR a.status IS NULL\ngroup by opp.id;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Cybsafe%'; # 343,301,12008,polly.morphew@cybsafe.com\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 343\nand sa.provider = 'hubspot';\n\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 301;\nSELECT * FROM contacts WHERE id = 6612363;\nSELECT * FROM accounts WHERE id = 4235676;\nSELECT * FROM opportunities WHERE crm_configuration_id = 301 and crm_provider_id = 32983784868;\nselect * from opportunity_stages where opportunity_id = 4503759;\n# SELECT * FROM opportunities WHERE id = 4569937;\n\nselect * from activities where crm_configuration_id = 301;\nSELECT * FROM activities WHERE uuid_to_bin('d3b2b28b-c3d0-4c2d-8ed0-eef42855278a') = uuid; # 26330370\nSELECT * FROM participants WHERE activity_id = 26330370;\n\nSELECT * FROM teams WHERE id = 375;\nselect * from playbooks where team_id = 375;\n\nselect * from stages where crm_configuration_id = 301 and type = 'opportunity';\n\nselect * from teams;\nselect * from contact_roles;\n\nSELECT * FROM opportunities WHERE team_id = 343 and user_id = 12871 and close_date >= '2024-11-01';\n\nselect * from users u join crm_profiles cp on cp.user_id = u.id where u.team_id = 343;\n\nSELECT * FROM crm_field_data WHERE object_id = 3771706;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 343\nand sa.provider = 'hubspot';\n\nSELECT * FROM crm_fields WHERE crm_configuration_id = 301 and object_type = 'opportunity'\nand crm_provider_id LIKE \"%traffic_light%\";\nSELECT * FROM crm_field_values WHERE crm_field_id IN (144020,144048,144111,144113,144126,144481,144508,144531);\n\nSELECT fd.* FROM opportunities o\nJOIN crm_field_data fd ON o.id = fd.object_id\nWHERE o.team_id = 343\n# and o.user_id IS NOT NULL\nand fd.crm_field_id IN (144020,144048,144111,144113,144126,144481,144508,144531)\nand fd.value != ''\norder by value desc\n# group by o.id\n;\n\nSELECT * FROM opportunities WHERE id = 3769843;\n\nSELECT * FROM teams WHERE name LIKE '%Tour%'; # 187,209,8150, salesforce-admin@tourlane.com\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 209;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 682;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Funding Circle%'; # 220,177,8603,aswini.mishra@fundingcircle.com\nSELECT * FROM activities WHERE uuid_to_bin('7a40e99b-3b37-4bb1-b983-325b81801c01') = uuid; # 23139839\n\n\nSELECT * FROM opportunities WHERE id = 3855992;\n\nSELECT * FROM users WHERE name LIKE '%Angus Pollard%'; # 8988\n\nSELECT * FROM teams WHERE name LIKE '%Story Terrace%'; # 379, 307, 12894\nSELECT * FROM crm_fields WHERE crm_configuration_id = 307 and object_type != 'opportunity';\n\nselect * from contacts where team_id = 379 and name like '%bebro%'; # 5874411, crm: 77229348507\nSELECT * FROM crm_field_data WHERE object_id = 5874411;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 379\nand sa.provider = 'hubspot';\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%mentio%'; # 117, 94, 6371, nikhil.kumar@mention-me.com\nSELECT * FROM activities WHERE uuid_to_bin('82939311-1af0-4506-8546-21e8d1fdf2c1') = uuid;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Tourlane%'; # 187, 209, 8150, salesforce-admin@tourlane.com\nSELECT * FROM opportunities WHERE team_id = 187 and crm_provider_id = '006Se000008xfvNIAQ'; # 3537793\nselect * from generic_ai_prompts where subject_id = 3537793;\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Lunio%'; # 120, 97, 10984, triger@lunio.ai\nSELECT * FROM crm_configurations WHERE id = 97;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 97;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 355;\nSELECT * FROM crm_fields WHERE id = 32682;\n\nselect cfd.value, o.* from opportunities o\njoin crm_field_data cfd on o.id = cfd.object_id and cfd.crm_field_id = 32682\nwhere team_id = 120\nand cfd.value != ''\n;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 120\nand sa.provider = 'salesforce';\n\nselect * from opportunities where team_id = 120 and crm_provider_id = '006N1000007X8MAIA0';\nSELECT * FROM crm_field_data WHERE object_id = 2313439;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE id = 410;\nSELECT * FROM teams WHERE name LIKE '%Local Business Oxford%';\nselect * from scorecards where team_id = 410;\nselect * from scorecard_rules;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Funding%'; # 220, 177, 8603, aswini.mishra@fundingcircle.com\nselect * from activities a\njoin opportunities o on a.opportunity_id = o.id\njoin users u on o.user_id = u.id\nwhere a.crm_configuration_id = 177 and a.type LIKE '%email-out%'\n# and a.actual_end_time > '2024-12-16 00:00:00'\n# and o.remotely_created_at > '2024-12-01 00:00:00'\n# and u.group_id = 1014\nand u.id = 9021\norder by a.id desc;\nSELECT * FROM opportunities WHERE id in (3981384,4017346);\nSELECT * FROM users WHERE team_id = 220 and id IN (8775, 11435);\n\nselect * from users where id = 9021;\nselect * from inboxes where user_id = 9021;\n\nselect * from inbox_emails where inbox_id = 1349 and email_date > '2024-12-18 00:00:00';\n\nselect * from email_messages where team_id = 220\nand orig_date > '2024-12-16 00:00:00' and orig_date < '2024-12-19 00:00:00'\nand subject LIKE '%Personal%'\n# and 'from' = 'credit@fundingcircle.com'\n;\n\nselect * from activities a\njoin opportunities o on a.opportunity_id = o.id\nwhere a.user_id = 9021 and a.type LIKE '%email-out%'\nand a.actual_end_time > '2024-12-18 00:00:00'\nand o.user_id IS NOT NULL\nand o.remotely_created_at > '2024-12-01 00:00:00'\norder by a.id desc;\n\nSELECT * FROM opportunities WHERE team_id = 220 and name LIKE '%Right Car move Limited%' and id = 3966852;\nselect * from activities where crm_configuration_id = 177 and type LIKE '%email%' and opportunity_id = 3966852 order by id desc;\n\nselect * from team_settings where name IN ('useCloseDate');\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Hurree%'; # 104, 81, 6175, jfarrell@hurree.co\nSELECT * FROM opportunities WHERE team_id = 104 and name = 'PropOp';\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 104\nand sa.provider = 'hubspot';\n\nselect * from crm_configurations where last_synced_at > '2025-01-19 01:00:00'\nselect * from teams where crm_id IS NULL;\n\nselect t.name as 'team', u.name as 'owner', u.email, u.phone\nfrom teams t\njoin activity_providers ap on t.id = ap.team_id\njoin users u on t.owner_id = u.id\nwhere 1=1\n and t.status = 'active'\n and ap.is_enabled = 1\n# and u.status = 1\n and ap.provider = 'ms-teams';\n\nselect * from crm_configurations where provider = 'bullhorn'; # 344\nSELECT * FROM teams WHERE id = 442; # 14293\nselect * from users where team_id = 442;\nselect * from social_accounts sa where sa.sociable_id = 14293;\nselect * from invitations where team_id = 442;\n\n# ********************************************************************************************************\nSELECT * FROM users WHERE email LIKE '%nea.liikamaa@eletive.com%'; # 14022\nSELECT * FROM teams WHERE id = 429;\nselect * from opportunities where team_id = 429 and crm_provider_id IN (16157415775, 22246219645);\nselect * from activities where opportunity_id in (4340436,4353519);\n\nselect * from transcription where activity_id IN (25630961,25381771);\nselect * from generic_ai_prompts where subject_id IN (4353519);\n\nSELECT\n a.id as activity_id,\n a.opportunity_id,\n a.type as activity_type,\n a.language,\n CONCAT(a.title, a.description) AS mail_content,\n e.from AS mail_from,\n e.to AS mail_to,\n e.subject AS mail_subject,\n e.body AS mail_body,\n p.type as prompt_type,\n p.status as prompt_status,\n p.content AS prompt_content,\n a.actual_start_time as created_at\nFROM activities a\n LEFT JOIN ai_prompts p ON a.transcription_id = p.transcription_id AND p.deleted_at IS NULL\n LEFT JOIN email_messages e ON a.id = e.activity_id\nWHERE a.actual_start_time > '2024-01-01 00:00:00'\n AND a.opportunity_id IN (4353519)\n AND a.status IN ('completed', 'received', 'delivered')\n AND a.deleted_at IS NULL\n AND a.type NOT IN ('sms-inbound', 'sms-outbound')\nORDER BY a.opportunity_id ASC, a.id ASC;\n\nSELECT * FROM users WHERE name LIKE '%George Fierstone%'; # 14293\nSELECT * FROM teams WHERE id = 442;\nSELECT * FROM crm_configurations WHERE id = 344;\nselect * from team_features where team_id = 442;\nselect * from groups where team_id = 442;\nselect * from playbooks where team_id = 442;\nselect * from playbook_categories where playbook_id = 1729;\nselect * from crm_fields where crm_configuration_id = 344 and id = 172024;\nSELECT * FROM crm_field_values WHERE crm_field_id = 172024;\nselect * from crm_layouts where crm_configuration_id = 344;\nselect * from playbook_layouts where playbook_id = 1729;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Learning%'; # 260, 221, 9444\n\nselect s.*\n# , s.sent_at, u.name, a.*\nfrom activity_summary_logs s\ninner join activities a on a.id = s.activity_id\ninner join users u on u.id = a.user_id\nwhere a.crm_configuration_id = 356\nand s.sent_at > date_sub(now(), interval 60 day)\norder by a.actual_end_time desc;\n\nselect * from activities a\n# inner join activity_summary_logs s on s.activity_id = a.id\nwhere a.crm_configuration_id = 356 and a.actual_end_time > date_sub(now(), interval 60 day)\n# and a.crm_provider_id is not null\n# and provider <> 'ringcentral'\nand status = 'completed'\norder by a.actual_end_time desc;\n\nselect * from teams order by id desc; # 17328, 32, 17830, integration-account@jiminny.com\nSELECT * FROM users;\nSELECT * FROM users where team_id = 260 and status = 1; # 201 - 150 active\nSELECT * FROM teams WHERE id = 260;\nselect * from team_settings where team_id = 260;\nselect * from crm_configurations where team_id = 260;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 356;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 1184;\n\nselect * from accounts where crm_configuration_id = 221 order by id desc; # 7000\nselect * from leads where crm_configuration_id = 221 order by id desc; # 0\nselect * from contacts where crm_configuration_id = 221 order by id desc; # 200 000\nselect * from opportunities where crm_configuration_id = 221 order by id desc; # 0\nselect * from crm_profiles where crm_configuration_id = 221 order by id desc; # 23\nselect * from crm_fields where crm_configuration_id = 221;\nselect * from crm_field_values where crm_field_id = 5302 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 221 order by id desc;\nselect * from stages where crm_configuration_id = 221 order by id desc;\n\nselect * from accounts where crm_configuration_id = 356 order by id desc; # 7000\nselect * from leads where crm_configuration_id = 356 order by id desc; # 0\nselect * from contacts where crm_configuration_id = 356 order by id desc; # 200 000\nselect * from opportunities where crm_configuration_id = 356 order by id desc; # 0\nselect * from crm_profiles where crm_configuration_id = 356 order by id desc; # 23\nselect * from crm_fields where crm_configuration_id = 356;\nselect * from crm_field_values where crm_field_id = 5302 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 356 order by id desc;\nselect * from stages where crm_configuration_id = 356 order by id desc;\n\nselect * from playbooks where team_id = 260 order by id desc; # 4 (2 deleted)\nselect * from groups where team_id = 260 order by id desc; # 27 groups, (2 deleted)\nselect * from playbook_layouts where playbook_id IN (1410,1409,1276,1254); # 4\nselect ce.* from calendars c\njoin users u on c.user_id = u.id\njoin calendar_events ce on c.id = ce.calendar_id\nwhere u.team_id = 260\nand (ce.start_time > '2025-02-21 00:00:00')\n;\n# calendar events 1207\n#\n\nselect * from opportunities where team_id = 260;\nSELECT * FROM crm_field_data WHERE object_id = 4696496;\n\nselect * from activities where crm_configuration_id = 356 and crm_provider_id IS NOT NULL;\nselect * from activities where crm_configuration_id IN (221) and provider NOT IN ('ms-teams', 'uploader', 'zoom-bot')\n# and type = 'conference' and status = 'scheduled' and activities.is_internal = 0\nand created_at > '2024-03-01 00:00:00'\norder by id desc; # 880 000, ringcentral, avaya\nSELECT * FROM participants WHERE activity_id = 26371744;\n\n# all activities 942 000 +\n# conference 7385 - scheduled 984 - external 343\n\nselect * from activities where id = 26321812;\nselect * from participants where activity_id = 26321812;\nselect * from participants where activity_id in (26414510,26414514,26414516,26414604,26414653,26414655);\nselect * from leads where id in (720428,689175,731546,645866,621037);\n\nselect * from users where id = 13841;\nselect * from opportunities where user_id = 9541;\nselect * from stages where id = 15900;\n\nselect * from accounts where\n# id IN (4160055,5053725,4965303,4896434)\nid in (4584518,3249934,3218025,3891133,3399450,4172999,4485161,3101785,4587203,3070816,2870343,2870341,3563940,4550846,3424464,3249963,2870342)\n;\n\nselect * from activities where id = 26654935;\nSELECT * FROM opportunities WHERE id = 4803458;\n\nSELECT * FROM opportunities where team_id = 260 and user_id = 13841 AND stage_id = 15900;\nSELECT id, uuid, provider, type, lead_id, account_id, contact_id, opportunity_id, stage_id, status, recording_state, title, actual_start_time, actual_end_time\nFROM activities WHERE user_id = 13841 AND opportunity_id IN (4729783, 4731717, 4731726, 4732064, 4732849, 4803458, 4813213);\n\nSELECT DISTINCT\n o.id, o.stage_id, s.name, a.title,\n a.*\nFROM activities a\n# INNER JOIN tracks t ON a.id = t.activity_id\nINNER JOIN users u ON a.user_id = u.id\nINNER JOIN teams team ON u.team_id = team.id\nINNER JOIN groups g ON u.group_id = g.id\nINNER JOIN opportunities o ON a.opportunity_id = o.id\nINNER JOIN stages s ON o.stage_id = s.id\nWHERE\n a.crm_configuration_id = 356\n AND a.status IN ('completed', 'failed')\n AND a.recording_state != 'stopped'\n# and a.user_id = 13841\n AND u.uuid = uuid_to_bin('6f40e4b8-c340-4059-b4ac-1728e87ea99e')\n AND team.uuid = uuid_to_bin('a607fba7-452e-4683-b2af-00d6cb52c93c')\n AND g.uuid = uuid_to_bin('b5d69e40-24a0-4c16-810b-5fa462299f94')\n\n AND a.type IN ('softphone', 'softphone-inbound', 'conference', 'sms-inbound', 'sms-outbound')\n# AND t.type IN ('audio', 'video')\n AND (\n (a.actual_start_time BETWEEN '2025-03-13 00:00:00' AND '2025-03-18 07:59:59')\n OR\n (\n a.actual_start_time IS NULL\n AND a.type IN ('sms-outbound', 'sms-inbound')\n AND a.created_at BETWEEN '2025-03-13 00:00:00' AND '2025-03-18 07:59:59'\n )\n )\n AND (\n a.is_private = 0\n OR (\n a.is_private = 1\n AND u.uuid = uuid_to_bin('6f40e4b8-c340-4059-b4ac-1728e87ea99e')\n )\n )\n AND (\n# s.id = 15900\n s.uuid = uuid_to_bin('04ca1c26-c666-4268-a129-419c0acffd73')\n OR s.uuid IS NULL -- Include records without opportunity stage\n )\n\nORDER BY a.actual_end_time DESC;\n# ********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Lead Forensics%'; # 190, 162, 8474, willsc@leadforensics.com\nSELECT * FROM users WHERE team_id = 190;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 190\nand sa.provider = 'hubspot';\n\nselect * from role_user where user_id = 8474;\n\nselect * from crm_configurations where provider = 'bullhorn';\n\nSELECT * FROM opportunities WHERE uuid_to_bin('94578249-65ec-4205-90f2-7d1a7d5ab64a') = uuid;\nSELECT * FROM users WHERE uuid_to_bin('26dbadeb-926f-4150-b11b-771b9d4c2f9a') = uuid;\n\nSELECT * FROM opportunities WHERE id = 4732493;\nselect * from activities where opportunity_id = 4732493;\n\n# ********************************************************************************************************\nSELECT * FROM teams WHERE id = 443; # 358, 14315, andrea.romano@correrenaturale.com\nSELECT * FROM opportunities WHERE team_id = 443;\n\nSELECT a.id, a.type, a.user_id, a.status, a.deleted_at, u.name, u.email, u.team_id as activity_team_id, u.status, u.deleted_at, t.name, t.status, s.team_id as stage_team_id\nFROM activities AS a\nJOIN stages AS s ON a.stage_id = s.id\nJOIN users AS u ON u.id = a.user_id\nJOIN teams AS t ON t.id = s.team_id\nWHERE u.team_id <> s.team_id and t.id > 135;\n\n\nSELECT\n crm_configuration_id,\n crm_provider_id,\n COUNT(*) as duplicate_count,\n GROUP_CONCAT(id) as stage_ids,\n GROUP_CONCAT(name) as stage_names\nFROM stages\nGROUP BY crm_configuration_id, crm_provider_id\nHAVING COUNT(*) > 1\nORDER BY duplicate_count DESC;\n\nselect * from stages where id IN (14898,14907);\n\nselect * from business_processes;\n\nSELECT *\nFROM crm_configurations\nWHERE team_id IN (\n SELECT team_id\n FROM crm_configurations\n GROUP BY team_id\n HAVING COUNT(*) > 1\n)\nORDER BY team_id;\n\nSELECT *\nFROM teams\nWHERE crm_id IN (\n SELECT crm_id\n FROM teams\n GROUP BY crm_id\n HAVING COUNT(*) > 1\n)\nORDER BY crm_id;\n\n# ***************************************************************************\nselect * from crm_configurations where provider = 'integration-app';\nSELECT * FROM teams WHERE id = 443; # Correre Naturale 358 14315 andrea.romano@correrenaturale.com\nselect * from activities where crm_configuration_id = 358 order by actual_end_time desc;\nselect id, uuid, actual_end_time, crm_provider_id, is_internal, playbook_category_id, type, user_id, lead_id, contact_id, account_id, opportunity_id, status, title from activities where crm_configuration_id = 358 order by actual_end_time desc;\nselect * from team_features where team_id = 358;\nselect * from activity_summary_logs;\n\nselect * from teams where id = 406;\n\n# ************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Sportfive%'; # 267, 202, 14637, srv.salesforce@sportfive.com\nselect * from activities where crm_configuration_id = 202 order by actual_end_time desc;\n\nSELECT * FROM users where id = 14637;\nSELECT * FROM teams where id = 267;\nSELECT * FROM groups where id = 1118;\n\nselect g.name, a.title, uuid_from_bin(a.uuid), a.external_id, a.status, a.recording_state, a.recording_reason_code, a.scheduled_start_time, a.scheduled_end_time, a.actual_start_time, a.actual_end_time from activities a\ninner join users u on u.id = a.user_id\ninner join groups g on g.id = u.group_id\nwhere a.crm_configuration_id = 202\nand a.is_internal = 0\nand (a.scheduled_start_time between '2025-03-19 00:00:00' and '2025-03-21 00:00:00')\nand a.type = 'conference'\nand a.status != 'completed'\nand a.external_id is not null\norder by a.scheduled_start_time desc;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 202\n AND status IN ('completed', 'failed')\n AND recording_state != 'stopped'\n AND type IN ('softphone', 'softphone-inbound', 'conference', 'sms-inbound', 'sms-outbound')\n AND (is_private = 0 OR user_id = 14637)\n AND (\n (\n actual_start_time BETWEEN '2025-03-12 12:00:00' AND '2025-03-24 11:59:59'\n ) OR (\n actual_start_time IS NULL\n AND type IN ('sms-outbound', 'sms-inbound')\n AND created_at BETWEEN '2025-03-12 12:00:00' AND '2025-03-24 11:59:59'\n )\n )\n AND NOT EXISTS (\n SELECT 1\n FROM tracks\n WHERE\n tracks.activity_id = activities.id\n AND tracks.type IN ('audio', 'video')\n )\nORDER BY actual_end_time DESC;\n\nSELECT DISTINCT\n a.*\nFROM activities a\nINNER JOIN tracks t ON a.id = t.activity_id\nINNER JOIN users u ON a.user_id = u.id\nINNER JOIN teams team ON u.team_id = team.id\nWHERE\n a.crm_configuration_id = 202\n AND a.status IN ('completed', 'failed')\n AND a.recording_state != 'stopped'\n# and a.user_id = 14637\n AND a.type IN ('softphone', 'softphone-inbound', 'conference', 'sms-inbound', 'sms-outbound')\n# AND t.type IN ('audio', 'video')\n AND (\n (a.actual_start_time BETWEEN '2025-03-12 12:00:00' AND '2025-03-24 11:59:59')\n OR\n (\n a.actual_start_time IS NULL\n AND a.type IN ('sms-outbound', 'sms-inbound')\n AND a.created_at BETWEEN '2025-03-12 12:00:00' AND '2025-03-24 11:59:59'\n )\n )\n AND (\n a.is_private = 0\n OR (\n a.is_private = 1\n AND a.user_id = 14637\n )\n )\n\nORDER BY a.actual_end_time DESC\n;\n\nSELECT DISTINCT a.*\nFROM activities a\nINNER JOIN users u ON a.user_id = u.id\nINNER JOIN teams t ON u.team_id = t.id\n# INNER JOIN tracks tr ON a.id = tr.activity_id\n# INNER JOIN groups g ON u.group_id = g.id\nWHERE 1=1\n AND t.id = 267\n# AND t.uuid = uuid_to_bin('aed4927b-f1ea-499e-94c3-83762fd233e8')\n AND a.status IN ('completed', 'failed')\n AND a.recording_state != 'stopped'\n AND a.type IN ('softphone', 'softphone-inbound', 'conference', 'sms-inbound', 'sms-outbound')\n# AND tr.type NOT IN ('audio', 'video')\n AND (\n a.is_private = 0\n OR a.user_id = 14637\n )\n AND (\n (a.actual_start_time BETWEEN '2025-03-19 00:00:00' AND '2025-03-21 23:59:59')\n OR (\n a.actual_start_time IS NULL\n AND a.type IN ('sms-outbound', 'sms-inbound')\n AND a.created_at BETWEEN '2025-03-19 00:00:00' AND '2025-03-21 23:59:59'\n )\n )\n# and NOT EXISTS (\n# SELECT 1\n# FROM tracks t\n# WHERE t.activity_id = a.id\n# AND t.type IN ('audio', 'video')\n# )\n\nORDER BY a.actual_end_time DESC;\n\nSELECT * FROM tracks WHERE activity_id = 26485995;\n\nselect a.is_private, a.title, uuid_from_bin(a.uuid), a.external_id, a.status, a.recording_state, a.recording_reason_code, a.scheduled_start_time, a.scheduled_end_time, a.actual_start_time, a.actual_end_time from activities a\ninner join users u on u.id = a.user_id\nwhere a.crm_configuration_id = 202\n# and a.is_internal = 0\nand (a.actual_start_time between '2025-03-19 00:00:00' and '2025-03-21 00:00:00')\nand a.type IN (\"softphone\",\"softphone-inbound\",\"conference\",\"sms-inbound\")\nand a.status IN ('completed', 'failed')\n# and a.external_id is not null\norder by a.actual_end_time desc;\n\nselect * from activities a where a.crm_configuration_id = 202\nand a.actual_start_time between '2025-03-20 00:00:00' and '2025-03-21 00:00:00'\n# AND a.type IN ('softphone', 'softphone-inbound', 'conference', 'sms-inbound', 'sms-outbound')\n\nselect g.name, a.title, uuid_from_bin(a.uuid), a.external_id, a.status, a.recording_state, a.recording_reason_code, a.scheduled_start_time, a.scheduled_end_time, a.actual_start_time, a.actual_end_time from activities a\ninner join users u on u.id = a.user_id\ninner join groups g on g.id = u.group_id\nwhere a.crm_configuration_id = 202\nand a.is_internal = 0\nand (a.scheduled_start_time between '2025-03-19 00:00:00' and '2025-03-21 00:00:00')\nand a.type = 'conference'\nand a.status != 'completed'\nand a.external_id is not null\norder by a.scheduled_start_time desc;\n\nSELECT * FROM teams WHERE name LIKE '%Tourlane%';\nSELECT * FROM crm_fields WHERE crm_configuration_id = 209 and object_type = 'opportunity';\nSELECT * FROM crm_field_data WHERE crm_field_id = 98809;\n\nselect * from users where status = 1 AND timezone = 'MDT';\n\nselect * from opportunities where id = 3769814;\nselect * from deal_risks where opportunity_id = 3769814;\n\nselect cp.* from crm_profiles cp\njoin users u on cp.user_id = u.id\njoin crm_configurations crm on cp.crm_configuration_id = crm.id\nwhere crm.provider = 'hubspot' AND u.status = 1 AND log_notes != 'none';\n\nselect * from crm_fields where id = 154575;\n\nselect * from team_features where feature = 'SUPPORTS_SYNC_MISSING_CALL_DISPOSITIONS';\nSELECT * FROM teams WHERE id = 176; # crm 148\nselect * from activities where crm_configuration_id = 148 and provider = 'hubspot' order by id desc;\n\nselect * from activity_providers where provider = 'amazon-connect';\n\nselect * from crm_fields cf\njoin crm_configurations crm on crm.id = cf.crm_configuration_id\nwhere crm.provider = 'hubspot' and cf.object_type IN ('account', 'contact');\n\n# *********************************************************************************************\nSELECT * FROM users WHERE id IN (15415, 15418);\nSELECT * FROM groups WHERE id IN (1805,1806);\nSELECT * FROM playbooks WHERE id = 1860;\nSELECT * FROM playbook_categories WHERE id = 38634;\nSELECT * FROM crm_fields WHERE id = 189962;\n\nSELECT * FROM teams WHERE name = 'Pulsar Group'; # 472, 380, 15138 raza.gilani@vuelio.com\n\nSELECT * FROM crm_profiles WHERE user_id = 15415;\nSELECT * FROM social_accounts WHERE sociable_id = 15415 and provider = 'salesforce';\n\nselect * from sidekick_settings where team_id = 472;\n\nSELECT * FROM activities WHERE uuid_to_bin('452c58c7-b87c-4fdd-953e-d7af185e9588') = uuid; # 28617536, user: 15418\nSELECT * FROM activities WHERE uuid_to_bin('399114ee-d3a8-458c-bff5-5f654658db0a') = uuid; # 28344407, user: 15415\nSELECT * FROM activities WHERE uuid_to_bin('f0aa567f-0ab1-4bbb-96aa-37dcf184676b') = uuid; # 28580288, user: 15415\nSELECT * FROM activities WHERE uuid_to_bin('50c086b1-2770-4bca-b5ae-6bac22ec426b') = uuid; # 28566069, user: 15415\n\n# *********************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%TeamTailor%'; # 109, 218, 13969, salesforce-integrations@teamtailor.com\nselect * from crm_configurations where id = 218;\nSELECT * FROM activities WHERE uuid_to_bin('e39b5857-7fdb-4f5a-951a-8d3ca69bb1b0') = uuid; # 28338765\nSELECT * FROM users WHERE id IN (13232, 13230);\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 109\nand sa.provider = 'salesforce';\n\n0057R00000EPL5HQAX Inez Ekblad\n\n1091cb81-5ea1-4951-a0ed-f00b568f0140 Triman Kaur\n\nSELECT * FROM crm_profiles WHERE user_id IN (13232, 13230);\n\n############################################################################################\nSELECT * FROM activities WHERE uuid_to_bin('675eeaeb-5681-42db-90bc-54c07a604408') = uuid; # 28655939 00UVg00000FLvnSMAT\nSELECT * FROM crm_field_data WHERE activity_id = 28655939;\nSELECT * FROM crm_fields WHERE id IN (94491,94493,94498);\nSELECT * FROM users WHERE id = 13658;\nSELECT * FROM teams WHERE id = 109;\nSELECT * FROM crm_configurations WHERE id = 218;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 109\nand sa.provider = 'salesforce';\n\n# ********************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Strengthscope%'; # 481, 390, 15420, katy.holden@strengthscope.comk\nSELECT * FROM stages WHERE crm_configuration_id = 390;\nselect * from business_processes where team_id = 481 and crm_configuration_id = 390;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 481\nand sa.provider = 'salesforce';\n\n\nSELECT * FROM users WHERE id = 15780; # team 462\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 462\nand sa.provider = 'hubspot';\n\n\nselect * from teams where id = 495;\nSELECT * FROM users WHERE id = 15794;\nselect * from social_accounts where sociable_id = 15794;\n\n# ********************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Flight%'; # 427, 333, 13752\nSELECT * FROM accounts WHERE team_id = 427 and crm_provider_id = '668731000183444517';\n\n# ********************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Group GTI%'; # 495, 407, 15794\nSELECT * FROM activities WHERE crm_configuration_id = 407\nand status = 'completed' and type = 'conference'\norder by id desc;\n\nselect ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id\njoin permission_role pr on pr.role_id = ru.role_id\n join permissions p on p.id = pr.permission_id\nwhere team_id = 495 and p.name IN ('dial');\n\nselect * from permission_role;\n\nselect * from activities where crm_configuration_id = 407 and status = 'completed' order by id desc;\nSELECT * FROM activities WHERE id = 29512773;\nSELECT * FROM activities WHERE id IN (29042721,28991325,29002874);\n\nSELECT al.* from activity_summary_logs al join activities a on a.id = al.activity_id\nwhere a.crm_configuration_id = 407\n# and a.id IN (29042721,28991325,29002874);\n\nSELECT * FROM users WHERE id = 15794;\nSELECT * FROM users WHERE team_id = 495;\nSELECT * FROM social_accounts WHERE sociable_id = 15794;\nSELECT * FROM opportunities WHERE team_id = 495 and name like '%OC:%';\nSELECT * FROM contacts WHERE team_id = 495;\nSELECT * FROM leads WHERE team_id = 495;\nSELECT * FROM accounts WHERE team_id = 495;\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 407;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 407;\nSELECT * FROM crm_configurations WHERE id = 407;\nSELECT * FROM opportunities WHERE team_id = 495 and close_date BETWEEN '2025-06-01' AND '2025-07-01'\nand user_id IS NOT NULL and is_closed = 1 and is_won = 1;\n\n# ********************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Hamilton Court FX LLP%'; # 249, 187, 10103\nSELECT * FROM activities WHERE uuid_to_bin('4659c2bb-9a49-484e-9327-a3d66f1e028c') = uuid; # 28951064\nSELECT * FROM crm_fields WHERE crm_configuration_id = 187 and object_type IN ('tasks', 'event');\n\n# *********************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Checkstep%'; # 325, 256, 11753\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 325\nand sa.provider = 'hubspot';\n\nSELECT * FROM activities WHERE uuid_to_bin('7be372e2-1916-4d79-a2f3-ca3db1346db3') = uuid; # 28611085\nSELECT * FROM activities WHERE uuid_to_bin('980f0336-840b-4185-a5a9-30cf8b0749a8') = uuid; # 28719733\nSELECT * FROM activity_summary_logs where activity_id = 28719733;\n\n# *************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Learning%'; # 260, 356, 9444\nSELECT * FROM activity_summary_logs where sent_at BETWEEN '2025-06-09 11:38:00' AND '2025-06-09 11:40:00';\nSELECT * FROM leads WHERE crm_configuration_id = 356 and crm_provider_id = '230045001502770504'; # 823630\nselect * from activities where crm_configuration_id = 356 and lead_id = 841732;\n\nSELECT * from activity_summary_logs al join activities a on a.id = al.activity_id\nwhere a.crm_configuration_id = 356;\n\nselect * from activities where crm_configuration_id = 356\nand actual_end_time between '2025-06-09 11:00:00' and '2025-06-09 12:00:00'\norder by id desc;\n\nselect * from accounts where crm_configuration_id = 356 and crm_provider_id = '230045001514403366' order by id desc;\nselect * from leads where crm_configuration_id = 356 and crm_provider_id = '230045001514275654' order by id desc;\nselect * from contacts where crm_configuration_id = 356 and crm_provider_id = '230045001514403366' order by id desc;\nselect * from opportunities where crm_configuration_id = 356 and crm_provider_id = '230045001514403366' order by id desc;\n\nselect * from team_features where team_id = 260;\nselect * from features where id IN (1,2,4,6,18,19,20,9,10,3,23,24,25,26,27);\n\nSELECT * FROM activities WHERE uuid_to_bin('7be372e2-1916-4d79-a2f3-ca3db1346db3') = uuid;\n\nselect * from crm_fields;\nselect * from crm_layout_entities;\n\nSELECT * FROM teams WHERE name LIKE '%Optable%';\n\n# *************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Teamtailor%'; # 109, 218, 13969\nSELECT * FROM crm_configurations WHERE id = 218;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 109\nand sa.provider = 'salesforce';\nSELECT * FROM activities WHERE uuid_to_bin('675eeaeb-5681-42db-90bc-54c07a604408') = uuid; # 28655939\nSELECT * FROM crm_field_data WHERE activity_id = 28655939;\nSELECT * FROM crm_fields WHERE id in (94491,94493,94498);\n\nselect * from teams where crm_id IS NULL;\n\nSELECT * FROM activities WHERE uuid_to_bin('71aa8a0c-9652-4ff6-bee7-d98ae60abef6') = uuid;\n\n# *************************************************************************************************\nselect * from team_domains where team_id = 399;\nSELECT * FROM teams WHERE name LIKE '%Rydoo%'; # 399, 318, 13207\n\nselect * from calendar_events where id = 5163781;\nSELECT * FROM activities WHERE uuid_to_bin('be2cbc52-7fda-46a0-9ae0-25d9553eafc0') = uuid; # 29443896\nSELECT * FROM participants WHERE activity_id = 29443896;\nselect * from contacts where crm_configuration_id = 318 and email = 'marianne.westeng@strawberry.no';\nselect * from leads where crm_configuration_id = 318 and email = 'marianne.westeng@strawberry.no';\n\nselect * from activities where user_id = 14937 order by created_at ;\n\nselect * from users where id = 14937;\n\nselect * from contacts where crm_configuration_id = 318 and email LIKE '%@strawberry.se';\nselect * from opportunities where crm_configuration_id = 318 and crm_provider_id = '006Sf00000D1WOAIA3';\n\nselect * from activities a join participants p on a.id = p.activity_id\nwhere crm_configuration_id = 318 and a.updated_at > '2025-06-23T08:18:43Z';\n\n# *************************************************************************************************\nSELECT * FROM opportunities WHERE team_id = 379 and crm_provider_id = '39334518886';\nSELECT * FROM opportunities WHERE team_id = 379 order by id desc;\nSELECT * FROM teams WHERE id = 379;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 379 and sociable_id = 13852\nand sa.provider = 'hubspot';\n\nSELECT * FROM crm_configurations WHERE id = 307;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 307;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 1027;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 307\n and id IN (144750,144855,145158,155227);\n\nSELECT * FROM activities;\n\n\nselect * from activities\nwhere created_at > '2025-07-01 00:00:00'\n# and created_at < '2025-08-01 00:00:00'\nand type not in ('email-outbound', 'email-inbound')\nand account_id is null\nand contact_id is null\nand lead_id is null\nand opportunity_id is not null\n;\nSELECT * FROM activities WHERE id IN (25344155, 25344296, 25501909, 28692187);\nSELECT * FROM crm_configurations WHERE id in (335,301,200);\n\nselect * from crm_fields where crm_configuration_id = 230 and crm_provider_id = 'Age2__c';\n\nSELECT * FROM teams WHERE name LIKE '%Resights%';\nselect * from crm_fields where crm_configuration_id = 1 and object_type = 'opportunity';\n\nselect * from crm_configurations where provider = 'bullhorn'; # 344\nselect * from teams where id IN (442);\n\nselect * from activities\nwhere crm_configuration_id = 177\nand provider = 'amazon-connect'\n order by id desc;\n# and source <> 'gong';\n\nselect * from activity_providers where provider = 'amazon-connect';\n\nSELECT * FROM activities WHERE uuid_to_bin('cec1993b-a7e5-4164-b74d-d680ea51d2f2') = uuid;\n\n\nselect * from crm_configurations where store_transcript = 1;\nSELECT * FROM teams WHERE id IN (80);\n\n# *************************************************************************************************\nSELECT * FROM teams WHERE name LIKE '%Sedna%'; # 277, 213, 12594\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 277\nand sa.provider = 'salesforce';\n\nselect * from activities where crm_configuration_id = 213 and account_id = 2511502;\n\nselect * from crm_configurations where id = 213;\n\nSELECT * FROM activities WHERE uuid_to_bin('35aa790a-8569-4544-8268-66f9a4a26804') = uuid; # 33981604\nSELECT * FROM participants WHERE activity_id = 33981604;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 337 and object_type = 'task';\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 431\nand sa.provider = 'salesforce';\nSELECT * FROM activities WHERE uuid_to_bin('b5476c7d-19a8-491b-869d-676ea1e857b6') = uuid; # 33997223\nselect * from activity_summary_logs where activity_id = 33997223;\nselect * from activity_notes where activity_id = 33997223;\n\n# ***********************************\nSELECT * FROM teams WHERE name LIKE '%Abode%';\n\n\nselect * from features;\nselect * from teams t\nwhere t.status = 'active'\nand id NOT IN (select team_id from team_features where feature_id = 9)\n;\n\n\nselect * from playbook_layouts where playbook_id = 1725;\nSELECT * FROM activities WHERE uuid_to_bin('65cc283c-4849-49e6-927f-4c281c8fea19') = uuid; # 34297473\nselect * from teams where id = 318;\nselect * from crm_configurations where team_id = 318;\nselect * from playbooks where team_id = 318;\nSELECT * FROM crm_layouts where crm_configuration_id = 381;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 1259;\nSELECT * FROM crm_fields WHERE id IN (192938,192936,192939);\n\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 1266;\nSELECT * FROM crm_fields WHERE id IN (192980,192991,192997,192998,193064,193067);\n\nSELECT * FROM activities WHERE uuid_to_bin('a902289b-285c-48eb-9cc2-6ad6c5d938f5') = uuid; # 34297533\n\n\n\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 927;\nSELECT * FROM crm_fields WHERE id IN (131668,131669,131670,131671,131676,131797);\n\nSELECT * FROM teams WHERE name LIKE '%Peripass%'; # 351, 281, 12124\nselect * from crm_layouts where crm_configuration_id = 281;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 927;\nselect * from crm_fields where crm_configuration_id = 281 and id in (131668,131669,131670,131671,131676,131797);\nselect * from opportunities where crm_configuration_id = 281;\n\nSELECT * FROM activities WHERE id IN (34211315, 34130075);\nSELECT * FROM crm_field_data WHERE object_id IN (34211315, 34130075);\n\nselect cf.crm_configuration_id, cle.crm_layout_id, cle.id, cf.id from crm_field_data cfd\njoin crm_layout_entities cle on cle.id = cfd.crm_layout_entity_id\njoin crm_fields cf on cle.crm_field_id = cf.id\nwhere cf.deleted_at IS NOT NULL\nGROUP BY cle.id, cf.id;\n\nselect * from crm_layouts where id IN (355);\nselect u.email, t.crm_id, t.* from teams t\njoin users u on u.id = t.owner_id\nwhere crm_id IN (97);\n\nSELECT * FROM crm_fields WHERE id = 96492;\n\nselect * from permissions;\nselect * from permission_role where permission_id = 247;\nselect * from roles;\n\nselect * from migrations;\n# *****************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('291e3c21-11cc-4728-aee7-6e4bedf86d72') = uuid; # 34262174\nSELECT * FROM crm_configurations WHERE id = 301;\nSELECT * FROM teams WHERE id = 343;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 343\nand sa.provider = 'hubspot';\n\nselect * from participants where activity_id = 34262174;\n\nselect * from contacts where crm_configuration_id = 301 and id = 6976326;\nselect * from accounts where crm_configuration_id = 301 and id IN (4647626, 4815829); # 30761335403\n\nselect * from activity_summary_logs where activity_id = 34262174;\n\nselect * from users where status = 1 AND timezone = 'EST';\n\n# ****************************************************************************\nSELECT * FROM users WHERE id = 13869;\nSELECT * FROM crm_configurations WHERE id = 320;\nSELECT * FROM teams WHERE id = 401;\n\nSELECT * FROM activities WHERE uuid_to_bin('2228c16f-10be-48d5-90d4-67385219dc01') = uuid; # 29670601\n\nSELECT * FROM accounts WHERE id = 7761483;\nSELECT * FROM opportunities WHERE id = 6051814;\n\nSELECT * FROM teams WHERE name LIKE '%Seedlegals%';\n\n;select * from opportunities where updated_at > '2025-10-11' AND crm_provider_id = '34713761166';\n\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 177;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 577;\nSELECT * FROM crm_fields WHERE id IN (68458,68459,68480,68497,68524,68530,68554,68618,68662,68781,68810,68898,68981,69049,97467);\n\nSELECT t.id, crm.id, t.name, crm.sync_objects, crm.provider, crm.last_synced_at FROM crm_configurations crm join teams t on t.crm_id = crm.id\nwhere t.status = 'active' AND crm.provider = 'hubspot' AND crm.last_synced_at < '2025-10-22 00:00:00';\n\nSELECT * FROM activities WHERE uuid_to_bin('fa09449f-cba9-496a-b8f3-865cd3c72351') = uuid;\nSELECT * FROM crm_configurations where id = 184;\nSELECT * FROM teams WHERE id = 246;\nSELECT * FROM social_accounts WHERE sociable_id = 9259 and provider = 'hubspot';\n\nSELECT * FROM users WHERE email LIKE '%rhian.old@bud.co.uk%'; # 17700\nSELECT * FROM teams WHERE id = 551;\n\nSELECT * FROM crm_configurations WHERE id = 471;\nSELECT * FROM activities WHERE crm_configuration_id = 471 and crm_provider_id IS NOT NULL;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 471;\nSELECT * FROM crm_fields WHERE id = 307260;\nSELECT * FROM crm_field_values WHERE crm_field_id = 307260;\n\nselect * from crm_layouts where crm_configuration_id = 471;\n\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 1547;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 1548;\n\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 551 and sa.provider = 'hubspot';\n\nSELECT * FROM teams WHERE name LIKE '%$PCS%';\n\n# ********************************************************************************************************\nselect * from crm_configurations crm\njoin teams t on t.crm_id = crm.id\nwhere t.status = 'active'\nand crm.provider = 'hubspot';\n\n# $slug = 'HUBSPOT_WEBHOOK_SYNC';\n# $team = Jiminny\\Models\\Team::find(2);\n# $feature = Feature::query()->where('slug', $slug)->first();\n# TeamFeature::query()->create(['feature_id' => $feature->getId(),'team_id' => $team->getId()]);\n\n# hubspot_webhook_metrics\n\nselect * from crm_configurations where id = 331; # 416\nSELECT * FROM teams WHERE id = 416;\nSELECT * FROM opportunities WHERE team_id = 190;\n\nSELECT * FROM teams WHERE name LIKE '%Lead Forensics%';\nSELECT sa.id,\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 190 and sa.provider = 'hubspot';\n\n\n\nSELECT * FROM teams WHERE name LIKE '%Rapaport%'; # 431, 337\nSELECT * FROM teams where id = 431;\nSELECT * FROM crm_configurations where team_id = 431;\nSELECT * FROM activity_providers where team_id = 431;\nSELECT * FROM activities where crm_configuration_id = 337 and type IN ('softphone', 'softphone-outbound')\nand provider NOT IN ('hubspot', 'aircall')\n# and telephony_provider_id = '019c1131-a22f-4792-b9ea-20adf6a02ed0'\norder by id desc;\nSELECT sa.id,\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 431 and sa.provider = 'salesforce';\n\nSELECT * FROM teams WHERE name LIKE '%BiP%'; # 401, 320\nSELECT * FROM teams where id = 401;\nSELECT * FROM crm_configurations where team_id = 401;\nSELECT * FROM activity_providers where team_id = 401;\nSELECT * FROM activities where crm_configuration_id = 320 and type IN ('softphone', 'softphone-outbound')\nand provider NOT IN ('hubspot', 'aircall')\n# and telephony_provider_id = '019c1131-a22f-4792-b9ea-20adf6a02ed0'\norder by id desc;\nSELECT sa.id,\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 401 and sa.provider = 'salesforce';\n\n\n# ********************************************************************\nSELECT * FROM crm_configurations where id = 307; # 379 - Story Terrace Inc , portalId: 3921157\nSELECT * FROM contacts WHERE team_id = 379 and updated_at > '2026-01-31 11:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 379 and updated_at > '2026-02-01 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 379 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 379 and sa.provider = 'hubspot';\n\n# ********************************************************************\nSELECT * FROM crm_configurations where id = 485; # 563 - LATUS Group (ad94d501-5d09-44fd-878f-ca3a9f8865c3) , portalId: 3904501\nSELECT * FROM opportunities WHERE team_id = 563 and updated_at > '2026-02-02 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 563 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 338; # 432 - Formalize , portalId: 9214205\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 432 and sa.provider = 'hubspot';\nSELECT * FROM opportunities WHERE team_id = 432 and updated_at > '2026-02-02 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 432 and updated_at > '2026-02-10 00:00:00' order by updated_at desc;\n\n# ********************************************************************\nSELECT * FROM crm_configurations where id = 436; # 519 - Moxso , portalId: 25531989\nSELECT * FROM opportunities WHERE team_id = 519 and updated_at > '2026-02-02 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 519 and updated_at > '2026-02-04 11:00:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 96; # 119 - Nourish Care , portalId: 26617984\nSELECT * FROM opportunities WHERE team_id = 119 and updated_at > '2026-02-02 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 119 and updated_at > '2026-02-04 11:00:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 331; # 416 - The National College , portalId: 7213852\nSELECT * FROM opportunities WHERE team_id = 416 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 416 and updated_at > '2026-02-04 11:00:00' order by updated_at desc;\n\n# ********************************************************************\nSELECT * FROM crm_configurations where id = 308; # 380 - Foodles , portalId: 7723616\nSELECT * FROM opportunities WHERE team_id = 380 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 380 and updated_at > '2026-02-06 10:30:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 379; # 471 - imat-uve , portalId: 9177354\nSELECT * FROM opportunities WHERE team_id = 471 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 471 and updated_at > '2026-02-06 10:30:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 465; # 545 - Spotler , portalId: 144759271\nSELECT * FROM opportunities WHERE team_id = 545 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 545 and updated_at > '2026-02-06 10:30:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 455; # 537 - indevis , portalId: 25666868\nSELECT * FROM opportunities WHERE team_id = 537 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 537 and updated_at > '2026-02-06 10:30:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 200; # 265 - Jobadder , portalId: 6426676\nSELECT * FROM opportunities WHERE team_id = 265 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 265 and updated_at > '2026-02-06 10:30:00' order by updated_at desc;\n# ********************************************************************\nSELECT * FROM crm_configurations where id = 335; # 429 - Eletive , portalId: 6110563\nSELECT * FROM opportunities WHERE team_id = 429 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 429 and updated_at > '2026-02-09 10:30:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 363; # 456 - Global Group , portalId: 8901981\nSELECT * FROM opportunities WHERE team_id = 456 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 456 and updated_at > '2026-02-09 10:30:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 297; # 369 - Unbiased , portalId: 9229005\nSELECT * FROM opportunities WHERE team_id = 369 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 369 and updated_at > '2026-02-09 10:30:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 353; # 449 - Fuuse , portalId: 25781745\nSELECT * FROM opportunities WHERE team_id = 449 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 449 and updated_at > '2026-02-09 10:30:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 487; # 566 - Nimbus , portalId: 39982590\nSELECT * FROM opportunities WHERE team_id = 566 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 566 and updated_at > '2026-02-09 10:30:00' order by updated_at desc;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 487;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 1630;\nselect * from crm_fields where crm_configuration_id = 487 and\n(uuid_to_bin('4c6b2971-64d4-45b8-b377-427be758b5a5') = uuid or uuid_to_bin('59e368d8-65a0-4b77-b611-db37c99fbe68') = uuid);\nSELECT * FROM crm_field_values WHERE crm_field_id = 375177;\n# ********************************************************************\nSELECT * FROM crm_configurations where id = 420; # 506 - voiio , portalId: 145629154\nSELECT * FROM opportunities WHERE team_id = 506 and updated_at > '2026-02-10 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 506 and updated_at > '2026-02-10 15:00:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 479; # 558 - Momice , portalId: 535962\nSELECT * FROM opportunities WHERE team_id = 558 and updated_at > '2026-02-10 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 558 and updated_at > '2026-02-10 15:00:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 59; # 80 - Storyclash GmbH , portalId: 4268479\nSELECT * FROM opportunities WHERE team_id = 80 and updated_at > '2026-02-10 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 80 and updated_at > '2026-02-10 15:00:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 175; # 203 - Team iAM , portalId: 5534732\nSELECT * FROM opportunities WHERE team_id = 203 and updated_at > '2026-02-10 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 203 and updated_at > '2026-02-10 15:00:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 368; # 460 - OneTouch Health , portalId: 5534732183355\nSELECT * FROM opportunities WHERE team_id = 460 and updated_at > '2026-02-10 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 460 and updated_at > '2026-02-10 15:00:00' order by updated_at desc;\n\n\n\nselect * from users where id = 29643;\nSELECT * FROM crm_field_values WHERE crm_field_id = 375177;\n# ********************************************************************\nSELECT * FROM teams WHERE name LIKE '%Buynomics%'; # 462, 482, 14910\nSELECT * FROM activities WHERE crm_configuration_id = 482\nand type NOT IN ('email-inbound', 'email-outbound')\n# and description like '%The call focused on understanding Welch%'\norder by id desc;\n\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 462 and sa.provider = 'salesforce';\n\nselect * from contacts where crm_configuration_id = 482 and name = 'Cyndall Hill'; # 15504749\nselect * from contacts where id = 10891096; # 482\nSELECT * FROM activities WHERE crm_configuration_id = 482\nand type NOT IN ('email-inbound', 'email-outbound')\nand contact_id = 15504749\norder by id desc;\n\nselect * from activities where id = 36793003; # 96cc7bc1-8622-4d27-92f4-baf664fc1a56, 00UOf00000PDdOXMA1\nselect * from transcription where id = 7646782;\nselect * from ai_prompts where transcription_id = 7646782;\n\n# ********************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('7a8471a3-847e-4822-802b-ddf426bbc252') = uuid; # 37370018\nSELECT * FROM activity_summary_logs WHERE activity_id = 37370018;\nSELECT * FROM teams WHERE id = 555;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 555 and sa.provider = 'hubspot';\n\n# ********************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('7c17b8aa-09df-4f85-a0f7-51f47afd712d') = uuid; # 37395250\nSELECT * FROM activities WHERE uuid_to_bin('14d60388-260d-494b-aa0d-63fdb1c78026') = uuid; # 37395250\n\nSELECT a.* FROM activities a JOIN crm_configurations c on c.id = a.crm_configuration_id\nwhere a.type IN ('softphone', 'softphone-outbound') and c.provider = 'hubspot'\nand a.provider NOT IN ('hubspot')\n# and a.provider IN ('salesloft')\n# and c.id NOT IN (70)\n# and a.duration > 30\n# and actual_start_time > '2026-02-05 00:00:00'\norder by a.id desc;\n\nSELECT * FROM activities WHERE id = 37549787;\nSELECT * FROM crm_profiles WHERE user_id = 17613;\n\nSELECT * FROM crm_configurations WHERE id = 70;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 93 and sa.provider = 'hubspot';\n\nSELECT asf.activity_search_id, asf.id, asf.value\nFROM activity_search_filters asf\nWHERE asf.filter = 'group_id'\nAND asf.value IN (\n SELECT CONCAT(\n HEX(SUBSTR(uuid, 5, 4)), '-',\n HEX(SUBSTR(uuid, 3, 2)), '-',\n HEX(SUBSTR(uuid, 1, 2)), '-',\n HEX(SUBSTR(uuid, 9, 2)), '-',\n HEX(SUBSTR(uuid, 11))\n )\n FROM groups\n WHERE deleted_at IS NOT NULL\n);\n\nSELECT * FROM crm_configurations WHERE id = 373; # KPSBremen.de 465 # - no social account\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 465 and sa.provider = 'hubspot';\n\nselect * from crm_configurations where id = 494;\n\nSELECT * FROM teams WHERE name LIKE '%splose%'; # 572, 495, 18708\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 572 and sa.provider = 'pipedrive';\n\nselect * from opportunities where team_id = 572\n# and name like '%Onebright%'\n# and is_closed = 1 and is_won = 0\n order by id desc;\n\n\nselect * from users where deleted_at is null and status = 2;\n\nselect * from contacts where id = 17900517;\nselect * from accounts where id = 10109838;\nselect * from opportunities where id = 6955880;\n\nselect * from opportunity_contacts where opportunity_id = 6955880;\nselect * from opportunity_contacts where contact_id = 17900517;\n\nselect * from contact_roles cr join crm_configurations crm on cr.crm_configuration_id = crm.id\nwhere crm.provider != 'salesforce';\n\nSELECT * FROM activities WHERE uuid_to_bin('adcb8331-5988-4353-834e-383a355abba2') = uuid; # 38056424, crm 104659682404\nselect * from teams where id = 456;\nSELECT * FROM crm_configurations WHERE id = 363;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 456 and sa.provider = 'hubspot';\n\nselect * from crm_layouts where crm_configuration_id = 363;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id IN (1203, 1204, 1635);\nSELECT * FROM crm_fields WHERE id IN (181536, 181538, 213455);\n\nSELECT * FROM teams WHERE name LIKE '%Electric%'; # 342, 272, 12767\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 342 and sa.provider = 'pipedrive';\nSELECT * FROM opportunities WHERE crm_configuration_id = 272 and name like 'NORTHUMBRIA POL%'; # and updated_at > '2025-07-01 00:00:00';\nSELECT * FROM opportunities WHERE crm_configuration_id = 272 order by remotely_created_at asc; # and updated_at > '2025-07-01 00:00:00';\nSELECT * FROM opportunities WHERE crm_configuration_id = 272 and updated_at > '2026-01-01 00:00:00';\nSELECT * FROM crm_fields WHERE crm_configuration_id = 272 and object_type = 'opportunity';\nSELECT * FROM crm_field_values WHERE crm_field_id = 127164;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 342 and sa.provider = 'pipedrive';\n\nSELECT * FROM teams WHERE id = 472;\nSELECT * FROM crm_configurations WHERE id = 380;\nselect * from activities where id = 38285673; # 38285673\nSELECT * FROM users WHERE id = 16942;\nSELECT * FROM groups WHERE id = 1964;\nSELECT * FROM playbooks WHERE id = 2033;\n\nselect * from teams where created_at > '2026-03-09';\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 499; # 1065\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 1678;\n\nSELECT * FROM teams WHERE id = 575;\nselect * from opportunities where team_id = 575;\n\nSELECT * FROM activities WHERE uuid_to_bin('96b1261f-2357-49f9-ab38-23ce12008ea0') = uuid;\n\nselect * from contacts c\nwhere c.crm_configuration_id = 370 order by c.updated_at desc;\n\nSELECT * FROM participants where activity_id = 38833541;\nSELECT * FROM participants where activity_id = 39216301;\nSELECT * FROM activity_summary_logs where activity_id = 39216301;\nSELECT * FROM activities WHERE uuid_to_bin('c7d99fbe-1fb1-41f2-8f4d-52e2bf70e1e9') = uuid; # 38833541, crm 478116564181\nSELECT * FROM activities WHERE uuid_to_bin('2e6ff4d3-9faa-447a-a8c1-9acde4d885ae') = uuid; # 39216301, crm 480171536586\nselect * from crm_profiles where crm_configuration_id = 319 and crm_provider_id = 525785080;\nselect * from opportunities where crm_configuration_id = 319 and crm_provider_id = 410150124747;\nselect * from accounts where crm_configuration_id = 319 and crm_provider_id = 47150650569;\nselect * from contacts where crm_configuration_id = 319 and crm_provider_id IN ('665587441856', '742723347700');\n# owner 13236 525785080\n# contact 1 16779180 665587441856 - activity - Alex Howes alex@supportroom.com created 2026-01-26\n# contact 2 19247563 742723347700 - ash@supportroom.com 2026-03-24\n# company 4176133 47150650569\n# deal 7100953 410150124747\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 400 and sa.provider = 'hubspot';\n\nselect * from features;\nselect * from team_features where feature_id = 40;\n\nselect * from teams where id = 556; # owner: 18101, crm: 477\nselect * from crm_configurations where id = 477;\nSELECT * FROM users WHERE id = 18101;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 556 and sa.provider = 'integration-app';\n\nselect * from opportunities where id = 7594349;\nselect * from opportunity_stages where opportunity_id = 7594349 order by created_at desc;\nselect * from business_processes where id = 6024;\nselect * from business_process_stages where stage_id = 16352;\nselect * from business_process_stages where business_process_id = 6024;\nselect * from stages where team_id = 459;\nselect * from teams where id = 459;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 459 and sa.provider = 'hubspot';\n\nSELECT os.stage_id, s.crm_provider_id, s.name, COUNT(*) as cnt\nFROM opportunity_stages os\nJOIN stages s ON s.id = os.stage_id\nWHERE os.opportunity_id = 7594349\nGROUP BY os.stage_id, s.crm_provider_id, s.name\nORDER BY cnt DESC;\n\nSELECT s.id, s.crm_provider_id, s.name, s.team_id, s.crm_configuration_id\nFROM stages s\nJOIN business_process_stages bps ON bps.stage_id = s.id\nWHERE bps.business_process_id = 6024\nAND s.crm_provider_id = 'contractsent';\n\nselect * from stages where id IN (16352,20612,18281,7344,16378,16309,5036,15223,14535,6293,12098,11607)\n\nSELECT * FROM teams WHERE name LIKE '%Pulsar Group%'; # 472, 380, 15138, raza.gilani@vuelio.com\nselect * from playbooks where team_id = 472; # event 226147\nSELECT * FROM playbook_categories WHERE playbook_id = 2288;\nSELECT * FROM crm_fields WHERE id = 226147;\nSELECT * FROM crm_field_values WHERE crm_field_id = 226147;\n\nSELECT * FROM crm_configurations WHERE id = 380;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 472 and sa.provider = 'salesforce';","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.011968086,"top":0.047885075,"width":0.024268618,"height":0.024740623},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-7558096554454067353
|
2146738311620114029
|
click
|
accessibility
|
NULL
|
Tests passed: 7
text/html
text/html
text/html
Proj Tests passed: 7
text/html
text/html
text/html
Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
TrackAutomatedReportGeneratedEventTest
Run 'TrackAutomatedReportGeneratedEventTest'
Debug 'TrackAutomatedReportGeneratedEventTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
1
2
1
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Listeners\AutomatedReports\UserPilot;
use GuzzleHttp\Exception\GuzzleException;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Jiminny\Component\Queue\Constants;
use Jiminny\Events\AutomatedReports\AutomatedReportGenerated;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\Contracts\UserContract;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Jiminny\Services\UserPilot\UserPilotClient;
class TrackAutomatedReportGeneratedEvent implements ShouldQueue
{
use InteractsWithQueue;
private const string EVENT_NAME_AUTOMATED_REPORT = 'automated-report-generated';
private const string EVENT_NAME_ASK_JIMINNY_REPORT = 'ask-jiminny-report-generated';
public string $queue = Constants::QUEUE_DELAYABLE;
public function __construct(
private readonly UserPilotClient $userPilotClient,
private readonly AutomatedReportsService $automatedReportsService,
) {
}
public function handle(AutomatedReportGenerated $event): void
{
if (config('services.userpilot.token') === null) {
return;
}
$automatedReport = $event->automatedReport;
$payload = $this->buildPayload($automatedReport);
$eventName = $this->resolveEventName($automatedReport);
try {
foreach ($this->resolveUsers($automatedReport) as $user) {
$this->userPilotClient->track($user, $eventName, $payload);
}
} catch (GuzzleException $e) {
$this->release(3600);
}
}
/**
* @return array<UserContract>
*/
private function resolveUsers(AutomatedReport $automatedReport): array
{
if ($automatedReport->isAskJiminnyReport()) {
$creator = $automatedReport->getCreator();
return $creator !== null ? [$creator] : [];
}
return $this->automatedReportsService->getRecipientUserObjects($automatedReport);
}
private function buildPayload(AutomatedReport $automatedReport): array
{
return [
'report_type' => $automatedReport->getType(),
'frequency' => $automatedReport->getFrequency(),
];
}
private function resolveEventName(AutomatedReport $automatedReport): string
{
if ($automatedReport->isAskJiminnyReport()) {
return self::EVENT_NAME_ASK_JIMINNY_REPORT;
}
return self::EVENT_NAME_AUTOMATED_REPORT;
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
27
9
23
3
105
Previous Highlighted Error
Next Highlighted Error
SELECT * FROM team_features where team_id = 1;
SELECT * FROM teams WHERE name LIKE '%Vixio%'; # 340,270,11922
SELECT * FROM users WHERE team_id = 340; # 12015
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 340
and sa.provider = 'salesforce';
# and sa.provider = 'salesloft';
select * from crm_fields where crm_configuration_id = 270 and object_type = 'event';
# 125558 - Event Type - Event_Type__c
# 125552 - Event Status - Event_Status__c
SELECT * FROM sidekick_settings WHERE team_id = 340;
SELECT * FROM crm_field_values WHERE crm_field_id in (125552);
select * from activities where crm_configuration_id = 270
and type = 'conference' and crm_provider_id IS NOT NULL
and actual_start_time > '2024-09-16 09:00:00' order by scheduled_start_time;
SELECT * FROM activities WHERE id = 20871677;
SELECT * FROM crm_field_data WHERE activity_id = 20871677;
select * from crm_layouts where crm_configuration_id = 270;
select * from crm_layout_entities where crm_layout_id in (886,887);
SELECT * FROM crm_configurations WHERE id = 270;
select * from playbooks where team_id = 340; # 1514
select * from groups where team_id = 340;
SELECT * FROM crm_fields WHERE id IN (125393, 125401);
select g.name as 'team name', p.name as 'playbook name', f.label as 'activity type field' from groups g
join playbooks p on g.playbook_id = p.id
join crm_fields f on p.activity_field_id = f.id
where g.team_id = 340;
SELECT * FROM activities WHERE uuid_to_bin('0c180357-67d2-419e-a8c3-b832a3490770') = uuid; # 20448716
select * from crm_field_data where object_id = 20448716;
select * from activities where crm_configuration_id = 270 and provider = 'salesloft' order by id desc;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%CybSafe%'; # 343,273,12008
select * from opportunities where team_id = 343;
select * from opportunities where team_id = 343 and crm_provider_id = '18099102526';
select * from opportunities where team_id = 343 and account_id = 945217482;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 343
and sa.provider = 'hubspot';
select * from accounts where team_id = 343 order by name asc;
select * from stages where crm_configuration_id = 273 and type = 'opportunity';
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Voyado%'; # 353,283,12143
SELECT * FROM activities WHERE crm_configuration_id = 283 and account_id = 3777844 order by id desc;
SELECT * FROM accounts WHERE team_id = 353 AND name LIKE '%Salesloft%';
SELECT * FROM activities WHERE id = 20717903;
select * from participants where activity_id IN (20929172,20928605,20928468,20926272,20926271,20926270,20926269,20916499,20916454,20916436,20916435,20900015,20900014,20900013,20897312,20897243,20897241,20897237,20897232,20897229,20893648,20893231,20893230,20893229,20893228,20889784,20885039,20885038,20885037,20885036,20885035,20882728,20882708,20882703,20882702,20869828,20869811,20869806,20869801,20869799,20869798,20869796,20869795,20869794,20869761,20869760,20869759,20868688,20868687,20850340,20847195,20841710,20833967,20827021,20825307,20825305,20825297,20824615,20824400,20823927,20821760,20795588,20794233,20794057,20793710,20785811,20781789,20781394,20781307,20762651,20758453,20758282,20757323,20756643,20756636,20756629,20756627,20756606,20756605,20756604,20756603,20756602,20756600,20756599,20756598,20756595,20756594,20756589,20756587,20756577,20756573,20748918,20748386,20748385,20748384,20748383,20748382,20748381,20748380,20748379,20748377,20748375,20748373,20743301,20717905,20717904,20717903,20717901,20717899);
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 353
and sa.provider = 'salesforce';
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%modern world business solutions%'; # 345,275,12016, [EMAIL]
SELECT * FROM activities WHERE uuid_to_bin('3921d399-3fef-4609-a291-b0097a166d43') = uuid;
# id: 20940638, user: 12022, contact: 5305871
SELECT * FROM activity_summary_logs WHERE activity_id = 20940638;
select * from contacts where team_id = 345 and crm_provider_id = '30891432415' order by name asc; # 5305871
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 345
and sa.provider = 'hubspot';
select * from users where team_id = 345 and id = 12022;
SELECT * FROM crm_profiles WHERE user_id = 12022;
SELECT * FROM participants WHERE activity_id = 20940638;
SELECT * FROM users u
JOIN crm_profiles cp ON u.id = cp.user_id
WHERE u.team_id = 345;
select * from contacts where team_id = 345 and crm_provider_id = '30880813535' order by name desc; # 5305871
select * from team_features where team_id = 345;
SELECT * FROM activities WHERE uuid_to_bin('11701e2d-2f82-4dab-a616-1db4fad238df') = uuid; # 21115197
SELECT * FROM participants WHERE activity_id = 20897406;
SELECT * FROM activities WHERE uuid_to_bin('63ba55cd-1abc-447d-83da-0137000005b7') = uuid; # 20953912
SELECT * FROM activities WHERE crm_configuration_id = 275 and provider = 'ringcentral' and title like '%1252629100%';
SELECT * FROM activities WHERE id = 20946641;
SELECT * FROM crm_profiles WHERE user_id = 10211;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Lunio%'; # 120,97,10984, [EMAIL]
SELECT * FROM opportunities WHERE crm_configuration_id = 97 and crm_provider_id = '006N1000006c5PpIAI';
select * from stages where crm_configuration_id = 97 and type = 'opportunity';
select * from opportunities where team_id = 120;
select * from crm_configurations crm join teams t on crm.id = t.crm_id
where 1=1
AND t.current_billing_plan IS NOT NULL
AND crm.auto_sync_activity = 0
and crm.provider = 'hubspot';
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Exclaimer%'; # 270,205,10053,[EMAIL]
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 270
and sa.provider = 'salesforce';
SELECT * FROM activities WHERE uuid_to_bin('b54df794-2a9a-4957-8d80-09a600ead5f8') = uuid; # 21637956
SELECT * FROM crm_profiles WHERE user_id = 11446;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Cygnetise%'; # 372,300,12554, [EMAIL]
select * from playbooks where team_id = 372;
select * from crm_fields where crm_configuration_id = 300 and object_type = 'event'; # 141340
SELECT * FROM crm_field_values WHERE crm_field_id = 141340;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 372
and sa.provider = 'salesforce';
select * from crm_profiles where crm_configuration_id = 300;
SELECT * FROM crm_configurations WHERE team_id = 372;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Planday%'; # 291,242,11501,[EMAIL]
SELECT * FROM opportunities WHERE team_id = 291 and crm_provider_id = '006bG000005DO86QAG'; # 3207756
select * from crm_field_data where object_id = 3207756;
SELECT * FROM crm_fields WHERE id = 111834;
select f.id, f.crm_provider_id AS field_name, f.label, fd.object_id AS dealId, fd.value
FROM crm_fields f
JOIN crm_field_data fd ON f.id = fd.crm_field_id
WHERE f.crm_configuration_id = 242
AND f.object_type = 'opportunity'
AND fd.object_id IN (3207756)
ORDER BY fd.object_id, fd.updated_at;
SELECT * FROM crm_configurations WHERE auto_connect = 1;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Tour%'; # 187,209,8150,[EMAIL]
select * from group_deal_risk_types drgt join groups g on drgt.group_id = g.id
where g.team_id = 187;
select * from `groups` where team_id = 187;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 187
and sa.provider = 'salesforce';
# Destination - 98870 - Destination__c
# Stage - 79014 - StageName
# Land Arrangement - 98856 - Land_Arrangement__c
# Flight - 98848 - Flight__c
# Last activity date - 98812 - LastActivityDate
# Last modified date - 98809 - LastModifiedDate
# Last inbound mail timestamp - 99151 - Last_Inbound_Mail_Timestamp__c
# next call - 98864 - Next_Call__c
select * from crm_fields where crm_configuration_id = 209 and object_type = 'opportunity';
SELECT * FROM crm_layouts WHERE crm_configuration_id = 209;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 682;
select * from opportunities where team_id = 187 and name LIKE'%Muriel Sal%';
select * from opportunities where team_id = 187 and user_id = 9951 and is_closed = 0;
select * from activities where opportunity_id = 3538248;
SELECT * FROM crm_profiles WHERE user_id = 8150;
select * from deal_risks where opportunity_id = 3538248;
select * from teams where crm_id IS NULL;
SELECT opp.id AS opportunity_id,
u.group_id AS group_id,
MAX(
CASE
WHEN a.type IN ("sms-inbound", "sms-outbound") THEN a.created_at
ELSE a.actual_end_time
END) as last_date
FROM opportunities opp
left join activities a on a.opportunity_id = opp.id
inner join users u on opp.user_id = u.id
where opp.user_id IN (9951)
AND opp.is_closed = 0
and a.status IN ('completed', 'received', 'delivered') OR a.status IS NULL
group by opp.id;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Cybsafe%'; # 343,301,12008,[EMAIL]
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 343
and sa.provider = 'hubspot';
SELECT * FROM crm_profiles WHERE crm_configuration_id = 301;
SELECT * FROM contacts WHERE id = 6612363;
SELECT * FROM accounts WHERE id = 4235676;
SELECT * FROM opportunities WHERE crm_configuration_id = 301 and crm_provider_id = 32983784868;
select * from opportunity_stages where opportunity_id = 4503759;
# SELECT * FROM opportunities WHERE id = 4569937;
select * from activities where crm_configuration_id = 301;
SELECT * FROM activities WHERE uuid_to_bin('d3b2b28b-c3d0-4c2d-8ed0-eef42855278a') = uuid; # 26330370
SELECT * FROM participants WHERE activity_id = 26330370;
SELECT * FROM teams WHERE id = 375;
select * from playbooks where team_id = 375;
select * from stages where crm_configuration_id = 301 and type = 'opportunity';
select * from teams;
select * from contact_roles;
SELECT * FROM opportunities WHERE team_id = 343 and user_id = 12871 and close_date >= '2024-11-01';
select * from users u join crm_profiles cp on cp.user_id = u.id where u.team_id = 343;
SELECT * FROM crm_field_data WHERE object_id = 3771706;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 343
and sa.provider = 'hubspot';
SELECT * FROM crm_fields WHERE crm_configuration_id = 301 and object_type = 'opportunity'
and crm_provider_id LIKE "%traffic_light%";
SELECT * FROM crm_field_values WHERE crm_field_id IN (144020,144048,144111,144113,144126,144481,144508,144531);
SELECT fd.* FROM opportunities o
JOIN crm_field_data fd ON o.id = fd.object_id
WHERE o.team_id = 343
# and o.user_id IS NOT NULL
and fd.crm_field_id IN (144020,144048,144111,144113,144126,144481,144508,144531)
and fd.value != ''
order by value desc
# group by o.id
;
SELECT * FROM opportunities WHERE id = 3769843;
SELECT * FROM teams WHERE name LIKE '%Tour%'; # 187,209,8150, [EMAIL]
SELECT * FROM crm_layouts WHERE crm_configuration_id = 209;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 682;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Funding Circle%'; # 220,177,8603,[EMAIL]
SELECT * FROM activities WHERE uuid_to_bin('7a40e99b-3b37-4bb1-b983-325b81801c01') = uuid; # 23139839
SELECT * FROM opportunities WHERE id = 3855992;
SELECT * FROM users WHERE name LIKE '%Angus Pollard%'; # 8988
SELECT * FROM teams WHERE name LIKE '%Story Terrace%'; # 379, 307, 12894
SELECT * FROM crm_fields WHERE crm_configuration_id = 307 and object_type != 'opportunity';
select * from contacts where team_id = 379 and name like '%bebro%'; # 5874411, crm: 77229348507
SELECT * FROM crm_field_data WHERE object_id = 5874411;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 379
and sa.provider = 'hubspot';
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%mentio%'; # 117, 94, 6371, [EMAIL]
SELECT * FROM activities WHERE uuid_to_bin('82939311-1af0-4506-8546-21e8d1fdf2c1') = uuid;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Tourlane%'; # 187, 209, 8150, [EMAIL]
SELECT * FROM opportunities WHERE team_id = 187 and crm_provider_id = '006Se000008xfvNIAQ'; # 3537793
select * from generic_ai_prompts where subject_id = 3537793;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Lunio%'; # 120, 97, 10984, [EMAIL]
SELECT * FROM crm_configurations WHERE id = 97;
SELECT * FROM crm_layouts WHERE crm_configuration_id = 97;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 355;
SELECT * FROM crm_fields WHERE id = 32682;
select cfd.value, o.* from opportunities o
join crm_field_data cfd on o.id = cfd.object_id and cfd.crm_field_id = 32682
where team_id = 120
and cfd.value != ''
;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 120
and sa.provider = 'salesforce';
select * from opportunities where team_id = 120 and crm_provider_id = '006N1000007X8MAIA0';
SELECT * FROM crm_field_data WHERE object_id = 2313439;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE id = 410;
SELECT * FROM teams WHERE name LIKE '%Local Business Oxford%';
select * from scorecards where team_id = 410;
select * from scorecard_rules;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Funding%'; # 220, 177, 8603, [EMAIL]
select * from activities a
join opportunities o on a.opportunity_id = o.id
join users u on o.user_id = u.id
where a.crm_configuration_id = 177 and a.type LIKE '%email-out%'
# and a.actual_end_time > '2024-12-16 00:00:00'
# and o.remotely_created_at > '2024-12-01 00:00:00'
# and u.group_id = 1014
and u.id = 9021
order by a.id desc;
SELECT * FROM opportunities WHERE id in (3981384,4017346);
SELECT * FROM users WHERE team_id = 220 and id IN (8775, 11435);
select * from users where id = 9021;
select * from inboxes where user_id = 9021;
select * from inbox_emails where inbox_id = 1349 and email_date > '2024-12-18 00:00:00';
select * from email_messages where team_id = 220
and orig_date > '2024-12-16 00:00:00' and orig_date < '2024-12-19 00:00:00'
and subject LIKE '%Personal%'
# and 'from' = '[EMAIL]'
;
select * from activities a
join opportunities o on a.opportunity_id = o.id
where a.user_id = 9021 and a.type LIKE '%email-out%'
and a.actual_end_time > '2024-12-18 00:00:00'
and o.user_id IS NOT NULL
and o.remotely_created_at > '2024-12-01 00:00:00'
order by a.id desc;
SELECT * FROM opportunities WHERE team_id = 220 and name LIKE '%Right Car move Limited%' and id = 3966852;
select * from activities where crm_configuration_id = 177 and type LIKE '%email%' and opportunity_id = 3966852 order by id desc;
select * from team_settings where name IN ('useCloseDate');
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Hurree%'; # 104, 81, 6175, [EMAIL]
SELECT * FROM opportunities WHERE team_id = 104 and name = 'PropOp';
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 104
and sa.provider = 'hubspot';
select * from crm_configurations where last_synced_at > '2025-01-19 01:00:00'
select * from teams where crm_id IS NULL;
select t.name as 'team', u.name as 'owner', u.email, u.phone
from teams t
join activity_providers ap on t.id = ap.team_id
join users u on t.owner_id = u.id
where 1=1
and t.status = 'active'
and ap.is_enabled = 1
# and u.status = 1
and ap.provider = 'ms-teams';
select * from crm_configurations where provider = 'bullhorn'; # 344
SELECT * FROM teams WHERE id = 442; # 14293
select * from users where team_id = 442;
select * from social_accounts sa where sa.sociable_id = 14293;
select * from invitations where team_id = 442;
# [PASSWORD_DOTS]
SELECT * FROM users WHERE email LIKE '%[EMAIL]%'; # 14022
SELECT * FROM teams WHERE id = 429;
select * from opportunities where team_id = 429 and crm_provider_id IN (16157415775, 22246219645);
select * from activities where opportunity_id in (4340436,4353519);
select * from transcription where activity_id IN (25630961,25381771);
select * from generic_ai_prompts where subject_id IN (4353519);
SELECT
a.id as activity_id,
a.opportunity_id,
a.type as activity_type,
a.language,
CONCAT(a.title, a.description) AS mail_content,
e.from AS mail_from,
e.to AS mail_to,
e.subject AS mail_subject,
e.body AS mail_body,
p.type as prompt_type,
p.status as prompt_status,
p.content AS prompt_content,
a.actual_start_time as created_at
FROM activities a
LEFT JOIN ai_prompts p ON a.transcription_id = p.transcription_id AND p.deleted_at IS NULL
LEFT JOIN email_messages e ON a.id = e.activity_id
WHERE a.actual_start_time > '2024-01-01 00:00:00'
AND a.opportunity_id IN (4353519)
AND a.status IN ('completed', 'received', 'delivered')
AND a.deleted_at IS NULL
AND a.type NOT IN ('sms-inbound', 'sms-outbound')
ORDER BY a.opportunity_id ASC, a.id ASC;
SELECT * FROM users WHERE name LIKE '%George Fierstone%'; # 14293
SELECT * FROM teams WHERE id = 442;
SELECT * FROM crm_configurations WHERE id = 344;
select * from team_features where team_id = 442;
select * from groups where team_id = 442;
select * from playbooks where team_id = 442;
select * from playbook_categories where playbook_id = 1729;
select * from crm_fields where crm_configuration_id = 344 and id = 172024;
SELECT * FROM crm_field_values WHERE crm_field_id = 172024;
select * from crm_layouts where crm_configuration_id = 344;
select * from playbook_layouts where playbook_id = 1729;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Learning%'; # 260, 221, 9444
select s.*
# , s.sent_at, u.name, a.*
from activity_summary_logs s
inner join activities a on a.id = s.activity_id
inner join users u on u.id = a.user_id
where a.crm_configuration_id = 356
and s.sent_at > date_sub(now(), interval 60 day)
order by a.actual_end_time desc;
select * from activities a
# inner join activity_summary_logs s on s.activity_id = a.id
where a.crm_configuration_id = 356 and a.actual_end_time > date_sub(now(), interval 60 day)
# and a.crm_provider_id is not null
# and provider <> 'ringcentral'
and status = 'completed'
order by a.actual_end_time desc;
select * from teams order by id desc; # 17328, 32, 17830, [EMAIL]
SELECT * FROM users;
SELECT * FROM users where team_id = 260 and status = 1; # 201 - 150 active
SELECT * FROM teams WHERE id = 260;
select * from team_settings where team_id = 260;
select * from crm_configurations where team_id = 260;
SELECT * FROM crm_layouts WHERE crm_configuration_id = 356;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 1184;
select * from accounts where crm_configuration_id = 221 order by id desc; # 7000
select * from leads where crm_configuration_id = 221 order by id desc; # 0
select * from contacts where crm_configuration_id = 221 order by id desc; # 200 000
select * from opportunities where crm_configuration_id = 221 order by id desc; # 0
select * from crm_profiles where crm_configuration_id = 221 order by id desc; # 23
select * from crm_fields where crm_configuration_id = 221;
select * from crm_field_values where crm_field_id = 5302 order by id desc;
select * from crm_layouts where crm_configuration_id = 221 order by id desc;
select * from stages where crm_configuration_id = 221 order by id desc;
select * from accounts where crm_configuration_id = 356 order by id desc; # 7000
select * from leads where crm_configuration_id = 356 order by id desc; # 0
select * from contacts where crm_configuration_id = 356 order by id desc; # 200 000
select * from opportunities where crm_configuration_id = 356 order by id desc; # 0
select * from crm_profiles where crm_configuration_id = 356 order by id desc; # 23
select * from crm_fields where crm_configuration_id = 356;
select * from crm_field_values where crm_field_id = 5302 order by id desc;
select * from crm_layouts where crm_configuration_id = 356 order by id desc;
select * from stages where crm_configuration_id = 356 order by id desc;
select * from playbooks where team_id = 260 order by id desc; # 4 (2 deleted)
select * from groups where team_id = 260 order by id desc; # 27 groups, (2 deleted)
select * from playbook_layouts where playbook_id IN (1410,1409,1276,1254); # 4
select ce.* from calendars c
join users u on c.user_id = u.id
join calendar_events ce on c.id = ce.calendar_id
where u.team_id = 260
and (ce.start_time > '2025-02-21 00:00:00')
;
# calendar events 1207
#
select * from opportunities where team_id = 260;
SELECT * FROM crm_field_data WHERE object_id = 4696496;
select * from activities where crm_configuration_id = 356 and crm_provider_id IS NOT NULL;
select * from activities where crm_configuration_id IN (221) and provider NOT IN ('ms-teams', 'uploader', 'zoom-bot')
# and type = 'conference' and status = 'scheduled' and activities.is_internal = 0
and created_at > '2024-03-01 00:00:00'
order by id desc; # 880 000, ringcentral, avaya
SELECT * FROM participants WHERE activity_id = 26371744;
# all activities 942 000 +
# conference 7385 - scheduled 984 - external 343
select * from activities where id = 26321812;
select * from participants where activity_id = 26321812;
select * from participants where activity_id in (26414510,26414514,26414516,26414604,26414653,26414655);
select * from leads where id in (720428,689175,731546,645866,621037);
select * from users where id = 13841;
select * from opportunities where user_id = 9541;
select * from stages where id = 15900;
select * from accounts where
# id IN (4160055,5053725,4965303,4896434)
id in (4584518,3249934,3218025,3891133,3399450,4172999,4485161,3101785,4587203,3070816,2870343,2870341,3563940,4550846,3424464,3249963,2870342)
;
select * from activities where id = 26654935;
SELECT * FROM opportunities WHERE id = 4803458;
SELECT * FROM opportunities where team_id = 260 and user_id = 13841 AND stage_id = 15900;
SELECT id, uuid, provider, type, lead_id, account_id, contact_id, opportunity_id, stage_id, status, recording_state, title, actual_start_time, actual_end_time
FROM activities WHERE user_id = 13841 AND opportunity_id IN (4729783, 4731717, 4731726, 4732064, 4732849, 4803458, 4813213);
SELECT DISTINCT
o.id, o.stage_id, s.name, a.title,
a.*
FROM activities a
# INNER JOIN tracks t ON a.id = t.activity_id
INNER JOIN users u ON a.user_id = u.id
INNER JOIN teams team ON u.team_id = team.id
INNER JOIN groups g ON u.group_id = g.id
INNER JOIN opportunities o ON a.opportunity_id = o.id
INNER JOIN stages s ON o.stage_id = s.id
WHERE
a.crm_configuration_id = 356
AND a.status IN ('completed', 'failed')
AND a.recording_state != 'stopped'
# and a.user_id = 13841
AND u.uuid = uuid_to_bin('6f40e4b8-c340-4059-b4ac-1728e87ea99e')
AND team.uuid = uuid_to_bin('a607fba7-452e-4683-b2af-00d6cb52c93c')
AND g.uuid = uuid_to_bin('b5d69e40-24a0-4c16-810b-5fa462299f94')
AND a.type IN ('softphone', 'softphone-inbound', 'conference', 'sms-inbound', 'sms-outbound')
# AND t.type IN ('audio', 'video')
AND (
(a.actual_start_time BETWEEN '2025-03-13 00:00:00' AND '2025-03-18 07:59:59')
OR
(
a.actual_start_time IS NULL
AND a.type IN ('sms-outbound', 'sms-inbound')
AND a.created_at BETWEEN '2025-03-13 00:00:00' AND '2025-03-18 07:59:59'
)
)
AND (
a.is_private = 0
OR (
a.is_private = 1
AND u.uuid = uuid_to_bin('6f40e4b8-c340-4059-b4ac-1728e87ea99e')
)
)
AND (
# s.id = 15900
s.uuid = uuid_to_bin('04ca1c26-c666-4268-a129-419c0acffd73')
OR s.uuid IS NULL -- Include records without opportunity stage
)
ORDER BY a.actual_end_time DESC;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Lead Forensics%'; # 190, 162, 8474, [EMAIL]
SELECT * FROM users WHERE team_id = 190;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 190
and sa.provider = 'hubspot';
select * from role_user where user_id = 8474;
select * from crm_configurations where provider = 'bullhorn';
SELECT * FROM opportunities WHERE uuid_to_bin('94578249-65ec-4205-90f2-7d1a7d5ab64a') = uuid;
SELECT * FROM users WHERE uuid_to_bin('26dbadeb-926f-4150-b11b-771b9d4c2f9a') = uuid;
SELECT * FROM opportunities WHERE id = 4732493;
select * from activities where opportunity_id = 4732493;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE id = 443; # 358, 14315, [EMAIL]
SELECT * FROM opportunities WHERE team_id = 443;
SELECT a.id, a.type, a.user_id, a.status, a.deleted_at, u.name, u.email, u.team_id as activity_team_id, u.status, u.deleted_at, t.name, t.status, s.team_id as stage_team_id
FROM activities AS a
JOIN stages AS s ON a.stage_id = s.id
JOIN users AS u ON u.id = a.user_id
JOIN teams AS t ON t.id = s.team_id
WHERE u.team_id <> s.team_id and t.id > 135;
SELECT
crm_configuration_id,
crm_provider_id,
COUNT(*) as duplicate_count,
GROUP_CONCAT(id) as stage_ids,
GROUP_CONCAT(name) as stage_names
FROM stages
GROUP BY crm_configuration_id, crm_provider_id
HAVING COUNT(*) > 1
ORDER BY duplicate_count DESC;
select * from stages where id IN (14898,14907);
select * from business_processes;
SELECT *
FROM crm_configurations
WHERE team_id IN (
SELECT team_id
FROM crm_configurations
GROUP BY team_id
HAVING COUNT(*) > 1
)
ORDER BY team_id;
SELECT *
FROM teams
WHERE crm_id IN (
SELECT crm_id
FROM teams
GROUP BY crm_id
HAVING COUNT(*) > 1
)
ORDER BY crm_id;
# [PASSWORD_DOTS]
select * from crm_configurations where provider = 'integration-app';
SELECT * FROM teams WHERE id = 443; # Correre Naturale 358 14315 [EMAIL]
select * from activities where crm_configuration_id = 358 order by actual_end_time desc;
select id, uuid, actual_end_time, crm_provider_id, is_internal, playbook_category_id, type, user_id, lead_id, contact_id, account_id, opportunity_id, status, title from activities where crm_configuration_id = 358 order by actual_end_time desc;
select * from team_features where team_id = 358;
select * from activity_summary_logs;
select * from teams where id = 406;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Sportfive%'; # 267, 202, 14637, [EMAIL]
select * from activities where crm_configuration_id = 202 order by actual_end_time desc;
SELECT * FROM users where id = 14637;
SELECT * FROM teams where id = 267;
SELECT * FROM groups where id = 1118;
select g.name, a.title, uuid_from_bin(a.uuid), a.external_id, a.status, a.recording_state, a.recording_reason_code, a.scheduled_start_time, a.scheduled_end_time, a.actual_start_time, a.actual_end_time from activities a
inner join users u on u.id = a.user_id
inner join groups g on g.id = u.group_id
where a.crm_configuration_id = 202
and a.is_internal = 0
and (a.scheduled_start_time between '2025-03-19 00:00:00' and '2025-03-21 00:00:00')
and a.type = 'conference'
and a.status != 'completed'
and a.external_id is not null
order by a.scheduled_start_time desc;
SELECT * FROM activities
WHERE crm_configuration_id = 202
AND status IN ('completed', 'failed')
AND recording_state != 'stopped'
AND type IN ('softphone', 'softphone-inbound', 'conference', 'sms-inbound', 'sms-outbound')
AND (is_private = 0 OR user_id = 14637)
AND (
(
actual_start_time BETWEEN '2025-03-12 12:00:00' AND '2025-03-24 11:59:59'
) OR (
actual_start_time IS NULL
AND type IN ('sms-outbound', 'sms-inbound')
AND created_at BETWEEN '2025-03-12 12:00:00' AND '2025-03-24 11:59:59'
)
)
AND NOT EXISTS (
SELECT 1
FROM tracks
WHERE
tracks.activity_id = activities.id
AND tracks.type IN ('audio', 'video')
)
ORDER BY actual_end_time DESC;
SELECT DISTINCT
a.*
FROM activities a
INNER JOIN tracks t ON a.id = t.activity_id
INNER JOIN users u ON a.user_id = u.id
INNER JOIN teams team ON u.team_id = team.id
WHERE
a.crm_configuration_id = 202
AND a.status IN ('completed', 'failed')
AND a.recording_state != 'stopped'
# and a.user_id = 14637
AND a.type IN ('softphone', 'softphone-inbound', 'conference', 'sms-inbound', 'sms-outbound')
# AND t.type IN ('audio', 'video')
AND (
(a.actual_start_time BETWEEN '2025-03-12 12:00:00' AND '2025-03-24 11:59:59')
OR
(
a.actual_start_time IS NULL
AND a.type IN ('sms-outbound', 'sms-inbound')
AND a.created_at BETWEEN '2025-03-12 12:00:00' AND '2025-03-24 11:59:59'
)
)
AND (
a.is_private = 0
OR (
a.is_private = 1
AND a.user_id = 14637
)
)
ORDER BY a.actual_end_time DESC
;
SELECT DISTINCT a.*
FROM activities a
INNER JOIN users u ON a.user_id = u.id
INNER JOIN teams t ON u.team_id = t.id
# INNER JOIN tracks tr ON a.id = tr.activity_id
# INNER JOIN groups g ON u.group_id = g.id
WHERE 1=1
AND t.id = 267
# AND t.uuid = uuid_to_bin('aed4927b-f1ea-499e-94c3-83762fd233e8')
AND a.status IN ('completed', 'failed')
AND a.recording_state != 'stopped'
AND a.type IN ('softphone', 'softphone-inbound', 'conference', 'sms-inbound', 'sms-outbound')
# AND tr.type NOT IN ('audio', 'video')
AND (
a.is_private = 0
OR a.user_id = 14637
)
AND (
(a.actual_start_time BETWEEN '2025-03-19 00:00:00' AND '2025-03-21 23:59:59')
OR (
a.actual_start_time IS NULL
AND a.type IN ('sms-outbound', 'sms-inbound')
AND a.created_at BETWEEN '2025-03-19 00:00:00' AND '2025-03-21 23:59:59'
)
)
# and NOT EXISTS (
# SELECT 1
# FROM tracks t
# WHERE t.activity_id = a.id
# AND t.type IN ('audio', 'video')
# )
ORDER BY a.actual_end_time DESC;
SELECT * FROM tracks WHERE activity_id = 26485995;
select a.is_private, a.title, uuid_from_bin(a.uuid), a.external_id, a.status, a.recording_state, a.recording_reason_code, a.scheduled_start_time, a.scheduled_end_time, a.actual_start_time, a.actual_end_time from activities a
inner join users u on u.id = a.user_id
where a.crm_configuration_id = 202
# and a.is_internal = 0
and (a.actual_start_time between '2025-03-19 00:00:00' and '2025-03-21 00:00:00')
and a.type IN ("softphone","softphone-inbound","conference","sms-inbound")
and a.status IN ('completed', 'failed')
# and a.external_id is not null
order by a.actual_end_time desc;
select * from activities a where a.crm_configuration_id = 202
and a.actual_start_time between '2025-03-20 00:00:00' and '2025-03-21 00:00:00'
# AND a.type IN ('softphone', 'softphone-inbound', 'conference', 'sms-inbound', 'sms-outbound')
select g.name, a.title, uuid_from_bin(a.uuid), a.external_id, a.status, a.recording_state, a.recording_reason_code, a.scheduled_start_time, a.scheduled_end_time, a.actual_start_time, a.actual_end_time from activities a
inner join users u on u.id = a.user_id
inner join groups g on g.id = u.group_id
where a.crm_configuration_id = 202
and a.is_internal = 0
and (a.scheduled_start_time between '2025-03-19 00:00:00' and '2025-03-21 00:00:00')
and a.type = 'conference'
and a.status != 'completed'
and a.external_id is not null
order by a.scheduled_start_time desc;
SELECT * FROM teams WHERE name LIKE '%Tourlane%';
SELECT * FROM crm_fields WHERE crm_configuration_id = 209 and object_type = 'opportunity';
SELECT * FROM crm_field_data WHERE crm_field_id = 98809;
select * from users where status = 1 AND timezone = 'MDT';
select * from opportunities where id = 3769814;
select * from deal_risks where opportunity_id = 3769814;
select cp.* from crm_profiles cp
join users u on cp.user_id = u.id
join crm_configurations crm on cp.crm_configuration_id = crm.id
where crm.provider = 'hubspot' AND u.status = 1 AND log_notes != 'none';
select * from crm_fields where id = 154575;
select * from team_features where feature = 'SUPPORTS_SYNC_MISSING_CALL_DISPOSITIONS';
SELECT * FROM teams WHERE id = 176; # crm 148
select * from activities where crm_configuration_id = 148 and provider = 'hubspot' order by id desc;
select * from activity_providers where provider = 'amazon-connect';
select * from crm_fields cf
join crm_configurations crm on crm.id = cf.crm_configuration_id
where crm.provider = 'hubspot' and cf.object_type IN ('account', 'contact');
# [PASSWORD_DOTS]
SELECT * FROM users WHERE id IN (15415, 15418);
SELECT * FROM groups WHERE id IN (1805,1806);
SELECT * FROM playbooks WHERE id = 1860;
SELECT * FROM playbook_categories WHERE id = 38634;
SELECT * FROM crm_fields WHERE id = 189962;
SELECT * FROM teams WHERE name = 'Pulsar Group'; # 472, 380, 15138 [EMAIL]
SELECT * FROM crm_profiles WHERE user_id = 15415;
SELECT * FROM social_accounts WHERE sociable_id = 15415 and provider = 'salesforce';
select * from sidekick_settings where team_id = 472;
SELECT * FROM activities WHERE uuid_to_bin('452c58c7-b87c-4fdd-953e-d7af185e9588') = uuid; # 28617536, user: 15418
SELECT * FROM activities WHERE uuid_to_bin('399114ee-d3a8-458c-bff5-5f654658db0a') = uuid; # 28344407, user: 15415
SELECT * FROM activities WHERE uuid_to_bin('f0aa567f-0ab1-4bbb-96aa-37dcf184676b') = uuid; # 28580288, user: 15415
SELECT * FROM activities WHERE uuid_to_bin('50c086b1-2770-4bca-b5ae-6bac22ec426b') = uuid; # 28566069, user: 15415
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%TeamTailor%'; # 109, 218, 13969, [EMAIL]
select * from crm_configurations where id = 218;
SELECT * FROM activities WHERE uuid_to_bin('e39b5857-7fdb-4f5a-951a-8d3ca69bb1b0') = uuid; # 28338765
SELECT * FROM users WHERE id IN (13232, 13230);
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 109
and sa.provider = 'salesforce';
0057R00000EPL5HQAX Inez Ekblad
1091cb81-5ea1-4951-a0ed-f00b568f0140 Triman Kaur
SELECT * FROM crm_profiles WHERE user_id IN (13232, 13230);
############################################################################################
SELECT * FROM activities WHERE uuid_to_bin('675eeaeb-5681-42db-90bc-54c07a604408') = uuid; # 28655939 00UVg00000FLvnSMAT
SELECT * FROM crm_field_data WHERE activity_id = 28655939;
SELECT * FROM crm_fields WHERE id IN (94491,94493,94498);
SELECT * FROM users WHERE id = 13658;
SELECT * FROM teams WHERE id = 109;
SELECT * FROM crm_configurations WHERE id = 218;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 109
and sa.provider = 'salesforce';
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Strengthscope%'; # 481, 390, 15420, [EMAIL]
SELECT * FROM stages WHERE crm_configuration_id = 390;
select * from business_processes where team_id = 481 and crm_configuration_id = 390;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 481
and sa.provider = 'salesforce';
SELECT * FROM users WHERE id = 15780; # team 462
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 462
and sa.provider = 'hubspot';
select * from teams where id = 495;
SELECT * FROM users WHERE id = 15794;
select * from social_accounts where sociable_id = 15794;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Flight%'; # 427, 333, 13752
SELECT * FROM accounts WHERE team_id = 427 and crm_provider_id = '668731000183444517';
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Group GTI%'; # 495, 407, 15794
SELECT * FROM activities WHERE crm_configuration_id = 407
and status = 'completed' and type = 'conference'
order by id desc;
select ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id
join permission_role pr on pr.role_id = ru.role_id
join permissions p on p.id = pr.permission_id
where team_id = 495 and p.name IN ('dial');
select * from permission_role;
select * from activities where crm_configuration_id = 407 and status = 'completed' order by id desc;
SELECT * FROM activities WHERE id = 29512773;
SELECT * FROM activities WHERE id IN (29042721,28991325,29002874);
SELECT al.* from activity_summary_logs al join activities a on a.id = al.activity_id
where a.crm_configuration_id = 407
# and a.id IN (29042721,28991325,29002874);
SELECT * FROM users WHERE id = 15794;
SELECT * FROM users WHERE team_id = 495;
SELECT * FROM social_accounts WHERE sociable_id = 15794;
SELECT * FROM opportunities WHERE team_id = 495 and name like '%OC:%';
SELECT * FROM contacts WHERE team_id = 495;
SELECT * FROM leads WHERE team_id = 495;
SELECT * FROM accounts WHERE team_id = 495;
SELECT * FROM crm_profiles WHERE crm_configuration_id = 407;
SELECT * FROM crm_fields WHERE crm_configuration_id = 407;
SELECT * FROM crm_configurations WHERE id = 407;
SELECT * FROM opportunities WHERE team_id = 495 and close_date BETWEEN '2025-06-01' AND '2025-07-01'
and user_id IS NOT NULL and is_closed = 1 and is_won = 1;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Hamilton Court FX LLP%'; # 249, 187, 10103
SELECT * FROM activities WHERE uuid_to_bin('4659c2bb-9a49-484e-9327-a3d66f1e028c') = uuid; # 28951064
SELECT * FROM crm_fields WHERE crm_configuration_id = 187 and object_type IN ('tasks', 'event');
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Checkstep%'; # 325, 256, 11753
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 325
and sa.provider = 'hubspot';
SELECT * FROM activities WHERE uuid_to_bin('7be372e2-1916-4d79-a2f3-ca3db1346db3') = uuid; # 28611085
SELECT * FROM activities WHERE uuid_to_bin('980f0336-840b-4185-a5a9-30cf8b0749a8') = uuid; # 28719733
SELECT * FROM activity_summary_logs where activity_id = 28719733;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Learning%'; # 260, 356, 9444
SELECT * FROM activity_summary_logs where sent_at BETWEEN '2025-06-09 11:38:00' AND '2025-06-09 11:40:00';
SELECT * FROM leads WHERE crm_configuration_id = 356 and crm_provider_id = '230045001502770504'; # 823630
select * from activities where crm_configuration_id = 356 and lead_id = 841732;
SELECT * from activity_summary_logs al join activities a on a.id = al.activity_id
where a.crm_configuration_id = 356;
select * from activities where crm_configuration_id = 356
and actual_end_time between '2025-06-09 11:00:00' and '2025-06-09 12:00:00'
order by id desc;
select * from accounts where crm_configuration_id = 356 and crm_provider_id = '230045001514403366' order by id desc;
select * from leads where crm_configuration_id = 356 and crm_provider_id = '230045001514275654' order by id desc;
select * from contacts where crm_configuration_id = 356 and crm_provider_id = '230045001514403366' order by id desc;
select * from opportunities where crm_configuration_id = 356 and crm_provider_id = '230045001514403366' order by id desc;
select * from team_features where team_id = 260;
select * from features where id IN (1,2,4,6,18,19,20,9,10,3,23,24,25,26,27);
SELECT * FROM activities WHERE uuid_to_bin('7be372e2-1916-4d79-a2f3-ca3db1346db3') = uuid;
select * from crm_fields;
select * from crm_layout_entities;
SELECT * FROM teams WHERE name LIKE '%Optable%';
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Teamtailor%'; # 109, 218, 13969
SELECT * FROM crm_configurations WHERE id = 218;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 109
and sa.provider = 'salesforce';
SELECT * FROM activities WHERE uuid_to_bin('675eeaeb-5681-42db-90bc-54c07a604408') = uuid; # 28655939
SELECT * FROM crm_field_data WHERE activity_id = 28655939;
SELECT * FROM crm_fields WHERE id in (94491,94493,94498);
select * from teams where crm_id IS NULL;
SELECT * FROM activities WHERE uuid_to_bin('71aa8a0c-9652-4ff6-bee7-d98ae60abef6') = uuid;
# [PASSWORD_DOTS]
select * from team_domains where team_id = 399;
SELECT * FROM teams WHERE name LIKE '%Rydoo%'; # 399, 318, 13207
select * from calendar_events where id = 5163781;
SELECT * FROM activities WHERE uuid_to_bin('be2cbc52-7fda-46a0-9ae0-25d9553eafc0') = uuid; # 29443896
SELECT * FROM participants WHERE activity_id = 29443896;
select * from contacts where crm_configuration_id = 318 and email = '[EMAIL]';
select * from leads where crm_configuration_id = 318 and email = '[EMAIL]';
select * from activities where user_id = 14937 order by created_at ;
select * from users where id = 14937;
select * from contacts where crm_configuration_id = 318 and email LIKE '%@strawberry.se';
select * from opportunities where crm_configuration_id = 318 and crm_provider_id = '006Sf00000D1WOAIA3';
select * from activities a join participants p on a.id = p.activity_id
where crm_configuration_id = 318 and a.updated_at > '2025-06-23T08:18:43Z';
# [PASSWORD_DOTS]
SELECT * FROM opportunities WHERE team_id = 379 and crm_provider_id = '39334518886';
SELECT * FROM opportunities WHERE team_id = 379 order by id desc;
SELECT * FROM teams WHERE id = 379;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 379 and sociable_id = 13852
and sa.provider = 'hubspot';
SELECT * FROM crm_configurations WHERE id = 307;
SELECT * FROM crm_layouts WHERE crm_configuration_id = 307;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 1027;
SELECT * FROM crm_fields WHERE crm_configuration_id = 307
and id IN (144750,144855,145158,155227);
SELECT * FROM activities;
select * from activities
where created_at > '2025-07-01 00:00:00'
# and created_at < '2025-08-01 00:00:00'
and type not in ('email-outbound', 'email-inbound')
and account_id is null
and contact_id is null
and lead_id is null
and opportunity_id is not null
;
SELECT * FROM activities WHERE id IN (25344155, 25344296, 25501909, 28692187);
SELECT * FROM crm_configurations WHERE id in (335,301,200);
select * from crm_fields where crm_configuration_id = 230 and crm_provider_id = 'Age2__c';
SELECT * FROM teams WHERE name LIKE '%Resights%';
select * from crm_fields where crm_configuration_id = 1 and object_type = 'opportunity';
select * from crm_configurations where provider = 'bullhorn'; # 344
select * from teams where id IN (442);
select * from activities
where crm_configuration_id = 177
and provider = 'amazon-connect'
order by id desc;
# and source <> 'gong';
select * from activity_providers where provider = 'amazon-connect';
SELECT * FROM activities WHERE uuid_to_bin('cec1993b-a7e5-4164-b74d-d680ea51d2f2') = uuid;
select * from crm_configurations where store_transcript = 1;
SELECT * FROM teams WHERE id IN (80);
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Sedna%'; # 277, 213, 12594
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 277
and sa.provider = 'salesforce';
select * from activities where crm_configuration_id = 213 and account_id = 2511502;
select * from crm_configurations where id = 213;
SELECT * FROM activities WHERE uuid_to_bin('35aa790a-8569-4544-8268-66f9a4a26804') = uuid; # 33981604
SELECT * FROM participants WHERE activity_id = 33981604;
SELECT * FROM crm_fields WHERE crm_configuration_id = 337 and object_type = 'task';
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 431
and sa.provider = 'salesforce';
SELECT * FROM activities WHERE uuid_to_bin('b5476c7d-19a8-491b-869d-676ea1e857b6') = uuid; # 33997223
select * from activity_summary_logs where activity_id = 33997223;
select * from activity_notes where activity_id =...
|
NULL
|
|
11026
|
218
|
1
|
2026-04-14T09:09:17.295322+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157757295_m1.jpg...
|
PhpStorm
|
faVsco.js – ActivitySearch.php
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Tests passed: 1
text/html
text/html
text/html
Proj Tests passed: 1
text/html
text/html
text/html
Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceT…Defaults
Rerun 'PHPUnit: AskJiminnyReportActivityServiceTest.testGetActivityIdsPassesNonZeroSequenceNumberToDisableFirstRequestDefaults'
Debug 'AskJiminnyReportActivityServiceTest.tes…uenceNumberToDisableFirstRequestDefaults'
Stop 'AskJiminnyReportActivityServiceTest.testGetActivityIdsPassesNonZeroSequenceNumberToDisableFirstRequestDefaults'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Tests passed: 1","depth":3,"value":"Tests passed: 1","help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny, but local branch is out of sync with remote","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AskJiminnyReportActivityServiceT…Defaults","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Rerun 'PHPUnit: AskJiminnyReportActivityServiceTest.testGetActivityIdsPassesNonZeroSequenceNumberToDisableFirstRequestDefaults'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AskJiminnyReportActivityServiceTest.tes…uenceNumberToDisableFirstRequestDefaults'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Stop 'AskJiminnyReportActivityServiceTest.testGetActivityIdsPassesNonZeroSequenceNumberToDisableFirstRequestDefaults'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-1117453743363212307
|
-7190066597166601333
|
click
|
hybrid
|
NULL
|
Tests passed: 1
text/html
text/html
text/html
Proj Tests passed: 1
text/html
text/html
text/html
Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceT…Defaults
Rerun 'PHPUnit: AskJiminnyReportActivityServiceTest.testGetActivityIdsPassesNonZeroSequenceNumberToDisableFirstRequestDefaults'
Debug 'AskJiminnyReportActivityServiceTest.tes…uenceNumberToDisableFirstRequestDefaults'
Stop 'AskJiminnyReportActivityServiceTest.testGetActivityIdsPassesNonZeroSequenceNumberToDisableFirstRequestDefaults'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
+SlackEDHomeDMSActivityFilesLater..•More+FileEditViewGoHistoryWindowHelpJiminny ...# Starredplatform-inner-teamChannels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product launches# random# releases# sofia-office# support# thank-yous# the_people_of jimi…..Direct messagesAneliya Angelova, ...Steliyan GeorgievAdelina Petrova, Ili.... Adelina PetrovaO. Calea Dimitravo→Search Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan GeorgievMessagesAdd canvas+Nikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтьрNikolay Yankov 11:01 AMДобреNikolay Yankov 11:39 AMя рьнни пак LukasLukas Kovalik 11:43 AMготовосьщотоCompetitive pitches беше втория нали такаNikolay Yankov 12:04 PMДа, там има 14 активитита, защо не сработи този пьт?Lukas Kovalik 12:05 PMпак изглежда sequenceгледам гоMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+Aa(ahlSupport Daily - in 2h 51 m100% C4Tue 14 Apr 12:09:1686 0Today ~...
|
11023
|
|
11027
|
219
|
3
|
2026-04-14T09:09:17.318819+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157757318_m2.jpg...
|
PhpStorm
|
faVsco.js – ActivitySearch.php
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Tests passed: 1
text/html
text/html
text/html
Proj Tests passed: 1
text/html
text/html
text/html
Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceT…Defaults
Rerun 'PHPUnit: AskJiminnyReportActivityServiceTest.testGetActivityIdsPassesNonZeroSequenceNumberToDisableFirstRequestDefaults'
Debug 'AskJiminnyReportActivityServiceTest.tes…uenceNumberToDisableFirstRequestDefaults'
Stop 'AskJiminnyReportActivityServiceTest.testGetActivityIdsPassesNonZeroSequenceNumberToDisableFirstRequestDefaults'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Tests passed: 1","depth":3,"bounds":{"left":0.94257814,"top":0.11180556,"width":0.0375,"height":0.011805556},"value":"Tests passed: 1","help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"bounds":{"left":0.94257814,"top":0.11180556,"width":0.0375,"height":0.011805556},"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.03046875,"top":0.017361112,"width":0.0453125,"height":0.022222223},"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"bounds":{"left":0.07578125,"top":0.017361112,"width":0.14960937,"height":0.022222223},"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny, but local branch is out of sync with remote","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"bounds":{"left":0.7589844,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AskJiminnyReportActivityServiceT…Defaults","depth":6,"bounds":{"left":0.7769531,"top":0.017361112,"width":0.12382813,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Rerun 'PHPUnit: AskJiminnyReportActivityServiceTest.testGetActivityIdsPassesNonZeroSequenceNumberToDisableFirstRequestDefaults'","depth":6,"bounds":{"left":0.9007813,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AskJiminnyReportActivityServiceTest.tes…uenceNumberToDisableFirstRequestDefaults'","depth":6,"bounds":{"left":0.9140625,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Stop 'AskJiminnyReportActivityServiceTest.testGetActivityIdsPassesNonZeroSequenceNumberToDisableFirstRequestDefaults'","depth":6,"bounds":{"left":0.9273437,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.940625,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96015626,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9734375,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9867188,"top":0.017361112,"width":0.013281226,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-1117453743363212307
|
-7190066597166601333
|
click
|
hybrid
|
NULL
|
Tests passed: 1
text/html
text/html
text/html
Proj Tests passed: 1
text/html
text/html
text/html
Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceT…Defaults
Rerun 'PHPUnit: AskJiminnyReportActivityServiceTest.testGetActivityIdsPassesNonZeroSequenceNumberToDisableFirstRequestDefaults'
Debug 'AskJiminnyReportActivityServiceTest.tes…uenceNumberToDisableFirstRequestDefaults'
Stop 'AskJiminnyReportActivityServiceTest.testGetActivityIdsPassesNonZeroSequenceNumberToDisableFirstRequestDefaults'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
PhpStormFileEditViewNavigateCodeLaravelRefactorFV faVsco.s v#11894 on JY-18909-automated-reports-ask-iminny K vProject v© ReportController.phpToolsWindowHelpJiminnybeouecommana.ong= custom.log= laravel.logA SF [jiminny@localhost]A HS_local [jiminny@localhost]A console [PROD]v _ ServiceAulomaleakeporscommand.ono< console LUlconsole SlAGiNG© AskJiminnyReportActivityService.php© ActivitySearch.php x© ActivityApiSearch.ph© ActivitySearch.php© AutomatedReportsSendCommand.php© AddLayoutEntities.php© AskJiminnyReportActivityServiceTest.phpRequestGenerateAskJiminnyReportJobTest.php© UserOptionsByGrour© Team.php© AutomatedReportsRepository.php X<?php© AbstractStageFilterDefil© AutomatedReportsService.phpC CreateHeldActivityEvent.phpActivitySearchServicePrdeclare(strict_types=1);C DeallnsightsPeriodFilter(e) TrackProvidernstallled-vent.ono0 DealinsidnisPeriodriltennamespace Jiminny\Component\ActivitySearch\Service;g FilterDetinition.php© CreateActivityLoggedEvent.php(©) ActivityLogged.php© UserPilotActivityListener.php(C) AutomatedReportsCallbackService.phpc rterverntoncolectousec rterverntoncuev.on© FilterDefinitionQueryColclass ActivitySearch© AutomatedReportResult.php• FilteredValueContainerli© IntMinMaxRange.php© RequestGenerateAskJiminnyReportJob.phpRequestGenerateReportJob.php(C) AutomatedReport.php[ AiActivityTypeclass Automacedкeрortskepo o:B15 X4 ^7 usagesprivate Container $container;[ AiAutomationD AiCallScoringpublic function __construct(Container $container){.}* Oreturn AutomatedReportD AskAnythingD AskJiminnyAipublic function getOnDemandPageFilters(): FilterDefinitionCollectionf...}DAWS• BillingManagementCache• CoachingFeedback> D CountryD CustomerApi35373839• DatabaseC DatadogC DateTimeDeallnsights• Dealkisks> IEasuicsearchpublic function create(array $data): Automate106107/**-108* Find an automated report by UUID109110* @param string $uvid111112* Oreturn AutomatedReport|null113114public function findByUuid(string $uvid): ?Al]115return AutomatedReport: :where('uvid', Aut118public function get0nDemandPageFilterSet(Criteria $criteria, User $consumer): FilterDefinitreturn $this->getOnDemandPageFilters()-›withCriteria($criteria)-›withConsumer ($consumer)->withRestrictions($consumer->getTeam()):› D Eloquent> DEncoding9 usages1 usage> M Encryption117public function getArrayFilterKeys(User $consumer): arrayf...}DESpubLie tunction tinabytaurousdlstring eiaurul 136> D Faker1 usage• FeatureFlagsif (is_numeric($id0rUuid)) {return AutomatedReport:: find((int) $1]private function getTeamInsightsPageFilters(bool $isExport = false): FilterDefinitionCollecO FFMpeg• FileSystemD GeckoD GongGuzzleHttp198return AutomatedReport: :where('uvid', Aut199200KeyPoints• Kiosk1 usageprivate function getDealInsightsPageFilters(bool $useCreatedDate = false,booL pincLudebeallype = ralse.oool mneuudertoeune = tause): FilterDefinitionCollection {..}M LanquadeDetectionLiveFeedD Locks• Math• MediaPipeline• MeetingBot_ MobileSettings| ModelNotiticationD Nudge> [ ParagraphBreakerM ParticipantSpeechPartitionedCookie12402* Retrieve all standard (non-ASk Liminay) al 232* oodral sarno osorccocunn233The column tl 234*dearal string ssortosrection the sort dam 235236* Oreturn Collection<AutomatedReport>237— 24412 usagespublic function getAllStandardReports(string $sortColumn = 'created_at',string $sortDirection = 'desc'): Collection f...}/**245— 2462471248public function getTeamInsightsPageFilterSet(Criteria $criteria,User $consumer,bool $isExport = false): FilterDefinitionCollection i...rpublic function getDealInsightsPageFilterSet(Criteria $criteria,user consunen): FilterDefinitionCollectionf...}D PlaybackPageD PlaylistL07* Retrieve all ASK Lininny reports created k2601 usagepublic function getTeamAiAutomationFilterSet(Criteria $criteria,User $consumerWindsurf changelog 2.12.21: A new version is available. // View Changelog (today 10:33)40j Support Daily • in 2h 51 mAL AskJiminnyReportActivityServiceT….Defaults100% |45]Tue 14 Apr 12:09:16CascadeFixing ReportControllerAutomated Report MarFixing Ask Jiminny Rep+D ...Now let's run the test to verifvtests/Unxt/Servsces/Kiosk/Automate/meports/AskJ1minnyreportActivätyserviceTest-php --no-coverageloul nor oen Indlr tler var w nunwarusanCommand dockerdoster nxe ceockes /kJosk/AuP /ape/a/poras/A5kJ1minyReportActivityServiceTest. php --no-coverageCould not open input file: /app/artisanCommand dockeroocker exec oocker vand ioash -d"cd /var/www&& php artisan testLests unlu services Klosk Aucomaceakeporcs AskJiminnykeportAccivityservicelest.ono =-no-coverade D&l'Could not open input file: artisanCommand docken• docker exec docker_lamp_1 bash -c "find / -name artisan -maxdepth 6 2>/dev/null | head -5"/home/jiminny/artisan"cd /homee/jiminny && php artisan testtests/nxe erckee/Kio5/AutonateReports/5KJimamyReportActivaty ServiceTest, php --no-coverage 2561"PASSgetTests\Unit\Services\Kiosk\AutomatedReports\AskJiminnyReportActivityServiceTestemoty when no resultsE tatt tnt hperiod date filtersids bassess snazer fsequence number to disable first _ 0.025All 8 tests pass. Here's a summary:Root Cause & FixRoot cause: buildReguestParamsFromSearch never set sequence number in the reguest params, so Criteria: : createFromkequest defaulted it to o .Since isFirstRequest() returns true when sequenceNumber === 0, several implicit defaults were silently applied:Activitvourat ionRande → min duration = 1 Tilters out o-second activitiesi• ActivityRecorded → only_recorded = 1 (restricts to recorded activities only)OrganiserGroupin → apolies user's derault croup as a tiltelThe frontend URL you noticed uses sequence_number=4, which disables these defaults - explaining why the frontend returned activities but the servicereturee o.Fix: AskJiminnyReportActivityService.php:51—added 'sequence_number' » 1 to the Criteria::createFromRequest merge, ensuring isFirstRequest() returns false and no implicit defaults are injected.lest added: testbetacc1cylasPassesNonzerosequencenumberloDisablerarsckequestberaulus assers that the captured uriteria ob ect nas 1srirstRequest () === false.Öul ..Vew allliItlle win changesvapp/Services/Kiosk/AutomatedReports/D AskJiminnyReportActivityService.php +1 -1Reject allAccept allAsk anything (2*L)+ <> Code Claude Sonnet 4.6Winasun leams11O:24uir-o( 4 spaces...
|
NULL
|
|
65956
|
NULL
|
0
|
2026-04-21T13:19:20.282909+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-21/1776 /Users/lukas/.screenpipe/data/data/2026-04-21/1776777560282_m1.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsRepositoryTest.php
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Tests failed: 2, passed: 15, ignored: 4
text/html
Tests failed: 2, passed: 15, ignored: 4
text/html
text/html
text/html
Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
3
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(42, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Tests failed: 2, passed: 15, ignored: 4","depth":3,"value":"Tests failed: 2, passed: 15, ignored: 4","help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AutomatedReportsRepositoryTest","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsRepositoryTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsRepositoryTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"3","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"5","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"9","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(42, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(42, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"18","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"14","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","depth":4,"value":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
144942226675562142
|
-6932414698814794163
|
idle
|
accessibility
|
NULL
|
Tests failed: 2, passed: 15, ignored: 4
text/html
Tests failed: 2, passed: 15, ignored: 4
text/html
text/html
text/html
Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
3
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(42, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
65951
|
|
65958
|
1475
|
0
|
2026-04-21T13:19:50.780393+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-21/1776 /Users/lukas/.screenpipe/data/data/2026-04-21/1776777590780_m1.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsRepositoryTest.php
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Tests failed: 2, passed: 15, ignored: 4
text/html
Tests failed: 2, passed: 15, ignored: 4
text/html
text/html
text/html
Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
3
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(42, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Tests failed: 2, passed: 15, ignored: 4","depth":3,"value":"Tests failed: 2, passed: 15, ignored: 4","help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AutomatedReportsRepositoryTest","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsRepositoryTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsRepositoryTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"3","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"5","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"9","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(42, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(42, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"18","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"14","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","depth":4,"value":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
144942226675562142
|
-6932414698814794163
|
idle
|
accessibility
|
NULL
|
Tests failed: 2, passed: 15, ignored: 4
text/html
Tests failed: 2, passed: 15, ignored: 4
text/html
text/html
text/html
Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
3
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(42, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
NULL
|
|
65966
|
1475
|
4
|
2026-04-21T13:20:31.563290+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-21/1776 /Users/lukas/.screenpipe/data/data/2026-04-21/1776777631563_m1.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsRepositoryTest.php
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Tests failed: 2, passed: 15, ignored: 4
text/html
Tests failed: 2, passed: 15, ignored: 4
text/html
text/html
text/html
Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
3
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(42, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Tests failed: 2, passed: 15, ignored: 4","depth":3,"value":"Tests failed: 2, passed: 15, ignored: 4","help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AutomatedReportsRepositoryTest","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsRepositoryTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsRepositoryTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"3","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"5","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"9","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(42, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(42, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"18","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"14","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","depth":4,"value":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
144942226675562142
|
-6932414698814794163
|
click
|
accessibility
|
NULL
|
Tests failed: 2, passed: 15, ignored: 4
text/html
Tests failed: 2, passed: 15, ignored: 4
text/html
text/html
text/html
Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
3
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(42, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
NULL
|
|
65957
|
NULL
|
0
|
2026-04-21T13:19:21.553709+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-21/1776 /Users/lukas/.screenpipe/data/data/2026-04-21/1776777561553_m2.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsRepositoryTest.php
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Tests failed: 2, passed: 15, ignored: 4
text/html
Tests failed: 2, passed: 15, ignored: 4
text/html
text/html
text/html
Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
3
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(42, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Tests failed: 2, passed: 15, ignored: 4","depth":3,"bounds":{"left":0.9065825,"top":0.12849163,"width":0.07646277,"height":0.013567438},"value":"Tests failed: 2, passed: 15, ignored: 4","help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"bounds":{"left":0.9065825,"top":0.12849163,"width":0.07646277,"height":0.013567438},"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.12134308,"height":0.025538707},"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"bounds":{"left":0.8161569,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AutomatedReportsRepositoryTest","depth":6,"bounds":{"left":0.83144945,"top":0.019952115,"width":0.084109046,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsRepositoryTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsRepositoryTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9381649,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96609044,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9773936,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9886968,"top":0.019952115,"width":0.011303186,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"3","depth":4,"bounds":{"left":0.44082448,"top":0.17478053,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"5","depth":4,"bounds":{"left":0.4507979,"top":0.17478053,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"bounds":{"left":0.46077126,"top":0.17478053,"width":0.00731383,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"9","depth":4,"bounds":{"left":0.47007978,"top":0.17478053,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.47972074,"top":0.17318435,"width":0.00731383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.4870346,"top":0.17318435,"width":0.006981383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(42, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(42, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"bounds":{"left":0.4956782,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"bounds":{"left":0.5043218,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"bounds":{"left":0.5152925,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"bounds":{"left":0.52393615,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"bounds":{"left":0.5325798,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"bounds":{"left":0.54355055,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"bounds":{"left":0.55452126,"top":0.14844373,"width":0.024268618,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"bounds":{"left":0.58111703,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"bounds":{"left":0.59208775,"top":0.14844373,"width":0.029587766,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"bounds":{"left":0.6599069,"top":0.14844373,"width":0.02825798,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"18","depth":4,"bounds":{"left":0.63231385,"top":0.17318435,"width":0.009640957,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"14","depth":4,"bounds":{"left":0.64394945,"top":0.17318435,"width":0.009640957,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.6555851,"top":0.17318435,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"bounds":{"left":0.6655585,"top":0.17318435,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.67519945,"top":0.17158818,"width":0.00731383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.6825133,"top":0.17158818,"width":0.006981383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","depth":4,"value":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.011968086,"top":0.047885075,"width":0.024268618,"height":0.024740623},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
144942226675562142
|
-6932414698814794163
|
idle
|
accessibility
|
NULL
|
Tests failed: 2, passed: 15, ignored: 4
text/html
Tests failed: 2, passed: 15, ignored: 4
text/html
text/html
text/html
Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
3
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(42, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
65955
|
|
65959
|
1476
|
0
|
2026-04-21T13:19:52.163831+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-21/1776 /Users/lukas/.screenpipe/data/data/2026-04-21/1776777592163_m2.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsRepositoryTest.php
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Tests failed: 2, passed: 15, ignored: 4
text/html
Tests failed: 2, passed: 15, ignored: 4
text/html
text/html
text/html
Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
3
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(42, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Tests failed: 2, passed: 15, ignored: 4","depth":3,"bounds":{"left":0.9065825,"top":0.12849163,"width":0.07646277,"height":0.013567438},"value":"Tests failed: 2, passed: 15, ignored: 4","help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"bounds":{"left":0.9065825,"top":0.12849163,"width":0.07646277,"height":0.013567438},"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.12134308,"height":0.025538707},"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"bounds":{"left":0.8161569,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AutomatedReportsRepositoryTest","depth":6,"bounds":{"left":0.83144945,"top":0.019952115,"width":0.084109046,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsRepositoryTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsRepositoryTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9381649,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96609044,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9773936,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9886968,"top":0.019952115,"width":0.011303186,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"3","depth":4,"bounds":{"left":0.44082448,"top":0.17478053,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"5","depth":4,"bounds":{"left":0.4507979,"top":0.17478053,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"bounds":{"left":0.46077126,"top":0.17478053,"width":0.00731383,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"9","depth":4,"bounds":{"left":0.47007978,"top":0.17478053,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.47972074,"top":0.17318435,"width":0.00731383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.4870346,"top":0.17318435,"width":0.006981383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(42, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(42, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"bounds":{"left":0.4956782,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"bounds":{"left":0.5043218,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"bounds":{"left":0.5152925,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"bounds":{"left":0.52393615,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"bounds":{"left":0.5325798,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"bounds":{"left":0.54355055,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"bounds":{"left":0.55452126,"top":0.14844373,"width":0.024268618,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"bounds":{"left":0.58111703,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"bounds":{"left":0.59208775,"top":0.14844373,"width":0.029587766,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"bounds":{"left":0.6599069,"top":0.14844373,"width":0.02825798,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"18","depth":4,"bounds":{"left":0.63231385,"top":0.17318435,"width":0.009640957,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"14","depth":4,"bounds":{"left":0.64394945,"top":0.17318435,"width":0.009640957,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.6555851,"top":0.17318435,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"bounds":{"left":0.6655585,"top":0.17318435,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.67519945,"top":0.17158818,"width":0.00731383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.6825133,"top":0.17158818,"width":0.006981383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","depth":4,"value":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.011968086,"top":0.047885075,"width":0.024268618,"height":0.024740623},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
144942226675562142
|
-6932414698814794163
|
idle
|
accessibility
|
NULL
|
Tests failed: 2, passed: 15, ignored: 4
text/html
Tests failed: 2, passed: 15, ignored: 4
text/html
text/html
text/html
Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
3
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(42, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
NULL
|
|
65965
|
1476
|
3
|
2026-04-21T13:20:31.297987+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-21/1776 /Users/lukas/.screenpipe/data/data/2026-04-21/1776777631297_m2.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsRepositoryTest.php
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Tests failed: 2, passed: 15, ignored: 4
text/html
Tests failed: 2, passed: 15, ignored: 4
text/html
text/html
text/html
Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
3
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(42, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Tests failed: 2, passed: 15, ignored: 4","depth":3,"bounds":{"left":0.9065825,"top":0.12849163,"width":0.07646277,"height":0.013567438},"value":"Tests failed: 2, passed: 15, ignored: 4","help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"bounds":{"left":0.9065825,"top":0.12849163,"width":0.07646277,"height":0.013567438},"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.12134308,"height":0.025538707},"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"bounds":{"left":0.8161569,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AutomatedReportsRepositoryTest","depth":6,"bounds":{"left":0.83144945,"top":0.019952115,"width":0.084109046,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsRepositoryTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsRepositoryTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9381649,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96609044,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9773936,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9886968,"top":0.019952115,"width":0.011303186,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"3","depth":4,"bounds":{"left":0.44082448,"top":0.17478053,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"5","depth":4,"bounds":{"left":0.4507979,"top":0.17478053,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"bounds":{"left":0.46077126,"top":0.17478053,"width":0.00731383,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"9","depth":4,"bounds":{"left":0.47007978,"top":0.17478053,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.47972074,"top":0.17318435,"width":0.00731383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.4870346,"top":0.17318435,"width":0.006981383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(42, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","depth":4,"bounds":{"left":0.13863032,"top":0.0,"width":0.35538563,"height":1.0},"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(42, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"bounds":{"left":0.4956782,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"bounds":{"left":0.5043218,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"bounds":{"left":0.5152925,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"bounds":{"left":0.52393615,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-3456631148116132766
|
-6069893671154377140
|
click
|
accessibility
|
NULL
|
Tests failed: 2, passed: 15, ignored: 4
text/html
Tests failed: 2, passed: 15, ignored: 4
text/html
text/html
text/html
Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
3
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(42, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`created_by` = ?', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters...
|
65964
|
|
11810
|
242
|
15
|
2026-04-14T10:13:16.753563+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776161596753_m1.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsCommandTest.php
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Tests failed: 10, passed: 0
text/html
text/html
te Tests failed: 10, passed: 0
text/html
text/html
text/html
Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AutomatedReportsCommandTest
Run 'AutomatedReportsCommandTest'
Debug 'AutomatedReportsCommandTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
248
Previous Highlighted Error
Next Highlighted Error
[2026-04-14 10:05:19] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:text-relay:sync","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"9756bfa7-c8e1-4b17-bc55-9f224d2af2e3","trace_id":"9e5fa115-9cf5-45d6-a1da-109e154cfae7"}
[2026-04-14 10:05:19] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:text-relay:sync","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"9756bfa7-c8e1-4b17-bc55-9f224d2af2e3","trace_id":"9e5fa115-9cf5-45d6-a1da-109e154cfae7"}
[2026-04-14 10:05:23] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"conference:pre-meeting-notification","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"d9d68876-323b-42bd-9953-635da8008f2e","trace_id":"6c00ce4c-f2df-4ccb-908d-4862de973096"}
[2026-04-14 10:05:23] local.INFO: Running pre-meeting notification command {"correlation_id":"d9d68876-323b-42bd-9953-635da8008f2e","trace_id":"6c00ce4c-f2df-4ccb-908d-4862de973096"}
[2026-04-14 10:05:23] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"conference:pre-meeting-notification","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"d9d68876-323b-42bd-9953-635da8008f2e","trace_id":"6c00ce4c-f2df-4ccb-908d-4862de973096"}
[2026-04-14 10:05:26] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"conference:monitor:start","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"27d73fea-a8cb-4757-9bbb-fbe7222e6943","trace_id":"bcdb88d0-a641-43e4-85e8-b7dc4ab20a0e"}
[2026-04-14 10:05:26] local.INFO: Running conference:monitor:start command for activities in (2026-04-14 09:55:00, 2026-04-14 10:00:00] {"correlation_id":"27d73fea-a8cb-4757-9bbb-fbe7222e6943","trace_id":"bcdb88d0-a641-43e4-85e8-b7dc4ab20a0e"}
[2026-04-14 10:05:26] local.INFO: [conference:monitor:start] start ok {"activity_id":407307} {"correlation_id":"27d73fea-a8cb-4757-9bbb-fbe7222e6943","trace_id":"bcdb88d0-a641-43e4-85e8-b7dc4ab20a0e"}
[2026-04-14 10:05:26] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"conference:monitor:start","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"27d73fea-a8cb-4757-9bbb-fbe7222e6943","trace_id":"bcdb88d0-a641-43e4-85e8-b7dc4ab20a0e"}
[2026-04-14 10:05:28] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"conference:monitor:end","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"588bae45-3998-4b86-b056-51aaf8b6882f","trace_id":"8f716a65-7768-44c5-b0e4-02a859f329e5"}
[2026-04-14 10:05:28] local.INFO: conference:monitor:end:Jiminny\Console\Commands\Activities\MonitorMeetingEndCommand::logActivitiesEnded {"from":"10:00","to":"10:05"} {"correlation_id":"588bae45-3998-4b86-b056-51aaf8b6882f","trace_id":"8f716a65-7768-44c5-b0e4-02a859f329e5"}
[2026-04-14 10:05:28] local.INFO: conference:monitor:end:Jiminny\Console\Commands\Activities\MonitorMeetingEndCommand::logActivitiesWithUnfinishedSession {"from":"23:55","to":"00:00"} {"correlation_id":"588bae45-3998-4b86-b056-51aaf8b6882f","trace_id":"8f716a65-7768-44c5-b0e4-02a859f329e5"}
[2026-04-14 10:05:28] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"conference:monitor:end","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"588bae45-3998-4b86-b056-51aaf8b6882f","trace_id":"8f716a65-7768-44c5-b0e4-02a859f329e5"}
[2026-04-14 10:05:30] local.NOTICE: Repairing HubSpot tokens start {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:30] local.INFO: Trying to refresh HubSpot token {"account_id":59,"updated_at":"2025-10-03 09:32:05"} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:30] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:30] local.INFO: [SocialAccountService] Refreshing token from provider {"socialAccountId":59,"provider":"hubspot","refreshToken":"97b78f6e2cc49965c00c2492b602b02708b1392551e6b3f113fbaa48992af90b","state":"full-refresh"} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:31] local.ERROR: Failed to refresh HubSpot token {"account_id":59,"updated_at":"2025-10-03 09:32:05","reason":"missing or invalid refresh token","previous":""} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:31] local.INFO: Trying to refresh HubSpot token {"account_id":306,"updated_at":"2023-11-27 09:30:03"} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:31] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:31] local.INFO: [SocialAccountService] Refreshing token from provider {"socialAccountId":306,"provider":"hubspot","refreshToken":"6fa6aa8cc641d131231acc3470f5c03cb3b07b2e580fb18f8acb3b1dbb72549b","state":"full-refresh"} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:31] local.ERROR: Failed to refresh HubSpot token {"account_id":306,"updated_at":"2023-11-27 09:30:03","reason":"missing or invalid refresh token","previous":""} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:31] local.INFO: Trying to refresh HubSpot token {"account_id":1372,"updated_at":"2025-10-02 14:47:06"} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:31] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:31] local.INFO: [SocialAccountService] Refreshing token from provider {"socialAccountId":1372,"provider":"hubspot","refreshToken":"9aa73948c761da29dce46c177cf9aee1fde483a44169ca38723f9f0597d7a8c4","state":"full-refresh"} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:31] local.ERROR: Failed to refresh HubSpot token {"account_id":1372,"updated_at":"2025-10-02 14:47:06","reason":"missing or invalid refresh token","previous":""} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:31] local.NOTICE: Repairing HubSpot tokens end {"total":3,"fixed":0,"failed":3} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:34] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"conference:pre-meeting-reminder","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"2b2ca83a-1263-4a7c-a5d7-86dc15ea7aec","trace_id":"fbf48d3d-4e50-4442-b14f-d2ae5e6e70bd"}
[2026-04-14 10:05:34] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"crm:bullhorn:ping","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"73b127c9-c033-4fa7-a8ed-2e28077ba970","trace_id":"fd1cf3c5-d4ce-41d6-a19d-5e67fd544d9e"}
[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Polling] Getting offset from database {"offset":"","jiminny_team_id":1} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:34] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"crm:bullhorn:ping","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"73b127c9-c033-4fa7-a8ed-2e28077ba970","trace_id":"fd1cf3c5-d4ce-41d6-a19d-5e67fd544d9e"}
[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Command] Starting polling service {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Polling] Service starting {"memory_limit":"256M","max_execution_time":"0","initial_memory_mb":62.0} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Polling] Acquired polling lock {"expires_at":"2026-04-14T10:07:34.196472Z"} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Polling] Getting offset from database {"offset":"","jiminny_team_id":1} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:34] local.INFO: [HubSpot Journal API] Fetching latest journal entry {"url":"https://api.hubapi.com/webhooks/v4/journal/latest"} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:34] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"conference:pre-meeting-reminder","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"2b2ca83a-1263-4a7c-a5d7-86dc15ea7aec","trace_id":"fbf48d3d-4e50-4442-b14f-d2ae5e6e70bd"}
[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Polling] No data {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:39] local.INFO: [HubSpot Journal Polling] Getting offset from database {"offset":"","jiminny_team_id":1} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:39] local.INFO: [HubSpot Journal API] Fetching latest journal entry {"url":"https://api.hubapi.com/webhooks/v4/journal/latest"} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:39] local.INFO: [HubSpot Journal Polling] No data {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:44] local.INFO: [HubSpot Journal Polling] Getting offset from database {"offset":"","jiminny_team_id":1} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:44] local.INFO: [HubSpot Journal API] Fetching latest journal entry {"url":"https://api.hubapi.com/webhooks/v4/journal/latest"} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:44] local.INFO: [HubSpot Journal Polling] No data {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:59] local.INFO: [HubSpot Journal Polling] Getting offset from database {"offset":"","jiminny_team_id":1} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:59] local.INFO: [HubSpot Journal API] Fetching latest journal entry {"url":"https://api.hubapi.com/webhooks/v4/journal/latest"} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:06:00] local.INFO: [HubSpot Journal Polling] No data {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:06:04] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"44f01bd8-2599-41a4-b7c3-8bb1fdf0df9a","trace_id":"b4c87c8d-120d-48fb-b13c-aee84323f3e2"}
[2026-04-14 10:06:04] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {"correlation_id":"44f01bd8-2599-41a4-b7c3-8bb1fdf0df9a","trace_id":"b4c87c8d-120d-48fb-b13c-aee84323f3e2"}
[2026-04-14 10:06:04] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"44f01bd8-2599-41a4-b7c3-8bb1fdf0df9a","trace_id":"b4c87c8d-120d-48fb-b13c-aee84323f3e2"}
[2026-04-14 10:06:06] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"8403c1e4-b5b6-41f9-9280-ff666beed28b","trace_id":"3f631f60-6d14-44f5-b6c3-b401999867f9"}
[2026-04-14 10:06:06] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"8403c1e4-b5b6-41f9-9280-ff666beed28b","trace_id":"3f631f60-6d14-44f5-b6c3-b401999867f9"}
[2026-04-14 10:06:08] local.NOTICE: Monitoring start {"correlation_id":"0d51eb08-f2f1-4322-97d0-268700856a99","trace_id":"92b45b9a-b6e8-40c8-a783-193cf1a4eea2"}
[2026-04-14 10:06:08] local.NOTICE: Monitoring end {"correlation_id":"0d51eb08-f2f1-4322-97d0-268700856a99","trace_id":"92b45b9a-b6e8-40c8-a783-193cf1a4eea2"}
[2026-04-14 10:06:10] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"0566c59b-bf67-49eb-970a-a6b955ddd756","trace_id":"724c5f5e-cd88-41fb-9b7e-74315e131024"}
[2026-04-14 10:06:10] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"0566c59b-bf67-49eb-970a-a6b955ddd756","trace_id":"724c5f5e-cd88-41fb-9b7e-74315e131024"}
[2026-04-14 10:06:12] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"33d190d4-0abb-4e63-af52-95faa913e7a1","trace_id":"703aaa4d-a551-4ed1-8a4a-609d373e2fc0"}
[2026-04-14 10:06:12] local.INFO: [EmailSchedule] STARTING batch process {"host":"docker_lamp_1"} {"correlation_id":"33d190d4-0abb-4e63-af52-95faa913e7a1","trace_id":"703aaa4d-a551-4ed1-8a4a-609d373e2fc0"}
[2026-04-14 10:06:12] local.INFO: [EmailSchedule] FINISHED batch process {"host":"docker_lamp_1","processed":0} {"correlation_id":"33d190d4-0abb-4e63-af52-95faa913e7a1","trace_id":"703aaa4d-a551-4ed1-8a4a-609d373e2fc0"}
[2026-04-14 10:06:12] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"33d190d4-0abb-4e63-af52-95faa913e7a1","trace_id":"703aaa4d-a551-4ed1-8a4a-609d373e2fc0"}
[2026-04-14 10:06:14] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"conference:monitor:count","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"da41d77d-46d9-41ae-90b7-f8418b05fb9a","trace_id":"47329a55-e6f4-406b-8730-e72d69737f09"}
[2026-04-14 10:06:14] local.INFO: Running conference:monitor:count command for activities in (2026-04-14 10:04:00, 2026-04-14 10:06:00] {"correlation_id":"da41d77d-46d9-41ae-90b7-f8418b05fb9a","trace_id":"47329a55-e6f4-406b-8730-e72d69737f09"}
[2026-04-14 10:06:14] local.INFO: [conference:monitor:count] No activities found in (2026-04-14 10:04:00, 2026-04-14 10:06:00] {"correlation_id":"da41d77d-46d9-41ae-90b7-f8418b05fb9a","trace_id":"47329a55-e6f4-406b-8730-e72d69737f09"}
[2026-04-14 10:06:14] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"conference:monitor:count","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"da41d77d-46d9-41ae-90b7-f8418b05fb9a","trace_id":"47329a55-e6f4-406b-8730-e72d69737f09"}
[2026-04-14 10:06:16] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"activity:notify-not-logged","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"310e7e99-6de4-4f93-967e-37c78e9ec826","trace_id":"2a1fdf0a-be0e-4e5a-a677-fa16ddc33e9e"}
[2026-04-14 10:06:16] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"activity:notify-not-logged","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"310e7e99-6de4-4f93-967e-37c78e9ec826","trace_id":"2a1fdf0a-be0e-4e5a-a677-fa16ddc33e9e"}
[2026-04-14 10:06:19] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:sync","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"de8430ad-f242-4536-bebe-e165320b6b26","trace_id":"75f83d2f-4e5e-4086-b062-7c1d24b5b74c"}
[2026-04-14 10:06:19] local.INFO: [EmailSchedule] STARTING Inbox Sync {"host":"docker_lamp_1"} {"correlation_id":"de8430ad-f242-4536-bebe-e165320b6b26","trace_id":"75f83d2f-4e5e-4086-b062-7c1d24b5b74c"}
[2026-04-14 10:06:19] local.INFO: [EmailSchedule] FINISHED Inbox Sync {"host":"docker_lamp_1","events":1} {"correlation_id":"de8430ad-f242-4536-bebe-e165320b6b26","trace_id":"75f83d2f-4e5e-4086-b062-7c1d24b5b74c"}
[2026-04-14 10:06:19] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:sync","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"de8430ad-f242-4536-bebe-e165320b6b26","trace_id":"75f83d2f-4e5e-4086-b062-7c1d24b5b74c"}
[2026-04-14 10:06:22] local.INFO: [Sync Mailbox] Sync start {"inbox_id":59} {"correlation_id":"eb46c86e-5c80-48b1-a4ee-ac425f197754","trace_id":"75f83d2f-4e5e-4086-b062-7c1d24b5b74c"}
[2026-04-14 10:06:22] local.INFO: [Inbox service] Skipping METADATA SYNC for inbox 59 due to unauthorized access to the mailbox {"correlation_id":"eb46c86e-5c80-48b1-a4ee-ac425f197754","trace_id":"75f83d2f-4e5e-4086-b062-7c1d24b5b74c"}
[2026-04-14 10:06:22] local.INFO: [Sync Mailbox] Sync complete {"inbox_id":59} {"correlation_id":"eb46c86e-5c80-48b1-a4ee-ac425f197754","trace_id":"75f83d2f-4e5e-4086-b062-7c1d24b5b74c"}
[2026-04-14 10:06:30] local.INFO: [HubSpot Journal Polling] Getting offset from database {"offset":"","jiminny_team_id":1} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:06:30] local.INFO: [HubSpot Journal API] Fetching latest journal entry {"url":"https://api.hubapi.com/webhooks/v4/journal/latest"} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:06:30] local.INFO: [HubSpot Journal Polling] No data {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:06:30] local.WARNING: [HubSpot Journal Polling] Maximum empty results reached, stopping {"empty_results":5,"max_empty_results":5} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:06:30] local.WARNING: [HubSpot Journal Polling] Maximum empty results reached, stopping {"empty_results":5,"max_empty_results":5} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:06:30] local.INFO: [HubSpot Journal Polling] Service ending {"runtime_seconds":56,"total_cycles":5,"files_downloaded":0,"empty_files":0,"other_portal_skipped":0,"total_events":0,"events_per_file":0,"avg_api_ms":169.9,"avg_download_ms":0.0,"avg_transform_ms":0.0,"avg_process_ms":0.0,"peak_memory_mb":99.75} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:06:30] local.INFO: [HubSpot Journal Polling] Released polling lock {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:07:04] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"53329974-bdd6-4cd2-a022-0d565b0a5cf4","trace_id":"08246763-f961-45fb-b262-51378bdbc955"}
[2026-04-14 10:07:04] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {"correlation_id":"53329974-bdd6-4cd2-a022-0d565b0a5cf4","trace_id":"08246763-f961-45fb-b262-51378bdbc955"}
[2026-04-14 10:07:04] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"53329974-bdd6-4cd2-a022-0d565b0a5cf4","trace_id":"08246763-f961-45fb-b262-51378bdbc955"}
[2026-04-14 10:07:06] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"2b6586f0-419e-4422-8800-e4b7619c43d6","trace_id":"221c682d-c45f-4e4a-a793-ed11006dc6a1"}
[2026-04-14 10:07:06] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"2b6586f0-419e-4422-8800-e4b7619c43d6","trace_id":"221c682d-c45f-4e4a-a793-ed11006dc6a1"}
[2026-04-14 10:07:08] local.NOTICE: Monitoring start {"correlation_id":"9ba692ee-5286-41ca-abf0-86f6e1167a8e","trace_id":"d58ab8ad-7737-4d7c-91c0-81733c21e709"}
[2026-04-14 10:07:08] local.NOTICE: Monitoring end {"correlation_id":"9ba692ee-5286-41ca-abf0-86f6e1167a8e","trace_id":"d58ab8ad-7737-4d7c-91c0-81733c21e709"}
[2026-04-14 10:07:10] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"28e708ed-74ee-4417-a8da-c1a9ae0cd745","trace_id":"bd848201-9700-40bf-8fa4-9df13ae88f6e"}
[2026-04-14 10:07:10] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"28e708ed-74ee-4417-a8da-c1a9ae0cd745","trace_id":"bd848201-9700-40bf-8fa4-9df13ae88f6e"}
[2026-04-14 10:07:12] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"95326c5a-7b17-475d-9245-634d15d51bfe","trace_id":"31b36f9d-93cc-4917-bc7b-6b6a3da139e7"}
[2026-04-14 10:07:12] local.INFO: [EmailSchedule] STARTING batch process {"host":"docker_lamp_1"} {"correlation_id":"95326c5a-7b17-475d-9245-634d15d51bfe","trace_id":"31b36f9d-93cc-4917-bc7b-6b6a3da139e7"}
[2026-04-14 10:07:12] local.INFO: [EmailSchedule] FINISHED batch process {"host":"docker_lamp_1","processed":0} {"correlation_id":"95326c5a-7b17-475d-9245-634d15d51bfe","trace_id":"31b36f9d-93cc-4917-bc7b-6b6a3da139e7"}
[2026-04-14 10:07:12] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"95326c5a-7b17-475d-9245-634d15d51bfe","trace_id":"31b36f9d-93cc-4917-bc7b-6b6a3da139e7"}
[2026-04-14 10:07:14] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:batch:create","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"f4f68165-0bcc-4e79-89e5-81f9c627e4dc","trace_id":"5766aab2-0316-400f-aa89-168ea0579941"}
[2026-04-14 10:07:14] local.INFO: [EmailSchedule] STARTING batch create {"host":"docker_lamp_1"} {"correlation_id":"f4f68165-0bcc-4e79-89e5-81f9c627e4dc","trace_id":"5766aab2-0316-400f-aa89-168ea0579941"}
[2026-04-14 10:07:14] local.INFO: [EmailSchedule] FINISHED batch create {"host":"docker_lamp_1"} {"correlation_id":"f4f68165-0bcc-4e79-89e5-81f9c627e4dc","trace_id":"5766aab2-0316-400f-aa89-168ea0579941"}
[2026-04-14 10:07:14] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:batch:create","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"f4f68165-0bcc-4e79-89e5-81f9c627e4dc","trace_id":"5766aab2-0316-400f-aa89-168ea0579941"}
[2026-04-14 10:07:15] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"activity:sync","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"a7d5580f-8b90-4ff6-91e8-de94514f8ca1","trace_id":"fc40909d-86c1-4e45-bd51-96e2bd8c4556"}
[2026-04-14 10:07:16] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"activity:sync","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"a7d5580f-8b90-4ff6-91e8-de94514f8ca1","trace_id":"fc40909d-86c1-4e45-bd51-96e2bd8c4556"}
[2026-04-14 10:07:16] local.INFO: [Jiminny\Jobs\Mailbox\CreateBatches] processed 0 inboxes and created 0 batches {"userId":null,"batchSize":30,"maxBatches":1000} {"correlation_id":"df4d1442-bcd6-4b63-8513-802ae90993e6","trace_id":"5766aab2-0316-400f-aa89-168ea0579941"}
[2026-04-14 10:08:04] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"43299ccb-af86-42b1-b793-4ede57e2b91d","trace_id":"2f919b69-9d68-488c-89fa-2aade6ef8519"}
[2026-04-14 10:08:04] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {"correlation_id":"43299ccb-af86-42b1-b793-4ede57e2b91d","trace_id":"2f919b69-9d68-488c-89fa-2aade6ef8519"}
[2026-04-14 10:08:04] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"43299ccb-af86-42b1-b793-4ede57e2b91d","trace_id":"2f919b69-9d68-488c-89fa-2aade6ef8519"}
[2026-04-14 10:08:06] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"cde80757-333e-4268-a902-892c031b2373","trace_id":"36e932e0-8362-432f-9e36-d819f902d49e"}
[2026-04-14 10:08:06] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"cde80757-333e-4268-a902-892c031b2373","trace_id":"36e932e0-8362-432f-9e36-d819f902d49e"}
[2026-04-14 10:08:07] local.NOTICE: Monitoring start {"correlation_id":"146390f8-e91a-4e5c-b282-0c83b4947101","trace_id":"fb689e40-c867-4fc5-9847-c223835da80e"}
[2026-04-14 10:08:07] local.NOTICE: Monitoring end {"correlation_id":"146390f8-e91a-4e5c-b282-0c83b4947101","trace_id":"fb689e40-c867-4fc5-9847-c223835da80e"}
[2026-04-14 10:08:10] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"58e23da5-8f3f-4836-aac7-315ab32f74a3","trace_id":"c71267c4-b5fe-42ad-9bcd-76f6299c1538"}
[2026-04-14 10:08:10] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"58e23da5-8f3f-4836-aac7-315ab32f74a3","trace_id":"c71267c4-b5fe-42ad-9bcd-76f6299c1538"}
[2026-04-14 10:08:13] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"9158bb6f-c165-495a-9b6e-8077d8343c87","trace_id":"df378af8-cacb-41ea-b030-b8f53144fddd"}
[2026-04-14 10:08:13] local.INFO: [EmailSchedule] STARTING batch process {"host":"docker_lamp_1"} {"correlation_id":"9158bb6f-c165-495a-9b6e-8077d8343c87","trace_id":"df378af8-cacb-41ea-b030-b8f53144fddd"}
[2026-04-14 10:08:13] local.INFO: [EmailSchedule] FINISHED batch process {"host":"docker_lamp_1","processed":0} {"correlation_id":"9158bb6f-c165-495a-9b6e-8077d8343c87","trace_id":"df378af8-cacb-41ea-b030-b8f53144fddd"}
[2026-04-14 10:08:13] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"9158bb6f-c165-495a-9b6e-8077d8343c87","trace_id":"df378af8-cacb-41ea-b030-b8f53144fddd"}
[2026-04-14 10:08:14] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"conference:monitor:count","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"35774df7-e046-49ec-835f-45f9dc1ec025","trace_id":"45c5e102-6b65-4d23-9edd-684ca996316c"}
[2026-04-14 10:08:14] local.INFO: Running conference:monitor:count command for activities in (2026-04-14 10:06:00, 2026-04-14 10:08:00] {"correlation_id":"35774df7-e046-49ec-835f-45f9dc1ec025","trace_id":"45c5e102-6b65-4d23-9edd-684ca996316c"}
[2026-04-14 10:08:14] local.INFO: [conference:monitor:count] No activities found in (2026-04-14 10:06:00, 2026-04-14 10:08:00] {"correlation_id":"35774df7-e046-49ec-835f-45f9dc1ec025","trace_id":"45c5e102-6b65-4d23-9edd-684ca996316c"}
[2026-04-14 10:08:14] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"conference:monitor:count","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"35774df7-e046-49ec-835f-45f9dc1ec025","trace_id":"45c5e102-6b65-4d23-9edd-684ca996316c"}
[2026-04-14 10:08:17] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:batch:retry-failed","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"d4dc4b3b-8dc8-4665-aec7-139be0df2306","trace_id":"853f2210-e804-40aa-a1d8-4457c60f4993"}
[2026-04-14 10:08:17] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:batch:retry-failed","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"d4dc4b3b-8dc8-4665-aec7-139be0df2306","trace_id":"853f2210-e804-40aa-a1d8-4457c60f4993"}
[2026-04-14 10:09:05] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"8052fb2f-5876-4e2c-8f64-c770d9fe37fe","trace_id":"63249c19-bf59-4e52-9096-156d537a9786"}
[2026-04-14 10:09:05] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {"correlation_id":"8052fb2f-5876-4e2c-8f64-c770d9fe37fe","trace_id":"63249c19-bf59-4e52-9096-156d537a9786"}
[2026-04-14 10:09:05] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"8052fb2f-5876-4e2c-8f64-c770d9fe37fe","trace_id":"63249c19-bf59-4e52-9096-156d537a9786"}
[2026-04-14 10:09:07] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"1dd274b4-f71d-486e-b6c4-aaf106304102","trace_id":"1d55139c-a58d-4456-801a-9bcb3bf9b024"}
[2026-04-14 10:09:07] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"1dd274b4-f71d-486e-b6c4-aaf106304102","trace_id":"1d55139c-a58d-4456-801a-9bcb3bf9b024"}
[2026-04-14 10:09:10] local.NOTICE: Monitoring start {"correlation_id":"09dc762e-2b78-4dbb-a880-5c8f1cbfc4ad","trace_id":"8e60392d-4ea4-41f2-be2f-a01853c7a1ab"}
[2026-04-14 10:09:10] local.NOTICE: Monitoring end {"correlation_id":"09dc762e-2b78-4dbb-a880-5c8f1cbfc4ad","trace_id":"8e60392d-4ea4-41f2-be2f-a01853c7a1ab"}
[2026-04-14 10:09:13] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"2de9f84e-2691-459d-adfd-f5f6746501d0","trace_id":"418ad958-86c0-4477-b0fb-e487768d6fa1"}
[2026-04-14 10:09:13] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"2de9f84e-2691-459d-adfd-f5f6746501d0","trace_id":"418ad958-86c0-4477-b0fb-e487768d6fa1"}
[2026-04-14 10:09:16] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"1be8488c-ae59-4f42-8475-c426905c3ca6","trace_id":"aeb8b412-635e-4929-915f-fb3fe5786eae"}
[2026-04-14 10:09:16] local.INFO: [EmailSchedule] STARTING batch process {"host":"docker_lamp_1"} {"correlation_id":"1be8488c-ae59-4f42-8475-c426905c3ca6","trace_id":"aeb8b412-635e-4929-915f-fb3fe5786eae"}
[2026-04-14 10:09:16] local.INFO: [EmailSchedule] FINISHED batch process {"host":"docker_lamp_1","processed":0} {"correlation_id":"1be8488c-ae59-4f42-8475-c426905c3ca6","trace_id":"aeb8b412-635e-4929-915f-fb3fe5786eae"}
[2026-04-14 10:09:16] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"1be8488c-ae59-4f42-8475-c426905c3ca6","trace_id":"aeb8b412-635e-4929-915f-fb3fe5786eae"}
[2026-04-14 10:09:18] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"activity:aircall:check-and-renew","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"b3d1b688-309f-4df0-9dcd-9a733c87f597","trace_id":"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c"}
[2026-04-14 10:09:18] local.INFO: [SocialAccountService] Fetching token {"socialAccountId":1496,"provider":"aircall"} {"correlation_id":"b3d1b688-309f-4df0-9dcd-9a733c87f597","trace_id":"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c"}
[2026-04-14 10:09:18] local.INFO: [SocialAccountService] Token retrieved {"socialAccountId":1496,"provider":"aircall"} {"correlation_id":"b3d1b688-309f-4df0-9dcd-9a733c87f597","trace_id":"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c"}
[2026-04-14 10:09:18] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"b3d1b688-309f-4df0-9dcd-9a733c87f597","trace_id":"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c"}
[2026-04-14 10:09:18] local.ERROR: [Aircall] Re-activating webhooks failed {"team_id":1,"reason":"{\"message\":\"Forbidden\"}"} {"correlation_id":"b3d1b688-309f-4df0-9dcd-9a733c87f597","trace_id":"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c"}
[2026-04-14 10:09:18] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"activity:aircall:check-and-renew","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"b3d1b688-309f-4df0-9dcd-9a733c87f597","trace_id":"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c"}
[2026-04-14 10:09:21] local.INFO: [RetryFailedDownloads] Starting {"options":{"from":null,"to":null,"help":false,"silent":false,"quiet":false,"verbose":false,"version":false,"ansi":null,"no-interaction":false,"env":null}} {"correlation_id":"c7aba065-c8f1-473d-b8b5-4797245873bf","trace_id":"48f587f9-dd77-4634-9ad9-1137b029b5f5"}
[2026-04-14 10:10:04] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"7310aae5-3829-4d5c-bbc9-f6550a35f539","trace_id":"6099cf10-45e2-4b82-9649-649e2f8a1209"}
[2026-04-14 10:10:04] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {"correlation_id":"7310aae5-3829-4d5c-bbc9-f6550a35f539","trace_id":"6099cf10-45e2-4b82-9649-649e2f8a1209"}
[2026-04-14 10:10:04] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"7310aae5-3829-4d5c-bbc9-f6550a35f539","trace_id":"6099cf10-45e2-4b82-9649-649e2f8a1209"}
[2026-04-14 10:10:06] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"5119d94e-0c61-4312-a740-2b569388cc9f","trace_id":"6a412a32-3bc3-46a4-af7c-24ad560a4e41"}
[2026-04-14 10:10:06] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"5119d94e-0c61-4312-a740-2b569388cc9f","trace_id":"6a412a32-3bc3-46a4-af7c-24ad560a4e41"}
[2026-04-14 10:10:08] local.NOTICE: Monitoring start {"correlation_id":"95cdb3b7-b356-4325-be28-20663ece6aa0","trace_id":"e64a75a4-2493-4f35-ba46-ccd002e6b7b7"}
[2026-04-14 10:10:08] local.NOTICE: Monitoring end {"correlation_id":"95cdb3b7-b356-4325-be28-20663ece6aa0","trace_id":"e64a75a4-2493-4f35-ba46-ccd002e6b7b7"}
[2026-04-14 10:10:10] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"6460dd5f-4b94-4cd1-867e-53304d785744","trace_id":"683b103d-2dfc-4266-84a2-d5cd799b133f"}
[2026-04-14 10:10:10] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"6460dd5f-4b94-4cd1-867e-53304d785744","trace_id":"683b103d-2dfc-4266-84a2-d5cd799b133f"}
[2026-04-14 10:10:11] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"5a59007d-2a12-4977-8a5a-59c678aa12ee","trace_id":"bc3a2ad5-9f13-4728-adaa-529da75cf011"}
[2026-04-14 10:10:11] local.INFO: [EmailSchedule] STARTING batch process {"host":"docker_lamp_1"} {"correlation_id":"5a59007d-2a12-4977-8a5a-59c678aa12ee","trace_id":"bc3a2ad5-9f13-4728-adaa-529da75cf011"}
[2026-04-14 10:10:11] local.INFO: [EmailSchedule] FINISHED batch process {"host":"docker_lamp_1","processed":0} {"correlation_id":"5a59007d-2a12-4977-8a5a-59c678aa12ee","trace_id":"bc3a2ad5-9f13-4728-adaa-529da75cf011"}
[2026-04-14 10:10:11] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"5a59007d-2a12-4977-8a5a-59c678aa12ee","trace_id":"bc3a2ad5-9f13-4728-adaa-529da75cf011"}
[2026-04-14 10:10:14] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"conference:monitor:count","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"afe2ff6b-1b9e-4485-bdad-a758d873a782","trace_id":"d507becf-55d6-4fda-8831-e981f95b85c8"}
[2026-04-14 10:10:14] local.INFO: Running conference:monitor:count command for activities in (2026-04-14 10:08:00, 2026-04-14 10:10:00] {"correlation_id":"afe2ff6b-1b9e-4485-bdad-a758d873a782","trace_id":"d507becf-55d6-4fda-8831-e981f95b85c8"}
[2026-04-14 10:10:14] local.INFO: [conference:monitor:count] No activities found in (2026-04-14 10:08:00, 2026-04-14 10:10:00] {"correlation_id":"afe2ff6b-1b9e-4485-bdad-a758d873a782","trace_id":"d507becf-55d6-4fda-8831-e981f95b85c8"}
[2026-04-14 10:10:14] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"conference:monitor:count","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"afe2ff6b-1b9e-4485-bdad-a758d873a782","trace_id":"d507becf-55d6-4fda-8831-e981f95b85c8"}
[2026-04-14 10:10:16] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"activity:purge-stale","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"ebe2ad2b-df9a-48d7-b78f-d52b7489c6f0","trace_id":"05b44216-d5ac-44cd-b74b-3e92567b192d"}
[2026-04-14 10:10:16] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"activity:purge-stale","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"ebe2ad2b-df9a-48d7-b78f-d52b7489c6f0","trace_id":"05b44216-d5ac-44cd-b74b-3e92567b192d"}
[2026-04-14 10:10:18] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:text-relay:sync","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"d76b00ee-6271-4df7-ba45-769738bbb7ae","trace_id":"92384790-9588-452d-abea-cdd25a2fe7ff"}
[2026-04-14 10:10:18] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:text-relay:sync","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"d76b00ee-6271-4df7-ba45-769738bbb7ae","trace_id":"92384790-9588-452d-abea-cdd25a2fe7ff"}
[2026-04-14 10:10:20] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"conference:pre-meeting-notification","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"c8f3b5c1-bef5-4584-b9d8-0c10578fefac","trace_id":"b700f03d-b02b-495e-b505-1598c7a9ea4b"}
[2026-04-14 10:10:20] local.INFO: Running pre-meeting notification command {"correlation_id":"c8f3b5c1-bef5-4584-b9d8-0c10578fefac","trace_id":"b700f03d-b02b-495e-b505-1598c7a9ea4b"}
[2026-04-14 10:10:20] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"conference:pre-meeting-notification","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"c8f3b5c1-bef5-4584-b9d8-0c10578fefac","trace_id":"b700f03d-b02b-495e-b505-1598c7a9ea4b"}
[2026-04-14 10:10:22] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"conference:monitor:start","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"d7b97fbb-00b9-47c2-ae81-dda03fd8b253","trace_id":"54447306-49bf-4629-8de0-bb191c61cce2"}
[2026-04-14 10:10:22] local.INFO: Running conference:monitor:start command for activities in (2026-04-14 10:00:00, 2026-04-14 10:05:00] {"correlation_id":"d7b97fbb-00b9-47c2-ae81-dda03fd8b253","trace_id":"54447306-49bf-4629-8de0-bb191c61cce2"}
[2026-04-14 10:10:22] local.INFO: [conference:monitor:start] No activities found in (2026-04-14 10:00:00, 2026-04-14 10:05:00] {"correlation_id":"d7b97fbb-00b9-47c2-ae81-dda03fd8b253","trace_id":"54447306-49bf-4629-8de0-bb191c61cce2"}
[2026-04-14 10:10:22] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"conference:monitor:start","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"d7b97fbb-00b9-47c2-ae81-dda03fd8b253","trace_id":"54447306-49bf-4629-8de0-bb191c61cce2"}
[2026-04-14 10:10:23] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"conference:monitor:end","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"07665538-664f-421e-af9b-97152a688b68","trace_id":"d116813e-2d96-4a3d-ae04-6e53d69ca565"}
[2026-04-14 10:10:23] local.INFO: conference:monitor:end:Jiminny\Console\Commands\Activities\MonitorMeetingEndCommand::logActivitiesEnded {"from":"10:05","to":"10:10"} {"correlation_id":"07665538-664f-421e-af9b-97152a688b68","trace_id":"d116813e-2d96-4a3d-ae04-6e53d69ca565"}
[2026-04-14 10:10:23] local.INFO: conference:monitor:end:Jiminny\Console\Commands\Activities\MonitorMeetingEndCommand::logActivitiesWithUnfinishedSession {"from":"00:00","to":"00:05"} {"correlation_id":"07665538-664f-421e-af9b-97152a688b68","trace_id":"d116813e-2d96-4a3d-ae04-6e53d69ca565"}
[2026-04-14 10:10:23] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"conference:monitor:end","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"07665538-664f-421e-af9b-97152a688b68","trace_id":"d116813e-2d96-4a3d-ae04-6e53d69ca565"}
[2026-04-14 10:10:25] local.NOTICE: Repairing HubSpot tokens start {"correlation_id":"d269668d-cb18-4aeb-9a05-13a9e53195ed","trace_id":"ecbe2fde-809f-4720-8113-609eda111b53"}
[2026-04-14 10:10:25] local.INFO: Trying to refresh HubSpot token {"account_id":59,"updated_at":"2025-10-03 09:32:05"} {"correlation_id":"d269668d-cb18-4aeb-9a05-13a9e53195ed","trace_id":"ecbe2fde-809f-4720-8113-609eda111b53"}
[2026-04-14 10:10:25] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"d269668d-cb18-4aeb-9a05-13a9e53195ed","trace_id":"ecbe2fde-809f-4720-8113-609eda111b53"}
[2026-04-14 10:10:25] local.INFO: [SocialAccountService] Refreshing token from provider {"socialAccountId":59,"provider":"hubspot","refreshToken":"97b78f6e2cc49965c00c2492b602b02708b1392551e6b3f113fbaa48992af90b","state":"full-refresh"} {"correlation_id":"d269668d-cb18-4aeb-9a05-13a9e53195ed","trace_id":"ecbe2fde-809f-4720-8113-609eda11...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Tests failed: 10, passed: 0","depth":3,"value":"Tests failed: 10, passed: 0","help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AutomatedReportsCommandTest","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsCommandTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsCommandTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"248","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"[2026-04-14 10:05:19] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:text-relay:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"9756bfa7-c8e1-4b17-bc55-9f224d2af2e3\",\"trace_id\":\"9e5fa115-9cf5-45d6-a1da-109e154cfae7\"}\n[2026-04-14 10:05:19] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:text-relay:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"9756bfa7-c8e1-4b17-bc55-9f224d2af2e3\",\"trace_id\":\"9e5fa115-9cf5-45d6-a1da-109e154cfae7\"}\n[2026-04-14 10:05:23] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:pre-meeting-notification\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"d9d68876-323b-42bd-9953-635da8008f2e\",\"trace_id\":\"6c00ce4c-f2df-4ccb-908d-4862de973096\"}\n[2026-04-14 10:05:23] local.INFO: Running pre-meeting notification command {\"correlation_id\":\"d9d68876-323b-42bd-9953-635da8008f2e\",\"trace_id\":\"6c00ce4c-f2df-4ccb-908d-4862de973096\"}\n[2026-04-14 10:05:23] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:pre-meeting-notification\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"d9d68876-323b-42bd-9953-635da8008f2e\",\"trace_id\":\"6c00ce4c-f2df-4ccb-908d-4862de973096\"}\n[2026-04-14 10:05:26] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:start\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"27d73fea-a8cb-4757-9bbb-fbe7222e6943\",\"trace_id\":\"bcdb88d0-a641-43e4-85e8-b7dc4ab20a0e\"}\n[2026-04-14 10:05:26] local.INFO: Running conference:monitor:start command for activities in (2026-04-14 09:55:00, 2026-04-14 10:00:00] {\"correlation_id\":\"27d73fea-a8cb-4757-9bbb-fbe7222e6943\",\"trace_id\":\"bcdb88d0-a641-43e4-85e8-b7dc4ab20a0e\"}\n[2026-04-14 10:05:26] local.INFO: [conference:monitor:start] start ok {\"activity_id\":407307} {\"correlation_id\":\"27d73fea-a8cb-4757-9bbb-fbe7222e6943\",\"trace_id\":\"bcdb88d0-a641-43e4-85e8-b7dc4ab20a0e\"}\n[2026-04-14 10:05:26] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:start\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"27d73fea-a8cb-4757-9bbb-fbe7222e6943\",\"trace_id\":\"bcdb88d0-a641-43e4-85e8-b7dc4ab20a0e\"}\n[2026-04-14 10:05:28] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:end\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"588bae45-3998-4b86-b056-51aaf8b6882f\",\"trace_id\":\"8f716a65-7768-44c5-b0e4-02a859f329e5\"}\n[2026-04-14 10:05:28] local.INFO: conference:monitor:end:Jiminny\\Console\\Commands\\Activities\\MonitorMeetingEndCommand::logActivitiesEnded {\"from\":\"10:00\",\"to\":\"10:05\"} {\"correlation_id\":\"588bae45-3998-4b86-b056-51aaf8b6882f\",\"trace_id\":\"8f716a65-7768-44c5-b0e4-02a859f329e5\"}\n[2026-04-14 10:05:28] local.INFO: conference:monitor:end:Jiminny\\Console\\Commands\\Activities\\MonitorMeetingEndCommand::logActivitiesWithUnfinishedSession {\"from\":\"23:55\",\"to\":\"00:00\"} {\"correlation_id\":\"588bae45-3998-4b86-b056-51aaf8b6882f\",\"trace_id\":\"8f716a65-7768-44c5-b0e4-02a859f329e5\"}\n[2026-04-14 10:05:28] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:end\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"588bae45-3998-4b86-b056-51aaf8b6882f\",\"trace_id\":\"8f716a65-7768-44c5-b0e4-02a859f329e5\"}\n[2026-04-14 10:05:30] local.NOTICE: Repairing HubSpot tokens start {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:30] local.INFO: Trying to refresh HubSpot token {\"account_id\":59,\"updated_at\":\"2025-10-03 09:32:05\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:30] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:30] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":59,\"provider\":\"hubspot\",\"refreshToken\":\"97b78f6e2cc49965c00c2492b602b02708b1392551e6b3f113fbaa48992af90b\",\"state\":\"full-refresh\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:31] local.ERROR: Failed to refresh HubSpot token {\"account_id\":59,\"updated_at\":\"2025-10-03 09:32:05\",\"reason\":\"missing or invalid refresh token\",\"previous\":\"\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:31] local.INFO: Trying to refresh HubSpot token {\"account_id\":306,\"updated_at\":\"2023-11-27 09:30:03\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:31] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:31] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":306,\"provider\":\"hubspot\",\"refreshToken\":\"6fa6aa8cc641d131231acc3470f5c03cb3b07b2e580fb18f8acb3b1dbb72549b\",\"state\":\"full-refresh\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:31] local.ERROR: Failed to refresh HubSpot token {\"account_id\":306,\"updated_at\":\"2023-11-27 09:30:03\",\"reason\":\"missing or invalid refresh token\",\"previous\":\"\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:31] local.INFO: Trying to refresh HubSpot token {\"account_id\":1372,\"updated_at\":\"2025-10-02 14:47:06\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:31] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:31] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1372,\"provider\":\"hubspot\",\"refreshToken\":\"9aa73948c761da29dce46c177cf9aee1fde483a44169ca38723f9f0597d7a8c4\",\"state\":\"full-refresh\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:31] local.ERROR: Failed to refresh HubSpot token {\"account_id\":1372,\"updated_at\":\"2025-10-02 14:47:06\",\"reason\":\"missing or invalid refresh token\",\"previous\":\"\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:31] local.NOTICE: Repairing HubSpot tokens end {\"total\":3,\"fixed\":0,\"failed\":3} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:34] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:pre-meeting-reminder\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"2b2ca83a-1263-4a7c-a5d7-86dc15ea7aec\",\"trace_id\":\"fbf48d3d-4e50-4442-b14f-d2ae5e6e70bd\"}\n[2026-04-14 10:05:34] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"crm:bullhorn:ping\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"73b127c9-c033-4fa7-a8ed-2e28077ba970\",\"trace_id\":\"fd1cf3c5-d4ce-41d6-a19d-5e67fd544d9e\"}\n[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:34] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"crm:bullhorn:ping\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"73b127c9-c033-4fa7-a8ed-2e28077ba970\",\"trace_id\":\"fd1cf3c5-d4ce-41d6-a19d-5e67fd544d9e\"}\n[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Command] Starting polling service {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Polling] Service starting {\"memory_limit\":\"256M\",\"max_execution_time\":\"0\",\"initial_memory_mb\":62.0} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Polling] Acquired polling lock {\"expires_at\":\"2026-04-14T10:07:34.196472Z\"} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:34] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:34] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:pre-meeting-reminder\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"2b2ca83a-1263-4a7c-a5d7-86dc15ea7aec\",\"trace_id\":\"fbf48d3d-4e50-4442-b14f-d2ae5e6e70bd\"}\n[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:39] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:39] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:39] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:44] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:44] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:44] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:59] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:59] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:06:00] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:06:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"44f01bd8-2599-41a4-b7c3-8bb1fdf0df9a\",\"trace_id\":\"b4c87c8d-120d-48fb-b13c-aee84323f3e2\"}\n[2026-04-14 10:06:04] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"44f01bd8-2599-41a4-b7c3-8bb1fdf0df9a\",\"trace_id\":\"b4c87c8d-120d-48fb-b13c-aee84323f3e2\"}\n[2026-04-14 10:06:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"44f01bd8-2599-41a4-b7c3-8bb1fdf0df9a\",\"trace_id\":\"b4c87c8d-120d-48fb-b13c-aee84323f3e2\"}\n[2026-04-14 10:06:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"8403c1e4-b5b6-41f9-9280-ff666beed28b\",\"trace_id\":\"3f631f60-6d14-44f5-b6c3-b401999867f9\"}\n[2026-04-14 10:06:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"8403c1e4-b5b6-41f9-9280-ff666beed28b\",\"trace_id\":\"3f631f60-6d14-44f5-b6c3-b401999867f9\"}\n[2026-04-14 10:06:08] local.NOTICE: Monitoring start {\"correlation_id\":\"0d51eb08-f2f1-4322-97d0-268700856a99\",\"trace_id\":\"92b45b9a-b6e8-40c8-a783-193cf1a4eea2\"}\n[2026-04-14 10:06:08] local.NOTICE: Monitoring end {\"correlation_id\":\"0d51eb08-f2f1-4322-97d0-268700856a99\",\"trace_id\":\"92b45b9a-b6e8-40c8-a783-193cf1a4eea2\"}\n[2026-04-14 10:06:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"0566c59b-bf67-49eb-970a-a6b955ddd756\",\"trace_id\":\"724c5f5e-cd88-41fb-9b7e-74315e131024\"}\n[2026-04-14 10:06:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"0566c59b-bf67-49eb-970a-a6b955ddd756\",\"trace_id\":\"724c5f5e-cd88-41fb-9b7e-74315e131024\"}\n[2026-04-14 10:06:12] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"33d190d4-0abb-4e63-af52-95faa913e7a1\",\"trace_id\":\"703aaa4d-a551-4ed1-8a4a-609d373e2fc0\"}\n[2026-04-14 10:06:12] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"33d190d4-0abb-4e63-af52-95faa913e7a1\",\"trace_id\":\"703aaa4d-a551-4ed1-8a4a-609d373e2fc0\"}\n[2026-04-14 10:06:12] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":0} {\"correlation_id\":\"33d190d4-0abb-4e63-af52-95faa913e7a1\",\"trace_id\":\"703aaa4d-a551-4ed1-8a4a-609d373e2fc0\"}\n[2026-04-14 10:06:12] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"33d190d4-0abb-4e63-af52-95faa913e7a1\",\"trace_id\":\"703aaa4d-a551-4ed1-8a4a-609d373e2fc0\"}\n[2026-04-14 10:06:14] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"da41d77d-46d9-41ae-90b7-f8418b05fb9a\",\"trace_id\":\"47329a55-e6f4-406b-8730-e72d69737f09\"}\n[2026-04-14 10:06:14] local.INFO: Running conference:monitor:count command for activities in (2026-04-14 10:04:00, 2026-04-14 10:06:00] {\"correlation_id\":\"da41d77d-46d9-41ae-90b7-f8418b05fb9a\",\"trace_id\":\"47329a55-e6f4-406b-8730-e72d69737f09\"}\n[2026-04-14 10:06:14] local.INFO: [conference:monitor:count] No activities found in (2026-04-14 10:04:00, 2026-04-14 10:06:00] {\"correlation_id\":\"da41d77d-46d9-41ae-90b7-f8418b05fb9a\",\"trace_id\":\"47329a55-e6f4-406b-8730-e72d69737f09\"}\n[2026-04-14 10:06:14] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"da41d77d-46d9-41ae-90b7-f8418b05fb9a\",\"trace_id\":\"47329a55-e6f4-406b-8730-e72d69737f09\"}\n[2026-04-14 10:06:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"activity:notify-not-logged\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"310e7e99-6de4-4f93-967e-37c78e9ec826\",\"trace_id\":\"2a1fdf0a-be0e-4e5a-a677-fa16ddc33e9e\"}\n[2026-04-14 10:06:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"activity:notify-not-logged\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"310e7e99-6de4-4f93-967e-37c78e9ec826\",\"trace_id\":\"2a1fdf0a-be0e-4e5a-a677-fa16ddc33e9e\"}\n[2026-04-14 10:06:19] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"de8430ad-f242-4536-bebe-e165320b6b26\",\"trace_id\":\"75f83d2f-4e5e-4086-b062-7c1d24b5b74c\"}\n[2026-04-14 10:06:19] local.INFO: [EmailSchedule] STARTING Inbox Sync {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"de8430ad-f242-4536-bebe-e165320b6b26\",\"trace_id\":\"75f83d2f-4e5e-4086-b062-7c1d24b5b74c\"}\n[2026-04-14 10:06:19] local.INFO: [EmailSchedule] FINISHED Inbox Sync {\"host\":\"docker_lamp_1\",\"events\":1} {\"correlation_id\":\"de8430ad-f242-4536-bebe-e165320b6b26\",\"trace_id\":\"75f83d2f-4e5e-4086-b062-7c1d24b5b74c\"}\n[2026-04-14 10:06:19] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"de8430ad-f242-4536-bebe-e165320b6b26\",\"trace_id\":\"75f83d2f-4e5e-4086-b062-7c1d24b5b74c\"}\n[2026-04-14 10:06:22] local.INFO: [Sync Mailbox] Sync start {\"inbox_id\":59} {\"correlation_id\":\"eb46c86e-5c80-48b1-a4ee-ac425f197754\",\"trace_id\":\"75f83d2f-4e5e-4086-b062-7c1d24b5b74c\"}\n[2026-04-14 10:06:22] local.INFO: [Inbox service] Skipping METADATA SYNC for inbox 59 due to unauthorized access to the mailbox {\"correlation_id\":\"eb46c86e-5c80-48b1-a4ee-ac425f197754\",\"trace_id\":\"75f83d2f-4e5e-4086-b062-7c1d24b5b74c\"}\n[2026-04-14 10:06:22] local.INFO: [Sync Mailbox] Sync complete {\"inbox_id\":59} {\"correlation_id\":\"eb46c86e-5c80-48b1-a4ee-ac425f197754\",\"trace_id\":\"75f83d2f-4e5e-4086-b062-7c1d24b5b74c\"}\n[2026-04-14 10:06:30] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:06:30] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:06:30] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:06:30] local.WARNING: [HubSpot Journal Polling] Maximum empty results reached, stopping {\"empty_results\":5,\"max_empty_results\":5} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:06:30] local.WARNING: [HubSpot Journal Polling] Maximum empty results reached, stopping {\"empty_results\":5,\"max_empty_results\":5} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:06:30] local.INFO: [HubSpot Journal Polling] Service ending {\"runtime_seconds\":56,\"total_cycles\":5,\"files_downloaded\":0,\"empty_files\":0,\"other_portal_skipped\":0,\"total_events\":0,\"events_per_file\":0,\"avg_api_ms\":169.9,\"avg_download_ms\":0.0,\"avg_transform_ms\":0.0,\"avg_process_ms\":0.0,\"peak_memory_mb\":99.75} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:06:30] local.INFO: [HubSpot Journal Polling] Released polling lock {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:07:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"53329974-bdd6-4cd2-a022-0d565b0a5cf4\",\"trace_id\":\"08246763-f961-45fb-b262-51378bdbc955\"}\n[2026-04-14 10:07:04] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"53329974-bdd6-4cd2-a022-0d565b0a5cf4\",\"trace_id\":\"08246763-f961-45fb-b262-51378bdbc955\"}\n[2026-04-14 10:07:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"53329974-bdd6-4cd2-a022-0d565b0a5cf4\",\"trace_id\":\"08246763-f961-45fb-b262-51378bdbc955\"}\n[2026-04-14 10:07:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"2b6586f0-419e-4422-8800-e4b7619c43d6\",\"trace_id\":\"221c682d-c45f-4e4a-a793-ed11006dc6a1\"}\n[2026-04-14 10:07:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"2b6586f0-419e-4422-8800-e4b7619c43d6\",\"trace_id\":\"221c682d-c45f-4e4a-a793-ed11006dc6a1\"}\n[2026-04-14 10:07:08] local.NOTICE: Monitoring start {\"correlation_id\":\"9ba692ee-5286-41ca-abf0-86f6e1167a8e\",\"trace_id\":\"d58ab8ad-7737-4d7c-91c0-81733c21e709\"}\n[2026-04-14 10:07:08] local.NOTICE: Monitoring end {\"correlation_id\":\"9ba692ee-5286-41ca-abf0-86f6e1167a8e\",\"trace_id\":\"d58ab8ad-7737-4d7c-91c0-81733c21e709\"}\n[2026-04-14 10:07:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"28e708ed-74ee-4417-a8da-c1a9ae0cd745\",\"trace_id\":\"bd848201-9700-40bf-8fa4-9df13ae88f6e\"}\n[2026-04-14 10:07:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"28e708ed-74ee-4417-a8da-c1a9ae0cd745\",\"trace_id\":\"bd848201-9700-40bf-8fa4-9df13ae88f6e\"}\n[2026-04-14 10:07:12] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"95326c5a-7b17-475d-9245-634d15d51bfe\",\"trace_id\":\"31b36f9d-93cc-4917-bc7b-6b6a3da139e7\"}\n[2026-04-14 10:07:12] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"95326c5a-7b17-475d-9245-634d15d51bfe\",\"trace_id\":\"31b36f9d-93cc-4917-bc7b-6b6a3da139e7\"}\n[2026-04-14 10:07:12] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":0} {\"correlation_id\":\"95326c5a-7b17-475d-9245-634d15d51bfe\",\"trace_id\":\"31b36f9d-93cc-4917-bc7b-6b6a3da139e7\"}\n[2026-04-14 10:07:12] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"95326c5a-7b17-475d-9245-634d15d51bfe\",\"trace_id\":\"31b36f9d-93cc-4917-bc7b-6b6a3da139e7\"}\n[2026-04-14 10:07:14] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:create\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"f4f68165-0bcc-4e79-89e5-81f9c627e4dc\",\"trace_id\":\"5766aab2-0316-400f-aa89-168ea0579941\"}\n[2026-04-14 10:07:14] local.INFO: [EmailSchedule] STARTING batch create {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"f4f68165-0bcc-4e79-89e5-81f9c627e4dc\",\"trace_id\":\"5766aab2-0316-400f-aa89-168ea0579941\"}\n[2026-04-14 10:07:14] local.INFO: [EmailSchedule] FINISHED batch create {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"f4f68165-0bcc-4e79-89e5-81f9c627e4dc\",\"trace_id\":\"5766aab2-0316-400f-aa89-168ea0579941\"}\n[2026-04-14 10:07:14] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:create\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"f4f68165-0bcc-4e79-89e5-81f9c627e4dc\",\"trace_id\":\"5766aab2-0316-400f-aa89-168ea0579941\"}\n[2026-04-14 10:07:15] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"activity:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"a7d5580f-8b90-4ff6-91e8-de94514f8ca1\",\"trace_id\":\"fc40909d-86c1-4e45-bd51-96e2bd8c4556\"}\n[2026-04-14 10:07:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"activity:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"a7d5580f-8b90-4ff6-91e8-de94514f8ca1\",\"trace_id\":\"fc40909d-86c1-4e45-bd51-96e2bd8c4556\"}\n[2026-04-14 10:07:16] local.INFO: [Jiminny\\Jobs\\Mailbox\\CreateBatches] processed 0 inboxes and created 0 batches {\"userId\":null,\"batchSize\":30,\"maxBatches\":1000} {\"correlation_id\":\"df4d1442-bcd6-4b63-8513-802ae90993e6\",\"trace_id\":\"5766aab2-0316-400f-aa89-168ea0579941\"}\n[2026-04-14 10:08:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"43299ccb-af86-42b1-b793-4ede57e2b91d\",\"trace_id\":\"2f919b69-9d68-488c-89fa-2aade6ef8519\"}\n[2026-04-14 10:08:04] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"43299ccb-af86-42b1-b793-4ede57e2b91d\",\"trace_id\":\"2f919b69-9d68-488c-89fa-2aade6ef8519\"}\n[2026-04-14 10:08:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"43299ccb-af86-42b1-b793-4ede57e2b91d\",\"trace_id\":\"2f919b69-9d68-488c-89fa-2aade6ef8519\"}\n[2026-04-14 10:08:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"cde80757-333e-4268-a902-892c031b2373\",\"trace_id\":\"36e932e0-8362-432f-9e36-d819f902d49e\"}\n[2026-04-14 10:08:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"cde80757-333e-4268-a902-892c031b2373\",\"trace_id\":\"36e932e0-8362-432f-9e36-d819f902d49e\"}\n[2026-04-14 10:08:07] local.NOTICE: Monitoring start {\"correlation_id\":\"146390f8-e91a-4e5c-b282-0c83b4947101\",\"trace_id\":\"fb689e40-c867-4fc5-9847-c223835da80e\"}\n[2026-04-14 10:08:07] local.NOTICE: Monitoring end {\"correlation_id\":\"146390f8-e91a-4e5c-b282-0c83b4947101\",\"trace_id\":\"fb689e40-c867-4fc5-9847-c223835da80e\"}\n[2026-04-14 10:08:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"58e23da5-8f3f-4836-aac7-315ab32f74a3\",\"trace_id\":\"c71267c4-b5fe-42ad-9bcd-76f6299c1538\"}\n[2026-04-14 10:08:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"58e23da5-8f3f-4836-aac7-315ab32f74a3\",\"trace_id\":\"c71267c4-b5fe-42ad-9bcd-76f6299c1538\"}\n[2026-04-14 10:08:13] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"9158bb6f-c165-495a-9b6e-8077d8343c87\",\"trace_id\":\"df378af8-cacb-41ea-b030-b8f53144fddd\"}\n[2026-04-14 10:08:13] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"9158bb6f-c165-495a-9b6e-8077d8343c87\",\"trace_id\":\"df378af8-cacb-41ea-b030-b8f53144fddd\"}\n[2026-04-14 10:08:13] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":0} {\"correlation_id\":\"9158bb6f-c165-495a-9b6e-8077d8343c87\",\"trace_id\":\"df378af8-cacb-41ea-b030-b8f53144fddd\"}\n[2026-04-14 10:08:13] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"9158bb6f-c165-495a-9b6e-8077d8343c87\",\"trace_id\":\"df378af8-cacb-41ea-b030-b8f53144fddd\"}\n[2026-04-14 10:08:14] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"35774df7-e046-49ec-835f-45f9dc1ec025\",\"trace_id\":\"45c5e102-6b65-4d23-9edd-684ca996316c\"}\n[2026-04-14 10:08:14] local.INFO: Running conference:monitor:count command for activities in (2026-04-14 10:06:00, 2026-04-14 10:08:00] {\"correlation_id\":\"35774df7-e046-49ec-835f-45f9dc1ec025\",\"trace_id\":\"45c5e102-6b65-4d23-9edd-684ca996316c\"}\n[2026-04-14 10:08:14] local.INFO: [conference:monitor:count] No activities found in (2026-04-14 10:06:00, 2026-04-14 10:08:00] {\"correlation_id\":\"35774df7-e046-49ec-835f-45f9dc1ec025\",\"trace_id\":\"45c5e102-6b65-4d23-9edd-684ca996316c\"}\n[2026-04-14 10:08:14] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"35774df7-e046-49ec-835f-45f9dc1ec025\",\"trace_id\":\"45c5e102-6b65-4d23-9edd-684ca996316c\"}\n[2026-04-14 10:08:17] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:retry-failed\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"d4dc4b3b-8dc8-4665-aec7-139be0df2306\",\"trace_id\":\"853f2210-e804-40aa-a1d8-4457c60f4993\"}\n[2026-04-14 10:08:17] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:retry-failed\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"d4dc4b3b-8dc8-4665-aec7-139be0df2306\",\"trace_id\":\"853f2210-e804-40aa-a1d8-4457c60f4993\"}\n[2026-04-14 10:09:05] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"8052fb2f-5876-4e2c-8f64-c770d9fe37fe\",\"trace_id\":\"63249c19-bf59-4e52-9096-156d537a9786\"}\n[2026-04-14 10:09:05] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"8052fb2f-5876-4e2c-8f64-c770d9fe37fe\",\"trace_id\":\"63249c19-bf59-4e52-9096-156d537a9786\"}\n[2026-04-14 10:09:05] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"8052fb2f-5876-4e2c-8f64-c770d9fe37fe\",\"trace_id\":\"63249c19-bf59-4e52-9096-156d537a9786\"}\n[2026-04-14 10:09:07] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"1dd274b4-f71d-486e-b6c4-aaf106304102\",\"trace_id\":\"1d55139c-a58d-4456-801a-9bcb3bf9b024\"}\n[2026-04-14 10:09:07] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"1dd274b4-f71d-486e-b6c4-aaf106304102\",\"trace_id\":\"1d55139c-a58d-4456-801a-9bcb3bf9b024\"}\n[2026-04-14 10:09:10] local.NOTICE: Monitoring start {\"correlation_id\":\"09dc762e-2b78-4dbb-a880-5c8f1cbfc4ad\",\"trace_id\":\"8e60392d-4ea4-41f2-be2f-a01853c7a1ab\"}\n[2026-04-14 10:09:10] local.NOTICE: Monitoring end {\"correlation_id\":\"09dc762e-2b78-4dbb-a880-5c8f1cbfc4ad\",\"trace_id\":\"8e60392d-4ea4-41f2-be2f-a01853c7a1ab\"}\n[2026-04-14 10:09:13] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"2de9f84e-2691-459d-adfd-f5f6746501d0\",\"trace_id\":\"418ad958-86c0-4477-b0fb-e487768d6fa1\"}\n[2026-04-14 10:09:13] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"2de9f84e-2691-459d-adfd-f5f6746501d0\",\"trace_id\":\"418ad958-86c0-4477-b0fb-e487768d6fa1\"}\n[2026-04-14 10:09:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"1be8488c-ae59-4f42-8475-c426905c3ca6\",\"trace_id\":\"aeb8b412-635e-4929-915f-fb3fe5786eae\"}\n[2026-04-14 10:09:16] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"1be8488c-ae59-4f42-8475-c426905c3ca6\",\"trace_id\":\"aeb8b412-635e-4929-915f-fb3fe5786eae\"}\n[2026-04-14 10:09:16] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":0} {\"correlation_id\":\"1be8488c-ae59-4f42-8475-c426905c3ca6\",\"trace_id\":\"aeb8b412-635e-4929-915f-fb3fe5786eae\"}\n[2026-04-14 10:09:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"1be8488c-ae59-4f42-8475-c426905c3ca6\",\"trace_id\":\"aeb8b412-635e-4929-915f-fb3fe5786eae\"}\n[2026-04-14 10:09:18] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"activity:aircall:check-and-renew\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"b3d1b688-309f-4df0-9dcd-9a733c87f597\",\"trace_id\":\"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c\"}\n[2026-04-14 10:09:18] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1496,\"provider\":\"aircall\"} {\"correlation_id\":\"b3d1b688-309f-4df0-9dcd-9a733c87f597\",\"trace_id\":\"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c\"}\n[2026-04-14 10:09:18] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1496,\"provider\":\"aircall\"} {\"correlation_id\":\"b3d1b688-309f-4df0-9dcd-9a733c87f597\",\"trace_id\":\"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c\"}\n[2026-04-14 10:09:18] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b3d1b688-309f-4df0-9dcd-9a733c87f597\",\"trace_id\":\"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c\"}\n[2026-04-14 10:09:18] local.ERROR: [Aircall] Re-activating webhooks failed {\"team_id\":1,\"reason\":\"{\\\"message\\\":\\\"Forbidden\\\"}\"} {\"correlation_id\":\"b3d1b688-309f-4df0-9dcd-9a733c87f597\",\"trace_id\":\"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c\"}\n[2026-04-14 10:09:18] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"activity:aircall:check-and-renew\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"b3d1b688-309f-4df0-9dcd-9a733c87f597\",\"trace_id\":\"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c\"}\n[2026-04-14 10:09:21] local.INFO: [RetryFailedDownloads] Starting {\"options\":{\"from\":null,\"to\":null,\"help\":false,\"silent\":false,\"quiet\":false,\"verbose\":false,\"version\":false,\"ansi\":null,\"no-interaction\":false,\"env\":null}} {\"correlation_id\":\"c7aba065-c8f1-473d-b8b5-4797245873bf\",\"trace_id\":\"48f587f9-dd77-4634-9ad9-1137b029b5f5\"}\n[2026-04-14 10:10:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"7310aae5-3829-4d5c-bbc9-f6550a35f539\",\"trace_id\":\"6099cf10-45e2-4b82-9649-649e2f8a1209\"}\n[2026-04-14 10:10:04] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"7310aae5-3829-4d5c-bbc9-f6550a35f539\",\"trace_id\":\"6099cf10-45e2-4b82-9649-649e2f8a1209\"}\n[2026-04-14 10:10:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"7310aae5-3829-4d5c-bbc9-f6550a35f539\",\"trace_id\":\"6099cf10-45e2-4b82-9649-649e2f8a1209\"}\n[2026-04-14 10:10:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"5119d94e-0c61-4312-a740-2b569388cc9f\",\"trace_id\":\"6a412a32-3bc3-46a4-af7c-24ad560a4e41\"}\n[2026-04-14 10:10:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"5119d94e-0c61-4312-a740-2b569388cc9f\",\"trace_id\":\"6a412a32-3bc3-46a4-af7c-24ad560a4e41\"}\n[2026-04-14 10:10:08] local.NOTICE: Monitoring start {\"correlation_id\":\"95cdb3b7-b356-4325-be28-20663ece6aa0\",\"trace_id\":\"e64a75a4-2493-4f35-ba46-ccd002e6b7b7\"}\n[2026-04-14 10:10:08] local.NOTICE: Monitoring end {\"correlation_id\":\"95cdb3b7-b356-4325-be28-20663ece6aa0\",\"trace_id\":\"e64a75a4-2493-4f35-ba46-ccd002e6b7b7\"}\n[2026-04-14 10:10:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"6460dd5f-4b94-4cd1-867e-53304d785744\",\"trace_id\":\"683b103d-2dfc-4266-84a2-d5cd799b133f\"}\n[2026-04-14 10:10:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"6460dd5f-4b94-4cd1-867e-53304d785744\",\"trace_id\":\"683b103d-2dfc-4266-84a2-d5cd799b133f\"}\n[2026-04-14 10:10:11] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"5a59007d-2a12-4977-8a5a-59c678aa12ee\",\"trace_id\":\"bc3a2ad5-9f13-4728-adaa-529da75cf011\"}\n[2026-04-14 10:10:11] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"5a59007d-2a12-4977-8a5a-59c678aa12ee\",\"trace_id\":\"bc3a2ad5-9f13-4728-adaa-529da75cf011\"}\n[2026-04-14 10:10:11] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":0} {\"correlation_id\":\"5a59007d-2a12-4977-8a5a-59c678aa12ee\",\"trace_id\":\"bc3a2ad5-9f13-4728-adaa-529da75cf011\"}\n[2026-04-14 10:10:11] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"5a59007d-2a12-4977-8a5a-59c678aa12ee\",\"trace_id\":\"bc3a2ad5-9f13-4728-adaa-529da75cf011\"}\n[2026-04-14 10:10:14] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"afe2ff6b-1b9e-4485-bdad-a758d873a782\",\"trace_id\":\"d507becf-55d6-4fda-8831-e981f95b85c8\"}\n[2026-04-14 10:10:14] local.INFO: Running conference:monitor:count command for activities in (2026-04-14 10:08:00, 2026-04-14 10:10:00] {\"correlation_id\":\"afe2ff6b-1b9e-4485-bdad-a758d873a782\",\"trace_id\":\"d507becf-55d6-4fda-8831-e981f95b85c8\"}\n[2026-04-14 10:10:14] local.INFO: [conference:monitor:count] No activities found in (2026-04-14 10:08:00, 2026-04-14 10:10:00] {\"correlation_id\":\"afe2ff6b-1b9e-4485-bdad-a758d873a782\",\"trace_id\":\"d507becf-55d6-4fda-8831-e981f95b85c8\"}\n[2026-04-14 10:10:14] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"afe2ff6b-1b9e-4485-bdad-a758d873a782\",\"trace_id\":\"d507becf-55d6-4fda-8831-e981f95b85c8\"}\n[2026-04-14 10:10:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"activity:purge-stale\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"ebe2ad2b-df9a-48d7-b78f-d52b7489c6f0\",\"trace_id\":\"05b44216-d5ac-44cd-b74b-3e92567b192d\"}\n[2026-04-14 10:10:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"activity:purge-stale\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"ebe2ad2b-df9a-48d7-b78f-d52b7489c6f0\",\"trace_id\":\"05b44216-d5ac-44cd-b74b-3e92567b192d\"}\n[2026-04-14 10:10:18] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:text-relay:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"d76b00ee-6271-4df7-ba45-769738bbb7ae\",\"trace_id\":\"92384790-9588-452d-abea-cdd25a2fe7ff\"}\n[2026-04-14 10:10:18] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:text-relay:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"d76b00ee-6271-4df7-ba45-769738bbb7ae\",\"trace_id\":\"92384790-9588-452d-abea-cdd25a2fe7ff\"}\n[2026-04-14 10:10:20] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:pre-meeting-notification\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"c8f3b5c1-bef5-4584-b9d8-0c10578fefac\",\"trace_id\":\"b700f03d-b02b-495e-b505-1598c7a9ea4b\"}\n[2026-04-14 10:10:20] local.INFO: Running pre-meeting notification command {\"correlation_id\":\"c8f3b5c1-bef5-4584-b9d8-0c10578fefac\",\"trace_id\":\"b700f03d-b02b-495e-b505-1598c7a9ea4b\"}\n[2026-04-14 10:10:20] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:pre-meeting-notification\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"c8f3b5c1-bef5-4584-b9d8-0c10578fefac\",\"trace_id\":\"b700f03d-b02b-495e-b505-1598c7a9ea4b\"}\n[2026-04-14 10:10:22] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:start\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"d7b97fbb-00b9-47c2-ae81-dda03fd8b253\",\"trace_id\":\"54447306-49bf-4629-8de0-bb191c61cce2\"}\n[2026-04-14 10:10:22] local.INFO: Running conference:monitor:start command for activities in (2026-04-14 10:00:00, 2026-04-14 10:05:00] {\"correlation_id\":\"d7b97fbb-00b9-47c2-ae81-dda03fd8b253\",\"trace_id\":\"54447306-49bf-4629-8de0-bb191c61cce2\"}\n[2026-04-14 10:10:22] local.INFO: [conference:monitor:start] No activities found in (2026-04-14 10:00:00, 2026-04-14 10:05:00] {\"correlation_id\":\"d7b97fbb-00b9-47c2-ae81-dda03fd8b253\",\"trace_id\":\"54447306-49bf-4629-8de0-bb191c61cce2\"}\n[2026-04-14 10:10:22] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:start\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"d7b97fbb-00b9-47c2-ae81-dda03fd8b253\",\"trace_id\":\"54447306-49bf-4629-8de0-bb191c61cce2\"}\n[2026-04-14 10:10:23] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:end\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"07665538-664f-421e-af9b-97152a688b68\",\"trace_id\":\"d116813e-2d96-4a3d-ae04-6e53d69ca565\"}\n[2026-04-14 10:10:23] local.INFO: conference:monitor:end:Jiminny\\Console\\Commands\\Activities\\MonitorMeetingEndCommand::logActivitiesEnded {\"from\":\"10:05\",\"to\":\"10:10\"} {\"correlation_id\":\"07665538-664f-421e-af9b-97152a688b68\",\"trace_id\":\"d116813e-2d96-4a3d-ae04-6e53d69ca565\"}\n[2026-04-14 10:10:23] local.INFO: conference:monitor:end:Jiminny\\Console\\Commands\\Activities\\MonitorMeetingEndCommand::logActivitiesWithUnfinishedSession {\"from\":\"00:00\",\"to\":\"00:05\"} {\"correlation_id\":\"07665538-664f-421e-af9b-97152a688b68\",\"trace_id\":\"d116813e-2d96-4a3d-ae04-6e53d69ca565\"}\n[2026-04-14 10:10:23] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:end\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"07665538-664f-421e-af9b-97152a688b68\",\"trace_id\":\"d116813e-2d96-4a3d-ae04-6e53d69ca565\"}\n[2026-04-14 10:10:25] local.NOTICE: Repairing HubSpot tokens start {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:25] local.INFO: Trying to refresh HubSpot token {\"account_id\":59,\"updated_at\":\"2025-10-03 09:32:05\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:25] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:25] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":59,\"provider\":\"hubspot\",\"refreshToken\":\"97b78f6e2cc49965c00c2492b602b02708b1392551e6b3f113fbaa48992af90b\",\"state\":\"full-refresh\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:26] local.ERROR: Failed to refresh HubSpot token {\"account_id\":59,\"updated_at\":\"2025-10-03 09:32:05\",\"reason\":\"missing or invalid refresh token\",\"previous\":\"\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:26] local.INFO: Trying to refresh HubSpot token {\"account_id\":306,\"updated_at\":\"2023-11-27 09:30:03\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:26] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:26] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":306,\"provider\":\"hubspot\",\"refreshToken\":\"6fa6aa8cc641d131231acc3470f5c03cb3b07b2e580fb18f8acb3b1dbb72549b\",\"state\":\"full-refresh\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:26] local.ERROR: Failed to refresh HubSpot token {\"account_id\":306,\"updated_at\":\"2023-11-27 09:30:03\",\"reason\":\"missing or invalid refresh token\",\"previous\":\"\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:26] local.INFO: Trying to refresh HubSpot token {\"account_id\":1372,\"updated_at\":\"2025-10-02 14:47:06\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:26] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:26] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1372,\"provider\":\"hubspot\",\"refreshToken\":\"9aa73948c761da29dce46c177cf9aee1fde483a44169ca38723f9f0597d7a8c4\",\"state\":\"full-refresh\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:27] local.ERROR: Failed to refresh HubSpot token {\"account_id\":1372,\"updated_at\":\"2025-10-02 14:47:06\",\"reason\":\"missing or invalid refresh token\",\"previous\":\"\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:27] local.NOTICE: Repairing HubSpot tokens end {\"total\":3,\"fixed\":0,\"failed\":3} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:30] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:pre-meeting-reminder\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"cba13635-8dbf-4423-ad70-69f2d927c6ff\",\"trace_id\":\"cca585f7-e8b4-4cbd-b63f-8d9be90960a6\"}\n[2026-04-14 10:10:30] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"jiminny:transcription:retry-failed\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"8d29e53b-638b-4e55-8ee6-70567699b366\",\"trace_id\":\"ac17c380-0e7e-4425-bbc9-9e292ed99ea5\"}\n[2026-04-14 10:10:30] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"jiminny:transcription:retry-failed\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"8d29e53b-638b-4e55-8ee6-70567699b366\",\"trace_id\":\"ac17c380-0e7e-4425-bbc9-9e292ed99ea5\"}\n[2026-04-14 10:10:30] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:30] local.INFO: [HubSpot Journal Command] Starting polling service {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:30] local.INFO: [HubSpot Journal Polling] Service starting {\"memory_limit\":\"256M\",\"max_execution_time\":\"0\",\"initial_memory_mb\":62.0} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:30] local.INFO: [HubSpot Journal Polling] Acquired polling lock {\"expires_at\":\"2026-04-14T10:12:30.407181Z\"} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:30] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:30] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:30] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:pre-meeting-reminder\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"cba13635-8dbf-4423-ad70-69f2d927c6ff\",\"trace_id\":\"cca585f7-e8b4-4cbd-b63f-8d9be90960a6\"}\n[2026-04-14 10:10:30] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:32] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"crm:reset-governor\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"4943604a-02ac-42cd-82ee-524a684c9d07\",\"trace_id\":\"dea56e3f-9697-4054-8b54-7db752a8613f\"}\n[2026-04-14 10:10:32] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"crm:reset-governor\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"4943604a-02ac-42cd-82ee-524a684c9d07\",\"trace_id\":\"dea56e3f-9697-4054-8b54-7db752a8613f\"}\n[2026-04-14 10:10:34] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"crm:bullhorn:ping\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"7ae1dc8e-0ce6-461b-a054-be59c56de0b5\",\"trace_id\":\"8892af7b-37c9-4892-82fd-aa4596edc512\"}\n[2026-04-14 10:10:34] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"crm:bullhorn:ping\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"7ae1dc8e-0ce6-461b-a054-be59c56de0b5\",\"trace_id\":\"8892af7b-37c9-4892-82fd-aa4596edc512\"}\n[2026-04-14 10:10:35] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:35] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:35] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:40] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:40] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:41] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:56] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:56] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:56] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:11:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"79c8dc9b-058f-4f0e-9e9a-2e34a66209a7\",\"trace_id\":\"c6894787-c096-4c96-96cf-8ed81e40aa59\"}\n[2026-04-14 10:11:04] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"79c8dc9b-058f-4f0e-9e9a-2e34a66209a7\",\"trace_id\":\"c6894787-c096-4c96-96cf-8ed81e40aa59\"}\n[2026-04-14 10:11:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"79c8dc9b-058f-4f0e-9e9a-2e34a66209a7\",\"trace_id\":\"c6894787-c096-4c96-96cf-8ed81e40aa59\"}\n[2026-04-14 10:11:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"d52d55c7-74a3-409b-b458-fecfd8990f5a\",\"trace_id\":\"407ded8c-1b50-4ba7-8190-f3e84814124e\"}\n[2026-04-14 10:11:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"d52d55c7-74a3-409b-b458-fecfd8990f5a\",\"trace_id\":\"407ded8c-1b50-4ba7-8190-f3e84814124e\"}\n[2026-04-14 10:11:08] local.NOTICE: Monitoring start {\"correlation_id\":\"296fc7a0-329d-43bf-8c98-547c407c447c\",\"trace_id\":\"d2bbc8a9-18cb-408f-98a9-f87d6a2e4cb9\"}\n[2026-04-14 10:11:08] local.NOTICE: Monitoring end {\"correlation_id\":\"296fc7a0-329d-43bf-8c98-547c407c447c\",\"trace_id\":\"d2bbc8a9-18cb-408f-98a9-f87d6a2e4cb9\"}\n[2026-04-14 10:11:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"4aaf62d1-0d46-4f16-af0e-0617eb460382\",\"trace_id\":\"7bcc5249-9d16-44e5-a83c-3a613e00c860\"}\n[2026-04-14 10:11:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"4aaf62d1-0d46-4f16-af0e-0617eb460382\",\"trace_id\":\"7bcc5249-9d16-44e5-a83c-3a613e00c860\"}\n[2026-04-14 10:11:11] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"19290448-0263-4849-93fc-f09885da0c1f\",\"trace_id\":\"1483761c-464c-4374-994f-121758fcd534\"}\n[2026-04-14 10:11:12] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"19290448-0263-4849-93fc-f09885da0c1f\",\"trace_id\":\"1483761c-464c-4374-994f-121758fcd534\"}\n[2026-04-14 10:11:12] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":0} {\"correlation_id\":\"19290448-0263-4849-93fc-f09885da0c1f\",\"trace_id\":\"1483761c-464c-4374-994f-121758fcd534\"}\n[2026-04-14 10:11:12] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"19290448-0263-4849-93fc-f09885da0c1f\",\"trace_id\":\"1483761c-464c-4374-994f-121758fcd534\"}\n[2026-04-14 10:11:26] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:11:26] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:11:26] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:11:26] local.WARNING: [HubSpot Journal Polling] Maximum empty results reached, stopping {\"empty_results\":5,\"max_empty_results\":5} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:11:26] local.WARNING: [HubSpot Journal Polling] Maximum empty results reached, stopping {\"empty_results\":5,\"max_empty_results\":5} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:11:26] local.INFO: [HubSpot Journal Polling] Service ending {\"runtime_seconds\":56,\"total_cycles\":5,\"files_downloaded\":0,\"empty_files\":0,\"other_portal_skipped\":0,\"total_events\":0,\"events_per_file\":0,\"avg_api_ms\":252.2,\"avg_download_ms\":0.0,\"avg_transform_ms\":0.0,\"avg_process_ms\":0.0,\"peak_memory_mb\":99.75} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:11:26] local.INFO: [HubSpot Journal Polling] Released polling lock {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:12:07] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"74ad5a14-81b2-48f4-bb37-2d2ac73c5059\",\"trace_id\":\"6d6d809e-3d77-400c-a351-ac4db72cf3fc\"}\n[2026-04-14 10:12:07] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"74ad5a14-81b2-48f4-bb37-2d2ac73c5059\",\"trace_id\":\"6d6d809e-3d77-400c-a351-ac4db72cf3fc\"}\n[2026-04-14 10:12:07] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"74ad5a14-81b2-48f4-bb37-2d2ac73c5059\",\"trace_id\":\"6d6d809e-3d77-400c-a351-ac4db72cf3fc\"}\n[2026-04-14 10:12:09] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"3671d2e5-29f6-43db-8f1a-4a0bf5ff669b\",\"trace_id\":\"1295351d-9c37-47db-bad6-dbccb4c6466f\"}\n[2026-04-14 10:12:09] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"3671d2e5-29f6-43db-8f1a-4a0bf5ff669b\",\"trace_id\":\"1295351d-9c37-47db-bad6-dbccb4c6466f\"}\n[2026-04-14 10:12:11] local.NOTICE: Monitoring start {\"correlation_id\":\"f2d467c8-e822-4691-9920-cac071f14877\",\"trace_id\":\"4d67db65-374a-4eb2-9cc6-8c60dc9ebabc\"}\n[2026-04-14 10:12:11] local.NOTICE: Monitoring end {\"correlation_id\":\"f2d467c8-e822-4691-9920-cac071f14877\",\"trace_id\":\"4d67db65-374a-4eb2-9cc6-8c60dc9ebabc\"}\n[2026-04-14 10:12:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"04d8a469-317c-40e1-a163-ad747408f9e3\",\"trace_id\":\"bafa4d05-7e55-4524-b0a5-1764ecb964fe\"}\n[2026-04-14 10:12:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"04d8a469-317c-40e1-a163-ad747408f9e3\",\"trace_id\":\"bafa4d05-7e55-4524-b0a5-1764ecb964fe\"}\n[2026-04-14 10:12:20] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"3cd3a658-bd65-4253-9c8d-b94cdd2f3c4d\",\"trace_id\":\"5ae25493-7098-481f-84f4-225c6595b140\"}\n[2026-04-14 10:12:20] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"3cd3a658-bd65-4253-9c8d-b94cdd2f3c4d\",\"trace_id\":\"5ae25493-7098-481f-84f4-225c6595b140\"}\n[2026-04-14 10:12:20] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":0} {\"correlation_id\":\"3cd3a658-bd65-4253-9c8d-b94cdd2f3c4d\",\"trace_id\":\"5ae25493-7098-481f-84f4-225c6595b140\"}\n[2026-04-14 10:12:20] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"3cd3a658-bd65-4253-9c8d-b94cdd2f3c4d\",\"trace_id\":\"5ae25493-7098-481f-84f4-225c6595b140\"}\n[2026-04-14 10:12:22] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"4cabe4c8-81a7-4405-958c-783cc42dc31a\",\"trace_id\":\"844b27d2-1727-4f1a-bb9a-a3ad44d9d37a\"}\n[2026-04-14 10:12:22] local.INFO: Running conference:monitor:count command for activities in (2026-04-14 10:10:00, 2026-04-14 10:12:00] {\"correlation_id\":\"4cabe4c8-81a7-4405-958c-783cc42dc31a\",\"trace_id\":\"844b27d2-1727-4f1a-bb9a-a3ad44d9d37a\"}\n[2026-04-14 10:12:22] local.INFO: [conference:monitor:count] No activities found in (2026-04-14 10:10:00, 2026-04-14 10:12:00] {\"correlation_id\":\"4cabe4c8-81a7-4405-958c-783cc42dc31a\",\"trace_id\":\"844b27d2-1727-4f1a-bb9a-a3ad44d9d37a\"}\n[2026-04-14 10:12:22] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"4cabe4c8-81a7-4405-958c-783cc42dc31a\",\"trace_id\":\"844b27d2-1727-4f1a-bb9a-a3ad44d9d37a\"}\n[2026-04-14 10:12:25] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:create\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"b573f9e3-5771-4b03-9fd9-1ff7d571916d\",\"trace_id\":\"e76af6ed-1fff-4aef-8b17-a8288121b37a\"}\n[2026-04-14 10:12:25] local.INFO: [EmailSchedule] STARTING batch create {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"b573f9e3-5771-4b03-9fd9-1ff7d571916d\",\"trace_id\":\"e76af6ed-1fff-4aef-8b17-a8288121b37a\"}\n[2026-04-14 10:12:25] local.INFO: [EmailSchedule] FINISHED batch create {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"b573f9e3-5771-4b03-9fd9-1ff7d571916d\",\"trace_id\":\"e76af6ed-1fff-4aef-8b17-a8288121b37a\"}\n[2026-04-14 10:12:25] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:create\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"b573f9e3-5771-4b03-9fd9-1ff7d571916d\",\"trace_id\":\"e76af6ed-1fff-4aef-8b17-a8288121b37a\"}\n[2026-04-14 10:12:27] local.INFO: [Jiminny\\Jobs\\Mailbox\\CreateBatches] processed 0 inboxes and created 0 batches {\"userId\":null,\"batchSize\":30,\"maxBatches\":1000} {\"correlation_id\":\"ad382f07-8ff8-450f-b38c-fba577285d06\",\"trace_id\":\"e76af6ed-1fff-4aef-8b17-a8288121b37a\"}\n[2026-04-14 10:13:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"24a30c58-6ce4-427b-972e-87df2b1f0d31\",\"trace_id\":\"30809930-a6a8-49bb-9c61-f4dcca23683a\"}\n[2026-04-14 10:13:04] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"24a30c58-6ce4-427b-972e-87df2b1f0d31\",\"trace_id\":\"30809930-a6a8-49bb-9c61-f4dcca23683a\"}\n[2026-04-14 10:13:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"24a30c58-6ce4-427b-972e-87df2b1f0d31\",\"trace_id\":\"30809930-a6a8-49bb-9c61-f4dcca23683a\"}\n[2026-04-14 10:13:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"db368cd5-b4ea-4f77-8169-24ff5403199d\",\"trace_id\":\"0bd7332d-c4c1-44b6-b204-e68b8ec6217a\"}\n[2026-04-14 10:13:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"db368cd5-b4ea-4f77-8169-24ff5403199d\",\"trace_id\":\"0bd7332d-c4c1-44b6-b204-e68b8ec6217a\"}\n[2026-04-14 10:13:08] local.NOTICE: Monitoring start {\"correlation_id\":\"98628e85-9d56-4088-8ddb-5a33768305d6\",\"trace_id\":\"138288e6-6342-4250-9c1e-46921c407423\"}\n[2026-04-14 10:13:08] local.NOTICE: Monitoring end {\"correlation_id\":\"98628e85-9d56-4088-8ddb-5a33768305d6\",\"trace_id\":\"138288e6-6342-4250-9c1e-46921c407423\"}","depth":4,"value":"[2026-04-14 10:05:19] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:text-relay:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"9756bfa7-c8e1-4b17-bc55-9f224d2af2e3\",\"trace_id\":\"9e5fa115-9cf5-45d6-a1da-109e154cfae7\"}\n[2026-04-14 10:05:19] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:text-relay:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"9756bfa7-c8e1-4b17-bc55-9f224d2af2e3\",\"trace_id\":\"9e5fa115-9cf5-45d6-a1da-109e154cfae7\"}\n[2026-04-14 10:05:23] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:pre-meeting-notification\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"d9d68876-323b-42bd-9953-635da8008f2e\",\"trace_id\":\"6c00ce4c-f2df-4ccb-908d-4862de973096\"}\n[2026-04-14 10:05:23] local.INFO: Running pre-meeting notification command {\"correlation_id\":\"d9d68876-323b-42bd-9953-635da8008f2e\",\"trace_id\":\"6c00ce4c-f2df-4ccb-908d-4862de973096\"}\n[2026-04-14 10:05:23] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:pre-meeting-notification\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"d9d68876-323b-42bd-9953-635da8008f2e\",\"trace_id\":\"6c00ce4c-f2df-4ccb-908d-4862de973096\"}\n[2026-04-14 10:05:26] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:start\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"27d73fea-a8cb-4757-9bbb-fbe7222e6943\",\"trace_id\":\"bcdb88d0-a641-43e4-85e8-b7dc4ab20a0e\"}\n[2026-04-14 10:05:26] local.INFO: Running conference:monitor:start command for activities in (2026-04-14 09:55:00, 2026-04-14 10:00:00] {\"correlation_id\":\"27d73fea-a8cb-4757-9bbb-fbe7222e6943\",\"trace_id\":\"bcdb88d0-a641-43e4-85e8-b7dc4ab20a0e\"}\n[2026-04-14 10:05:26] local.INFO: [conference:monitor:start] start ok {\"activity_id\":407307} {\"correlation_id\":\"27d73fea-a8cb-4757-9bbb-fbe7222e6943\",\"trace_id\":\"bcdb88d0-a641-43e4-85e8-b7dc4ab20a0e\"}\n[2026-04-14 10:05:26] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:start\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"27d73fea-a8cb-4757-9bbb-fbe7222e6943\",\"trace_id\":\"bcdb88d0-a641-43e4-85e8-b7dc4ab20a0e\"}\n[2026-04-14 10:05:28] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:end\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"588bae45-3998-4b86-b056-51aaf8b6882f\",\"trace_id\":\"8f716a65-7768-44c5-b0e4-02a859f329e5\"}\n[2026-04-14 10:05:28] local.INFO: conference:monitor:end:Jiminny\\Console\\Commands\\Activities\\MonitorMeetingEndCommand::logActivitiesEnded {\"from\":\"10:00\",\"to\":\"10:05\"} {\"correlation_id\":\"588bae45-3998-4b86-b056-51aaf8b6882f\",\"trace_id\":\"8f716a65-7768-44c5-b0e4-02a859f329e5\"}\n[2026-04-14 10:05:28] local.INFO: conference:monitor:end:Jiminny\\Console\\Commands\\Activities\\MonitorMeetingEndCommand::logActivitiesWithUnfinishedSession {\"from\":\"23:55\",\"to\":\"00:00\"} {\"correlation_id\":\"588bae45-3998-4b86-b056-51aaf8b6882f\",\"trace_id\":\"8f716a65-7768-44c5-b0e4-02a859f329e5\"}\n[2026-04-14 10:05:28] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:end\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"588bae45-3998-4b86-b056-51aaf8b6882f\",\"trace_id\":\"8f716a65-7768-44c5-b0e4-02a859f329e5\"}\n[2026-04-14 10:05:30] local.NOTICE: Repairing HubSpot tokens start {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:30] local.INFO: Trying to refresh HubSpot token {\"account_id\":59,\"updated_at\":\"2025-10-03 09:32:05\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:30] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:30] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":59,\"provider\":\"hubspot\",\"refreshToken\":\"97b78f6e2cc49965c00c2492b602b02708b1392551e6b3f113fbaa48992af90b\",\"state\":\"full-refresh\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:31] local.ERROR: Failed to refresh HubSpot token {\"account_id\":59,\"updated_at\":\"2025-10-03 09:32:05\",\"reason\":\"missing or invalid refresh token\",\"previous\":\"\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:31] local.INFO: Trying to refresh HubSpot token {\"account_id\":306,\"updated_at\":\"2023-11-27 09:30:03\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:31] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:31] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":306,\"provider\":\"hubspot\",\"refreshToken\":\"6fa6aa8cc641d131231acc3470f5c03cb3b07b2e580fb18f8acb3b1dbb72549b\",\"state\":\"full-refresh\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:31] local.ERROR: Failed to refresh HubSpot token {\"account_id\":306,\"updated_at\":\"2023-11-27 09:30:03\",\"reason\":\"missing or invalid refresh token\",\"previous\":\"\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:31] local.INFO: Trying to refresh HubSpot token {\"account_id\":1372,\"updated_at\":\"2025-10-02 14:47:06\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:31] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:31] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1372,\"provider\":\"hubspot\",\"refreshToken\":\"9aa73948c761da29dce46c177cf9aee1fde483a44169ca38723f9f0597d7a8c4\",\"state\":\"full-refresh\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:31] local.ERROR: Failed to refresh HubSpot token {\"account_id\":1372,\"updated_at\":\"2025-10-02 14:47:06\",\"reason\":\"missing or invalid refresh token\",\"previous\":\"\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:31] local.NOTICE: Repairing HubSpot tokens end {\"total\":3,\"fixed\":0,\"failed\":3} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:34] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:pre-meeting-reminder\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"2b2ca83a-1263-4a7c-a5d7-86dc15ea7aec\",\"trace_id\":\"fbf48d3d-4e50-4442-b14f-d2ae5e6e70bd\"}\n[2026-04-14 10:05:34] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"crm:bullhorn:ping\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"73b127c9-c033-4fa7-a8ed-2e28077ba970\",\"trace_id\":\"fd1cf3c5-d4ce-41d6-a19d-5e67fd544d9e\"}\n[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:34] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"crm:bullhorn:ping\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"73b127c9-c033-4fa7-a8ed-2e28077ba970\",\"trace_id\":\"fd1cf3c5-d4ce-41d6-a19d-5e67fd544d9e\"}\n[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Command] Starting polling service {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Polling] Service starting {\"memory_limit\":\"256M\",\"max_execution_time\":\"0\",\"initial_memory_mb\":62.0} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Polling] Acquired polling lock {\"expires_at\":\"2026-04-14T10:07:34.196472Z\"} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:34] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:34] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:pre-meeting-reminder\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"2b2ca83a-1263-4a7c-a5d7-86dc15ea7aec\",\"trace_id\":\"fbf48d3d-4e50-4442-b14f-d2ae5e6e70bd\"}\n[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:39] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:39] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:39] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:44] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:44] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:44] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:59] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:59] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:06:00] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:06:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"44f01bd8-2599-41a4-b7c3-8bb1fdf0df9a\",\"trace_id\":\"b4c87c8d-120d-48fb-b13c-aee84323f3e2\"}\n[2026-04-14 10:06:04] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"44f01bd8-2599-41a4-b7c3-8bb1fdf0df9a\",\"trace_id\":\"b4c87c8d-120d-48fb-b13c-aee84323f3e2\"}\n[2026-04-14 10:06:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"44f01bd8-2599-41a4-b7c3-8bb1fdf0df9a\",\"trace_id\":\"b4c87c8d-120d-48fb-b13c-aee84323f3e2\"}\n[2026-04-14 10:06:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"8403c1e4-b5b6-41f9-9280-ff666beed28b\",\"trace_id\":\"3f631f60-6d14-44f5-b6c3-b401999867f9\"}\n[2026-04-14 10:06:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"8403c1e4-b5b6-41f9-9280-ff666beed28b\",\"trace_id\":\"3f631f60-6d14-44f5-b6c3-b401999867f9\"}\n[2026-04-14 10:06:08] local.NOTICE: Monitoring start {\"correlation_id\":\"0d51eb08-f2f1-4322-97d0-268700856a99\",\"trace_id\":\"92b45b9a-b6e8-40c8-a783-193cf1a4eea2\"}\n[2026-04-14 10:06:08] local.NOTICE: Monitoring end {\"correlation_id\":\"0d51eb08-f2f1-4322-97d0-268700856a99\",\"trace_id\":\"92b45b9a-b6e8-40c8-a783-193cf1a4eea2\"}\n[2026-04-14 10:06:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"0566c59b-bf67-49eb-970a-a6b955ddd756\",\"trace_id\":\"724c5f5e-cd88-41fb-9b7e-74315e131024\"}\n[2026-04-14 10:06:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"0566c59b-bf67-49eb-970a-a6b955ddd756\",\"trace_id\":\"724c5f5e-cd88-41fb-9b7e-74315e131024\"}\n[2026-04-14 10:06:12] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"33d190d4-0abb-4e63-af52-95faa913e7a1\",\"trace_id\":\"703aaa4d-a551-4ed1-8a4a-609d373e2fc0\"}\n[2026-04-14 10:06:12] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"33d190d4-0abb-4e63-af52-95faa913e7a1\",\"trace_id\":\"703aaa4d-a551-4ed1-8a4a-609d373e2fc0\"}\n[2026-04-14 10:06:12] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":0} {\"correlation_id\":\"33d190d4-0abb-4e63-af52-95faa913e7a1\",\"trace_id\":\"703aaa4d-a551-4ed1-8a4a-609d373e2fc0\"}\n[2026-04-14 10:06:12] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"33d190d4-0abb-4e63-af52-95faa913e7a1\",\"trace_id\":\"703aaa4d-a551-4ed1-8a4a-609d373e2fc0\"}\n[2026-04-14 10:06:14] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"da41d77d-46d9-41ae-90b7-f8418b05fb9a\",\"trace_id\":\"47329a55-e6f4-406b-8730-e72d69737f09\"}\n[2026-04-14 10:06:14] local.INFO: Running conference:monitor:count command for activities in (2026-04-14 10:04:00, 2026-04-14 10:06:00] {\"correlation_id\":\"da41d77d-46d9-41ae-90b7-f8418b05fb9a\",\"trace_id\":\"47329a55-e6f4-406b-8730-e72d69737f09\"}\n[2026-04-14 10:06:14] local.INFO: [conference:monitor:count] No activities found in (2026-04-14 10:04:00, 2026-04-14 10:06:00] {\"correlation_id\":\"da41d77d-46d9-41ae-90b7-f8418b05fb9a\",\"trace_id\":\"47329a55-e6f4-406b-8730-e72d69737f09\"}\n[2026-04-14 10:06:14] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"da41d77d-46d9-41ae-90b7-f8418b05fb9a\",\"trace_id\":\"47329a55-e6f4-406b-8730-e72d69737f09\"}\n[2026-04-14 10:06:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"activity:notify-not-logged\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"310e7e99-6de4-4f93-967e-37c78e9ec826\",\"trace_id\":\"2a1fdf0a-be0e-4e5a-a677-fa16ddc33e9e\"}\n[2026-04-14 10:06:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"activity:notify-not-logged\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"310e7e99-6de4-4f93-967e-37c78e9ec826\",\"trace_id\":\"2a1fdf0a-be0e-4e5a-a677-fa16ddc33e9e\"}\n[2026-04-14 10:06:19] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"de8430ad-f242-4536-bebe-e165320b6b26\",\"trace_id\":\"75f83d2f-4e5e-4086-b062-7c1d24b5b74c\"}\n[2026-04-14 10:06:19] local.INFO: [EmailSchedule] STARTING Inbox Sync {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"de8430ad-f242-4536-bebe-e165320b6b26\",\"trace_id\":\"75f83d2f-4e5e-4086-b062-7c1d24b5b74c\"}\n[2026-04-14 10:06:19] local.INFO: [EmailSchedule] FINISHED Inbox Sync {\"host\":\"docker_lamp_1\",\"events\":1} {\"correlation_id\":\"de8430ad-f242-4536-bebe-e165320b6b26\",\"trace_id\":\"75f83d2f-4e5e-4086-b062-7c1d24b5b74c\"}\n[2026-04-14 10:06:19] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"de8430ad-f242-4536-bebe-e165320b6b26\",\"trace_id\":\"75f83d2f-4e5e-4086-b062-7c1d24b5b74c\"}\n[2026-04-14 10:06:22] local.INFO: [Sync Mailbox] Sync start {\"inbox_id\":59} {\"correlation_id\":\"eb46c86e-5c80-48b1-a4ee-ac425f197754\",\"trace_id\":\"75f83d2f-4e5e-4086-b062-7c1d24b5b74c\"}\n[2026-04-14 10:06:22] local.INFO: [Inbox service] Skipping METADATA SYNC for inbox 59 due to unauthorized access to the mailbox {\"correlation_id\":\"eb46c86e-5c80-48b1-a4ee-ac425f197754\",\"trace_id\":\"75f83d2f-4e5e-4086-b062-7c1d24b5b74c\"}\n[2026-04-14 10:06:22] local.INFO: [Sync Mailbox] Sync complete {\"inbox_id\":59} {\"correlation_id\":\"eb46c86e-5c80-48b1-a4ee-ac425f197754\",\"trace_id\":\"75f83d2f-4e5e-4086-b062-7c1d24b5b74c\"}\n[2026-04-14 10:06:30] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:06:30] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:06:30] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:06:30] local.WARNING: [HubSpot Journal Polling] Maximum empty results reached, stopping {\"empty_results\":5,\"max_empty_results\":5} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:06:30] local.WARNING: [HubSpot Journal Polling] Maximum empty results reached, stopping {\"empty_results\":5,\"max_empty_results\":5} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:06:30] local.INFO: [HubSpot Journal Polling] Service ending {\"runtime_seconds\":56,\"total_cycles\":5,\"files_downloaded\":0,\"empty_files\":0,\"other_portal_skipped\":0,\"total_events\":0,\"events_per_file\":0,\"avg_api_ms\":169.9,\"avg_download_ms\":0.0,\"avg_transform_ms\":0.0,\"avg_process_ms\":0.0,\"peak_memory_mb\":99.75} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:06:30] local.INFO: [HubSpot Journal Polling] Released polling lock {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:07:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"53329974-bdd6-4cd2-a022-0d565b0a5cf4\",\"trace_id\":\"08246763-f961-45fb-b262-51378bdbc955\"}\n[2026-04-14 10:07:04] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"53329974-bdd6-4cd2-a022-0d565b0a5cf4\",\"trace_id\":\"08246763-f961-45fb-b262-51378bdbc955\"}\n[2026-04-14 10:07:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"53329974-bdd6-4cd2-a022-0d565b0a5cf4\",\"trace_id\":\"08246763-f961-45fb-b262-51378bdbc955\"}\n[2026-04-14 10:07:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"2b6586f0-419e-4422-8800-e4b7619c43d6\",\"trace_id\":\"221c682d-c45f-4e4a-a793-ed11006dc6a1\"}\n[2026-04-14 10:07:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"2b6586f0-419e-4422-8800-e4b7619c43d6\",\"trace_id\":\"221c682d-c45f-4e4a-a793-ed11006dc6a1\"}\n[2026-04-14 10:07:08] local.NOTICE: Monitoring start {\"correlation_id\":\"9ba692ee-5286-41ca-abf0-86f6e1167a8e\",\"trace_id\":\"d58ab8ad-7737-4d7c-91c0-81733c21e709\"}\n[2026-04-14 10:07:08] local.NOTICE: Monitoring end {\"correlation_id\":\"9ba692ee-5286-41ca-abf0-86f6e1167a8e\",\"trace_id\":\"d58ab8ad-7737-4d7c-91c0-81733c21e709\"}\n[2026-04-14 10:07:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"28e708ed-74ee-4417-a8da-c1a9ae0cd745\",\"trace_id\":\"bd848201-9700-40bf-8fa4-9df13ae88f6e\"}\n[2026-04-14 10:07:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"28e708ed-74ee-4417-a8da-c1a9ae0cd745\",\"trace_id\":\"bd848201-9700-40bf-8fa4-9df13ae88f6e\"}\n[2026-04-14 10:07:12] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"95326c5a-7b17-475d-9245-634d15d51bfe\",\"trace_id\":\"31b36f9d-93cc-4917-bc7b-6b6a3da139e7\"}\n[2026-04-14 10:07:12] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"95326c5a-7b17-475d-9245-634d15d51bfe\",\"trace_id\":\"31b36f9d-93cc-4917-bc7b-6b6a3da139e7\"}\n[2026-04-14 10:07:12] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":0} {\"correlation_id\":\"95326c5a-7b17-475d-9245-634d15d51bfe\",\"trace_id\":\"31b36f9d-93cc-4917-bc7b-6b6a3da139e7\"}\n[2026-04-14 10:07:12] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"95326c5a-7b17-475d-9245-634d15d51bfe\",\"trace_id\":\"31b36f9d-93cc-4917-bc7b-6b6a3da139e7\"}\n[2026-04-14 10:07:14] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:create\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"f4f68165-0bcc-4e79-89e5-81f9c627e4dc\",\"trace_id\":\"5766aab2-0316-400f-aa89-168ea0579941\"}\n[2026-04-14 10:07:14] local.INFO: [EmailSchedule] STARTING batch create {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"f4f68165-0bcc-4e79-89e5-81f9c627e4dc\",\"trace_id\":\"5766aab2-0316-400f-aa89-168ea0579941\"}\n[2026-04-14 10:07:14] local.INFO: [EmailSchedule] FINISHED batch create {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"f4f68165-0bcc-4e79-89e5-81f9c627e4dc\",\"trace_id\":\"5766aab2-0316-400f-aa89-168ea0579941\"}\n[2026-04-14 10:07:14] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:create\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"f4f68165-0bcc-4e79-89e5-81f9c627e4dc\",\"trace_id\":\"5766aab2-0316-400f-aa89-168ea0579941\"}\n[2026-04-14 10:07:15] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"activity:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"a7d5580f-8b90-4ff6-91e8-de94514f8ca1\",\"trace_id\":\"fc40909d-86c1-4e45-bd51-96e2bd8c4556\"}\n[2026-04-14 10:07:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"activity:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"a7d5580f-8b90-4ff6-91e8-de94514f8ca1\",\"trace_id\":\"fc40909d-86c1-4e45-bd51-96e2bd8c4556\"}\n[2026-04-14 10:07:16] local.INFO: [Jiminny\\Jobs\\Mailbox\\CreateBatches] processed 0 inboxes and created 0 batches {\"userId\":null,\"batchSize\":30,\"maxBatches\":1000} {\"correlation_id\":\"df4d1442-bcd6-4b63-8513-802ae90993e6\",\"trace_id\":\"5766aab2-0316-400f-aa89-168ea0579941\"}\n[2026-04-14 10:08:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"43299ccb-af86-42b1-b793-4ede57e2b91d\",\"trace_id\":\"2f919b69-9d68-488c-89fa-2aade6ef8519\"}\n[2026-04-14 10:08:04] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"43299ccb-af86-42b1-b793-4ede57e2b91d\",\"trace_id\":\"2f919b69-9d68-488c-89fa-2aade6ef8519\"}\n[2026-04-14 10:08:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"43299ccb-af86-42b1-b793-4ede57e2b91d\",\"trace_id\":\"2f919b69-9d68-488c-89fa-2aade6ef8519\"}\n[2026-04-14 10:08:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"cde80757-333e-4268-a902-892c031b2373\",\"trace_id\":\"36e932e0-8362-432f-9e36-d819f902d49e\"}\n[2026-04-14 10:08:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"cde80757-333e-4268-a902-892c031b2373\",\"trace_id\":\"36e932e0-8362-432f-9e36-d819f902d49e\"}\n[2026-04-14 10:08:07] local.NOTICE: Monitoring start {\"correlation_id\":\"146390f8-e91a-4e5c-b282-0c83b4947101\",\"trace_id\":\"fb689e40-c867-4fc5-9847-c223835da80e\"}\n[2026-04-14 10:08:07] local.NOTICE: Monitoring end {\"correlation_id\":\"146390f8-e91a-4e5c-b282-0c83b4947101\",\"trace_id\":\"fb689e40-c867-4fc5-9847-c223835da80e\"}\n[2026-04-14 10:08:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"58e23da5-8f3f-4836-aac7-315ab32f74a3\",\"trace_id\":\"c71267c4-b5fe-42ad-9bcd-76f6299c1538\"}\n[2026-04-14 10:08:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"58e23da5-8f3f-4836-aac7-315ab32f74a3\",\"trace_id\":\"c71267c4-b5fe-42ad-9bcd-76f6299c1538\"}\n[2026-04-14 10:08:13] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"9158bb6f-c165-495a-9b6e-8077d8343c87\",\"trace_id\":\"df378af8-cacb-41ea-b030-b8f53144fddd\"}\n[2026-04-14 10:08:13] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"9158bb6f-c165-495a-9b6e-8077d8343c87\",\"trace_id\":\"df378af8-cacb-41ea-b030-b8f53144fddd\"}\n[2026-04-14 10:08:13] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":0} {\"correlation_id\":\"9158bb6f-c165-495a-9b6e-8077d8343c87\",\"trace_id\":\"df378af8-cacb-41ea-b030-b8f53144fddd\"}\n[2026-04-14 10:08:13] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"9158bb6f-c165-495a-9b6e-8077d8343c87\",\"trace_id\":\"df378af8-cacb-41ea-b030-b8f53144fddd\"}\n[2026-04-14 10:08:14] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"35774df7-e046-49ec-835f-45f9dc1ec025\",\"trace_id\":\"45c5e102-6b65-4d23-9edd-684ca996316c\"}\n[2026-04-14 10:08:14] local.INFO: Running conference:monitor:count command for activities in (2026-04-14 10:06:00, 2026-04-14 10:08:00] {\"correlation_id\":\"35774df7-e046-49ec-835f-45f9dc1ec025\",\"trace_id\":\"45c5e102-6b65-4d23-9edd-684ca996316c\"}\n[2026-04-14 10:08:14] local.INFO: [conference:monitor:count] No activities found in (2026-04-14 10:06:00, 2026-04-14 10:08:00] {\"correlation_id\":\"35774df7-e046-49ec-835f-45f9dc1ec025\",\"trace_id\":\"45c5e102-6b65-4d23-9edd-684ca996316c\"}\n[2026-04-14 10:08:14] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"35774df7-e046-49ec-835f-45f9dc1ec025\",\"trace_id\":\"45c5e102-6b65-4d23-9edd-684ca996316c\"}\n[2026-04-14 10:08:17] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:retry-failed\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"d4dc4b3b-8dc8-4665-aec7-139be0df2306\",\"trace_id\":\"853f2210-e804-40aa-a1d8-4457c60f4993\"}\n[2026-04-14 10:08:17] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:retry-failed\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"d4dc4b3b-8dc8-4665-aec7-139be0df2306\",\"trace_id\":\"853f2210-e804-40aa-a1d8-4457c60f4993\"}\n[2026-04-14 10:09:05] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"8052fb2f-5876-4e2c-8f64-c770d9fe37fe\",\"trace_id\":\"63249c19-bf59-4e52-9096-156d537a9786\"}\n[2026-04-14 10:09:05] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"8052fb2f-5876-4e2c-8f64-c770d9fe37fe\",\"trace_id\":\"63249c19-bf59-4e52-9096-156d537a9786\"}\n[2026-04-14 10:09:05] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"8052fb2f-5876-4e2c-8f64-c770d9fe37fe\",\"trace_id\":\"63249c19-bf59-4e52-9096-156d537a9786\"}\n[2026-04-14 10:09:07] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"1dd274b4-f71d-486e-b6c4-aaf106304102\",\"trace_id\":\"1d55139c-a58d-4456-801a-9bcb3bf9b024\"}\n[2026-04-14 10:09:07] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"1dd274b4-f71d-486e-b6c4-aaf106304102\",\"trace_id\":\"1d55139c-a58d-4456-801a-9bcb3bf9b024\"}\n[2026-04-14 10:09:10] local.NOTICE: Monitoring start {\"correlation_id\":\"09dc762e-2b78-4dbb-a880-5c8f1cbfc4ad\",\"trace_id\":\"8e60392d-4ea4-41f2-be2f-a01853c7a1ab\"}\n[2026-04-14 10:09:10] local.NOTICE: Monitoring end {\"correlation_id\":\"09dc762e-2b78-4dbb-a880-5c8f1cbfc4ad\",\"trace_id\":\"8e60392d-4ea4-41f2-be2f-a01853c7a1ab\"}\n[2026-04-14 10:09:13] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"2de9f84e-2691-459d-adfd-f5f6746501d0\",\"trace_id\":\"418ad958-86c0-4477-b0fb-e487768d6fa1\"}\n[2026-04-14 10:09:13] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"2de9f84e-2691-459d-adfd-f5f6746501d0\",\"trace_id\":\"418ad958-86c0-4477-b0fb-e487768d6fa1\"}\n[2026-04-14 10:09:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"1be8488c-ae59-4f42-8475-c426905c3ca6\",\"trace_id\":\"aeb8b412-635e-4929-915f-fb3fe5786eae\"}\n[2026-04-14 10:09:16] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"1be8488c-ae59-4f42-8475-c426905c3ca6\",\"trace_id\":\"aeb8b412-635e-4929-915f-fb3fe5786eae\"}\n[2026-04-14 10:09:16] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":0} {\"correlation_id\":\"1be8488c-ae59-4f42-8475-c426905c3ca6\",\"trace_id\":\"aeb8b412-635e-4929-915f-fb3fe5786eae\"}\n[2026-04-14 10:09:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"1be8488c-ae59-4f42-8475-c426905c3ca6\",\"trace_id\":\"aeb8b412-635e-4929-915f-fb3fe5786eae\"}\n[2026-04-14 10:09:18] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"activity:aircall:check-and-renew\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"b3d1b688-309f-4df0-9dcd-9a733c87f597\",\"trace_id\":\"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c\"}\n[2026-04-14 10:09:18] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1496,\"provider\":\"aircall\"} {\"correlation_id\":\"b3d1b688-309f-4df0-9dcd-9a733c87f597\",\"trace_id\":\"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c\"}\n[2026-04-14 10:09:18] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1496,\"provider\":\"aircall\"} {\"correlation_id\":\"b3d1b688-309f-4df0-9dcd-9a733c87f597\",\"trace_id\":\"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c\"}\n[2026-04-14 10:09:18] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b3d1b688-309f-4df0-9dcd-9a733c87f597\",\"trace_id\":\"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c\"}\n[2026-04-14 10:09:18] local.ERROR: [Aircall] Re-activating webhooks failed {\"team_id\":1,\"reason\":\"{\\\"message\\\":\\\"Forbidden\\\"}\"} {\"correlation_id\":\"b3d1b688-309f-4df0-9dcd-9a733c87f597\",\"trace_id\":\"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c\"}\n[2026-04-14 10:09:18] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"activity:aircall:check-and-renew\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"b3d1b688-309f-4df0-9dcd-9a733c87f597\",\"trace_id\":\"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c\"}\n[2026-04-14 10:09:21] local.INFO: [RetryFailedDownloads] Starting {\"options\":{\"from\":null,\"to\":null,\"help\":false,\"silent\":false,\"quiet\":false,\"verbose\":false,\"version\":false,\"ansi\":null,\"no-interaction\":false,\"env\":null}} {\"correlation_id\":\"c7aba065-c8f1-473d-b8b5-4797245873bf\",\"trace_id\":\"48f587f9-dd77-4634-9ad9-1137b029b5f5\"}\n[2026-04-14 10:10:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"7310aae5-3829-4d5c-bbc9-f6550a35f539\",\"trace_id\":\"6099cf10-45e2-4b82-9649-649e2f8a1209\"}\n[2026-04-14 10:10:04] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"7310aae5-3829-4d5c-bbc9-f6550a35f539\",\"trace_id\":\"6099cf10-45e2-4b82-9649-649e2f8a1209\"}\n[2026-04-14 10:10:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"7310aae5-3829-4d5c-bbc9-f6550a35f539\",\"trace_id\":\"6099cf10-45e2-4b82-9649-649e2f8a1209\"}\n[2026-04-14 10:10:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"5119d94e-0c61-4312-a740-2b569388cc9f\",\"trace_id\":\"6a412a32-3bc3-46a4-af7c-24ad560a4e41\"}\n[2026-04-14 10:10:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"5119d94e-0c61-4312-a740-2b569388cc9f\",\"trace_id\":\"6a412a32-3bc3-46a4-af7c-24ad560a4e41\"}\n[2026-04-14 10:10:08] local.NOTICE: Monitoring start {\"correlation_id\":\"95cdb3b7-b356-4325-be28-20663ece6aa0\",\"trace_id\":\"e64a75a4-2493-4f35-ba46-ccd002e6b7b7\"}\n[2026-04-14 10:10:08] local.NOTICE: Monitoring end {\"correlation_id\":\"95cdb3b7-b356-4325-be28-20663ece6aa0\",\"trace_id\":\"e64a75a4-2493-4f35-ba46-ccd002e6b7b7\"}\n[2026-04-14 10:10:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"6460dd5f-4b94-4cd1-867e-53304d785744\",\"trace_id\":\"683b103d-2dfc-4266-84a2-d5cd799b133f\"}\n[2026-04-14 10:10:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"6460dd5f-4b94-4cd1-867e-53304d785744\",\"trace_id\":\"683b103d-2dfc-4266-84a2-d5cd799b133f\"}\n[2026-04-14 10:10:11] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"5a59007d-2a12-4977-8a5a-59c678aa12ee\",\"trace_id\":\"bc3a2ad5-9f13-4728-adaa-529da75cf011\"}\n[2026-04-14 10:10:11] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"5a59007d-2a12-4977-8a5a-59c678aa12ee\",\"trace_id\":\"bc3a2ad5-9f13-4728-adaa-529da75cf011\"}\n[2026-04-14 10:10:11] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":0} {\"correlation_id\":\"5a59007d-2a12-4977-8a5a-59c678aa12ee\",\"trace_id\":\"bc3a2ad5-9f13-4728-adaa-529da75cf011\"}\n[2026-04-14 10:10:11] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"5a59007d-2a12-4977-8a5a-59c678aa12ee\",\"trace_id\":\"bc3a2ad5-9f13-4728-adaa-529da75cf011\"}\n[2026-04-14 10:10:14] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"afe2ff6b-1b9e-4485-bdad-a758d873a782\",\"trace_id\":\"d507becf-55d6-4fda-8831-e981f95b85c8\"}\n[2026-04-14 10:10:14] local.INFO: Running conference:monitor:count command for activities in (2026-04-14 10:08:00, 2026-04-14 10:10:00] {\"correlation_id\":\"afe2ff6b-1b9e-4485-bdad-a758d873a782\",\"trace_id\":\"d507becf-55d6-4fda-8831-e981f95b85c8\"}\n[2026-04-14 10:10:14] local.INFO: [conference:monitor:count] No activities found in (2026-04-14 10:08:00, 2026-04-14 10:10:00] {\"correlation_id\":\"afe2ff6b-1b9e-4485-bdad-a758d873a782\",\"trace_id\":\"d507becf-55d6-4fda-8831-e981f95b85c8\"}\n[2026-04-14 10:10:14] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"afe2ff6b-1b9e-4485-bdad-a758d873a782\",\"trace_id\":\"d507becf-55d6-4fda-8831-e981f95b85c8\"}\n[2026-04-14 10:10:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"activity:purge-stale\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"ebe2ad2b-df9a-48d7-b78f-d52b7489c6f0\",\"trace_id\":\"05b44216-d5ac-44cd-b74b-3e92567b192d\"}\n[2026-04-14 10:10:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"activity:purge-stale\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"ebe2ad2b-df9a-48d7-b78f-d52b7489c6f0\",\"trace_id\":\"05b44216-d5ac-44cd-b74b-3e92567b192d\"}\n[2026-04-14 10:10:18] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:text-relay:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"d76b00ee-6271-4df7-ba45-769738bbb7ae\",\"trace_id\":\"92384790-9588-452d-abea-cdd25a2fe7ff\"}\n[2026-04-14 10:10:18] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:text-relay:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"d76b00ee-6271-4df7-ba45-769738bbb7ae\",\"trace_id\":\"92384790-9588-452d-abea-cdd25a2fe7ff\"}\n[2026-04-14 10:10:20] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:pre-meeting-notification\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"c8f3b5c1-bef5-4584-b9d8-0c10578fefac\",\"trace_id\":\"b700f03d-b02b-495e-b505-1598c7a9ea4b\"}\n[2026-04-14 10:10:20] local.INFO: Running pre-meeting notification command {\"correlation_id\":\"c8f3b5c1-bef5-4584-b9d8-0c10578fefac\",\"trace_id\":\"b700f03d-b02b-495e-b505-1598c7a9ea4b\"}\n[2026-04-14 10:10:20] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:pre-meeting-notification\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"c8f3b5c1-bef5-4584-b9d8-0c10578fefac\",\"trace_id\":\"b700f03d-b02b-495e-b505-1598c7a9ea4b\"}\n[2026-04-14 10:10:22] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:start\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"d7b97fbb-00b9-47c2-ae81-dda03fd8b253\",\"trace_id\":\"54447306-49bf-4629-8de0-bb191c61cce2\"}\n[2026-04-14 10:10:22] local.INFO: Running conference:monitor:start command for activities in (2026-04-14 10:00:00, 2026-04-14 10:05:00] {\"correlation_id\":\"d7b97fbb-00b9-47c2-ae81-dda03fd8b253\",\"trace_id\":\"54447306-49bf-4629-8de0-bb191c61cce2\"}\n[2026-04-14 10:10:22] local.INFO: [conference:monitor:start] No activities found in (2026-04-14 10:00:00, 2026-04-14 10:05:00] {\"correlation_id\":\"d7b97fbb-00b9-47c2-ae81-dda03fd8b253\",\"trace_id\":\"54447306-49bf-4629-8de0-bb191c61cce2\"}\n[2026-04-14 10:10:22] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:start\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"d7b97fbb-00b9-47c2-ae81-dda03fd8b253\",\"trace_id\":\"54447306-49bf-4629-8de0-bb191c61cce2\"}\n[2026-04-14 10:10:23] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:end\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"07665538-664f-421e-af9b-97152a688b68\",\"trace_id\":\"d116813e-2d96-4a3d-ae04-6e53d69ca565\"}\n[2026-04-14 10:10:23] local.INFO: conference:monitor:end:Jiminny\\Console\\Commands\\Activities\\MonitorMeetingEndCommand::logActivitiesEnded {\"from\":\"10:05\",\"to\":\"10:10\"} {\"correlation_id\":\"07665538-664f-421e-af9b-97152a688b68\",\"trace_id\":\"d116813e-2d96-4a3d-ae04-6e53d69ca565\"}\n[2026-04-14 10:10:23] local.INFO: conference:monitor:end:Jiminny\\Console\\Commands\\Activities\\MonitorMeetingEndCommand::logActivitiesWithUnfinishedSession {\"from\":\"00:00\",\"to\":\"00:05\"} {\"correlation_id\":\"07665538-664f-421e-af9b-97152a688b68\",\"trace_id\":\"d116813e-2d96-4a3d-ae04-6e53d69ca565\"}\n[2026-04-14 10:10:23] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:end\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"07665538-664f-421e-af9b-97152a688b68\",\"trace_id\":\"d116813e-2d96-4a3d-ae04-6e53d69ca565\"}\n[2026-04-14 10:10:25] local.NOTICE: Repairing HubSpot tokens start {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:25] local.INFO: Trying to refresh HubSpot token {\"account_id\":59,\"updated_at\":\"2025-10-03 09:32:05\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:25] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:25] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":59,\"provider\":\"hubspot\",\"refreshToken\":\"97b78f6e2cc49965c00c2492b602b02708b1392551e6b3f113fbaa48992af90b\",\"state\":\"full-refresh\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:26] local.ERROR: Failed to refresh HubSpot token {\"account_id\":59,\"updated_at\":\"2025-10-03 09:32:05\",\"reason\":\"missing or invalid refresh token\",\"previous\":\"\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:26] local.INFO: Trying to refresh HubSpot token {\"account_id\":306,\"updated_at\":\"2023-11-27 09:30:03\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:26] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:26] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":306,\"provider\":\"hubspot\",\"refreshToken\":\"6fa6aa8cc641d131231acc3470f5c03cb3b07b2e580fb18f8acb3b1dbb72549b\",\"state\":\"full-refresh\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:26] local.ERROR: Failed to refresh HubSpot token {\"account_id\":306,\"updated_at\":\"2023-11-27 09:30:03\",\"reason\":\"missing or invalid refresh token\",\"previous\":\"\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:26] local.INFO: Trying to refresh HubSpot token {\"account_id\":1372,\"updated_at\":\"2025-10-02 14:47:06\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:26] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:26] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1372,\"provider\":\"hubspot\",\"refreshToken\":\"9aa73948c761da29dce46c177cf9aee1fde483a44169ca38723f9f0597d7a8c4\",\"state\":\"full-refresh\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:27] local.ERROR: Failed to refresh HubSpot token {\"account_id\":1372,\"updated_at\":\"2025-10-02 14:47:06\",\"reason\":\"missing or invalid refresh token\",\"previous\":\"\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:27] local.NOTICE: Repairing HubSpot tokens end {\"total\":3,\"fixed\":0,\"failed\":3} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:30] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:pre-meeting-reminder\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"cba13635-8dbf-4423-ad70-69f2d927c6ff\",\"trace_id\":\"cca585f7-e8b4-4cbd-b63f-8d9be90960a6\"}\n[2026-04-14 10:10:30] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"jiminny:transcription:retry-failed\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"8d29e53b-638b-4e55-8ee6-70567699b366\",\"trace_id\":\"ac17c380-0e7e-4425-bbc9-9e292ed99ea5\"}\n[2026-04-14 10:10:30] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"jiminny:transcription:retry-failed\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"8d29e53b-638b-4e55-8ee6-70567699b366\",\"trace_id\":\"ac17c380-0e7e-4425-bbc9-9e292ed99ea5\"}\n[2026-04-14 10:10:30] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:30] local.INFO: [HubSpot Journal Command] Starting polling service {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:30] local.INFO: [HubSpot Journal Polling] Service starting {\"memory_limit\":\"256M\",\"max_execution_time\":\"0\",\"initial_memory_mb\":62.0} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:30] local.INFO: [HubSpot Journal Polling] Acquired polling lock {\"expires_at\":\"2026-04-14T10:12:30.407181Z\"} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:30] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:30] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:30] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:pre-meeting-reminder\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"cba13635-8dbf-4423-ad70-69f2d927c6ff\",\"trace_id\":\"cca585f7-e8b4-4cbd-b63f-8d9be90960a6\"}\n[2026-04-14 10:10:30] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:32] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"crm:reset-governor\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"4943604a-02ac-42cd-82ee-524a684c9d07\",\"trace_id\":\"dea56e3f-9697-4054-8b54-7db752a8613f\"}\n[2026-04-14 10:10:32] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"crm:reset-governor\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"4943604a-02ac-42cd-82ee-524a684c9d07\",\"trace_id\":\"dea56e3f-9697-4054-8b54-7db752a8613f\"}\n[2026-04-14 10:10:34] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"crm:bullhorn:ping\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"7ae1dc8e-0ce6-461b-a054-be59c56de0b5\",\"trace_id\":\"8892af7b-37c9-4892-82fd-aa4596edc512\"}\n[2026-04-14 10:10:34] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"crm:bullhorn:ping\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"7ae1dc8e-0ce6-461b-a054-be59c56de0b5\",\"trace_id\":\"8892af7b-37c9-4892-82fd-aa4596edc512\"}\n[2026-04-14 10:10:35] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:35] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:35] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:40] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:40] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:41] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:56] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:56] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:56] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:11:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"79c8dc9b-058f-4f0e-9e9a-2e34a66209a7\",\"trace_id\":\"c6894787-c096-4c96-96cf-8ed81e40aa59\"}\n[2026-04-14 10:11:04] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"79c8dc9b-058f-4f0e-9e9a-2e34a66209a7\",\"trace_id\":\"c6894787-c096-4c96-96cf-8ed81e40aa59\"}\n[2026-04-14 10:11:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"79c8dc9b-058f-4f0e-9e9a-2e34a66209a7\",\"trace_id\":\"c6894787-c096-4c96-96cf-8ed81e40aa59\"}\n[2026-04-14 10:11:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"d52d55c7-74a3-409b-b458-fecfd8990f5a\",\"trace_id\":\"407ded8c-1b50-4ba7-8190-f3e84814124e\"}\n[2026-04-14 10:11:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"d52d55c7-74a3-409b-b458-fecfd8990f5a\",\"trace_id\":\"407ded8c-1b50-4ba7-8190-f3e84814124e\"}\n[2026-04-14 10:11:08] local.NOTICE: Monitoring start {\"correlation_id\":\"296fc7a0-329d-43bf-8c98-547c407c447c\",\"trace_id\":\"d2bbc8a9-18cb-408f-98a9-f87d6a2e4cb9\"}\n[2026-04-14 10:11:08] local.NOTICE: Monitoring end {\"correlation_id\":\"296fc7a0-329d-43bf-8c98-547c407c447c\",\"trace_id\":\"d2bbc8a9-18cb-408f-98a9-f87d6a2e4cb9\"}\n[2026-04-14 10:11:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"4aaf62d1-0d46-4f16-af0e-0617eb460382\",\"trace_id\":\"7bcc5249-9d16-44e5-a83c-3a613e00c860\"}\n[2026-04-14 10:11:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"4aaf62d1-0d46-4f16-af0e-0617eb460382\",\"trace_id\":\"7bcc5249-9d16-44e5-a83c-3a613e00c860\"}\n[2026-04-14 10:11:11] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"19290448-0263-4849-93fc-f09885da0c1f\",\"trace_id\":\"1483761c-464c-4374-994f-121758fcd534\"}\n[2026-04-14 10:11:12] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"19290448-0263-4849-93fc-f09885da0c1f\",\"trace_id\":\"1483761c-464c-4374-994f-121758fcd534\"}\n[2026-04-14 10:11:12] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":0} {\"correlation_id\":\"19290448-0263-4849-93fc-f09885da0c1f\",\"trace_id\":\"1483761c-464c-4374-994f-121758fcd534\"}\n[2026-04-14 10:11:12] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"19290448-0263-4849-93fc-f09885da0c1f\",\"trace_id\":\"1483761c-464c-4374-994f-121758fcd534\"}\n[2026-04-14 10:11:26] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:11:26] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:11:26] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:11:26] local.WARNING: [HubSpot Journal Polling] Maximum empty results reached, stopping {\"empty_results\":5,\"max_empty_results\":5} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:11:26] local.WARNING: [HubSpot Journal Polling] Maximum empty results reached, stopping {\"empty_results\":5,\"max_empty_results\":5} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:11:26] local.INFO: [HubSpot Journal Polling] Service ending {\"runtime_seconds\":56,\"total_cycles\":5,\"files_downloaded\":0,\"empty_files\":0,\"other_portal_skipped\":0,\"total_events\":0,\"events_per_file\":0,\"avg_api_ms\":252.2,\"avg_download_ms\":0.0,\"avg_transform_ms\":0.0,\"avg_process_ms\":0.0,\"peak_memory_mb\":99.75} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:11:26] local.INFO: [HubSpot Journal Polling] Released polling lock {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:12:07] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"74ad5a14-81b2-48f4-bb37-2d2ac73c5059\",\"trace_id\":\"6d6d809e-3d77-400c-a351-ac4db72cf3fc\"}\n[2026-04-14 10:12:07] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"74ad5a14-81b2-48f4-bb37-2d2ac73c5059\",\"trace_id\":\"6d6d809e-3d77-400c-a351-ac4db72cf3fc\"}\n[2026-04-14 10:12:07] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"74ad5a14-81b2-48f4-bb37-2d2ac73c5059\",\"trace_id\":\"6d6d809e-3d77-400c-a351-ac4db72cf3fc\"}\n[2026-04-14 10:12:09] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"3671d2e5-29f6-43db-8f1a-4a0bf5ff669b\",\"trace_id\":\"1295351d-9c37-47db-bad6-dbccb4c6466f\"}\n[2026-04-14 10:12:09] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"3671d2e5-29f6-43db-8f1a-4a0bf5ff669b\",\"trace_id\":\"1295351d-9c37-47db-bad6-dbccb4c6466f\"}\n[2026-04-14 10:12:11] local.NOTICE: Monitoring start {\"correlation_id\":\"f2d467c8-e822-4691-9920-cac071f14877\",\"trace_id\":\"4d67db65-374a-4eb2-9cc6-8c60dc9ebabc\"}\n[2026-04-14 10:12:11] local.NOTICE: Monitoring end {\"correlation_id\":\"f2d467c8-e822-4691-9920-cac071f14877\",\"trace_id\":\"4d67db65-374a-4eb2-9cc6-8c60dc9ebabc\"}\n[2026-04-14 10:12:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"04d8a469-317c-40e1-a163-ad747408f9e3\",\"trace_id\":\"bafa4d05-7e55-4524-b0a5-1764ecb964fe\"}\n[2026-04-14 10:12:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"04d8a469-317c-40e1-a163-ad747408f9e3\",\"trace_id\":\"bafa4d05-7e55-4524-b0a5-1764ecb964fe\"}\n[2026-04-14 10:12:20] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"3cd3a658-bd65-4253-9c8d-b94cdd2f3c4d\",\"trace_id\":\"5ae25493-7098-481f-84f4-225c6595b140\"}\n[2026-04-14 10:12:20] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"3cd3a658-bd65-4253-9c8d-b94cdd2f3c4d\",\"trace_id\":\"5ae25493-7098-481f-84f4-225c6595b140\"}\n[2026-04-14 10:12:20] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":0} {\"correlation_id\":\"3cd3a658-bd65-4253-9c8d-b94cdd2f3c4d\",\"trace_id\":\"5ae25493-7098-481f-84f4-225c6595b140\"}\n[2026-04-14 10:12:20] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"3cd3a658-bd65-4253-9c8d-b94cdd2f3c4d\",\"trace_id\":\"5ae25493-7098-481f-84f4-225c6595b140\"}\n[2026-04-14 10:12:22] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"4cabe4c8-81a7-4405-958c-783cc42dc31a\",\"trace_id\":\"844b27d2-1727-4f1a-bb9a-a3ad44d9d37a\"}\n[2026-04-14 10:12:22] local.INFO: Running conference:monitor:count command for activities in (2026-04-14 10:10:00, 2026-04-14 10:12:00] {\"correlation_id\":\"4cabe4c8-81a7-4405-958c-783cc42dc31a\",\"trace_id\":\"844b27d2-1727-4f1a-bb9a-a3ad44d9d37a\"}\n[2026-04-14 10:12:22] local.INFO: [conference:monitor:count] No activities found in (2026-04-14 10:10:00, 2026-04-14 10:12:00] {\"correlation_id\":\"4cabe4c8-81a7-4405-958c-783cc42dc31a\",\"trace_id\":\"844b27d2-1727-4f1a-bb9a-a3ad44d9d37a\"}\n[2026-04-14 10:12:22] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"4cabe4c8-81a7-4405-958c-783cc42dc31a\",\"trace_id\":\"844b27d2-1727-4f1a-bb9a-a3ad44d9d37a\"}\n[2026-04-14 10:12:25] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:create\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"b573f9e3-5771-4b03-9fd9-1ff7d571916d\",\"trace_id\":\"e76af6ed-1fff-4aef-8b17-a8288121b37a\"}\n[2026-04-14 10:12:25] local.INFO: [EmailSchedule] STARTING batch create {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"b573f9e3-5771-4b03-9fd9-1ff7d571916d\",\"trace_id\":\"e76af6ed-1fff-4aef-8b17-a8288121b37a\"}\n[2026-04-14 10:12:25] local.INFO: [EmailSchedule] FINISHED batch create {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"b573f9e3-5771-4b03-9fd9-1ff7d571916d\",\"trace_id\":\"e76af6ed-1fff-4aef-8b17-a8288121b37a\"}\n[2026-04-14 10:12:25] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:create\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"b573f9e3-5771-4b03-9fd9-1ff7d571916d\",\"trace_id\":\"e76af6ed-1fff-4aef-8b17-a8288121b37a\"}\n[2026-04-14 10:12:27] local.INFO: [Jiminny\\Jobs\\Mailbox\\CreateBatches] processed 0 inboxes and created 0 batches {\"userId\":null,\"batchSize\":30,\"maxBatches\":1000} {\"correlation_id\":\"ad382f07-8ff8-450f-b38c-fba577285d06\",\"trace_id\":\"e76af6ed-1fff-4aef-8b17-a8288121b37a\"}\n[2026-04-14 10:13:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"24a30c58-6ce4-427b-972e-87df2b1f0d31\",\"trace_id\":\"30809930-a6a8-49bb-9c61-f4dcca23683a\"}\n[2026-04-14 10:13:04] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"24a30c58-6ce4-427b-972e-87df2b1f0d31\",\"trace_id\":\"30809930-a6a8-49bb-9c61-f4dcca23683a\"}\n[2026-04-14 10:13:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"24a30c58-6ce4-427b-972e-87df2b1f0d31\",\"trace_id\":\"30809930-a6a8-49bb-9c61-f4dcca23683a\"}\n[2026-04-14 10:13:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"db368cd5-b4ea-4f77-8169-24ff5403199d\",\"trace_id\":\"0bd7332d-c4c1-44b6-b204-e68b8ec6217a\"}\n[2026-04-14 10:13:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"db368cd5-b4ea-4f77-8169-24ff5403199d\",\"trace_id\":\"0bd7332d-c4c1-44b6-b204-e68b8ec6217a\"}\n[2026-04-14 10:13:08] local.NOTICE: Monitoring start {\"correlation_id\":\"98628e85-9d56-4088-8ddb-5a33768305d6\",\"trace_id\":\"138288e6-6342-4250-9c1e-46921c407423\"}\n[2026-04-14 10:13:08] local.NOTICE: Monitoring end {\"correlation_id\":\"98628e85-9d56-4088-8ddb-5a33768305d6\",\"trace_id\":\"138288e6-6342-4250-9c1e-46921c407423\"}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"12","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"6","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Console\\Commands\\Reports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Contracts\\Bus\\Dispatcher;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Jiminny\\Console\\Commands\\Reports\\AutomatedReportsCommand;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateAskJiminnyReportJob;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateReportJob;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse PHPUnit\\Framework\\TestCase;\nuse Psr\\Log\\LoggerInterface;\n\nclass AutomatedReportsCommandTest extends TestCase\n{\n private LoggerInterface&Mockery\\MockInterface $logger;\n private Dispatcher&Mockery\\MockInterface $dispatcher;\n private AutomatedReportsRepository&Mockery\\MockInterface $reportRepository;\n private AutomatedReportsCommand $command;\n\n protected function setUp(): void\n {\n parent::setUp();\n $this->logger = Mockery::mock(LoggerInterface::class);\n $this->dispatcher = Mockery::mock(Dispatcher::class);\n $this->reportRepository = Mockery::mock(AutomatedReportsRepository::class);\n $this->command = new AutomatedReportsCommand($this->logger, $this->dispatcher, $this->reportRepository);\n }\n\n protected function tearDown(): void\n {\n Carbon::setTestNow();\n Mockery::close();\n parent::tearDown();\n }\n\n public function testProcessDailyReportsEveryDay(): void\n {\n Carbon::setTestNow(Carbon::create(2024, 3, 13, 10, 0, 0));\n\n $reports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_DAILY, 2);\n\n $this->logger->shouldReceive('info')->atLeast()->once();\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_DAILY)\n ->andReturn(new Collection($reports));\n\n $this->dispatcher->shouldReceive('dispatch')\n ->twice()\n ->with(Mockery::type(RequestGenerateReportJob::class));\n\n $result = $this->command->handle();\n\n $this->assertEquals(0, $result);\n }\n\n public function testDispatchesAskJiminnyJobForAskJiminnyReports(): void\n {\n Carbon::setTestNow(Carbon::create(2024, 3, 13, 10, 0, 0));\n\n $askJiminnyReport = $this->createAskJiminnyReport(AutomatedReportsService::FREQUENCY_DAILY);\n $standardReport = $this->createStandardReports(AutomatedReportsService::FREQUENCY_DAILY, 1)[0];\n\n $this->logger->shouldReceive('info')->atLeast()->once();\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_DAILY)\n ->andReturn(new Collection([$askJiminnyReport, $standardReport]));\n\n $this->dispatcher->shouldReceive('dispatch')\n ->once()\n ->with(Mockery::type(RequestGenerateAskJiminnyReportJob::class));\n\n $this->dispatcher->shouldReceive('dispatch')\n ->once()\n ->with(Mockery::type(RequestGenerateReportJob::class));\n\n $result = $this->command->handle();\n\n $this->assertEquals(0, $result);\n }\n\n public function testProcessWeeklyReportsOnMonday(): void\n {\n Carbon::setTestNow(Carbon::create(2023, 12, 11, 10, 0, 0));\n\n $dailyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_DAILY, 1);\n $weeklyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_WEEKLY, 2);\n\n $this->logger->shouldReceive('info')->atLeast()->once();\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_DAILY)\n ->andReturn(new Collection($dailyReports));\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_WEEKLY)\n ->andReturn(new Collection($weeklyReports));\n\n $this->dispatcher->shouldReceive('dispatch')\n ->times(3)\n ->with(Mockery::type(RequestGenerateReportJob::class));\n\n $result = $this->command->handle();\n\n $this->assertEquals(0, $result);\n }\n\n public function testDoNotProcessWeeklyReportsOnNonMonday(): void\n {\n Carbon::setTestNow(Carbon::create(2023, 12, 12, 10, 0, 0));\n\n $dailyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_DAILY, 0);\n\n $this->logger->shouldReceive('info')->atLeast()->once();\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_DAILY)\n ->andReturn(new Collection($dailyReports));\n\n $this->reportRepository->shouldNotReceive('getActiveReportsByFrequency')\n ->with(AutomatedReportsService::FREQUENCY_WEEKLY);\n\n $this->dispatcher->shouldNotReceive('dispatch');\n\n $result = $this->command->handle();\n\n $this->assertEquals(0, $result);\n }\n\n public function testProcessMonthlyReportsOnFirstDayOfMonth(): void\n {\n Carbon::setTestNow(Carbon::create(2024, 3, 1, 10, 0, 0));\n\n $dailyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_DAILY, 0);\n $monthlyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_MONTHLY, 2);\n\n $this->logger->shouldReceive('info')->atLeast()->once();\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_DAILY)\n ->andReturn(new Collection($dailyReports));\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_MONTHLY)\n ->andReturn(new Collection($monthlyReports));\n\n $this->dispatcher->shouldReceive('dispatch')\n ->twice()\n ->with(Mockery::type(RequestGenerateReportJob::class));\n\n $result = $this->command->handle();\n\n $this->assertEquals(0, $result);\n }\n\n public function testDoNotProcessMonthlyReportsOnNonFirstDayOfMonth(): void\n {\n Carbon::setTestNow(Carbon::create(2024, 3, 13, 10, 0, 0));\n\n $dailyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_DAILY, 0);\n\n $this->logger->shouldReceive('info')->atLeast()->once();\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_DAILY)\n ->andReturn(new Collection($dailyReports));\n\n $this->reportRepository->shouldNotReceive('getActiveReportsByFrequency')\n ->with(AutomatedReportsService::FREQUENCY_MONTHLY);\n\n $this->reportRepository->shouldNotReceive('getActiveReportsByFrequency')\n ->with(AutomatedReportsService::FREQUENCY_QUARTERLY);\n\n $this->dispatcher->shouldNotReceive('dispatch');\n\n $result = $this->command->handle();\n\n $this->assertEquals(0, $result);\n }\n\n public function testProcessQuarterlyReportsOnFirstDayOfQuarterlyMonth(): void\n {\n // 2024-10-01 is a Tuesday (first day of quarterly month, not Monday)\n Carbon::setTestNow(Carbon::create(2024, 10, 1, 10, 0, 0));\n\n $dailyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_DAILY, 0);\n $monthlyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_MONTHLY, 1);\n $quarterlyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_QUARTERLY, 1);\n\n $this->logger->shouldReceive('info')->atLeast()->once();\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_DAILY)\n ->andReturn(new Collection($dailyReports));\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_MONTHLY)\n ->andReturn(new Collection($monthlyReports));\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_QUARTERLY)\n ->andReturn(new Collection($quarterlyReports));\n\n $this->dispatcher->shouldReceive('dispatch')\n ->twice()\n ->with(Mockery::type(RequestGenerateReportJob::class));\n\n $result = $this->command->handle();\n\n $this->assertEquals(0, $result);\n }\n\n public function testDoNotProcessQuarterlyReportsOnNonQuarterlyFirstDay(): void\n {\n Carbon::setTestNow(Carbon::create(2024, 3, 1, 10, 0, 0));\n\n $dailyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_DAILY, 0);\n $monthlyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_MONTHLY, 0);\n\n $this->logger->shouldReceive('info')->atLeast()->once();\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_DAILY)\n ->andReturn(new Collection($dailyReports));\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_MONTHLY)\n ->andReturn(new Collection($monthlyReports));\n\n $this->reportRepository->shouldNotReceive('getActiveReportsByFrequency')\n ->with(AutomatedReportsService::FREQUENCY_QUARTERLY);\n\n $this->dispatcher->shouldNotReceive('dispatch');\n\n $result = $this->command->handle();\n\n $this->assertEquals(0, $result);\n }\n\n public function testProcessAllFrequenciesOnMondayFirstDayOfQuarterlyMonth(): void\n {\n Carbon::setTestNow(Carbon::create(2024, 7, 1, 10, 0, 0));\n\n $dailyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_DAILY, 1);\n $weeklyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_WEEKLY, 1);\n $monthlyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_MONTHLY, 1);\n $quarterlyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_QUARTERLY, 1);\n\n $this->logger->shouldReceive('info')->atLeast()->once();\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_DAILY)\n ->andReturn(new Collection($dailyReports));\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_WEEKLY)\n ->andReturn(new Collection($weeklyReports));\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_MONTHLY)\n ->andReturn(new Collection($monthlyReports));\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_QUARTERLY)\n ->andReturn(new Collection($quarterlyReports));\n\n $this->dispatcher->shouldReceive('dispatch')\n ->times(4)\n ->with(Mockery::type(RequestGenerateReportJob::class));\n\n $result = $this->command->handle();\n\n $this->assertEquals(0, $result);\n }\n\n public function testReturnsZeroOnSuccess(): void\n {\n Carbon::setTestNow(Carbon::create(2024, 3, 13, 10, 0, 0));\n\n $this->logger->shouldReceive('info')->atLeast()->once();\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_DAILY)\n ->andReturn(new Collection([]));\n\n $result = $this->command->handle();\n\n $this->assertEquals(0, $result);\n }\n\n private function createStandardReports(string $frequency, int $count): array\n {\n $reports = [];\n\n for ($i = 0; $i < $count; $i++) {\n $report = Mockery::mock();\n $report->shouldReceive('getUuid')->andReturn('uuid-' . $i);\n $report->shouldReceive('getTeamId')->andReturn($i + 1);\n $report->shouldReceive('getFrequency')->andReturn($frequency);\n $report->shouldReceive('getType')->andReturn(AutomatedReportsService::TYPE_LOSS_ANALYSIS);\n $report->shouldReceive('isAskJiminnyReport')->andReturn(false);\n\n $reports[] = $report;\n }\n\n return $reports;\n }\n\n private function createAskJiminnyReport(string $frequency): mixed\n {\n $report = Mockery::mock();\n $report->shouldReceive('getUuid')->andReturn('ask-jiminny-uuid');\n $report->shouldReceive('getTeamId')->andReturn(99);\n $report->shouldReceive('getFrequency')->andReturn($frequency);\n $report->shouldReceive('getType')->andReturn(AutomatedReportsService::TYPE_ASK_JIMINNY);\n $report->shouldReceive('isAskJiminnyReport')->andReturn(true);\n\n return $report;\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Console\\Commands\\Reports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Contracts\\Bus\\Dispatcher;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Jiminny\\Console\\Commands\\Reports\\AutomatedReportsCommand;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateAskJiminnyReportJob;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateReportJob;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse PHPUnit\\Framework\\TestCase;\nuse Psr\\Log\\LoggerInterface;\n\nclass AutomatedReportsCommandTest extends TestCase\n{\n private LoggerInterface&Mockery\\MockInterface $logger;\n private Dispatcher&Mockery\\MockInterface $dispatcher;\n private AutomatedReportsRepository&Mockery\\MockInterface $reportRepository;\n private AutomatedReportsCommand $command;\n\n protected function setUp(): void\n {\n parent::setUp();\n $this->logger = Mockery::mock(LoggerInterface::class);\n $this->dispatcher = Mockery::mock(Dispatcher::class);\n $this->reportRepository = Mockery::mock(AutomatedReportsRepository::class);\n $this->command = new AutomatedReportsCommand($this->logger, $this->dispatcher, $this->reportRepository);\n }\n\n protected function tearDown(): void\n {\n Carbon::setTestNow();\n Mockery::close();\n parent::tearDown();\n }\n\n public function testProcessDailyReportsEveryDay(): void\n {\n Carbon::setTestNow(Carbon::create(2024, 3, 13, 10, 0, 0));\n\n $reports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_DAILY, 2);\n\n $this->logger->shouldReceive('info')->atLeast()->once();\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_DAILY)\n ->andReturn(new Collection($reports));\n\n $this->dispatcher->shouldReceive('dispatch')\n ->twice()\n ->with(Mockery::type(RequestGenerateReportJob::class));\n\n $result = $this->command->handle();\n\n $this->assertEquals(0, $result);\n }\n\n public function testDispatchesAskJiminnyJobForAskJiminnyReports(): void\n {\n Carbon::setTestNow(Carbon::create(2024, 3, 13, 10, 0, 0));\n\n $askJiminnyReport = $this->createAskJiminnyReport(AutomatedReportsService::FREQUENCY_DAILY);\n $standardReport = $this->createStandardReports(AutomatedReportsService::FREQUENCY_DAILY, 1)[0];\n\n $this->logger->shouldReceive('info')->atLeast()->once();\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_DAILY)\n ->andReturn(new Collection([$askJiminnyReport, $standardReport]));\n\n $this->dispatcher->shouldReceive('dispatch')\n ->once()\n ->with(Mockery::type(RequestGenerateAskJiminnyReportJob::class));\n\n $this->dispatcher->shouldReceive('dispatch')\n ->once()\n ->with(Mockery::type(RequestGenerateReportJob::class));\n\n $result = $this->command->handle();\n\n $this->assertEquals(0, $result);\n }\n\n public function testProcessWeeklyReportsOnMonday(): void\n {\n Carbon::setTestNow(Carbon::create(2023, 12, 11, 10, 0, 0));\n\n $dailyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_DAILY, 1);\n $weeklyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_WEEKLY, 2);\n\n $this->logger->shouldReceive('info')->atLeast()->once();\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_DAILY)\n ->andReturn(new Collection($dailyReports));\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_WEEKLY)\n ->andReturn(new Collection($weeklyReports));\n\n $this->dispatcher->shouldReceive('dispatch')\n ->times(3)\n ->with(Mockery::type(RequestGenerateReportJob::class));\n\n $result = $this->command->handle();\n\n $this->assertEquals(0, $result);\n }\n\n public function testDoNotProcessWeeklyReportsOnNonMonday(): void\n {\n Carbon::setTestNow(Carbon::create(2023, 12, 12, 10, 0, 0));\n\n $dailyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_DAILY, 0);\n\n $this->logger->shouldReceive('info')->atLeast()->once();\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_DAILY)\n ->andReturn(new Collection($dailyReports));\n\n $this->reportRepository->shouldNotReceive('getActiveReportsByFrequency')\n ->with(AutomatedReportsService::FREQUENCY_WEEKLY);\n\n $this->dispatcher->shouldNotReceive('dispatch');\n\n $result = $this->command->handle();\n\n $this->assertEquals(0, $result);\n }\n\n public function testProcessMonthlyReportsOnFirstDayOfMonth(): void\n {\n Carbon::setTestNow(Carbon::create(2024, 3, 1, 10, 0, 0));\n\n $dailyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_DAILY, 0);\n $monthlyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_MONTHLY, 2);\n\n $this->logger->shouldReceive('info')->atLeast()->once();\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_DAILY)\n ->andReturn(new Collection($dailyReports));\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_MONTHLY)\n ->andReturn(new Collection($monthlyReports));\n\n $this->dispatcher->shouldReceive('dispatch')\n ->twice()\n ->with(Mockery::type(RequestGenerateReportJob::class));\n\n $result = $this->command->handle();\n\n $this->assertEquals(0, $result);\n }\n\n public function testDoNotProcessMonthlyReportsOnNonFirstDayOfMonth(): void\n {\n Carbon::setTestNow(Carbon::create(2024, 3, 13, 10, 0, 0));\n\n $dailyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_DAILY, 0);\n\n $this->logger->shouldReceive('info')->atLeast()->once();\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_DAILY)\n ->andReturn(new Collection($dailyReports));\n\n $this->reportRepository->shouldNotReceive('getActiveReportsByFrequency')\n ->with(AutomatedReportsService::FREQUENCY_MONTHLY);\n\n $this->reportRepository->shouldNotReceive('getActiveReportsByFrequency')\n ->with(AutomatedReportsService::FREQUENCY_QUARTERLY);\n\n $this->dispatcher->shouldNotReceive('dispatch');\n\n $result = $this->command->handle();\n\n $this->assertEquals(0, $result);\n }\n\n public function testProcessQuarterlyReportsOnFirstDayOfQuarterlyMonth(): void\n {\n // 2024-10-01 is a Tuesday (first day of quarterly month, not Monday)\n Carbon::setTestNow(Carbon::create(2024, 10, 1, 10, 0, 0));\n\n $dailyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_DAILY, 0);\n $monthlyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_MONTHLY, 1);\n $quarterlyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_QUARTERLY, 1);\n\n $this->logger->shouldReceive('info')->atLeast()->once();\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_DAILY)\n ->andReturn(new Collection($dailyReports));\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_MONTHLY)\n ->andReturn(new Collection($monthlyReports));\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_QUARTERLY)\n ->andReturn(new Collection($quarterlyReports));\n\n $this->dispatcher->shouldReceive('dispatch')\n ->twice()\n ->with(Mockery::type(RequestGenerateReportJob::class));\n\n $result = $this->command->handle();\n\n $this->assertEquals(0, $result);\n }\n\n public function testDoNotProcessQuarterlyReportsOnNonQuarterlyFirstDay(): void\n {\n Carbon::setTestNow(Carbon::create(2024, 3, 1, 10, 0, 0));\n\n $dailyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_DAILY, 0);\n $monthlyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_MONTHLY, 0);\n\n $this->logger->shouldReceive('info')->atLeast()->once();\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_DAILY)\n ->andReturn(new Collection($dailyReports));\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_MONTHLY)\n ->andReturn(new Collection($monthlyReports));\n\n $this->reportRepository->shouldNotReceive('getActiveReportsByFrequency')\n ->with(AutomatedReportsService::FREQUENCY_QUARTERLY);\n\n $this->dispatcher->shouldNotReceive('dispatch');\n\n $result = $this->command->handle();\n\n $this->assertEquals(0, $result);\n }\n\n public function testProcessAllFrequenciesOnMondayFirstDayOfQuarterlyMonth(): void\n {\n Carbon::setTestNow(Carbon::create(2024, 7, 1, 10, 0, 0));\n\n $dailyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_DAILY, 1);\n $weeklyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_WEEKLY, 1);\n $monthlyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_MONTHLY, 1);\n $quarterlyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_QUARTERLY, 1);\n\n $this->logger->shouldReceive('info')->atLeast()->once();\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_DAILY)\n ->andReturn(new Collection($dailyReports));\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_WEEKLY)\n ->andReturn(new Collection($weeklyReports));\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_MONTHLY)\n ->andReturn(new Collection($monthlyReports));\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_QUARTERLY)\n ->andReturn(new Collection($quarterlyReports));\n\n $this->dispatcher->shouldReceive('dispatch')\n ->times(4)\n ->with(Mockery::type(RequestGenerateReportJob::class));\n\n $result = $this->command->handle();\n\n $this->assertEquals(0, $result);\n }\n\n public function testReturnsZeroOnSuccess(): void\n {\n Carbon::setTestNow(Carbon::create(2024, 3, 13, 10, 0, 0));\n\n $this->logger->shouldReceive('info')->atLeast()->once();\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_DAILY)\n ->andReturn(new Collection([]));\n\n $result = $this->command->handle();\n\n $this->assertEquals(0, $result);\n }\n\n private function createStandardReports(string $frequency, int $count): array\n {\n $reports = [];\n\n for ($i = 0; $i < $count; $i++) {\n $report = Mockery::mock();\n $report->shouldReceive('getUuid')->andReturn('uuid-' . $i);\n $report->shouldReceive('getTeamId')->andReturn($i + 1);\n $report->shouldReceive('getFrequency')->andReturn($frequency);\n $report->shouldReceive('getType')->andReturn(AutomatedReportsService::TYPE_LOSS_ANALYSIS);\n $report->shouldReceive('isAskJiminnyReport')->andReturn(false);\n\n $reports[] = $report;\n }\n\n return $reports;\n }\n\n private function createAskJiminnyReport(string $frequency): mixed\n {\n $report = Mockery::mock();\n $report->shouldReceive('getUuid')->andReturn('ask-jiminny-uuid');\n $report->shouldReceive('getTeamId')->andReturn(99);\n $report->shouldReceive('getFrequency')->andReturn($frequency);\n $report->shouldReceive('getType')->andReturn(AutomatedReportsService::TYPE_ASK_JIMINNY);\n $report->shouldReceive('isAskJiminnyReport')->andReturn(true);\n\n return $report;\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
7108548186427266741
|
-2358355934385201923
|
idle
|
accessibility
|
NULL
|
Tests failed: 10, passed: 0
text/html
text/html
te Tests failed: 10, passed: 0
text/html
text/html
text/html
Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AutomatedReportsCommandTest
Run 'AutomatedReportsCommandTest'
Debug 'AutomatedReportsCommandTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
248
Previous Highlighted Error
Next Highlighted Error
[2026-04-14 10:05:19] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:text-relay:sync","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"9756bfa7-c8e1-4b17-bc55-9f224d2af2e3","trace_id":"9e5fa115-9cf5-45d6-a1da-109e154cfae7"}
[2026-04-14 10:05:19] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:text-relay:sync","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"9756bfa7-c8e1-4b17-bc55-9f224d2af2e3","trace_id":"9e5fa115-9cf5-45d6-a1da-109e154cfae7"}
[2026-04-14 10:05:23] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"conference:pre-meeting-notification","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"d9d68876-323b-42bd-9953-635da8008f2e","trace_id":"6c00ce4c-f2df-4ccb-908d-4862de973096"}
[2026-04-14 10:05:23] local.INFO: Running pre-meeting notification command {"correlation_id":"d9d68876-323b-42bd-9953-635da8008f2e","trace_id":"6c00ce4c-f2df-4ccb-908d-4862de973096"}
[2026-04-14 10:05:23] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"conference:pre-meeting-notification","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"d9d68876-323b-42bd-9953-635da8008f2e","trace_id":"6c00ce4c-f2df-4ccb-908d-4862de973096"}
[2026-04-14 10:05:26] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"conference:monitor:start","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"27d73fea-a8cb-4757-9bbb-fbe7222e6943","trace_id":"bcdb88d0-a641-43e4-85e8-b7dc4ab20a0e"}
[2026-04-14 10:05:26] local.INFO: Running conference:monitor:start command for activities in (2026-04-14 09:55:00, 2026-04-14 10:00:00] {"correlation_id":"27d73fea-a8cb-4757-9bbb-fbe7222e6943","trace_id":"bcdb88d0-a641-43e4-85e8-b7dc4ab20a0e"}
[2026-04-14 10:05:26] local.INFO: [conference:monitor:start] start ok {"activity_id":407307} {"correlation_id":"27d73fea-a8cb-4757-9bbb-fbe7222e6943","trace_id":"bcdb88d0-a641-43e4-85e8-b7dc4ab20a0e"}
[2026-04-14 10:05:26] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"conference:monitor:start","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"27d73fea-a8cb-4757-9bbb-fbe7222e6943","trace_id":"bcdb88d0-a641-43e4-85e8-b7dc4ab20a0e"}
[2026-04-14 10:05:28] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"conference:monitor:end","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"588bae45-3998-4b86-b056-51aaf8b6882f","trace_id":"8f716a65-7768-44c5-b0e4-02a859f329e5"}
[2026-04-14 10:05:28] local.INFO: conference:monitor:end:Jiminny\Console\Commands\Activities\MonitorMeetingEndCommand::logActivitiesEnded {"from":"10:00","to":"10:05"} {"correlation_id":"588bae45-3998-4b86-b056-51aaf8b6882f","trace_id":"8f716a65-7768-44c5-b0e4-02a859f329e5"}
[2026-04-14 10:05:28] local.INFO: conference:monitor:end:Jiminny\Console\Commands\Activities\MonitorMeetingEndCommand::logActivitiesWithUnfinishedSession {"from":"23:55","to":"00:00"} {"correlation_id":"588bae45-3998-4b86-b056-51aaf8b6882f","trace_id":"8f716a65-7768-44c5-b0e4-02a859f329e5"}
[2026-04-14 10:05:28] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"conference:monitor:end","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"588bae45-3998-4b86-b056-51aaf8b6882f","trace_id":"8f716a65-7768-44c5-b0e4-02a859f329e5"}
[2026-04-14 10:05:30] local.NOTICE: Repairing HubSpot tokens start {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:30] local.INFO: Trying to refresh HubSpot token {"account_id":59,"updated_at":"2025-10-03 09:32:05"} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:30] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:30] local.INFO: [SocialAccountService] Refreshing token from provider {"socialAccountId":59,"provider":"hubspot","refreshToken":"97b78f6e2cc49965c00c2492b602b02708b1392551e6b3f113fbaa48992af90b","state":"full-refresh"} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:31] local.ERROR: Failed to refresh HubSpot token {"account_id":59,"updated_at":"2025-10-03 09:32:05","reason":"missing or invalid refresh token","previous":""} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:31] local.INFO: Trying to refresh HubSpot token {"account_id":306,"updated_at":"2023-11-27 09:30:03"} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:31] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:31] local.INFO: [SocialAccountService] Refreshing token from provider {"socialAccountId":306,"provider":"hubspot","refreshToken":"6fa6aa8cc641d131231acc3470f5c03cb3b07b2e580fb18f8acb3b1dbb72549b","state":"full-refresh"} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:31] local.ERROR: Failed to refresh HubSpot token {"account_id":306,"updated_at":"2023-11-27 09:30:03","reason":"missing or invalid refresh token","previous":""} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:31] local.INFO: Trying to refresh HubSpot token {"account_id":1372,"updated_at":"2025-10-02 14:47:06"} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:31] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:31] local.INFO: [SocialAccountService] Refreshing token from provider {"socialAccountId":1372,"provider":"hubspot","refreshToken":"9aa73948c761da29dce46c177cf9aee1fde483a44169ca38723f9f0597d7a8c4","state":"full-refresh"} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:31] local.ERROR: Failed to refresh HubSpot token {"account_id":1372,"updated_at":"2025-10-02 14:47:06","reason":"missing or invalid refresh token","previous":""} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:31] local.NOTICE: Repairing HubSpot tokens end {"total":3,"fixed":0,"failed":3} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:34] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"conference:pre-meeting-reminder","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"2b2ca83a-1263-4a7c-a5d7-86dc15ea7aec","trace_id":"fbf48d3d-4e50-4442-b14f-d2ae5e6e70bd"}
[2026-04-14 10:05:34] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"crm:bullhorn:ping","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"73b127c9-c033-4fa7-a8ed-2e28077ba970","trace_id":"fd1cf3c5-d4ce-41d6-a19d-5e67fd544d9e"}
[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Polling] Getting offset from database {"offset":"","jiminny_team_id":1} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:34] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"crm:bullhorn:ping","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"73b127c9-c033-4fa7-a8ed-2e28077ba970","trace_id":"fd1cf3c5-d4ce-41d6-a19d-5e67fd544d9e"}
[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Command] Starting polling service {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Polling] Service starting {"memory_limit":"256M","max_execution_time":"0","initial_memory_mb":62.0} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Polling] Acquired polling lock {"expires_at":"2026-04-14T10:07:34.196472Z"} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Polling] Getting offset from database {"offset":"","jiminny_team_id":1} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:34] local.INFO: [HubSpot Journal API] Fetching latest journal entry {"url":"https://api.hubapi.com/webhooks/v4/journal/latest"} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:34] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"conference:pre-meeting-reminder","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"2b2ca83a-1263-4a7c-a5d7-86dc15ea7aec","trace_id":"fbf48d3d-4e50-4442-b14f-d2ae5e6e70bd"}
[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Polling] No data {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:39] local.INFO: [HubSpot Journal Polling] Getting offset from database {"offset":"","jiminny_team_id":1} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:39] local.INFO: [HubSpot Journal API] Fetching latest journal entry {"url":"https://api.hubapi.com/webhooks/v4/journal/latest"} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:39] local.INFO: [HubSpot Journal Polling] No data {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:44] local.INFO: [HubSpot Journal Polling] Getting offset from database {"offset":"","jiminny_team_id":1} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:44] local.INFO: [HubSpot Journal API] Fetching latest journal entry {"url":"https://api.hubapi.com/webhooks/v4/journal/latest"} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:44] local.INFO: [HubSpot Journal Polling] No data {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:59] local.INFO: [HubSpot Journal Polling] Getting offset from database {"offset":"","jiminny_team_id":1} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:59] local.INFO: [HubSpot Journal API] Fetching latest journal entry {"url":"https://api.hubapi.com/webhooks/v4/journal/latest"} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:06:00] local.INFO: [HubSpot Journal Polling] No data {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:06:04] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"44f01bd8-2599-41a4-b7c3-8bb1fdf0df9a","trace_id":"b4c87c8d-120d-48fb-b13c-aee84323f3e2"}
[2026-04-14 10:06:04] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {"correlation_id":"44f01bd8-2599-41a4-b7c3-8bb1fdf0df9a","trace_id":"b4c87c8d-120d-48fb-b13c-aee84323f3e2"}
[2026-04-14 10:06:04] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"44f01bd8-2599-41a4-b7c3-8bb1fdf0df9a","trace_id":"b4c87c8d-120d-48fb-b13c-aee84323f3e2"}
[2026-04-14 10:06:06] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"8403c1e4-b5b6-41f9-9280-ff666beed28b","trace_id":"3f631f60-6d14-44f5-b6c3-b401999867f9"}
[2026-04-14 10:06:06] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"8403c1e4-b5b6-41f9-9280-ff666beed28b","trace_id":"3f631f60-6d14-44f5-b6c3-b401999867f9"}
[2026-04-14 10:06:08] local.NOTICE: Monitoring start {"correlation_id":"0d51eb08-f2f1-4322-97d0-268700856a99","trace_id":"92b45b9a-b6e8-40c8-a783-193cf1a4eea2"}
[2026-04-14 10:06:08] local.NOTICE: Monitoring end {"correlation_id":"0d51eb08-f2f1-4322-97d0-268700856a99","trace_id":"92b45b9a-b6e8-40c8-a783-193cf1a4eea2"}
[2026-04-14 10:06:10] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"0566c59b-bf67-49eb-970a-a6b955ddd756","trace_id":"724c5f5e-cd88-41fb-9b7e-74315e131024"}
[2026-04-14 10:06:10] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"0566c59b-bf67-49eb-970a-a6b955ddd756","trace_id":"724c5f5e-cd88-41fb-9b7e-74315e131024"}
[2026-04-14 10:06:12] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"33d190d4-0abb-4e63-af52-95faa913e7a1","trace_id":"703aaa4d-a551-4ed1-8a4a-609d373e2fc0"}
[2026-04-14 10:06:12] local.INFO: [EmailSchedule] STARTING batch process {"host":"docker_lamp_1"} {"correlation_id":"33d190d4-0abb-4e63-af52-95faa913e7a1","trace_id":"703aaa4d-a551-4ed1-8a4a-609d373e2fc0"}
[2026-04-14 10:06:12] local.INFO: [EmailSchedule] FINISHED batch process {"host":"docker_lamp_1","processed":0} {"correlation_id":"33d190d4-0abb-4e63-af52-95faa913e7a1","trace_id":"703aaa4d-a551-4ed1-8a4a-609d373e2fc0"}
[2026-04-14 10:06:12] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"33d190d4-0abb-4e63-af52-95faa913e7a1","trace_id":"703aaa4d-a551-4ed1-8a4a-609d373e2fc0"}
[2026-04-14 10:06:14] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"conference:monitor:count","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"da41d77d-46d9-41ae-90b7-f8418b05fb9a","trace_id":"47329a55-e6f4-406b-8730-e72d69737f09"}
[2026-04-14 10:06:14] local.INFO: Running conference:monitor:count command for activities in (2026-04-14 10:04:00, 2026-04-14 10:06:00] {"correlation_id":"da41d77d-46d9-41ae-90b7-f8418b05fb9a","trace_id":"47329a55-e6f4-406b-8730-e72d69737f09"}
[2026-04-14 10:06:14] local.INFO: [conference:monitor:count] No activities found in (2026-04-14 10:04:00, 2026-04-14 10:06:00] {"correlation_id":"da41d77d-46d9-41ae-90b7-f8418b05fb9a","trace_id":"47329a55-e6f4-406b-8730-e72d69737f09"}
[2026-04-14 10:06:14] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"conference:monitor:count","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"da41d77d-46d9-41ae-90b7-f8418b05fb9a","trace_id":"47329a55-e6f4-406b-8730-e72d69737f09"}
[2026-04-14 10:06:16] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"activity:notify-not-logged","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"310e7e99-6de4-4f93-967e-37c78e9ec826","trace_id":"2a1fdf0a-be0e-4e5a-a677-fa16ddc33e9e"}
[2026-04-14 10:06:16] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"activity:notify-not-logged","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"310e7e99-6de4-4f93-967e-37c78e9ec826","trace_id":"2a1fdf0a-be0e-4e5a-a677-fa16ddc33e9e"}
[2026-04-14 10:06:19] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:sync","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"de8430ad-f242-4536-bebe-e165320b6b26","trace_id":"75f83d2f-4e5e-4086-b062-7c1d24b5b74c"}
[2026-04-14 10:06:19] local.INFO: [EmailSchedule] STARTING Inbox Sync {"host":"docker_lamp_1"} {"correlation_id":"de8430ad-f242-4536-bebe-e165320b6b26","trace_id":"75f83d2f-4e5e-4086-b062-7c1d24b5b74c"}
[2026-04-14 10:06:19] local.INFO: [EmailSchedule] FINISHED Inbox Sync {"host":"docker_lamp_1","events":1} {"correlation_id":"de8430ad-f242-4536-bebe-e165320b6b26","trace_id":"75f83d2f-4e5e-4086-b062-7c1d24b5b74c"}
[2026-04-14 10:06:19] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:sync","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"de8430ad-f242-4536-bebe-e165320b6b26","trace_id":"75f83d2f-4e5e-4086-b062-7c1d24b5b74c"}
[2026-04-14 10:06:22] local.INFO: [Sync Mailbox] Sync start {"inbox_id":59} {"correlation_id":"eb46c86e-5c80-48b1-a4ee-ac425f197754","trace_id":"75f83d2f-4e5e-4086-b062-7c1d24b5b74c"}
[2026-04-14 10:06:22] local.INFO: [Inbox service] Skipping METADATA SYNC for inbox 59 due to unauthorized access to the mailbox {"correlation_id":"eb46c86e-5c80-48b1-a4ee-ac425f197754","trace_id":"75f83d2f-4e5e-4086-b062-7c1d24b5b74c"}
[2026-04-14 10:06:22] local.INFO: [Sync Mailbox] Sync complete {"inbox_id":59} {"correlation_id":"eb46c86e-5c80-48b1-a4ee-ac425f197754","trace_id":"75f83d2f-4e5e-4086-b062-7c1d24b5b74c"}
[2026-04-14 10:06:30] local.INFO: [HubSpot Journal Polling] Getting offset from database {"offset":"","jiminny_team_id":1} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:06:30] local.INFO: [HubSpot Journal API] Fetching latest journal entry {"url":"https://api.hubapi.com/webhooks/v4/journal/latest"} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:06:30] local.INFO: [HubSpot Journal Polling] No data {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:06:30] local.WARNING: [HubSpot Journal Polling] Maximum empty results reached, stopping {"empty_results":5,"max_empty_results":5} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:06:30] local.WARNING: [HubSpot Journal Polling] Maximum empty results reached, stopping {"empty_results":5,"max_empty_results":5} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:06:30] local.INFO: [HubSpot Journal Polling] Service ending {"runtime_seconds":56,"total_cycles":5,"files_downloaded":0,"empty_files":0,"other_portal_skipped":0,"total_events":0,"events_per_file":0,"avg_api_ms":169.9,"avg_download_ms":0.0,"avg_transform_ms":0.0,"avg_process_ms":0.0,"peak_memory_mb":99.75} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:06:30] local.INFO: [HubSpot Journal Polling] Released polling lock {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:07:04] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"53329974-bdd6-4cd2-a022-0d565b0a5cf4","trace_id":"08246763-f961-45fb-b262-51378bdbc955"}
[2026-04-14 10:07:04] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {"correlation_id":"53329974-bdd6-4cd2-a022-0d565b0a5cf4","trace_id":"08246763-f961-45fb-b262-51378bdbc955"}
[2026-04-14 10:07:04] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"53329974-bdd6-4cd2-a022-0d565b0a5cf4","trace_id":"08246763-f961-45fb-b262-51378bdbc955"}
[2026-04-14 10:07:06] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"2b6586f0-419e-4422-8800-e4b7619c43d6","trace_id":"221c682d-c45f-4e4a-a793-ed11006dc6a1"}
[2026-04-14 10:07:06] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"2b6586f0-419e-4422-8800-e4b7619c43d6","trace_id":"221c682d-c45f-4e4a-a793-ed11006dc6a1"}
[2026-04-14 10:07:08] local.NOTICE: Monitoring start {"correlation_id":"9ba692ee-5286-41ca-abf0-86f6e1167a8e","trace_id":"d58ab8ad-7737-4d7c-91c0-81733c21e709"}
[2026-04-14 10:07:08] local.NOTICE: Monitoring end {"correlation_id":"9ba692ee-5286-41ca-abf0-86f6e1167a8e","trace_id":"d58ab8ad-7737-4d7c-91c0-81733c21e709"}
[2026-04-14 10:07:10] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"28e708ed-74ee-4417-a8da-c1a9ae0cd745","trace_id":"bd848201-9700-40bf-8fa4-9df13ae88f6e"}
[2026-04-14 10:07:10] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"28e708ed-74ee-4417-a8da-c1a9ae0cd745","trace_id":"bd848201-9700-40bf-8fa4-9df13ae88f6e"}
[2026-04-14 10:07:12] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"95326c5a-7b17-475d-9245-634d15d51bfe","trace_id":"31b36f9d-93cc-4917-bc7b-6b6a3da139e7"}
[2026-04-14 10:07:12] local.INFO: [EmailSchedule] STARTING batch process {"host":"docker_lamp_1"} {"correlation_id":"95326c5a-7b17-475d-9245-634d15d51bfe","trace_id":"31b36f9d-93cc-4917-bc7b-6b6a3da139e7"}
[2026-04-14 10:07:12] local.INFO: [EmailSchedule] FINISHED batch process {"host":"docker_lamp_1","processed":0} {"correlation_id":"95326c5a-7b17-475d-9245-634d15d51bfe","trace_id":"31b36f9d-93cc-4917-bc7b-6b6a3da139e7"}
[2026-04-14 10:07:12] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"95326c5a-7b17-475d-9245-634d15d51bfe","trace_id":"31b36f9d-93cc-4917-bc7b-6b6a3da139e7"}
[2026-04-14 10:07:14] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:batch:create","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"f4f68165-0bcc-4e79-89e5-81f9c627e4dc","trace_id":"5766aab2-0316-400f-aa89-168ea0579941"}
[2026-04-14 10:07:14] local.INFO: [EmailSchedule] STARTING batch create {"host":"docker_lamp_1"} {"correlation_id":"f4f68165-0bcc-4e79-89e5-81f9c627e4dc","trace_id":"5766aab2-0316-400f-aa89-168ea0579941"}
[2026-04-14 10:07:14] local.INFO: [EmailSchedule] FINISHED batch create {"host":"docker_lamp_1"} {"correlation_id":"f4f68165-0bcc-4e79-89e5-81f9c627e4dc","trace_id":"5766aab2-0316-400f-aa89-168ea0579941"}
[2026-04-14 10:07:14] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:batch:create","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"f4f68165-0bcc-4e79-89e5-81f9c627e4dc","trace_id":"5766aab2-0316-400f-aa89-168ea0579941"}
[2026-04-14 10:07:15] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"activity:sync","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"a7d5580f-8b90-4ff6-91e8-de94514f8ca1","trace_id":"fc40909d-86c1-4e45-bd51-96e2bd8c4556"}
[2026-04-14 10:07:16] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"activity:sync","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"a7d5580f-8b90-4ff6-91e8-de94514f8ca1","trace_id":"fc40909d-86c1-4e45-bd51-96e2bd8c4556"}
[2026-04-14 10:07:16] local.INFO: [Jiminny\Jobs\Mailbox\CreateBatches] processed 0 inboxes and created 0 batches {"userId":null,"batchSize":30,"maxBatches":1000} {"correlation_id":"df4d1442-bcd6-4b63-8513-802ae90993e6","trace_id":"5766aab2-0316-400f-aa89-168ea0579941"}
[2026-04-14 10:08:04] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"43299ccb-af86-42b1-b793-4ede57e2b91d","trace_id":"2f919b69-9d68-488c-89fa-2aade6ef8519"}
[2026-04-14 10:08:04] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {"correlation_id":"43299ccb-af86-42b1-b793-4ede57e2b91d","trace_id":"2f919b69-9d68-488c-89fa-2aade6ef8519"}
[2026-04-14 10:08:04] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"43299ccb-af86-42b1-b793-4ede57e2b91d","trace_id":"2f919b69-9d68-488c-89fa-2aade6ef8519"}
[2026-04-14 10:08:06] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"cde80757-333e-4268-a902-892c031b2373","trace_id":"36e932e0-8362-432f-9e36-d819f902d49e"}
[2026-04-14 10:08:06] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"cde80757-333e-4268-a902-892c031b2373","trace_id":"36e932e0-8362-432f-9e36-d819f902d49e"}
[2026-04-14 10:08:07] local.NOTICE: Monitoring start {"correlation_id":"146390f8-e91a-4e5c-b282-0c83b4947101","trace_id":"fb689e40-c867-4fc5-9847-c223835da80e"}
[2026-04-14 10:08:07] local.NOTICE: Monitoring end {"correlation_id":"146390f8-e91a-4e5c-b282-0c83b4947101","trace_id":"fb689e40-c867-4fc5-9847-c223835da80e"}
[2026-04-14 10:08:10] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"58e23da5-8f3f-4836-aac7-315ab32f74a3","trace_id":"c71267c4-b5fe-42ad-9bcd-76f6299c1538"}
[2026-04-14 10:08:10] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"58e23da5-8f3f-4836-aac7-315ab32f74a3","trace_id":"c71267c4-b5fe-42ad-9bcd-76f6299c1538"}
[2026-04-14 10:08:13] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"9158bb6f-c165-495a-9b6e-8077d8343c87","trace_id":"df378af8-cacb-41ea-b030-b8f53144fddd"}
[2026-04-14 10:08:13] local.INFO: [EmailSchedule] STARTING batch process {"host":"docker_lamp_1"} {"correlation_id":"9158bb6f-c165-495a-9b6e-8077d8343c87","trace_id":"df378af8-cacb-41ea-b030-b8f53144fddd"}
[2026-04-14 10:08:13] local.INFO: [EmailSchedule] FINISHED batch process {"host":"docker_lamp_1","processed":0} {"correlation_id":"9158bb6f-c165-495a-9b6e-8077d8343c87","trace_id":"df378af8-cacb-41ea-b030-b8f53144fddd"}
[2026-04-14 10:08:13] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"9158bb6f-c165-495a-9b6e-8077d8343c87","trace_id":"df378af8-cacb-41ea-b030-b8f53144fddd"}
[2026-04-14 10:08:14] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"conference:monitor:count","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"35774df7-e046-49ec-835f-45f9dc1ec025","trace_id":"45c5e102-6b65-4d23-9edd-684ca996316c"}
[2026-04-14 10:08:14] local.INFO: Running conference:monitor:count command for activities in (2026-04-14 10:06:00, 2026-04-14 10:08:00] {"correlation_id":"35774df7-e046-49ec-835f-45f9dc1ec025","trace_id":"45c5e102-6b65-4d23-9edd-684ca996316c"}
[2026-04-14 10:08:14] local.INFO: [conference:monitor:count] No activities found in (2026-04-14 10:06:00, 2026-04-14 10:08:00] {"correlation_id":"35774df7-e046-49ec-835f-45f9dc1ec025","trace_id":"45c5e102-6b65-4d23-9edd-684ca996316c"}
[2026-04-14 10:08:14] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"conference:monitor:count","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"35774df7-e046-49ec-835f-45f9dc1ec025","trace_id":"45c5e102-6b65-4d23-9edd-684ca996316c"}
[2026-04-14 10:08:17] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:batch:retry-failed","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"d4dc4b3b-8dc8-4665-aec7-139be0df2306","trace_id":"853f2210-e804-40aa-a1d8-4457c60f4993"}
[2026-04-14 10:08:17] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:batch:retry-failed","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"d4dc4b3b-8dc8-4665-aec7-139be0df2306","trace_id":"853f2210-e804-40aa-a1d8-4457c60f4993"}
[2026-04-14 10:09:05] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"8052fb2f-5876-4e2c-8f64-c770d9fe37fe","trace_id":"63249c19-bf59-4e52-9096-156d537a9786"}
[2026-04-14 10:09:05] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {"correlation_id":"8052fb2f-5876-4e2c-8f64-c770d9fe37fe","trace_id":"63249c19-bf59-4e52-9096-156d537a9786"}
[2026-04-14 10:09:05] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"8052fb2f-5876-4e2c-8f64-c770d9fe37fe","trace_id":"63249c19-bf59-4e52-9096-156d537a9786"}
[2026-04-14 10:09:07] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"1dd274b4-f71d-486e-b6c4-aaf106304102","trace_id":"1d55139c-a58d-4456-801a-9bcb3bf9b024"}
[2026-04-14 10:09:07] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"1dd274b4-f71d-486e-b6c4-aaf106304102","trace_id":"1d55139c-a58d-4456-801a-9bcb3bf9b024"}
[2026-04-14 10:09:10] local.NOTICE: Monitoring start {"correlation_id":"09dc762e-2b78-4dbb-a880-5c8f1cbfc4ad","trace_id":"8e60392d-4ea4-41f2-be2f-a01853c7a1ab"}
[2026-04-14 10:09:10] local.NOTICE: Monitoring end {"correlation_id":"09dc762e-2b78-4dbb-a880-5c8f1cbfc4ad","trace_id":"8e60392d-4ea4-41f2-be2f-a01853c7a1ab"}
[2026-04-14 10:09:13] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"2de9f84e-2691-459d-adfd-f5f6746501d0","trace_id":"418ad958-86c0-4477-b0fb-e487768d6fa1"}
[2026-04-14 10:09:13] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"2de9f84e-2691-459d-adfd-f5f6746501d0","trace_id":"418ad958-86c0-4477-b0fb-e487768d6fa1"}
[2026-04-14 10:09:16] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"1be8488c-ae59-4f42-8475-c426905c3ca6","trace_id":"aeb8b412-635e-4929-915f-fb3fe5786eae"}
[2026-04-14 10:09:16] local.INFO: [EmailSchedule] STARTING batch process {"host":"docker_lamp_1"} {"correlation_id":"1be8488c-ae59-4f42-8475-c426905c3ca6","trace_id":"aeb8b412-635e-4929-915f-fb3fe5786eae"}
[2026-04-14 10:09:16] local.INFO: [EmailSchedule] FINISHED batch process {"host":"docker_lamp_1","processed":0} {"correlation_id":"1be8488c-ae59-4f42-8475-c426905c3ca6","trace_id":"aeb8b412-635e-4929-915f-fb3fe5786eae"}
[2026-04-14 10:09:16] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"1be8488c-ae59-4f42-8475-c426905c3ca6","trace_id":"aeb8b412-635e-4929-915f-fb3fe5786eae"}
[2026-04-14 10:09:18] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"activity:aircall:check-and-renew","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"b3d1b688-309f-4df0-9dcd-9a733c87f597","trace_id":"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c"}
[2026-04-14 10:09:18] local.INFO: [SocialAccountService] Fetching token {"socialAccountId":1496,"provider":"aircall"} {"correlation_id":"b3d1b688-309f-4df0-9dcd-9a733c87f597","trace_id":"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c"}
[2026-04-14 10:09:18] local.INFO: [SocialAccountService] Token retrieved {"socialAccountId":1496,"provider":"aircall"} {"correlation_id":"b3d1b688-309f-4df0-9dcd-9a733c87f597","trace_id":"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c"}
[2026-04-14 10:09:18] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"b3d1b688-309f-4df0-9dcd-9a733c87f597","trace_id":"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c"}
[2026-04-14 10:09:18] local.ERROR: [Aircall] Re-activating webhooks failed {"team_id":1,"reason":"{\"message\":\"Forbidden\"}"} {"correlation_id":"b3d1b688-309f-4df0-9dcd-9a733c87f597","trace_id":"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c"}
[2026-04-14 10:09:18] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"activity:aircall:check-and-renew","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"b3d1b688-309f-4df0-9dcd-9a733c87f597","trace_id":"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c"}
[2026-04-14 10:09:21] local.INFO: [RetryFailedDownloads] Starting {"options":{"from":null,"to":null,"help":false,"silent":false,"quiet":false,"verbose":false,"version":false,"ansi":null,"no-interaction":false,"env":null}} {"correlation_id":"c7aba065-c8f1-473d-b8b5-4797245873bf","trace_id":"48f587f9-dd77-4634-9ad9-1137b029b5f5"}
[2026-04-14 10:10:04] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"7310aae5-3829-4d5c-bbc9-f6550a35f539","trace_id":"6099cf10-45e2-4b82-9649-649e2f8a1209"}
[2026-04-14 10:10:04] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {"correlation_id":"7310aae5-3829-4d5c-bbc9-f6550a35f539","trace_id":"6099cf10-45e2-4b82-9649-649e2f8a1209"}
[2026-04-14 10:10:04] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"7310aae5-3829-4d5c-bbc9-f6550a35f539","trace_id":"6099cf10-45e2-4b82-9649-649e2f8a1209"}
[2026-04-14 10:10:06] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"5119d94e-0c61-4312-a740-2b569388cc9f","trace_id":"6a412a32-3bc3-46a4-af7c-24ad560a4e41"}
[2026-04-14 10:10:06] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"5119d94e-0c61-4312-a740-2b569388cc9f","trace_id":"6a412a32-3bc3-46a4-af7c-24ad560a4e41"}
[2026-04-14 10:10:08] local.NOTICE: Monitoring start {"correlation_id":"95cdb3b7-b356-4325-be28-20663ece6aa0","trace_id":"e64a75a4-2493-4f35-ba46-ccd002e6b7b7"}
[2026-04-14 10:10:08] local.NOTICE: Monitoring end {"correlation_id":"95cdb3b7-b356-4325-be28-20663ece6aa0","trace_id":"e64a75a4-2493-4f35-ba46-ccd002e6b7b7"}
[2026-04-14 10:10:10] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"6460dd5f-4b94-4cd1-867e-53304d785744","trace_id":"683b103d-2dfc-4266-84a2-d5cd799b133f"}
[2026-04-14 10:10:10] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"6460dd5f-4b94-4cd1-867e-53304d785744","trace_id":"683b103d-2dfc-4266-84a2-d5cd799b133f"}
[2026-04-14 10:10:11] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"5a59007d-2a12-4977-8a5a-59c678aa12ee","trace_id":"bc3a2ad5-9f13-4728-adaa-529da75cf011"}
[2026-04-14 10:10:11] local.INFO: [EmailSchedule] STARTING batch process {"host":"docker_lamp_1"} {"correlation_id":"5a59007d-2a12-4977-8a5a-59c678aa12ee","trace_id":"bc3a2ad5-9f13-4728-adaa-529da75cf011"}
[2026-04-14 10:10:11] local.INFO: [EmailSchedule] FINISHED batch process {"host":"docker_lamp_1","processed":0} {"correlation_id":"5a59007d-2a12-4977-8a5a-59c678aa12ee","trace_id":"bc3a2ad5-9f13-4728-adaa-529da75cf011"}
[2026-04-14 10:10:11] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"5a59007d-2a12-4977-8a5a-59c678aa12ee","trace_id":"bc3a2ad5-9f13-4728-adaa-529da75cf011"}
[2026-04-14 10:10:14] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"conference:monitor:count","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"afe2ff6b-1b9e-4485-bdad-a758d873a782","trace_id":"d507becf-55d6-4fda-8831-e981f95b85c8"}
[2026-04-14 10:10:14] local.INFO: Running conference:monitor:count command for activities in (2026-04-14 10:08:00, 2026-04-14 10:10:00] {"correlation_id":"afe2ff6b-1b9e-4485-bdad-a758d873a782","trace_id":"d507becf-55d6-4fda-8831-e981f95b85c8"}
[2026-04-14 10:10:14] local.INFO: [conference:monitor:count] No activities found in (2026-04-14 10:08:00, 2026-04-14 10:10:00] {"correlation_id":"afe2ff6b-1b9e-4485-bdad-a758d873a782","trace_id":"d507becf-55d6-4fda-8831-e981f95b85c8"}
[2026-04-14 10:10:14] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"conference:monitor:count","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"afe2ff6b-1b9e-4485-bdad-a758d873a782","trace_id":"d507becf-55d6-4fda-8831-e981f95b85c8"}
[2026-04-14 10:10:16] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"activity:purge-stale","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"ebe2ad2b-df9a-48d7-b78f-d52b7489c6f0","trace_id":"05b44216-d5ac-44cd-b74b-3e92567b192d"}
[2026-04-14 10:10:16] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"activity:purge-stale","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"ebe2ad2b-df9a-48d7-b78f-d52b7489c6f0","trace_id":"05b44216-d5ac-44cd-b74b-3e92567b192d"}
[2026-04-14 10:10:18] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:text-relay:sync","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"d76b00ee-6271-4df7-ba45-769738bbb7ae","trace_id":"92384790-9588-452d-abea-cdd25a2fe7ff"}
[2026-04-14 10:10:18] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:text-relay:sync","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"d76b00ee-6271-4df7-ba45-769738bbb7ae","trace_id":"92384790-9588-452d-abea-cdd25a2fe7ff"}
[2026-04-14 10:10:20] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"conference:pre-meeting-notification","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"c8f3b5c1-bef5-4584-b9d8-0c10578fefac","trace_id":"b700f03d-b02b-495e-b505-1598c7a9ea4b"}
[2026-04-14 10:10:20] local.INFO: Running pre-meeting notification command {"correlation_id":"c8f3b5c1-bef5-4584-b9d8-0c10578fefac","trace_id":"b700f03d-b02b-495e-b505-1598c7a9ea4b"}
[2026-04-14 10:10:20] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"conference:pre-meeting-notification","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"c8f3b5c1-bef5-4584-b9d8-0c10578fefac","trace_id":"b700f03d-b02b-495e-b505-1598c7a9ea4b"}
[2026-04-14 10:10:22] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"conference:monitor:start","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"d7b97fbb-00b9-47c2-ae81-dda03fd8b253","trace_id":"54447306-49bf-4629-8de0-bb191c61cce2"}
[2026-04-14 10:10:22] local.INFO: Running conference:monitor:start command for activities in (2026-04-14 10:00:00, 2026-04-14 10:05:00] {"correlation_id":"d7b97fbb-00b9-47c2-ae81-dda03fd8b253","trace_id":"54447306-49bf-4629-8de0-bb191c61cce2"}
[2026-04-14 10:10:22] local.INFO: [conference:monitor:start] No activities found in (2026-04-14 10:00:00, 2026-04-14 10:05:00] {"correlation_id":"d7b97fbb-00b9-47c2-ae81-dda03fd8b253","trace_id":"54447306-49bf-4629-8de0-bb191c61cce2"}
[2026-04-14 10:10:22] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"conference:monitor:start","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"d7b97fbb-00b9-47c2-ae81-dda03fd8b253","trace_id":"54447306-49bf-4629-8de0-bb191c61cce2"}
[2026-04-14 10:10:23] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"conference:monitor:end","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"07665538-664f-421e-af9b-97152a688b68","trace_id":"d116813e-2d96-4a3d-ae04-6e53d69ca565"}
[2026-04-14 10:10:23] local.INFO: conference:monitor:end:Jiminny\Console\Commands\Activities\MonitorMeetingEndCommand::logActivitiesEnded {"from":"10:05","to":"10:10"} {"correlation_id":"07665538-664f-421e-af9b-97152a688b68","trace_id":"d116813e-2d96-4a3d-ae04-6e53d69ca565"}
[2026-04-14 10:10:23] local.INFO: conference:monitor:end:Jiminny\Console\Commands\Activities\MonitorMeetingEndCommand::logActivitiesWithUnfinishedSession {"from":"00:00","to":"00:05"} {"correlation_id":"07665538-664f-421e-af9b-97152a688b68","trace_id":"d116813e-2d96-4a3d-ae04-6e53d69ca565"}
[2026-04-14 10:10:23] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"conference:monitor:end","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"07665538-664f-421e-af9b-97152a688b68","trace_id":"d116813e-2d96-4a3d-ae04-6e53d69ca565"}
[2026-04-14 10:10:25] local.NOTICE: Repairing HubSpot tokens start {"correlation_id":"d269668d-cb18-4aeb-9a05-13a9e53195ed","trace_id":"ecbe2fde-809f-4720-8113-609eda111b53"}
[2026-04-14 10:10:25] local.INFO: Trying to refresh HubSpot token {"account_id":59,"updated_at":"2025-10-03 09:32:05"} {"correlation_id":"d269668d-cb18-4aeb-9a05-13a9e53195ed","trace_id":"ecbe2fde-809f-4720-8113-609eda111b53"}
[2026-04-14 10:10:25] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"d269668d-cb18-4aeb-9a05-13a9e53195ed","trace_id":"ecbe2fde-809f-4720-8113-609eda111b53"}
[2026-04-14 10:10:25] local.INFO: [SocialAccountService] Refreshing token from provider {"socialAccountId":59,"provider":"hubspot","refreshToken":"97b78f6e2cc49965c00c2492b602b02708b1392551e6b3f113fbaa48992af90b","state":"full-refresh"} {"correlation_id":"d269668d-cb18-4aeb-9a05-13a9e53195ed","trace_id":"ecbe2fde-809f-4720-8113-609eda11...
|
11808
|
|
11811
|
243
|
28
|
2026-04-14T10:13:17.458153+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776161597458_m2.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsCommandTest.php
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Tests failed: 10, passed: 0
text/html
text/html
te Tests failed: 10, passed: 0
text/html
text/html
text/html
Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AutomatedReportsCommandTest
Run 'AutomatedReportsCommandTest'
Debug 'AutomatedReportsCommandTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
248
Previous Highlighted Error
Next Highlighted Error
[2026-04-14 10:05:19] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:text-relay:sync","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"9756bfa7-c8e1-4b17-bc55-9f224d2af2e3","trace_id":"9e5fa115-9cf5-45d6-a1da-109e154cfae7"}
[2026-04-14 10:05:19] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:text-relay:sync","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"9756bfa7-c8e1-4b17-bc55-9f224d2af2e3","trace_id":"9e5fa115-9cf5-45d6-a1da-109e154cfae7"}
[2026-04-14 10:05:23] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"conference:pre-meeting-notification","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"d9d68876-323b-42bd-9953-635da8008f2e","trace_id":"6c00ce4c-f2df-4ccb-908d-4862de973096"}
[2026-04-14 10:05:23] local.INFO: Running pre-meeting notification command {"correlation_id":"d9d68876-323b-42bd-9953-635da8008f2e","trace_id":"6c00ce4c-f2df-4ccb-908d-4862de973096"}
[2026-04-14 10:05:23] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"conference:pre-meeting-notification","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"d9d68876-323b-42bd-9953-635da8008f2e","trace_id":"6c00ce4c-f2df-4ccb-908d-4862de973096"}
[2026-04-14 10:05:26] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"conference:monitor:start","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"27d73fea-a8cb-4757-9bbb-fbe7222e6943","trace_id":"bcdb88d0-a641-43e4-85e8-b7dc4ab20a0e"}
[2026-04-14 10:05:26] local.INFO: Running conference:monitor:start command for activities in (2026-04-14 09:55:00, 2026-04-14 10:00:00] {"correlation_id":"27d73fea-a8cb-4757-9bbb-fbe7222e6943","trace_id":"bcdb88d0-a641-43e4-85e8-b7dc4ab20a0e"}
[2026-04-14 10:05:26] local.INFO: [conference:monitor:start] start ok {"activity_id":407307} {"correlation_id":"27d73fea-a8cb-4757-9bbb-fbe7222e6943","trace_id":"bcdb88d0-a641-43e4-85e8-b7dc4ab20a0e"}
[2026-04-14 10:05:26] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"conference:monitor:start","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"27d73fea-a8cb-4757-9bbb-fbe7222e6943","trace_id":"bcdb88d0-a641-43e4-85e8-b7dc4ab20a0e"}
[2026-04-14 10:05:28] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"conference:monitor:end","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"588bae45-3998-4b86-b056-51aaf8b6882f","trace_id":"8f716a65-7768-44c5-b0e4-02a859f329e5"}
[2026-04-14 10:05:28] local.INFO: conference:monitor:end:Jiminny\Console\Commands\Activities\MonitorMeetingEndCommand::logActivitiesEnded {"from":"10:00","to":"10:05"} {"correlation_id":"588bae45-3998-4b86-b056-51aaf8b6882f","trace_id":"8f716a65-7768-44c5-b0e4-02a859f329e5"}
[2026-04-14 10:05:28] local.INFO: conference:monitor:end:Jiminny\Console\Commands\Activities\MonitorMeetingEndCommand::logActivitiesWithUnfinishedSession {"from":"23:55","to":"00:00"} {"correlation_id":"588bae45-3998-4b86-b056-51aaf8b6882f","trace_id":"8f716a65-7768-44c5-b0e4-02a859f329e5"}
[2026-04-14 10:05:28] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"conference:monitor:end","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"588bae45-3998-4b86-b056-51aaf8b6882f","trace_id":"8f716a65-7768-44c5-b0e4-02a859f329e5"}
[2026-04-14 10:05:30] local.NOTICE: Repairing HubSpot tokens start {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:30] local.INFO: Trying to refresh HubSpot token {"account_id":59,"updated_at":"2025-10-03 09:32:05"} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:30] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:30] local.INFO: [SocialAccountService] Refreshing token from provider {"socialAccountId":59,"provider":"hubspot","refreshToken":"97b78f6e2cc49965c00c2492b602b02708b1392551e6b3f113fbaa48992af90b","state":"full-refresh"} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:31] local.ERROR: Failed to refresh HubSpot token {"account_id":59,"updated_at":"2025-10-03 09:32:05","reason":"missing or invalid refresh token","previous":""} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:31] local.INFO: Trying to refresh HubSpot token {"account_id":306,"updated_at":"2023-11-27 09:30:03"} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:31] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:31] local.INFO: [SocialAccountService] Refreshing token from provider {"socialAccountId":306,"provider":"hubspot","refreshToken":"6fa6aa8cc641d131231acc3470f5c03cb3b07b2e580fb18f8acb3b1dbb72549b","state":"full-refresh"} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:31] local.ERROR: Failed to refresh HubSpot token {"account_id":306,"updated_at":"2023-11-27 09:30:03","reason":"missing or invalid refresh token","previous":""} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:31] local.INFO: Trying to refresh HubSpot token {"account_id":1372,"updated_at":"2025-10-02 14:47:06"} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:31] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:31] local.INFO: [SocialAccountService] Refreshing token from provider {"socialAccountId":1372,"provider":"hubspot","refreshToken":"9aa73948c761da29dce46c177cf9aee1fde483a44169ca38723f9f0597d7a8c4","state":"full-refresh"} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:31] local.ERROR: Failed to refresh HubSpot token {"account_id":1372,"updated_at":"2025-10-02 14:47:06","reason":"missing or invalid refresh token","previous":""} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:31] local.NOTICE: Repairing HubSpot tokens end {"total":3,"fixed":0,"failed":3} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:34] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"conference:pre-meeting-reminder","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"2b2ca83a-1263-4a7c-a5d7-86dc15ea7aec","trace_id":"fbf48d3d-4e50-4442-b14f-d2ae5e6e70bd"}
[2026-04-14 10:05:34] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"crm:bullhorn:ping","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"73b127c9-c033-4fa7-a8ed-2e28077ba970","trace_id":"fd1cf3c5-d4ce-41d6-a19d-5e67fd544d9e"}
[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Polling] Getting offset from database {"offset":"","jiminny_team_id":1} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:34] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"crm:bullhorn:ping","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"73b127c9-c033-4fa7-a8ed-2e28077ba970","trace_id":"fd1cf3c5-d4ce-41d6-a19d-5e67fd544d9e"}
[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Command] Starting polling service {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Polling] Service starting {"memory_limit":"256M","max_execution_time":"0","initial_memory_mb":62.0} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Polling] Acquired polling lock {"expires_at":"2026-04-14T10:07:34.196472Z"} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Polling] Getting offset from database {"offset":"","jiminny_team_id":1} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:34] local.INFO: [HubSpot Journal API] Fetching latest journal entry {"url":"https://api.hubapi.com/webhooks/v4/journal/latest"} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:34] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"conference:pre-meeting-reminder","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"2b2ca83a-1263-4a7c-a5d7-86dc15ea7aec","trace_id":"fbf48d3d-4e50-4442-b14f-d2ae5e6e70bd"}
[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Polling] No data {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:39] local.INFO: [HubSpot Journal Polling] Getting offset from database {"offset":"","jiminny_team_id":1} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:39] local.INFO: [HubSpot Journal API] Fetching latest journal entry {"url":"https://api.hubapi.com/webhooks/v4/journal/latest"} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:39] local.INFO: [HubSpot Journal Polling] No data {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:44] local.INFO: [HubSpot Journal Polling] Getting offset from database {"offset":"","jiminny_team_id":1} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:44] local.INFO: [HubSpot Journal API] Fetching latest journal entry {"url":"https://api.hubapi.com/webhooks/v4/journal/latest"} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:44] local.INFO: [HubSpot Journal Polling] No data {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:59] local.INFO: [HubSpot Journal Polling] Getting offset from database {"offset":"","jiminny_team_id":1} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:59] local.INFO: [HubSpot Journal API] Fetching latest journal entry {"url":"https://api.hubapi.com/webhooks/v4/journal/latest"} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:06:00] local.INFO: [HubSpot Journal Polling] No data {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:06:04] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"44f01bd8-2599-41a4-b7c3-8bb1fdf0df9a","trace_id":"b4c87c8d-120d-48fb-b13c-aee84323f3e2"}
[2026-04-14 10:06:04] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {"correlation_id":"44f01bd8-2599-41a4-b7c3-8bb1fdf0df9a","trace_id":"b4c87c8d-120d-48fb-b13c-aee84323f3e2"}
[2026-04-14 10:06:04] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"44f01bd8-2599-41a4-b7c3-8bb1fdf0df9a","trace_id":"b4c87c8d-120d-48fb-b13c-aee84323f3e2"}
[2026-04-14 10:06:06] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"8403c1e4-b5b6-41f9-9280-ff666beed28b","trace_id":"3f631f60-6d14-44f5-b6c3-b401999867f9"}
[2026-04-14 10:06:06] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"8403c1e4-b5b6-41f9-9280-ff666beed28b","trace_id":"3f631f60-6d14-44f5-b6c3-b401999867f9"}
[2026-04-14 10:06:08] local.NOTICE: Monitoring start {"correlation_id":"0d51eb08-f2f1-4322-97d0-268700856a99","trace_id":"92b45b9a-b6e8-40c8-a783-193cf1a4eea2"}
[2026-04-14 10:06:08] local.NOTICE: Monitoring end {"correlation_id":"0d51eb08-f2f1-4322-97d0-268700856a99","trace_id":"92b45b9a-b6e8-40c8-a783-193cf1a4eea2"}
[2026-04-14 10:06:10] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"0566c59b-bf67-49eb-970a-a6b955ddd756","trace_id":"724c5f5e-cd88-41fb-9b7e-74315e131024"}
[2026-04-14 10:06:10] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"0566c59b-bf67-49eb-970a-a6b955ddd756","trace_id":"724c5f5e-cd88-41fb-9b7e-74315e131024"}
[2026-04-14 10:06:12] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"33d190d4-0abb-4e63-af52-95faa913e7a1","trace_id":"703aaa4d-a551-4ed1-8a4a-609d373e2fc0"}
[2026-04-14 10:06:12] local.INFO: [EmailSchedule] STARTING batch process {"host":"docker_lamp_1"} {"correlation_id":"33d190d4-0abb-4e63-af52-95faa913e7a1","trace_id":"703aaa4d-a551-4ed1-8a4a-609d373e2fc0"}
[2026-04-14 10:06:12] local.INFO: [EmailSchedule] FINISHED batch process {"host":"docker_lamp_1","processed":0} {"correlation_id":"33d190d4-0abb-4e63-af52-95faa913e7a1","trace_id":"703aaa4d-a551-4ed1-8a4a-609d373e2fc0"}
[2026-04-14 10:06:12] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"33d190d4-0abb-4e63-af52-95faa913e7a1","trace_id":"703aaa4d-a551-4ed1-8a4a-609d373e2fc0"}
[2026-04-14 10:06:14] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"conference:monitor:count","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"da41d77d-46d9-41ae-90b7-f8418b05fb9a","trace_id":"47329a55-e6f4-406b-8730-e72d69737f09"}
[2026-04-14 10:06:14] local.INFO: Running conference:monitor:count command for activities in (2026-04-14 10:04:00, 2026-04-14 10:06:00] {"correlation_id":"da41d77d-46d9-41ae-90b7-f8418b05fb9a","trace_id":"47329a55-e6f4-406b-8730-e72d69737f09"}
[2026-04-14 10:06:14] local.INFO: [conference:monitor:count] No activities found in (2026-04-14 10:04:00, 2026-04-14 10:06:00] {"correlation_id":"da41d77d-46d9-41ae-90b7-f8418b05fb9a","trace_id":"47329a55-e6f4-406b-8730-e72d69737f09"}
[2026-04-14 10:06:14] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"conference:monitor:count","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"da41d77d-46d9-41ae-90b7-f8418b05fb9a","trace_id":"47329a55-e6f4-406b-8730-e72d69737f09"}
[2026-04-14 10:06:16] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"activity:notify-not-logged","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"310e7e99-6de4-4f93-967e-37c78e9ec826","trace_id":"2a1fdf0a-be0e-4e5a-a677-fa16ddc33e9e"}
[2026-04-14 10:06:16] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"activity:notify-not-logged","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"310e7e99-6de4-4f93-967e-37c78e9ec826","trace_id":"2a1fdf0a-be0e-4e5a-a677-fa16ddc33e9e"}
[2026-04-14 10:06:19] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:sync","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"de8430ad-f242-4536-bebe-e165320b6b26","trace_id":"75f83d2f-4e5e-4086-b062-7c1d24b5b74c"}
[2026-04-14 10:06:19] local.INFO: [EmailSchedule] STARTING Inbox Sync {"host":"docker_lamp_1"} {"correlation_id":"de8430ad-f242-4536-bebe-e165320b6b26","trace_id":"75f83d2f-4e5e-4086-b062-7c1d24b5b74c"}
[2026-04-14 10:06:19] local.INFO: [EmailSchedule] FINISHED Inbox Sync {"host":"docker_lamp_1","events":1} {"correlation_id":"de8430ad-f242-4536-bebe-e165320b6b26","trace_id":"75f83d2f-4e5e-4086-b062-7c1d24b5b74c"}
[2026-04-14 10:06:19] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:sync","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"de8430ad-f242-4536-bebe-e165320b6b26","trace_id":"75f83d2f-4e5e-4086-b062-7c1d24b5b74c"}
[2026-04-14 10:06:22] local.INFO: [Sync Mailbox] Sync start {"inbox_id":59} {"correlation_id":"eb46c86e-5c80-48b1-a4ee-ac425f197754","trace_id":"75f83d2f-4e5e-4086-b062-7c1d24b5b74c"}
[2026-04-14 10:06:22] local.INFO: [Inbox service] Skipping METADATA SYNC for inbox 59 due to unauthorized access to the mailbox {"correlation_id":"eb46c86e-5c80-48b1-a4ee-ac425f197754","trace_id":"75f83d2f-4e5e-4086-b062-7c1d24b5b74c"}
[2026-04-14 10:06:22] local.INFO: [Sync Mailbox] Sync complete {"inbox_id":59} {"correlation_id":"eb46c86e-5c80-48b1-a4ee-ac425f197754","trace_id":"75f83d2f-4e5e-4086-b062-7c1d24b5b74c"}
[2026-04-14 10:06:30] local.INFO: [HubSpot Journal Polling] Getting offset from database {"offset":"","jiminny_team_id":1} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:06:30] local.INFO: [HubSpot Journal API] Fetching latest journal entry {"url":"https://api.hubapi.com/webhooks/v4/journal/latest"} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:06:30] local.INFO: [HubSpot Journal Polling] No data {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:06:30] local.WARNING: [HubSpot Journal Polling] Maximum empty results reached, stopping {"empty_results":5,"max_empty_results":5} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:06:30] local.WARNING: [HubSpot Journal Polling] Maximum empty results reached, stopping {"empty_results":5,"max_empty_results":5} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:06:30] local.INFO: [HubSpot Journal Polling] Service ending {"runtime_seconds":56,"total_cycles":5,"files_downloaded":0,"empty_files":0,"other_portal_skipped":0,"total_events":0,"events_per_file":0,"avg_api_ms":169.9,"avg_download_ms":0.0,"avg_transform_ms":0.0,"avg_process_ms":0.0,"peak_memory_mb":99.75} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:06:30] local.INFO: [HubSpot Journal Polling] Released polling lock {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:07:04] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"53329974-bdd6-4cd2-a022-0d565b0a5cf4","trace_id":"08246763-f961-45fb-b262-51378bdbc955"}
[2026-04-14 10:07:04] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {"correlation_id":"53329974-bdd6-4cd2-a022-0d565b0a5cf4","trace_id":"08246763-f961-45fb-b262-51378bdbc955"}
[2026-04-14 10:07:04] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"53329974-bdd6-4cd2-a022-0d565b0a5cf4","trace_id":"08246763-f961-45fb-b262-51378bdbc955"}
[2026-04-14 10:07:06] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"2b6586f0-419e-4422-8800-e4b7619c43d6","trace_id":"221c682d-c45f-4e4a-a793-ed11006dc6a1"}
[2026-04-14 10:07:06] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"2b6586f0-419e-4422-8800-e4b7619c43d6","trace_id":"221c682d-c45f-4e4a-a793-ed11006dc6a1"}
[2026-04-14 10:07:08] local.NOTICE: Monitoring start {"correlation_id":"9ba692ee-5286-41ca-abf0-86f6e1167a8e","trace_id":"d58ab8ad-7737-4d7c-91c0-81733c21e709"}
[2026-04-14 10:07:08] local.NOTICE: Monitoring end {"correlation_id":"9ba692ee-5286-41ca-abf0-86f6e1167a8e","trace_id":"d58ab8ad-7737-4d7c-91c0-81733c21e709"}
[2026-04-14 10:07:10] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"28e708ed-74ee-4417-a8da-c1a9ae0cd745","trace_id":"bd848201-9700-40bf-8fa4-9df13ae88f6e"}
[2026-04-14 10:07:10] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"28e708ed-74ee-4417-a8da-c1a9ae0cd745","trace_id":"bd848201-9700-40bf-8fa4-9df13ae88f6e"}
[2026-04-14 10:07:12] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"95326c5a-7b17-475d-9245-634d15d51bfe","trace_id":"31b36f9d-93cc-4917-bc7b-6b6a3da139e7"}
[2026-04-14 10:07:12] local.INFO: [EmailSchedule] STARTING batch process {"host":"docker_lamp_1"} {"correlation_id":"95326c5a-7b17-475d-9245-634d15d51bfe","trace_id":"31b36f9d-93cc-4917-bc7b-6b6a3da139e7"}
[2026-04-14 10:07:12] local.INFO: [EmailSchedule] FINISHED batch process {"host":"docker_lamp_1","processed":0} {"correlation_id":"95326c5a-7b17-475d-9245-634d15d51bfe","trace_id":"31b36f9d-93cc-4917-bc7b-6b6a3da139e7"}
[2026-04-14 10:07:12] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"95326c5a-7b17-475d-9245-634d15d51bfe","trace_id":"31b36f9d-93cc-4917-bc7b-6b6a3da139e7"}
[2026-04-14 10:07:14] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:batch:create","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"f4f68165-0bcc-4e79-89e5-81f9c627e4dc","trace_id":"5766aab2-0316-400f-aa89-168ea0579941"}
[2026-04-14 10:07:14] local.INFO: [EmailSchedule] STARTING batch create {"host":"docker_lamp_1"} {"correlation_id":"f4f68165-0bcc-4e79-89e5-81f9c627e4dc","trace_id":"5766aab2-0316-400f-aa89-168ea0579941"}
[2026-04-14 10:07:14] local.INFO: [EmailSchedule] FINISHED batch create {"host":"docker_lamp_1"} {"correlation_id":"f4f68165-0bcc-4e79-89e5-81f9c627e4dc","trace_id":"5766aab2-0316-400f-aa89-168ea0579941"}
[2026-04-14 10:07:14] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:batch:create","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"f4f68165-0bcc-4e79-89e5-81f9c627e4dc","trace_id":"5766aab2-0316-400f-aa89-168ea0579941"}
[2026-04-14 10:07:15] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"activity:sync","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"a7d5580f-8b90-4ff6-91e8-de94514f8ca1","trace_id":"fc40909d-86c1-4e45-bd51-96e2bd8c4556"}
[2026-04-14 10:07:16] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"activity:sync","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"a7d5580f-8b90-4ff6-91e8-de94514f8ca1","trace_id":"fc40909d-86c1-4e45-bd51-96e2bd8c4556"}
[2026-04-14 10:07:16] local.INFO: [Jiminny\Jobs\Mailbox\CreateBatches] processed 0 inboxes and created 0 batches {"userId":null,"batchSize":30,"maxBatches":1000} {"correlation_id":"df4d1442-bcd6-4b63-8513-802ae90993e6","trace_id":"5766aab2-0316-400f-aa89-168ea0579941"}
[2026-04-14 10:08:04] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"43299ccb-af86-42b1-b793-4ede57e2b91d","trace_id":"2f919b69-9d68-488c-89fa-2aade6ef8519"}
[2026-04-14 10:08:04] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {"correlation_id":"43299ccb-af86-42b1-b793-4ede57e2b91d","trace_id":"2f919b69-9d68-488c-89fa-2aade6ef8519"}
[2026-04-14 10:08:04] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"43299ccb-af86-42b1-b793-4ede57e2b91d","trace_id":"2f919b69-9d68-488c-89fa-2aade6ef8519"}
[2026-04-14 10:08:06] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"cde80757-333e-4268-a902-892c031b2373","trace_id":"36e932e0-8362-432f-9e36-d819f902d49e"}
[2026-04-14 10:08:06] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"cde80757-333e-4268-a902-892c031b2373","trace_id":"36e932e0-8362-432f-9e36-d819f902d49e"}
[2026-04-14 10:08:07] local.NOTICE: Monitoring start {"correlation_id":"146390f8-e91a-4e5c-b282-0c83b4947101","trace_id":"fb689e40-c867-4fc5-9847-c223835da80e"}
[2026-04-14 10:08:07] local.NOTICE: Monitoring end {"correlation_id":"146390f8-e91a-4e5c-b282-0c83b4947101","trace_id":"fb689e40-c867-4fc5-9847-c223835da80e"}
[2026-04-14 10:08:10] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"58e23da5-8f3f-4836-aac7-315ab32f74a3","trace_id":"c71267c4-b5fe-42ad-9bcd-76f6299c1538"}
[2026-04-14 10:08:10] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"58e23da5-8f3f-4836-aac7-315ab32f74a3","trace_id":"c71267c4-b5fe-42ad-9bcd-76f6299c1538"}
[2026-04-14 10:08:13] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"9158bb6f-c165-495a-9b6e-8077d8343c87","trace_id":"df378af8-cacb-41ea-b030-b8f53144fddd"}
[2026-04-14 10:08:13] local.INFO: [EmailSchedule] STARTING batch process {"host":"docker_lamp_1"} {"correlation_id":"9158bb6f-c165-495a-9b6e-8077d8343c87","trace_id":"df378af8-cacb-41ea-b030-b8f53144fddd"}
[2026-04-14 10:08:13] local.INFO: [EmailSchedule] FINISHED batch process {"host":"docker_lamp_1","processed":0} {"correlation_id":"9158bb6f-c165-495a-9b6e-8077d8343c87","trace_id":"df378af8-cacb-41ea-b030-b8f53144fddd"}
[2026-04-14 10:08:13] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"9158bb6f-c165-495a-9b6e-8077d8343c87","trace_id":"df378af8-cacb-41ea-b030-b8f53144fddd"}
[2026-04-14 10:08:14] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"conference:monitor:count","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"35774df7-e046-49ec-835f-45f9dc1ec025","trace_id":"45c5e102-6b65-4d23-9edd-684ca996316c"}
[2026-04-14 10:08:14] local.INFO: Running conference:monitor:count command for activities in (2026-04-14 10:06:00, 2026-04-14 10:08:00] {"correlation_id":"35774df7-e046-49ec-835f-45f9dc1ec025","trace_id":"45c5e102-6b65-4d23-9edd-684ca996316c"}
[2026-04-14 10:08:14] local.INFO: [conference:monitor:count] No activities found in (2026-04-14 10:06:00, 2026-04-14 10:08:00] {"correlation_id":"35774df7-e046-49ec-835f-45f9dc1ec025","trace_id":"45c5e102-6b65-4d23-9edd-684ca996316c"}
[2026-04-14 10:08:14] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"conference:monitor:count","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"35774df7-e046-49ec-835f-45f9dc1ec025","trace_id":"45c5e102-6b65-4d23-9edd-684ca996316c"}
[2026-04-14 10:08:17] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:batch:retry-failed","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"d4dc4b3b-8dc8-4665-aec7-139be0df2306","trace_id":"853f2210-e804-40aa-a1d8-4457c60f4993"}
[2026-04-14 10:08:17] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:batch:retry-failed","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"d4dc4b3b-8dc8-4665-aec7-139be0df2306","trace_id":"853f2210-e804-40aa-a1d8-4457c60f4993"}
[2026-04-14 10:09:05] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"8052fb2f-5876-4e2c-8f64-c770d9fe37fe","trace_id":"63249c19-bf59-4e52-9096-156d537a9786"}
[2026-04-14 10:09:05] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {"correlation_id":"8052fb2f-5876-4e2c-8f64-c770d9fe37fe","trace_id":"63249c19-bf59-4e52-9096-156d537a9786"}
[2026-04-14 10:09:05] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"8052fb2f-5876-4e2c-8f64-c770d9fe37fe","trace_id":"63249c19-bf59-4e52-9096-156d537a9786"}
[2026-04-14 10:09:07] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"1dd274b4-f71d-486e-b6c4-aaf106304102","trace_id":"1d55139c-a58d-4456-801a-9bcb3bf9b024"}
[2026-04-14 10:09:07] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"1dd274b4-f71d-486e-b6c4-aaf106304102","trace_id":"1d55139c-a58d-4456-801a-9bcb3bf9b024"}
[2026-04-14 10:09:10] local.NOTICE: Monitoring start {"correlation_id":"09dc762e-2b78-4dbb-a880-5c8f1cbfc4ad","trace_id":"8e60392d-4ea4-41f2-be2f-a01853c7a1ab"}
[2026-04-14 10:09:10] local.NOTICE: Monitoring end {"correlation_id":"09dc762e-2b78-4dbb-a880-5c8f1cbfc4ad","trace_id":"8e60392d-4ea4-41f2-be2f-a01853c7a1ab"}
[2026-04-14 10:09:13] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"2de9f84e-2691-459d-adfd-f5f6746501d0","trace_id":"418ad958-86c0-4477-b0fb-e487768d6fa1"}
[2026-04-14 10:09:13] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"2de9f84e-2691-459d-adfd-f5f6746501d0","trace_id":"418ad958-86c0-4477-b0fb-e487768d6fa1"}
[2026-04-14 10:09:16] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"1be8488c-ae59-4f42-8475-c426905c3ca6","trace_id":"aeb8b412-635e-4929-915f-fb3fe5786eae"}
[2026-04-14 10:09:16] local.INFO: [EmailSchedule] STARTING batch process {"host":"docker_lamp_1"} {"correlation_id":"1be8488c-ae59-4f42-8475-c426905c3ca6","trace_id":"aeb8b412-635e-4929-915f-fb3fe5786eae"}
[2026-04-14 10:09:16] local.INFO: [EmailSchedule] FINISHED batch process {"host":"docker_lamp_1","processed":0} {"correlation_id":"1be8488c-ae59-4f42-8475-c426905c3ca6","trace_id":"aeb8b412-635e-4929-915f-fb3fe5786eae"}
[2026-04-14 10:09:16] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"1be8488c-ae59-4f42-8475-c426905c3ca6","trace_id":"aeb8b412-635e-4929-915f-fb3fe5786eae"}
[2026-04-14 10:09:18] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"activity:aircall:check-and-renew","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"b3d1b688-309f-4df0-9dcd-9a733c87f597","trace_id":"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c"}
[2026-04-14 10:09:18] local.INFO: [SocialAccountService] Fetching token {"socialAccountId":1496,"provider":"aircall"} {"correlation_id":"b3d1b688-309f-4df0-9dcd-9a733c87f597","trace_id":"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c"}
[2026-04-14 10:09:18] local.INFO: [SocialAccountService] Token retrieved {"socialAccountId":1496,"provider":"aircall"} {"correlation_id":"b3d1b688-309f-4df0-9dcd-9a733c87f597","trace_id":"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c"}
[2026-04-14 10:09:18] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"b3d1b688-309f-4df0-9dcd-9a733c87f597","trace_id":"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c"}
[2026-04-14 10:09:18] local.ERROR: [Aircall] Re-activating webhooks failed {"team_id":1,"reason":"{\"message\":\"Forbidden\"}"} {"correlation_id":"b3d1b688-309f-4df0-9dcd-9a733c87f597","trace_id":"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c"}
[2026-04-14 10:09:18] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"activity:aircall:check-and-renew","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"b3d1b688-309f-4df0-9dcd-9a733c87f597","trace_id":"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c"}
[2026-04-14 10:09:21] local.INFO: [RetryFailedDownloads] Starting {"options":{"from":null,"to":null,"help":false,"silent":false,"quiet":false,"verbose":false,"version":false,"ansi":null,"no-interaction":false,"env":null}} {"correlation_id":"c7aba065-c8f1-473d-b8b5-4797245873bf","trace_id":"48f587f9-dd77-4634-9ad9-1137b029b5f5"}
[2026-04-14 10:10:04] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"7310aae5-3829-4d5c-bbc9-f6550a35f539","trace_id":"6099cf10-45e2-4b82-9649-649e2f8a1209"}
[2026-04-14 10:10:04] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {"correlation_id":"7310aae5-3829-4d5c-bbc9-f6550a35f539","trace_id":"6099cf10-45e2-4b82-9649-649e2f8a1209"}
[2026-04-14 10:10:04] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"7310aae5-3829-4d5c-bbc9-f6550a35f539","trace_id":"6099cf10-45e2-4b82-9649-649e2f8a1209"}
[2026-04-14 10:10:06] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"5119d94e-0c61-4312-a740-2b569388cc9f","trace_id":"6a412a32-3bc3-46a4-af7c-24ad560a4e41"}
[2026-04-14 10:10:06] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"5119d94e-0c61-4312-a740-2b569388cc9f","trace_id":"6a412a32-3bc3-46a4-af7c-24ad560a4e41"}
[2026-04-14 10:10:08] local.NOTICE: Monitoring start {"correlation_id":"95cdb3b7-b356-4325-be28-20663ece6aa0","trace_id":"e64a75a4-2493-4f35-ba46-ccd002e6b7b7"}
[2026-04-14 10:10:08] local.NOTICE: Monitoring end {"correlation_id":"95cdb3b7-b356-4325-be28-20663ece6aa0","trace_id":"e64a75a4-2493-4f35-ba46-ccd002e6b7b7"}
[2026-04-14 10:10:10] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"6460dd5f-4b94-4cd1-867e-53304d785744","trace_id":"683b103d-2dfc-4266-84a2-d5cd799b133f"}
[2026-04-14 10:10:10] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"6460dd5f-4b94-4cd1-867e-53304d785744","trace_id":"683b103d-2dfc-4266-84a2-d5cd799b133f"}
[2026-04-14 10:10:11] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"5a59007d-2a12-4977-8a5a-59c678aa12ee","trace_id":"bc3a2ad5-9f13-4728-adaa-529da75cf011"}
[2026-04-14 10:10:11] local.INFO: [EmailSchedule] STARTING batch process {"host":"docker_lamp_1"} {"correlation_id":"5a59007d-2a12-4977-8a5a-59c678aa12ee","trace_id":"bc3a2ad5-9f13-4728-adaa-529da75cf011"}
[2026-04-14 10:10:11] local.INFO: [EmailSchedule] FINISHED batch process {"host":"docker_lamp_1","processed":0} {"correlation_id":"5a59007d-2a12-4977-8a5a-59c678aa12ee","trace_id":"bc3a2ad5-9f13-4728-adaa-529da75cf011"}
[2026-04-14 10:10:11] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"5a59007d-2a12-4977-8a5a-59c678aa12ee","trace_id":"bc3a2ad5-9f13-4728-adaa-529da75cf011"}
[2026-04-14 10:10:14] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"conference:monitor:count","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"afe2ff6b-1b9e-4485-bdad-a758d873a782","trace_id":"d507becf-55d6-4fda-8831-e981f95b85c8"}
[2026-04-14 10:10:14] local.INFO: Running conference:monitor:count command for activities in (2026-04-14 10:08:00, 2026-04-14 10:10:00] {"correlation_id":"afe2ff6b-1b9e-4485-bdad-a758d873a782","trace_id":"d507becf-55d6-4fda-8831-e981f95b85c8"}
[2026-04-14 10:10:14] local.INFO: [conference:monitor:count] No activities found in (2026-04-14 10:08:00, 2026-04-14 10:10:00] {"correlation_id":"afe2ff6b-1b9e-4485-bdad-a758d873a782","trace_id":"d507becf-55d6-4fda-8831-e981f95b85c8"}
[2026-04-14 10:10:14] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"conference:monitor:count","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"afe2ff6b-1b9e-4485-bdad-a758d873a782","trace_id":"d507becf-55d6-4fda-8831-e981f95b85c8"}
[2026-04-14 10:10:16] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"activity:purge-stale","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"ebe2ad2b-df9a-48d7-b78f-d52b7489c6f0","trace_id":"05b44216-d5ac-44cd-b74b-3e92567b192d"}
[2026-04-14 10:10:16] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"activity:purge-stale","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"ebe2ad2b-df9a-48d7-b78f-d52b7489c6f0","trace_id":"05b44216-d5ac-44cd-b74b-3e92567b192d"}
[2026-04-14 10:10:18] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:text-relay:sync","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"d76b00ee-6271-4df7-ba45-769738bbb7ae","trace_id":"92384790-9588-452d-abea-cdd25a2fe7ff"}
[2026-04-14 10:10:18] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:text-relay:sync","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"d76b00ee-6271-4df7-ba45-769738bbb7ae","trace_id":"92384790-9588-452d-abea-cdd25a2fe7ff"}
[2026-04-14 10:10:20] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"conference:pre-meeting-notification","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"c8f3b5c1-bef5-4584-b9d8-0c10578fefac","trace_id":"b700f03d-b02b-495e-b505-1598c7a9ea4b"}
[2026-04-14 10:10:20] local.INFO: Running pre-meeting notification command {"correlation_id":"c8f3b5c1-bef5-4584-b9d8-0c10578fefac","trace_id":"b700f03d-b02b-495e-b505-1598c7a9ea4b"}
[2026-04-14 10:10:20] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"conference:pre-meeting-notification","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"c8f3b5c1-bef5-4584-b9d8-0c10578fefac","trace_id":"b700f03d-b02b-495e-b505-1598c7a9ea4b"}
[2026-04-14 10:10:22] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"conference:monitor:start","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"d7b97fbb-00b9-47c2-ae81-dda03fd8b253","trace_id":"54447306-49bf-4629-8de0-bb191c61cce2"}
[2026-04-14 10:10:22] local.INFO: Running conference:monitor:start command for activities in (2026-04-14 10:00:00, 2026-04-14 10:05:00] {"correlation_id":"d7b97fbb-00b9-47c2-ae81-dda03fd8b253","trace_id":"54447306-49bf-4629-8de0-bb191c61cce2"}
[2026-04-14 10:10:22] local.INFO: [conference:monitor:start] No activities found in (2026-04-14 10:00:00, 2026-04-14 10:05:00] {"correlation_id":"d7b97fbb-00b9-47c2-ae81-dda03fd8b253","trace_id":"54447306-49bf-4629-8de0-bb191c61cce2"}
[2026-04-14 10:10:22] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"conference:monitor:start","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"d7b97fbb-00b9-47c2-ae81-dda03fd8b253","trace_id":"54447306-49bf-4629-8de0-bb191c61cce2"}
[2026-04-14 10:10:23] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"conference:monitor:end","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"07665538-664f-421e-af9b-97152a688b68","trace_id":"d116813e-2d96-4a3d-ae04-6e53d69ca565"}
[2026-04-14 10:10:23] local.INFO: conference:monitor:end:Jiminny\Console\Commands\Activities\MonitorMeetingEndCommand::logActivitiesEnded {"from":"10:05","to":"10:10"} {"correlation_id":"07665538-664f-421e-af9b-97152a688b68","trace_id":"d116813e-2d96-4a3d-ae04-6e53d69ca565"}
[2026-04-14 10:10:23] local.INFO: conference:monitor:end:Jiminny\Console\Commands\Activities\MonitorMeetingEndCommand::logActivitiesWithUnfinishedSession {"from":"00:00","to":"00:05"} {"correlation_id":"07665538-664f-421e-af9b-97152a688b68","trace_id":"d116813e-2d96-4a3d-ae04-6e53d69ca565"}
[2026-04-14 10:10:23] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"conference:monitor:end","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"07665538-664f-421e-af9b-97152a688b68","trace_id":"d116813e-2d96-4a3d-ae04-6e53d69ca565"}
[2026-04-14 10:10:25] local.NOTICE: Repairing HubSpot tokens start {"correlation_id":"d269668d-cb18-4aeb-9a05-13a9e53195ed","trace_id":"ecbe2fde-809f-4720-8113-609eda111b53"}
[2026-04-14 10:10:25] local.INFO: Trying to refresh HubSpot token {"account_id":59,"updated_at":"2025-10-03 09:32:05"} {"correlation_id":"d269668d-cb18-4aeb-9a05-13a9e53195ed","trace_id":"ecbe2fde-809f-4720-8113-609eda111b53"}
[2026-04-14 10:10:25] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"d269668d-cb18-4aeb-9a05-13a9e53195ed","trace_id":"ecbe2fde-809f-4720-8113-609eda111b53"}
[2026-04-14 10:10:25] local.INFO: [SocialAccountService] Refreshing token from provider {"socialAccountId":59,"provider":"hubspot","refreshToken":"97b78f6e2cc49965c00c2492b602b02708b1392551e6b3f113fbaa48992af90b","state":"full-refresh"} {"correlation_id":"d269668d-cb18-4aeb-9a05-13a9e53195ed","trace_id":"ecbe2fde-809f-4720-8113-609eda11...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Tests failed: 10, passed: 0","depth":3,"bounds":{"left":0.9175781,"top":0.11180556,"width":0.0625,"height":0.011805556},"value":"Tests failed: 10, passed: 0","help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"bounds":{"left":0.9175781,"top":0.11180556,"width":0.0625,"height":0.011805556},"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.03046875,"top":0.017361112,"width":0.0453125,"height":0.022222223},"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"bounds":{"left":0.07578125,"top":0.017361112,"width":0.14257812,"height":0.022222223},"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"bounds":{"left":0.78515625,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AutomatedReportsCommandTest","depth":6,"bounds":{"left":0.803125,"top":0.017361112,"width":0.09765625,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsCommandTest'","depth":6,"bounds":{"left":0.9007813,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsCommandTest'","depth":6,"bounds":{"left":0.9140625,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9273437,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96015626,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9734375,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9867188,"top":0.017361112,"width":0.013281226,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.049609374,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"248","depth":4,"bounds":{"left":0.58085936,"top":0.15208334,"width":0.01484375,"height":0.013194445},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.59765625,"top":0.15069444,"width":0.00859375,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.60625,"top":0.15069444,"width":0.008203125,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"[2026-04-14 10:05:19] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:text-relay:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"9756bfa7-c8e1-4b17-bc55-9f224d2af2e3\",\"trace_id\":\"9e5fa115-9cf5-45d6-a1da-109e154cfae7\"}\n[2026-04-14 10:05:19] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:text-relay:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"9756bfa7-c8e1-4b17-bc55-9f224d2af2e3\",\"trace_id\":\"9e5fa115-9cf5-45d6-a1da-109e154cfae7\"}\n[2026-04-14 10:05:23] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:pre-meeting-notification\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"d9d68876-323b-42bd-9953-635da8008f2e\",\"trace_id\":\"6c00ce4c-f2df-4ccb-908d-4862de973096\"}\n[2026-04-14 10:05:23] local.INFO: Running pre-meeting notification command {\"correlation_id\":\"d9d68876-323b-42bd-9953-635da8008f2e\",\"trace_id\":\"6c00ce4c-f2df-4ccb-908d-4862de973096\"}\n[2026-04-14 10:05:23] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:pre-meeting-notification\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"d9d68876-323b-42bd-9953-635da8008f2e\",\"trace_id\":\"6c00ce4c-f2df-4ccb-908d-4862de973096\"}\n[2026-04-14 10:05:26] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:start\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"27d73fea-a8cb-4757-9bbb-fbe7222e6943\",\"trace_id\":\"bcdb88d0-a641-43e4-85e8-b7dc4ab20a0e\"}\n[2026-04-14 10:05:26] local.INFO: Running conference:monitor:start command for activities in (2026-04-14 09:55:00, 2026-04-14 10:00:00] {\"correlation_id\":\"27d73fea-a8cb-4757-9bbb-fbe7222e6943\",\"trace_id\":\"bcdb88d0-a641-43e4-85e8-b7dc4ab20a0e\"}\n[2026-04-14 10:05:26] local.INFO: [conference:monitor:start] start ok {\"activity_id\":407307} {\"correlation_id\":\"27d73fea-a8cb-4757-9bbb-fbe7222e6943\",\"trace_id\":\"bcdb88d0-a641-43e4-85e8-b7dc4ab20a0e\"}\n[2026-04-14 10:05:26] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:start\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"27d73fea-a8cb-4757-9bbb-fbe7222e6943\",\"trace_id\":\"bcdb88d0-a641-43e4-85e8-b7dc4ab20a0e\"}\n[2026-04-14 10:05:28] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:end\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"588bae45-3998-4b86-b056-51aaf8b6882f\",\"trace_id\":\"8f716a65-7768-44c5-b0e4-02a859f329e5\"}\n[2026-04-14 10:05:28] local.INFO: conference:monitor:end:Jiminny\\Console\\Commands\\Activities\\MonitorMeetingEndCommand::logActivitiesEnded {\"from\":\"10:00\",\"to\":\"10:05\"} {\"correlation_id\":\"588bae45-3998-4b86-b056-51aaf8b6882f\",\"trace_id\":\"8f716a65-7768-44c5-b0e4-02a859f329e5\"}\n[2026-04-14 10:05:28] local.INFO: conference:monitor:end:Jiminny\\Console\\Commands\\Activities\\MonitorMeetingEndCommand::logActivitiesWithUnfinishedSession {\"from\":\"23:55\",\"to\":\"00:00\"} {\"correlation_id\":\"588bae45-3998-4b86-b056-51aaf8b6882f\",\"trace_id\":\"8f716a65-7768-44c5-b0e4-02a859f329e5\"}\n[2026-04-14 10:05:28] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:end\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"588bae45-3998-4b86-b056-51aaf8b6882f\",\"trace_id\":\"8f716a65-7768-44c5-b0e4-02a859f329e5\"}\n[2026-04-14 10:05:30] local.NOTICE: Repairing HubSpot tokens start {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:30] local.INFO: Trying to refresh HubSpot token {\"account_id\":59,\"updated_at\":\"2025-10-03 09:32:05\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:30] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:30] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":59,\"provider\":\"hubspot\",\"refreshToken\":\"97b78f6e2cc49965c00c2492b602b02708b1392551e6b3f113fbaa48992af90b\",\"state\":\"full-refresh\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:31] local.ERROR: Failed to refresh HubSpot token {\"account_id\":59,\"updated_at\":\"2025-10-03 09:32:05\",\"reason\":\"missing or invalid refresh token\",\"previous\":\"\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:31] local.INFO: Trying to refresh HubSpot token {\"account_id\":306,\"updated_at\":\"2023-11-27 09:30:03\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:31] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:31] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":306,\"provider\":\"hubspot\",\"refreshToken\":\"6fa6aa8cc641d131231acc3470f5c03cb3b07b2e580fb18f8acb3b1dbb72549b\",\"state\":\"full-refresh\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:31] local.ERROR: Failed to refresh HubSpot token {\"account_id\":306,\"updated_at\":\"2023-11-27 09:30:03\",\"reason\":\"missing or invalid refresh token\",\"previous\":\"\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:31] local.INFO: Trying to refresh HubSpot token {\"account_id\":1372,\"updated_at\":\"2025-10-02 14:47:06\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:31] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:31] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1372,\"provider\":\"hubspot\",\"refreshToken\":\"9aa73948c761da29dce46c177cf9aee1fde483a44169ca38723f9f0597d7a8c4\",\"state\":\"full-refresh\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:31] local.ERROR: Failed to refresh HubSpot token {\"account_id\":1372,\"updated_at\":\"2025-10-02 14:47:06\",\"reason\":\"missing or invalid refresh token\",\"previous\":\"\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:31] local.NOTICE: Repairing HubSpot tokens end {\"total\":3,\"fixed\":0,\"failed\":3} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:34] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:pre-meeting-reminder\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"2b2ca83a-1263-4a7c-a5d7-86dc15ea7aec\",\"trace_id\":\"fbf48d3d-4e50-4442-b14f-d2ae5e6e70bd\"}\n[2026-04-14 10:05:34] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"crm:bullhorn:ping\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"73b127c9-c033-4fa7-a8ed-2e28077ba970\",\"trace_id\":\"fd1cf3c5-d4ce-41d6-a19d-5e67fd544d9e\"}\n[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:34] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"crm:bullhorn:ping\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"73b127c9-c033-4fa7-a8ed-2e28077ba970\",\"trace_id\":\"fd1cf3c5-d4ce-41d6-a19d-5e67fd544d9e\"}\n[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Command] Starting polling service {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Polling] Service starting {\"memory_limit\":\"256M\",\"max_execution_time\":\"0\",\"initial_memory_mb\":62.0} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Polling] Acquired polling lock {\"expires_at\":\"2026-04-14T10:07:34.196472Z\"} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:34] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:34] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:pre-meeting-reminder\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"2b2ca83a-1263-4a7c-a5d7-86dc15ea7aec\",\"trace_id\":\"fbf48d3d-4e50-4442-b14f-d2ae5e6e70bd\"}\n[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:39] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:39] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:39] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:44] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:44] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:44] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:59] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:59] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:06:00] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:06:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"44f01bd8-2599-41a4-b7c3-8bb1fdf0df9a\",\"trace_id\":\"b4c87c8d-120d-48fb-b13c-aee84323f3e2\"}\n[2026-04-14 10:06:04] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"44f01bd8-2599-41a4-b7c3-8bb1fdf0df9a\",\"trace_id\":\"b4c87c8d-120d-48fb-b13c-aee84323f3e2\"}\n[2026-04-14 10:06:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"44f01bd8-2599-41a4-b7c3-8bb1fdf0df9a\",\"trace_id\":\"b4c87c8d-120d-48fb-b13c-aee84323f3e2\"}\n[2026-04-14 10:06:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"8403c1e4-b5b6-41f9-9280-ff666beed28b\",\"trace_id\":\"3f631f60-6d14-44f5-b6c3-b401999867f9\"}\n[2026-04-14 10:06:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"8403c1e4-b5b6-41f9-9280-ff666beed28b\",\"trace_id\":\"3f631f60-6d14-44f5-b6c3-b401999867f9\"}\n[2026-04-14 10:06:08] local.NOTICE: Monitoring start {\"correlation_id\":\"0d51eb08-f2f1-4322-97d0-268700856a99\",\"trace_id\":\"92b45b9a-b6e8-40c8-a783-193cf1a4eea2\"}\n[2026-04-14 10:06:08] local.NOTICE: Monitoring end {\"correlation_id\":\"0d51eb08-f2f1-4322-97d0-268700856a99\",\"trace_id\":\"92b45b9a-b6e8-40c8-a783-193cf1a4eea2\"}\n[2026-04-14 10:06:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"0566c59b-bf67-49eb-970a-a6b955ddd756\",\"trace_id\":\"724c5f5e-cd88-41fb-9b7e-74315e131024\"}\n[2026-04-14 10:06:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"0566c59b-bf67-49eb-970a-a6b955ddd756\",\"trace_id\":\"724c5f5e-cd88-41fb-9b7e-74315e131024\"}\n[2026-04-14 10:06:12] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"33d190d4-0abb-4e63-af52-95faa913e7a1\",\"trace_id\":\"703aaa4d-a551-4ed1-8a4a-609d373e2fc0\"}\n[2026-04-14 10:06:12] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"33d190d4-0abb-4e63-af52-95faa913e7a1\",\"trace_id\":\"703aaa4d-a551-4ed1-8a4a-609d373e2fc0\"}\n[2026-04-14 10:06:12] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":0} {\"correlation_id\":\"33d190d4-0abb-4e63-af52-95faa913e7a1\",\"trace_id\":\"703aaa4d-a551-4ed1-8a4a-609d373e2fc0\"}\n[2026-04-14 10:06:12] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"33d190d4-0abb-4e63-af52-95faa913e7a1\",\"trace_id\":\"703aaa4d-a551-4ed1-8a4a-609d373e2fc0\"}\n[2026-04-14 10:06:14] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"da41d77d-46d9-41ae-90b7-f8418b05fb9a\",\"trace_id\":\"47329a55-e6f4-406b-8730-e72d69737f09\"}\n[2026-04-14 10:06:14] local.INFO: Running conference:monitor:count command for activities in (2026-04-14 10:04:00, 2026-04-14 10:06:00] {\"correlation_id\":\"da41d77d-46d9-41ae-90b7-f8418b05fb9a\",\"trace_id\":\"47329a55-e6f4-406b-8730-e72d69737f09\"}\n[2026-04-14 10:06:14] local.INFO: [conference:monitor:count] No activities found in (2026-04-14 10:04:00, 2026-04-14 10:06:00] {\"correlation_id\":\"da41d77d-46d9-41ae-90b7-f8418b05fb9a\",\"trace_id\":\"47329a55-e6f4-406b-8730-e72d69737f09\"}\n[2026-04-14 10:06:14] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"da41d77d-46d9-41ae-90b7-f8418b05fb9a\",\"trace_id\":\"47329a55-e6f4-406b-8730-e72d69737f09\"}\n[2026-04-14 10:06:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"activity:notify-not-logged\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"310e7e99-6de4-4f93-967e-37c78e9ec826\",\"trace_id\":\"2a1fdf0a-be0e-4e5a-a677-fa16ddc33e9e\"}\n[2026-04-14 10:06:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"activity:notify-not-logged\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"310e7e99-6de4-4f93-967e-37c78e9ec826\",\"trace_id\":\"2a1fdf0a-be0e-4e5a-a677-fa16ddc33e9e\"}\n[2026-04-14 10:06:19] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"de8430ad-f242-4536-bebe-e165320b6b26\",\"trace_id\":\"75f83d2f-4e5e-4086-b062-7c1d24b5b74c\"}\n[2026-04-14 10:06:19] local.INFO: [EmailSchedule] STARTING Inbox Sync {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"de8430ad-f242-4536-bebe-e165320b6b26\",\"trace_id\":\"75f83d2f-4e5e-4086-b062-7c1d24b5b74c\"}\n[2026-04-14 10:06:19] local.INFO: [EmailSchedule] FINISHED Inbox Sync {\"host\":\"docker_lamp_1\",\"events\":1} {\"correlation_id\":\"de8430ad-f242-4536-bebe-e165320b6b26\",\"trace_id\":\"75f83d2f-4e5e-4086-b062-7c1d24b5b74c\"}\n[2026-04-14 10:06:19] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"de8430ad-f242-4536-bebe-e165320b6b26\",\"trace_id\":\"75f83d2f-4e5e-4086-b062-7c1d24b5b74c\"}\n[2026-04-14 10:06:22] local.INFO: [Sync Mailbox] Sync start {\"inbox_id\":59} {\"correlation_id\":\"eb46c86e-5c80-48b1-a4ee-ac425f197754\",\"trace_id\":\"75f83d2f-4e5e-4086-b062-7c1d24b5b74c\"}\n[2026-04-14 10:06:22] local.INFO: [Inbox service] Skipping METADATA SYNC for inbox 59 due to unauthorized access to the mailbox {\"correlation_id\":\"eb46c86e-5c80-48b1-a4ee-ac425f197754\",\"trace_id\":\"75f83d2f-4e5e-4086-b062-7c1d24b5b74c\"}\n[2026-04-14 10:06:22] local.INFO: [Sync Mailbox] Sync complete {\"inbox_id\":59} {\"correlation_id\":\"eb46c86e-5c80-48b1-a4ee-ac425f197754\",\"trace_id\":\"75f83d2f-4e5e-4086-b062-7c1d24b5b74c\"}\n[2026-04-14 10:06:30] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:06:30] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:06:30] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:06:30] local.WARNING: [HubSpot Journal Polling] Maximum empty results reached, stopping {\"empty_results\":5,\"max_empty_results\":5} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:06:30] local.WARNING: [HubSpot Journal Polling] Maximum empty results reached, stopping {\"empty_results\":5,\"max_empty_results\":5} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:06:30] local.INFO: [HubSpot Journal Polling] Service ending {\"runtime_seconds\":56,\"total_cycles\":5,\"files_downloaded\":0,\"empty_files\":0,\"other_portal_skipped\":0,\"total_events\":0,\"events_per_file\":0,\"avg_api_ms\":169.9,\"avg_download_ms\":0.0,\"avg_transform_ms\":0.0,\"avg_process_ms\":0.0,\"peak_memory_mb\":99.75} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:06:30] local.INFO: [HubSpot Journal Polling] Released polling lock {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:07:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"53329974-bdd6-4cd2-a022-0d565b0a5cf4\",\"trace_id\":\"08246763-f961-45fb-b262-51378bdbc955\"}\n[2026-04-14 10:07:04] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"53329974-bdd6-4cd2-a022-0d565b0a5cf4\",\"trace_id\":\"08246763-f961-45fb-b262-51378bdbc955\"}\n[2026-04-14 10:07:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"53329974-bdd6-4cd2-a022-0d565b0a5cf4\",\"trace_id\":\"08246763-f961-45fb-b262-51378bdbc955\"}\n[2026-04-14 10:07:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"2b6586f0-419e-4422-8800-e4b7619c43d6\",\"trace_id\":\"221c682d-c45f-4e4a-a793-ed11006dc6a1\"}\n[2026-04-14 10:07:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"2b6586f0-419e-4422-8800-e4b7619c43d6\",\"trace_id\":\"221c682d-c45f-4e4a-a793-ed11006dc6a1\"}\n[2026-04-14 10:07:08] local.NOTICE: Monitoring start {\"correlation_id\":\"9ba692ee-5286-41ca-abf0-86f6e1167a8e\",\"trace_id\":\"d58ab8ad-7737-4d7c-91c0-81733c21e709\"}\n[2026-04-14 10:07:08] local.NOTICE: Monitoring end {\"correlation_id\":\"9ba692ee-5286-41ca-abf0-86f6e1167a8e\",\"trace_id\":\"d58ab8ad-7737-4d7c-91c0-81733c21e709\"}\n[2026-04-14 10:07:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"28e708ed-74ee-4417-a8da-c1a9ae0cd745\",\"trace_id\":\"bd848201-9700-40bf-8fa4-9df13ae88f6e\"}\n[2026-04-14 10:07:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"28e708ed-74ee-4417-a8da-c1a9ae0cd745\",\"trace_id\":\"bd848201-9700-40bf-8fa4-9df13ae88f6e\"}\n[2026-04-14 10:07:12] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"95326c5a-7b17-475d-9245-634d15d51bfe\",\"trace_id\":\"31b36f9d-93cc-4917-bc7b-6b6a3da139e7\"}\n[2026-04-14 10:07:12] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"95326c5a-7b17-475d-9245-634d15d51bfe\",\"trace_id\":\"31b36f9d-93cc-4917-bc7b-6b6a3da139e7\"}\n[2026-04-14 10:07:12] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":0} {\"correlation_id\":\"95326c5a-7b17-475d-9245-634d15d51bfe\",\"trace_id\":\"31b36f9d-93cc-4917-bc7b-6b6a3da139e7\"}\n[2026-04-14 10:07:12] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"95326c5a-7b17-475d-9245-634d15d51bfe\",\"trace_id\":\"31b36f9d-93cc-4917-bc7b-6b6a3da139e7\"}\n[2026-04-14 10:07:14] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:create\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"f4f68165-0bcc-4e79-89e5-81f9c627e4dc\",\"trace_id\":\"5766aab2-0316-400f-aa89-168ea0579941\"}\n[2026-04-14 10:07:14] local.INFO: [EmailSchedule] STARTING batch create {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"f4f68165-0bcc-4e79-89e5-81f9c627e4dc\",\"trace_id\":\"5766aab2-0316-400f-aa89-168ea0579941\"}\n[2026-04-14 10:07:14] local.INFO: [EmailSchedule] FINISHED batch create {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"f4f68165-0bcc-4e79-89e5-81f9c627e4dc\",\"trace_id\":\"5766aab2-0316-400f-aa89-168ea0579941\"}\n[2026-04-14 10:07:14] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:create\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"f4f68165-0bcc-4e79-89e5-81f9c627e4dc\",\"trace_id\":\"5766aab2-0316-400f-aa89-168ea0579941\"}\n[2026-04-14 10:07:15] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"activity:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"a7d5580f-8b90-4ff6-91e8-de94514f8ca1\",\"trace_id\":\"fc40909d-86c1-4e45-bd51-96e2bd8c4556\"}\n[2026-04-14 10:07:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"activity:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"a7d5580f-8b90-4ff6-91e8-de94514f8ca1\",\"trace_id\":\"fc40909d-86c1-4e45-bd51-96e2bd8c4556\"}\n[2026-04-14 10:07:16] local.INFO: [Jiminny\\Jobs\\Mailbox\\CreateBatches] processed 0 inboxes and created 0 batches {\"userId\":null,\"batchSize\":30,\"maxBatches\":1000} {\"correlation_id\":\"df4d1442-bcd6-4b63-8513-802ae90993e6\",\"trace_id\":\"5766aab2-0316-400f-aa89-168ea0579941\"}\n[2026-04-14 10:08:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"43299ccb-af86-42b1-b793-4ede57e2b91d\",\"trace_id\":\"2f919b69-9d68-488c-89fa-2aade6ef8519\"}\n[2026-04-14 10:08:04] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"43299ccb-af86-42b1-b793-4ede57e2b91d\",\"trace_id\":\"2f919b69-9d68-488c-89fa-2aade6ef8519\"}\n[2026-04-14 10:08:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"43299ccb-af86-42b1-b793-4ede57e2b91d\",\"trace_id\":\"2f919b69-9d68-488c-89fa-2aade6ef8519\"}\n[2026-04-14 10:08:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"cde80757-333e-4268-a902-892c031b2373\",\"trace_id\":\"36e932e0-8362-432f-9e36-d819f902d49e\"}\n[2026-04-14 10:08:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"cde80757-333e-4268-a902-892c031b2373\",\"trace_id\":\"36e932e0-8362-432f-9e36-d819f902d49e\"}\n[2026-04-14 10:08:07] local.NOTICE: Monitoring start {\"correlation_id\":\"146390f8-e91a-4e5c-b282-0c83b4947101\",\"trace_id\":\"fb689e40-c867-4fc5-9847-c223835da80e\"}\n[2026-04-14 10:08:07] local.NOTICE: Monitoring end {\"correlation_id\":\"146390f8-e91a-4e5c-b282-0c83b4947101\",\"trace_id\":\"fb689e40-c867-4fc5-9847-c223835da80e\"}\n[2026-04-14 10:08:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"58e23da5-8f3f-4836-aac7-315ab32f74a3\",\"trace_id\":\"c71267c4-b5fe-42ad-9bcd-76f6299c1538\"}\n[2026-04-14 10:08:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"58e23da5-8f3f-4836-aac7-315ab32f74a3\",\"trace_id\":\"c71267c4-b5fe-42ad-9bcd-76f6299c1538\"}\n[2026-04-14 10:08:13] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"9158bb6f-c165-495a-9b6e-8077d8343c87\",\"trace_id\":\"df378af8-cacb-41ea-b030-b8f53144fddd\"}\n[2026-04-14 10:08:13] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"9158bb6f-c165-495a-9b6e-8077d8343c87\",\"trace_id\":\"df378af8-cacb-41ea-b030-b8f53144fddd\"}\n[2026-04-14 10:08:13] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":0} {\"correlation_id\":\"9158bb6f-c165-495a-9b6e-8077d8343c87\",\"trace_id\":\"df378af8-cacb-41ea-b030-b8f53144fddd\"}\n[2026-04-14 10:08:13] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"9158bb6f-c165-495a-9b6e-8077d8343c87\",\"trace_id\":\"df378af8-cacb-41ea-b030-b8f53144fddd\"}\n[2026-04-14 10:08:14] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"35774df7-e046-49ec-835f-45f9dc1ec025\",\"trace_id\":\"45c5e102-6b65-4d23-9edd-684ca996316c\"}\n[2026-04-14 10:08:14] local.INFO: Running conference:monitor:count command for activities in (2026-04-14 10:06:00, 2026-04-14 10:08:00] {\"correlation_id\":\"35774df7-e046-49ec-835f-45f9dc1ec025\",\"trace_id\":\"45c5e102-6b65-4d23-9edd-684ca996316c\"}\n[2026-04-14 10:08:14] local.INFO: [conference:monitor:count] No activities found in (2026-04-14 10:06:00, 2026-04-14 10:08:00] {\"correlation_id\":\"35774df7-e046-49ec-835f-45f9dc1ec025\",\"trace_id\":\"45c5e102-6b65-4d23-9edd-684ca996316c\"}\n[2026-04-14 10:08:14] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"35774df7-e046-49ec-835f-45f9dc1ec025\",\"trace_id\":\"45c5e102-6b65-4d23-9edd-684ca996316c\"}\n[2026-04-14 10:08:17] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:retry-failed\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"d4dc4b3b-8dc8-4665-aec7-139be0df2306\",\"trace_id\":\"853f2210-e804-40aa-a1d8-4457c60f4993\"}\n[2026-04-14 10:08:17] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:retry-failed\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"d4dc4b3b-8dc8-4665-aec7-139be0df2306\",\"trace_id\":\"853f2210-e804-40aa-a1d8-4457c60f4993\"}\n[2026-04-14 10:09:05] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"8052fb2f-5876-4e2c-8f64-c770d9fe37fe\",\"trace_id\":\"63249c19-bf59-4e52-9096-156d537a9786\"}\n[2026-04-14 10:09:05] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"8052fb2f-5876-4e2c-8f64-c770d9fe37fe\",\"trace_id\":\"63249c19-bf59-4e52-9096-156d537a9786\"}\n[2026-04-14 10:09:05] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"8052fb2f-5876-4e2c-8f64-c770d9fe37fe\",\"trace_id\":\"63249c19-bf59-4e52-9096-156d537a9786\"}\n[2026-04-14 10:09:07] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"1dd274b4-f71d-486e-b6c4-aaf106304102\",\"trace_id\":\"1d55139c-a58d-4456-801a-9bcb3bf9b024\"}\n[2026-04-14 10:09:07] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"1dd274b4-f71d-486e-b6c4-aaf106304102\",\"trace_id\":\"1d55139c-a58d-4456-801a-9bcb3bf9b024\"}\n[2026-04-14 10:09:10] local.NOTICE: Monitoring start {\"correlation_id\":\"09dc762e-2b78-4dbb-a880-5c8f1cbfc4ad\",\"trace_id\":\"8e60392d-4ea4-41f2-be2f-a01853c7a1ab\"}\n[2026-04-14 10:09:10] local.NOTICE: Monitoring end {\"correlation_id\":\"09dc762e-2b78-4dbb-a880-5c8f1cbfc4ad\",\"trace_id\":\"8e60392d-4ea4-41f2-be2f-a01853c7a1ab\"}\n[2026-04-14 10:09:13] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"2de9f84e-2691-459d-adfd-f5f6746501d0\",\"trace_id\":\"418ad958-86c0-4477-b0fb-e487768d6fa1\"}\n[2026-04-14 10:09:13] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"2de9f84e-2691-459d-adfd-f5f6746501d0\",\"trace_id\":\"418ad958-86c0-4477-b0fb-e487768d6fa1\"}\n[2026-04-14 10:09:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"1be8488c-ae59-4f42-8475-c426905c3ca6\",\"trace_id\":\"aeb8b412-635e-4929-915f-fb3fe5786eae\"}\n[2026-04-14 10:09:16] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"1be8488c-ae59-4f42-8475-c426905c3ca6\",\"trace_id\":\"aeb8b412-635e-4929-915f-fb3fe5786eae\"}\n[2026-04-14 10:09:16] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":0} {\"correlation_id\":\"1be8488c-ae59-4f42-8475-c426905c3ca6\",\"trace_id\":\"aeb8b412-635e-4929-915f-fb3fe5786eae\"}\n[2026-04-14 10:09:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"1be8488c-ae59-4f42-8475-c426905c3ca6\",\"trace_id\":\"aeb8b412-635e-4929-915f-fb3fe5786eae\"}\n[2026-04-14 10:09:18] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"activity:aircall:check-and-renew\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"b3d1b688-309f-4df0-9dcd-9a733c87f597\",\"trace_id\":\"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c\"}\n[2026-04-14 10:09:18] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1496,\"provider\":\"aircall\"} {\"correlation_id\":\"b3d1b688-309f-4df0-9dcd-9a733c87f597\",\"trace_id\":\"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c\"}\n[2026-04-14 10:09:18] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1496,\"provider\":\"aircall\"} {\"correlation_id\":\"b3d1b688-309f-4df0-9dcd-9a733c87f597\",\"trace_id\":\"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c\"}\n[2026-04-14 10:09:18] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b3d1b688-309f-4df0-9dcd-9a733c87f597\",\"trace_id\":\"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c\"}\n[2026-04-14 10:09:18] local.ERROR: [Aircall] Re-activating webhooks failed {\"team_id\":1,\"reason\":\"{\\\"message\\\":\\\"Forbidden\\\"}\"} {\"correlation_id\":\"b3d1b688-309f-4df0-9dcd-9a733c87f597\",\"trace_id\":\"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c\"}\n[2026-04-14 10:09:18] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"activity:aircall:check-and-renew\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"b3d1b688-309f-4df0-9dcd-9a733c87f597\",\"trace_id\":\"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c\"}\n[2026-04-14 10:09:21] local.INFO: [RetryFailedDownloads] Starting {\"options\":{\"from\":null,\"to\":null,\"help\":false,\"silent\":false,\"quiet\":false,\"verbose\":false,\"version\":false,\"ansi\":null,\"no-interaction\":false,\"env\":null}} {\"correlation_id\":\"c7aba065-c8f1-473d-b8b5-4797245873bf\",\"trace_id\":\"48f587f9-dd77-4634-9ad9-1137b029b5f5\"}\n[2026-04-14 10:10:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"7310aae5-3829-4d5c-bbc9-f6550a35f539\",\"trace_id\":\"6099cf10-45e2-4b82-9649-649e2f8a1209\"}\n[2026-04-14 10:10:04] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"7310aae5-3829-4d5c-bbc9-f6550a35f539\",\"trace_id\":\"6099cf10-45e2-4b82-9649-649e2f8a1209\"}\n[2026-04-14 10:10:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"7310aae5-3829-4d5c-bbc9-f6550a35f539\",\"trace_id\":\"6099cf10-45e2-4b82-9649-649e2f8a1209\"}\n[2026-04-14 10:10:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"5119d94e-0c61-4312-a740-2b569388cc9f\",\"trace_id\":\"6a412a32-3bc3-46a4-af7c-24ad560a4e41\"}\n[2026-04-14 10:10:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"5119d94e-0c61-4312-a740-2b569388cc9f\",\"trace_id\":\"6a412a32-3bc3-46a4-af7c-24ad560a4e41\"}\n[2026-04-14 10:10:08] local.NOTICE: Monitoring start {\"correlation_id\":\"95cdb3b7-b356-4325-be28-20663ece6aa0\",\"trace_id\":\"e64a75a4-2493-4f35-ba46-ccd002e6b7b7\"}\n[2026-04-14 10:10:08] local.NOTICE: Monitoring end {\"correlation_id\":\"95cdb3b7-b356-4325-be28-20663ece6aa0\",\"trace_id\":\"e64a75a4-2493-4f35-ba46-ccd002e6b7b7\"}\n[2026-04-14 10:10:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"6460dd5f-4b94-4cd1-867e-53304d785744\",\"trace_id\":\"683b103d-2dfc-4266-84a2-d5cd799b133f\"}\n[2026-04-14 10:10:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"6460dd5f-4b94-4cd1-867e-53304d785744\",\"trace_id\":\"683b103d-2dfc-4266-84a2-d5cd799b133f\"}\n[2026-04-14 10:10:11] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"5a59007d-2a12-4977-8a5a-59c678aa12ee\",\"trace_id\":\"bc3a2ad5-9f13-4728-adaa-529da75cf011\"}\n[2026-04-14 10:10:11] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"5a59007d-2a12-4977-8a5a-59c678aa12ee\",\"trace_id\":\"bc3a2ad5-9f13-4728-adaa-529da75cf011\"}\n[2026-04-14 10:10:11] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":0} {\"correlation_id\":\"5a59007d-2a12-4977-8a5a-59c678aa12ee\",\"trace_id\":\"bc3a2ad5-9f13-4728-adaa-529da75cf011\"}\n[2026-04-14 10:10:11] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"5a59007d-2a12-4977-8a5a-59c678aa12ee\",\"trace_id\":\"bc3a2ad5-9f13-4728-adaa-529da75cf011\"}\n[2026-04-14 10:10:14] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"afe2ff6b-1b9e-4485-bdad-a758d873a782\",\"trace_id\":\"d507becf-55d6-4fda-8831-e981f95b85c8\"}\n[2026-04-14 10:10:14] local.INFO: Running conference:monitor:count command for activities in (2026-04-14 10:08:00, 2026-04-14 10:10:00] {\"correlation_id\":\"afe2ff6b-1b9e-4485-bdad-a758d873a782\",\"trace_id\":\"d507becf-55d6-4fda-8831-e981f95b85c8\"}\n[2026-04-14 10:10:14] local.INFO: [conference:monitor:count] No activities found in (2026-04-14 10:08:00, 2026-04-14 10:10:00] {\"correlation_id\":\"afe2ff6b-1b9e-4485-bdad-a758d873a782\",\"trace_id\":\"d507becf-55d6-4fda-8831-e981f95b85c8\"}\n[2026-04-14 10:10:14] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"afe2ff6b-1b9e-4485-bdad-a758d873a782\",\"trace_id\":\"d507becf-55d6-4fda-8831-e981f95b85c8\"}\n[2026-04-14 10:10:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"activity:purge-stale\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"ebe2ad2b-df9a-48d7-b78f-d52b7489c6f0\",\"trace_id\":\"05b44216-d5ac-44cd-b74b-3e92567b192d\"}\n[2026-04-14 10:10:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"activity:purge-stale\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"ebe2ad2b-df9a-48d7-b78f-d52b7489c6f0\",\"trace_id\":\"05b44216-d5ac-44cd-b74b-3e92567b192d\"}\n[2026-04-14 10:10:18] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:text-relay:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"d76b00ee-6271-4df7-ba45-769738bbb7ae\",\"trace_id\":\"92384790-9588-452d-abea-cdd25a2fe7ff\"}\n[2026-04-14 10:10:18] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:text-relay:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"d76b00ee-6271-4df7-ba45-769738bbb7ae\",\"trace_id\":\"92384790-9588-452d-abea-cdd25a2fe7ff\"}\n[2026-04-14 10:10:20] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:pre-meeting-notification\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"c8f3b5c1-bef5-4584-b9d8-0c10578fefac\",\"trace_id\":\"b700f03d-b02b-495e-b505-1598c7a9ea4b\"}\n[2026-04-14 10:10:20] local.INFO: Running pre-meeting notification command {\"correlation_id\":\"c8f3b5c1-bef5-4584-b9d8-0c10578fefac\",\"trace_id\":\"b700f03d-b02b-495e-b505-1598c7a9ea4b\"}\n[2026-04-14 10:10:20] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:pre-meeting-notification\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"c8f3b5c1-bef5-4584-b9d8-0c10578fefac\",\"trace_id\":\"b700f03d-b02b-495e-b505-1598c7a9ea4b\"}\n[2026-04-14 10:10:22] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:start\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"d7b97fbb-00b9-47c2-ae81-dda03fd8b253\",\"trace_id\":\"54447306-49bf-4629-8de0-bb191c61cce2\"}\n[2026-04-14 10:10:22] local.INFO: Running conference:monitor:start command for activities in (2026-04-14 10:00:00, 2026-04-14 10:05:00] {\"correlation_id\":\"d7b97fbb-00b9-47c2-ae81-dda03fd8b253\",\"trace_id\":\"54447306-49bf-4629-8de0-bb191c61cce2\"}\n[2026-04-14 10:10:22] local.INFO: [conference:monitor:start] No activities found in (2026-04-14 10:00:00, 2026-04-14 10:05:00] {\"correlation_id\":\"d7b97fbb-00b9-47c2-ae81-dda03fd8b253\",\"trace_id\":\"54447306-49bf-4629-8de0-bb191c61cce2\"}\n[2026-04-14 10:10:22] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:start\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"d7b97fbb-00b9-47c2-ae81-dda03fd8b253\",\"trace_id\":\"54447306-49bf-4629-8de0-bb191c61cce2\"}\n[2026-04-14 10:10:23] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:end\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"07665538-664f-421e-af9b-97152a688b68\",\"trace_id\":\"d116813e-2d96-4a3d-ae04-6e53d69ca565\"}\n[2026-04-14 10:10:23] local.INFO: conference:monitor:end:Jiminny\\Console\\Commands\\Activities\\MonitorMeetingEndCommand::logActivitiesEnded {\"from\":\"10:05\",\"to\":\"10:10\"} {\"correlation_id\":\"07665538-664f-421e-af9b-97152a688b68\",\"trace_id\":\"d116813e-2d96-4a3d-ae04-6e53d69ca565\"}\n[2026-04-14 10:10:23] local.INFO: conference:monitor:end:Jiminny\\Console\\Commands\\Activities\\MonitorMeetingEndCommand::logActivitiesWithUnfinishedSession {\"from\":\"00:00\",\"to\":\"00:05\"} {\"correlation_id\":\"07665538-664f-421e-af9b-97152a688b68\",\"trace_id\":\"d116813e-2d96-4a3d-ae04-6e53d69ca565\"}\n[2026-04-14 10:10:23] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:end\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"07665538-664f-421e-af9b-97152a688b68\",\"trace_id\":\"d116813e-2d96-4a3d-ae04-6e53d69ca565\"}\n[2026-04-14 10:10:25] local.NOTICE: Repairing HubSpot tokens start {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:25] local.INFO: Trying to refresh HubSpot token {\"account_id\":59,\"updated_at\":\"2025-10-03 09:32:05\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:25] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:25] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":59,\"provider\":\"hubspot\",\"refreshToken\":\"97b78f6e2cc49965c00c2492b602b02708b1392551e6b3f113fbaa48992af90b\",\"state\":\"full-refresh\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:26] local.ERROR: Failed to refresh HubSpot token {\"account_id\":59,\"updated_at\":\"2025-10-03 09:32:05\",\"reason\":\"missing or invalid refresh token\",\"previous\":\"\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:26] local.INFO: Trying to refresh HubSpot token {\"account_id\":306,\"updated_at\":\"2023-11-27 09:30:03\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:26] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:26] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":306,\"provider\":\"hubspot\",\"refreshToken\":\"6fa6aa8cc641d131231acc3470f5c03cb3b07b2e580fb18f8acb3b1dbb72549b\",\"state\":\"full-refresh\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:26] local.ERROR: Failed to refresh HubSpot token {\"account_id\":306,\"updated_at\":\"2023-11-27 09:30:03\",\"reason\":\"missing or invalid refresh token\",\"previous\":\"\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:26] local.INFO: Trying to refresh HubSpot token {\"account_id\":1372,\"updated_at\":\"2025-10-02 14:47:06\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:26] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:26] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1372,\"provider\":\"hubspot\",\"refreshToken\":\"9aa73948c761da29dce46c177cf9aee1fde483a44169ca38723f9f0597d7a8c4\",\"state\":\"full-refresh\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:27] local.ERROR: Failed to refresh HubSpot token {\"account_id\":1372,\"updated_at\":\"2025-10-02 14:47:06\",\"reason\":\"missing or invalid refresh token\",\"previous\":\"\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:27] local.NOTICE: Repairing HubSpot tokens end {\"total\":3,\"fixed\":0,\"failed\":3} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:30] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:pre-meeting-reminder\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"cba13635-8dbf-4423-ad70-69f2d927c6ff\",\"trace_id\":\"cca585f7-e8b4-4cbd-b63f-8d9be90960a6\"}\n[2026-04-14 10:10:30] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"jiminny:transcription:retry-failed\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"8d29e53b-638b-4e55-8ee6-70567699b366\",\"trace_id\":\"ac17c380-0e7e-4425-bbc9-9e292ed99ea5\"}\n[2026-04-14 10:10:30] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"jiminny:transcription:retry-failed\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"8d29e53b-638b-4e55-8ee6-70567699b366\",\"trace_id\":\"ac17c380-0e7e-4425-bbc9-9e292ed99ea5\"}\n[2026-04-14 10:10:30] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:30] local.INFO: [HubSpot Journal Command] Starting polling service {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:30] local.INFO: [HubSpot Journal Polling] Service starting {\"memory_limit\":\"256M\",\"max_execution_time\":\"0\",\"initial_memory_mb\":62.0} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:30] local.INFO: [HubSpot Journal Polling] Acquired polling lock {\"expires_at\":\"2026-04-14T10:12:30.407181Z\"} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:30] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:30] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:30] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:pre-meeting-reminder\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"cba13635-8dbf-4423-ad70-69f2d927c6ff\",\"trace_id\":\"cca585f7-e8b4-4cbd-b63f-8d9be90960a6\"}\n[2026-04-14 10:10:30] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:32] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"crm:reset-governor\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"4943604a-02ac-42cd-82ee-524a684c9d07\",\"trace_id\":\"dea56e3f-9697-4054-8b54-7db752a8613f\"}\n[2026-04-14 10:10:32] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"crm:reset-governor\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"4943604a-02ac-42cd-82ee-524a684c9d07\",\"trace_id\":\"dea56e3f-9697-4054-8b54-7db752a8613f\"}\n[2026-04-14 10:10:34] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"crm:bullhorn:ping\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"7ae1dc8e-0ce6-461b-a054-be59c56de0b5\",\"trace_id\":\"8892af7b-37c9-4892-82fd-aa4596edc512\"}\n[2026-04-14 10:10:34] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"crm:bullhorn:ping\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"7ae1dc8e-0ce6-461b-a054-be59c56de0b5\",\"trace_id\":\"8892af7b-37c9-4892-82fd-aa4596edc512\"}\n[2026-04-14 10:10:35] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:35] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:35] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:40] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:40] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:41] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:56] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:56] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:56] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:11:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"79c8dc9b-058f-4f0e-9e9a-2e34a66209a7\",\"trace_id\":\"c6894787-c096-4c96-96cf-8ed81e40aa59\"}\n[2026-04-14 10:11:04] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"79c8dc9b-058f-4f0e-9e9a-2e34a66209a7\",\"trace_id\":\"c6894787-c096-4c96-96cf-8ed81e40aa59\"}\n[2026-04-14 10:11:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"79c8dc9b-058f-4f0e-9e9a-2e34a66209a7\",\"trace_id\":\"c6894787-c096-4c96-96cf-8ed81e40aa59\"}\n[2026-04-14 10:11:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"d52d55c7-74a3-409b-b458-fecfd8990f5a\",\"trace_id\":\"407ded8c-1b50-4ba7-8190-f3e84814124e\"}\n[2026-04-14 10:11:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"d52d55c7-74a3-409b-b458-fecfd8990f5a\",\"trace_id\":\"407ded8c-1b50-4ba7-8190-f3e84814124e\"}\n[2026-04-14 10:11:08] local.NOTICE: Monitoring start {\"correlation_id\":\"296fc7a0-329d-43bf-8c98-547c407c447c\",\"trace_id\":\"d2bbc8a9-18cb-408f-98a9-f87d6a2e4cb9\"}\n[2026-04-14 10:11:08] local.NOTICE: Monitoring end {\"correlation_id\":\"296fc7a0-329d-43bf-8c98-547c407c447c\",\"trace_id\":\"d2bbc8a9-18cb-408f-98a9-f87d6a2e4cb9\"}\n[2026-04-14 10:11:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"4aaf62d1-0d46-4f16-af0e-0617eb460382\",\"trace_id\":\"7bcc5249-9d16-44e5-a83c-3a613e00c860\"}\n[2026-04-14 10:11:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"4aaf62d1-0d46-4f16-af0e-0617eb460382\",\"trace_id\":\"7bcc5249-9d16-44e5-a83c-3a613e00c860\"}\n[2026-04-14 10:11:11] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"19290448-0263-4849-93fc-f09885da0c1f\",\"trace_id\":\"1483761c-464c-4374-994f-121758fcd534\"}\n[2026-04-14 10:11:12] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"19290448-0263-4849-93fc-f09885da0c1f\",\"trace_id\":\"1483761c-464c-4374-994f-121758fcd534\"}\n[2026-04-14 10:11:12] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":0} {\"correlation_id\":\"19290448-0263-4849-93fc-f09885da0c1f\",\"trace_id\":\"1483761c-464c-4374-994f-121758fcd534\"}\n[2026-04-14 10:11:12] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"19290448-0263-4849-93fc-f09885da0c1f\",\"trace_id\":\"1483761c-464c-4374-994f-121758fcd534\"}\n[2026-04-14 10:11:26] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:11:26] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:11:26] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:11:26] local.WARNING: [HubSpot Journal Polling] Maximum empty results reached, stopping {\"empty_results\":5,\"max_empty_results\":5} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:11:26] local.WARNING: [HubSpot Journal Polling] Maximum empty results reached, stopping {\"empty_results\":5,\"max_empty_results\":5} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:11:26] local.INFO: [HubSpot Journal Polling] Service ending {\"runtime_seconds\":56,\"total_cycles\":5,\"files_downloaded\":0,\"empty_files\":0,\"other_portal_skipped\":0,\"total_events\":0,\"events_per_file\":0,\"avg_api_ms\":252.2,\"avg_download_ms\":0.0,\"avg_transform_ms\":0.0,\"avg_process_ms\":0.0,\"peak_memory_mb\":99.75} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:11:26] local.INFO: [HubSpot Journal Polling] Released polling lock {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:12:07] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"74ad5a14-81b2-48f4-bb37-2d2ac73c5059\",\"trace_id\":\"6d6d809e-3d77-400c-a351-ac4db72cf3fc\"}\n[2026-04-14 10:12:07] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"74ad5a14-81b2-48f4-bb37-2d2ac73c5059\",\"trace_id\":\"6d6d809e-3d77-400c-a351-ac4db72cf3fc\"}\n[2026-04-14 10:12:07] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"74ad5a14-81b2-48f4-bb37-2d2ac73c5059\",\"trace_id\":\"6d6d809e-3d77-400c-a351-ac4db72cf3fc\"}\n[2026-04-14 10:12:09] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"3671d2e5-29f6-43db-8f1a-4a0bf5ff669b\",\"trace_id\":\"1295351d-9c37-47db-bad6-dbccb4c6466f\"}\n[2026-04-14 10:12:09] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"3671d2e5-29f6-43db-8f1a-4a0bf5ff669b\",\"trace_id\":\"1295351d-9c37-47db-bad6-dbccb4c6466f\"}\n[2026-04-14 10:12:11] local.NOTICE: Monitoring start {\"correlation_id\":\"f2d467c8-e822-4691-9920-cac071f14877\",\"trace_id\":\"4d67db65-374a-4eb2-9cc6-8c60dc9ebabc\"}\n[2026-04-14 10:12:11] local.NOTICE: Monitoring end {\"correlation_id\":\"f2d467c8-e822-4691-9920-cac071f14877\",\"trace_id\":\"4d67db65-374a-4eb2-9cc6-8c60dc9ebabc\"}\n[2026-04-14 10:12:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"04d8a469-317c-40e1-a163-ad747408f9e3\",\"trace_id\":\"bafa4d05-7e55-4524-b0a5-1764ecb964fe\"}\n[2026-04-14 10:12:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"04d8a469-317c-40e1-a163-ad747408f9e3\",\"trace_id\":\"bafa4d05-7e55-4524-b0a5-1764ecb964fe\"}\n[2026-04-14 10:12:20] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"3cd3a658-bd65-4253-9c8d-b94cdd2f3c4d\",\"trace_id\":\"5ae25493-7098-481f-84f4-225c6595b140\"}\n[2026-04-14 10:12:20] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"3cd3a658-bd65-4253-9c8d-b94cdd2f3c4d\",\"trace_id\":\"5ae25493-7098-481f-84f4-225c6595b140\"}\n[2026-04-14 10:12:20] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":0} {\"correlation_id\":\"3cd3a658-bd65-4253-9c8d-b94cdd2f3c4d\",\"trace_id\":\"5ae25493-7098-481f-84f4-225c6595b140\"}\n[2026-04-14 10:12:20] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"3cd3a658-bd65-4253-9c8d-b94cdd2f3c4d\",\"trace_id\":\"5ae25493-7098-481f-84f4-225c6595b140\"}\n[2026-04-14 10:12:22] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"4cabe4c8-81a7-4405-958c-783cc42dc31a\",\"trace_id\":\"844b27d2-1727-4f1a-bb9a-a3ad44d9d37a\"}\n[2026-04-14 10:12:22] local.INFO: Running conference:monitor:count command for activities in (2026-04-14 10:10:00, 2026-04-14 10:12:00] {\"correlation_id\":\"4cabe4c8-81a7-4405-958c-783cc42dc31a\",\"trace_id\":\"844b27d2-1727-4f1a-bb9a-a3ad44d9d37a\"}\n[2026-04-14 10:12:22] local.INFO: [conference:monitor:count] No activities found in (2026-04-14 10:10:00, 2026-04-14 10:12:00] {\"correlation_id\":\"4cabe4c8-81a7-4405-958c-783cc42dc31a\",\"trace_id\":\"844b27d2-1727-4f1a-bb9a-a3ad44d9d37a\"}\n[2026-04-14 10:12:22] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"4cabe4c8-81a7-4405-958c-783cc42dc31a\",\"trace_id\":\"844b27d2-1727-4f1a-bb9a-a3ad44d9d37a\"}\n[2026-04-14 10:12:25] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:create\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"b573f9e3-5771-4b03-9fd9-1ff7d571916d\",\"trace_id\":\"e76af6ed-1fff-4aef-8b17-a8288121b37a\"}\n[2026-04-14 10:12:25] local.INFO: [EmailSchedule] STARTING batch create {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"b573f9e3-5771-4b03-9fd9-1ff7d571916d\",\"trace_id\":\"e76af6ed-1fff-4aef-8b17-a8288121b37a\"}\n[2026-04-14 10:12:25] local.INFO: [EmailSchedule] FINISHED batch create {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"b573f9e3-5771-4b03-9fd9-1ff7d571916d\",\"trace_id\":\"e76af6ed-1fff-4aef-8b17-a8288121b37a\"}\n[2026-04-14 10:12:25] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:create\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"b573f9e3-5771-4b03-9fd9-1ff7d571916d\",\"trace_id\":\"e76af6ed-1fff-4aef-8b17-a8288121b37a\"}\n[2026-04-14 10:12:27] local.INFO: [Jiminny\\Jobs\\Mailbox\\CreateBatches] processed 0 inboxes and created 0 batches {\"userId\":null,\"batchSize\":30,\"maxBatches\":1000} {\"correlation_id\":\"ad382f07-8ff8-450f-b38c-fba577285d06\",\"trace_id\":\"e76af6ed-1fff-4aef-8b17-a8288121b37a\"}\n[2026-04-14 10:13:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"24a30c58-6ce4-427b-972e-87df2b1f0d31\",\"trace_id\":\"30809930-a6a8-49bb-9c61-f4dcca23683a\"}\n[2026-04-14 10:13:04] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"24a30c58-6ce4-427b-972e-87df2b1f0d31\",\"trace_id\":\"30809930-a6a8-49bb-9c61-f4dcca23683a\"}\n[2026-04-14 10:13:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"24a30c58-6ce4-427b-972e-87df2b1f0d31\",\"trace_id\":\"30809930-a6a8-49bb-9c61-f4dcca23683a\"}\n[2026-04-14 10:13:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"db368cd5-b4ea-4f77-8169-24ff5403199d\",\"trace_id\":\"0bd7332d-c4c1-44b6-b204-e68b8ec6217a\"}\n[2026-04-14 10:13:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"db368cd5-b4ea-4f77-8169-24ff5403199d\",\"trace_id\":\"0bd7332d-c4c1-44b6-b204-e68b8ec6217a\"}\n[2026-04-14 10:13:08] local.NOTICE: Monitoring start {\"correlation_id\":\"98628e85-9d56-4088-8ddb-5a33768305d6\",\"trace_id\":\"138288e6-6342-4250-9c1e-46921c407423\"}\n[2026-04-14 10:13:08] local.NOTICE: Monitoring end {\"correlation_id\":\"98628e85-9d56-4088-8ddb-5a33768305d6\",\"trace_id\":\"138288e6-6342-4250-9c1e-46921c407423\"}","depth":4,"bounds":{"left":0.3859375,"top":0.14930555,"width":0.6140625,"height":0.8506944},"value":"[2026-04-14 10:05:19] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:text-relay:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"9756bfa7-c8e1-4b17-bc55-9f224d2af2e3\",\"trace_id\":\"9e5fa115-9cf5-45d6-a1da-109e154cfae7\"}\n[2026-04-14 10:05:19] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:text-relay:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"9756bfa7-c8e1-4b17-bc55-9f224d2af2e3\",\"trace_id\":\"9e5fa115-9cf5-45d6-a1da-109e154cfae7\"}\n[2026-04-14 10:05:23] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:pre-meeting-notification\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"d9d68876-323b-42bd-9953-635da8008f2e\",\"trace_id\":\"6c00ce4c-f2df-4ccb-908d-4862de973096\"}\n[2026-04-14 10:05:23] local.INFO: Running pre-meeting notification command {\"correlation_id\":\"d9d68876-323b-42bd-9953-635da8008f2e\",\"trace_id\":\"6c00ce4c-f2df-4ccb-908d-4862de973096\"}\n[2026-04-14 10:05:23] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:pre-meeting-notification\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"d9d68876-323b-42bd-9953-635da8008f2e\",\"trace_id\":\"6c00ce4c-f2df-4ccb-908d-4862de973096\"}\n[2026-04-14 10:05:26] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:start\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"27d73fea-a8cb-4757-9bbb-fbe7222e6943\",\"trace_id\":\"bcdb88d0-a641-43e4-85e8-b7dc4ab20a0e\"}\n[2026-04-14 10:05:26] local.INFO: Running conference:monitor:start command for activities in (2026-04-14 09:55:00, 2026-04-14 10:00:00] {\"correlation_id\":\"27d73fea-a8cb-4757-9bbb-fbe7222e6943\",\"trace_id\":\"bcdb88d0-a641-43e4-85e8-b7dc4ab20a0e\"}\n[2026-04-14 10:05:26] local.INFO: [conference:monitor:start] start ok {\"activity_id\":407307} {\"correlation_id\":\"27d73fea-a8cb-4757-9bbb-fbe7222e6943\",\"trace_id\":\"bcdb88d0-a641-43e4-85e8-b7dc4ab20a0e\"}\n[2026-04-14 10:05:26] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:start\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"27d73fea-a8cb-4757-9bbb-fbe7222e6943\",\"trace_id\":\"bcdb88d0-a641-43e4-85e8-b7dc4ab20a0e\"}\n[2026-04-14 10:05:28] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:end\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"588bae45-3998-4b86-b056-51aaf8b6882f\",\"trace_id\":\"8f716a65-7768-44c5-b0e4-02a859f329e5\"}\n[2026-04-14 10:05:28] local.INFO: conference:monitor:end:Jiminny\\Console\\Commands\\Activities\\MonitorMeetingEndCommand::logActivitiesEnded {\"from\":\"10:00\",\"to\":\"10:05\"} {\"correlation_id\":\"588bae45-3998-4b86-b056-51aaf8b6882f\",\"trace_id\":\"8f716a65-7768-44c5-b0e4-02a859f329e5\"}\n[2026-04-14 10:05:28] local.INFO: conference:monitor:end:Jiminny\\Console\\Commands\\Activities\\MonitorMeetingEndCommand::logActivitiesWithUnfinishedSession {\"from\":\"23:55\",\"to\":\"00:00\"} {\"correlation_id\":\"588bae45-3998-4b86-b056-51aaf8b6882f\",\"trace_id\":\"8f716a65-7768-44c5-b0e4-02a859f329e5\"}\n[2026-04-14 10:05:28] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:end\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"588bae45-3998-4b86-b056-51aaf8b6882f\",\"trace_id\":\"8f716a65-7768-44c5-b0e4-02a859f329e5\"}\n[2026-04-14 10:05:30] local.NOTICE: Repairing HubSpot tokens start {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:30] local.INFO: Trying to refresh HubSpot token {\"account_id\":59,\"updated_at\":\"2025-10-03 09:32:05\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:30] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:30] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":59,\"provider\":\"hubspot\",\"refreshToken\":\"97b78f6e2cc49965c00c2492b602b02708b1392551e6b3f113fbaa48992af90b\",\"state\":\"full-refresh\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:31] local.ERROR: Failed to refresh HubSpot token {\"account_id\":59,\"updated_at\":\"2025-10-03 09:32:05\",\"reason\":\"missing or invalid refresh token\",\"previous\":\"\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:31] local.INFO: Trying to refresh HubSpot token {\"account_id\":306,\"updated_at\":\"2023-11-27 09:30:03\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:31] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:31] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":306,\"provider\":\"hubspot\",\"refreshToken\":\"6fa6aa8cc641d131231acc3470f5c03cb3b07b2e580fb18f8acb3b1dbb72549b\",\"state\":\"full-refresh\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:31] local.ERROR: Failed to refresh HubSpot token {\"account_id\":306,\"updated_at\":\"2023-11-27 09:30:03\",\"reason\":\"missing or invalid refresh token\",\"previous\":\"\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:31] local.INFO: Trying to refresh HubSpot token {\"account_id\":1372,\"updated_at\":\"2025-10-02 14:47:06\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:31] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:31] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1372,\"provider\":\"hubspot\",\"refreshToken\":\"9aa73948c761da29dce46c177cf9aee1fde483a44169ca38723f9f0597d7a8c4\",\"state\":\"full-refresh\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:31] local.ERROR: Failed to refresh HubSpot token {\"account_id\":1372,\"updated_at\":\"2025-10-02 14:47:06\",\"reason\":\"missing or invalid refresh token\",\"previous\":\"\"} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:31] local.NOTICE: Repairing HubSpot tokens end {\"total\":3,\"fixed\":0,\"failed\":3} {\"correlation_id\":\"da835e46-68f6-4d4c-bf42-aa41de2e599d\",\"trace_id\":\"7d96dad0-2325-4190-bff6-a2d83f01c4e1\"}\n[2026-04-14 10:05:34] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:pre-meeting-reminder\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"2b2ca83a-1263-4a7c-a5d7-86dc15ea7aec\",\"trace_id\":\"fbf48d3d-4e50-4442-b14f-d2ae5e6e70bd\"}\n[2026-04-14 10:05:34] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"crm:bullhorn:ping\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"73b127c9-c033-4fa7-a8ed-2e28077ba970\",\"trace_id\":\"fd1cf3c5-d4ce-41d6-a19d-5e67fd544d9e\"}\n[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:34] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"crm:bullhorn:ping\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"73b127c9-c033-4fa7-a8ed-2e28077ba970\",\"trace_id\":\"fd1cf3c5-d4ce-41d6-a19d-5e67fd544d9e\"}\n[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Command] Starting polling service {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Polling] Service starting {\"memory_limit\":\"256M\",\"max_execution_time\":\"0\",\"initial_memory_mb\":62.0} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Polling] Acquired polling lock {\"expires_at\":\"2026-04-14T10:07:34.196472Z\"} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:34] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:34] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:pre-meeting-reminder\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"2b2ca83a-1263-4a7c-a5d7-86dc15ea7aec\",\"trace_id\":\"fbf48d3d-4e50-4442-b14f-d2ae5e6e70bd\"}\n[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:39] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:39] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:39] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:44] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:44] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:44] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:59] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:05:59] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:06:00] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:06:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"44f01bd8-2599-41a4-b7c3-8bb1fdf0df9a\",\"trace_id\":\"b4c87c8d-120d-48fb-b13c-aee84323f3e2\"}\n[2026-04-14 10:06:04] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"44f01bd8-2599-41a4-b7c3-8bb1fdf0df9a\",\"trace_id\":\"b4c87c8d-120d-48fb-b13c-aee84323f3e2\"}\n[2026-04-14 10:06:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"44f01bd8-2599-41a4-b7c3-8bb1fdf0df9a\",\"trace_id\":\"b4c87c8d-120d-48fb-b13c-aee84323f3e2\"}\n[2026-04-14 10:06:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"8403c1e4-b5b6-41f9-9280-ff666beed28b\",\"trace_id\":\"3f631f60-6d14-44f5-b6c3-b401999867f9\"}\n[2026-04-14 10:06:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"8403c1e4-b5b6-41f9-9280-ff666beed28b\",\"trace_id\":\"3f631f60-6d14-44f5-b6c3-b401999867f9\"}\n[2026-04-14 10:06:08] local.NOTICE: Monitoring start {\"correlation_id\":\"0d51eb08-f2f1-4322-97d0-268700856a99\",\"trace_id\":\"92b45b9a-b6e8-40c8-a783-193cf1a4eea2\"}\n[2026-04-14 10:06:08] local.NOTICE: Monitoring end {\"correlation_id\":\"0d51eb08-f2f1-4322-97d0-268700856a99\",\"trace_id\":\"92b45b9a-b6e8-40c8-a783-193cf1a4eea2\"}\n[2026-04-14 10:06:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"0566c59b-bf67-49eb-970a-a6b955ddd756\",\"trace_id\":\"724c5f5e-cd88-41fb-9b7e-74315e131024\"}\n[2026-04-14 10:06:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"0566c59b-bf67-49eb-970a-a6b955ddd756\",\"trace_id\":\"724c5f5e-cd88-41fb-9b7e-74315e131024\"}\n[2026-04-14 10:06:12] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"33d190d4-0abb-4e63-af52-95faa913e7a1\",\"trace_id\":\"703aaa4d-a551-4ed1-8a4a-609d373e2fc0\"}\n[2026-04-14 10:06:12] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"33d190d4-0abb-4e63-af52-95faa913e7a1\",\"trace_id\":\"703aaa4d-a551-4ed1-8a4a-609d373e2fc0\"}\n[2026-04-14 10:06:12] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":0} {\"correlation_id\":\"33d190d4-0abb-4e63-af52-95faa913e7a1\",\"trace_id\":\"703aaa4d-a551-4ed1-8a4a-609d373e2fc0\"}\n[2026-04-14 10:06:12] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"33d190d4-0abb-4e63-af52-95faa913e7a1\",\"trace_id\":\"703aaa4d-a551-4ed1-8a4a-609d373e2fc0\"}\n[2026-04-14 10:06:14] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"da41d77d-46d9-41ae-90b7-f8418b05fb9a\",\"trace_id\":\"47329a55-e6f4-406b-8730-e72d69737f09\"}\n[2026-04-14 10:06:14] local.INFO: Running conference:monitor:count command for activities in (2026-04-14 10:04:00, 2026-04-14 10:06:00] {\"correlation_id\":\"da41d77d-46d9-41ae-90b7-f8418b05fb9a\",\"trace_id\":\"47329a55-e6f4-406b-8730-e72d69737f09\"}\n[2026-04-14 10:06:14] local.INFO: [conference:monitor:count] No activities found in (2026-04-14 10:04:00, 2026-04-14 10:06:00] {\"correlation_id\":\"da41d77d-46d9-41ae-90b7-f8418b05fb9a\",\"trace_id\":\"47329a55-e6f4-406b-8730-e72d69737f09\"}\n[2026-04-14 10:06:14] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"da41d77d-46d9-41ae-90b7-f8418b05fb9a\",\"trace_id\":\"47329a55-e6f4-406b-8730-e72d69737f09\"}\n[2026-04-14 10:06:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"activity:notify-not-logged\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"310e7e99-6de4-4f93-967e-37c78e9ec826\",\"trace_id\":\"2a1fdf0a-be0e-4e5a-a677-fa16ddc33e9e\"}\n[2026-04-14 10:06:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"activity:notify-not-logged\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"310e7e99-6de4-4f93-967e-37c78e9ec826\",\"trace_id\":\"2a1fdf0a-be0e-4e5a-a677-fa16ddc33e9e\"}\n[2026-04-14 10:06:19] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"de8430ad-f242-4536-bebe-e165320b6b26\",\"trace_id\":\"75f83d2f-4e5e-4086-b062-7c1d24b5b74c\"}\n[2026-04-14 10:06:19] local.INFO: [EmailSchedule] STARTING Inbox Sync {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"de8430ad-f242-4536-bebe-e165320b6b26\",\"trace_id\":\"75f83d2f-4e5e-4086-b062-7c1d24b5b74c\"}\n[2026-04-14 10:06:19] local.INFO: [EmailSchedule] FINISHED Inbox Sync {\"host\":\"docker_lamp_1\",\"events\":1} {\"correlation_id\":\"de8430ad-f242-4536-bebe-e165320b6b26\",\"trace_id\":\"75f83d2f-4e5e-4086-b062-7c1d24b5b74c\"}\n[2026-04-14 10:06:19] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"de8430ad-f242-4536-bebe-e165320b6b26\",\"trace_id\":\"75f83d2f-4e5e-4086-b062-7c1d24b5b74c\"}\n[2026-04-14 10:06:22] local.INFO: [Sync Mailbox] Sync start {\"inbox_id\":59} {\"correlation_id\":\"eb46c86e-5c80-48b1-a4ee-ac425f197754\",\"trace_id\":\"75f83d2f-4e5e-4086-b062-7c1d24b5b74c\"}\n[2026-04-14 10:06:22] local.INFO: [Inbox service] Skipping METADATA SYNC for inbox 59 due to unauthorized access to the mailbox {\"correlation_id\":\"eb46c86e-5c80-48b1-a4ee-ac425f197754\",\"trace_id\":\"75f83d2f-4e5e-4086-b062-7c1d24b5b74c\"}\n[2026-04-14 10:06:22] local.INFO: [Sync Mailbox] Sync complete {\"inbox_id\":59} {\"correlation_id\":\"eb46c86e-5c80-48b1-a4ee-ac425f197754\",\"trace_id\":\"75f83d2f-4e5e-4086-b062-7c1d24b5b74c\"}\n[2026-04-14 10:06:30] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:06:30] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:06:30] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:06:30] local.WARNING: [HubSpot Journal Polling] Maximum empty results reached, stopping {\"empty_results\":5,\"max_empty_results\":5} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:06:30] local.WARNING: [HubSpot Journal Polling] Maximum empty results reached, stopping {\"empty_results\":5,\"max_empty_results\":5} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:06:30] local.INFO: [HubSpot Journal Polling] Service ending {\"runtime_seconds\":56,\"total_cycles\":5,\"files_downloaded\":0,\"empty_files\":0,\"other_portal_skipped\":0,\"total_events\":0,\"events_per_file\":0,\"avg_api_ms\":169.9,\"avg_download_ms\":0.0,\"avg_transform_ms\":0.0,\"avg_process_ms\":0.0,\"peak_memory_mb\":99.75} {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:06:30] local.INFO: [HubSpot Journal Polling] Released polling lock {\"correlation_id\":\"8dfaefe8-60b1-4846-bfa3-eb703c71deb8\",\"trace_id\":\"186e2ff6-96dc-4ae6-a31b-0c3849678f7b\"}\n[2026-04-14 10:07:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"53329974-bdd6-4cd2-a022-0d565b0a5cf4\",\"trace_id\":\"08246763-f961-45fb-b262-51378bdbc955\"}\n[2026-04-14 10:07:04] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"53329974-bdd6-4cd2-a022-0d565b0a5cf4\",\"trace_id\":\"08246763-f961-45fb-b262-51378bdbc955\"}\n[2026-04-14 10:07:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"53329974-bdd6-4cd2-a022-0d565b0a5cf4\",\"trace_id\":\"08246763-f961-45fb-b262-51378bdbc955\"}\n[2026-04-14 10:07:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"2b6586f0-419e-4422-8800-e4b7619c43d6\",\"trace_id\":\"221c682d-c45f-4e4a-a793-ed11006dc6a1\"}\n[2026-04-14 10:07:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"2b6586f0-419e-4422-8800-e4b7619c43d6\",\"trace_id\":\"221c682d-c45f-4e4a-a793-ed11006dc6a1\"}\n[2026-04-14 10:07:08] local.NOTICE: Monitoring start {\"correlation_id\":\"9ba692ee-5286-41ca-abf0-86f6e1167a8e\",\"trace_id\":\"d58ab8ad-7737-4d7c-91c0-81733c21e709\"}\n[2026-04-14 10:07:08] local.NOTICE: Monitoring end {\"correlation_id\":\"9ba692ee-5286-41ca-abf0-86f6e1167a8e\",\"trace_id\":\"d58ab8ad-7737-4d7c-91c0-81733c21e709\"}\n[2026-04-14 10:07:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"28e708ed-74ee-4417-a8da-c1a9ae0cd745\",\"trace_id\":\"bd848201-9700-40bf-8fa4-9df13ae88f6e\"}\n[2026-04-14 10:07:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"28e708ed-74ee-4417-a8da-c1a9ae0cd745\",\"trace_id\":\"bd848201-9700-40bf-8fa4-9df13ae88f6e\"}\n[2026-04-14 10:07:12] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"95326c5a-7b17-475d-9245-634d15d51bfe\",\"trace_id\":\"31b36f9d-93cc-4917-bc7b-6b6a3da139e7\"}\n[2026-04-14 10:07:12] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"95326c5a-7b17-475d-9245-634d15d51bfe\",\"trace_id\":\"31b36f9d-93cc-4917-bc7b-6b6a3da139e7\"}\n[2026-04-14 10:07:12] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":0} {\"correlation_id\":\"95326c5a-7b17-475d-9245-634d15d51bfe\",\"trace_id\":\"31b36f9d-93cc-4917-bc7b-6b6a3da139e7\"}\n[2026-04-14 10:07:12] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"95326c5a-7b17-475d-9245-634d15d51bfe\",\"trace_id\":\"31b36f9d-93cc-4917-bc7b-6b6a3da139e7\"}\n[2026-04-14 10:07:14] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:create\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"f4f68165-0bcc-4e79-89e5-81f9c627e4dc\",\"trace_id\":\"5766aab2-0316-400f-aa89-168ea0579941\"}\n[2026-04-14 10:07:14] local.INFO: [EmailSchedule] STARTING batch create {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"f4f68165-0bcc-4e79-89e5-81f9c627e4dc\",\"trace_id\":\"5766aab2-0316-400f-aa89-168ea0579941\"}\n[2026-04-14 10:07:14] local.INFO: [EmailSchedule] FINISHED batch create {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"f4f68165-0bcc-4e79-89e5-81f9c627e4dc\",\"trace_id\":\"5766aab2-0316-400f-aa89-168ea0579941\"}\n[2026-04-14 10:07:14] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:create\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"f4f68165-0bcc-4e79-89e5-81f9c627e4dc\",\"trace_id\":\"5766aab2-0316-400f-aa89-168ea0579941\"}\n[2026-04-14 10:07:15] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"activity:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"a7d5580f-8b90-4ff6-91e8-de94514f8ca1\",\"trace_id\":\"fc40909d-86c1-4e45-bd51-96e2bd8c4556\"}\n[2026-04-14 10:07:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"activity:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"a7d5580f-8b90-4ff6-91e8-de94514f8ca1\",\"trace_id\":\"fc40909d-86c1-4e45-bd51-96e2bd8c4556\"}\n[2026-04-14 10:07:16] local.INFO: [Jiminny\\Jobs\\Mailbox\\CreateBatches] processed 0 inboxes and created 0 batches {\"userId\":null,\"batchSize\":30,\"maxBatches\":1000} {\"correlation_id\":\"df4d1442-bcd6-4b63-8513-802ae90993e6\",\"trace_id\":\"5766aab2-0316-400f-aa89-168ea0579941\"}\n[2026-04-14 10:08:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"43299ccb-af86-42b1-b793-4ede57e2b91d\",\"trace_id\":\"2f919b69-9d68-488c-89fa-2aade6ef8519\"}\n[2026-04-14 10:08:04] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"43299ccb-af86-42b1-b793-4ede57e2b91d\",\"trace_id\":\"2f919b69-9d68-488c-89fa-2aade6ef8519\"}\n[2026-04-14 10:08:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"43299ccb-af86-42b1-b793-4ede57e2b91d\",\"trace_id\":\"2f919b69-9d68-488c-89fa-2aade6ef8519\"}\n[2026-04-14 10:08:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"cde80757-333e-4268-a902-892c031b2373\",\"trace_id\":\"36e932e0-8362-432f-9e36-d819f902d49e\"}\n[2026-04-14 10:08:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"cde80757-333e-4268-a902-892c031b2373\",\"trace_id\":\"36e932e0-8362-432f-9e36-d819f902d49e\"}\n[2026-04-14 10:08:07] local.NOTICE: Monitoring start {\"correlation_id\":\"146390f8-e91a-4e5c-b282-0c83b4947101\",\"trace_id\":\"fb689e40-c867-4fc5-9847-c223835da80e\"}\n[2026-04-14 10:08:07] local.NOTICE: Monitoring end {\"correlation_id\":\"146390f8-e91a-4e5c-b282-0c83b4947101\",\"trace_id\":\"fb689e40-c867-4fc5-9847-c223835da80e\"}\n[2026-04-14 10:08:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"58e23da5-8f3f-4836-aac7-315ab32f74a3\",\"trace_id\":\"c71267c4-b5fe-42ad-9bcd-76f6299c1538\"}\n[2026-04-14 10:08:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"58e23da5-8f3f-4836-aac7-315ab32f74a3\",\"trace_id\":\"c71267c4-b5fe-42ad-9bcd-76f6299c1538\"}\n[2026-04-14 10:08:13] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"9158bb6f-c165-495a-9b6e-8077d8343c87\",\"trace_id\":\"df378af8-cacb-41ea-b030-b8f53144fddd\"}\n[2026-04-14 10:08:13] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"9158bb6f-c165-495a-9b6e-8077d8343c87\",\"trace_id\":\"df378af8-cacb-41ea-b030-b8f53144fddd\"}\n[2026-04-14 10:08:13] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":0} {\"correlation_id\":\"9158bb6f-c165-495a-9b6e-8077d8343c87\",\"trace_id\":\"df378af8-cacb-41ea-b030-b8f53144fddd\"}\n[2026-04-14 10:08:13] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"9158bb6f-c165-495a-9b6e-8077d8343c87\",\"trace_id\":\"df378af8-cacb-41ea-b030-b8f53144fddd\"}\n[2026-04-14 10:08:14] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"35774df7-e046-49ec-835f-45f9dc1ec025\",\"trace_id\":\"45c5e102-6b65-4d23-9edd-684ca996316c\"}\n[2026-04-14 10:08:14] local.INFO: Running conference:monitor:count command for activities in (2026-04-14 10:06:00, 2026-04-14 10:08:00] {\"correlation_id\":\"35774df7-e046-49ec-835f-45f9dc1ec025\",\"trace_id\":\"45c5e102-6b65-4d23-9edd-684ca996316c\"}\n[2026-04-14 10:08:14] local.INFO: [conference:monitor:count] No activities found in (2026-04-14 10:06:00, 2026-04-14 10:08:00] {\"correlation_id\":\"35774df7-e046-49ec-835f-45f9dc1ec025\",\"trace_id\":\"45c5e102-6b65-4d23-9edd-684ca996316c\"}\n[2026-04-14 10:08:14] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"35774df7-e046-49ec-835f-45f9dc1ec025\",\"trace_id\":\"45c5e102-6b65-4d23-9edd-684ca996316c\"}\n[2026-04-14 10:08:17] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:retry-failed\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"d4dc4b3b-8dc8-4665-aec7-139be0df2306\",\"trace_id\":\"853f2210-e804-40aa-a1d8-4457c60f4993\"}\n[2026-04-14 10:08:17] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:retry-failed\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"d4dc4b3b-8dc8-4665-aec7-139be0df2306\",\"trace_id\":\"853f2210-e804-40aa-a1d8-4457c60f4993\"}\n[2026-04-14 10:09:05] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"8052fb2f-5876-4e2c-8f64-c770d9fe37fe\",\"trace_id\":\"63249c19-bf59-4e52-9096-156d537a9786\"}\n[2026-04-14 10:09:05] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"8052fb2f-5876-4e2c-8f64-c770d9fe37fe\",\"trace_id\":\"63249c19-bf59-4e52-9096-156d537a9786\"}\n[2026-04-14 10:09:05] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"8052fb2f-5876-4e2c-8f64-c770d9fe37fe\",\"trace_id\":\"63249c19-bf59-4e52-9096-156d537a9786\"}\n[2026-04-14 10:09:07] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"1dd274b4-f71d-486e-b6c4-aaf106304102\",\"trace_id\":\"1d55139c-a58d-4456-801a-9bcb3bf9b024\"}\n[2026-04-14 10:09:07] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"1dd274b4-f71d-486e-b6c4-aaf106304102\",\"trace_id\":\"1d55139c-a58d-4456-801a-9bcb3bf9b024\"}\n[2026-04-14 10:09:10] local.NOTICE: Monitoring start {\"correlation_id\":\"09dc762e-2b78-4dbb-a880-5c8f1cbfc4ad\",\"trace_id\":\"8e60392d-4ea4-41f2-be2f-a01853c7a1ab\"}\n[2026-04-14 10:09:10] local.NOTICE: Monitoring end {\"correlation_id\":\"09dc762e-2b78-4dbb-a880-5c8f1cbfc4ad\",\"trace_id\":\"8e60392d-4ea4-41f2-be2f-a01853c7a1ab\"}\n[2026-04-14 10:09:13] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"2de9f84e-2691-459d-adfd-f5f6746501d0\",\"trace_id\":\"418ad958-86c0-4477-b0fb-e487768d6fa1\"}\n[2026-04-14 10:09:13] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"2de9f84e-2691-459d-adfd-f5f6746501d0\",\"trace_id\":\"418ad958-86c0-4477-b0fb-e487768d6fa1\"}\n[2026-04-14 10:09:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"1be8488c-ae59-4f42-8475-c426905c3ca6\",\"trace_id\":\"aeb8b412-635e-4929-915f-fb3fe5786eae\"}\n[2026-04-14 10:09:16] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"1be8488c-ae59-4f42-8475-c426905c3ca6\",\"trace_id\":\"aeb8b412-635e-4929-915f-fb3fe5786eae\"}\n[2026-04-14 10:09:16] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":0} {\"correlation_id\":\"1be8488c-ae59-4f42-8475-c426905c3ca6\",\"trace_id\":\"aeb8b412-635e-4929-915f-fb3fe5786eae\"}\n[2026-04-14 10:09:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"1be8488c-ae59-4f42-8475-c426905c3ca6\",\"trace_id\":\"aeb8b412-635e-4929-915f-fb3fe5786eae\"}\n[2026-04-14 10:09:18] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"activity:aircall:check-and-renew\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"b3d1b688-309f-4df0-9dcd-9a733c87f597\",\"trace_id\":\"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c\"}\n[2026-04-14 10:09:18] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1496,\"provider\":\"aircall\"} {\"correlation_id\":\"b3d1b688-309f-4df0-9dcd-9a733c87f597\",\"trace_id\":\"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c\"}\n[2026-04-14 10:09:18] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1496,\"provider\":\"aircall\"} {\"correlation_id\":\"b3d1b688-309f-4df0-9dcd-9a733c87f597\",\"trace_id\":\"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c\"}\n[2026-04-14 10:09:18] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b3d1b688-309f-4df0-9dcd-9a733c87f597\",\"trace_id\":\"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c\"}\n[2026-04-14 10:09:18] local.ERROR: [Aircall] Re-activating webhooks failed {\"team_id\":1,\"reason\":\"{\\\"message\\\":\\\"Forbidden\\\"}\"} {\"correlation_id\":\"b3d1b688-309f-4df0-9dcd-9a733c87f597\",\"trace_id\":\"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c\"}\n[2026-04-14 10:09:18] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"activity:aircall:check-and-renew\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"b3d1b688-309f-4df0-9dcd-9a733c87f597\",\"trace_id\":\"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c\"}\n[2026-04-14 10:09:21] local.INFO: [RetryFailedDownloads] Starting {\"options\":{\"from\":null,\"to\":null,\"help\":false,\"silent\":false,\"quiet\":false,\"verbose\":false,\"version\":false,\"ansi\":null,\"no-interaction\":false,\"env\":null}} {\"correlation_id\":\"c7aba065-c8f1-473d-b8b5-4797245873bf\",\"trace_id\":\"48f587f9-dd77-4634-9ad9-1137b029b5f5\"}\n[2026-04-14 10:10:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"7310aae5-3829-4d5c-bbc9-f6550a35f539\",\"trace_id\":\"6099cf10-45e2-4b82-9649-649e2f8a1209\"}\n[2026-04-14 10:10:04] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"7310aae5-3829-4d5c-bbc9-f6550a35f539\",\"trace_id\":\"6099cf10-45e2-4b82-9649-649e2f8a1209\"}\n[2026-04-14 10:10:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"7310aae5-3829-4d5c-bbc9-f6550a35f539\",\"trace_id\":\"6099cf10-45e2-4b82-9649-649e2f8a1209\"}\n[2026-04-14 10:10:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"5119d94e-0c61-4312-a740-2b569388cc9f\",\"trace_id\":\"6a412a32-3bc3-46a4-af7c-24ad560a4e41\"}\n[2026-04-14 10:10:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"5119d94e-0c61-4312-a740-2b569388cc9f\",\"trace_id\":\"6a412a32-3bc3-46a4-af7c-24ad560a4e41\"}\n[2026-04-14 10:10:08] local.NOTICE: Monitoring start {\"correlation_id\":\"95cdb3b7-b356-4325-be28-20663ece6aa0\",\"trace_id\":\"e64a75a4-2493-4f35-ba46-ccd002e6b7b7\"}\n[2026-04-14 10:10:08] local.NOTICE: Monitoring end {\"correlation_id\":\"95cdb3b7-b356-4325-be28-20663ece6aa0\",\"trace_id\":\"e64a75a4-2493-4f35-ba46-ccd002e6b7b7\"}\n[2026-04-14 10:10:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"6460dd5f-4b94-4cd1-867e-53304d785744\",\"trace_id\":\"683b103d-2dfc-4266-84a2-d5cd799b133f\"}\n[2026-04-14 10:10:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"6460dd5f-4b94-4cd1-867e-53304d785744\",\"trace_id\":\"683b103d-2dfc-4266-84a2-d5cd799b133f\"}\n[2026-04-14 10:10:11] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"5a59007d-2a12-4977-8a5a-59c678aa12ee\",\"trace_id\":\"bc3a2ad5-9f13-4728-adaa-529da75cf011\"}\n[2026-04-14 10:10:11] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"5a59007d-2a12-4977-8a5a-59c678aa12ee\",\"trace_id\":\"bc3a2ad5-9f13-4728-adaa-529da75cf011\"}\n[2026-04-14 10:10:11] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":0} {\"correlation_id\":\"5a59007d-2a12-4977-8a5a-59c678aa12ee\",\"trace_id\":\"bc3a2ad5-9f13-4728-adaa-529da75cf011\"}\n[2026-04-14 10:10:11] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"5a59007d-2a12-4977-8a5a-59c678aa12ee\",\"trace_id\":\"bc3a2ad5-9f13-4728-adaa-529da75cf011\"}\n[2026-04-14 10:10:14] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"afe2ff6b-1b9e-4485-bdad-a758d873a782\",\"trace_id\":\"d507becf-55d6-4fda-8831-e981f95b85c8\"}\n[2026-04-14 10:10:14] local.INFO: Running conference:monitor:count command for activities in (2026-04-14 10:08:00, 2026-04-14 10:10:00] {\"correlation_id\":\"afe2ff6b-1b9e-4485-bdad-a758d873a782\",\"trace_id\":\"d507becf-55d6-4fda-8831-e981f95b85c8\"}\n[2026-04-14 10:10:14] local.INFO: [conference:monitor:count] No activities found in (2026-04-14 10:08:00, 2026-04-14 10:10:00] {\"correlation_id\":\"afe2ff6b-1b9e-4485-bdad-a758d873a782\",\"trace_id\":\"d507becf-55d6-4fda-8831-e981f95b85c8\"}\n[2026-04-14 10:10:14] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"afe2ff6b-1b9e-4485-bdad-a758d873a782\",\"trace_id\":\"d507becf-55d6-4fda-8831-e981f95b85c8\"}\n[2026-04-14 10:10:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"activity:purge-stale\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"ebe2ad2b-df9a-48d7-b78f-d52b7489c6f0\",\"trace_id\":\"05b44216-d5ac-44cd-b74b-3e92567b192d\"}\n[2026-04-14 10:10:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"activity:purge-stale\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"ebe2ad2b-df9a-48d7-b78f-d52b7489c6f0\",\"trace_id\":\"05b44216-d5ac-44cd-b74b-3e92567b192d\"}\n[2026-04-14 10:10:18] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:text-relay:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"d76b00ee-6271-4df7-ba45-769738bbb7ae\",\"trace_id\":\"92384790-9588-452d-abea-cdd25a2fe7ff\"}\n[2026-04-14 10:10:18] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:text-relay:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"d76b00ee-6271-4df7-ba45-769738bbb7ae\",\"trace_id\":\"92384790-9588-452d-abea-cdd25a2fe7ff\"}\n[2026-04-14 10:10:20] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:pre-meeting-notification\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"c8f3b5c1-bef5-4584-b9d8-0c10578fefac\",\"trace_id\":\"b700f03d-b02b-495e-b505-1598c7a9ea4b\"}\n[2026-04-14 10:10:20] local.INFO: Running pre-meeting notification command {\"correlation_id\":\"c8f3b5c1-bef5-4584-b9d8-0c10578fefac\",\"trace_id\":\"b700f03d-b02b-495e-b505-1598c7a9ea4b\"}\n[2026-04-14 10:10:20] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:pre-meeting-notification\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"c8f3b5c1-bef5-4584-b9d8-0c10578fefac\",\"trace_id\":\"b700f03d-b02b-495e-b505-1598c7a9ea4b\"}\n[2026-04-14 10:10:22] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:start\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"d7b97fbb-00b9-47c2-ae81-dda03fd8b253\",\"trace_id\":\"54447306-49bf-4629-8de0-bb191c61cce2\"}\n[2026-04-14 10:10:22] local.INFO: Running conference:monitor:start command for activities in (2026-04-14 10:00:00, 2026-04-14 10:05:00] {\"correlation_id\":\"d7b97fbb-00b9-47c2-ae81-dda03fd8b253\",\"trace_id\":\"54447306-49bf-4629-8de0-bb191c61cce2\"}\n[2026-04-14 10:10:22] local.INFO: [conference:monitor:start] No activities found in (2026-04-14 10:00:00, 2026-04-14 10:05:00] {\"correlation_id\":\"d7b97fbb-00b9-47c2-ae81-dda03fd8b253\",\"trace_id\":\"54447306-49bf-4629-8de0-bb191c61cce2\"}\n[2026-04-14 10:10:22] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:start\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"d7b97fbb-00b9-47c2-ae81-dda03fd8b253\",\"trace_id\":\"54447306-49bf-4629-8de0-bb191c61cce2\"}\n[2026-04-14 10:10:23] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:end\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"07665538-664f-421e-af9b-97152a688b68\",\"trace_id\":\"d116813e-2d96-4a3d-ae04-6e53d69ca565\"}\n[2026-04-14 10:10:23] local.INFO: conference:monitor:end:Jiminny\\Console\\Commands\\Activities\\MonitorMeetingEndCommand::logActivitiesEnded {\"from\":\"10:05\",\"to\":\"10:10\"} {\"correlation_id\":\"07665538-664f-421e-af9b-97152a688b68\",\"trace_id\":\"d116813e-2d96-4a3d-ae04-6e53d69ca565\"}\n[2026-04-14 10:10:23] local.INFO: conference:monitor:end:Jiminny\\Console\\Commands\\Activities\\MonitorMeetingEndCommand::logActivitiesWithUnfinishedSession {\"from\":\"00:00\",\"to\":\"00:05\"} {\"correlation_id\":\"07665538-664f-421e-af9b-97152a688b68\",\"trace_id\":\"d116813e-2d96-4a3d-ae04-6e53d69ca565\"}\n[2026-04-14 10:10:23] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:end\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"07665538-664f-421e-af9b-97152a688b68\",\"trace_id\":\"d116813e-2d96-4a3d-ae04-6e53d69ca565\"}\n[2026-04-14 10:10:25] local.NOTICE: Repairing HubSpot tokens start {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:25] local.INFO: Trying to refresh HubSpot token {\"account_id\":59,\"updated_at\":\"2025-10-03 09:32:05\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:25] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:25] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":59,\"provider\":\"hubspot\",\"refreshToken\":\"97b78f6e2cc49965c00c2492b602b02708b1392551e6b3f113fbaa48992af90b\",\"state\":\"full-refresh\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:26] local.ERROR: Failed to refresh HubSpot token {\"account_id\":59,\"updated_at\":\"2025-10-03 09:32:05\",\"reason\":\"missing or invalid refresh token\",\"previous\":\"\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:26] local.INFO: Trying to refresh HubSpot token {\"account_id\":306,\"updated_at\":\"2023-11-27 09:30:03\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:26] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:26] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":306,\"provider\":\"hubspot\",\"refreshToken\":\"6fa6aa8cc641d131231acc3470f5c03cb3b07b2e580fb18f8acb3b1dbb72549b\",\"state\":\"full-refresh\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:26] local.ERROR: Failed to refresh HubSpot token {\"account_id\":306,\"updated_at\":\"2023-11-27 09:30:03\",\"reason\":\"missing or invalid refresh token\",\"previous\":\"\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:26] local.INFO: Trying to refresh HubSpot token {\"account_id\":1372,\"updated_at\":\"2025-10-02 14:47:06\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:26] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:26] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1372,\"provider\":\"hubspot\",\"refreshToken\":\"9aa73948c761da29dce46c177cf9aee1fde483a44169ca38723f9f0597d7a8c4\",\"state\":\"full-refresh\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:27] local.ERROR: Failed to refresh HubSpot token {\"account_id\":1372,\"updated_at\":\"2025-10-02 14:47:06\",\"reason\":\"missing or invalid refresh token\",\"previous\":\"\"} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:27] local.NOTICE: Repairing HubSpot tokens end {\"total\":3,\"fixed\":0,\"failed\":3} {\"correlation_id\":\"d269668d-cb18-4aeb-9a05-13a9e53195ed\",\"trace_id\":\"ecbe2fde-809f-4720-8113-609eda111b53\"}\n[2026-04-14 10:10:30] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:pre-meeting-reminder\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"cba13635-8dbf-4423-ad70-69f2d927c6ff\",\"trace_id\":\"cca585f7-e8b4-4cbd-b63f-8d9be90960a6\"}\n[2026-04-14 10:10:30] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"jiminny:transcription:retry-failed\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"8d29e53b-638b-4e55-8ee6-70567699b366\",\"trace_id\":\"ac17c380-0e7e-4425-bbc9-9e292ed99ea5\"}\n[2026-04-14 10:10:30] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"jiminny:transcription:retry-failed\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"8d29e53b-638b-4e55-8ee6-70567699b366\",\"trace_id\":\"ac17c380-0e7e-4425-bbc9-9e292ed99ea5\"}\n[2026-04-14 10:10:30] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:30] local.INFO: [HubSpot Journal Command] Starting polling service {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:30] local.INFO: [HubSpot Journal Polling] Service starting {\"memory_limit\":\"256M\",\"max_execution_time\":\"0\",\"initial_memory_mb\":62.0} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:30] local.INFO: [HubSpot Journal Polling] Acquired polling lock {\"expires_at\":\"2026-04-14T10:12:30.407181Z\"} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:30] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:30] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:30] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:pre-meeting-reminder\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"cba13635-8dbf-4423-ad70-69f2d927c6ff\",\"trace_id\":\"cca585f7-e8b4-4cbd-b63f-8d9be90960a6\"}\n[2026-04-14 10:10:30] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:32] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"crm:reset-governor\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"4943604a-02ac-42cd-82ee-524a684c9d07\",\"trace_id\":\"dea56e3f-9697-4054-8b54-7db752a8613f\"}\n[2026-04-14 10:10:32] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"crm:reset-governor\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"4943604a-02ac-42cd-82ee-524a684c9d07\",\"trace_id\":\"dea56e3f-9697-4054-8b54-7db752a8613f\"}\n[2026-04-14 10:10:34] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"crm:bullhorn:ping\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"7ae1dc8e-0ce6-461b-a054-be59c56de0b5\",\"trace_id\":\"8892af7b-37c9-4892-82fd-aa4596edc512\"}\n[2026-04-14 10:10:34] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"crm:bullhorn:ping\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"7ae1dc8e-0ce6-461b-a054-be59c56de0b5\",\"trace_id\":\"8892af7b-37c9-4892-82fd-aa4596edc512\"}\n[2026-04-14 10:10:35] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:35] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:35] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:40] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:40] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:41] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:56] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:56] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:10:56] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:11:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"79c8dc9b-058f-4f0e-9e9a-2e34a66209a7\",\"trace_id\":\"c6894787-c096-4c96-96cf-8ed81e40aa59\"}\n[2026-04-14 10:11:04] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"79c8dc9b-058f-4f0e-9e9a-2e34a66209a7\",\"trace_id\":\"c6894787-c096-4c96-96cf-8ed81e40aa59\"}\n[2026-04-14 10:11:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"79c8dc9b-058f-4f0e-9e9a-2e34a66209a7\",\"trace_id\":\"c6894787-c096-4c96-96cf-8ed81e40aa59\"}\n[2026-04-14 10:11:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"d52d55c7-74a3-409b-b458-fecfd8990f5a\",\"trace_id\":\"407ded8c-1b50-4ba7-8190-f3e84814124e\"}\n[2026-04-14 10:11:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"d52d55c7-74a3-409b-b458-fecfd8990f5a\",\"trace_id\":\"407ded8c-1b50-4ba7-8190-f3e84814124e\"}\n[2026-04-14 10:11:08] local.NOTICE: Monitoring start {\"correlation_id\":\"296fc7a0-329d-43bf-8c98-547c407c447c\",\"trace_id\":\"d2bbc8a9-18cb-408f-98a9-f87d6a2e4cb9\"}\n[2026-04-14 10:11:08] local.NOTICE: Monitoring end {\"correlation_id\":\"296fc7a0-329d-43bf-8c98-547c407c447c\",\"trace_id\":\"d2bbc8a9-18cb-408f-98a9-f87d6a2e4cb9\"}\n[2026-04-14 10:11:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"4aaf62d1-0d46-4f16-af0e-0617eb460382\",\"trace_id\":\"7bcc5249-9d16-44e5-a83c-3a613e00c860\"}\n[2026-04-14 10:11:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"4aaf62d1-0d46-4f16-af0e-0617eb460382\",\"trace_id\":\"7bcc5249-9d16-44e5-a83c-3a613e00c860\"}\n[2026-04-14 10:11:11] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"19290448-0263-4849-93fc-f09885da0c1f\",\"trace_id\":\"1483761c-464c-4374-994f-121758fcd534\"}\n[2026-04-14 10:11:12] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"19290448-0263-4849-93fc-f09885da0c1f\",\"trace_id\":\"1483761c-464c-4374-994f-121758fcd534\"}\n[2026-04-14 10:11:12] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":0} {\"correlation_id\":\"19290448-0263-4849-93fc-f09885da0c1f\",\"trace_id\":\"1483761c-464c-4374-994f-121758fcd534\"}\n[2026-04-14 10:11:12] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"19290448-0263-4849-93fc-f09885da0c1f\",\"trace_id\":\"1483761c-464c-4374-994f-121758fcd534\"}\n[2026-04-14 10:11:26] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:11:26] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:11:26] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:11:26] local.WARNING: [HubSpot Journal Polling] Maximum empty results reached, stopping {\"empty_results\":5,\"max_empty_results\":5} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:11:26] local.WARNING: [HubSpot Journal Polling] Maximum empty results reached, stopping {\"empty_results\":5,\"max_empty_results\":5} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:11:26] local.INFO: [HubSpot Journal Polling] Service ending {\"runtime_seconds\":56,\"total_cycles\":5,\"files_downloaded\":0,\"empty_files\":0,\"other_portal_skipped\":0,\"total_events\":0,\"events_per_file\":0,\"avg_api_ms\":252.2,\"avg_download_ms\":0.0,\"avg_transform_ms\":0.0,\"avg_process_ms\":0.0,\"peak_memory_mb\":99.75} {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:11:26] local.INFO: [HubSpot Journal Polling] Released polling lock {\"correlation_id\":\"f896bee6-1a5b-4790-8dd6-af38522db495\",\"trace_id\":\"6ba6c565-e21f-41ef-9f42-301c78a24f31\"}\n[2026-04-14 10:12:07] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"74ad5a14-81b2-48f4-bb37-2d2ac73c5059\",\"trace_id\":\"6d6d809e-3d77-400c-a351-ac4db72cf3fc\"}\n[2026-04-14 10:12:07] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"74ad5a14-81b2-48f4-bb37-2d2ac73c5059\",\"trace_id\":\"6d6d809e-3d77-400c-a351-ac4db72cf3fc\"}\n[2026-04-14 10:12:07] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"74ad5a14-81b2-48f4-bb37-2d2ac73c5059\",\"trace_id\":\"6d6d809e-3d77-400c-a351-ac4db72cf3fc\"}\n[2026-04-14 10:12:09] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"3671d2e5-29f6-43db-8f1a-4a0bf5ff669b\",\"trace_id\":\"1295351d-9c37-47db-bad6-dbccb4c6466f\"}\n[2026-04-14 10:12:09] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"3671d2e5-29f6-43db-8f1a-4a0bf5ff669b\",\"trace_id\":\"1295351d-9c37-47db-bad6-dbccb4c6466f\"}\n[2026-04-14 10:12:11] local.NOTICE: Monitoring start {\"correlation_id\":\"f2d467c8-e822-4691-9920-cac071f14877\",\"trace_id\":\"4d67db65-374a-4eb2-9cc6-8c60dc9ebabc\"}\n[2026-04-14 10:12:11] local.NOTICE: Monitoring end {\"correlation_id\":\"f2d467c8-e822-4691-9920-cac071f14877\",\"trace_id\":\"4d67db65-374a-4eb2-9cc6-8c60dc9ebabc\"}\n[2026-04-14 10:12:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"04d8a469-317c-40e1-a163-ad747408f9e3\",\"trace_id\":\"bafa4d05-7e55-4524-b0a5-1764ecb964fe\"}\n[2026-04-14 10:12:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"04d8a469-317c-40e1-a163-ad747408f9e3\",\"trace_id\":\"bafa4d05-7e55-4524-b0a5-1764ecb964fe\"}\n[2026-04-14 10:12:20] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"3cd3a658-bd65-4253-9c8d-b94cdd2f3c4d\",\"trace_id\":\"5ae25493-7098-481f-84f4-225c6595b140\"}\n[2026-04-14 10:12:20] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"3cd3a658-bd65-4253-9c8d-b94cdd2f3c4d\",\"trace_id\":\"5ae25493-7098-481f-84f4-225c6595b140\"}\n[2026-04-14 10:12:20] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":0} {\"correlation_id\":\"3cd3a658-bd65-4253-9c8d-b94cdd2f3c4d\",\"trace_id\":\"5ae25493-7098-481f-84f4-225c6595b140\"}\n[2026-04-14 10:12:20] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"3cd3a658-bd65-4253-9c8d-b94cdd2f3c4d\",\"trace_id\":\"5ae25493-7098-481f-84f4-225c6595b140\"}\n[2026-04-14 10:12:22] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"4cabe4c8-81a7-4405-958c-783cc42dc31a\",\"trace_id\":\"844b27d2-1727-4f1a-bb9a-a3ad44d9d37a\"}\n[2026-04-14 10:12:22] local.INFO: Running conference:monitor:count command for activities in (2026-04-14 10:10:00, 2026-04-14 10:12:00] {\"correlation_id\":\"4cabe4c8-81a7-4405-958c-783cc42dc31a\",\"trace_id\":\"844b27d2-1727-4f1a-bb9a-a3ad44d9d37a\"}\n[2026-04-14 10:12:22] local.INFO: [conference:monitor:count] No activities found in (2026-04-14 10:10:00, 2026-04-14 10:12:00] {\"correlation_id\":\"4cabe4c8-81a7-4405-958c-783cc42dc31a\",\"trace_id\":\"844b27d2-1727-4f1a-bb9a-a3ad44d9d37a\"}\n[2026-04-14 10:12:22] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"4cabe4c8-81a7-4405-958c-783cc42dc31a\",\"trace_id\":\"844b27d2-1727-4f1a-bb9a-a3ad44d9d37a\"}\n[2026-04-14 10:12:25] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:create\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"b573f9e3-5771-4b03-9fd9-1ff7d571916d\",\"trace_id\":\"e76af6ed-1fff-4aef-8b17-a8288121b37a\"}\n[2026-04-14 10:12:25] local.INFO: [EmailSchedule] STARTING batch create {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"b573f9e3-5771-4b03-9fd9-1ff7d571916d\",\"trace_id\":\"e76af6ed-1fff-4aef-8b17-a8288121b37a\"}\n[2026-04-14 10:12:25] local.INFO: [EmailSchedule] FINISHED batch create {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"b573f9e3-5771-4b03-9fd9-1ff7d571916d\",\"trace_id\":\"e76af6ed-1fff-4aef-8b17-a8288121b37a\"}\n[2026-04-14 10:12:25] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:create\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"b573f9e3-5771-4b03-9fd9-1ff7d571916d\",\"trace_id\":\"e76af6ed-1fff-4aef-8b17-a8288121b37a\"}\n[2026-04-14 10:12:27] local.INFO: [Jiminny\\Jobs\\Mailbox\\CreateBatches] processed 0 inboxes and created 0 batches {\"userId\":null,\"batchSize\":30,\"maxBatches\":1000} {\"correlation_id\":\"ad382f07-8ff8-450f-b38c-fba577285d06\",\"trace_id\":\"e76af6ed-1fff-4aef-8b17-a8288121b37a\"}\n[2026-04-14 10:13:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"24a30c58-6ce4-427b-972e-87df2b1f0d31\",\"trace_id\":\"30809930-a6a8-49bb-9c61-f4dcca23683a\"}\n[2026-04-14 10:13:04] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"24a30c58-6ce4-427b-972e-87df2b1f0d31\",\"trace_id\":\"30809930-a6a8-49bb-9c61-f4dcca23683a\"}\n[2026-04-14 10:13:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"24a30c58-6ce4-427b-972e-87df2b1f0d31\",\"trace_id\":\"30809930-a6a8-49bb-9c61-f4dcca23683a\"}\n[2026-04-14 10:13:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.746} {\"correlation_id\":\"db368cd5-b4ea-4f77-8169-24ff5403199d\",\"trace_id\":\"0bd7332d-c4c1-44b6-b204-e68b8ec6217a\"}\n[2026-04-14 10:13:06] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.746,\"memoryPeakAfterCommandInMB\":99.746} {\"correlation_id\":\"db368cd5-b4ea-4f77-8169-24ff5403199d\",\"trace_id\":\"0bd7332d-c4c1-44b6-b204-e68b8ec6217a\"}\n[2026-04-14 10:13:08] local.NOTICE: Monitoring start {\"correlation_id\":\"98628e85-9d56-4088-8ddb-5a33768305d6\",\"trace_id\":\"138288e6-6342-4250-9c1e-46921c407423\"}\n[2026-04-14 10:13:08] local.NOTICE: Monitoring end {\"correlation_id\":\"98628e85-9d56-4088-8ddb-5a33768305d6\",\"trace_id\":\"138288e6-6342-4250-9c1e-46921c407423\"}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.049609374,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10","depth":4,"bounds":{"left":0.30507812,"top":0.23819445,"width":0.011328125,"height":0.013194445},"role_description":"text"},{"role":"AXStaticText","text":"12","depth":4,"bounds":{"left":0.31875,"top":0.23819445,"width":0.011328125,"height":0.013194445},"role_description":"text"},{"role":"AXStaticText","text":"6","depth":4,"bounds":{"left":0.33242187,"top":0.23819445,"width":0.009375,"height":0.013194445},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.34375,"top":0.23680556,"width":0.00859375,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.35234374,"top":0.23680556,"width":0.008203125,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Console\\Commands\\Reports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Contracts\\Bus\\Dispatcher;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Jiminny\\Console\\Commands\\Reports\\AutomatedReportsCommand;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateAskJiminnyReportJob;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateReportJob;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse PHPUnit\\Framework\\TestCase;\nuse Psr\\Log\\LoggerInterface;\n\nclass AutomatedReportsCommandTest extends TestCase\n{\n private LoggerInterface&Mockery\\MockInterface $logger;\n private Dispatcher&Mockery\\MockInterface $dispatcher;\n private AutomatedReportsRepository&Mockery\\MockInterface $reportRepository;\n private AutomatedReportsCommand $command;\n\n protected function setUp(): void\n {\n parent::setUp();\n $this->logger = Mockery::mock(LoggerInterface::class);\n $this->dispatcher = Mockery::mock(Dispatcher::class);\n $this->reportRepository = Mockery::mock(AutomatedReportsRepository::class);\n $this->command = new AutomatedReportsCommand($this->logger, $this->dispatcher, $this->reportRepository);\n }\n\n protected function tearDown(): void\n {\n Carbon::setTestNow();\n Mockery::close();\n parent::tearDown();\n }\n\n public function testProcessDailyReportsEveryDay(): void\n {\n Carbon::setTestNow(Carbon::create(2024, 3, 13, 10, 0, 0));\n\n $reports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_DAILY, 2);\n\n $this->logger->shouldReceive('info')->atLeast()->once();\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_DAILY)\n ->andReturn(new Collection($reports));\n\n $this->dispatcher->shouldReceive('dispatch')\n ->twice()\n ->with(Mockery::type(RequestGenerateReportJob::class));\n\n $result = $this->command->handle();\n\n $this->assertEquals(0, $result);\n }\n\n public function testDispatchesAskJiminnyJobForAskJiminnyReports(): void\n {\n Carbon::setTestNow(Carbon::create(2024, 3, 13, 10, 0, 0));\n\n $askJiminnyReport = $this->createAskJiminnyReport(AutomatedReportsService::FREQUENCY_DAILY);\n $standardReport = $this->createStandardReports(AutomatedReportsService::FREQUENCY_DAILY, 1)[0];\n\n $this->logger->shouldReceive('info')->atLeast()->once();\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_DAILY)\n ->andReturn(new Collection([$askJiminnyReport, $standardReport]));\n\n $this->dispatcher->shouldReceive('dispatch')\n ->once()\n ->with(Mockery::type(RequestGenerateAskJiminnyReportJob::class));\n\n $this->dispatcher->shouldReceive('dispatch')\n ->once()\n ->with(Mockery::type(RequestGenerateReportJob::class));\n\n $result = $this->command->handle();\n\n $this->assertEquals(0, $result);\n }\n\n public function testProcessWeeklyReportsOnMonday(): void\n {\n Carbon::setTestNow(Carbon::create(2023, 12, 11, 10, 0, 0));\n\n $dailyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_DAILY, 1);\n $weeklyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_WEEKLY, 2);\n\n $this->logger->shouldReceive('info')->atLeast()->once();\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_DAILY)\n ->andReturn(new Collection($dailyReports));\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_WEEKLY)\n ->andReturn(new Collection($weeklyReports));\n\n $this->dispatcher->shouldReceive('dispatch')\n ->times(3)\n ->with(Mockery::type(RequestGenerateReportJob::class));\n\n $result = $this->command->handle();\n\n $this->assertEquals(0, $result);\n }\n\n public function testDoNotProcessWeeklyReportsOnNonMonday(): void\n {\n Carbon::setTestNow(Carbon::create(2023, 12, 12, 10, 0, 0));\n\n $dailyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_DAILY, 0);\n\n $this->logger->shouldReceive('info')->atLeast()->once();\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_DAILY)\n ->andReturn(new Collection($dailyReports));\n\n $this->reportRepository->shouldNotReceive('getActiveReportsByFrequency')\n ->with(AutomatedReportsService::FREQUENCY_WEEKLY);\n\n $this->dispatcher->shouldNotReceive('dispatch');\n\n $result = $this->command->handle();\n\n $this->assertEquals(0, $result);\n }\n\n public function testProcessMonthlyReportsOnFirstDayOfMonth(): void\n {\n Carbon::setTestNow(Carbon::create(2024, 3, 1, 10, 0, 0));\n\n $dailyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_DAILY, 0);\n $monthlyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_MONTHLY, 2);\n\n $this->logger->shouldReceive('info')->atLeast()->once();\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_DAILY)\n ->andReturn(new Collection($dailyReports));\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_MONTHLY)\n ->andReturn(new Collection($monthlyReports));\n\n $this->dispatcher->shouldReceive('dispatch')\n ->twice()\n ->with(Mockery::type(RequestGenerateReportJob::class));\n\n $result = $this->command->handle();\n\n $this->assertEquals(0, $result);\n }\n\n public function testDoNotProcessMonthlyReportsOnNonFirstDayOfMonth(): void\n {\n Carbon::setTestNow(Carbon::create(2024, 3, 13, 10, 0, 0));\n\n $dailyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_DAILY, 0);\n\n $this->logger->shouldReceive('info')->atLeast()->once();\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_DAILY)\n ->andReturn(new Collection($dailyReports));\n\n $this->reportRepository->shouldNotReceive('getActiveReportsByFrequency')\n ->with(AutomatedReportsService::FREQUENCY_MONTHLY);\n\n $this->reportRepository->shouldNotReceive('getActiveReportsByFrequency')\n ->with(AutomatedReportsService::FREQUENCY_QUARTERLY);\n\n $this->dispatcher->shouldNotReceive('dispatch');\n\n $result = $this->command->handle();\n\n $this->assertEquals(0, $result);\n }\n\n public function testProcessQuarterlyReportsOnFirstDayOfQuarterlyMonth(): void\n {\n // 2024-10-01 is a Tuesday (first day of quarterly month, not Monday)\n Carbon::setTestNow(Carbon::create(2024, 10, 1, 10, 0, 0));\n\n $dailyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_DAILY, 0);\n $monthlyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_MONTHLY, 1);\n $quarterlyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_QUARTERLY, 1);\n\n $this->logger->shouldReceive('info')->atLeast()->once();\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_DAILY)\n ->andReturn(new Collection($dailyReports));\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_MONTHLY)\n ->andReturn(new Collection($monthlyReports));\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_QUARTERLY)\n ->andReturn(new Collection($quarterlyReports));\n\n $this->dispatcher->shouldReceive('dispatch')\n ->twice()\n ->with(Mockery::type(RequestGenerateReportJob::class));\n\n $result = $this->command->handle();\n\n $this->assertEquals(0, $result);\n }\n\n public function testDoNotProcessQuarterlyReportsOnNonQuarterlyFirstDay(): void\n {\n Carbon::setTestNow(Carbon::create(2024, 3, 1, 10, 0, 0));\n\n $dailyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_DAILY, 0);\n $monthlyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_MONTHLY, 0);\n\n $this->logger->shouldReceive('info')->atLeast()->once();\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_DAILY)\n ->andReturn(new Collection($dailyReports));\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_MONTHLY)\n ->andReturn(new Collection($monthlyReports));\n\n $this->reportRepository->shouldNotReceive('getActiveReportsByFrequency')\n ->with(AutomatedReportsService::FREQUENCY_QUARTERLY);\n\n $this->dispatcher->shouldNotReceive('dispatch');\n\n $result = $this->command->handle();\n\n $this->assertEquals(0, $result);\n }\n\n public function testProcessAllFrequenciesOnMondayFirstDayOfQuarterlyMonth(): void\n {\n Carbon::setTestNow(Carbon::create(2024, 7, 1, 10, 0, 0));\n\n $dailyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_DAILY, 1);\n $weeklyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_WEEKLY, 1);\n $monthlyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_MONTHLY, 1);\n $quarterlyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_QUARTERLY, 1);\n\n $this->logger->shouldReceive('info')->atLeast()->once();\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_DAILY)\n ->andReturn(new Collection($dailyReports));\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_WEEKLY)\n ->andReturn(new Collection($weeklyReports));\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_MONTHLY)\n ->andReturn(new Collection($monthlyReports));\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_QUARTERLY)\n ->andReturn(new Collection($quarterlyReports));\n\n $this->dispatcher->shouldReceive('dispatch')\n ->times(4)\n ->with(Mockery::type(RequestGenerateReportJob::class));\n\n $result = $this->command->handle();\n\n $this->assertEquals(0, $result);\n }\n\n public function testReturnsZeroOnSuccess(): void\n {\n Carbon::setTestNow(Carbon::create(2024, 3, 13, 10, 0, 0));\n\n $this->logger->shouldReceive('info')->atLeast()->once();\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_DAILY)\n ->andReturn(new Collection([]));\n\n $result = $this->command->handle();\n\n $this->assertEquals(0, $result);\n }\n\n private function createStandardReports(string $frequency, int $count): array\n {\n $reports = [];\n\n for ($i = 0; $i < $count; $i++) {\n $report = Mockery::mock();\n $report->shouldReceive('getUuid')->andReturn('uuid-' . $i);\n $report->shouldReceive('getTeamId')->andReturn($i + 1);\n $report->shouldReceive('getFrequency')->andReturn($frequency);\n $report->shouldReceive('getType')->andReturn(AutomatedReportsService::TYPE_LOSS_ANALYSIS);\n $report->shouldReceive('isAskJiminnyReport')->andReturn(false);\n\n $reports[] = $report;\n }\n\n return $reports;\n }\n\n private function createAskJiminnyReport(string $frequency): mixed\n {\n $report = Mockery::mock();\n $report->shouldReceive('getUuid')->andReturn('ask-jiminny-uuid');\n $report->shouldReceive('getTeamId')->andReturn(99);\n $report->shouldReceive('getFrequency')->andReturn($frequency);\n $report->shouldReceive('getType')->andReturn(AutomatedReportsService::TYPE_ASK_JIMINNY);\n $report->shouldReceive('isAskJiminnyReport')->andReturn(true);\n\n return $report;\n }\n}","depth":4,"bounds":{"left":0.15234375,"top":0.23541667,"width":0.2828125,"height":0.76458335},"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Console\\Commands\\Reports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Contracts\\Bus\\Dispatcher;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Jiminny\\Console\\Commands\\Reports\\AutomatedReportsCommand;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateAskJiminnyReportJob;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateReportJob;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse PHPUnit\\Framework\\TestCase;\nuse Psr\\Log\\LoggerInterface;\n\nclass AutomatedReportsCommandTest extends TestCase\n{\n private LoggerInterface&Mockery\\MockInterface $logger;\n private Dispatcher&Mockery\\MockInterface $dispatcher;\n private AutomatedReportsRepository&Mockery\\MockInterface $reportRepository;\n private AutomatedReportsCommand $command;\n\n protected function setUp(): void\n {\n parent::setUp();\n $this->logger = Mockery::mock(LoggerInterface::class);\n $this->dispatcher = Mockery::mock(Dispatcher::class);\n $this->reportRepository = Mockery::mock(AutomatedReportsRepository::class);\n $this->command = new AutomatedReportsCommand($this->logger, $this->dispatcher, $this->reportRepository);\n }\n\n protected function tearDown(): void\n {\n Carbon::setTestNow();\n Mockery::close();\n parent::tearDown();\n }\n\n public function testProcessDailyReportsEveryDay(): void\n {\n Carbon::setTestNow(Carbon::create(2024, 3, 13, 10, 0, 0));\n\n $reports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_DAILY, 2);\n\n $this->logger->shouldReceive('info')->atLeast()->once();\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_DAILY)\n ->andReturn(new Collection($reports));\n\n $this->dispatcher->shouldReceive('dispatch')\n ->twice()\n ->with(Mockery::type(RequestGenerateReportJob::class));\n\n $result = $this->command->handle();\n\n $this->assertEquals(0, $result);\n }\n\n public function testDispatchesAskJiminnyJobForAskJiminnyReports(): void\n {\n Carbon::setTestNow(Carbon::create(2024, 3, 13, 10, 0, 0));\n\n $askJiminnyReport = $this->createAskJiminnyReport(AutomatedReportsService::FREQUENCY_DAILY);\n $standardReport = $this->createStandardReports(AutomatedReportsService::FREQUENCY_DAILY, 1)[0];\n\n $this->logger->shouldReceive('info')->atLeast()->once();\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_DAILY)\n ->andReturn(new Collection([$askJiminnyReport, $standardReport]));\n\n $this->dispatcher->shouldReceive('dispatch')\n ->once()\n ->with(Mockery::type(RequestGenerateAskJiminnyReportJob::class));\n\n $this->dispatcher->shouldReceive('dispatch')\n ->once()\n ->with(Mockery::type(RequestGenerateReportJob::class));\n\n $result = $this->command->handle();\n\n $this->assertEquals(0, $result);\n }\n\n public function testProcessWeeklyReportsOnMonday(): void\n {\n Carbon::setTestNow(Carbon::create(2023, 12, 11, 10, 0, 0));\n\n $dailyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_DAILY, 1);\n $weeklyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_WEEKLY, 2);\n\n $this->logger->shouldReceive('info')->atLeast()->once();\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_DAILY)\n ->andReturn(new Collection($dailyReports));\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_WEEKLY)\n ->andReturn(new Collection($weeklyReports));\n\n $this->dispatcher->shouldReceive('dispatch')\n ->times(3)\n ->with(Mockery::type(RequestGenerateReportJob::class));\n\n $result = $this->command->handle();\n\n $this->assertEquals(0, $result);\n }\n\n public function testDoNotProcessWeeklyReportsOnNonMonday(): void\n {\n Carbon::setTestNow(Carbon::create(2023, 12, 12, 10, 0, 0));\n\n $dailyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_DAILY, 0);\n\n $this->logger->shouldReceive('info')->atLeast()->once();\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_DAILY)\n ->andReturn(new Collection($dailyReports));\n\n $this->reportRepository->shouldNotReceive('getActiveReportsByFrequency')\n ->with(AutomatedReportsService::FREQUENCY_WEEKLY);\n\n $this->dispatcher->shouldNotReceive('dispatch');\n\n $result = $this->command->handle();\n\n $this->assertEquals(0, $result);\n }\n\n public function testProcessMonthlyReportsOnFirstDayOfMonth(): void\n {\n Carbon::setTestNow(Carbon::create(2024, 3, 1, 10, 0, 0));\n\n $dailyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_DAILY, 0);\n $monthlyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_MONTHLY, 2);\n\n $this->logger->shouldReceive('info')->atLeast()->once();\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_DAILY)\n ->andReturn(new Collection($dailyReports));\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_MONTHLY)\n ->andReturn(new Collection($monthlyReports));\n\n $this->dispatcher->shouldReceive('dispatch')\n ->twice()\n ->with(Mockery::type(RequestGenerateReportJob::class));\n\n $result = $this->command->handle();\n\n $this->assertEquals(0, $result);\n }\n\n public function testDoNotProcessMonthlyReportsOnNonFirstDayOfMonth(): void\n {\n Carbon::setTestNow(Carbon::create(2024, 3, 13, 10, 0, 0));\n\n $dailyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_DAILY, 0);\n\n $this->logger->shouldReceive('info')->atLeast()->once();\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_DAILY)\n ->andReturn(new Collection($dailyReports));\n\n $this->reportRepository->shouldNotReceive('getActiveReportsByFrequency')\n ->with(AutomatedReportsService::FREQUENCY_MONTHLY);\n\n $this->reportRepository->shouldNotReceive('getActiveReportsByFrequency')\n ->with(AutomatedReportsService::FREQUENCY_QUARTERLY);\n\n $this->dispatcher->shouldNotReceive('dispatch');\n\n $result = $this->command->handle();\n\n $this->assertEquals(0, $result);\n }\n\n public function testProcessQuarterlyReportsOnFirstDayOfQuarterlyMonth(): void\n {\n // 2024-10-01 is a Tuesday (first day of quarterly month, not Monday)\n Carbon::setTestNow(Carbon::create(2024, 10, 1, 10, 0, 0));\n\n $dailyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_DAILY, 0);\n $monthlyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_MONTHLY, 1);\n $quarterlyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_QUARTERLY, 1);\n\n $this->logger->shouldReceive('info')->atLeast()->once();\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_DAILY)\n ->andReturn(new Collection($dailyReports));\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_MONTHLY)\n ->andReturn(new Collection($monthlyReports));\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_QUARTERLY)\n ->andReturn(new Collection($quarterlyReports));\n\n $this->dispatcher->shouldReceive('dispatch')\n ->twice()\n ->with(Mockery::type(RequestGenerateReportJob::class));\n\n $result = $this->command->handle();\n\n $this->assertEquals(0, $result);\n }\n\n public function testDoNotProcessQuarterlyReportsOnNonQuarterlyFirstDay(): void\n {\n Carbon::setTestNow(Carbon::create(2024, 3, 1, 10, 0, 0));\n\n $dailyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_DAILY, 0);\n $monthlyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_MONTHLY, 0);\n\n $this->logger->shouldReceive('info')->atLeast()->once();\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_DAILY)\n ->andReturn(new Collection($dailyReports));\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_MONTHLY)\n ->andReturn(new Collection($monthlyReports));\n\n $this->reportRepository->shouldNotReceive('getActiveReportsByFrequency')\n ->with(AutomatedReportsService::FREQUENCY_QUARTERLY);\n\n $this->dispatcher->shouldNotReceive('dispatch');\n\n $result = $this->command->handle();\n\n $this->assertEquals(0, $result);\n }\n\n public function testProcessAllFrequenciesOnMondayFirstDayOfQuarterlyMonth(): void\n {\n Carbon::setTestNow(Carbon::create(2024, 7, 1, 10, 0, 0));\n\n $dailyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_DAILY, 1);\n $weeklyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_WEEKLY, 1);\n $monthlyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_MONTHLY, 1);\n $quarterlyReports = $this->createStandardReports(AutomatedReportsService::FREQUENCY_QUARTERLY, 1);\n\n $this->logger->shouldReceive('info')->atLeast()->once();\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_DAILY)\n ->andReturn(new Collection($dailyReports));\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_WEEKLY)\n ->andReturn(new Collection($weeklyReports));\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_MONTHLY)\n ->andReturn(new Collection($monthlyReports));\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_QUARTERLY)\n ->andReturn(new Collection($quarterlyReports));\n\n $this->dispatcher->shouldReceive('dispatch')\n ->times(4)\n ->with(Mockery::type(RequestGenerateReportJob::class));\n\n $result = $this->command->handle();\n\n $this->assertEquals(0, $result);\n }\n\n public function testReturnsZeroOnSuccess(): void\n {\n Carbon::setTestNow(Carbon::create(2024, 3, 13, 10, 0, 0));\n\n $this->logger->shouldReceive('info')->atLeast()->once();\n\n $this->reportRepository->shouldReceive('getActiveReportsByFrequency')\n ->once()\n ->with(AutomatedReportsService::FREQUENCY_DAILY)\n ->andReturn(new Collection([]));\n\n $result = $this->command->handle();\n\n $this->assertEquals(0, $result);\n }\n\n private function createStandardReports(string $frequency, int $count): array\n {\n $reports = [];\n\n for ($i = 0; $i < $count; $i++) {\n $report = Mockery::mock();\n $report->shouldReceive('getUuid')->andReturn('uuid-' . $i);\n $report->shouldReceive('getTeamId')->andReturn($i + 1);\n $report->shouldReceive('getFrequency')->andReturn($frequency);\n $report->shouldReceive('getType')->andReturn(AutomatedReportsService::TYPE_LOSS_ANALYSIS);\n $report->shouldReceive('isAskJiminnyReport')->andReturn(false);\n\n $reports[] = $report;\n }\n\n return $reports;\n }\n\n private function createAskJiminnyReport(string $frequency): mixed\n {\n $report = Mockery::mock();\n $report->shouldReceive('getUuid')->andReturn('ask-jiminny-uuid');\n $report->shouldReceive('getTeamId')->andReturn(99);\n $report->shouldReceive('getFrequency')->andReturn($frequency);\n $report->shouldReceive('getType')->andReturn(AutomatedReportsService::TYPE_ASK_JIMINNY);\n $report->shouldReceive('isAskJiminnyReport')->andReturn(true);\n\n return $report;\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.0140625,"top":0.041666668,"width":0.028515626,"height":0.021527778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
7108548186427266741
|
-2358355934385201923
|
idle
|
accessibility
|
NULL
|
Tests failed: 10, passed: 0
text/html
text/html
te Tests failed: 10, passed: 0
text/html
text/html
text/html
Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AutomatedReportsCommandTest
Run 'AutomatedReportsCommandTest'
Debug 'AutomatedReportsCommandTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
248
Previous Highlighted Error
Next Highlighted Error
[2026-04-14 10:05:19] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:text-relay:sync","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"9756bfa7-c8e1-4b17-bc55-9f224d2af2e3","trace_id":"9e5fa115-9cf5-45d6-a1da-109e154cfae7"}
[2026-04-14 10:05:19] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:text-relay:sync","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"9756bfa7-c8e1-4b17-bc55-9f224d2af2e3","trace_id":"9e5fa115-9cf5-45d6-a1da-109e154cfae7"}
[2026-04-14 10:05:23] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"conference:pre-meeting-notification","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"d9d68876-323b-42bd-9953-635da8008f2e","trace_id":"6c00ce4c-f2df-4ccb-908d-4862de973096"}
[2026-04-14 10:05:23] local.INFO: Running pre-meeting notification command {"correlation_id":"d9d68876-323b-42bd-9953-635da8008f2e","trace_id":"6c00ce4c-f2df-4ccb-908d-4862de973096"}
[2026-04-14 10:05:23] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"conference:pre-meeting-notification","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"d9d68876-323b-42bd-9953-635da8008f2e","trace_id":"6c00ce4c-f2df-4ccb-908d-4862de973096"}
[2026-04-14 10:05:26] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"conference:monitor:start","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"27d73fea-a8cb-4757-9bbb-fbe7222e6943","trace_id":"bcdb88d0-a641-43e4-85e8-b7dc4ab20a0e"}
[2026-04-14 10:05:26] local.INFO: Running conference:monitor:start command for activities in (2026-04-14 09:55:00, 2026-04-14 10:00:00] {"correlation_id":"27d73fea-a8cb-4757-9bbb-fbe7222e6943","trace_id":"bcdb88d0-a641-43e4-85e8-b7dc4ab20a0e"}
[2026-04-14 10:05:26] local.INFO: [conference:monitor:start] start ok {"activity_id":407307} {"correlation_id":"27d73fea-a8cb-4757-9bbb-fbe7222e6943","trace_id":"bcdb88d0-a641-43e4-85e8-b7dc4ab20a0e"}
[2026-04-14 10:05:26] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"conference:monitor:start","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"27d73fea-a8cb-4757-9bbb-fbe7222e6943","trace_id":"bcdb88d0-a641-43e4-85e8-b7dc4ab20a0e"}
[2026-04-14 10:05:28] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"conference:monitor:end","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"588bae45-3998-4b86-b056-51aaf8b6882f","trace_id":"8f716a65-7768-44c5-b0e4-02a859f329e5"}
[2026-04-14 10:05:28] local.INFO: conference:monitor:end:Jiminny\Console\Commands\Activities\MonitorMeetingEndCommand::logActivitiesEnded {"from":"10:00","to":"10:05"} {"correlation_id":"588bae45-3998-4b86-b056-51aaf8b6882f","trace_id":"8f716a65-7768-44c5-b0e4-02a859f329e5"}
[2026-04-14 10:05:28] local.INFO: conference:monitor:end:Jiminny\Console\Commands\Activities\MonitorMeetingEndCommand::logActivitiesWithUnfinishedSession {"from":"23:55","to":"00:00"} {"correlation_id":"588bae45-3998-4b86-b056-51aaf8b6882f","trace_id":"8f716a65-7768-44c5-b0e4-02a859f329e5"}
[2026-04-14 10:05:28] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"conference:monitor:end","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"588bae45-3998-4b86-b056-51aaf8b6882f","trace_id":"8f716a65-7768-44c5-b0e4-02a859f329e5"}
[2026-04-14 10:05:30] local.NOTICE: Repairing HubSpot tokens start {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:30] local.INFO: Trying to refresh HubSpot token {"account_id":59,"updated_at":"2025-10-03 09:32:05"} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:30] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:30] local.INFO: [SocialAccountService] Refreshing token from provider {"socialAccountId":59,"provider":"hubspot","refreshToken":"97b78f6e2cc49965c00c2492b602b02708b1392551e6b3f113fbaa48992af90b","state":"full-refresh"} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:31] local.ERROR: Failed to refresh HubSpot token {"account_id":59,"updated_at":"2025-10-03 09:32:05","reason":"missing or invalid refresh token","previous":""} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:31] local.INFO: Trying to refresh HubSpot token {"account_id":306,"updated_at":"2023-11-27 09:30:03"} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:31] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:31] local.INFO: [SocialAccountService] Refreshing token from provider {"socialAccountId":306,"provider":"hubspot","refreshToken":"6fa6aa8cc641d131231acc3470f5c03cb3b07b2e580fb18f8acb3b1dbb72549b","state":"full-refresh"} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:31] local.ERROR: Failed to refresh HubSpot token {"account_id":306,"updated_at":"2023-11-27 09:30:03","reason":"missing or invalid refresh token","previous":""} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:31] local.INFO: Trying to refresh HubSpot token {"account_id":1372,"updated_at":"2025-10-02 14:47:06"} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:31] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:31] local.INFO: [SocialAccountService] Refreshing token from provider {"socialAccountId":1372,"provider":"hubspot","refreshToken":"9aa73948c761da29dce46c177cf9aee1fde483a44169ca38723f9f0597d7a8c4","state":"full-refresh"} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:31] local.ERROR: Failed to refresh HubSpot token {"account_id":1372,"updated_at":"2025-10-02 14:47:06","reason":"missing or invalid refresh token","previous":""} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:31] local.NOTICE: Repairing HubSpot tokens end {"total":3,"fixed":0,"failed":3} {"correlation_id":"da835e46-68f6-4d4c-bf42-aa41de2e599d","trace_id":"7d96dad0-2325-4190-bff6-a2d83f01c4e1"}
[2026-04-14 10:05:34] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"conference:pre-meeting-reminder","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"2b2ca83a-1263-4a7c-a5d7-86dc15ea7aec","trace_id":"fbf48d3d-4e50-4442-b14f-d2ae5e6e70bd"}
[2026-04-14 10:05:34] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"crm:bullhorn:ping","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"73b127c9-c033-4fa7-a8ed-2e28077ba970","trace_id":"fd1cf3c5-d4ce-41d6-a19d-5e67fd544d9e"}
[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Polling] Getting offset from database {"offset":"","jiminny_team_id":1} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:34] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"crm:bullhorn:ping","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"73b127c9-c033-4fa7-a8ed-2e28077ba970","trace_id":"fd1cf3c5-d4ce-41d6-a19d-5e67fd544d9e"}
[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Command] Starting polling service {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Polling] Service starting {"memory_limit":"256M","max_execution_time":"0","initial_memory_mb":62.0} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Polling] Acquired polling lock {"expires_at":"2026-04-14T10:07:34.196472Z"} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Polling] Getting offset from database {"offset":"","jiminny_team_id":1} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:34] local.INFO: [HubSpot Journal API] Fetching latest journal entry {"url":"https://api.hubapi.com/webhooks/v4/journal/latest"} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:34] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"conference:pre-meeting-reminder","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"2b2ca83a-1263-4a7c-a5d7-86dc15ea7aec","trace_id":"fbf48d3d-4e50-4442-b14f-d2ae5e6e70bd"}
[2026-04-14 10:05:34] local.INFO: [HubSpot Journal Polling] No data {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:39] local.INFO: [HubSpot Journal Polling] Getting offset from database {"offset":"","jiminny_team_id":1} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:39] local.INFO: [HubSpot Journal API] Fetching latest journal entry {"url":"https://api.hubapi.com/webhooks/v4/journal/latest"} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:39] local.INFO: [HubSpot Journal Polling] No data {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:44] local.INFO: [HubSpot Journal Polling] Getting offset from database {"offset":"","jiminny_team_id":1} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:44] local.INFO: [HubSpot Journal API] Fetching latest journal entry {"url":"https://api.hubapi.com/webhooks/v4/journal/latest"} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:44] local.INFO: [HubSpot Journal Polling] No data {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:59] local.INFO: [HubSpot Journal Polling] Getting offset from database {"offset":"","jiminny_team_id":1} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:05:59] local.INFO: [HubSpot Journal API] Fetching latest journal entry {"url":"https://api.hubapi.com/webhooks/v4/journal/latest"} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:06:00] local.INFO: [HubSpot Journal Polling] No data {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:06:04] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"44f01bd8-2599-41a4-b7c3-8bb1fdf0df9a","trace_id":"b4c87c8d-120d-48fb-b13c-aee84323f3e2"}
[2026-04-14 10:06:04] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {"correlation_id":"44f01bd8-2599-41a4-b7c3-8bb1fdf0df9a","trace_id":"b4c87c8d-120d-48fb-b13c-aee84323f3e2"}
[2026-04-14 10:06:04] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"44f01bd8-2599-41a4-b7c3-8bb1fdf0df9a","trace_id":"b4c87c8d-120d-48fb-b13c-aee84323f3e2"}
[2026-04-14 10:06:06] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"8403c1e4-b5b6-41f9-9280-ff666beed28b","trace_id":"3f631f60-6d14-44f5-b6c3-b401999867f9"}
[2026-04-14 10:06:06] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"8403c1e4-b5b6-41f9-9280-ff666beed28b","trace_id":"3f631f60-6d14-44f5-b6c3-b401999867f9"}
[2026-04-14 10:06:08] local.NOTICE: Monitoring start {"correlation_id":"0d51eb08-f2f1-4322-97d0-268700856a99","trace_id":"92b45b9a-b6e8-40c8-a783-193cf1a4eea2"}
[2026-04-14 10:06:08] local.NOTICE: Monitoring end {"correlation_id":"0d51eb08-f2f1-4322-97d0-268700856a99","trace_id":"92b45b9a-b6e8-40c8-a783-193cf1a4eea2"}
[2026-04-14 10:06:10] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"0566c59b-bf67-49eb-970a-a6b955ddd756","trace_id":"724c5f5e-cd88-41fb-9b7e-74315e131024"}
[2026-04-14 10:06:10] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"0566c59b-bf67-49eb-970a-a6b955ddd756","trace_id":"724c5f5e-cd88-41fb-9b7e-74315e131024"}
[2026-04-14 10:06:12] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"33d190d4-0abb-4e63-af52-95faa913e7a1","trace_id":"703aaa4d-a551-4ed1-8a4a-609d373e2fc0"}
[2026-04-14 10:06:12] local.INFO: [EmailSchedule] STARTING batch process {"host":"docker_lamp_1"} {"correlation_id":"33d190d4-0abb-4e63-af52-95faa913e7a1","trace_id":"703aaa4d-a551-4ed1-8a4a-609d373e2fc0"}
[2026-04-14 10:06:12] local.INFO: [EmailSchedule] FINISHED batch process {"host":"docker_lamp_1","processed":0} {"correlation_id":"33d190d4-0abb-4e63-af52-95faa913e7a1","trace_id":"703aaa4d-a551-4ed1-8a4a-609d373e2fc0"}
[2026-04-14 10:06:12] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"33d190d4-0abb-4e63-af52-95faa913e7a1","trace_id":"703aaa4d-a551-4ed1-8a4a-609d373e2fc0"}
[2026-04-14 10:06:14] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"conference:monitor:count","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"da41d77d-46d9-41ae-90b7-f8418b05fb9a","trace_id":"47329a55-e6f4-406b-8730-e72d69737f09"}
[2026-04-14 10:06:14] local.INFO: Running conference:monitor:count command for activities in (2026-04-14 10:04:00, 2026-04-14 10:06:00] {"correlation_id":"da41d77d-46d9-41ae-90b7-f8418b05fb9a","trace_id":"47329a55-e6f4-406b-8730-e72d69737f09"}
[2026-04-14 10:06:14] local.INFO: [conference:monitor:count] No activities found in (2026-04-14 10:04:00, 2026-04-14 10:06:00] {"correlation_id":"da41d77d-46d9-41ae-90b7-f8418b05fb9a","trace_id":"47329a55-e6f4-406b-8730-e72d69737f09"}
[2026-04-14 10:06:14] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"conference:monitor:count","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"da41d77d-46d9-41ae-90b7-f8418b05fb9a","trace_id":"47329a55-e6f4-406b-8730-e72d69737f09"}
[2026-04-14 10:06:16] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"activity:notify-not-logged","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"310e7e99-6de4-4f93-967e-37c78e9ec826","trace_id":"2a1fdf0a-be0e-4e5a-a677-fa16ddc33e9e"}
[2026-04-14 10:06:16] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"activity:notify-not-logged","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"310e7e99-6de4-4f93-967e-37c78e9ec826","trace_id":"2a1fdf0a-be0e-4e5a-a677-fa16ddc33e9e"}
[2026-04-14 10:06:19] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:sync","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"de8430ad-f242-4536-bebe-e165320b6b26","trace_id":"75f83d2f-4e5e-4086-b062-7c1d24b5b74c"}
[2026-04-14 10:06:19] local.INFO: [EmailSchedule] STARTING Inbox Sync {"host":"docker_lamp_1"} {"correlation_id":"de8430ad-f242-4536-bebe-e165320b6b26","trace_id":"75f83d2f-4e5e-4086-b062-7c1d24b5b74c"}
[2026-04-14 10:06:19] local.INFO: [EmailSchedule] FINISHED Inbox Sync {"host":"docker_lamp_1","events":1} {"correlation_id":"de8430ad-f242-4536-bebe-e165320b6b26","trace_id":"75f83d2f-4e5e-4086-b062-7c1d24b5b74c"}
[2026-04-14 10:06:19] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:sync","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"de8430ad-f242-4536-bebe-e165320b6b26","trace_id":"75f83d2f-4e5e-4086-b062-7c1d24b5b74c"}
[2026-04-14 10:06:22] local.INFO: [Sync Mailbox] Sync start {"inbox_id":59} {"correlation_id":"eb46c86e-5c80-48b1-a4ee-ac425f197754","trace_id":"75f83d2f-4e5e-4086-b062-7c1d24b5b74c"}
[2026-04-14 10:06:22] local.INFO: [Inbox service] Skipping METADATA SYNC for inbox 59 due to unauthorized access to the mailbox {"correlation_id":"eb46c86e-5c80-48b1-a4ee-ac425f197754","trace_id":"75f83d2f-4e5e-4086-b062-7c1d24b5b74c"}
[2026-04-14 10:06:22] local.INFO: [Sync Mailbox] Sync complete {"inbox_id":59} {"correlation_id":"eb46c86e-5c80-48b1-a4ee-ac425f197754","trace_id":"75f83d2f-4e5e-4086-b062-7c1d24b5b74c"}
[2026-04-14 10:06:30] local.INFO: [HubSpot Journal Polling] Getting offset from database {"offset":"","jiminny_team_id":1} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:06:30] local.INFO: [HubSpot Journal API] Fetching latest journal entry {"url":"https://api.hubapi.com/webhooks/v4/journal/latest"} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:06:30] local.INFO: [HubSpot Journal Polling] No data {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:06:30] local.WARNING: [HubSpot Journal Polling] Maximum empty results reached, stopping {"empty_results":5,"max_empty_results":5} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:06:30] local.WARNING: [HubSpot Journal Polling] Maximum empty results reached, stopping {"empty_results":5,"max_empty_results":5} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:06:30] local.INFO: [HubSpot Journal Polling] Service ending {"runtime_seconds":56,"total_cycles":5,"files_downloaded":0,"empty_files":0,"other_portal_skipped":0,"total_events":0,"events_per_file":0,"avg_api_ms":169.9,"avg_download_ms":0.0,"avg_transform_ms":0.0,"avg_process_ms":0.0,"peak_memory_mb":99.75} {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:06:30] local.INFO: [HubSpot Journal Polling] Released polling lock {"correlation_id":"8dfaefe8-60b1-4846-bfa3-eb703c71deb8","trace_id":"186e2ff6-96dc-4ae6-a31b-0c3849678f7b"}
[2026-04-14 10:07:04] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"53329974-bdd6-4cd2-a022-0d565b0a5cf4","trace_id":"08246763-f961-45fb-b262-51378bdbc955"}
[2026-04-14 10:07:04] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {"correlation_id":"53329974-bdd6-4cd2-a022-0d565b0a5cf4","trace_id":"08246763-f961-45fb-b262-51378bdbc955"}
[2026-04-14 10:07:04] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"53329974-bdd6-4cd2-a022-0d565b0a5cf4","trace_id":"08246763-f961-45fb-b262-51378bdbc955"}
[2026-04-14 10:07:06] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"2b6586f0-419e-4422-8800-e4b7619c43d6","trace_id":"221c682d-c45f-4e4a-a793-ed11006dc6a1"}
[2026-04-14 10:07:06] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"2b6586f0-419e-4422-8800-e4b7619c43d6","trace_id":"221c682d-c45f-4e4a-a793-ed11006dc6a1"}
[2026-04-14 10:07:08] local.NOTICE: Monitoring start {"correlation_id":"9ba692ee-5286-41ca-abf0-86f6e1167a8e","trace_id":"d58ab8ad-7737-4d7c-91c0-81733c21e709"}
[2026-04-14 10:07:08] local.NOTICE: Monitoring end {"correlation_id":"9ba692ee-5286-41ca-abf0-86f6e1167a8e","trace_id":"d58ab8ad-7737-4d7c-91c0-81733c21e709"}
[2026-04-14 10:07:10] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"28e708ed-74ee-4417-a8da-c1a9ae0cd745","trace_id":"bd848201-9700-40bf-8fa4-9df13ae88f6e"}
[2026-04-14 10:07:10] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"28e708ed-74ee-4417-a8da-c1a9ae0cd745","trace_id":"bd848201-9700-40bf-8fa4-9df13ae88f6e"}
[2026-04-14 10:07:12] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"95326c5a-7b17-475d-9245-634d15d51bfe","trace_id":"31b36f9d-93cc-4917-bc7b-6b6a3da139e7"}
[2026-04-14 10:07:12] local.INFO: [EmailSchedule] STARTING batch process {"host":"docker_lamp_1"} {"correlation_id":"95326c5a-7b17-475d-9245-634d15d51bfe","trace_id":"31b36f9d-93cc-4917-bc7b-6b6a3da139e7"}
[2026-04-14 10:07:12] local.INFO: [EmailSchedule] FINISHED batch process {"host":"docker_lamp_1","processed":0} {"correlation_id":"95326c5a-7b17-475d-9245-634d15d51bfe","trace_id":"31b36f9d-93cc-4917-bc7b-6b6a3da139e7"}
[2026-04-14 10:07:12] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"95326c5a-7b17-475d-9245-634d15d51bfe","trace_id":"31b36f9d-93cc-4917-bc7b-6b6a3da139e7"}
[2026-04-14 10:07:14] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:batch:create","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"f4f68165-0bcc-4e79-89e5-81f9c627e4dc","trace_id":"5766aab2-0316-400f-aa89-168ea0579941"}
[2026-04-14 10:07:14] local.INFO: [EmailSchedule] STARTING batch create {"host":"docker_lamp_1"} {"correlation_id":"f4f68165-0bcc-4e79-89e5-81f9c627e4dc","trace_id":"5766aab2-0316-400f-aa89-168ea0579941"}
[2026-04-14 10:07:14] local.INFO: [EmailSchedule] FINISHED batch create {"host":"docker_lamp_1"} {"correlation_id":"f4f68165-0bcc-4e79-89e5-81f9c627e4dc","trace_id":"5766aab2-0316-400f-aa89-168ea0579941"}
[2026-04-14 10:07:14] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:batch:create","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"f4f68165-0bcc-4e79-89e5-81f9c627e4dc","trace_id":"5766aab2-0316-400f-aa89-168ea0579941"}
[2026-04-14 10:07:15] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"activity:sync","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"a7d5580f-8b90-4ff6-91e8-de94514f8ca1","trace_id":"fc40909d-86c1-4e45-bd51-96e2bd8c4556"}
[2026-04-14 10:07:16] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"activity:sync","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"a7d5580f-8b90-4ff6-91e8-de94514f8ca1","trace_id":"fc40909d-86c1-4e45-bd51-96e2bd8c4556"}
[2026-04-14 10:07:16] local.INFO: [Jiminny\Jobs\Mailbox\CreateBatches] processed 0 inboxes and created 0 batches {"userId":null,"batchSize":30,"maxBatches":1000} {"correlation_id":"df4d1442-bcd6-4b63-8513-802ae90993e6","trace_id":"5766aab2-0316-400f-aa89-168ea0579941"}
[2026-04-14 10:08:04] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"43299ccb-af86-42b1-b793-4ede57e2b91d","trace_id":"2f919b69-9d68-488c-89fa-2aade6ef8519"}
[2026-04-14 10:08:04] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {"correlation_id":"43299ccb-af86-42b1-b793-4ede57e2b91d","trace_id":"2f919b69-9d68-488c-89fa-2aade6ef8519"}
[2026-04-14 10:08:04] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"43299ccb-af86-42b1-b793-4ede57e2b91d","trace_id":"2f919b69-9d68-488c-89fa-2aade6ef8519"}
[2026-04-14 10:08:06] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"cde80757-333e-4268-a902-892c031b2373","trace_id":"36e932e0-8362-432f-9e36-d819f902d49e"}
[2026-04-14 10:08:06] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"cde80757-333e-4268-a902-892c031b2373","trace_id":"36e932e0-8362-432f-9e36-d819f902d49e"}
[2026-04-14 10:08:07] local.NOTICE: Monitoring start {"correlation_id":"146390f8-e91a-4e5c-b282-0c83b4947101","trace_id":"fb689e40-c867-4fc5-9847-c223835da80e"}
[2026-04-14 10:08:07] local.NOTICE: Monitoring end {"correlation_id":"146390f8-e91a-4e5c-b282-0c83b4947101","trace_id":"fb689e40-c867-4fc5-9847-c223835da80e"}
[2026-04-14 10:08:10] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"58e23da5-8f3f-4836-aac7-315ab32f74a3","trace_id":"c71267c4-b5fe-42ad-9bcd-76f6299c1538"}
[2026-04-14 10:08:10] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"58e23da5-8f3f-4836-aac7-315ab32f74a3","trace_id":"c71267c4-b5fe-42ad-9bcd-76f6299c1538"}
[2026-04-14 10:08:13] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"9158bb6f-c165-495a-9b6e-8077d8343c87","trace_id":"df378af8-cacb-41ea-b030-b8f53144fddd"}
[2026-04-14 10:08:13] local.INFO: [EmailSchedule] STARTING batch process {"host":"docker_lamp_1"} {"correlation_id":"9158bb6f-c165-495a-9b6e-8077d8343c87","trace_id":"df378af8-cacb-41ea-b030-b8f53144fddd"}
[2026-04-14 10:08:13] local.INFO: [EmailSchedule] FINISHED batch process {"host":"docker_lamp_1","processed":0} {"correlation_id":"9158bb6f-c165-495a-9b6e-8077d8343c87","trace_id":"df378af8-cacb-41ea-b030-b8f53144fddd"}
[2026-04-14 10:08:13] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"9158bb6f-c165-495a-9b6e-8077d8343c87","trace_id":"df378af8-cacb-41ea-b030-b8f53144fddd"}
[2026-04-14 10:08:14] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"conference:monitor:count","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"35774df7-e046-49ec-835f-45f9dc1ec025","trace_id":"45c5e102-6b65-4d23-9edd-684ca996316c"}
[2026-04-14 10:08:14] local.INFO: Running conference:monitor:count command for activities in (2026-04-14 10:06:00, 2026-04-14 10:08:00] {"correlation_id":"35774df7-e046-49ec-835f-45f9dc1ec025","trace_id":"45c5e102-6b65-4d23-9edd-684ca996316c"}
[2026-04-14 10:08:14] local.INFO: [conference:monitor:count] No activities found in (2026-04-14 10:06:00, 2026-04-14 10:08:00] {"correlation_id":"35774df7-e046-49ec-835f-45f9dc1ec025","trace_id":"45c5e102-6b65-4d23-9edd-684ca996316c"}
[2026-04-14 10:08:14] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"conference:monitor:count","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"35774df7-e046-49ec-835f-45f9dc1ec025","trace_id":"45c5e102-6b65-4d23-9edd-684ca996316c"}
[2026-04-14 10:08:17] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:batch:retry-failed","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"d4dc4b3b-8dc8-4665-aec7-139be0df2306","trace_id":"853f2210-e804-40aa-a1d8-4457c60f4993"}
[2026-04-14 10:08:17] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:batch:retry-failed","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"d4dc4b3b-8dc8-4665-aec7-139be0df2306","trace_id":"853f2210-e804-40aa-a1d8-4457c60f4993"}
[2026-04-14 10:09:05] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"8052fb2f-5876-4e2c-8f64-c770d9fe37fe","trace_id":"63249c19-bf59-4e52-9096-156d537a9786"}
[2026-04-14 10:09:05] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {"correlation_id":"8052fb2f-5876-4e2c-8f64-c770d9fe37fe","trace_id":"63249c19-bf59-4e52-9096-156d537a9786"}
[2026-04-14 10:09:05] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"8052fb2f-5876-4e2c-8f64-c770d9fe37fe","trace_id":"63249c19-bf59-4e52-9096-156d537a9786"}
[2026-04-14 10:09:07] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"1dd274b4-f71d-486e-b6c4-aaf106304102","trace_id":"1d55139c-a58d-4456-801a-9bcb3bf9b024"}
[2026-04-14 10:09:07] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"1dd274b4-f71d-486e-b6c4-aaf106304102","trace_id":"1d55139c-a58d-4456-801a-9bcb3bf9b024"}
[2026-04-14 10:09:10] local.NOTICE: Monitoring start {"correlation_id":"09dc762e-2b78-4dbb-a880-5c8f1cbfc4ad","trace_id":"8e60392d-4ea4-41f2-be2f-a01853c7a1ab"}
[2026-04-14 10:09:10] local.NOTICE: Monitoring end {"correlation_id":"09dc762e-2b78-4dbb-a880-5c8f1cbfc4ad","trace_id":"8e60392d-4ea4-41f2-be2f-a01853c7a1ab"}
[2026-04-14 10:09:13] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"2de9f84e-2691-459d-adfd-f5f6746501d0","trace_id":"418ad958-86c0-4477-b0fb-e487768d6fa1"}
[2026-04-14 10:09:13] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"2de9f84e-2691-459d-adfd-f5f6746501d0","trace_id":"418ad958-86c0-4477-b0fb-e487768d6fa1"}
[2026-04-14 10:09:16] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"1be8488c-ae59-4f42-8475-c426905c3ca6","trace_id":"aeb8b412-635e-4929-915f-fb3fe5786eae"}
[2026-04-14 10:09:16] local.INFO: [EmailSchedule] STARTING batch process {"host":"docker_lamp_1"} {"correlation_id":"1be8488c-ae59-4f42-8475-c426905c3ca6","trace_id":"aeb8b412-635e-4929-915f-fb3fe5786eae"}
[2026-04-14 10:09:16] local.INFO: [EmailSchedule] FINISHED batch process {"host":"docker_lamp_1","processed":0} {"correlation_id":"1be8488c-ae59-4f42-8475-c426905c3ca6","trace_id":"aeb8b412-635e-4929-915f-fb3fe5786eae"}
[2026-04-14 10:09:16] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"1be8488c-ae59-4f42-8475-c426905c3ca6","trace_id":"aeb8b412-635e-4929-915f-fb3fe5786eae"}
[2026-04-14 10:09:18] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"activity:aircall:check-and-renew","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"b3d1b688-309f-4df0-9dcd-9a733c87f597","trace_id":"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c"}
[2026-04-14 10:09:18] local.INFO: [SocialAccountService] Fetching token {"socialAccountId":1496,"provider":"aircall"} {"correlation_id":"b3d1b688-309f-4df0-9dcd-9a733c87f597","trace_id":"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c"}
[2026-04-14 10:09:18] local.INFO: [SocialAccountService] Token retrieved {"socialAccountId":1496,"provider":"aircall"} {"correlation_id":"b3d1b688-309f-4df0-9dcd-9a733c87f597","trace_id":"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c"}
[2026-04-14 10:09:18] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"b3d1b688-309f-4df0-9dcd-9a733c87f597","trace_id":"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c"}
[2026-04-14 10:09:18] local.ERROR: [Aircall] Re-activating webhooks failed {"team_id":1,"reason":"{\"message\":\"Forbidden\"}"} {"correlation_id":"b3d1b688-309f-4df0-9dcd-9a733c87f597","trace_id":"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c"}
[2026-04-14 10:09:18] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"activity:aircall:check-and-renew","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"b3d1b688-309f-4df0-9dcd-9a733c87f597","trace_id":"f36f2d5a-efd0-474a-afd8-d4ec2ff4c60c"}
[2026-04-14 10:09:21] local.INFO: [RetryFailedDownloads] Starting {"options":{"from":null,"to":null,"help":false,"silent":false,"quiet":false,"verbose":false,"version":false,"ansi":null,"no-interaction":false,"env":null}} {"correlation_id":"c7aba065-c8f1-473d-b8b5-4797245873bf","trace_id":"48f587f9-dd77-4634-9ad9-1137b029b5f5"}
[2026-04-14 10:10:04] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"7310aae5-3829-4d5c-bbc9-f6550a35f539","trace_id":"6099cf10-45e2-4b82-9649-649e2f8a1209"}
[2026-04-14 10:10:04] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {"correlation_id":"7310aae5-3829-4d5c-bbc9-f6550a35f539","trace_id":"6099cf10-45e2-4b82-9649-649e2f8a1209"}
[2026-04-14 10:10:04] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"7310aae5-3829-4d5c-bbc9-f6550a35f539","trace_id":"6099cf10-45e2-4b82-9649-649e2f8a1209"}
[2026-04-14 10:10:06] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"5119d94e-0c61-4312-a740-2b569388cc9f","trace_id":"6a412a32-3bc3-46a4-af7c-24ad560a4e41"}
[2026-04-14 10:10:06] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"5119d94e-0c61-4312-a740-2b569388cc9f","trace_id":"6a412a32-3bc3-46a4-af7c-24ad560a4e41"}
[2026-04-14 10:10:08] local.NOTICE: Monitoring start {"correlation_id":"95cdb3b7-b356-4325-be28-20663ece6aa0","trace_id":"e64a75a4-2493-4f35-ba46-ccd002e6b7b7"}
[2026-04-14 10:10:08] local.NOTICE: Monitoring end {"correlation_id":"95cdb3b7-b356-4325-be28-20663ece6aa0","trace_id":"e64a75a4-2493-4f35-ba46-ccd002e6b7b7"}
[2026-04-14 10:10:10] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"6460dd5f-4b94-4cd1-867e-53304d785744","trace_id":"683b103d-2dfc-4266-84a2-d5cd799b133f"}
[2026-04-14 10:10:10] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"6460dd5f-4b94-4cd1-867e-53304d785744","trace_id":"683b103d-2dfc-4266-84a2-d5cd799b133f"}
[2026-04-14 10:10:11] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"5a59007d-2a12-4977-8a5a-59c678aa12ee","trace_id":"bc3a2ad5-9f13-4728-adaa-529da75cf011"}
[2026-04-14 10:10:11] local.INFO: [EmailSchedule] STARTING batch process {"host":"docker_lamp_1"} {"correlation_id":"5a59007d-2a12-4977-8a5a-59c678aa12ee","trace_id":"bc3a2ad5-9f13-4728-adaa-529da75cf011"}
[2026-04-14 10:10:11] local.INFO: [EmailSchedule] FINISHED batch process {"host":"docker_lamp_1","processed":0} {"correlation_id":"5a59007d-2a12-4977-8a5a-59c678aa12ee","trace_id":"bc3a2ad5-9f13-4728-adaa-529da75cf011"}
[2026-04-14 10:10:11] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"5a59007d-2a12-4977-8a5a-59c678aa12ee","trace_id":"bc3a2ad5-9f13-4728-adaa-529da75cf011"}
[2026-04-14 10:10:14] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"conference:monitor:count","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"afe2ff6b-1b9e-4485-bdad-a758d873a782","trace_id":"d507becf-55d6-4fda-8831-e981f95b85c8"}
[2026-04-14 10:10:14] local.INFO: Running conference:monitor:count command for activities in (2026-04-14 10:08:00, 2026-04-14 10:10:00] {"correlation_id":"afe2ff6b-1b9e-4485-bdad-a758d873a782","trace_id":"d507becf-55d6-4fda-8831-e981f95b85c8"}
[2026-04-14 10:10:14] local.INFO: [conference:monitor:count] No activities found in (2026-04-14 10:08:00, 2026-04-14 10:10:00] {"correlation_id":"afe2ff6b-1b9e-4485-bdad-a758d873a782","trace_id":"d507becf-55d6-4fda-8831-e981f95b85c8"}
[2026-04-14 10:10:14] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"conference:monitor:count","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"afe2ff6b-1b9e-4485-bdad-a758d873a782","trace_id":"d507becf-55d6-4fda-8831-e981f95b85c8"}
[2026-04-14 10:10:16] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"activity:purge-stale","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"ebe2ad2b-df9a-48d7-b78f-d52b7489c6f0","trace_id":"05b44216-d5ac-44cd-b74b-3e92567b192d"}
[2026-04-14 10:10:16] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"activity:purge-stale","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"ebe2ad2b-df9a-48d7-b78f-d52b7489c6f0","trace_id":"05b44216-d5ac-44cd-b74b-3e92567b192d"}
[2026-04-14 10:10:18] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:text-relay:sync","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"d76b00ee-6271-4df7-ba45-769738bbb7ae","trace_id":"92384790-9588-452d-abea-cdd25a2fe7ff"}
[2026-04-14 10:10:18] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:text-relay:sync","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"d76b00ee-6271-4df7-ba45-769738bbb7ae","trace_id":"92384790-9588-452d-abea-cdd25a2fe7ff"}
[2026-04-14 10:10:20] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"conference:pre-meeting-notification","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"c8f3b5c1-bef5-4584-b9d8-0c10578fefac","trace_id":"b700f03d-b02b-495e-b505-1598c7a9ea4b"}
[2026-04-14 10:10:20] local.INFO: Running pre-meeting notification command {"correlation_id":"c8f3b5c1-bef5-4584-b9d8-0c10578fefac","trace_id":"b700f03d-b02b-495e-b505-1598c7a9ea4b"}
[2026-04-14 10:10:20] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"conference:pre-meeting-notification","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"c8f3b5c1-bef5-4584-b9d8-0c10578fefac","trace_id":"b700f03d-b02b-495e-b505-1598c7a9ea4b"}
[2026-04-14 10:10:22] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"conference:monitor:start","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"d7b97fbb-00b9-47c2-ae81-dda03fd8b253","trace_id":"54447306-49bf-4629-8de0-bb191c61cce2"}
[2026-04-14 10:10:22] local.INFO: Running conference:monitor:start command for activities in (2026-04-14 10:00:00, 2026-04-14 10:05:00] {"correlation_id":"d7b97fbb-00b9-47c2-ae81-dda03fd8b253","trace_id":"54447306-49bf-4629-8de0-bb191c61cce2"}
[2026-04-14 10:10:22] local.INFO: [conference:monitor:start] No activities found in (2026-04-14 10:00:00, 2026-04-14 10:05:00] {"correlation_id":"d7b97fbb-00b9-47c2-ae81-dda03fd8b253","trace_id":"54447306-49bf-4629-8de0-bb191c61cce2"}
[2026-04-14 10:10:22] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"conference:monitor:start","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"d7b97fbb-00b9-47c2-ae81-dda03fd8b253","trace_id":"54447306-49bf-4629-8de0-bb191c61cce2"}
[2026-04-14 10:10:23] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"conference:monitor:end","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.746} {"correlation_id":"07665538-664f-421e-af9b-97152a688b68","trace_id":"d116813e-2d96-4a3d-ae04-6e53d69ca565"}
[2026-04-14 10:10:23] local.INFO: conference:monitor:end:Jiminny\Console\Commands\Activities\MonitorMeetingEndCommand::logActivitiesEnded {"from":"10:05","to":"10:10"} {"correlation_id":"07665538-664f-421e-af9b-97152a688b68","trace_id":"d116813e-2d96-4a3d-ae04-6e53d69ca565"}
[2026-04-14 10:10:23] local.INFO: conference:monitor:end:Jiminny\Console\Commands\Activities\MonitorMeetingEndCommand::logActivitiesWithUnfinishedSession {"from":"00:00","to":"00:05"} {"correlation_id":"07665538-664f-421e-af9b-97152a688b68","trace_id":"d116813e-2d96-4a3d-ae04-6e53d69ca565"}
[2026-04-14 10:10:23] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"conference:monitor:end","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.746,"memoryPeakAfterCommandInMB":99.746} {"correlation_id":"07665538-664f-421e-af9b-97152a688b68","trace_id":"d116813e-2d96-4a3d-ae04-6e53d69ca565"}
[2026-04-14 10:10:25] local.NOTICE: Repairing HubSpot tokens start {"correlation_id":"d269668d-cb18-4aeb-9a05-13a9e53195ed","trace_id":"ecbe2fde-809f-4720-8113-609eda111b53"}
[2026-04-14 10:10:25] local.INFO: Trying to refresh HubSpot token {"account_id":59,"updated_at":"2025-10-03 09:32:05"} {"correlation_id":"d269668d-cb18-4aeb-9a05-13a9e53195ed","trace_id":"ecbe2fde-809f-4720-8113-609eda111b53"}
[2026-04-14 10:10:25] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"d269668d-cb18-4aeb-9a05-13a9e53195ed","trace_id":"ecbe2fde-809f-4720-8113-609eda111b53"}
[2026-04-14 10:10:25] local.INFO: [SocialAccountService] Refreshing token from provider {"socialAccountId":59,"provider":"hubspot","refreshToken":"97b78f6e2cc49965c00c2492b602b02708b1392551e6b3f113fbaa48992af90b","state":"full-refresh"} {"correlation_id":"d269668d-cb18-4aeb-9a05-13a9e53195ed","trace_id":"ecbe2fde-809f-4720-8113-609eda11...
|
NULL
|
|
74866
|
1863
|
34
|
2026-04-23T10:21:47.818222+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-23/1776 /Users/lukas/.screenpipe/data/data/2026-04-23/1776939707818_m1.jpg...
|
Sequel Ace
|
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_c (MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories...
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
TABLES
playbook_categories
playbook_layouts
playbo TABLES
playbook_categories
playbook_layouts
playbooks
playbook
search
cancel
add
Quick Look
action
refresh
id
INT
10
PRI
auto_increment
uuid
BINARY
16
UNI
None
playbook_id
INT
10
MUL
None
type
CHAR
20
all
None
name
VARCHAR
150
None
ai_prompt_description
TEXT
NULL
None
is_selectable
TINYINT
1
1
None
sequence
TINYINT
3
0
None
was_answered
TINYINT
1
1
None
is_default
TINYINT
1
0
None
created_at
TIMESTAMP...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"TABLES","depth":6,"value":"TABLES","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook_categories","depth":6,"value":"playbook_categories","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook_layouts","depth":6,"value":"playbook_layouts","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbooks","depth":6,"value":"playbooks","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook","depth":3,"automation_id":"_NS:879","value":"playbook","placeholder":"Filter","role_description":"search text field","subrole":"AXSearchField","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"search","depth":4,"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"cancel","depth":4,"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"add","depth":2,"automation_id":"_NS:4671","help_text":"Add new table","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Quick Look","depth":2,"automation_id":"_NS:1133","help_text":"Toggle the visibility of the Information panel","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXMenuButton","text":"action","depth":2,"automation_id":"_NS:1882","role_description":"menu button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"refresh","depth":2,"automation_id":"_NS:3295","help_text":"Refresh table list","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"id","depth":7,"value":"id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"PRI","depth":7,"role_description":"text"},{"role":"AXComboBox","text":"auto_increment","depth":7,"value":"auto_increment","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"uuid","depth":7,"value":"uuid","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"BINARY","depth":7,"value":"BINARY","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"16","depth":7,"value":"16","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"UNI","depth":7,"role_description":"text"},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"playbook_id","depth":7,"value":"playbook_id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"MUL","depth":7,"role_description":"text"},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"type","depth":7,"value":"type","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"CHAR","depth":7,"value":"CHAR","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"20","depth":7,"value":"20","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"all","depth":7,"value":"all","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"name","depth":7,"value":"name","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"VARCHAR","depth":7,"value":"VARCHAR","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"150","depth":7,"value":"150","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"ai_prompt_description","depth":7,"value":"ai_prompt_description","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TEXT","depth":7,"value":"TEXT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"NULL","depth":7,"value":"NULL","role_description":"text field","is_enabled":false,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"is_selectable","depth":7,"value":"is_selectable","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"1","depth":7,"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"1","depth":7,"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"sequence","depth":7,"value":"sequence","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"3","depth":7,"value":"3","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"0","depth":7,"value":"0","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"was_answered","depth":7,"value":"was_answered","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"1","depth":7,"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"1","depth":7,"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"is_default","depth":7,"value":"is_default","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"1","depth":7,"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"0","depth":7,"value":"0","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"created_at","depth":7,"value":"created_at","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TIMESTAMP","depth":7,"value":"TIMESTAMP","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false}]...
|
8056798269019544680
|
361465088795263031
|
app_switch
|
accessibility
|
NULL
|
TABLES
playbook_categories
playbook_layouts
playbo TABLES
playbook_categories
playbook_layouts
playbooks
playbook
search
cancel
add
Quick Look
action
refresh
id
INT
10
PRI
auto_increment
uuid
BINARY
16
UNI
None
playbook_id
INT
10
MUL
None
type
CHAR
20
all
None
name
VARCHAR
150
None
ai_prompt_description
TEXT
NULL
None
is_selectable
TINYINT
1
1
None
sequence
TINYINT
3
0
None
was_answered
TINYINT
1
1
None
is_default
TINYINT
1
0
None
created_at
TIMESTAMP...
|
NULL
|
|
74896
|
1865
|
8
|
2026-04-23T10:23:49.557507+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-23/1776 /Users/lukas/.screenpipe/data/data/2026-04-23/1776939829557_m1.jpg...
|
Sequel Ace
|
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_c (MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories...
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
TABLES
playbook_categories
playbook_layouts
playbo TABLES
playbook_categories
playbook_layouts
playbooks
playbook
search
cancel
add
Quick Look
action
refresh
id
INT
10
PRI
auto_increment
uuid
BINARY
16
UNI
None
playbook_id
INT
10
MUL
None
type
CHAR
20
all
None
name
VARCHAR
150
None
ai_prompt_description
TEXT
NULL
None
is_selectable
TINYINT
1
1
None
sequence
TINYINT
3
0
None
was_answered
TINYINT
1
1
None
is_default
TINYINT
1
0
None
created_at
TIMESTAMP
NULL
None
updated_at
TIMESTAMP
NULL
None
Field
Type
Length
Unsigned
Zerofill
Binary
Allow Null
Key
Default
Extra
Encoding
Collation
Comment
smart item
action
remove
refresh
add
0
PRIMARY
1
id
A
25080
NULL
NULL
0
playbook_categories_uuid_unique
1
uuid
A
25080
NULL
NULL
1
playbook_categories_playbook_id_index
1
playbook_id
A
1254
NULL
NULL
Non_unique
Key_name...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"TABLES","depth":6,"value":"TABLES","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook_categories","depth":6,"value":"playbook_categories","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook_layouts","depth":6,"value":"playbook_layouts","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbooks","depth":6,"value":"playbooks","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook","depth":3,"automation_id":"_NS:879","value":"playbook","placeholder":"Filter","role_description":"search text field","subrole":"AXSearchField","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"search","depth":4,"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"cancel","depth":4,"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"add","depth":2,"automation_id":"_NS:4671","help_text":"Add new table","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Quick Look","depth":2,"automation_id":"_NS:1133","help_text":"Toggle the visibility of the Information panel","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXMenuButton","text":"action","depth":2,"automation_id":"_NS:1882","role_description":"menu button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"refresh","depth":2,"automation_id":"_NS:3295","help_text":"Refresh table list","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"id","depth":7,"value":"id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"PRI","depth":7,"role_description":"text"},{"role":"AXComboBox","text":"auto_increment","depth":7,"value":"auto_increment","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"uuid","depth":7,"value":"uuid","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"BINARY","depth":7,"value":"BINARY","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"16","depth":7,"value":"16","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"UNI","depth":7,"role_description":"text"},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"playbook_id","depth":7,"value":"playbook_id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"MUL","depth":7,"role_description":"text"},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"type","depth":7,"value":"type","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"CHAR","depth":7,"value":"CHAR","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"20","depth":7,"value":"20","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"all","depth":7,"value":"all","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"name","depth":7,"value":"name","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"VARCHAR","depth":7,"value":"VARCHAR","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"150","depth":7,"value":"150","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"ai_prompt_description","depth":7,"value":"ai_prompt_description","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TEXT","depth":7,"value":"TEXT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"NULL","depth":7,"value":"NULL","role_description":"text field","is_enabled":false,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"is_selectable","depth":7,"value":"is_selectable","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"1","depth":7,"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"1","depth":7,"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"sequence","depth":7,"value":"sequence","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"3","depth":7,"value":"3","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"0","depth":7,"value":"0","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"was_answered","depth":7,"value":"was_answered","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"1","depth":7,"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"1","depth":7,"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"is_default","depth":7,"value":"is_default","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"1","depth":7,"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"0","depth":7,"value":"0","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"created_at","depth":7,"value":"created_at","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TIMESTAMP","depth":7,"value":"TIMESTAMP","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"NULL","depth":7,"value":"NULL","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"updated_at","depth":7,"value":"updated_at","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TIMESTAMP","depth":7,"value":"TIMESTAMP","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"NULL","depth":7,"value":"NULL","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXButton","text":"Field","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Type","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Length","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Unsigned","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Zerofill","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Binary","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Allow Null","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Key","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Default","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Extra","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Encoding","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Collation","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Comment","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"smart item","depth":4,"automation_id":"_NS:3756","help_text":"Edit Table Details (⌘4)","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXMenuButton","text":"action","depth":4,"automation_id":"_NS:1160","role_description":"menu button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"remove","depth":4,"automation_id":"_NS:4152","help_text":"Delete selected field (⌫)","role_description":"button","is_enabled":false,"is_focused":false},{"role":"AXButton","text":"refresh","depth":4,"automation_id":"_NS:2110","help_text":"Refresh table structure (⌘R)","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"add","depth":4,"automation_id":"_NS:1610","help_text":"Add field (⌥⌘A)","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"0","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"PRIMARY","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"id","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"A","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"25080","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"0","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"playbook_categories_uuid_unique","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"uuid","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"A","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"25080","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"playbook_categories_playbook_id_index","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"playbook_id","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"A","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"1254","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"role_description":"text"},{"role":"AXButton","text":"Non_unique","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Key_name","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false}]...
|
65816182224957502
|
865986925664190642
|
app_switch
|
accessibility
|
NULL
|
TABLES
playbook_categories
playbook_layouts
playbo TABLES
playbook_categories
playbook_layouts
playbooks
playbook
search
cancel
add
Quick Look
action
refresh
id
INT
10
PRI
auto_increment
uuid
BINARY
16
UNI
None
playbook_id
INT
10
MUL
None
type
CHAR
20
all
None
name
VARCHAR
150
None
ai_prompt_description
TEXT
NULL
None
is_selectable
TINYINT
1
1
None
sequence
TINYINT
3
0
None
was_answered
TINYINT
1
1
None
is_default
TINYINT
1
0
None
created_at
TIMESTAMP
NULL
None
updated_at
TIMESTAMP
NULL
None
Field
Type
Length
Unsigned
Zerofill
Binary
Allow Null
Key
Default
Extra
Encoding
Collation
Comment
smart item
action
remove
refresh
add
0
PRIMARY
1
id
A
25080
NULL
NULL
0
playbook_categories_uuid_unique
1
uuid
A
25080
NULL
NULL
1
playbook_categories_playbook_id_index
1
playbook_id
A
1254
NULL
NULL
Non_unique
Key_name...
|
NULL
|
|
74832
|
1863
|
20
|
2026-04-23T10:19:22.494940+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-23/1776 /Users/lukas/.screenpipe/data/data/2026-04-23/1776939562494_m1.jpg...
|
Sequel Ace
|
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_c (MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories...
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
TABLES
playbook_categories
playbook_layouts
playbo TABLES
playbook_categories
playbook_layouts
playbooks
playbook
search
cancel
add
Quick Look
action
refresh
id
INT
10
PRI
auto_increment
uuid
BINARY
16
UNI
None
playbook_id
INT
10
MUL
None
type
CHAR
20
all
None
name
VARCHAR
150
None
ai_prompt_description
TEXT
NULL
None
is_selectable
TINYINT
1
1
None
sequence
TINYINT
3
0
None
was_answered
TINYINT
1
1
None
is_default
TINYINT
1
0
None
created_at
TIMESTAMP
NULL
None
updated_at
TIMESTAMP
NULL
None
Field
Type
Length
Unsigned
Zerofill
Binary
Allow Null
Key
Default
Extra
Encoding
Collation
Comment
smart item
action
remove
refresh
add
0
PRIMARY
1
id
A
25080
NULL
NULL
0
playbook_categories_uuid_unique
1
uuid
A
25080
NULL
NULL
1
playbook_categories_playbook_id_index
1
playbook_id
A
1254
NULL
NULL
Non_unique
Key_name
Seq_in_index
Column_name
Collation
Cardinality
Sub_part
Packed
Comment
remove
refresh
add
INDEXES
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"TABLES","depth":6,"value":"TABLES","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook_categories","depth":6,"value":"playbook_categories","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook_layouts","depth":6,"value":"playbook_layouts","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbooks","depth":6,"value":"playbooks","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook","depth":3,"automation_id":"_NS:879","value":"playbook","placeholder":"Filter","role_description":"search text field","subrole":"AXSearchField","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"search","depth":4,"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"cancel","depth":4,"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"add","depth":2,"automation_id":"_NS:4671","help_text":"Add new table","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Quick Look","depth":2,"automation_id":"_NS:1133","help_text":"Toggle the visibility of the Information panel","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXMenuButton","text":"action","depth":2,"automation_id":"_NS:1882","role_description":"menu button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"refresh","depth":2,"automation_id":"_NS:3295","help_text":"Refresh table list","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"id","depth":7,"value":"id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"PRI","depth":7,"role_description":"text"},{"role":"AXComboBox","text":"auto_increment","depth":7,"value":"auto_increment","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"uuid","depth":7,"value":"uuid","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"BINARY","depth":7,"value":"BINARY","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"16","depth":7,"value":"16","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"UNI","depth":7,"role_description":"text"},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"playbook_id","depth":7,"value":"playbook_id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"MUL","depth":7,"role_description":"text"},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"type","depth":7,"value":"type","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"CHAR","depth":7,"value":"CHAR","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"20","depth":7,"value":"20","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"all","depth":7,"value":"all","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"name","depth":7,"value":"name","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"VARCHAR","depth":7,"value":"VARCHAR","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"150","depth":7,"value":"150","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"ai_prompt_description","depth":7,"value":"ai_prompt_description","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TEXT","depth":7,"value":"TEXT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"NULL","depth":7,"value":"NULL","role_description":"text field","is_enabled":false,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"is_selectable","depth":7,"value":"is_selectable","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"1","depth":7,"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"1","depth":7,"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"sequence","depth":7,"value":"sequence","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"3","depth":7,"value":"3","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"0","depth":7,"value":"0","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"was_answered","depth":7,"value":"was_answered","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"1","depth":7,"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"1","depth":7,"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"is_default","depth":7,"value":"is_default","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"1","depth":7,"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"0","depth":7,"value":"0","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"created_at","depth":7,"value":"created_at","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TIMESTAMP","depth":7,"value":"TIMESTAMP","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"NULL","depth":7,"value":"NULL","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"updated_at","depth":7,"value":"updated_at","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TIMESTAMP","depth":7,"value":"TIMESTAMP","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"NULL","depth":7,"value":"NULL","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXButton","text":"Field","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Type","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Length","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Unsigned","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Zerofill","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Binary","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Allow Null","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Key","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Default","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Extra","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Encoding","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Collation","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Comment","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"smart item","depth":4,"automation_id":"_NS:3756","help_text":"Edit Table Details (⌘4)","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXMenuButton","text":"action","depth":4,"automation_id":"_NS:1160","role_description":"menu button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"remove","depth":4,"automation_id":"_NS:4152","help_text":"Delete selected field (⌫)","role_description":"button","is_enabled":false,"is_focused":false},{"role":"AXButton","text":"refresh","depth":4,"automation_id":"_NS:2110","help_text":"Refresh table structure (⌘R)","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"add","depth":4,"automation_id":"_NS:1610","help_text":"Add field (⌥⌘A)","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"0","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"PRIMARY","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"id","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"A","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"25080","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"0","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"playbook_categories_uuid_unique","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"uuid","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"A","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"25080","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"playbook_categories_playbook_id_index","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"playbook_id","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"A","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"1254","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"role_description":"text"},{"role":"AXButton","text":"Non_unique","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Key_name","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Seq_in_index","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Column_name","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Collation","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Cardinality","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Sub_part","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Packed","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Comment","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"remove","depth":4,"automation_id":"_NS:1930","help_text":"Delete selected index","role_description":"button","is_enabled":false,"is_focused":false},{"role":"AXButton","text":"refresh","depth":4,"automation_id":"_NS:2593","help_text":"Refresh table indexes (⌘R)","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"add","depth":4,"automation_id":"_NS:3332","help_text":"Add index","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"INDEXES","depth":4,"automation_id":"_NS:3948","role_description":"text"},{"role":"AXStaticText","text":"(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories","depth":1,"role_description":"text"}]...
|
-3855442780064241766
|
884529157329404594
|
app_switch
|
accessibility
|
NULL
|
TABLES
playbook_categories
playbook_layouts
playbo TABLES
playbook_categories
playbook_layouts
playbooks
playbook
search
cancel
add
Quick Look
action
refresh
id
INT
10
PRI
auto_increment
uuid
BINARY
16
UNI
None
playbook_id
INT
10
MUL
None
type
CHAR
20
all
None
name
VARCHAR
150
None
ai_prompt_description
TEXT
NULL
None
is_selectable
TINYINT
1
1
None
sequence
TINYINT
3
0
None
was_answered
TINYINT
1
1
None
is_default
TINYINT
1
0
None
created_at
TIMESTAMP
NULL
None
updated_at
TIMESTAMP
NULL
None
Field
Type
Length
Unsigned
Zerofill
Binary
Allow Null
Key
Default
Extra
Encoding
Collation
Comment
smart item
action
remove
refresh
add
0
PRIMARY
1
id
A
25080
NULL
NULL
0
playbook_categories_uuid_unique
1
uuid
A
25080
NULL
NULL
1
playbook_categories_playbook_id_index
1
playbook_id
A
1254
NULL
NULL
Non_unique
Key_name
Seq_in_index
Column_name
Collation
Cardinality
Sub_part
Packed
Comment
remove
refresh
add
INDEXES
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories...
|
NULL
|
|
74868
|
1863
|
35
|
2026-04-23T10:21:49.568765+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-23/1776 /Users/lukas/.screenpipe/data/data/2026-04-23/1776939709568_m1.jpg...
|
Sequel Ace
|
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_c (MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories...
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
TABLES
playbook_categories
playbook_layouts
playbo TABLES
playbook_categories
playbook_layouts
playbooks
playbook
search
cancel
add
Quick Look
action
refresh
id
INT
10
PRI
auto_increment
uuid
BINARY
16
UNI
None
playbook_id
INT
10
MUL
None
type
CHAR
20
all
None
name
VARCHAR
150
None
ai_prompt_description
TEXT
NULL
None
is_selectable
TINYINT
1
1
None
sequence
TINYINT
3
0
None
was_answered
TINYINT
1
1
None
is_default
TINYINT
1
0
None
created_at
TIMESTAMP
NULL
None
updated_at
TIMESTAMP
NULL
None
Field
Type
Length
Unsigned
Zerofill
Binary
Allow Null
Key
Default
Extra
Encoding
Collation
Comment
smart item
action
remove
refresh
add
0
PRIMARY
1
id
A
25080
NULL
NULL
0
playbook_categories_uuid_unique
1
uuid
A
25080
NULL
NULL
1
playbook_categories_playbook_id_index
1
playbook_id
A
1254
NULL
NULL
Non_unique
Key_name
Seq_in_index
Column_name
Collation
Cardinality
Sub_part
Packed
Comment
remove
refresh
add
INDEXES
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"TABLES","depth":6,"value":"TABLES","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook_categories","depth":6,"value":"playbook_categories","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook_layouts","depth":6,"value":"playbook_layouts","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbooks","depth":6,"value":"playbooks","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook","depth":3,"automation_id":"_NS:879","value":"playbook","placeholder":"Filter","role_description":"search text field","subrole":"AXSearchField","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"search","depth":4,"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"cancel","depth":4,"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"add","depth":2,"automation_id":"_NS:4671","help_text":"Add new table","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Quick Look","depth":2,"automation_id":"_NS:1133","help_text":"Toggle the visibility of the Information panel","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXMenuButton","text":"action","depth":2,"automation_id":"_NS:1882","role_description":"menu button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"refresh","depth":2,"automation_id":"_NS:3295","help_text":"Refresh table list","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"id","depth":7,"value":"id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"PRI","depth":7,"role_description":"text"},{"role":"AXComboBox","text":"auto_increment","depth":7,"value":"auto_increment","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"uuid","depth":7,"value":"uuid","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"BINARY","depth":7,"value":"BINARY","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"16","depth":7,"value":"16","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"UNI","depth":7,"role_description":"text"},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"playbook_id","depth":7,"value":"playbook_id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"MUL","depth":7,"role_description":"text"},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"type","depth":7,"value":"type","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"CHAR","depth":7,"value":"CHAR","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"20","depth":7,"value":"20","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"all","depth":7,"value":"all","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"name","depth":7,"value":"name","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"VARCHAR","depth":7,"value":"VARCHAR","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"150","depth":7,"value":"150","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"ai_prompt_description","depth":7,"value":"ai_prompt_description","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TEXT","depth":7,"value":"TEXT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"NULL","depth":7,"value":"NULL","role_description":"text field","is_enabled":false,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"is_selectable","depth":7,"value":"is_selectable","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"1","depth":7,"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"1","depth":7,"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"sequence","depth":7,"value":"sequence","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"3","depth":7,"value":"3","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"0","depth":7,"value":"0","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"was_answered","depth":7,"value":"was_answered","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"1","depth":7,"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"1","depth":7,"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"is_default","depth":7,"value":"is_default","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"1","depth":7,"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"0","depth":7,"value":"0","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"created_at","depth":7,"value":"created_at","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TIMESTAMP","depth":7,"value":"TIMESTAMP","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"NULL","depth":7,"value":"NULL","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"updated_at","depth":7,"value":"updated_at","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TIMESTAMP","depth":7,"value":"TIMESTAMP","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"NULL","depth":7,"value":"NULL","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXButton","text":"Field","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Type","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Length","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Unsigned","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Zerofill","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Binary","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Allow Null","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Key","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Default","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Extra","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Encoding","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Collation","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Comment","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"smart item","depth":4,"automation_id":"_NS:3756","help_text":"Edit Table Details (⌘4)","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXMenuButton","text":"action","depth":4,"automation_id":"_NS:1160","role_description":"menu button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"remove","depth":4,"automation_id":"_NS:4152","help_text":"Delete selected field (⌫)","role_description":"button","is_enabled":false,"is_focused":false},{"role":"AXButton","text":"refresh","depth":4,"automation_id":"_NS:2110","help_text":"Refresh table structure (⌘R)","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"add","depth":4,"automation_id":"_NS:1610","help_text":"Add field (⌥⌘A)","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"0","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"PRIMARY","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"id","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"A","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"25080","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"0","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"playbook_categories_uuid_unique","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"uuid","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"A","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"25080","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"playbook_categories_playbook_id_index","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"playbook_id","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"A","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"1254","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"role_description":"text"},{"role":"AXButton","text":"Non_unique","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Key_name","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Seq_in_index","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Column_name","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Collation","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Cardinality","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Sub_part","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Packed","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Comment","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"remove","depth":4,"automation_id":"_NS:1930","help_text":"Delete selected index","role_description":"button","is_enabled":false,"is_focused":false},{"role":"AXButton","text":"refresh","depth":4,"automation_id":"_NS:2593","help_text":"Refresh table indexes (⌘R)","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"add","depth":4,"automation_id":"_NS:3332","help_text":"Add index","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"INDEXES","depth":4,"automation_id":"_NS:3948","role_description":"text"},{"role":"AXStaticText","text":"(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories","depth":1,"role_description":"text"}]...
|
-3855442780064241766
|
884529157329404594
|
visual_change
|
accessibility
|
NULL
|
TABLES
playbook_categories
playbook_layouts
playbo TABLES
playbook_categories
playbook_layouts
playbooks
playbook
search
cancel
add
Quick Look
action
refresh
id
INT
10
PRI
auto_increment
uuid
BINARY
16
UNI
None
playbook_id
INT
10
MUL
None
type
CHAR
20
all
None
name
VARCHAR
150
None
ai_prompt_description
TEXT
NULL
None
is_selectable
TINYINT
1
1
None
sequence
TINYINT
3
0
None
was_answered
TINYINT
1
1
None
is_default
TINYINT
1
0
None
created_at
TIMESTAMP
NULL
None
updated_at
TIMESTAMP
NULL
None
Field
Type
Length
Unsigned
Zerofill
Binary
Allow Null
Key
Default
Extra
Encoding
Collation
Comment
smart item
action
remove
refresh
add
0
PRIMARY
1
id
A
25080
NULL
NULL
0
playbook_categories_uuid_unique
1
uuid
A
25080
NULL
NULL
1
playbook_categories_playbook_id_index
1
playbook_id
A
1254
NULL
NULL
Non_unique
Key_name
Seq_in_index
Column_name
Collation
Cardinality
Sub_part
Packed
Comment
remove
refresh
add
INDEXES
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories...
|
74866
|
|
74898
|
1865
|
9
|
2026-04-23T10:23:50.536199+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-23/1776 /Users/lukas/.screenpipe/data/data/2026-04-23/1776939830536_m1.jpg...
|
Sequel Ace
|
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_c (MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories...
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
TABLES
playbook_categories
playbook_layouts
playbo TABLES
playbook_categories
playbook_layouts
playbooks
playbook
search
cancel
add
Quick Look
action
refresh
id
INT
10
PRI
auto_increment
uuid
BINARY
16
UNI
None
playbook_id
INT
10
MUL
None
type
CHAR
20
all
None
name
VARCHAR
150
None
ai_prompt_description
TEXT
NULL
None
is_selectable
TINYINT
1
1
None
sequence
TINYINT
3
0
None
was_answered
TINYINT
1
1
None
is_default
TINYINT
1
0
None
created_at
TIMESTAMP
NULL
None
updated_at
TIMESTAMP
NULL
None
Field
Type
Length
Unsigned
Zerofill
Binary
Allow Null
Key
Default
Extra
Encoding
Collation
Comment
smart item
action
remove
refresh
add
0
PRIMARY
1
id
A
25080
NULL
NULL
0
playbook_categories_uuid_unique
1
uuid
A
25080
NULL
NULL
1
playbook_categories_playbook_id_index
1
playbook_id
A
1254
NULL
NULL
Non_unique
Key_name
Seq_in_index
Column_name
Collation
Cardinality
Sub_part
Packed
Comment
remove
refresh
add
INDEXES
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"TABLES","depth":6,"value":"TABLES","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook_categories","depth":6,"value":"playbook_categories","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook_layouts","depth":6,"value":"playbook_layouts","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbooks","depth":6,"value":"playbooks","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook","depth":3,"automation_id":"_NS:879","value":"playbook","placeholder":"Filter","role_description":"search text field","subrole":"AXSearchField","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"search","depth":4,"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"cancel","depth":4,"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"add","depth":2,"automation_id":"_NS:4671","help_text":"Add new table","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Quick Look","depth":2,"automation_id":"_NS:1133","help_text":"Toggle the visibility of the Information panel","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXMenuButton","text":"action","depth":2,"automation_id":"_NS:1882","role_description":"menu button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"refresh","depth":2,"automation_id":"_NS:3295","help_text":"Refresh table list","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"id","depth":7,"value":"id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"PRI","depth":7,"role_description":"text"},{"role":"AXComboBox","text":"auto_increment","depth":7,"value":"auto_increment","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"uuid","depth":7,"value":"uuid","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"BINARY","depth":7,"value":"BINARY","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"16","depth":7,"value":"16","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"UNI","depth":7,"role_description":"text"},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"playbook_id","depth":7,"value":"playbook_id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"MUL","depth":7,"role_description":"text"},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"type","depth":7,"value":"type","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"CHAR","depth":7,"value":"CHAR","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"20","depth":7,"value":"20","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"all","depth":7,"value":"all","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"name","depth":7,"value":"name","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"VARCHAR","depth":7,"value":"VARCHAR","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"150","depth":7,"value":"150","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"ai_prompt_description","depth":7,"value":"ai_prompt_description","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TEXT","depth":7,"value":"TEXT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"NULL","depth":7,"value":"NULL","role_description":"text field","is_enabled":false,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"is_selectable","depth":7,"value":"is_selectable","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"1","depth":7,"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"1","depth":7,"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"sequence","depth":7,"value":"sequence","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"3","depth":7,"value":"3","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"0","depth":7,"value":"0","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"was_answered","depth":7,"value":"was_answered","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"1","depth":7,"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"1","depth":7,"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"is_default","depth":7,"value":"is_default","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"1","depth":7,"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"0","depth":7,"value":"0","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"created_at","depth":7,"value":"created_at","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TIMESTAMP","depth":7,"value":"TIMESTAMP","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"NULL","depth":7,"value":"NULL","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"updated_at","depth":7,"value":"updated_at","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TIMESTAMP","depth":7,"value":"TIMESTAMP","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"NULL","depth":7,"value":"NULL","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXButton","text":"Field","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Type","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Length","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Unsigned","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Zerofill","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Binary","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Allow Null","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Key","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Default","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Extra","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Encoding","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Collation","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Comment","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"smart item","depth":4,"automation_id":"_NS:3756","help_text":"Edit Table Details (⌘4)","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXMenuButton","text":"action","depth":4,"automation_id":"_NS:1160","role_description":"menu button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"remove","depth":4,"automation_id":"_NS:4152","help_text":"Delete selected field (⌫)","role_description":"button","is_enabled":false,"is_focused":false},{"role":"AXButton","text":"refresh","depth":4,"automation_id":"_NS:2110","help_text":"Refresh table structure (⌘R)","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"add","depth":4,"automation_id":"_NS:1610","help_text":"Add field (⌥⌘A)","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"0","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"PRIMARY","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"id","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"A","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"25080","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"0","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"playbook_categories_uuid_unique","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"uuid","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"A","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"25080","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"playbook_categories_playbook_id_index","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"playbook_id","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"A","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"1254","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"role_description":"text"},{"role":"AXButton","text":"Non_unique","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Key_name","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Seq_in_index","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Column_name","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Collation","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Cardinality","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Sub_part","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Packed","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Comment","depth":7,"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"remove","depth":4,"automation_id":"_NS:1930","help_text":"Delete selected index","role_description":"button","is_enabled":false,"is_focused":false},{"role":"AXButton","text":"refresh","depth":4,"automation_id":"_NS:2593","help_text":"Refresh table indexes (⌘R)","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"add","depth":4,"automation_id":"_NS:3332","help_text":"Add index","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"INDEXES","depth":4,"automation_id":"_NS:3948","role_description":"text"},{"role":"AXStaticText","text":"(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories","depth":1,"role_description":"text"}]...
|
-3855442780064241766
|
884529157329404594
|
visual_change
|
accessibility
|
NULL
|
TABLES
playbook_categories
playbook_layouts
playbo TABLES
playbook_categories
playbook_layouts
playbooks
playbook
search
cancel
add
Quick Look
action
refresh
id
INT
10
PRI
auto_increment
uuid
BINARY
16
UNI
None
playbook_id
INT
10
MUL
None
type
CHAR
20
all
None
name
VARCHAR
150
None
ai_prompt_description
TEXT
NULL
None
is_selectable
TINYINT
1
1
None
sequence
TINYINT
3
0
None
was_answered
TINYINT
1
1
None
is_default
TINYINT
1
0
None
created_at
TIMESTAMP
NULL
None
updated_at
TIMESTAMP
NULL
None
Field
Type
Length
Unsigned
Zerofill
Binary
Allow Null
Key
Default
Extra
Encoding
Collation
Comment
smart item
action
remove
refresh
add
0
PRIMARY
1
id
A
25080
NULL
NULL
0
playbook_categories_uuid_unique
1
uuid
A
25080
NULL
NULL
1
playbook_categories_playbook_id_index
1
playbook_id
A
1254
NULL
NULL
Non_unique
Key_name
Seq_in_index
Column_name
Collation
Cardinality
Sub_part
Packed
Comment
remove
refresh
add
INDEXES
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories...
|
74896
|
|
74867
|
1864
|
45
|
2026-04-23T10:21:47.817456+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-23/1776 /Users/lukas/.screenpipe/data/data/2026-04-23/1776939707817_m2.jpg...
|
Sequel Ace
|
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_c (MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories...
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
TABLES
playbook_categories
playbook_layouts
playbo TABLES
playbook_categories
playbook_layouts
playbooks
playbook
search
cancel
add
Quick Look
action
refresh
id
INT
10
PRI
auto_increment
uuid
BINARY
16
UNI
None
playbook_id
INT
10
MUL
None
type
CHAR
20
all
None
name
VARCHAR
150
None
ai_prompt_description
TEXT
NULL
None
is_selectable
TINYINT
1
1
None
sequence
TINYINT
3
0
None
was_answered
TINYINT
1
1
None
is_default
TINYINT
1
0
None
created_at
TIMESTAMP...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"TABLES","depth":6,"bounds":{"left":0.26595744,"top":0.09417398,"width":0.0787899,"height":0.019952115},"value":"TABLES","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook_categories","depth":6,"bounds":{"left":0.26595744,"top":0.11572227,"width":0.0787899,"height":0.015163607},"value":"playbook_categories","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook_layouts","depth":6,"bounds":{"left":0.26595744,"top":0.13248204,"width":0.0787899,"height":0.015163607},"value":"playbook_layouts","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbooks","depth":6,"bounds":{"left":0.26595744,"top":0.14924182,"width":0.0787899,"height":0.015163607},"value":"playbooks","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook","depth":3,"bounds":{"left":0.26230052,"top":0.06384677,"width":0.08610372,"height":0.017557861},"automation_id":"_NS:879","value":"playbook","placeholder":"Filter","role_description":"search text field","subrole":"AXSearchField","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"search","depth":4,"bounds":{"left":0.2629654,"top":0.06384677,"width":0.00831117,"height":0.017557861},"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"cancel","depth":4,"bounds":{"left":0.33976063,"top":0.06384677,"width":0.00731383,"height":0.017557861},"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"add","depth":2,"bounds":{"left":0.2606383,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:4671","help_text":"Add new table","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Quick Look","depth":2,"bounds":{"left":0.29554522,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:1133","help_text":"Toggle the visibility of the Information panel","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXMenuButton","text":"action","depth":2,"bounds":{"left":0.26894948,"top":0.698324,"width":0.011635638,"height":0.019952115},"automation_id":"_NS:1882","role_description":"menu button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"refresh","depth":2,"bounds":{"left":0.2839096,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:3295","help_text":"Refresh table list","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"id","depth":7,"bounds":{"left":0.35272607,"top":0.0830008,"width":0.078125,"height":0.015163607},"value":"id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"bounds":{"left":0.4318484,"top":0.0830008,"width":0.04255319,"height":0.015163607},"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"bounds":{"left":0.47539893,"top":0.0830008,"width":0.12815824,"height":0.015163607},"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"PRI","depth":7,"bounds":{"left":0.68234706,"top":0.0830008,"width":0.019946808,"height":0.015163607},"role_description":"text"},{"role":"AXComboBox","text":"auto_increment","depth":7,"bounds":{"left":0.7237367,"top":0.0830008,"width":0.028091755,"height":0.015163607},"value":"auto_increment","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"uuid","depth":7,"bounds":{"left":0.35272607,"top":0.09976058,"width":0.078125,"height":0.015163607},"value":"uuid","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"BINARY","depth":7,"bounds":{"left":0.4318484,"top":0.09976058,"width":0.04255319,"height":0.015163607},"value":"BINARY","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"16","depth":7,"bounds":{"left":0.47539893,"top":0.09976058,"width":0.12815824,"height":0.015163607},"value":"16","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"UNI","depth":7,"bounds":{"left":0.68234706,"top":0.09976058,"width":0.019946808,"height":0.015163607},"role_description":"text"},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.09976058,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"playbook_id","depth":7,"bounds":{"left":0.35272607,"top":0.11652035,"width":0.078125,"height":0.015163607},"value":"playbook_id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"bounds":{"left":0.4318484,"top":0.11652035,"width":0.04255319,"height":0.015163607},"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"bounds":{"left":0.47539893,"top":0.11652035,"width":0.12815824,"height":0.015163607},"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"MUL","depth":7,"bounds":{"left":0.68234706,"top":0.11652035,"width":0.019946808,"height":0.015163607},"role_description":"text"},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.11652035,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"type","depth":7,"bounds":{"left":0.35272607,"top":0.13328013,"width":0.078125,"height":0.015163607},"value":"type","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"CHAR","depth":7,"bounds":{"left":0.4318484,"top":0.13328013,"width":0.04255319,"height":0.015163607},"value":"CHAR","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"20","depth":7,"bounds":{"left":0.47539893,"top":0.13328013,"width":0.12815824,"height":0.015163607},"value":"20","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"all","depth":7,"bounds":{"left":0.70329124,"top":0.13328013,"width":0.019448139,"height":0.015163607},"value":"all","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.13328013,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"name","depth":7,"bounds":{"left":0.35272607,"top":0.15003991,"width":0.078125,"height":0.015163607},"value":"name","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"VARCHAR","depth":7,"bounds":{"left":0.4318484,"top":0.15003991,"width":0.04255319,"height":0.015163607},"value":"VARCHAR","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"150","depth":7,"bounds":{"left":0.47539893,"top":0.15003991,"width":0.12815824,"height":0.015163607},"value":"150","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.15003991,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"ai_prompt_description","depth":7,"bounds":{"left":0.35272607,"top":0.16679968,"width":0.078125,"height":0.015163607},"value":"ai_prompt_description","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TEXT","depth":7,"bounds":{"left":0.4318484,"top":0.16679968,"width":0.04255319,"height":0.015163607},"value":"TEXT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"NULL","depth":7,"bounds":{"left":0.70329124,"top":0.16679968,"width":0.019448139,"height":0.015163607},"value":"NULL","role_description":"text field","is_enabled":false,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.16679968,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"is_selectable","depth":7,"bounds":{"left":0.35272607,"top":0.18355946,"width":0.078125,"height":0.015163607},"value":"is_selectable","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"bounds":{"left":0.4318484,"top":0.18355946,"width":0.04255319,"height":0.015163607},"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"1","depth":7,"bounds":{"left":0.47539893,"top":0.18355946,"width":0.12815824,"height":0.015163607},"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"1","depth":7,"bounds":{"left":0.70329124,"top":0.18355946,"width":0.019448139,"height":0.015163607},"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.18355946,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"sequence","depth":7,"bounds":{"left":0.35272607,"top":0.20031923,"width":0.078125,"height":0.015163607},"value":"sequence","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"bounds":{"left":0.4318484,"top":0.20031923,"width":0.04255319,"height":0.015163607},"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"3","depth":7,"bounds":{"left":0.47539893,"top":0.20031923,"width":0.12815824,"height":0.015163607},"value":"3","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"0","depth":7,"bounds":{"left":0.70329124,"top":0.20031923,"width":0.019448139,"height":0.015163607},"value":"0","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.20031923,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"was_answered","depth":7,"bounds":{"left":0.35272607,"top":0.21707901,"width":0.078125,"height":0.015163607},"value":"was_answered","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"bounds":{"left":0.4318484,"top":0.21707901,"width":0.04255319,"height":0.015163607},"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"1","depth":7,"bounds":{"left":0.47539893,"top":0.21707901,"width":0.12815824,"height":0.015163607},"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"1","depth":7,"bounds":{"left":0.70329124,"top":0.21707901,"width":0.019448139,"height":0.015163607},"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.21707901,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"is_default","depth":7,"bounds":{"left":0.35272607,"top":0.23383878,"width":0.078125,"height":0.015163607},"value":"is_default","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"bounds":{"left":0.4318484,"top":0.23383878,"width":0.04255319,"height":0.015163607},"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"1","depth":7,"bounds":{"left":0.47539893,"top":0.23383878,"width":0.12815824,"height":0.015163607},"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"0","depth":7,"bounds":{"left":0.70329124,"top":0.23383878,"width":0.019448139,"height":0.015163607},"value":"0","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.23383878,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"created_at","depth":7,"bounds":{"left":0.35272607,"top":0.25059855,"width":0.078125,"height":0.015163607},"value":"created_at","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TIMESTAMP","depth":7,"bounds":{"left":0.4318484,"top":0.25059855,"width":0.04255319,"height":0.015163607},"value":"TIMESTAMP","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false}]...
|
8056798269019544680
|
361465088795263031
|
app_switch
|
accessibility
|
NULL
|
TABLES
playbook_categories
playbook_layouts
playbo TABLES
playbook_categories
playbook_layouts
playbooks
playbook
search
cancel
add
Quick Look
action
refresh
id
INT
10
PRI
auto_increment
uuid
BINARY
16
UNI
None
playbook_id
INT
10
MUL
None
type
CHAR
20
all
None
name
VARCHAR
150
None
ai_prompt_description
TEXT
NULL
None
is_selectable
TINYINT
1
1
None
sequence
TINYINT
3
0
None
was_answered
TINYINT
1
1
None
is_default
TINYINT
1
0
None
created_at
TIMESTAMP...
|
NULL
|
|
74833
|
1864
|
25
|
2026-04-23T10:19:22.439800+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-23/1776 /Users/lukas/.screenpipe/data/data/2026-04-23/1776939562439_m2.jpg...
|
Sequel Ace
|
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_c (MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories...
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
TABLES
playbook_categories
playbook_layouts
playbo TABLES
playbook_categories
playbook_layouts
playbooks
playbook
search
cancel
add
Quick Look
action
refresh
id
INT
10
PRI
auto_increment
uuid
BINARY
16
UNI
None
playbook_id
INT
10
MUL
None
type
CHAR
20
all
None
name
VARCHAR
150
None
ai_prompt_description
TEXT
NULL
None
is_selectable
TINYINT
1
1
None
sequence
TINYINT
3
0
None
was_answered
TINYINT
1
1
None
is_default
TINYINT
1
0
None
created_at
TIMESTAMP
NULL
None
updated_at
TIMESTAMP
NULL
None
Field
Type
Length
Unsigned
Zerofill
Binary
Allow Null
Key
Default
Extra
Encoding
Collation
Comment
smart item
action
remove
refresh
add
0
PRIMARY
1
id
A
25080
NULL
NULL
0
playbook_categories_uuid_unique
1
uuid
A
25080
NULL
NULL
1
playbook_categories_playbook_id_index
1
playbook_id
A
1254
NULL
NULL
Non_unique
Key_name
Seq_in_index
Column_name
Collation
Cardinality
Sub_part
Packed
Comment
remove
refresh
add
INDEXES
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"TABLES","depth":6,"bounds":{"left":0.26595744,"top":0.09417398,"width":0.0787899,"height":0.019952115},"value":"TABLES","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook_categories","depth":6,"bounds":{"left":0.26595744,"top":0.11572227,"width":0.0787899,"height":0.015163607},"value":"playbook_categories","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook_layouts","depth":6,"bounds":{"left":0.26595744,"top":0.13248204,"width":0.0787899,"height":0.015163607},"value":"playbook_layouts","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbooks","depth":6,"bounds":{"left":0.26595744,"top":0.14924182,"width":0.0787899,"height":0.015163607},"value":"playbooks","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook","depth":3,"bounds":{"left":0.26230052,"top":0.06384677,"width":0.08610372,"height":0.017557861},"automation_id":"_NS:879","value":"playbook","placeholder":"Filter","role_description":"search text field","subrole":"AXSearchField","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"search","depth":4,"bounds":{"left":0.2629654,"top":0.06384677,"width":0.00831117,"height":0.017557861},"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"cancel","depth":4,"bounds":{"left":0.33976063,"top":0.06384677,"width":0.00731383,"height":0.017557861},"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"add","depth":2,"bounds":{"left":0.2606383,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:4671","help_text":"Add new table","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Quick Look","depth":2,"bounds":{"left":0.29554522,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:1133","help_text":"Toggle the visibility of the Information panel","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXMenuButton","text":"action","depth":2,"bounds":{"left":0.26894948,"top":0.698324,"width":0.011635638,"height":0.019952115},"automation_id":"_NS:1882","role_description":"menu button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"refresh","depth":2,"bounds":{"left":0.2839096,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:3295","help_text":"Refresh table list","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"id","depth":7,"bounds":{"left":0.35272607,"top":0.0830008,"width":0.078125,"height":0.015163607},"value":"id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"bounds":{"left":0.4318484,"top":0.0830008,"width":0.04255319,"height":0.015163607},"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"bounds":{"left":0.47539893,"top":0.0830008,"width":0.12815824,"height":0.015163607},"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"PRI","depth":7,"bounds":{"left":0.68234706,"top":0.0830008,"width":0.019946808,"height":0.015163607},"role_description":"text"},{"role":"AXComboBox","text":"auto_increment","depth":7,"bounds":{"left":0.7237367,"top":0.0830008,"width":0.028091755,"height":0.015163607},"value":"auto_increment","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"uuid","depth":7,"bounds":{"left":0.35272607,"top":0.09976058,"width":0.078125,"height":0.015163607},"value":"uuid","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"BINARY","depth":7,"bounds":{"left":0.4318484,"top":0.09976058,"width":0.04255319,"height":0.015163607},"value":"BINARY","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"16","depth":7,"bounds":{"left":0.47539893,"top":0.09976058,"width":0.12815824,"height":0.015163607},"value":"16","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"UNI","depth":7,"bounds":{"left":0.68234706,"top":0.09976058,"width":0.019946808,"height":0.015163607},"role_description":"text"},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.09976058,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"playbook_id","depth":7,"bounds":{"left":0.35272607,"top":0.11652035,"width":0.078125,"height":0.015163607},"value":"playbook_id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"bounds":{"left":0.4318484,"top":0.11652035,"width":0.04255319,"height":0.015163607},"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"bounds":{"left":0.47539893,"top":0.11652035,"width":0.12815824,"height":0.015163607},"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"MUL","depth":7,"bounds":{"left":0.68234706,"top":0.11652035,"width":0.019946808,"height":0.015163607},"role_description":"text"},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.11652035,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"type","depth":7,"bounds":{"left":0.35272607,"top":0.13328013,"width":0.078125,"height":0.015163607},"value":"type","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"CHAR","depth":7,"bounds":{"left":0.4318484,"top":0.13328013,"width":0.04255319,"height":0.015163607},"value":"CHAR","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"20","depth":7,"bounds":{"left":0.47539893,"top":0.13328013,"width":0.12815824,"height":0.015163607},"value":"20","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"all","depth":7,"bounds":{"left":0.70329124,"top":0.13328013,"width":0.019448139,"height":0.015163607},"value":"all","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.13328013,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"name","depth":7,"bounds":{"left":0.35272607,"top":0.15003991,"width":0.078125,"height":0.015163607},"value":"name","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"VARCHAR","depth":7,"bounds":{"left":0.4318484,"top":0.15003991,"width":0.04255319,"height":0.015163607},"value":"VARCHAR","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"150","depth":7,"bounds":{"left":0.47539893,"top":0.15003991,"width":0.12815824,"height":0.015163607},"value":"150","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.15003991,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"ai_prompt_description","depth":7,"bounds":{"left":0.35272607,"top":0.16679968,"width":0.078125,"height":0.015163607},"value":"ai_prompt_description","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TEXT","depth":7,"bounds":{"left":0.4318484,"top":0.16679968,"width":0.04255319,"height":0.015163607},"value":"TEXT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"NULL","depth":7,"bounds":{"left":0.70329124,"top":0.16679968,"width":0.019448139,"height":0.015163607},"value":"NULL","role_description":"text field","is_enabled":false,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.16679968,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"is_selectable","depth":7,"bounds":{"left":0.35272607,"top":0.18355946,"width":0.078125,"height":0.015163607},"value":"is_selectable","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"bounds":{"left":0.4318484,"top":0.18355946,"width":0.04255319,"height":0.015163607},"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"1","depth":7,"bounds":{"left":0.47539893,"top":0.18355946,"width":0.12815824,"height":0.015163607},"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"1","depth":7,"bounds":{"left":0.70329124,"top":0.18355946,"width":0.019448139,"height":0.015163607},"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.18355946,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"sequence","depth":7,"bounds":{"left":0.35272607,"top":0.20031923,"width":0.078125,"height":0.015163607},"value":"sequence","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"bounds":{"left":0.4318484,"top":0.20031923,"width":0.04255319,"height":0.015163607},"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"3","depth":7,"bounds":{"left":0.47539893,"top":0.20031923,"width":0.12815824,"height":0.015163607},"value":"3","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"0","depth":7,"bounds":{"left":0.70329124,"top":0.20031923,"width":0.019448139,"height":0.015163607},"value":"0","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.20031923,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"was_answered","depth":7,"bounds":{"left":0.35272607,"top":0.21707901,"width":0.078125,"height":0.015163607},"value":"was_answered","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"bounds":{"left":0.4318484,"top":0.21707901,"width":0.04255319,"height":0.015163607},"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"1","depth":7,"bounds":{"left":0.47539893,"top":0.21707901,"width":0.12815824,"height":0.015163607},"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"1","depth":7,"bounds":{"left":0.70329124,"top":0.21707901,"width":0.019448139,"height":0.015163607},"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.21707901,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"is_default","depth":7,"bounds":{"left":0.35272607,"top":0.23383878,"width":0.078125,"height":0.015163607},"value":"is_default","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"bounds":{"left":0.4318484,"top":0.23383878,"width":0.04255319,"height":0.015163607},"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"1","depth":7,"bounds":{"left":0.47539893,"top":0.23383878,"width":0.12815824,"height":0.015163607},"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"0","depth":7,"bounds":{"left":0.70329124,"top":0.23383878,"width":0.019448139,"height":0.015163607},"value":"0","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.23383878,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"created_at","depth":7,"bounds":{"left":0.35272607,"top":0.25059855,"width":0.078125,"height":0.015163607},"value":"created_at","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TIMESTAMP","depth":7,"bounds":{"left":0.4318484,"top":0.25059855,"width":0.04255319,"height":0.015163607},"value":"TIMESTAMP","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"NULL","depth":7,"bounds":{"left":0.70329124,"top":0.25059855,"width":0.019448139,"height":0.015163607},"value":"NULL","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.25059855,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"updated_at","depth":7,"bounds":{"left":0.35272607,"top":0.26735833,"width":0.078125,"height":0.015163607},"value":"updated_at","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TIMESTAMP","depth":7,"bounds":{"left":0.4318484,"top":0.26735833,"width":0.04255319,"height":0.015163607},"value":"TIMESTAMP","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"NULL","depth":7,"bounds":{"left":0.70329124,"top":0.26735833,"width":0.019448139,"height":0.015163607},"value":"NULL","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.26735833,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXButton","text":"Field","depth":7,"bounds":{"left":0.35073137,"top":0.059856344,"width":0.080784574,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Type","depth":7,"bounds":{"left":0.43151596,"top":0.059856344,"width":0.043550532,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Length","depth":7,"bounds":{"left":0.47506648,"top":0.059856344,"width":0.12915559,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Unsigned","depth":7,"bounds":{"left":0.60422206,"top":0.059856344,"width":0.018949468,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Zerofill","depth":7,"bounds":{"left":0.62317157,"top":0.059856344,"width":0.024933511,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Binary","depth":7,"bounds":{"left":0.648105,"top":0.059856344,"width":0.013962766,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Allow Null","depth":7,"bounds":{"left":0.66206783,"top":0.059856344,"width":0.019946808,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Key","depth":7,"bounds":{"left":0.68201464,"top":0.059856344,"width":0.020944148,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Default","depth":7,"bounds":{"left":0.70295876,"top":0.059856344,"width":0.02044548,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Extra","depth":7,"bounds":{"left":0.7234042,"top":0.059856344,"width":0.029089095,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Encoding","depth":7,"bounds":{"left":0.7524933,"top":0.059856344,"width":0.012632979,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Collation","depth":7,"bounds":{"left":0.76512635,"top":0.059856344,"width":0.012632979,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Comment","depth":7,"bounds":{"left":0.7777593,"top":0.059856344,"width":0.010472074,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"smart item","depth":4,"bounds":{"left":0.71642286,"top":0.44732642,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:3756","help_text":"Edit Table Details (⌘4)","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXMenuButton","text":"action","depth":4,"bounds":{"left":0.72639626,"top":0.44732642,"width":0.011635638,"height":0.019952115},"automation_id":"_NS:1160","role_description":"menu button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"remove","depth":4,"bounds":{"left":0.36037233,"top":0.44732642,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:4152","help_text":"Delete selected field (⌫)","role_description":"button","is_enabled":false,"is_focused":false},{"role":"AXButton","text":"refresh","depth":4,"bounds":{"left":0.38031915,"top":0.44732642,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:2110","help_text":"Refresh table structure (⌘R)","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"add","depth":4,"bounds":{"left":0.35039893,"top":0.44732642,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:1610","help_text":"Add field (⌥⌘A)","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"0","depth":7,"bounds":{"left":0.35239363,"top":0.5079808,"width":0.024268618,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"PRIMARY","depth":7,"bounds":{"left":0.3776596,"top":0.5079808,"width":0.021276595,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":7,"bounds":{"left":0.39993352,"top":0.5079808,"width":0.025764627,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"id","depth":7,"bounds":{"left":0.42669547,"top":0.5079808,"width":0.028424202,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"A","depth":7,"bounds":{"left":0.45611703,"top":0.5079808,"width":0.018450798,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"25080","depth":7,"bounds":{"left":0.47556517,"top":0.5079808,"width":0.021775266,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"bounds":{"left":0.49833778,"top":0.5079808,"width":0.01861702,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"bounds":{"left":0.51795214,"top":0.5079808,"width":0.014295213,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"0","depth":7,"bounds":{"left":0.35239363,"top":0.52474064,"width":0.024268618,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"playbook_categories_uuid_unique","depth":7,"bounds":{"left":0.3776596,"top":0.52474064,"width":0.021276595,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":7,"bounds":{"left":0.39993352,"top":0.52474064,"width":0.025764627,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"uuid","depth":7,"bounds":{"left":0.42669547,"top":0.52474064,"width":0.028424202,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"A","depth":7,"bounds":{"left":0.45611703,"top":0.52474064,"width":0.018450798,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"25080","depth":7,"bounds":{"left":0.47556517,"top":0.52474064,"width":0.021775266,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"bounds":{"left":0.49833778,"top":0.52474064,"width":0.01861702,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"bounds":{"left":0.51795214,"top":0.52474064,"width":0.014295213,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":7,"bounds":{"left":0.35239363,"top":0.5415004,"width":0.024268618,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"playbook_categories_playbook_id_index","depth":7,"bounds":{"left":0.3776596,"top":0.5415004,"width":0.021276595,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":7,"bounds":{"left":0.39993352,"top":0.5415004,"width":0.025764627,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"playbook_id","depth":7,"bounds":{"left":0.42669547,"top":0.5415004,"width":0.028424202,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"A","depth":7,"bounds":{"left":0.45611703,"top":0.5415004,"width":0.018450798,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"1254","depth":7,"bounds":{"left":0.47556517,"top":0.5415004,"width":0.021775266,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"bounds":{"left":0.49833778,"top":0.5415004,"width":0.01861702,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"bounds":{"left":0.51795214,"top":0.5415004,"width":0.014295213,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Non_unique","depth":7,"bounds":{"left":0.35039893,"top":0.4848364,"width":0.026928192,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Key_name","depth":7,"bounds":{"left":0.3773271,"top":0.4848364,"width":0.022273935,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Seq_in_index","depth":7,"bounds":{"left":0.39960107,"top":0.4848364,"width":0.026761968,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Column_name","depth":7,"bounds":{"left":0.42636302,"top":0.4848364,"width":0.029421542,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Collation","depth":7,"bounds":{"left":0.4557846,"top":0.4848364,"width":0.019448139,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Cardinality","depth":7,"bounds":{"left":0.47523272,"top":0.4848364,"width":0.022772606,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Sub_part","depth":7,"bounds":{"left":0.49800533,"top":0.4848364,"width":0.019614361,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Packed","depth":7,"bounds":{"left":0.51761967,"top":0.4848364,"width":0.015292553,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Comment","depth":7,"bounds":{"left":0.53291225,"top":0.4848364,"width":0.03756649,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"remove","depth":4,"bounds":{"left":0.36037233,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:1930","help_text":"Delete selected index","role_description":"button","is_enabled":false,"is_focused":false},{"role":"AXButton","text":"refresh","depth":4,"bounds":{"left":0.37034574,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:2593","help_text":"Refresh table indexes (⌘R)","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"add","depth":4,"bounds":{"left":0.35039893,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:3332","help_text":"Add index","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"INDEXES","depth":4,"bounds":{"left":0.35139626,"top":0.47047088,"width":0.051529255,"height":0.011173184},"automation_id":"_NS:3948","role_description":"text"},{"role":"AXStaticText","text":"(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories","depth":1,"bounds":{"left":0.28956118,"top":0.019952115,"width":0.18550532,"height":0.0415004},"role_description":"text"}]...
|
-3855442780064241766
|
884529157329404594
|
app_switch
|
accessibility
|
NULL
|
TABLES
playbook_categories
playbook_layouts
playbo TABLES
playbook_categories
playbook_layouts
playbooks
playbook
search
cancel
add
Quick Look
action
refresh
id
INT
10
PRI
auto_increment
uuid
BINARY
16
UNI
None
playbook_id
INT
10
MUL
None
type
CHAR
20
all
None
name
VARCHAR
150
None
ai_prompt_description
TEXT
NULL
None
is_selectable
TINYINT
1
1
None
sequence
TINYINT
3
0
None
was_answered
TINYINT
1
1
None
is_default
TINYINT
1
0
None
created_at
TIMESTAMP
NULL
None
updated_at
TIMESTAMP
NULL
None
Field
Type
Length
Unsigned
Zerofill
Binary
Allow Null
Key
Default
Extra
Encoding
Collation
Comment
smart item
action
remove
refresh
add
0
PRIMARY
1
id
A
25080
NULL
NULL
0
playbook_categories_uuid_unique
1
uuid
A
25080
NULL
NULL
1
playbook_categories_playbook_id_index
1
playbook_id
A
1254
NULL
NULL
Non_unique
Key_name
Seq_in_index
Column_name
Collation
Cardinality
Sub_part
Packed
Comment
remove
refresh
add
INDEXES
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories...
|
NULL
|
|
74869
|
1864
|
46
|
2026-04-23T10:21:50.199877+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-23/1776 /Users/lukas/.screenpipe/data/data/2026-04-23/1776939710199_m2.jpg...
|
Sequel Ace
|
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_c (MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories...
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
TABLES
playbook_categories
playbook_layouts
playbo TABLES
playbook_categories
playbook_layouts
playbooks
playbook
search
cancel
add
Quick Look
action
refresh
id
INT
10
PRI
auto_increment
uuid
BINARY
16
UNI
None
playbook_id
INT
10
MUL
None
type
CHAR
20
all
None
name
VARCHAR
150
None
ai_prompt_description
TEXT
NULL
None
is_selectable
TINYINT
1
1
None
sequence
TINYINT
3
0
None
was_answered
TINYINT
1
1
None
is_default
TINYINT
1
0
None
created_at
TIMESTAMP
NULL
None
updated_at
TIMESTAMP
NULL
None
Field
Type
Length
Unsigned
Zerofill
Binary
Allow Null
Key
Default
Extra
Encoding
Collation
Comment
smart item
action
remove
refresh
add
0
PRIMARY
1
id
A
25080
NULL
NULL
0
playbook_categories_uuid_unique
1
uuid
A
25080
NULL
NULL
1
playbook_categories_playbook_id_index
1
playbook_id
A
1254
NULL
NULL
Non_unique
Key_name
Seq_in_index
Column_name
Collation
Cardinality
Sub_part
Packed
Comment
remove
refresh
add
INDEXES
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"TABLES","depth":6,"bounds":{"left":0.26595744,"top":0.09417398,"width":0.0787899,"height":0.019952115},"value":"TABLES","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook_categories","depth":6,"bounds":{"left":0.26595744,"top":0.11572227,"width":0.0787899,"height":0.015163607},"value":"playbook_categories","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook_layouts","depth":6,"bounds":{"left":0.26595744,"top":0.13248204,"width":0.0787899,"height":0.015163607},"value":"playbook_layouts","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbooks","depth":6,"bounds":{"left":0.26595744,"top":0.14924182,"width":0.0787899,"height":0.015163607},"value":"playbooks","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook","depth":3,"bounds":{"left":0.26230052,"top":0.06384677,"width":0.08610372,"height":0.017557861},"automation_id":"_NS:879","value":"playbook","placeholder":"Filter","role_description":"search text field","subrole":"AXSearchField","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"search","depth":4,"bounds":{"left":0.2629654,"top":0.06384677,"width":0.00831117,"height":0.017557861},"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"cancel","depth":4,"bounds":{"left":0.33976063,"top":0.06384677,"width":0.00731383,"height":0.017557861},"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"add","depth":2,"bounds":{"left":0.2606383,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:4671","help_text":"Add new table","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Quick Look","depth":2,"bounds":{"left":0.29554522,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:1133","help_text":"Toggle the visibility of the Information panel","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXMenuButton","text":"action","depth":2,"bounds":{"left":0.26894948,"top":0.698324,"width":0.011635638,"height":0.019952115},"automation_id":"_NS:1882","role_description":"menu button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"refresh","depth":2,"bounds":{"left":0.2839096,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:3295","help_text":"Refresh table list","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"id","depth":7,"bounds":{"left":0.35272607,"top":0.0830008,"width":0.078125,"height":0.015163607},"value":"id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"bounds":{"left":0.4318484,"top":0.0830008,"width":0.04255319,"height":0.015163607},"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"bounds":{"left":0.47539893,"top":0.0830008,"width":0.12815824,"height":0.015163607},"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"PRI","depth":7,"bounds":{"left":0.68234706,"top":0.0830008,"width":0.019946808,"height":0.015163607},"role_description":"text"},{"role":"AXComboBox","text":"auto_increment","depth":7,"bounds":{"left":0.7237367,"top":0.0830008,"width":0.028091755,"height":0.015163607},"value":"auto_increment","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"uuid","depth":7,"bounds":{"left":0.35272607,"top":0.09976058,"width":0.078125,"height":0.015163607},"value":"uuid","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"BINARY","depth":7,"bounds":{"left":0.4318484,"top":0.09976058,"width":0.04255319,"height":0.015163607},"value":"BINARY","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"16","depth":7,"bounds":{"left":0.47539893,"top":0.09976058,"width":0.12815824,"height":0.015163607},"value":"16","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"UNI","depth":7,"bounds":{"left":0.68234706,"top":0.09976058,"width":0.019946808,"height":0.015163607},"role_description":"text"},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.09976058,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"playbook_id","depth":7,"bounds":{"left":0.35272607,"top":0.11652035,"width":0.078125,"height":0.015163607},"value":"playbook_id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"bounds":{"left":0.4318484,"top":0.11652035,"width":0.04255319,"height":0.015163607},"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"bounds":{"left":0.47539893,"top":0.11652035,"width":0.12815824,"height":0.015163607},"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"MUL","depth":7,"bounds":{"left":0.68234706,"top":0.11652035,"width":0.019946808,"height":0.015163607},"role_description":"text"},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.11652035,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"type","depth":7,"bounds":{"left":0.35272607,"top":0.13328013,"width":0.078125,"height":0.015163607},"value":"type","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"CHAR","depth":7,"bounds":{"left":0.4318484,"top":0.13328013,"width":0.04255319,"height":0.015163607},"value":"CHAR","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"20","depth":7,"bounds":{"left":0.47539893,"top":0.13328013,"width":0.12815824,"height":0.015163607},"value":"20","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"all","depth":7,"bounds":{"left":0.70329124,"top":0.13328013,"width":0.019448139,"height":0.015163607},"value":"all","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.13328013,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"name","depth":7,"bounds":{"left":0.35272607,"top":0.15003991,"width":0.078125,"height":0.015163607},"value":"name","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"VARCHAR","depth":7,"bounds":{"left":0.4318484,"top":0.15003991,"width":0.04255319,"height":0.015163607},"value":"VARCHAR","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"150","depth":7,"bounds":{"left":0.47539893,"top":0.15003991,"width":0.12815824,"height":0.015163607},"value":"150","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.15003991,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"ai_prompt_description","depth":7,"bounds":{"left":0.35272607,"top":0.16679968,"width":0.078125,"height":0.015163607},"value":"ai_prompt_description","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TEXT","depth":7,"bounds":{"left":0.4318484,"top":0.16679968,"width":0.04255319,"height":0.015163607},"value":"TEXT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"NULL","depth":7,"bounds":{"left":0.70329124,"top":0.16679968,"width":0.019448139,"height":0.015163607},"value":"NULL","role_description":"text field","is_enabled":false,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.16679968,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"is_selectable","depth":7,"bounds":{"left":0.35272607,"top":0.18355946,"width":0.078125,"height":0.015163607},"value":"is_selectable","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"bounds":{"left":0.4318484,"top":0.18355946,"width":0.04255319,"height":0.015163607},"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"1","depth":7,"bounds":{"left":0.47539893,"top":0.18355946,"width":0.12815824,"height":0.015163607},"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"1","depth":7,"bounds":{"left":0.70329124,"top":0.18355946,"width":0.019448139,"height":0.015163607},"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.18355946,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"sequence","depth":7,"bounds":{"left":0.35272607,"top":0.20031923,"width":0.078125,"height":0.015163607},"value":"sequence","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"bounds":{"left":0.4318484,"top":0.20031923,"width":0.04255319,"height":0.015163607},"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"3","depth":7,"bounds":{"left":0.47539893,"top":0.20031923,"width":0.12815824,"height":0.015163607},"value":"3","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"0","depth":7,"bounds":{"left":0.70329124,"top":0.20031923,"width":0.019448139,"height":0.015163607},"value":"0","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.20031923,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"was_answered","depth":7,"bounds":{"left":0.35272607,"top":0.21707901,"width":0.078125,"height":0.015163607},"value":"was_answered","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"bounds":{"left":0.4318484,"top":0.21707901,"width":0.04255319,"height":0.015163607},"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"1","depth":7,"bounds":{"left":0.47539893,"top":0.21707901,"width":0.12815824,"height":0.015163607},"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"1","depth":7,"bounds":{"left":0.70329124,"top":0.21707901,"width":0.019448139,"height":0.015163607},"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.21707901,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"is_default","depth":7,"bounds":{"left":0.35272607,"top":0.23383878,"width":0.078125,"height":0.015163607},"value":"is_default","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"bounds":{"left":0.4318484,"top":0.23383878,"width":0.04255319,"height":0.015163607},"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"1","depth":7,"bounds":{"left":0.47539893,"top":0.23383878,"width":0.12815824,"height":0.015163607},"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"0","depth":7,"bounds":{"left":0.70329124,"top":0.23383878,"width":0.019448139,"height":0.015163607},"value":"0","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.23383878,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"created_at","depth":7,"bounds":{"left":0.35272607,"top":0.25059855,"width":0.078125,"height":0.015163607},"value":"created_at","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TIMESTAMP","depth":7,"bounds":{"left":0.4318484,"top":0.25059855,"width":0.04255319,"height":0.015163607},"value":"TIMESTAMP","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"NULL","depth":7,"bounds":{"left":0.70329124,"top":0.25059855,"width":0.019448139,"height":0.015163607},"value":"NULL","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.25059855,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"updated_at","depth":7,"bounds":{"left":0.35272607,"top":0.26735833,"width":0.078125,"height":0.015163607},"value":"updated_at","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TIMESTAMP","depth":7,"bounds":{"left":0.4318484,"top":0.26735833,"width":0.04255319,"height":0.015163607},"value":"TIMESTAMP","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"NULL","depth":7,"bounds":{"left":0.70329124,"top":0.26735833,"width":0.019448139,"height":0.015163607},"value":"NULL","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.26735833,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXButton","text":"Field","depth":7,"bounds":{"left":0.35073137,"top":0.059856344,"width":0.080784574,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Type","depth":7,"bounds":{"left":0.43151596,"top":0.059856344,"width":0.043550532,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Length","depth":7,"bounds":{"left":0.47506648,"top":0.059856344,"width":0.12915559,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Unsigned","depth":7,"bounds":{"left":0.60422206,"top":0.059856344,"width":0.018949468,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Zerofill","depth":7,"bounds":{"left":0.62317157,"top":0.059856344,"width":0.024933511,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Binary","depth":7,"bounds":{"left":0.648105,"top":0.059856344,"width":0.013962766,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Allow Null","depth":7,"bounds":{"left":0.66206783,"top":0.059856344,"width":0.019946808,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Key","depth":7,"bounds":{"left":0.68201464,"top":0.059856344,"width":0.020944148,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Default","depth":7,"bounds":{"left":0.70295876,"top":0.059856344,"width":0.02044548,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Extra","depth":7,"bounds":{"left":0.7234042,"top":0.059856344,"width":0.029089095,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Encoding","depth":7,"bounds":{"left":0.7524933,"top":0.059856344,"width":0.012632979,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Collation","depth":7,"bounds":{"left":0.76512635,"top":0.059856344,"width":0.012632979,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Comment","depth":7,"bounds":{"left":0.7777593,"top":0.059856344,"width":0.010472074,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"smart item","depth":4,"bounds":{"left":0.71642286,"top":0.44732642,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:3756","help_text":"Edit Table Details (⌘4)","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXMenuButton","text":"action","depth":4,"bounds":{"left":0.72639626,"top":0.44732642,"width":0.011635638,"height":0.019952115},"automation_id":"_NS:1160","role_description":"menu button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"remove","depth":4,"bounds":{"left":0.36037233,"top":0.44732642,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:4152","help_text":"Delete selected field (⌫)","role_description":"button","is_enabled":false,"is_focused":false},{"role":"AXButton","text":"refresh","depth":4,"bounds":{"left":0.38031915,"top":0.44732642,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:2110","help_text":"Refresh table structure (⌘R)","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"add","depth":4,"bounds":{"left":0.35039893,"top":0.44732642,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:1610","help_text":"Add field (⌥⌘A)","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"0","depth":7,"bounds":{"left":0.35239363,"top":0.5079808,"width":0.024268618,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"PRIMARY","depth":7,"bounds":{"left":0.3776596,"top":0.5079808,"width":0.021276595,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":7,"bounds":{"left":0.39993352,"top":0.5079808,"width":0.025764627,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"id","depth":7,"bounds":{"left":0.42669547,"top":0.5079808,"width":0.028424202,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"A","depth":7,"bounds":{"left":0.45611703,"top":0.5079808,"width":0.018450798,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"25080","depth":7,"bounds":{"left":0.47556517,"top":0.5079808,"width":0.021775266,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"bounds":{"left":0.49833778,"top":0.5079808,"width":0.01861702,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"bounds":{"left":0.51795214,"top":0.5079808,"width":0.014295213,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"0","depth":7,"bounds":{"left":0.35239363,"top":0.52474064,"width":0.024268618,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"playbook_categories_uuid_unique","depth":7,"bounds":{"left":0.3776596,"top":0.52474064,"width":0.021276595,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":7,"bounds":{"left":0.39993352,"top":0.52474064,"width":0.025764627,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"uuid","depth":7,"bounds":{"left":0.42669547,"top":0.52474064,"width":0.028424202,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"A","depth":7,"bounds":{"left":0.45611703,"top":0.52474064,"width":0.018450798,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"25080","depth":7,"bounds":{"left":0.47556517,"top":0.52474064,"width":0.021775266,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"bounds":{"left":0.49833778,"top":0.52474064,"width":0.01861702,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"bounds":{"left":0.51795214,"top":0.52474064,"width":0.014295213,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":7,"bounds":{"left":0.35239363,"top":0.5415004,"width":0.024268618,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"playbook_categories_playbook_id_index","depth":7,"bounds":{"left":0.3776596,"top":0.5415004,"width":0.021276595,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":7,"bounds":{"left":0.39993352,"top":0.5415004,"width":0.025764627,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"playbook_id","depth":7,"bounds":{"left":0.42669547,"top":0.5415004,"width":0.028424202,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"A","depth":7,"bounds":{"left":0.45611703,"top":0.5415004,"width":0.018450798,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"1254","depth":7,"bounds":{"left":0.47556517,"top":0.5415004,"width":0.021775266,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"bounds":{"left":0.49833778,"top":0.5415004,"width":0.01861702,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"bounds":{"left":0.51795214,"top":0.5415004,"width":0.014295213,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Non_unique","depth":7,"bounds":{"left":0.35039893,"top":0.4848364,"width":0.026928192,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Key_name","depth":7,"bounds":{"left":0.3773271,"top":0.4848364,"width":0.022273935,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Seq_in_index","depth":7,"bounds":{"left":0.39960107,"top":0.4848364,"width":0.026761968,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Column_name","depth":7,"bounds":{"left":0.42636302,"top":0.4848364,"width":0.029421542,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Collation","depth":7,"bounds":{"left":0.4557846,"top":0.4848364,"width":0.019448139,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Cardinality","depth":7,"bounds":{"left":0.47523272,"top":0.4848364,"width":0.022772606,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Sub_part","depth":7,"bounds":{"left":0.49800533,"top":0.4848364,"width":0.019614361,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Packed","depth":7,"bounds":{"left":0.51761967,"top":0.4848364,"width":0.015292553,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Comment","depth":7,"bounds":{"left":0.53291225,"top":0.4848364,"width":0.03756649,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"remove","depth":4,"bounds":{"left":0.36037233,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:1930","help_text":"Delete selected index","role_description":"button","is_enabled":false,"is_focused":false},{"role":"AXButton","text":"refresh","depth":4,"bounds":{"left":0.37034574,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:2593","help_text":"Refresh table indexes (⌘R)","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"add","depth":4,"bounds":{"left":0.35039893,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:3332","help_text":"Add index","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"INDEXES","depth":4,"bounds":{"left":0.35139626,"top":0.47047088,"width":0.051529255,"height":0.011173184},"automation_id":"_NS:3948","role_description":"text"},{"role":"AXStaticText","text":"(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories","depth":1,"bounds":{"left":0.28956118,"top":0.019952115,"width":0.18550532,"height":0.0415004},"role_description":"text"}]...
|
-3855442780064241766
|
884529157329404594
|
visual_change
|
accessibility
|
NULL
|
TABLES
playbook_categories
playbook_layouts
playbo TABLES
playbook_categories
playbook_layouts
playbooks
playbook
search
cancel
add
Quick Look
action
refresh
id
INT
10
PRI
auto_increment
uuid
BINARY
16
UNI
None
playbook_id
INT
10
MUL
None
type
CHAR
20
all
None
name
VARCHAR
150
None
ai_prompt_description
TEXT
NULL
None
is_selectable
TINYINT
1
1
None
sequence
TINYINT
3
0
None
was_answered
TINYINT
1
1
None
is_default
TINYINT
1
0
None
created_at
TIMESTAMP
NULL
None
updated_at
TIMESTAMP
NULL
None
Field
Type
Length
Unsigned
Zerofill
Binary
Allow Null
Key
Default
Extra
Encoding
Collation
Comment
smart item
action
remove
refresh
add
0
PRIMARY
1
id
A
25080
NULL
NULL
0
playbook_categories_uuid_unique
1
uuid
A
25080
NULL
NULL
1
playbook_categories_playbook_id_index
1
playbook_id
A
1254
NULL
NULL
Non_unique
Key_name
Seq_in_index
Column_name
Collation
Cardinality
Sub_part
Packed
Comment
remove
refresh
add
INDEXES
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories...
|
74867
|
|
74897
|
1866
|
15
|
2026-04-23T10:23:49.557510+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-23/1776 /Users/lukas/.screenpipe/data/data/2026-04-23/1776939829557_m2.jpg...
|
Sequel Ace
|
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_c (MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories...
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
TABLES
playbook_categories
playbook_layouts
playbo TABLES
playbook_categories
playbook_layouts
playbooks
playbook
search
cancel
add
Quick Look
action
refresh
id
INT
10
PRI
auto_increment
uuid
BINARY
16
UNI
None
playbook_id
INT
10
MUL
None
type
CHAR
20
all
None
name
VARCHAR
150
None
ai_prompt_description
TEXT
NULL
None
is_selectable
TINYINT
1
1
None
sequence
TINYINT
3
0
None
was_answered
TINYINT
1
1
None
is_default
TINYINT
1
0
None
created_at
TIMESTAMP
NULL
None
updated_at
TIMESTAMP
NULL
None
Field
Type
Length
Unsigned
Zerofill
Binary
Allow Null
Key
Default
Extra
Encoding
Collation
Comment
smart item
action
remove
refresh
add
0
PRIMARY
1
id
A
25080
NULL
NULL
0
playbook_categories_uuid_unique
1
uuid
A
25080
NULL
NULL
1
playbook_categories_playbook_id_index
1
playbook_id
A
1254
NULL
NULL
Non_unique
Key_name
Seq_in_index
Column_name
Collation
Cardinality
Sub_part
Packed
Comment
remove
refresh
add
INDEXES
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"TABLES","depth":6,"bounds":{"left":0.26595744,"top":0.09417398,"width":0.0787899,"height":0.019952115},"value":"TABLES","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook_categories","depth":6,"bounds":{"left":0.26595744,"top":0.11572227,"width":0.0787899,"height":0.015163607},"value":"playbook_categories","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook_layouts","depth":6,"bounds":{"left":0.26595744,"top":0.13248204,"width":0.0787899,"height":0.015163607},"value":"playbook_layouts","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbooks","depth":6,"bounds":{"left":0.26595744,"top":0.14924182,"width":0.0787899,"height":0.015163607},"value":"playbooks","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook","depth":3,"bounds":{"left":0.26230052,"top":0.06384677,"width":0.08610372,"height":0.017557861},"automation_id":"_NS:879","value":"playbook","placeholder":"Filter","role_description":"search text field","subrole":"AXSearchField","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"search","depth":4,"bounds":{"left":0.2629654,"top":0.06384677,"width":0.00831117,"height":0.017557861},"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"cancel","depth":4,"bounds":{"left":0.33976063,"top":0.06384677,"width":0.00731383,"height":0.017557861},"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"add","depth":2,"bounds":{"left":0.2606383,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:4671","help_text":"Add new table","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Quick Look","depth":2,"bounds":{"left":0.29554522,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:1133","help_text":"Toggle the visibility of the Information panel","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXMenuButton","text":"action","depth":2,"bounds":{"left":0.26894948,"top":0.698324,"width":0.011635638,"height":0.019952115},"automation_id":"_NS:1882","role_description":"menu button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"refresh","depth":2,"bounds":{"left":0.2839096,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:3295","help_text":"Refresh table list","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"id","depth":7,"bounds":{"left":0.35272607,"top":0.0830008,"width":0.078125,"height":0.015163607},"value":"id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"bounds":{"left":0.4318484,"top":0.0830008,"width":0.04255319,"height":0.015163607},"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"bounds":{"left":0.47539893,"top":0.0830008,"width":0.12815824,"height":0.015163607},"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"PRI","depth":7,"bounds":{"left":0.68234706,"top":0.0830008,"width":0.019946808,"height":0.015163607},"role_description":"text"},{"role":"AXComboBox","text":"auto_increment","depth":7,"bounds":{"left":0.7237367,"top":0.0830008,"width":0.028091755,"height":0.015163607},"value":"auto_increment","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"uuid","depth":7,"bounds":{"left":0.35272607,"top":0.09976058,"width":0.078125,"height":0.015163607},"value":"uuid","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"BINARY","depth":7,"bounds":{"left":0.4318484,"top":0.09976058,"width":0.04255319,"height":0.015163607},"value":"BINARY","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"16","depth":7,"bounds":{"left":0.47539893,"top":0.09976058,"width":0.12815824,"height":0.015163607},"value":"16","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"UNI","depth":7,"bounds":{"left":0.68234706,"top":0.09976058,"width":0.019946808,"height":0.015163607},"role_description":"text"},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.09976058,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"playbook_id","depth":7,"bounds":{"left":0.35272607,"top":0.11652035,"width":0.078125,"height":0.015163607},"value":"playbook_id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"bounds":{"left":0.4318484,"top":0.11652035,"width":0.04255319,"height":0.015163607},"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"bounds":{"left":0.47539893,"top":0.11652035,"width":0.12815824,"height":0.015163607},"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"MUL","depth":7,"bounds":{"left":0.68234706,"top":0.11652035,"width":0.019946808,"height":0.015163607},"role_description":"text"},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.11652035,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"type","depth":7,"bounds":{"left":0.35272607,"top":0.13328013,"width":0.078125,"height":0.015163607},"value":"type","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"CHAR","depth":7,"bounds":{"left":0.4318484,"top":0.13328013,"width":0.04255319,"height":0.015163607},"value":"CHAR","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"20","depth":7,"bounds":{"left":0.47539893,"top":0.13328013,"width":0.12815824,"height":0.015163607},"value":"20","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"all","depth":7,"bounds":{"left":0.70329124,"top":0.13328013,"width":0.019448139,"height":0.015163607},"value":"all","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.13328013,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"name","depth":7,"bounds":{"left":0.35272607,"top":0.15003991,"width":0.078125,"height":0.015163607},"value":"name","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"VARCHAR","depth":7,"bounds":{"left":0.4318484,"top":0.15003991,"width":0.04255319,"height":0.015163607},"value":"VARCHAR","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"150","depth":7,"bounds":{"left":0.47539893,"top":0.15003991,"width":0.12815824,"height":0.015163607},"value":"150","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.15003991,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"ai_prompt_description","depth":7,"bounds":{"left":0.35272607,"top":0.16679968,"width":0.078125,"height":0.015163607},"value":"ai_prompt_description","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TEXT","depth":7,"bounds":{"left":0.4318484,"top":0.16679968,"width":0.04255319,"height":0.015163607},"value":"TEXT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"NULL","depth":7,"bounds":{"left":0.70329124,"top":0.16679968,"width":0.019448139,"height":0.015163607},"value":"NULL","role_description":"text field","is_enabled":false,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.16679968,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"is_selectable","depth":7,"bounds":{"left":0.35272607,"top":0.18355946,"width":0.078125,"height":0.015163607},"value":"is_selectable","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"bounds":{"left":0.4318484,"top":0.18355946,"width":0.04255319,"height":0.015163607},"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"1","depth":7,"bounds":{"left":0.47539893,"top":0.18355946,"width":0.12815824,"height":0.015163607},"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"1","depth":7,"bounds":{"left":0.70329124,"top":0.18355946,"width":0.019448139,"height":0.015163607},"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.18355946,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"sequence","depth":7,"bounds":{"left":0.35272607,"top":0.20031923,"width":0.078125,"height":0.015163607},"value":"sequence","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"bounds":{"left":0.4318484,"top":0.20031923,"width":0.04255319,"height":0.015163607},"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"3","depth":7,"bounds":{"left":0.47539893,"top":0.20031923,"width":0.12815824,"height":0.015163607},"value":"3","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"0","depth":7,"bounds":{"left":0.70329124,"top":0.20031923,"width":0.019448139,"height":0.015163607},"value":"0","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.20031923,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"was_answered","depth":7,"bounds":{"left":0.35272607,"top":0.21707901,"width":0.078125,"height":0.015163607},"value":"was_answered","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"bounds":{"left":0.4318484,"top":0.21707901,"width":0.04255319,"height":0.015163607},"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"1","depth":7,"bounds":{"left":0.47539893,"top":0.21707901,"width":0.12815824,"height":0.015163607},"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"1","depth":7,"bounds":{"left":0.70329124,"top":0.21707901,"width":0.019448139,"height":0.015163607},"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.21707901,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"is_default","depth":7,"bounds":{"left":0.35272607,"top":0.23383878,"width":0.078125,"height":0.015163607},"value":"is_default","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"bounds":{"left":0.4318484,"top":0.23383878,"width":0.04255319,"height":0.015163607},"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"1","depth":7,"bounds":{"left":0.47539893,"top":0.23383878,"width":0.12815824,"height":0.015163607},"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"0","depth":7,"bounds":{"left":0.70329124,"top":0.23383878,"width":0.019448139,"height":0.015163607},"value":"0","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.23383878,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"created_at","depth":7,"bounds":{"left":0.35272607,"top":0.25059855,"width":0.078125,"height":0.015163607},"value":"created_at","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TIMESTAMP","depth":7,"bounds":{"left":0.4318484,"top":0.25059855,"width":0.04255319,"height":0.015163607},"value":"TIMESTAMP","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"NULL","depth":7,"bounds":{"left":0.70329124,"top":0.25059855,"width":0.019448139,"height":0.015163607},"value":"NULL","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.25059855,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"updated_at","depth":7,"bounds":{"left":0.35272607,"top":0.26735833,"width":0.078125,"height":0.015163607},"value":"updated_at","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TIMESTAMP","depth":7,"bounds":{"left":0.4318484,"top":0.26735833,"width":0.04255319,"height":0.015163607},"value":"TIMESTAMP","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"NULL","depth":7,"bounds":{"left":0.70329124,"top":0.26735833,"width":0.019448139,"height":0.015163607},"value":"NULL","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.26735833,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXButton","text":"Field","depth":7,"bounds":{"left":0.35073137,"top":0.059856344,"width":0.080784574,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Type","depth":7,"bounds":{"left":0.43151596,"top":0.059856344,"width":0.043550532,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Length","depth":7,"bounds":{"left":0.47506648,"top":0.059856344,"width":0.12915559,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Unsigned","depth":7,"bounds":{"left":0.60422206,"top":0.059856344,"width":0.018949468,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Zerofill","depth":7,"bounds":{"left":0.62317157,"top":0.059856344,"width":0.024933511,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Binary","depth":7,"bounds":{"left":0.648105,"top":0.059856344,"width":0.013962766,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Allow Null","depth":7,"bounds":{"left":0.66206783,"top":0.059856344,"width":0.019946808,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Key","depth":7,"bounds":{"left":0.68201464,"top":0.059856344,"width":0.020944148,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Default","depth":7,"bounds":{"left":0.70295876,"top":0.059856344,"width":0.02044548,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Extra","depth":7,"bounds":{"left":0.7234042,"top":0.059856344,"width":0.029089095,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Encoding","depth":7,"bounds":{"left":0.7524933,"top":0.059856344,"width":0.012632979,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Collation","depth":7,"bounds":{"left":0.76512635,"top":0.059856344,"width":0.012632979,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Comment","depth":7,"bounds":{"left":0.7777593,"top":0.059856344,"width":0.010472074,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"smart item","depth":4,"bounds":{"left":0.71642286,"top":0.44732642,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:3756","help_text":"Edit Table Details (⌘4)","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXMenuButton","text":"action","depth":4,"bounds":{"left":0.72639626,"top":0.44732642,"width":0.011635638,"height":0.019952115},"automation_id":"_NS:1160","role_description":"menu button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"remove","depth":4,"bounds":{"left":0.36037233,"top":0.44732642,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:4152","help_text":"Delete selected field (⌫)","role_description":"button","is_enabled":false,"is_focused":false},{"role":"AXButton","text":"refresh","depth":4,"bounds":{"left":0.38031915,"top":0.44732642,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:2110","help_text":"Refresh table structure (⌘R)","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"add","depth":4,"bounds":{"left":0.35039893,"top":0.44732642,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:1610","help_text":"Add field (⌥⌘A)","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"0","depth":7,"bounds":{"left":0.35239363,"top":0.5079808,"width":0.024268618,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"PRIMARY","depth":7,"bounds":{"left":0.3776596,"top":0.5079808,"width":0.021276595,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":7,"bounds":{"left":0.39993352,"top":0.5079808,"width":0.025764627,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"id","depth":7,"bounds":{"left":0.42669547,"top":0.5079808,"width":0.028424202,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"A","depth":7,"bounds":{"left":0.45611703,"top":0.5079808,"width":0.018450798,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"25080","depth":7,"bounds":{"left":0.47556517,"top":0.5079808,"width":0.021775266,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"bounds":{"left":0.49833778,"top":0.5079808,"width":0.01861702,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"bounds":{"left":0.51795214,"top":0.5079808,"width":0.014295213,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"0","depth":7,"bounds":{"left":0.35239363,"top":0.52474064,"width":0.024268618,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"playbook_categories_uuid_unique","depth":7,"bounds":{"left":0.3776596,"top":0.52474064,"width":0.021276595,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":7,"bounds":{"left":0.39993352,"top":0.52474064,"width":0.025764627,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"uuid","depth":7,"bounds":{"left":0.42669547,"top":0.52474064,"width":0.028424202,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"A","depth":7,"bounds":{"left":0.45611703,"top":0.52474064,"width":0.018450798,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"25080","depth":7,"bounds":{"left":0.47556517,"top":0.52474064,"width":0.021775266,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"bounds":{"left":0.49833778,"top":0.52474064,"width":0.01861702,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"bounds":{"left":0.51795214,"top":0.52474064,"width":0.014295213,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":7,"bounds":{"left":0.35239363,"top":0.5415004,"width":0.024268618,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"playbook_categories_playbook_id_index","depth":7,"bounds":{"left":0.3776596,"top":0.5415004,"width":0.021276595,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":7,"bounds":{"left":0.39993352,"top":0.5415004,"width":0.025764627,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"playbook_id","depth":7,"bounds":{"left":0.42669547,"top":0.5415004,"width":0.028424202,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"A","depth":7,"bounds":{"left":0.45611703,"top":0.5415004,"width":0.018450798,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"1254","depth":7,"bounds":{"left":0.47556517,"top":0.5415004,"width":0.021775266,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"bounds":{"left":0.49833778,"top":0.5415004,"width":0.01861702,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"bounds":{"left":0.51795214,"top":0.5415004,"width":0.014295213,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Non_unique","depth":7,"bounds":{"left":0.35039893,"top":0.4848364,"width":0.026928192,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Key_name","depth":7,"bounds":{"left":0.3773271,"top":0.4848364,"width":0.022273935,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Seq_in_index","depth":7,"bounds":{"left":0.39960107,"top":0.4848364,"width":0.026761968,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Column_name","depth":7,"bounds":{"left":0.42636302,"top":0.4848364,"width":0.029421542,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Collation","depth":7,"bounds":{"left":0.4557846,"top":0.4848364,"width":0.019448139,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Cardinality","depth":7,"bounds":{"left":0.47523272,"top":0.4848364,"width":0.022772606,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Sub_part","depth":7,"bounds":{"left":0.49800533,"top":0.4848364,"width":0.019614361,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Packed","depth":7,"bounds":{"left":0.51761967,"top":0.4848364,"width":0.015292553,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Comment","depth":7,"bounds":{"left":0.53291225,"top":0.4848364,"width":0.03756649,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"remove","depth":4,"bounds":{"left":0.36037233,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:1930","help_text":"Delete selected index","role_description":"button","is_enabled":false,"is_focused":false},{"role":"AXButton","text":"refresh","depth":4,"bounds":{"left":0.37034574,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:2593","help_text":"Refresh table indexes (⌘R)","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"add","depth":4,"bounds":{"left":0.35039893,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:3332","help_text":"Add index","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"INDEXES","depth":4,"bounds":{"left":0.35139626,"top":0.47047088,"width":0.051529255,"height":0.011173184},"automation_id":"_NS:3948","role_description":"text"},{"role":"AXStaticText","text":"(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories","depth":1,"bounds":{"left":0.28956118,"top":0.019952115,"width":0.18550532,"height":0.0415004},"role_description":"text"}]...
|
-3855442780064241766
|
884529157329404594
|
app_switch
|
accessibility
|
NULL
|
TABLES
playbook_categories
playbook_layouts
playbo TABLES
playbook_categories
playbook_layouts
playbooks
playbook
search
cancel
add
Quick Look
action
refresh
id
INT
10
PRI
auto_increment
uuid
BINARY
16
UNI
None
playbook_id
INT
10
MUL
None
type
CHAR
20
all
None
name
VARCHAR
150
None
ai_prompt_description
TEXT
NULL
None
is_selectable
TINYINT
1
1
None
sequence
TINYINT
3
0
None
was_answered
TINYINT
1
1
None
is_default
TINYINT
1
0
None
created_at
TIMESTAMP
NULL
None
updated_at
TIMESTAMP
NULL
None
Field
Type
Length
Unsigned
Zerofill
Binary
Allow Null
Key
Default
Extra
Encoding
Collation
Comment
smart item
action
remove
refresh
add
0
PRIMARY
1
id
A
25080
NULL
NULL
0
playbook_categories_uuid_unique
1
uuid
A
25080
NULL
NULL
1
playbook_categories_playbook_id_index
1
playbook_id
A
1254
NULL
NULL
Non_unique
Key_name
Seq_in_index
Column_name
Collation
Cardinality
Sub_part
Packed
Comment
remove
refresh
add
INDEXES
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories...
|
NULL
|
|
74902
|
1866
|
18
|
2026-04-23T10:23:58.564992+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-23/1776 /Users/lukas/.screenpipe/data/data/2026-04-23/1776939838564_m2.jpg...
|
Sequel Ace
|
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_c (MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories...
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
TABLES
playbook_categories
playbook_layouts
playbo TABLES
playbook_categories
playbook_layouts
playbooks
playbook
search
cancel
add
Quick Look
action
refresh
id
INT
10
PRI
auto_increment
uuid
BINARY
16
UNI
None
playbook_id
INT
10
MUL
None
type
CHAR
20
all
None
name
VARCHAR
150
None
ai_prompt_description
TEXT
NULL
None
is_selectable
TINYINT
1
1
None
sequence
TINYINT
3
0
None
was_answered
TINYINT
1
1
None
is_default
TINYINT
1
0
None
created_at
TIMESTAMP
NULL
None
updated_at
TIMESTAMP
NULL
None
Field
Type
Length
Unsigned
Zerofill
Binary
Allow Null
Key
Default
Extra
Encoding
Collation
Comment
smart item
action
remove
refresh
add
0
PRIMARY
1
id
A
25080
NULL
NULL
0
playbook_categories_uuid_unique
1
uuid
A
25080
NULL
NULL
1
playbook_categories_playbook_id_index
1
playbook_id
A
1254
NULL
NULL
Non_unique
Key_name
Seq_in_index
Column_name
Collation
Cardinality
Sub_part
Packed
Comment
remove
refresh
add
INDEXES
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"TABLES","depth":6,"bounds":{"left":0.26595744,"top":0.09417398,"width":0.0787899,"height":0.019952115},"value":"TABLES","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook_categories","depth":6,"bounds":{"left":0.26595744,"top":0.11572227,"width":0.0787899,"height":0.015163607},"value":"playbook_categories","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook_layouts","depth":6,"bounds":{"left":0.26595744,"top":0.13248204,"width":0.0787899,"height":0.015163607},"value":"playbook_layouts","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbooks","depth":6,"bounds":{"left":0.26595744,"top":0.14924182,"width":0.0787899,"height":0.015163607},"value":"playbooks","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook","depth":3,"bounds":{"left":0.26230052,"top":0.06384677,"width":0.08610372,"height":0.017557861},"automation_id":"_NS:879","value":"playbook","placeholder":"Filter","role_description":"search text field","subrole":"AXSearchField","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"search","depth":4,"bounds":{"left":0.2629654,"top":0.06384677,"width":0.00831117,"height":0.017557861},"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"cancel","depth":4,"bounds":{"left":0.33976063,"top":0.06384677,"width":0.00731383,"height":0.017557861},"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"add","depth":2,"bounds":{"left":0.2606383,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:4671","help_text":"Add new table","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Quick Look","depth":2,"bounds":{"left":0.29554522,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:1133","help_text":"Toggle the visibility of the Information panel","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXMenuButton","text":"action","depth":2,"bounds":{"left":0.26894948,"top":0.698324,"width":0.011635638,"height":0.019952115},"automation_id":"_NS:1882","role_description":"menu button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"refresh","depth":2,"bounds":{"left":0.2839096,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:3295","help_text":"Refresh table list","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"id","depth":7,"bounds":{"left":0.35272607,"top":0.0830008,"width":0.078125,"height":0.015163607},"value":"id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"bounds":{"left":0.4318484,"top":0.0830008,"width":0.04255319,"height":0.015163607},"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"bounds":{"left":0.47539893,"top":0.0830008,"width":0.12815824,"height":0.015163607},"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"PRI","depth":7,"bounds":{"left":0.68234706,"top":0.0830008,"width":0.019946808,"height":0.015163607},"role_description":"text"},{"role":"AXComboBox","text":"auto_increment","depth":7,"bounds":{"left":0.7237367,"top":0.0830008,"width":0.028091755,"height":0.015163607},"value":"auto_increment","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"uuid","depth":7,"bounds":{"left":0.35272607,"top":0.09976058,"width":0.078125,"height":0.015163607},"value":"uuid","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"BINARY","depth":7,"bounds":{"left":0.4318484,"top":0.09976058,"width":0.04255319,"height":0.015163607},"value":"BINARY","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"16","depth":7,"bounds":{"left":0.47539893,"top":0.09976058,"width":0.12815824,"height":0.015163607},"value":"16","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"UNI","depth":7,"bounds":{"left":0.68234706,"top":0.09976058,"width":0.019946808,"height":0.015163607},"role_description":"text"},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.09976058,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"playbook_id","depth":7,"bounds":{"left":0.35272607,"top":0.11652035,"width":0.078125,"height":0.015163607},"value":"playbook_id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"bounds":{"left":0.4318484,"top":0.11652035,"width":0.04255319,"height":0.015163607},"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"bounds":{"left":0.47539893,"top":0.11652035,"width":0.12815824,"height":0.015163607},"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"MUL","depth":7,"bounds":{"left":0.68234706,"top":0.11652035,"width":0.019946808,"height":0.015163607},"role_description":"text"},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.11652035,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"type","depth":7,"bounds":{"left":0.35272607,"top":0.13328013,"width":0.078125,"height":0.015163607},"value":"type","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"CHAR","depth":7,"bounds":{"left":0.4318484,"top":0.13328013,"width":0.04255319,"height":0.015163607},"value":"CHAR","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"20","depth":7,"bounds":{"left":0.47539893,"top":0.13328013,"width":0.12815824,"height":0.015163607},"value":"20","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"all","depth":7,"bounds":{"left":0.70329124,"top":0.13328013,"width":0.019448139,"height":0.015163607},"value":"all","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.13328013,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"name","depth":7,"bounds":{"left":0.35272607,"top":0.15003991,"width":0.078125,"height":0.015163607},"value":"name","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"VARCHAR","depth":7,"bounds":{"left":0.4318484,"top":0.15003991,"width":0.04255319,"height":0.015163607},"value":"VARCHAR","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"150","depth":7,"bounds":{"left":0.47539893,"top":0.15003991,"width":0.12815824,"height":0.015163607},"value":"150","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.15003991,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"ai_prompt_description","depth":7,"bounds":{"left":0.35272607,"top":0.16679968,"width":0.078125,"height":0.015163607},"value":"ai_prompt_description","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TEXT","depth":7,"bounds":{"left":0.4318484,"top":0.16679968,"width":0.04255319,"height":0.015163607},"value":"TEXT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"NULL","depth":7,"bounds":{"left":0.70329124,"top":0.16679968,"width":0.019448139,"height":0.015163607},"value":"NULL","role_description":"text field","is_enabled":false,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.16679968,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"is_selectable","depth":7,"bounds":{"left":0.35272607,"top":0.18355946,"width":0.078125,"height":0.015163607},"value":"is_selectable","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"bounds":{"left":0.4318484,"top":0.18355946,"width":0.04255319,"height":0.015163607},"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"1","depth":7,"bounds":{"left":0.47539893,"top":0.18355946,"width":0.12815824,"height":0.015163607},"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"1","depth":7,"bounds":{"left":0.70329124,"top":0.18355946,"width":0.019448139,"height":0.015163607},"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.18355946,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"sequence","depth":7,"bounds":{"left":0.35272607,"top":0.20031923,"width":0.078125,"height":0.015163607},"value":"sequence","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"bounds":{"left":0.4318484,"top":0.20031923,"width":0.04255319,"height":0.015163607},"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"3","depth":7,"bounds":{"left":0.47539893,"top":0.20031923,"width":0.12815824,"height":0.015163607},"value":"3","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"0","depth":7,"bounds":{"left":0.70329124,"top":0.20031923,"width":0.019448139,"height":0.015163607},"value":"0","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.20031923,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"was_answered","depth":7,"bounds":{"left":0.35272607,"top":0.21707901,"width":0.078125,"height":0.015163607},"value":"was_answered","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"bounds":{"left":0.4318484,"top":0.21707901,"width":0.04255319,"height":0.015163607},"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"1","depth":7,"bounds":{"left":0.47539893,"top":0.21707901,"width":0.12815824,"height":0.015163607},"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"1","depth":7,"bounds":{"left":0.70329124,"top":0.21707901,"width":0.019448139,"height":0.015163607},"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.21707901,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"is_default","depth":7,"bounds":{"left":0.35272607,"top":0.23383878,"width":0.078125,"height":0.015163607},"value":"is_default","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"bounds":{"left":0.4318484,"top":0.23383878,"width":0.04255319,"height":0.015163607},"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"1","depth":7,"bounds":{"left":0.47539893,"top":0.23383878,"width":0.12815824,"height":0.015163607},"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"0","depth":7,"bounds":{"left":0.70329124,"top":0.23383878,"width":0.019448139,"height":0.015163607},"value":"0","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.23383878,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"created_at","depth":7,"bounds":{"left":0.35272607,"top":0.25059855,"width":0.078125,"height":0.015163607},"value":"created_at","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TIMESTAMP","depth":7,"bounds":{"left":0.4318484,"top":0.25059855,"width":0.04255319,"height":0.015163607},"value":"TIMESTAMP","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"NULL","depth":7,"bounds":{"left":0.70329124,"top":0.25059855,"width":0.019448139,"height":0.015163607},"value":"NULL","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.25059855,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"updated_at","depth":7,"bounds":{"left":0.35272607,"top":0.26735833,"width":0.078125,"height":0.015163607},"value":"updated_at","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TIMESTAMP","depth":7,"bounds":{"left":0.4318484,"top":0.26735833,"width":0.04255319,"height":0.015163607},"value":"TIMESTAMP","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"NULL","depth":7,"bounds":{"left":0.70329124,"top":0.26735833,"width":0.019448139,"height":0.015163607},"value":"NULL","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7237367,"top":0.26735833,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXButton","text":"Field","depth":7,"bounds":{"left":0.35073137,"top":0.059856344,"width":0.080784574,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Type","depth":7,"bounds":{"left":0.43151596,"top":0.059856344,"width":0.043550532,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Length","depth":7,"bounds":{"left":0.47506648,"top":0.059856344,"width":0.12915559,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Unsigned","depth":7,"bounds":{"left":0.60422206,"top":0.059856344,"width":0.018949468,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Zerofill","depth":7,"bounds":{"left":0.62317157,"top":0.059856344,"width":0.024933511,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Binary","depth":7,"bounds":{"left":0.648105,"top":0.059856344,"width":0.013962766,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Allow Null","depth":7,"bounds":{"left":0.66206783,"top":0.059856344,"width":0.019946808,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Key","depth":7,"bounds":{"left":0.68201464,"top":0.059856344,"width":0.020944148,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Default","depth":7,"bounds":{"left":0.70295876,"top":0.059856344,"width":0.02044548,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Extra","depth":7,"bounds":{"left":0.7234042,"top":0.059856344,"width":0.029089095,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Encoding","depth":7,"bounds":{"left":0.7524933,"top":0.059856344,"width":0.012632979,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Collation","depth":7,"bounds":{"left":0.76512635,"top":0.059856344,"width":0.012632979,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Comment","depth":7,"bounds":{"left":0.7777593,"top":0.059856344,"width":0.010472074,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"smart item","depth":4,"bounds":{"left":0.71642286,"top":0.44732642,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:3756","help_text":"Edit Table Details (⌘4)","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXMenuButton","text":"action","depth":4,"bounds":{"left":0.72639626,"top":0.44732642,"width":0.011635638,"height":0.019952115},"automation_id":"_NS:1160","role_description":"menu button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"remove","depth":4,"bounds":{"left":0.36037233,"top":0.44732642,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:4152","help_text":"Delete selected field (⌫)","role_description":"button","is_enabled":false,"is_focused":false},{"role":"AXButton","text":"refresh","depth":4,"bounds":{"left":0.38031915,"top":0.44732642,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:2110","help_text":"Refresh table structure (⌘R)","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"add","depth":4,"bounds":{"left":0.35039893,"top":0.44732642,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:1610","help_text":"Add field (⌥⌘A)","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"0","depth":7,"bounds":{"left":0.35239363,"top":0.5079808,"width":0.024268618,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"PRIMARY","depth":7,"bounds":{"left":0.3776596,"top":0.5079808,"width":0.021276595,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":7,"bounds":{"left":0.39993352,"top":0.5079808,"width":0.025764627,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"id","depth":7,"bounds":{"left":0.42669547,"top":0.5079808,"width":0.028424202,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"A","depth":7,"bounds":{"left":0.45611703,"top":0.5079808,"width":0.018450798,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"25080","depth":7,"bounds":{"left":0.47556517,"top":0.5079808,"width":0.021775266,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"bounds":{"left":0.49833778,"top":0.5079808,"width":0.01861702,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"bounds":{"left":0.51795214,"top":0.5079808,"width":0.014295213,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"0","depth":7,"bounds":{"left":0.35239363,"top":0.52474064,"width":0.024268618,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"playbook_categories_uuid_unique","depth":7,"bounds":{"left":0.3776596,"top":0.52474064,"width":0.021276595,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":7,"bounds":{"left":0.39993352,"top":0.52474064,"width":0.025764627,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"uuid","depth":7,"bounds":{"left":0.42669547,"top":0.52474064,"width":0.028424202,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"A","depth":7,"bounds":{"left":0.45611703,"top":0.52474064,"width":0.018450798,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"25080","depth":7,"bounds":{"left":0.47556517,"top":0.52474064,"width":0.021775266,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"bounds":{"left":0.49833778,"top":0.52474064,"width":0.01861702,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"bounds":{"left":0.51795214,"top":0.52474064,"width":0.014295213,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":7,"bounds":{"left":0.35239363,"top":0.5415004,"width":0.024268618,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"playbook_categories_playbook_id_index","depth":7,"bounds":{"left":0.3776596,"top":0.5415004,"width":0.021276595,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":7,"bounds":{"left":0.39993352,"top":0.5415004,"width":0.025764627,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"playbook_id","depth":7,"bounds":{"left":0.42669547,"top":0.5415004,"width":0.028424202,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"A","depth":7,"bounds":{"left":0.45611703,"top":0.5415004,"width":0.018450798,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"1254","depth":7,"bounds":{"left":0.47556517,"top":0.5415004,"width":0.021775266,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"bounds":{"left":0.49833778,"top":0.5415004,"width":0.01861702,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"bounds":{"left":0.51795214,"top":0.5415004,"width":0.014295213,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Non_unique","depth":7,"bounds":{"left":0.35039893,"top":0.4848364,"width":0.026928192,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Key_name","depth":7,"bounds":{"left":0.3773271,"top":0.4848364,"width":0.022273935,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Seq_in_index","depth":7,"bounds":{"left":0.39960107,"top":0.4848364,"width":0.026761968,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Column_name","depth":7,"bounds":{"left":0.42636302,"top":0.4848364,"width":0.029421542,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Collation","depth":7,"bounds":{"left":0.4557846,"top":0.4848364,"width":0.019448139,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Cardinality","depth":7,"bounds":{"left":0.47523272,"top":0.4848364,"width":0.022772606,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Sub_part","depth":7,"bounds":{"left":0.49800533,"top":0.4848364,"width":0.019614361,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Packed","depth":7,"bounds":{"left":0.51761967,"top":0.4848364,"width":0.015292553,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Comment","depth":7,"bounds":{"left":0.53291225,"top":0.4848364,"width":0.03756649,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"remove","depth":4,"bounds":{"left":0.36037233,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:1930","help_text":"Delete selected index","role_description":"button","is_enabled":false,"is_focused":false},{"role":"AXButton","text":"refresh","depth":4,"bounds":{"left":0.37034574,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:2593","help_text":"Refresh table indexes (⌘R)","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"add","depth":4,"bounds":{"left":0.35039893,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:3332","help_text":"Add index","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"INDEXES","depth":4,"bounds":{"left":0.35139626,"top":0.47047088,"width":0.051529255,"height":0.011173184},"automation_id":"_NS:3948","role_description":"text"},{"role":"AXStaticText","text":"(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories","depth":1,"bounds":{"left":0.28956118,"top":0.019952115,"width":0.18550532,"height":0.0415004},"role_description":"text"}]...
|
-3855442780064241766
|
884529157329404594
|
click
|
accessibility
|
NULL
|
TABLES
playbook_categories
playbook_layouts
playbo TABLES
playbook_categories
playbook_layouts
playbooks
playbook
search
cancel
add
Quick Look
action
refresh
id
INT
10
PRI
auto_increment
uuid
BINARY
16
UNI
None
playbook_id
INT
10
MUL
None
type
CHAR
20
all
None
name
VARCHAR
150
None
ai_prompt_description
TEXT
NULL
None
is_selectable
TINYINT
1
1
None
sequence
TINYINT
3
0
None
was_answered
TINYINT
1
1
None
is_default
TINYINT
1
0
None
created_at
TIMESTAMP
NULL
None
updated_at
TIMESTAMP
NULL
None
Field
Type
Length
Unsigned
Zerofill
Binary
Allow Null
Key
Default
Extra
Encoding
Collation
Comment
smart item
action
remove
refresh
add
0
PRIMARY
1
id
A
25080
NULL
NULL
0
playbook_categories_uuid_unique
1
uuid
A
25080
NULL
NULL
1
playbook_categories_playbook_id_index
1
playbook_id
A
1254
NULL
NULL
Non_unique
Key_name
Seq_in_index
Column_name
Collation
Cardinality
Sub_part
Packed
Comment
remove
refresh
add
INDEXES
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories...
|
74901
|
|
74824
|
1864
|
21
|
2026-04-23T10:18:58.195363+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-23/1776 /Users/lukas/.screenpipe/data/data/2026-04-23/1776939538195_m2.jpg...
|
Sequel Ace
|
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_c (MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories...
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
TABLES
playbook_categories
playbook_layouts
playbo TABLES
playbook_categories
playbook_layouts
playbooks
playbook
search
cancel
add
Quick Look
action
refresh
id
INT
10
PRI
auto_increment
uuid
BINARY
16
UNI
None
playbook_id
INT
10
MUL
None
type
CHAR
20
all
None
name
VARCHAR
150
None
ai_prompt_description
TEXT
NULL
None
is_selectable
TINYINT
1
1
None
sequence
TINYINT
3
0
None
was_answered
TINYINT
1
1
None
is_default
TINYINT
1
0
None
created_at
TIMESTAMP
NULL
None
updated_at
TIMESTAMP
NULL
None
Field
Type
Length
Unsigned
Zerofill
Binary
Allow Null
Key
Default
Extra
Encoding
Collation
Comment
smart item
action
remove
refresh
add
0
PRIMARY
1
id
A
25080
NULL
NULL
0
playbook_categories_uuid_unique
1
uuid
A
25080
NULL
NULL
1
playbook_categories_playbook_id_index
1
playbook_id
A
1254
NULL
NULL
Non_unique
Key_name
Seq_in_index
Column_name
Collation
Cardinality
Sub_part
Packed
Comment
remove
refresh
add
INDEXES
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"TABLES","depth":6,"bounds":{"left":0.26595744,"top":0.09417398,"width":0.0787899,"height":0.019952115},"value":"TABLES","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook_categories","depth":6,"bounds":{"left":0.26595744,"top":0.11572227,"width":0.0787899,"height":0.015163607},"value":"playbook_categories","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook_layouts","depth":6,"bounds":{"left":0.26595744,"top":0.13248204,"width":0.0787899,"height":0.015163607},"value":"playbook_layouts","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbooks","depth":6,"bounds":{"left":0.26595744,"top":0.14924182,"width":0.0787899,"height":0.015163607},"value":"playbooks","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook","depth":3,"bounds":{"left":0.26230052,"top":0.06384677,"width":0.08610372,"height":0.017557861},"automation_id":"_NS:879","value":"playbook","placeholder":"Filter","role_description":"search text field","subrole":"AXSearchField","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"search","depth":4,"bounds":{"left":0.2629654,"top":0.06384677,"width":0.00831117,"height":0.017557861},"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"cancel","depth":4,"bounds":{"left":0.33976063,"top":0.06384677,"width":0.00731383,"height":0.017557861},"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"add","depth":2,"bounds":{"left":0.2606383,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:4671","help_text":"Add new table","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Quick Look","depth":2,"bounds":{"left":0.29554522,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:1133","help_text":"Toggle the visibility of the Information panel","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXMenuButton","text":"action","depth":2,"bounds":{"left":0.26894948,"top":0.698324,"width":0.011635638,"height":0.019952115},"automation_id":"_NS:1882","role_description":"menu button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"refresh","depth":2,"bounds":{"left":0.2839096,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:3295","help_text":"Refresh table list","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"id","depth":7,"bounds":{"left":0.35272607,"top":0.0830008,"width":0.024601065,"height":0.015163607},"value":"id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"bounds":{"left":0.37832448,"top":0.0830008,"width":0.04255319,"height":0.015163607},"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"bounds":{"left":0.421875,"top":0.0830008,"width":0.12815824,"height":0.015163607},"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"PRI","depth":7,"bounds":{"left":0.62882316,"top":0.0830008,"width":0.019946808,"height":0.015163607},"role_description":"text"},{"role":"AXComboBox","text":"auto_increment","depth":7,"bounds":{"left":0.67021275,"top":0.0830008,"width":0.028091755,"height":0.015163607},"value":"auto_increment","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"uuid","depth":7,"bounds":{"left":0.35272607,"top":0.09976058,"width":0.024601065,"height":0.015163607},"value":"uuid","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"BINARY","depth":7,"bounds":{"left":0.37832448,"top":0.09976058,"width":0.04255319,"height":0.015163607},"value":"BINARY","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"16","depth":7,"bounds":{"left":0.421875,"top":0.09976058,"width":0.12815824,"height":0.015163607},"value":"16","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"UNI","depth":7,"bounds":{"left":0.62882316,"top":0.09976058,"width":0.019946808,"height":0.015163607},"role_description":"text"},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.67021275,"top":0.09976058,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"playbook_id","depth":7,"bounds":{"left":0.35272607,"top":0.11652035,"width":0.024601065,"height":0.015163607},"value":"playbook_id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"bounds":{"left":0.37832448,"top":0.11652035,"width":0.04255319,"height":0.015163607},"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"bounds":{"left":0.421875,"top":0.11652035,"width":0.12815824,"height":0.015163607},"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"MUL","depth":7,"bounds":{"left":0.62882316,"top":0.11652035,"width":0.019946808,"height":0.015163607},"role_description":"text"},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.67021275,"top":0.11652035,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"type","depth":7,"bounds":{"left":0.35272607,"top":0.13328013,"width":0.024601065,"height":0.015163607},"value":"type","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"CHAR","depth":7,"bounds":{"left":0.37832448,"top":0.13328013,"width":0.04255319,"height":0.015163607},"value":"CHAR","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"20","depth":7,"bounds":{"left":0.421875,"top":0.13328013,"width":0.12815824,"height":0.015163607},"value":"20","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"all","depth":7,"bounds":{"left":0.6497673,"top":0.13328013,"width":0.019448139,"height":0.015163607},"value":"all","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.67021275,"top":0.13328013,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"name","depth":7,"bounds":{"left":0.35272607,"top":0.15003991,"width":0.024601065,"height":0.015163607},"value":"name","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"VARCHAR","depth":7,"bounds":{"left":0.37832448,"top":0.15003991,"width":0.04255319,"height":0.015163607},"value":"VARCHAR","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"150","depth":7,"bounds":{"left":0.421875,"top":0.15003991,"width":0.12815824,"height":0.015163607},"value":"150","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.67021275,"top":0.15003991,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"ai_prompt_description","depth":7,"bounds":{"left":0.35272607,"top":0.16679968,"width":0.046875,"height":0.015163607},"value":"ai_prompt_description","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TEXT","depth":7,"bounds":{"left":0.4005984,"top":0.16679968,"width":0.04255319,"height":0.015163607},"value":"TEXT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"NULL","depth":7,"bounds":{"left":0.67204124,"top":0.16679968,"width":0.019448139,"height":0.015163607},"value":"NULL","role_description":"text field","is_enabled":false,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.6924867,"top":0.16679968,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"is_selectable","depth":7,"bounds":{"left":0.35272607,"top":0.18355946,"width":0.046875,"height":0.015163607},"value":"is_selectable","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"bounds":{"left":0.4005984,"top":0.18355946,"width":0.04255319,"height":0.015163607},"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"1","depth":7,"bounds":{"left":0.44414893,"top":0.18355946,"width":0.12815824,"height":0.015163607},"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"1","depth":7,"bounds":{"left":0.67204124,"top":0.18355946,"width":0.019448139,"height":0.015163607},"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.6924867,"top":0.18355946,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"sequence","depth":7,"bounds":{"left":0.35272607,"top":0.20031923,"width":0.046875,"height":0.015163607},"value":"sequence","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"bounds":{"left":0.4005984,"top":0.20031923,"width":0.04255319,"height":0.015163607},"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"3","depth":7,"bounds":{"left":0.44414893,"top":0.20031923,"width":0.12815824,"height":0.015163607},"value":"3","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"0","depth":7,"bounds":{"left":0.67204124,"top":0.20031923,"width":0.019448139,"height":0.015163607},"value":"0","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.6924867,"top":0.20031923,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"was_answered","depth":7,"bounds":{"left":0.35272607,"top":0.21707901,"width":0.046875,"height":0.015163607},"value":"was_answered","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"bounds":{"left":0.4005984,"top":0.21707901,"width":0.04255319,"height":0.015163607},"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"1","depth":7,"bounds":{"left":0.44414893,"top":0.21707901,"width":0.12815824,"height":0.015163607},"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"1","depth":7,"bounds":{"left":0.67204124,"top":0.21707901,"width":0.019448139,"height":0.015163607},"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.6924867,"top":0.21707901,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"is_default","depth":7,"bounds":{"left":0.35272607,"top":0.23383878,"width":0.046875,"height":0.015163607},"value":"is_default","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TINYINT","depth":7,"bounds":{"left":0.4005984,"top":0.23383878,"width":0.04255319,"height":0.015163607},"value":"TINYINT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"1","depth":7,"bounds":{"left":0.44414893,"top":0.23383878,"width":0.12815824,"height":0.015163607},"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"0","depth":7,"bounds":{"left":0.67204124,"top":0.23383878,"width":0.019448139,"height":0.015163607},"value":"0","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.6924867,"top":0.23383878,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"created_at","depth":7,"bounds":{"left":0.35272607,"top":0.25059855,"width":0.046875,"height":0.015163607},"value":"created_at","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TIMESTAMP","depth":7,"bounds":{"left":0.4005984,"top":0.25059855,"width":0.04255319,"height":0.015163607},"value":"TIMESTAMP","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"NULL","depth":7,"bounds":{"left":0.67204124,"top":0.25059855,"width":0.019448139,"height":0.015163607},"value":"NULL","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.6924867,"top":0.25059855,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"updated_at","depth":7,"bounds":{"left":0.35272607,"top":0.26735833,"width":0.046875,"height":0.015163607},"value":"updated_at","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TIMESTAMP","depth":7,"bounds":{"left":0.4005984,"top":0.26735833,"width":0.04255319,"height":0.015163607},"value":"TIMESTAMP","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"NULL","depth":7,"bounds":{"left":0.67204124,"top":0.26735833,"width":0.019448139,"height":0.015163607},"value":"NULL","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.6924867,"top":0.26735833,"width":0.028091755,"height":0.015163607},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXButton","text":"Field","depth":7,"bounds":{"left":0.35073137,"top":0.059856344,"width":0.049534574,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Type","depth":7,"bounds":{"left":0.40026596,"top":0.059856344,"width":0.043550532,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Length","depth":7,"bounds":{"left":0.44381648,"top":0.059856344,"width":0.12915559,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Unsigned","depth":7,"bounds":{"left":0.57297206,"top":0.059856344,"width":0.018949468,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Zerofill","depth":7,"bounds":{"left":0.59192157,"top":0.059856344,"width":0.024933511,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Binary","depth":7,"bounds":{"left":0.616855,"top":0.059856344,"width":0.013962766,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Allow Null","depth":7,"bounds":{"left":0.63081783,"top":0.059856344,"width":0.019946808,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Key","depth":7,"bounds":{"left":0.65076464,"top":0.059856344,"width":0.020944148,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Default","depth":7,"bounds":{"left":0.67170876,"top":0.059856344,"width":0.02044548,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Extra","depth":7,"bounds":{"left":0.6921542,"top":0.059856344,"width":0.029089095,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Encoding","depth":7,"bounds":{"left":0.7212433,"top":0.059856344,"width":0.012632979,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Collation","depth":7,"bounds":{"left":0.73387635,"top":0.059856344,"width":0.012632979,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Comment","depth":7,"bounds":{"left":0.7465093,"top":0.059856344,"width":0.010472074,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"smart item","depth":4,"bounds":{"left":0.71642286,"top":0.44732642,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:3756","help_text":"Edit Table Details (⌘4)","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXMenuButton","text":"action","depth":4,"bounds":{"left":0.72639626,"top":0.44732642,"width":0.011635638,"height":0.019952115},"automation_id":"_NS:1160","role_description":"menu button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"remove","depth":4,"bounds":{"left":0.36037233,"top":0.44732642,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:4152","help_text":"Delete selected field (⌫)","role_description":"button","is_enabled":false,"is_focused":false},{"role":"AXButton","text":"refresh","depth":4,"bounds":{"left":0.38031915,"top":0.44732642,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:2110","help_text":"Refresh table structure (⌘R)","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"add","depth":4,"bounds":{"left":0.35039893,"top":0.44732642,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:1610","help_text":"Add field (⌥⌘A)","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"0","depth":7,"bounds":{"left":0.35239363,"top":0.5079808,"width":0.024268618,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"PRIMARY","depth":7,"bounds":{"left":0.3776596,"top":0.5079808,"width":0.021276595,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":7,"bounds":{"left":0.39993352,"top":0.5079808,"width":0.025764627,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"id","depth":7,"bounds":{"left":0.42669547,"top":0.5079808,"width":0.028424202,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"A","depth":7,"bounds":{"left":0.45611703,"top":0.5079808,"width":0.018450798,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"25080","depth":7,"bounds":{"left":0.47556517,"top":0.5079808,"width":0.021775266,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"bounds":{"left":0.49833778,"top":0.5079808,"width":0.01861702,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"bounds":{"left":0.51795214,"top":0.5079808,"width":0.014295213,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"0","depth":7,"bounds":{"left":0.35239363,"top":0.52474064,"width":0.024268618,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"playbook_categories_uuid_unique","depth":7,"bounds":{"left":0.3776596,"top":0.52474064,"width":0.021276595,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":7,"bounds":{"left":0.39993352,"top":0.52474064,"width":0.025764627,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"uuid","depth":7,"bounds":{"left":0.42669547,"top":0.52474064,"width":0.028424202,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"A","depth":7,"bounds":{"left":0.45611703,"top":0.52474064,"width":0.018450798,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"25080","depth":7,"bounds":{"left":0.47556517,"top":0.52474064,"width":0.021775266,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"bounds":{"left":0.49833778,"top":0.52474064,"width":0.01861702,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"bounds":{"left":0.51795214,"top":0.52474064,"width":0.014295213,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":7,"bounds":{"left":0.35239363,"top":0.5415004,"width":0.024268618,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"playbook_categories_playbook_id_index","depth":7,"bounds":{"left":0.3776596,"top":0.5415004,"width":0.021276595,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":7,"bounds":{"left":0.39993352,"top":0.5415004,"width":0.025764627,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"playbook_id","depth":7,"bounds":{"left":0.42669547,"top":0.5415004,"width":0.028424202,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"A","depth":7,"bounds":{"left":0.45611703,"top":0.5415004,"width":0.018450798,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"1254","depth":7,"bounds":{"left":0.47556517,"top":0.5415004,"width":0.021775266,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"bounds":{"left":0.49833778,"top":0.5415004,"width":0.01861702,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"NULL","depth":7,"bounds":{"left":0.51795214,"top":0.5415004,"width":0.014295213,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Non_unique","depth":7,"bounds":{"left":0.35039893,"top":0.4848364,"width":0.026928192,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Key_name","depth":7,"bounds":{"left":0.3773271,"top":0.4848364,"width":0.022273935,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Seq_in_index","depth":7,"bounds":{"left":0.39960107,"top":0.4848364,"width":0.026761968,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Column_name","depth":7,"bounds":{"left":0.42636302,"top":0.4848364,"width":0.029421542,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Collation","depth":7,"bounds":{"left":0.4557846,"top":0.4848364,"width":0.019448139,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Cardinality","depth":7,"bounds":{"left":0.47523272,"top":0.4848364,"width":0.022772606,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Sub_part","depth":7,"bounds":{"left":0.49800533,"top":0.4848364,"width":0.019614361,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Packed","depth":7,"bounds":{"left":0.51761967,"top":0.4848364,"width":0.015292553,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Comment","depth":7,"bounds":{"left":0.53291225,"top":0.4848364,"width":0.03756649,"height":0.022346368},"role_description":"sort button","subrole":"AXSortButton","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"remove","depth":4,"bounds":{"left":0.36037233,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:1930","help_text":"Delete selected index","role_description":"button","is_enabled":false,"is_focused":false},{"role":"AXButton","text":"refresh","depth":4,"bounds":{"left":0.37034574,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:2593","help_text":"Refresh table indexes (⌘R)","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"add","depth":4,"bounds":{"left":0.35039893,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:3332","help_text":"Add index","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"INDEXES","depth":4,"bounds":{"left":0.35139626,"top":0.47047088,"width":0.051529255,"height":0.011173184},"automation_id":"_NS:3948","role_description":"text"},{"role":"AXStaticText","text":"(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories","depth":1,"bounds":{"left":0.28956118,"top":0.019952115,"width":0.18550532,"height":0.0415004},"role_description":"text"}]...
|
-3855442780064241766
|
884529157329404594
|
click
|
accessibility
|
NULL
|
TABLES
playbook_categories
playbook_layouts
playbo TABLES
playbook_categories
playbook_layouts
playbooks
playbook
search
cancel
add
Quick Look
action
refresh
id
INT
10
PRI
auto_increment
uuid
BINARY
16
UNI
None
playbook_id
INT
10
MUL
None
type
CHAR
20
all
None
name
VARCHAR
150
None
ai_prompt_description
TEXT
NULL
None
is_selectable
TINYINT
1
1
None
sequence
TINYINT
3
0
None
was_answered
TINYINT
1
1
None
is_default
TINYINT
1
0
None
created_at
TIMESTAMP
NULL
None
updated_at
TIMESTAMP
NULL
None
Field
Type
Length
Unsigned
Zerofill
Binary
Allow Null
Key
Default
Extra
Encoding
Collation
Comment
smart item
action
remove
refresh
add
0
PRIMARY
1
id
A
25080
NULL
NULL
0
playbook_categories_uuid_unique
1
uuid
A
25080
NULL
NULL
1
playbook_categories_playbook_id_index
1
playbook_id
A
1254
NULL
NULL
Non_unique
Key_name
Seq_in_index
Column_name
Collation
Cardinality
Sub_part
Packed
Comment
remove
refresh
add
INDEXES
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories...
|
NULL
|
|
74823
|
1864
|
20
|
2026-04-23T10:18:52.732901+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-23/1776 /Users/lukas/.screenpipe/data/data/2026-04-23/1776939532732_m2.jpg...
|
Sequel Ace
|
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_c (MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories...
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
TABLES
playbook_categories
playbook_layouts
playbo TABLES
playbook_categories
playbook_layouts
playbooks
playbook
search
cancel
add
Quick Look
action
refresh
1
Gú½ý¸¢É¾çùuÍ
1
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"TABLES","depth":6,"bounds":{"left":0.26595744,"top":0.09417398,"width":0.0787899,"height":0.019952115},"value":"TABLES","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook_categories","depth":6,"bounds":{"left":0.26595744,"top":0.11572227,"width":0.0787899,"height":0.015163607},"value":"playbook_categories","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook_layouts","depth":6,"bounds":{"left":0.26595744,"top":0.13248204,"width":0.0787899,"height":0.015163607},"value":"playbook_layouts","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbooks","depth":6,"bounds":{"left":0.26595744,"top":0.14924182,"width":0.0787899,"height":0.015163607},"value":"playbooks","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook","depth":3,"bounds":{"left":0.26230052,"top":0.06384677,"width":0.08610372,"height":0.017557861},"automation_id":"_NS:879","value":"playbook","placeholder":"Filter","role_description":"search text field","subrole":"AXSearchField","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"search","depth":4,"bounds":{"left":0.2629654,"top":0.06384677,"width":0.00831117,"height":0.017557861},"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"cancel","depth":4,"bounds":{"left":0.33976063,"top":0.06384677,"width":0.00731383,"height":0.017557861},"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"add","depth":2,"bounds":{"left":0.2606383,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:4671","help_text":"Add new table","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Quick Look","depth":2,"bounds":{"left":0.29554522,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:1133","help_text":"Toggle the visibility of the Information panel","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXMenuButton","text":"action","depth":2,"bounds":{"left":0.26894948,"top":0.698324,"width":0.011635638,"height":0.019952115},"automation_id":"_NS:1882","role_description":"menu button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"refresh","depth":2,"bounds":{"left":0.2839096,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:3295","help_text":"Refresh table list","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"1","depth":6,"bounds":{"left":0.35272607,"top":0.13328013,"width":0.01861702,"height":0.015163607},"value":"1","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"GÃ\u0003º½ý¸¢É¾çùuÍ","depth":6,"bounds":{"left":0.3723404,"top":0.13328013,"width":0.049867023,"height":0.015163607},"value":"GÃ\u0003º½ý¸¢É¾çùuÍ","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"1","depth":6,"bounds":{"left":0.42320478,"top":0.13328013,"width":0.075465426,"height":0.015163607},"value":"1","role_description":"text field","is_enabled":true},{"role":"AXStaticText","text":"(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories","depth":1,"bounds":{"left":0.28956118,"top":0.019952115,"width":0.18550532,"height":0.0415004},"role_description":"text"}]...
|
-2903401652698435818
|
-8106285248011250573
|
click
|
accessibility
|
NULL
|
TABLES
playbook_categories
playbook_layouts
playbo TABLES
playbook_categories
playbook_layouts
playbooks
playbook
search
cancel
add
Quick Look
action
refresh
1
Gú½ý¸¢É¾çùuÍ
1
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories...
|
74822
|
|
74904
|
1866
|
19
|
2026-04-23T10:23:59.329821+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-23/1776 /Users/lukas/.screenpipe/data/data/2026-04-23/1776939839329_m2.jpg...
|
Sequel Ace
|
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbooks
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
TABLES
playbook_categories
playbook_layouts
playbo TABLES
playbook_categories
playbook_layouts
playbooks
playbook
search
cancel
add
Quick Look
action
refresh...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"TABLES","depth":6,"bounds":{"left":0.26595744,"top":0.09417398,"width":0.0787899,"height":0.019952115},"value":"TABLES","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook_categories","depth":6,"bounds":{"left":0.26595744,"top":0.11572227,"width":0.0787899,"height":0.015163607},"value":"playbook_categories","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook_layouts","depth":6,"bounds":{"left":0.26595744,"top":0.13248204,"width":0.0787899,"height":0.015163607},"value":"playbook_layouts","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbooks","depth":6,"bounds":{"left":0.26595744,"top":0.14924182,"width":0.0787899,"height":0.015163607},"value":"playbooks","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook","depth":3,"bounds":{"left":0.26230052,"top":0.06384677,"width":0.08610372,"height":0.017557861},"automation_id":"_NS:879","value":"playbook","placeholder":"Filter","role_description":"search text field","subrole":"AXSearchField","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"search","depth":4,"bounds":{"left":0.2629654,"top":0.06384677,"width":0.00831117,"height":0.017557861},"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"cancel","depth":4,"bounds":{"left":0.33976063,"top":0.06384677,"width":0.00731383,"height":0.017557861},"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"add","depth":2,"bounds":{"left":0.2606383,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:4671","help_text":"Add new table","role_description":"button","is_enabled":false,"is_focused":false},{"role":"AXButton","text":"Quick Look","depth":2,"bounds":{"left":0.29554522,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:1133","help_text":"Toggle the visibility of the Information panel","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXMenuButton","text":"action","depth":2,"bounds":{"left":0.26894948,"top":0.698324,"width":0.011635638,"height":0.019952115},"automation_id":"_NS:1882","role_description":"menu button","is_enabled":false,"is_focused":false},{"role":"AXButton","text":"refresh","depth":2,"bounds":{"left":0.2839096,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:3295","help_text":"Refresh table list","role_description":"button","is_enabled":false,"is_focused":false}]...
|
6077830561431084936
|
3278657379851883634
|
visual_change
|
hybrid
|
NULL
|
TABLES
playbook_categories
playbook_layouts
playbo TABLES
playbook_categories
playbook_layouts
playbooks
playbook
search
cancel
add
Quick Look
action
refresh
Activitysec uel AceDatabaseTableWindowHelpVIewbunalesJiminny... v# random# releases# sona-ofnce# support# thank-yous# the_people_of_jimi...o? Direct messagesG. Vasil Vasilev. Adelina Petrova EB Aneliya Angelova, ...8P. Stoyan Tomovf.. Nikolay YankovP. Petko KashinskiR. Aneliya Angelova. Nikolay Nikolov8. Mario Georgiev% Todor Stamatov OC. Gabriela DurevaP. Galya Dimitrova* Stefka Stoyanova2. Stoyan Tanev Eit: Apps• ToastJira CloudGoogle Cale...& e. Vasil VasilevMessagest Add canvasO FilesMorevвсичко н.Tuesday, April 21st~g 28 replies Last reply 2 days agoLukas Kovalik 12:39 PMзащото то се вика през syncleaaтам си има LeadConverted който се грижи заrematchin?Vasil Vasilev 1:07 PMJукaш, приветкато имаш време, хвърли едно око тук.[URL_WITH_CREDENTIALS] 20541uuidplaybook_idlypenameai_prompt_descriptionis selectablesequencewas_answeredis_defaultcreated_atupdated atSminny2.Content RelationsTriggers Table InfounsenhZerofillTypeBINARYCHARVARCHARTEXTTINYINTTINYINITINYINTTINYINTTIMESTAMPTIMESTAMPLength• 16.• 20150C 1÷ 300000INDEXESNon_unique | Key_name | Seq_in_ind... | Column_name | Collation | Cardinality | Sub_part | Pack... CommentPRIMARY 1playboo... 1uuidplaybook_id A25080250801254NULLNULLNULLNULLNULLNULLE BaseService.ohv› E tests/UnitTable HistoryAllow.… Ke,MUL289DefaultNULLNULL121125126129133"suppont Dally • In 1h 31m100% S2Inu 23 Aor 13.23.09extraauto_iNone4 / 20 viewed• Checks pendina+138 00000ViewedNoneprevale functton buttarotcowuplaskray todularray sltelas drrayNoneNoneNoneNoneSpayload = 1'ACtIvityDate' => STleldsl'ACtivityDate ?? date('Y=m-d')…'TaskSubtype' = 'Call',NoneNoneNoneif (! empty(Sfields['Priority'I)) €Spayload +=1"Priority' => $fields['Priority'l,if (! empty($fields ['ReminderDateTime'])) {Spayload +=l'ReminderDatelime' = Stields 'ReminderDatel1me'),'IsReminderSet' = true,return $payload;private tunction buildFollowupEventPayload(array Stields): arraySpayload = 1'StartDateTime' => $fields('StartDateTime'] ?? date('Y-m-d\TH:i:s\Z'),if (empty(Sfields ['EndDateTime'I)) {Spayload += ['IsAllDayEvent' => true.y else {Spayload +='EndDateTime' => Sfields['EndDateTime'),if (! empty($fields ['ReminderDateTime'])) {Soavload += ['ReminderDateTime' => Sfields ['ReminderDateTime'],'TsReminderSet' => true....
|
NULL
|
|
74822
|
1864
|
19
|
2026-04-23T10:18:50.742501+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-23/1776 /Users/lukas/.screenpipe/data/data/2026-04-23/1776939530742_m2.jpg...
|
Sequel Ace
|
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_c (MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories...
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
TABLES
playbook_categories
playbook_layouts
playbo TABLES
playbook_categories
playbook_layouts
playbooks
playbook
search
cancel
add
Quick Look
action
refresh
add
refresh
remove
left arrow
action
right arrow
remove
Add Filter
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"TABLES","depth":6,"bounds":{"left":0.26595744,"top":0.09417398,"width":0.0787899,"height":0.019952115},"value":"TABLES","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook_categories","depth":6,"bounds":{"left":0.26595744,"top":0.11572227,"width":0.0787899,"height":0.015163607},"value":"playbook_categories","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook_layouts","depth":6,"bounds":{"left":0.26595744,"top":0.13248204,"width":0.0787899,"height":0.015163607},"value":"playbook_layouts","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbooks","depth":6,"bounds":{"left":0.26595744,"top":0.14924182,"width":0.0787899,"height":0.015163607},"value":"playbooks","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook","depth":3,"bounds":{"left":0.26230052,"top":0.06384677,"width":0.08610372,"height":0.017557861},"automation_id":"_NS:879","value":"playbook","placeholder":"Filter","role_description":"search text field","subrole":"AXSearchField","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"search","depth":4,"bounds":{"left":0.2629654,"top":0.06384677,"width":0.00831117,"height":0.017557861},"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"cancel","depth":4,"bounds":{"left":0.33976063,"top":0.06384677,"width":0.00731383,"height":0.017557861},"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"add","depth":2,"bounds":{"left":0.2606383,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:4671","help_text":"Add new table","role_description":"button","is_enabled":false,"is_focused":false},{"role":"AXButton","text":"Quick Look","depth":2,"bounds":{"left":0.29554522,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:1133","help_text":"Toggle the visibility of the Information panel","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXMenuButton","text":"action","depth":2,"bounds":{"left":0.26894948,"top":0.698324,"width":0.011635638,"height":0.019952115},"automation_id":"_NS:1882","role_description":"menu button","is_enabled":false,"is_focused":false},{"role":"AXButton","text":"refresh","depth":2,"bounds":{"left":0.2839096,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:3295","help_text":"Refresh table list","role_description":"button","is_enabled":false,"is_focused":false},{"role":"AXButton","text":"add","depth":3,"bounds":{"left":0.35073137,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:1134","help_text":"Add row (⌥⌘A)","role_description":"button","is_enabled":false,"is_focused":false},{"role":"AXButton","text":"refresh","depth":3,"bounds":{"left":0.38031915,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:123","help_text":"Refresh table contents (⌘R)","role_description":"button","is_enabled":false,"is_focused":false},{"role":"AXButton","text":"remove","depth":3,"bounds":{"left":0.36037233,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:4343","help_text":"Delete selected row(s) (⌫)","role_description":"button","is_enabled":false,"is_focused":false},{"role":"AXButton","text":"left arrow","depth":3,"bounds":{"left":0.7084442,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:4170","help_text":"View previous page of results","role_description":"button","is_enabled":false,"is_focused":false},{"role":"AXButton","text":"action","depth":3,"bounds":{"left":0.7184175,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:4785","help_text":"Jump to page (⌘J) or view pagination options","role_description":"button","is_enabled":false,"is_focused":false},{"role":"AXButton","text":"right arrow","depth":3,"bounds":{"left":0.72839093,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:3363","help_text":"View next page of results","role_description":"button","is_enabled":false,"is_focused":false},{"role":"AXButton","text":"remove","depth":3,"bounds":{"left":0.35039893,"top":0.06384677,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:740","help_text":"Clear filters","role_description":"button","is_enabled":false,"is_focused":false},{"role":"AXButton","text":"Add Filter","depth":3,"bounds":{"left":0.7117686,"top":0.06624102,"width":0.021941489,"height":0.015163607},"automation_id":"_NS:4584","role_description":"button","is_enabled":false,"is_focused":false},{"role":"AXStaticText","text":"(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories","depth":1,"bounds":{"left":0.28956118,"top":0.019952115,"width":0.18550532,"height":0.0415004},"role_description":"text"}]...
|
2921855082624942916
|
972835107545584725
|
click
|
accessibility
|
NULL
|
TABLES
playbook_categories
playbook_layouts
playbo TABLES
playbook_categories
playbook_layouts
playbooks
playbook
search
cancel
add
Quick Look
action
refresh
add
refresh
remove
left arrow
action
right arrow
remove
Add Filter
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/playbook_categories...
|
NULL
|
|
74821
|
1864
|
18
|
2026-04-23T10:18:48.113277+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-23/1776 /Users/lukas/.screenpipe/data/data/2026-04-23/1776939528113_m2.jpg...
|
Sequel Ace
|
(MySQL 11.4.9-MariaDB-log) PROD/jiminny
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
TABLES
activity_plays
ai_crm_template_fields
ai_cr TABLES
activity_plays
ai_crm_template_fields
ai_crm_template_filters
ai_crm_template_log
ai_crm_template_runs
ai_crm_template_write_logs
ai_crm_templates
playback_theme_topic_triggers
playback_theme_topics
playback_themes
playbook_categories
playbook_layouts
playbooks
playlist_activities
playlist_shares
playlists
pla
search
cancel
add
Quick Look
action
refresh
add
refresh
remove
left arrow
action
right arrow
remove
Add Filter
(MySQL 11.4.9-MariaDB-log) PROD/jiminny...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"TABLES","depth":6,"bounds":{"left":0.26595744,"top":0.09417398,"width":0.0787899,"height":0.019952115},"value":"TABLES","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_plays","depth":6,"bounds":{"left":0.26595744,"top":0.11572227,"width":0.0787899,"height":0.015163607},"value":"activity_plays","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ai_crm_template_fields","depth":6,"bounds":{"left":0.26595744,"top":0.13248204,"width":0.0787899,"height":0.015163607},"value":"ai_crm_template_fields","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ai_crm_template_filters","depth":6,"bounds":{"left":0.26595744,"top":0.14924182,"width":0.0787899,"height":0.015163607},"value":"ai_crm_template_filters","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ai_crm_template_log","depth":6,"bounds":{"left":0.26595744,"top":0.1660016,"width":0.0787899,"height":0.015163607},"value":"ai_crm_template_log","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ai_crm_template_runs","depth":6,"bounds":{"left":0.26595744,"top":0.18276137,"width":0.0787899,"height":0.015163607},"value":"ai_crm_template_runs","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ai_crm_template_write_logs","depth":6,"bounds":{"left":0.26595744,"top":0.19952115,"width":0.0787899,"height":0.015163607},"value":"ai_crm_template_write_logs","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ai_crm_templates","depth":6,"bounds":{"left":0.26595744,"top":0.21628092,"width":0.0787899,"height":0.015163607},"value":"ai_crm_templates","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playback_theme_topic_triggers","depth":6,"bounds":{"left":0.26595744,"top":0.2330407,"width":0.0787899,"height":0.015163607},"value":"playback_theme_topic_triggers","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playback_theme_topics","depth":6,"bounds":{"left":0.26595744,"top":0.24980047,"width":0.0787899,"height":0.015163607},"value":"playback_theme_topics","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playback_themes","depth":6,"bounds":{"left":0.26595744,"top":0.26656026,"width":0.0787899,"height":0.015163607},"value":"playback_themes","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook_categories","depth":6,"bounds":{"left":0.26595744,"top":0.28332004,"width":0.0787899,"height":0.015163607},"value":"playbook_categories","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook_layouts","depth":6,"bounds":{"left":0.26595744,"top":0.30007982,"width":0.0787899,"height":0.015163607},"value":"playbook_layouts","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbooks","depth":6,"bounds":{"left":0.26595744,"top":0.31683958,"width":0.0787899,"height":0.015163607},"value":"playbooks","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playlist_activities","depth":6,"bounds":{"left":0.26595744,"top":0.33359936,"width":0.0787899,"height":0.015163607},"value":"playlist_activities","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playlist_shares","depth":6,"bounds":{"left":0.26595744,"top":0.35035914,"width":0.0787899,"height":0.015163607},"value":"playlist_shares","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playlists","depth":6,"bounds":{"left":0.26595744,"top":0.36711892,"width":0.0787899,"height":0.015163607},"value":"playlists","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"pla","depth":3,"bounds":{"left":0.26230052,"top":0.06384677,"width":0.08610372,"height":0.017557861},"automation_id":"_NS:879","value":"pla","placeholder":"Filter","role_description":"search text field","subrole":"AXSearchField","is_enabled":true,"is_focused":true},{"role":"AXButton","text":"search","depth":4,"bounds":{"left":0.2629654,"top":0.06384677,"width":0.00831117,"height":0.017557861},"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"cancel","depth":4,"bounds":{"left":0.33976063,"top":0.06384677,"width":0.00731383,"height":0.017557861},"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"add","depth":2,"bounds":{"left":0.2606383,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:4671","help_text":"Add new table","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Quick Look","depth":2,"bounds":{"left":0.29554522,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:1133","help_text":"Toggle the visibility of the Information panel","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXMenuButton","text":"action","depth":2,"bounds":{"left":0.26894948,"top":0.698324,"width":0.011635638,"height":0.019952115},"automation_id":"_NS:1882","role_description":"menu button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"refresh","depth":2,"bounds":{"left":0.2839096,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:3295","help_text":"Refresh table list","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"add","depth":3,"bounds":{"left":0.35073137,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:1134","help_text":"Add row (⌥⌘A)","role_description":"button","is_enabled":false,"is_focused":false},{"role":"AXButton","text":"refresh","depth":3,"bounds":{"left":0.38031915,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:123","help_text":"Refresh table contents (⌘R)","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"remove","depth":3,"bounds":{"left":0.36037233,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:4343","help_text":"Delete selected row(s) (⌫)","role_description":"button","is_enabled":false,"is_focused":false},{"role":"AXButton","text":"left arrow","depth":3,"bounds":{"left":0.7084442,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:4170","help_text":"View previous page of results","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"action","depth":3,"bounds":{"left":0.7184175,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:4785","help_text":"Jump to page (⌘J) or view pagination options","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"right arrow","depth":3,"bounds":{"left":0.72839093,"top":0.698324,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:3363","help_text":"View next page of results","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"remove","depth":3,"bounds":{"left":0.35039893,"top":0.06384677,"width":0.00831117,"height":0.019952115},"automation_id":"_NS:740","help_text":"Clear filters","role_description":"button","is_enabled":false,"is_focused":false},{"role":"AXButton","text":"Add Filter","depth":3,"bounds":{"left":0.7117686,"top":0.06624102,"width":0.021941489,"height":0.015163607},"automation_id":"_NS:4584","role_description":"button","is_enabled":false,"is_focused":false},{"role":"AXStaticText","text":"(MySQL 11.4.9-MariaDB-log) PROD/jiminny","depth":1,"bounds":{"left":0.28956118,"top":0.019952115,"width":0.18550532,"height":0.0415004},"role_description":"text"}]...
|
-6068992473536787937
|
6417744002896926415
|
click
|
accessibility
|
NULL
|
TABLES
activity_plays
ai_crm_template_fields
ai_cr TABLES
activity_plays
ai_crm_template_fields
ai_crm_template_filters
ai_crm_template_log
ai_crm_template_runs
ai_crm_template_write_logs
ai_crm_templates
playback_theme_topic_triggers
playback_theme_topics
playback_themes
playbook_categories
playbook_layouts
playbooks
playlist_activities
playlist_shares
playlists
pla
search
cancel
add
Quick Look
action
refresh
add
refresh
remove
left arrow
action
right arrow
remove
Add Filter
(MySQL 11.4.9-MariaDB-log) PROD/jiminny...
|
74817
|
|
13362
|
291
|
44
|
2026-04-14T12:20:17.201537+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776169217201_m2.jpg...
|
Sequel Ace
|
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/opportunit (MySQL 11.4.9-MariaDB-log) PROD/jiminny/opportunities...
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
TABLES
opportunities
opportunity_comments
opportun TABLES
opportunities
opportunity_comments
opportunity_contacts
opportunity_stages
opp
search
cancel
add
Quick Look
action
refresh
id
INT
10
PRI
auto_increment
uuid
BINARY
16
UNI
None
team_id
INT
10
MUL
NULL
None
crm_configuration_id
INT
10
MUL
NULL
None
account_id
INT
10
MUL
None
stage_id
INT
10
MUL
None
stage_updated_at
DATETIME
NULL
None
record_type_id...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"TABLES","depth":6,"bounds":{"left":0.23945312,"top":1.0,"width":0.09257813,"height":-0.081944466},"value":"TABLES","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"opportunities","depth":6,"value":"opportunities","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"opportunity_comments","depth":6,"value":"opportunity_comments","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"opportunity_contacts","depth":6,"value":"opportunity_contacts","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"opportunity_stages","depth":6,"value":"opportunity_stages","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"opp","depth":3,"bounds":{"left":0.23515625,"top":1.0,"width":0.10117187,"height":-0.055555582},"automation_id":"_NS:879","value":"opp","placeholder":"Filter","role_description":"search text field","subrole":"AXSearchField","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"search","depth":4,"bounds":{"left":0.2359375,"top":1.0,"width":0.009765625,"height":-0.055555582},"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"cancel","depth":4,"bounds":{"left":0.32617188,"top":1.0,"width":0.00859375,"height":-0.055555582},"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"add","depth":2,"automation_id":"_NS:4671","help_text":"Add new table","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Quick Look","depth":2,"automation_id":"_NS:1133","help_text":"Toggle the visibility of the Information panel","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXMenuButton","text":"action","depth":2,"automation_id":"_NS:1882","role_description":"menu button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"refresh","depth":2,"automation_id":"_NS:3295","help_text":"Refresh table list","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"id","depth":7,"bounds":{"left":0.34140626,"top":1.0,"width":0.02890625,"height":-0.07222223},"value":"id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"bounds":{"left":0.37148437,"top":1.0,"width":0.05,"height":-0.07222223},"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"bounds":{"left":0.42265624,"top":1.0,"width":0.15058593,"height":-0.07222223},"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"PRI","depth":7,"bounds":{"left":0.6658203,"top":1.0,"width":0.0234375,"height":-0.07222223},"role_description":"text"},{"role":"AXComboBox","text":"auto_increment","depth":7,"bounds":{"left":0.7144531,"top":1.0,"width":0.03300781,"height":-0.07222223},"value":"auto_increment","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"uuid","depth":7,"bounds":{"left":0.34140626,"top":1.0,"width":0.02890625,"height":-0.08680558},"value":"uuid","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"BINARY","depth":7,"bounds":{"left":0.37148437,"top":1.0,"width":0.05,"height":-0.08680558},"value":"BINARY","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"16","depth":7,"bounds":{"left":0.42265624,"top":1.0,"width":0.15058593,"height":-0.08680558},"value":"16","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"UNI","depth":7,"bounds":{"left":0.6658203,"top":1.0,"width":0.0234375,"height":-0.08680558},"role_description":"text"},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7144531,"top":1.0,"width":0.03300781,"height":-0.08680558},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"team_id","depth":7,"value":"team_id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"MUL","depth":7,"role_description":"text"},{"role":"AXTextField","text":"NULL","depth":7,"value":"NULL","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"crm_configuration_id","depth":7,"value":"crm_configuration_id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"MUL","depth":7,"role_description":"text"},{"role":"AXTextField","text":"NULL","depth":7,"value":"NULL","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"account_id","depth":7,"value":"account_id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"MUL","depth":7,"role_description":"text"},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"stage_id","depth":7,"value":"stage_id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"MUL","depth":7,"role_description":"text"},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"stage_updated_at","depth":7,"value":"stage_updated_at","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"DATETIME","depth":7,"value":"DATETIME","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"NULL","depth":7,"value":"NULL","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"record_type_id","depth":7,"value":"record_type_id","role_description":"text field","is_enabled":true,"is_focused":false}]...
|
9071116635450271675
|
1540890909911048304
|
click
|
accessibility
|
NULL
|
TABLES
opportunities
opportunity_comments
opportun TABLES
opportunities
opportunity_comments
opportunity_contacts
opportunity_stages
opp
search
cancel
add
Quick Look
action
refresh
id
INT
10
PRI
auto_increment
uuid
BINARY
16
UNI
None
team_id
INT
10
MUL
NULL
None
crm_configuration_id
INT
10
MUL
NULL
None
account_id
INT
10
MUL
None
stage_id
INT
10
MUL
None
stage_updated_at
DATETIME
NULL
None
record_type_id...
|
13360
|
|
13368
|
291
|
47
|
2026-04-14T12:20:23.985744+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776169223985_m2.jpg...
|
Sequel Ace
|
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/leads
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
TABLES
lead_stages
leads
lea
search
cancel
add
Qui TABLES
lead_stages
leads
lea
search
cancel
add
Quick Look
action
refresh
id
INT
10
PRI
auto_increment
uuid
BINARY
16
UNI
None
team_id
INT
10
MUL
None
crm_configuration_id
INT
10
MUL
NULL
None
stage_id
INT
10
MUL
NULL
None
stage_updated_at
DATETIME
NULL
None
record_type_id
INT
10
MUL
NULL
None
converted_at
TIMESTAMP
NULL
None
converted_account_id
INT
10
MUL
NULL
None
converted_opportunity_id
INT
10
MUL
NULL
None
converted_contact_id
INT
10...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"TABLES","depth":6,"bounds":{"left":0.23945312,"top":1.0,"width":0.09257813,"height":-0.081944466},"value":"TABLES","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"lead_stages","depth":6,"value":"lead_stages","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"leads","depth":6,"value":"leads","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"lea","depth":3,"bounds":{"left":0.23515625,"top":1.0,"width":0.10117187,"height":-0.055555582},"automation_id":"_NS:879","value":"lea","placeholder":"Filter","role_description":"search text field","subrole":"AXSearchField","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"search","depth":4,"bounds":{"left":0.2359375,"top":1.0,"width":0.009765625,"height":-0.055555582},"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"cancel","depth":4,"bounds":{"left":0.32617188,"top":1.0,"width":0.00859375,"height":-0.055555582},"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"add","depth":2,"automation_id":"_NS:4671","help_text":"Add new table","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Quick Look","depth":2,"automation_id":"_NS:1133","help_text":"Toggle the visibility of the Information panel","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXMenuButton","text":"action","depth":2,"automation_id":"_NS:1882","role_description":"menu button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"refresh","depth":2,"automation_id":"_NS:3295","help_text":"Refresh table list","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"id","depth":7,"bounds":{"left":0.34140626,"top":1.0,"width":0.02890625,"height":-0.07222223},"value":"id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"bounds":{"left":0.37148437,"top":1.0,"width":0.05,"height":-0.07222223},"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"bounds":{"left":0.42265624,"top":1.0,"width":0.15058593,"height":-0.07222223},"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"PRI","depth":7,"bounds":{"left":0.6658203,"top":1.0,"width":0.0234375,"height":-0.07222223},"role_description":"text"},{"role":"AXComboBox","text":"auto_increment","depth":7,"bounds":{"left":0.7144531,"top":1.0,"width":0.03300781,"height":-0.07222223},"value":"auto_increment","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"uuid","depth":7,"bounds":{"left":0.34140626,"top":1.0,"width":0.02890625,"height":-0.08680558},"value":"uuid","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"BINARY","depth":7,"bounds":{"left":0.37148437,"top":1.0,"width":0.05,"height":-0.08680558},"value":"BINARY","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"16","depth":7,"bounds":{"left":0.42265624,"top":1.0,"width":0.15058593,"height":-0.08680558},"value":"16","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"UNI","depth":7,"bounds":{"left":0.6658203,"top":1.0,"width":0.0234375,"height":-0.08680558},"role_description":"text"},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7144531,"top":1.0,"width":0.03300781,"height":-0.08680558},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"team_id","depth":7,"value":"team_id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"MUL","depth":7,"role_description":"text"},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"crm_configuration_id","depth":7,"value":"crm_configuration_id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"MUL","depth":7,"role_description":"text"},{"role":"AXTextField","text":"NULL","depth":7,"value":"NULL","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"stage_id","depth":7,"value":"stage_id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"MUL","depth":7,"role_description":"text"},{"role":"AXTextField","text":"NULL","depth":7,"value":"NULL","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"stage_updated_at","depth":7,"value":"stage_updated_at","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"DATETIME","depth":7,"value":"DATETIME","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"NULL","depth":7,"value":"NULL","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"record_type_id","depth":7,"value":"record_type_id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"MUL","depth":7,"role_description":"text"},{"role":"AXTextField","text":"NULL","depth":7,"value":"NULL","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"converted_at","depth":7,"value":"converted_at","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"TIMESTAMP","depth":7,"value":"TIMESTAMP","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"NULL","depth":7,"value":"NULL","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"converted_account_id","depth":7,"value":"converted_account_id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"MUL","depth":7,"role_description":"text"},{"role":"AXTextField","text":"NULL","depth":7,"value":"NULL","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"converted_opportunity_id","depth":7,"value":"converted_opportunity_id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"MUL","depth":7,"role_description":"text"},{"role":"AXTextField","text":"NULL","depth":7,"value":"NULL","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"converted_contact_id","depth":7,"value":"converted_contact_id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"value":"10","role_description":"text field","is_enabled":true,"is_focused":false}]...
|
3927001872676371222
|
3558433616612051508
|
click
|
accessibility
|
NULL
|
TABLES
lead_stages
leads
lea
search
cancel
add
Qui TABLES
lead_stages
leads
lea
search
cancel
add
Quick Look
action
refresh
id
INT
10
PRI
auto_increment
uuid
BINARY
16
UNI
None
team_id
INT
10
MUL
None
crm_configuration_id
INT
10
MUL
NULL
None
stage_id
INT
10
MUL
NULL
None
stage_updated_at
DATETIME
NULL
None
record_type_id
INT
10
MUL
NULL
None
converted_at
TIMESTAMP
NULL
None
converted_account_id
INT
10
MUL
NULL
None
converted_opportunity_id
INT
10
MUL
NULL
None
converted_contact_id
INT
10...
|
NULL
|
|
13356
|
291
|
42
|
2026-04-14T12:20:09.690981+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776169209690_m2.jpg...
|
Sequel Ace
|
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/stages
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
TABLES
business_process_stages
lead_stages
opportu TABLES
business_process_stages
lead_stages
opportunity_stages
stages
stag
search
cancel
add
Quick Look
action
refresh
id
INT
10
PRI
auto_increment
uuid
BINARY
16
UNI
None
team_id
INT
10
MUL
None
crm_configuration_id
INT
10
MUL
NULL
None
crm_provider_id
VARCHAR
128
UNI
NULL
None...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"TABLES","depth":6,"bounds":{"left":0.23945312,"top":1.0,"width":0.09257813,"height":-0.081944466},"value":"TABLES","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"business_process_stages","depth":6,"value":"business_process_stages","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"lead_stages","depth":6,"value":"lead_stages","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"opportunity_stages","depth":6,"value":"opportunity_stages","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"stages","depth":6,"value":"stages","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"stag","depth":3,"bounds":{"left":0.23515625,"top":1.0,"width":0.10117187,"height":-0.055555582},"automation_id":"_NS:879","value":"stag","placeholder":"Filter","role_description":"search text field","subrole":"AXSearchField","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"search","depth":4,"bounds":{"left":0.2359375,"top":1.0,"width":0.009765625,"height":-0.055555582},"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"cancel","depth":4,"bounds":{"left":0.32617188,"top":1.0,"width":0.00859375,"height":-0.055555582},"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"add","depth":2,"automation_id":"_NS:4671","help_text":"Add new table","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Quick Look","depth":2,"automation_id":"_NS:1133","help_text":"Toggle the visibility of the Information panel","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXMenuButton","text":"action","depth":2,"automation_id":"_NS:1882","role_description":"menu button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"refresh","depth":2,"automation_id":"_NS:3295","help_text":"Refresh table list","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"id","depth":7,"bounds":{"left":0.34140626,"top":1.0,"width":0.0296875,"height":-0.07222223},"value":"id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"bounds":{"left":0.37226564,"top":1.0,"width":0.05078125,"height":-0.07222223},"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"bounds":{"left":0.42421874,"top":1.0,"width":0.15136719,"height":-0.07222223},"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"PRI","depth":7,"bounds":{"left":0.6681641,"top":1.0,"width":0.0234375,"height":-0.07222223},"role_description":"text"},{"role":"AXComboBox","text":"auto_increment","depth":7,"bounds":{"left":0.7175781,"top":1.0,"width":0.03378906,"height":-0.07222223},"value":"auto_increment","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"uuid","depth":7,"bounds":{"left":0.34140626,"top":1.0,"width":0.0296875,"height":-0.08680558},"value":"uuid","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"BINARY","depth":7,"bounds":{"left":0.37226564,"top":1.0,"width":0.05078125,"height":-0.08680558},"value":"BINARY","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"16","depth":7,"bounds":{"left":0.42421874,"top":1.0,"width":0.15136719,"height":-0.08680558},"value":"16","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"UNI","depth":7,"bounds":{"left":0.6681641,"top":1.0,"width":0.0234375,"height":-0.08680558},"role_description":"text"},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.7175781,"top":1.0,"width":0.03378906,"height":-0.08680558},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"team_id","depth":7,"value":"team_id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"MUL","depth":7,"role_description":"text"},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"crm_configuration_id","depth":7,"value":"crm_configuration_id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"MUL","depth":7,"role_description":"text"},{"role":"AXTextField","text":"NULL","depth":7,"value":"NULL","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"crm_provider_id","depth":7,"value":"crm_provider_id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"VARCHAR","depth":7,"value":"VARCHAR","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"128","depth":7,"value":"128","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"UNI","depth":7,"role_description":"text"},{"role":"AXTextField","text":"NULL","depth":7,"value":"NULL","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false}]...
|
5615970390532541824
|
3819668765558204468
|
visual_change
|
accessibility
|
NULL
|
TABLES
business_process_stages
lead_stages
opportu TABLES
business_process_stages
lead_stages
opportunity_stages
stages
stag
search
cancel
add
Quick Look
action
refresh
id
INT
10
PRI
auto_increment
uuid
BINARY
16
UNI
None
team_id
INT
10
MUL
None
crm_configuration_id
INT
10
MUL
NULL
None
crm_provider_id
VARCHAR
128
UNI
NULL
None...
|
13354
|
|
13313
|
291
|
17
|
2026-04-14T12:18:31.444966+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776169111444_m2.jpg...
|
Sequel Ace
|
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/opportunit (MySQL 11.4.9-MariaDB-log) PROD/jiminny/opportunities...
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
TABLES
activity_topic_triggers
connection_properti TABLES
activity_topic_triggers
connection_properties
opportunities
opportunity_comments
opportunity_contacts
opportunity_stages
playback_theme_topic_triggers
playback_theme_topics
scope_groups
op
search
cancel
add
Quick Look
action
refresh...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"TABLES","depth":6,"bounds":{"left":0.23945312,"top":1.0,"width":0.09257813,"height":-0.081944466},"value":"TABLES","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_topic_triggers","depth":6,"value":"activity_topic_triggers","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"connection_properties","depth":6,"value":"connection_properties","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"opportunities","depth":6,"value":"opportunities","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"opportunity_comments","depth":6,"value":"opportunity_comments","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"opportunity_contacts","depth":6,"value":"opportunity_contacts","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"opportunity_stages","depth":6,"value":"opportunity_stages","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playback_theme_topic_triggers","depth":6,"value":"playback_theme_topic_triggers","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playback_theme_topics","depth":6,"value":"playback_theme_topics","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"scope_groups","depth":6,"value":"scope_groups","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"op","depth":3,"bounds":{"left":0.23515625,"top":1.0,"width":0.10117187,"height":-0.055555582},"automation_id":"_NS:879","value":"op","placeholder":"Filter","role_description":"search text field","subrole":"AXSearchField","is_enabled":true,"is_focused":true},{"role":"AXButton","text":"search","depth":4,"bounds":{"left":0.2359375,"top":1.0,"width":0.009765625,"height":-0.055555582},"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"cancel","depth":4,"bounds":{"left":0.32617188,"top":1.0,"width":0.00859375,"height":-0.055555582},"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"add","depth":2,"automation_id":"_NS:4671","help_text":"Add new table","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Quick Look","depth":2,"automation_id":"_NS:1133","help_text":"Toggle the visibility of the Information panel","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXMenuButton","text":"action","depth":2,"automation_id":"_NS:1882","role_description":"menu button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"refresh","depth":2,"automation_id":"_NS:3295","help_text":"Refresh table list","role_description":"button","is_enabled":true,"is_focused":false}]...
|
5837173790884066440
|
1450451100846050851
|
click
|
accessibility
|
NULL
|
TABLES
activity_topic_triggers
connection_properti TABLES
activity_topic_triggers
connection_properties
opportunities
opportunity_comments
opportunity_contacts
opportunity_stages
playback_theme_topic_triggers
playback_theme_topics
scope_groups
op
search
cancel
add
Quick Look
action
refresh...
|
NULL
|
|
13293
|
291
|
8
|
2026-04-14T12:17:53.073546+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776169073073_m2.jpg...
|
Sequel Ace
|
(MySQL 11.4.9-MariaDB-log) PROD/jiminny
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
TABLES
accounts
activities
activity_availability_n TABLES
accounts
activities
activity_availability_notifications
activity_coach_requests
activity_comments
activity_export_logs
activity_export_tokens
activity_exports
activity_imports
activity_logs
activity_messages
activity_moments
activity_notes
activity_participant_data
activity_participant_speeches
activity_plays
activity_processing_states
activity_provider_users
activity_providers
activity_questions
activity_scorecard_rule_triggers
activity_scorecard_rules
activity_search_filters
activity_searches
activity_shares
activity_snapshots
activity_stats
activity_stats_specifications
activity_subscription_sets
activity_subscriptions
activity_summary_logs
activity_topic_triggers
activity_upload_settings
addresses
ai_crm_template_fields
ai_crm_template_filters
ai_crm_template_log
ai_crm_template_runs
ai_crm_template_write_logs
ai_crm_templates
ai_prompts
ai_scorecard_filters
ai_scorecard_rule_runs
ai_scorecard_rules
ai_scorecard_runs
ai_scorecards
ask_anything_prompts
automated_report_results
automated_reports
business_process_stages
business_processes
calendar_events
calendar_subscriptions
calendars
call_imports
coaching_feedback_visibility
coaching_feedbacks
coaching_section_criteria
coaching_section_criterion_feedbacks
coaching_section_feedbacks
coaching_sections
connection_properties
connection_statistics
contact_roles
contacts
crm_configurations
crm_field_data
crm_field_values
crm_fields
crm_layout_entities
crm_layouts
crm_logs
crm_profile_record_types
crm_profiles
crm_sync_batches
deal_risks
default_activity_types
devices
email_messages
events
failed_jobs
features
generic_ai_prompts
group_deal_risk_types
groups
inbox_email_batches
inbox_emails
inboxes
invitation_role
invitations
job_titles
jobs
jobs_logs
language_dialects
languages
lead_stages...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"TABLES","depth":6,"bounds":{"left":0.23945312,"top":1.0,"width":0.08671875,"height":-0.081944466},"value":"TABLES","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"accounts","depth":6,"value":"accounts","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activities","depth":6,"value":"activities","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_availability_notifications","depth":6,"value":"activity_availability_notifications","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_coach_requests","depth":6,"value":"activity_coach_requests","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_comments","depth":6,"value":"activity_comments","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_export_logs","depth":6,"value":"activity_export_logs","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_export_tokens","depth":6,"value":"activity_export_tokens","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_exports","depth":6,"value":"activity_exports","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_imports","depth":6,"value":"activity_imports","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_logs","depth":6,"value":"activity_logs","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_messages","depth":6,"value":"activity_messages","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_moments","depth":6,"value":"activity_moments","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_notes","depth":6,"value":"activity_notes","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_participant_data","depth":6,"value":"activity_participant_data","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_participant_speeches","depth":6,"value":"activity_participant_speeches","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_plays","depth":6,"value":"activity_plays","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_processing_states","depth":6,"value":"activity_processing_states","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_provider_users","depth":6,"value":"activity_provider_users","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_providers","depth":6,"value":"activity_providers","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_questions","depth":6,"value":"activity_questions","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_scorecard_rule_triggers","depth":6,"value":"activity_scorecard_rule_triggers","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_scorecard_rules","depth":6,"value":"activity_scorecard_rules","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_search_filters","depth":6,"value":"activity_search_filters","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_searches","depth":6,"value":"activity_searches","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_shares","depth":6,"value":"activity_shares","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_snapshots","depth":6,"value":"activity_snapshots","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_stats","depth":6,"value":"activity_stats","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_stats_specifications","depth":6,"value":"activity_stats_specifications","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_subscription_sets","depth":6,"value":"activity_subscription_sets","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_subscriptions","depth":6,"value":"activity_subscriptions","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_summary_logs","depth":6,"value":"activity_summary_logs","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_topic_triggers","depth":6,"value":"activity_topic_triggers","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_upload_settings","depth":6,"value":"activity_upload_settings","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"addresses","depth":6,"value":"addresses","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ai_crm_template_fields","depth":6,"value":"ai_crm_template_fields","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ai_crm_template_filters","depth":6,"value":"ai_crm_template_filters","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ai_crm_template_log","depth":6,"value":"ai_crm_template_log","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ai_crm_template_runs","depth":6,"value":"ai_crm_template_runs","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ai_crm_template_write_logs","depth":6,"value":"ai_crm_template_write_logs","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ai_crm_templates","depth":6,"value":"ai_crm_templates","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ai_prompts","depth":6,"value":"ai_prompts","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ai_scorecard_filters","depth":6,"value":"ai_scorecard_filters","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ai_scorecard_rule_runs","depth":6,"value":"ai_scorecard_rule_runs","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ai_scorecard_rules","depth":6,"value":"ai_scorecard_rules","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ai_scorecard_runs","depth":6,"value":"ai_scorecard_runs","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ai_scorecards","depth":6,"value":"ai_scorecards","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ask_anything_prompts","depth":6,"value":"ask_anything_prompts","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"automated_report_results","depth":6,"value":"automated_report_results","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"automated_reports","depth":6,"value":"automated_reports","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"business_process_stages","depth":6,"value":"business_process_stages","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"business_processes","depth":6,"value":"business_processes","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"calendar_events","depth":6,"value":"calendar_events","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"calendar_subscriptions","depth":6,"value":"calendar_subscriptions","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"calendars","depth":6,"value":"calendars","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"call_imports","depth":6,"value":"call_imports","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"coaching_feedback_visibility","depth":6,"value":"coaching_feedback_visibility","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"coaching_feedbacks","depth":6,"value":"coaching_feedbacks","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"coaching_section_criteria","depth":6,"value":"coaching_section_criteria","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"coaching_section_criterion_feedbacks","depth":6,"value":"coaching_section_criterion_feedbacks","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"coaching_section_feedbacks","depth":6,"value":"coaching_section_feedbacks","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"coaching_sections","depth":6,"value":"coaching_sections","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"connection_properties","depth":6,"value":"connection_properties","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"connection_statistics","depth":6,"value":"connection_statistics","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"contact_roles","depth":6,"value":"contact_roles","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"contacts","depth":6,"value":"contacts","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"crm_configurations","depth":6,"value":"crm_configurations","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"crm_field_data","depth":6,"value":"crm_field_data","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"crm_field_values","depth":6,"value":"crm_field_values","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"crm_fields","depth":6,"value":"crm_fields","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"crm_layout_entities","depth":6,"value":"crm_layout_entities","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"crm_layouts","depth":6,"value":"crm_layouts","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"crm_logs","depth":6,"value":"crm_logs","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"crm_profile_record_types","depth":6,"value":"crm_profile_record_types","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"crm_profiles","depth":6,"value":"crm_profiles","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"crm_sync_batches","depth":6,"value":"crm_sync_batches","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"deal_risks","depth":6,"value":"deal_risks","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"default_activity_types","depth":6,"value":"default_activity_types","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"devices","depth":6,"value":"devices","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"email_messages","depth":6,"value":"email_messages","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"events","depth":6,"value":"events","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"failed_jobs","depth":6,"value":"failed_jobs","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"features","depth":6,"value":"features","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"generic_ai_prompts","depth":6,"value":"generic_ai_prompts","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"group_deal_risk_types","depth":6,"value":"group_deal_risk_types","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"groups","depth":6,"value":"groups","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"inbox_email_batches","depth":6,"value":"inbox_email_batches","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"inbox_emails","depth":6,"value":"inbox_emails","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"inboxes","depth":6,"value":"inboxes","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"invitation_role","depth":6,"value":"invitation_role","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"invitations","depth":6,"value":"invitations","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"job_titles","depth":6,"value":"job_titles","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"jobs","depth":6,"value":"jobs","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"jobs_logs","depth":6,"value":"jobs_logs","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"language_dialects","depth":6,"value":"language_dialects","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"languages","depth":6,"value":"languages","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"lead_stages","depth":6,"value":"lead_stages","role_description":"text field","is_enabled":true,"is_focused":false}]...
|
-449264654480186976
|
-3196177380780294975
|
click
|
accessibility
|
NULL
|
TABLES
accounts
activities
activity_availability_n TABLES
accounts
activities
activity_availability_notifications
activity_coach_requests
activity_comments
activity_export_logs
activity_export_tokens
activity_exports
activity_imports
activity_logs
activity_messages
activity_moments
activity_notes
activity_participant_data
activity_participant_speeches
activity_plays
activity_processing_states
activity_provider_users
activity_providers
activity_questions
activity_scorecard_rule_triggers
activity_scorecard_rules
activity_search_filters
activity_searches
activity_shares
activity_snapshots
activity_stats
activity_stats_specifications
activity_subscription_sets
activity_subscriptions
activity_summary_logs
activity_topic_triggers
activity_upload_settings
addresses
ai_crm_template_fields
ai_crm_template_filters
ai_crm_template_log
ai_crm_template_runs
ai_crm_template_write_logs
ai_crm_templates
ai_prompts
ai_scorecard_filters
ai_scorecard_rule_runs
ai_scorecard_rules
ai_scorecard_runs
ai_scorecards
ask_anything_prompts
automated_report_results
automated_reports
business_process_stages
business_processes
calendar_events
calendar_subscriptions
calendars
call_imports
coaching_feedback_visibility
coaching_feedbacks
coaching_section_criteria
coaching_section_criterion_feedbacks
coaching_section_feedbacks
coaching_sections
connection_properties
connection_statistics
contact_roles
contacts
crm_configurations
crm_field_data
crm_field_values
crm_fields
crm_layout_entities
crm_layouts
crm_logs
crm_profile_record_types
crm_profiles
crm_sync_batches
deal_risks
default_activity_types
devices
email_messages
events
failed_jobs
features
generic_ai_prompts
group_deal_risk_types
groups
inbox_email_batches
inbox_emails
inboxes
invitation_role
invitations
job_titles
jobs
jobs_logs
language_dialects
languages
lead_stages...
|
13291
|
|
13297
|
291
|
10
|
2026-04-14T12:18:00.667757+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776169080667_m2.jpg...
|
Sequel Ace
|
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/accounts
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
TABLES
accounts
activities
activity_availability_n TABLES
accounts
activities
activity_availability_notifications
activity_coach_requests
activity_comments
activity_export_logs
activity_export_tokens
activity_exports
activity_imports
activity_logs
activity_messages
activity_moments
activity_notes
activity_participant_data
activity_participant_speeches
activity_plays
activity_processing_states
activity_provider_users
activity_providers
activity_questions
activity_scorecard_rule_triggers
activity_scorecard_rules
activity_search_filters
activity_searches
activity_shares
activity_snapshots
activity_stats
activity_stats_specifications
activity_subscription_sets
activity_subscriptions
activity_summary_logs
activity_topic_triggers
activity_upload_settings
addresses
ai_crm_template_fields
ai_crm_template_filters
ai_crm_template_log
ai_crm_template_runs
ai_crm_template_write_logs
ai_crm_templates
ai_prompts
ai_scorecard_filters
ai_scorecard_rule_runs
ai_scorecard_rules
ai_scorecard_runs
ai_scorecards
ask_anything_prompts
automated_report_results
automated_reports
business_process_stages
business_processes
calendar_events
calendar_subscriptions
calendars
call_imports
coaching_feedback_visibility
coaching_feedbacks
coaching_section_criteria
coaching_section_criterion_feedbacks
coaching_section_feedbacks
coaching_sections
connection_properties
connection_statistics
contact_roles
contacts
crm_configurations
crm_field_data
crm_field_values
crm_fields
crm_layout_entities
crm_layouts
crm_logs
crm_profile_record_types
crm_profiles
crm_sync_batches
deal_risks
default_activity_types
devices
email_messages
events
failed_jobs
features
generic_ai_prompts
group_deal_risk_types
groups
inbox_email_batches
inbox_emails
inboxes
invitation_role
invitations
job_titles
jobs
jobs_logs
language_dialects
languages
lead_stages
leads
mappings
maxio_component_mappings
migrations
mobile_settings
moments
notifications
nudge_run_activity
nudge_runs
nudges
oauth_access_tokens
oauth_auth_codes
oauth_clients
oauth_personal_access_clients
oauth_refresh_tokens
opportunities
opportunity_comments
opportunity_contacts
opportunity_stages
participant_connections
participant_consents
participant_feedback
participant_shares
participant_stats
participants
partners
permission_role
permission_user
permissions
phone_numbers
playback_theme_topic_triggers
playback_theme_topics
playback_themes
playbook_categories...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"TABLES","depth":6,"bounds":{"left":0.23945312,"top":1.0,"width":0.08671875,"height":-0.081944466},"value":"TABLES","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"accounts","depth":6,"value":"accounts","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activities","depth":6,"value":"activities","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_availability_notifications","depth":6,"value":"activity_availability_notifications","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_coach_requests","depth":6,"value":"activity_coach_requests","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_comments","depth":6,"value":"activity_comments","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_export_logs","depth":6,"value":"activity_export_logs","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_export_tokens","depth":6,"value":"activity_export_tokens","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_exports","depth":6,"value":"activity_exports","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_imports","depth":6,"value":"activity_imports","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_logs","depth":6,"value":"activity_logs","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_messages","depth":6,"value":"activity_messages","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_moments","depth":6,"value":"activity_moments","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_notes","depth":6,"value":"activity_notes","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_participant_data","depth":6,"value":"activity_participant_data","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_participant_speeches","depth":6,"value":"activity_participant_speeches","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_plays","depth":6,"value":"activity_plays","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_processing_states","depth":6,"value":"activity_processing_states","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_provider_users","depth":6,"value":"activity_provider_users","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_providers","depth":6,"value":"activity_providers","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_questions","depth":6,"value":"activity_questions","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_scorecard_rule_triggers","depth":6,"value":"activity_scorecard_rule_triggers","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_scorecard_rules","depth":6,"value":"activity_scorecard_rules","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_search_filters","depth":6,"value":"activity_search_filters","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_searches","depth":6,"value":"activity_searches","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_shares","depth":6,"value":"activity_shares","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_snapshots","depth":6,"value":"activity_snapshots","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_stats","depth":6,"value":"activity_stats","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_stats_specifications","depth":6,"value":"activity_stats_specifications","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_subscription_sets","depth":6,"value":"activity_subscription_sets","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_subscriptions","depth":6,"value":"activity_subscriptions","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_summary_logs","depth":6,"value":"activity_summary_logs","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_topic_triggers","depth":6,"value":"activity_topic_triggers","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_upload_settings","depth":6,"value":"activity_upload_settings","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"addresses","depth":6,"value":"addresses","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ai_crm_template_fields","depth":6,"value":"ai_crm_template_fields","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ai_crm_template_filters","depth":6,"value":"ai_crm_template_filters","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ai_crm_template_log","depth":6,"value":"ai_crm_template_log","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ai_crm_template_runs","depth":6,"value":"ai_crm_template_runs","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ai_crm_template_write_logs","depth":6,"value":"ai_crm_template_write_logs","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ai_crm_templates","depth":6,"value":"ai_crm_templates","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ai_prompts","depth":6,"value":"ai_prompts","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ai_scorecard_filters","depth":6,"value":"ai_scorecard_filters","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ai_scorecard_rule_runs","depth":6,"value":"ai_scorecard_rule_runs","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ai_scorecard_rules","depth":6,"value":"ai_scorecard_rules","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ai_scorecard_runs","depth":6,"value":"ai_scorecard_runs","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ai_scorecards","depth":6,"value":"ai_scorecards","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ask_anything_prompts","depth":6,"value":"ask_anything_prompts","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"automated_report_results","depth":6,"value":"automated_report_results","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"automated_reports","depth":6,"value":"automated_reports","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"business_process_stages","depth":6,"value":"business_process_stages","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"business_processes","depth":6,"value":"business_processes","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"calendar_events","depth":6,"value":"calendar_events","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"calendar_subscriptions","depth":6,"value":"calendar_subscriptions","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"calendars","depth":6,"value":"calendars","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"call_imports","depth":6,"value":"call_imports","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"coaching_feedback_visibility","depth":6,"value":"coaching_feedback_visibility","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"coaching_feedbacks","depth":6,"value":"coaching_feedbacks","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"coaching_section_criteria","depth":6,"value":"coaching_section_criteria","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"coaching_section_criterion_feedbacks","depth":6,"value":"coaching_section_criterion_feedbacks","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"coaching_section_feedbacks","depth":6,"value":"coaching_section_feedbacks","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"coaching_sections","depth":6,"value":"coaching_sections","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"connection_properties","depth":6,"value":"connection_properties","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"connection_statistics","depth":6,"value":"connection_statistics","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"contact_roles","depth":6,"value":"contact_roles","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"contacts","depth":6,"value":"contacts","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"crm_configurations","depth":6,"value":"crm_configurations","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"crm_field_data","depth":6,"value":"crm_field_data","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"crm_field_values","depth":6,"value":"crm_field_values","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"crm_fields","depth":6,"value":"crm_fields","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"crm_layout_entities","depth":6,"value":"crm_layout_entities","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"crm_layouts","depth":6,"value":"crm_layouts","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"crm_logs","depth":6,"value":"crm_logs","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"crm_profile_record_types","depth":6,"value":"crm_profile_record_types","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"crm_profiles","depth":6,"value":"crm_profiles","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"crm_sync_batches","depth":6,"value":"crm_sync_batches","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"deal_risks","depth":6,"value":"deal_risks","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"default_activity_types","depth":6,"value":"default_activity_types","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"devices","depth":6,"value":"devices","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"email_messages","depth":6,"value":"email_messages","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"events","depth":6,"value":"events","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"failed_jobs","depth":6,"value":"failed_jobs","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"features","depth":6,"value":"features","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"generic_ai_prompts","depth":6,"value":"generic_ai_prompts","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"group_deal_risk_types","depth":6,"value":"group_deal_risk_types","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"groups","depth":6,"value":"groups","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"inbox_email_batches","depth":6,"value":"inbox_email_batches","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"inbox_emails","depth":6,"value":"inbox_emails","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"inboxes","depth":6,"value":"inboxes","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"invitation_role","depth":6,"value":"invitation_role","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"invitations","depth":6,"value":"invitations","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"job_titles","depth":6,"value":"job_titles","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"jobs","depth":6,"value":"jobs","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"jobs_logs","depth":6,"value":"jobs_logs","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"language_dialects","depth":6,"value":"language_dialects","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"languages","depth":6,"value":"languages","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"lead_stages","depth":6,"value":"lead_stages","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"leads","depth":6,"value":"leads","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"mappings","depth":6,"value":"mappings","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"maxio_component_mappings","depth":6,"value":"maxio_component_mappings","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"migrations","depth":6,"value":"migrations","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"mobile_settings","depth":6,"value":"mobile_settings","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"moments","depth":6,"value":"moments","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"notifications","depth":6,"value":"notifications","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"nudge_run_activity","depth":6,"value":"nudge_run_activity","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"nudge_runs","depth":6,"value":"nudge_runs","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"nudges","depth":6,"value":"nudges","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"oauth_access_tokens","depth":6,"value":"oauth_access_tokens","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"oauth_auth_codes","depth":6,"value":"oauth_auth_codes","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"oauth_clients","depth":6,"value":"oauth_clients","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"oauth_personal_access_clients","depth":6,"value":"oauth_personal_access_clients","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"oauth_refresh_tokens","depth":6,"value":"oauth_refresh_tokens","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"opportunities","depth":6,"value":"opportunities","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"opportunity_comments","depth":6,"value":"opportunity_comments","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"opportunity_contacts","depth":6,"value":"opportunity_contacts","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"opportunity_stages","depth":6,"value":"opportunity_stages","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"participant_connections","depth":6,"value":"participant_connections","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"participant_consents","depth":6,"value":"participant_consents","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"participant_feedback","depth":6,"value":"participant_feedback","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"participant_shares","depth":6,"value":"participant_shares","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"participant_stats","depth":6,"value":"participant_stats","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"participants","depth":6,"value":"participants","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"partners","depth":6,"value":"partners","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"permission_role","depth":6,"value":"permission_role","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"permission_user","depth":6,"value":"permission_user","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"permissions","depth":6,"value":"permissions","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"phone_numbers","depth":6,"value":"phone_numbers","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playback_theme_topic_triggers","depth":6,"value":"playback_theme_topic_triggers","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playback_theme_topics","depth":6,"value":"playback_theme_topics","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playback_themes","depth":6,"value":"playback_themes","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"playbook_categories","depth":6,"value":"playbook_categories","role_description":"text field","is_enabled":true,"is_focused":false}]...
|
8735707032746688665
|
-3193925580890850111
|
click
|
accessibility
|
NULL
|
TABLES
accounts
activities
activity_availability_n TABLES
accounts
activities
activity_availability_notifications
activity_coach_requests
activity_comments
activity_export_logs
activity_export_tokens
activity_exports
activity_imports
activity_logs
activity_messages
activity_moments
activity_notes
activity_participant_data
activity_participant_speeches
activity_plays
activity_processing_states
activity_provider_users
activity_providers
activity_questions
activity_scorecard_rule_triggers
activity_scorecard_rules
activity_search_filters
activity_searches
activity_shares
activity_snapshots
activity_stats
activity_stats_specifications
activity_subscription_sets
activity_subscriptions
activity_summary_logs
activity_topic_triggers
activity_upload_settings
addresses
ai_crm_template_fields
ai_crm_template_filters
ai_crm_template_log
ai_crm_template_runs
ai_crm_template_write_logs
ai_crm_templates
ai_prompts
ai_scorecard_filters
ai_scorecard_rule_runs
ai_scorecard_rules
ai_scorecard_runs
ai_scorecards
ask_anything_prompts
automated_report_results
automated_reports
business_process_stages
business_processes
calendar_events
calendar_subscriptions
calendars
call_imports
coaching_feedback_visibility
coaching_feedbacks
coaching_section_criteria
coaching_section_criterion_feedbacks
coaching_section_feedbacks
coaching_sections
connection_properties
connection_statistics
contact_roles
contacts
crm_configurations
crm_field_data
crm_field_values
crm_fields
crm_layout_entities
crm_layouts
crm_logs
crm_profile_record_types
crm_profiles
crm_sync_batches
deal_risks
default_activity_types
devices
email_messages
events
failed_jobs
features
generic_ai_prompts
group_deal_risk_types
groups
inbox_email_batches
inbox_emails
inboxes
invitation_role
invitations
job_titles
jobs
jobs_logs
language_dialects
languages
lead_stages
leads
mappings
maxio_component_mappings
migrations
mobile_settings
moments
notifications
nudge_run_activity
nudge_runs
nudges
oauth_access_tokens
oauth_auth_codes
oauth_clients
oauth_personal_access_clients
oauth_refresh_tokens
opportunities
opportunity_comments
opportunity_contacts
opportunity_stages
participant_connections
participant_consents
participant_feedback
participant_shares
participant_stats
participants
partners
permission_role
permission_user
permissions
phone_numbers
playback_theme_topic_triggers
playback_theme_topics
playback_themes
playbook_categories...
|
13296
|
|
13361
|
290
|
43
|
2026-04-14T12:20:14.462752+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776169214462_m1.jpg...
|
Sequel Ace
|
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/opportunit (MySQL 11.4.9-MariaDB-log) PROD/jiminny/opportunities...
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
TABLES
opportunities
opportunity_comments
opportun TABLES
opportunities
opportunity_comments
opportunity_contacts
opportunity_stages
opp
search
cancel
add
Quick Look
action
refresh
id
INT
10
PRI
auto_increment
uuid
BINARY
16
UNI
None
team_id
INT
10
MUL
NULL
None
crm_configuration_id
INT
10
MUL
NULL
None
account_id
INT
10
MUL
None
stage_id
INT
10
MUL
None
stage_updated_at
DATETIME
NULL
None
record_type_id
INT
10
MUL
NULL
None
crm_provider_id
VARCHAR
128
UNI
None
user_id
INT
10
MUL
NULL
None
owner_id
VARCHAR
128
NULL
None
name
VARCHAR
128...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"TABLES","depth":6,"bounds":{"left":0.011111111,"top":0.13111112,"width":0.16458334,"height":0.027777778},"value":"TABLES","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"opportunities","depth":6,"bounds":{"left":0.011111111,"top":0.16111112,"width":0.16458334,"height":0.02111111},"value":"opportunities","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"opportunity_comments","depth":6,"bounds":{"left":0.011111111,"top":0.18444444,"width":0.16458334,"height":0.02111111},"value":"opportunity_comments","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"opportunity_contacts","depth":6,"bounds":{"left":0.011111111,"top":0.20777778,"width":0.16458334,"height":0.02111111},"value":"opportunity_contacts","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"opportunity_stages","depth":6,"bounds":{"left":0.011111111,"top":0.23111111,"width":0.16458334,"height":0.02111111},"value":"opportunity_stages","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"opp","depth":3,"bounds":{"left":0.0034722222,"top":0.08888889,"width":0.17986111,"height":0.024444444},"automation_id":"_NS:879","value":"opp","placeholder":"Filter","role_description":"search text field","subrole":"AXSearchField","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"search","depth":4,"bounds":{"left":0.0048611113,"top":0.08888889,"width":0.017361112,"height":0.024444444},"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"cancel","depth":4,"bounds":{"left":0.16527778,"top":0.08888889,"width":0.015277778,"height":0.024444444},"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"add","depth":2,"bounds":{"left":0.0,"top":0.9722222,"width":0.017361112,"height":0.027777778},"automation_id":"_NS:4671","help_text":"Add new table","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Quick Look","depth":2,"bounds":{"left":0.072916664,"top":0.9722222,"width":0.017361112,"height":0.027777778},"automation_id":"_NS:1133","help_text":"Toggle the visibility of the Information panel","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXMenuButton","text":"action","depth":2,"bounds":{"left":0.017361112,"top":0.9722222,"width":0.024305556,"height":0.027777778},"automation_id":"_NS:1882","role_description":"menu button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"refresh","depth":2,"bounds":{"left":0.048611112,"top":0.9722222,"width":0.017361112,"height":0.027777778},"automation_id":"_NS:3295","help_text":"Refresh table list","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"id","depth":7,"bounds":{"left":0.19236112,"top":0.115555555,"width":0.05138889,"height":0.02111111},"value":"id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"bounds":{"left":0.24583334,"top":0.115555555,"width":0.08888889,"height":0.02111111},"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"bounds":{"left":0.33680555,"top":0.115555555,"width":0.26770833,"height":0.02111111},"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"PRI","depth":7,"bounds":{"left":0.7690972,"top":0.115555555,"width":0.041666668,"height":0.02111111},"role_description":"text"},{"role":"AXComboBox","text":"auto_increment","depth":7,"bounds":{"left":0.85555553,"top":0.115555555,"width":0.058680557,"height":0.02111111},"value":"auto_increment","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"uuid","depth":7,"bounds":{"left":0.19236112,"top":0.1388889,"width":0.05138889,"height":0.02111111},"value":"uuid","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"BINARY","depth":7,"bounds":{"left":0.24583334,"top":0.1388889,"width":0.08888889,"height":0.02111111},"value":"BINARY","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"16","depth":7,"bounds":{"left":0.33680555,"top":0.1388889,"width":0.26770833,"height":0.02111111},"value":"16","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"UNI","depth":7,"bounds":{"left":0.7690972,"top":0.1388889,"width":0.041666668,"height":0.02111111},"role_description":"text"},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.85555553,"top":0.1388889,"width":0.058680557,"height":0.02111111},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"team_id","depth":7,"bounds":{"left":0.19236112,"top":0.16222222,"width":0.05138889,"height":0.02111111},"value":"team_id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"bounds":{"left":0.24583334,"top":0.16222222,"width":0.08888889,"height":0.02111111},"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"bounds":{"left":0.33680555,"top":0.16222222,"width":0.26770833,"height":0.02111111},"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"MUL","depth":7,"bounds":{"left":0.7690972,"top":0.16222222,"width":0.041666668,"height":0.02111111},"role_description":"text"},{"role":"AXTextField","text":"NULL","depth":7,"bounds":{"left":0.8128472,"top":0.16222222,"width":0.040625,"height":0.02111111},"value":"NULL","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.85555553,"top":0.16222222,"width":0.058680557,"height":0.02111111},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"crm_configuration_id","depth":7,"bounds":{"left":0.19236112,"top":0.18555556,"width":0.05138889,"height":0.02111111},"value":"crm_configuration_id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"bounds":{"left":0.24583334,"top":0.18555556,"width":0.08888889,"height":0.02111111},"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"bounds":{"left":0.33680555,"top":0.18555556,"width":0.26770833,"height":0.02111111},"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"MUL","depth":7,"bounds":{"left":0.7690972,"top":0.18555556,"width":0.041666668,"height":0.02111111},"role_description":"text"},{"role":"AXTextField","text":"NULL","depth":7,"bounds":{"left":0.8128472,"top":0.18555556,"width":0.040625,"height":0.02111111},"value":"NULL","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.85555553,"top":0.18555556,"width":0.058680557,"height":0.02111111},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"account_id","depth":7,"bounds":{"left":0.19236112,"top":0.20888889,"width":0.05138889,"height":0.02111111},"value":"account_id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"bounds":{"left":0.24583334,"top":0.20888889,"width":0.08888889,"height":0.02111111},"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"bounds":{"left":0.33680555,"top":0.20888889,"width":0.26770833,"height":0.02111111},"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"MUL","depth":7,"bounds":{"left":0.7690972,"top":0.20888889,"width":0.041666668,"height":0.02111111},"role_description":"text"},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.85555553,"top":0.20888889,"width":0.058680557,"height":0.02111111},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"stage_id","depth":7,"bounds":{"left":0.19236112,"top":0.23222223,"width":0.05138889,"height":0.02111111},"value":"stage_id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"bounds":{"left":0.24583334,"top":0.23222223,"width":0.08888889,"height":0.02111111},"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"bounds":{"left":0.33680555,"top":0.23222223,"width":0.26770833,"height":0.02111111},"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"MUL","depth":7,"bounds":{"left":0.7690972,"top":0.23222223,"width":0.041666668,"height":0.02111111},"role_description":"text"},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.85555553,"top":0.23222223,"width":0.058680557,"height":0.02111111},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"stage_updated_at","depth":7,"bounds":{"left":0.19236112,"top":0.25555557,"width":0.05138889,"height":0.02111111},"value":"stage_updated_at","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"DATETIME","depth":7,"bounds":{"left":0.24583334,"top":0.25555557,"width":0.08888889,"height":0.02111111},"value":"DATETIME","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"NULL","depth":7,"bounds":{"left":0.8128472,"top":0.25555557,"width":0.040625,"height":0.02111111},"value":"NULL","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.85555553,"top":0.25555557,"width":0.058680557,"height":0.02111111},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"record_type_id","depth":7,"bounds":{"left":0.19236112,"top":0.27888888,"width":0.05138889,"height":0.02111111},"value":"record_type_id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"bounds":{"left":0.24583334,"top":0.27888888,"width":0.08888889,"height":0.02111111},"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"bounds":{"left":0.33680555,"top":0.27888888,"width":0.26770833,"height":0.02111111},"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"MUL","depth":7,"bounds":{"left":0.7690972,"top":0.27888888,"width":0.041666668,"height":0.02111111},"role_description":"text"},{"role":"AXTextField","text":"NULL","depth":7,"bounds":{"left":0.8128472,"top":0.27888888,"width":0.040625,"height":0.02111111},"value":"NULL","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.85555553,"top":0.27888888,"width":0.058680557,"height":0.02111111},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"crm_provider_id","depth":7,"bounds":{"left":0.19236112,"top":0.30222222,"width":0.05138889,"height":0.02111111},"value":"crm_provider_id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"VARCHAR","depth":7,"bounds":{"left":0.24583334,"top":0.30222222,"width":0.08888889,"height":0.02111111},"value":"VARCHAR","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"128","depth":7,"bounds":{"left":0.33680555,"top":0.30222222,"width":0.26770833,"height":0.02111111},"value":"128","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"UNI","depth":7,"bounds":{"left":0.7690972,"top":0.30222222,"width":0.041666668,"height":0.02111111},"role_description":"text"},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.85555553,"top":0.30222222,"width":0.058680557,"height":0.02111111},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"user_id","depth":7,"bounds":{"left":0.19236112,"top":0.32555556,"width":0.05138889,"height":0.02111111},"value":"user_id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"bounds":{"left":0.24583334,"top":0.32555556,"width":0.08888889,"height":0.02111111},"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"bounds":{"left":0.33680555,"top":0.32555556,"width":0.26770833,"height":0.02111111},"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"MUL","depth":7,"bounds":{"left":0.7690972,"top":0.32555556,"width":0.041666668,"height":0.02111111},"role_description":"text"},{"role":"AXTextField","text":"NULL","depth":7,"bounds":{"left":0.8128472,"top":0.32555556,"width":0.040625,"height":0.02111111},"value":"NULL","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.85555553,"top":0.32555556,"width":0.058680557,"height":0.02111111},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"owner_id","depth":7,"bounds":{"left":0.19236112,"top":0.34888887,"width":0.05138889,"height":0.02111111},"value":"owner_id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"VARCHAR","depth":7,"bounds":{"left":0.24583334,"top":0.34888887,"width":0.08888889,"height":0.02111111},"value":"VARCHAR","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"128","depth":7,"bounds":{"left":0.33680555,"top":0.34888887,"width":0.26770833,"height":0.02111111},"value":"128","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"NULL","depth":7,"bounds":{"left":0.8128472,"top":0.34888887,"width":0.040625,"height":0.02111111},"value":"NULL","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.85555553,"top":0.34888887,"width":0.058680557,"height":0.02111111},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"name","depth":7,"bounds":{"left":0.19236112,"top":0.37222221,"width":0.05138889,"height":0.02111111},"value":"name","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"VARCHAR","depth":7,"bounds":{"left":0.24583334,"top":0.37222221,"width":0.08888889,"height":0.02111111},"value":"VARCHAR","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"128","depth":7,"bounds":{"left":0.33680555,"top":0.37222221,"width":0.26770833,"height":0.02111111},"value":"128","role_description":"text field","is_enabled":true,"is_focused":false}]...
|
330229546158856474
|
1254877630238304304
|
visual_change
|
accessibility
|
NULL
|
TABLES
opportunities
opportunity_comments
opportun TABLES
opportunities
opportunity_comments
opportunity_contacts
opportunity_stages
opp
search
cancel
add
Quick Look
action
refresh
id
INT
10
PRI
auto_increment
uuid
BINARY
16
UNI
None
team_id
INT
10
MUL
NULL
None
crm_configuration_id
INT
10
MUL
NULL
None
account_id
INT
10
MUL
None
stage_id
INT
10
MUL
None
stage_updated_at
DATETIME
NULL
None
record_type_id
INT
10
MUL
NULL
None
crm_provider_id
VARCHAR
128
UNI
None
user_id
INT
10
MUL
NULL
None
owner_id
VARCHAR
128
NULL
None
name
VARCHAR
128...
|
13358
|
|
13355
|
290
|
39
|
2026-04-14T12:20:08.409221+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776169208409_m1.jpg...
|
Sequel Ace
|
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/stages
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
TABLES
business_process_stages
lead_stages
opportu TABLES
business_process_stages
lead_stages
opportunity_stages
stages
stag
search
cancel
add
Quick Look
action
refresh
id
INT
10
PRI
auto_increment
uuid
BINARY
16
UNI
None...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"TABLES","depth":6,"bounds":{"left":0.011111111,"top":0.13111112,"width":0.16458334,"height":0.027777778},"value":"TABLES","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"business_process_stages","depth":6,"bounds":{"left":0.011111111,"top":0.16111112,"width":0.16458334,"height":0.02111111},"value":"business_process_stages","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"lead_stages","depth":6,"bounds":{"left":0.011111111,"top":0.18444444,"width":0.16458334,"height":0.02111111},"value":"lead_stages","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"opportunity_stages","depth":6,"bounds":{"left":0.011111111,"top":0.20777778,"width":0.16458334,"height":0.02111111},"value":"opportunity_stages","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"stages","depth":6,"bounds":{"left":0.011111111,"top":0.23111111,"width":0.16458334,"height":0.02111111},"value":"stages","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"stag","depth":3,"bounds":{"left":0.0034722222,"top":0.08888889,"width":0.17986111,"height":0.024444444},"automation_id":"_NS:879","value":"stag","placeholder":"Filter","role_description":"search text field","subrole":"AXSearchField","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"search","depth":4,"bounds":{"left":0.0048611113,"top":0.08888889,"width":0.017361112,"height":0.024444444},"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"cancel","depth":4,"bounds":{"left":0.16527778,"top":0.08888889,"width":0.015277778,"height":0.024444444},"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"add","depth":2,"bounds":{"left":0.0,"top":0.9722222,"width":0.017361112,"height":0.027777778},"automation_id":"_NS:4671","help_text":"Add new table","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Quick Look","depth":2,"bounds":{"left":0.072916664,"top":0.9722222,"width":0.017361112,"height":0.027777778},"automation_id":"_NS:1133","help_text":"Toggle the visibility of the Information panel","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXMenuButton","text":"action","depth":2,"bounds":{"left":0.017361112,"top":0.9722222,"width":0.024305556,"height":0.027777778},"automation_id":"_NS:1882","role_description":"menu button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"refresh","depth":2,"bounds":{"left":0.048611112,"top":0.9722222,"width":0.017361112,"height":0.027777778},"automation_id":"_NS:3295","help_text":"Refresh table list","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"id","depth":7,"bounds":{"left":0.19236112,"top":0.115555555,"width":0.05277778,"height":0.02111111},"value":"id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"bounds":{"left":0.24722221,"top":0.115555555,"width":0.090277776,"height":0.02111111},"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"bounds":{"left":0.33958334,"top":0.115555555,"width":0.2690972,"height":0.02111111},"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"PRI","depth":7,"bounds":{"left":0.7732639,"top":0.115555555,"width":0.041666668,"height":0.02111111},"role_description":"text"},{"role":"AXComboBox","text":"auto_increment","depth":7,"bounds":{"left":0.8611111,"top":0.115555555,"width":0.060069446,"height":0.02111111},"value":"auto_increment","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"uuid","depth":7,"bounds":{"left":0.19236112,"top":0.1388889,"width":0.05277778,"height":0.02111111},"value":"uuid","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"BINARY","depth":7,"bounds":{"left":0.24722221,"top":0.1388889,"width":0.090277776,"height":0.02111111},"value":"BINARY","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"16","depth":7,"bounds":{"left":0.33958334,"top":0.1388889,"width":0.2690972,"height":0.02111111},"value":"16","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"UNI","depth":7,"bounds":{"left":0.7732639,"top":0.1388889,"width":0.041666668,"height":0.02111111},"role_description":"text"},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.8611111,"top":0.1388889,"width":0.060069446,"height":0.02111111},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false}]...
|
-2548929301666673952
|
1513885218958897158
|
visual_change
|
accessibility
|
NULL
|
TABLES
business_process_stages
lead_stages
opportu TABLES
business_process_stages
lead_stages
opportunity_stages
stages
stag
search
cancel
add
Quick Look
action
refresh
id
INT
10
PRI
auto_increment
uuid
BINARY
16
UNI
None...
|
NULL
|
|
13316
|
290
|
23
|
2026-04-14T12:18:36.007466+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776169116007_m1.jpg...
|
Sequel Ace
|
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/stages
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
TABLES
business_process_stages
lead_stages
opportu TABLES
business_process_stages
lead_stages
opportunity_stages
stages
stag
search
cancel
add
Quick Look
action
refresh
id
INT
10
PRI
auto_increment
uuid
BINARY
16
UNI
None
team_id
INT
10
MUL
None
crm_configuration_id
INT
10
MUL
NULL
None
crm_provider_id
VARCHAR
128
UNI
NULL
None...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"TABLES","depth":6,"bounds":{"left":0.011111111,"top":0.13111112,"width":0.16458334,"height":0.027777778},"value":"TABLES","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"business_process_stages","depth":6,"bounds":{"left":0.011111111,"top":0.16111112,"width":0.16458334,"height":0.02111111},"value":"business_process_stages","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"lead_stages","depth":6,"bounds":{"left":0.011111111,"top":0.18444444,"width":0.16458334,"height":0.02111111},"value":"lead_stages","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"opportunity_stages","depth":6,"bounds":{"left":0.011111111,"top":0.20777778,"width":0.16458334,"height":0.02111111},"value":"opportunity_stages","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"stages","depth":6,"bounds":{"left":0.011111111,"top":0.23111111,"width":0.16458334,"height":0.02111111},"value":"stages","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"stag","depth":3,"bounds":{"left":0.0034722222,"top":0.08888889,"width":0.17986111,"height":0.024444444},"automation_id":"_NS:879","value":"stag","placeholder":"Filter","role_description":"search text field","subrole":"AXSearchField","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"search","depth":4,"bounds":{"left":0.0048611113,"top":0.08888889,"width":0.017361112,"height":0.024444444},"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"cancel","depth":4,"bounds":{"left":0.16527778,"top":0.08888889,"width":0.015277778,"height":0.024444444},"role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"add","depth":2,"bounds":{"left":0.0,"top":0.9722222,"width":0.017361112,"height":0.027777778},"automation_id":"_NS:4671","help_text":"Add new table","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"Quick Look","depth":2,"bounds":{"left":0.072916664,"top":0.9722222,"width":0.017361112,"height":0.027777778},"automation_id":"_NS:1133","help_text":"Toggle the visibility of the Information panel","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXMenuButton","text":"action","depth":2,"bounds":{"left":0.017361112,"top":0.9722222,"width":0.024305556,"height":0.027777778},"automation_id":"_NS:1882","role_description":"menu button","is_enabled":true,"is_focused":false},{"role":"AXButton","text":"refresh","depth":2,"bounds":{"left":0.048611112,"top":0.9722222,"width":0.017361112,"height":0.027777778},"automation_id":"_NS:3295","help_text":"Refresh table list","role_description":"button","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"id","depth":7,"bounds":{"left":0.19236112,"top":0.115555555,"width":0.05277778,"height":0.02111111},"value":"id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"bounds":{"left":0.24722221,"top":0.115555555,"width":0.090277776,"height":0.02111111},"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"bounds":{"left":0.33958334,"top":0.115555555,"width":0.2690972,"height":0.02111111},"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"PRI","depth":7,"bounds":{"left":0.7732639,"top":0.115555555,"width":0.041666668,"height":0.02111111},"role_description":"text"},{"role":"AXComboBox","text":"auto_increment","depth":7,"bounds":{"left":0.8611111,"top":0.115555555,"width":0.060069446,"height":0.02111111},"value":"auto_increment","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"uuid","depth":7,"bounds":{"left":0.19236112,"top":0.1388889,"width":0.05277778,"height":0.02111111},"value":"uuid","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"BINARY","depth":7,"bounds":{"left":0.24722221,"top":0.1388889,"width":0.090277776,"height":0.02111111},"value":"BINARY","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"16","depth":7,"bounds":{"left":0.33958334,"top":0.1388889,"width":0.2690972,"height":0.02111111},"value":"16","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"UNI","depth":7,"bounds":{"left":0.7732639,"top":0.1388889,"width":0.041666668,"height":0.02111111},"role_description":"text"},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.8611111,"top":0.1388889,"width":0.060069446,"height":0.02111111},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"team_id","depth":7,"bounds":{"left":0.19236112,"top":0.16222222,"width":0.05277778,"height":0.02111111},"value":"team_id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"bounds":{"left":0.24722221,"top":0.16222222,"width":0.090277776,"height":0.02111111},"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"bounds":{"left":0.33958334,"top":0.16222222,"width":0.2690972,"height":0.02111111},"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"MUL","depth":7,"bounds":{"left":0.7732639,"top":0.16222222,"width":0.041666668,"height":0.02111111},"role_description":"text"},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.8611111,"top":0.16222222,"width":0.060069446,"height":0.02111111},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"crm_configuration_id","depth":7,"bounds":{"left":0.19236112,"top":0.18555556,"width":0.05277778,"height":0.02111111},"value":"crm_configuration_id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"INT","depth":7,"bounds":{"left":0.24722221,"top":0.18555556,"width":0.090277776,"height":0.02111111},"value":"INT","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"10","depth":7,"bounds":{"left":0.33958334,"top":0.18555556,"width":0.2690972,"height":0.02111111},"value":"10","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"MUL","depth":7,"bounds":{"left":0.7732639,"top":0.18555556,"width":0.041666668,"height":0.02111111},"role_description":"text"},{"role":"AXTextField","text":"NULL","depth":7,"bounds":{"left":0.81701386,"top":0.18555556,"width":0.042013887,"height":0.02111111},"value":"NULL","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.8611111,"top":0.18555556,"width":0.060069446,"height":0.02111111},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"crm_provider_id","depth":7,"bounds":{"left":0.19236112,"top":0.20888889,"width":0.05277778,"height":0.02111111},"value":"crm_provider_id","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"VARCHAR","depth":7,"bounds":{"left":0.24722221,"top":0.20888889,"width":0.090277776,"height":0.02111111},"value":"VARCHAR","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false},{"role":"AXTextField","text":"128","depth":7,"bounds":{"left":0.33958334,"top":0.20888889,"width":0.2690972,"height":0.02111111},"value":"128","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXStaticText","text":"UNI","depth":7,"bounds":{"left":0.7732639,"top":0.20888889,"width":0.041666668,"height":0.02111111},"role_description":"text"},{"role":"AXTextField","text":"NULL","depth":7,"bounds":{"left":0.81701386,"top":0.20888889,"width":0.042013887,"height":0.02111111},"value":"NULL","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXComboBox","text":"None","depth":7,"bounds":{"left":0.8611111,"top":0.20888889,"width":0.060069446,"height":0.02111111},"value":"None","role_description":"combo box","is_enabled":true,"is_focused":false,"is_expanded":false}]...
|
5615970390532541824
|
3819668765558204468
|
click
|
accessibility
|
NULL
|
TABLES
business_process_stages
lead_stages
opportu TABLES
business_process_stages
lead_stages
opportunity_stages
stages
stag
search
cancel
add
Quick Look
action
refresh
id
INT
10
PRI
auto_increment
uuid
BINARY
16
UNI
None
team_id
INT
10
MUL
None
crm_configuration_id
INT
10
MUL
NULL
None
crm_provider_id
VARCHAR
128
UNI
NULL
None...
|
NULL
|
|
13310
|
290
|
20
|
2026-04-14T12:18:29.358786+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776169109358_m1.jpg...
|
Sequel Ace
|
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/opportunit (MySQL 11.4.9-MariaDB-log) PROD/jiminny/opportunities...
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
TABLES
activity_topic_triggers
connection_properti TABLES
activity_topic_triggers
connection_properties
opportunities
opportunity_comments
opportunity_contacts
opportunity_stages...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"TABLES","depth":6,"bounds":{"left":0.011111111,"top":0.13111112,"width":0.16458334,"height":0.027777778},"value":"TABLES","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_topic_triggers","depth":6,"bounds":{"left":0.011111111,"top":0.16111112,"width":0.16458334,"height":0.02111111},"value":"activity_topic_triggers","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"connection_properties","depth":6,"bounds":{"left":0.011111111,"top":0.18444444,"width":0.16458334,"height":0.02111111},"value":"connection_properties","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"opportunities","depth":6,"bounds":{"left":0.011111111,"top":0.20777778,"width":0.16458334,"height":0.02111111},"value":"opportunities","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"opportunity_comments","depth":6,"bounds":{"left":0.011111111,"top":0.23111111,"width":0.16458334,"height":0.02111111},"value":"opportunity_comments","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"opportunity_contacts","depth":6,"bounds":{"left":0.011111111,"top":0.25444445,"width":0.16458334,"height":0.02111111},"value":"opportunity_contacts","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"opportunity_stages","depth":6,"bounds":{"left":0.011111111,"top":0.2777778,"width":0.16458334,"height":0.02111111},"value":"opportunity_stages","role_description":"text field","is_enabled":true,"is_focused":false}]...
|
3999509693010324120
|
6246397677530771327
|
click
|
accessibility
|
NULL
|
TABLES
activity_topic_triggers
connection_properti TABLES
activity_topic_triggers
connection_properties
opportunities
opportunity_comments
opportunity_contacts
opportunity_stages...
|
13309
|
|
13295
|
290
|
12
|
2026-04-14T12:17:56.016563+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776169076016_m1.jpg...
|
Sequel Ace
|
(MySQL 11.4.9-MariaDB-log) PROD/jiminny/accounts
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
TABLES
accounts
activities
activity_availability_n TABLES
accounts
activities
activity_availability_notifications
activity_coach_requests
activity_comments
activity_export_logs
activity_export_tokens
activity_exports
activity_imports
activity_logs
activity_messages
activity_moments
activity_notes
activity_participant_data
activity_participant_speeches
activity_plays
activity_processing_states
activity_provider_users
activity_providers
activity_questions
activity_scorecard_rule_triggers
activity_scorecard_rules
activity_search_filters
activity_searches...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"TABLES","depth":6,"bounds":{"left":0.011111111,"top":0.13111112,"width":0.15416667,"height":0.027777778},"value":"TABLES","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"accounts","depth":6,"bounds":{"left":0.011111111,"top":0.16111112,"width":0.15416667,"height":0.02111111},"value":"accounts","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activities","depth":6,"bounds":{"left":0.011111111,"top":0.18444444,"width":0.15416667,"height":0.02111111},"value":"activities","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_availability_notifications","depth":6,"bounds":{"left":0.011111111,"top":0.20777778,"width":0.15416667,"height":0.02111111},"value":"activity_availability_notifications","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_coach_requests","depth":6,"bounds":{"left":0.011111111,"top":0.23111111,"width":0.15416667,"height":0.02111111},"value":"activity_coach_requests","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_comments","depth":6,"bounds":{"left":0.011111111,"top":0.25444445,"width":0.15416667,"height":0.02111111},"value":"activity_comments","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_export_logs","depth":6,"bounds":{"left":0.011111111,"top":0.2777778,"width":0.15416667,"height":0.02111111},"value":"activity_export_logs","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_export_tokens","depth":6,"bounds":{"left":0.011111111,"top":0.3011111,"width":0.15416667,"height":0.02111111},"value":"activity_export_tokens","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_exports","depth":6,"bounds":{"left":0.011111111,"top":0.32444444,"width":0.15416667,"height":0.02111111},"value":"activity_exports","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_imports","depth":6,"bounds":{"left":0.011111111,"top":0.34777778,"width":0.15416667,"height":0.02111111},"value":"activity_imports","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_logs","depth":6,"bounds":{"left":0.011111111,"top":0.37111112,"width":0.15416667,"height":0.02111111},"value":"activity_logs","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_messages","depth":6,"bounds":{"left":0.011111111,"top":0.39444444,"width":0.15416667,"height":0.02111111},"value":"activity_messages","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_moments","depth":6,"bounds":{"left":0.011111111,"top":0.41777778,"width":0.15416667,"height":0.02111111},"value":"activity_moments","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_notes","depth":6,"bounds":{"left":0.011111111,"top":0.44111112,"width":0.15416667,"height":0.02111111},"value":"activity_notes","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_participant_data","depth":6,"bounds":{"left":0.011111111,"top":0.46444446,"width":0.15416667,"height":0.02111111},"value":"activity_participant_data","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_participant_speeches","depth":6,"bounds":{"left":0.011111111,"top":0.48777777,"width":0.15416667,"height":0.02111111},"value":"activity_participant_speeches","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_plays","depth":6,"bounds":{"left":0.011111111,"top":0.51111114,"width":0.15416667,"height":0.02111111},"value":"activity_plays","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_processing_states","depth":6,"bounds":{"left":0.011111111,"top":0.53444445,"width":0.15416667,"height":0.02111111},"value":"activity_processing_states","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_provider_users","depth":6,"bounds":{"left":0.011111111,"top":0.55777776,"width":0.15416667,"height":0.02111111},"value":"activity_provider_users","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_providers","depth":6,"bounds":{"left":0.011111111,"top":0.58111113,"width":0.15416667,"height":0.02111111},"value":"activity_providers","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_questions","depth":6,"bounds":{"left":0.011111111,"top":0.60444444,"width":0.15416667,"height":0.02111111},"value":"activity_questions","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_scorecard_rule_triggers","depth":6,"bounds":{"left":0.011111111,"top":0.62777776,"width":0.15416667,"height":0.02111111},"value":"activity_scorecard_rule_triggers","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_scorecard_rules","depth":6,"bounds":{"left":0.011111111,"top":0.6511111,"width":0.15416667,"height":0.02111111},"value":"activity_scorecard_rules","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_search_filters","depth":6,"bounds":{"left":0.011111111,"top":0.67444444,"width":0.15416667,"height":0.02111111},"value":"activity_search_filters","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_searches","depth":6,"bounds":{"left":0.011111111,"top":0.69777775,"width":0.15416667,"height":0.02111111},"value":"activity_searches","role_description":"text field","is_enabled":true,"is_focused":false}]...
|
4661772431093625794
|
-8958603679731959069
|
visual_change
|
accessibility
|
NULL
|
TABLES
accounts
activities
activity_availability_n TABLES
accounts
activities
activity_availability_notifications
activity_coach_requests
activity_comments
activity_export_logs
activity_export_tokens
activity_exports
activity_imports
activity_logs
activity_messages
activity_moments
activity_notes
activity_participant_data
activity_participant_speeches
activity_plays
activity_processing_states
activity_provider_users
activity_providers
activity_questions
activity_scorecard_rule_triggers
activity_scorecard_rules
activity_search_filters
activity_searches...
|
13294
|
|
13292
|
290
|
10
|
2026-04-14T12:17:53.000323+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776169073000_m1.jpg...
|
Sequel Ace
|
(MySQL 11.4.9-MariaDB-log) PROD/jiminny
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
TABLES
accounts
activities
activity_availability_n TABLES
accounts
activities
activity_availability_notifications
activity_coach_requests
activity_comments
activity_export_logs
activity_export_tokens
activity_exports
activity_imports
activity_logs
activity_messages
activity_moments
activity_notes
activity_participant_data
activity_participant_speeches
activity_plays
activity_processing_states
activity_provider_users
activity_providers
activity_questions
activity_scorecard_rule_triggers
activity_scorecard_rules
activity_search_filters
activity_searches
activity_shares
activity_snapshots
activity_stats
activity_stats_specifications
activity_subscription_sets
activity_subscriptions
activity_summary_logs
activity_topic_triggers
activity_upload_settings
addresses
ai_crm_template_fields
ai_crm_template_filters
ai_crm_template_log
ai_crm_template_runs
ai_crm_template_write_logs
ai_crm_templates
ai_prompts
ai_scorecard_filters
ai_scorecard_rule_runs
ai_scorecard_rules
ai_scorecard_runs
ai_scorecards
ask_anything_prompts
automated_report_results
automated_reports
business_process_stages
business_processes
calendar_events
calendar_subscriptions
calendars
call_imports
coaching_feedback_visibility
coaching_feedbacks
coaching_section_criteria
coaching_section_criterion_feedbacks
coaching_section_feedbacks
coaching_sections
connection_properties
connection_statistics
contact_roles
contacts
crm_configurations
crm_field_data
crm_field_values
crm_fields
crm_layout_entities
crm_layouts
crm_logs
crm_profile_record_types
crm_profiles
crm_sync_batches
deal_risks
default_activity_types
devices
email_messages
events
failed_jobs
features
generic_ai_prompts
group_deal_risk_types
groups
inbox_email_batches...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"TABLES","depth":6,"bounds":{"left":0.011111111,"top":0.13111112,"width":0.15416667,"height":0.027777778},"value":"TABLES","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"accounts","depth":6,"bounds":{"left":0.011111111,"top":0.16111112,"width":0.15416667,"height":0.02111111},"value":"accounts","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activities","depth":6,"bounds":{"left":0.011111111,"top":0.18444444,"width":0.15416667,"height":0.02111111},"value":"activities","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_availability_notifications","depth":6,"bounds":{"left":0.011111111,"top":0.20777778,"width":0.15416667,"height":0.02111111},"value":"activity_availability_notifications","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_coach_requests","depth":6,"bounds":{"left":0.011111111,"top":0.23111111,"width":0.15416667,"height":0.02111111},"value":"activity_coach_requests","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_comments","depth":6,"bounds":{"left":0.011111111,"top":0.25444445,"width":0.15416667,"height":0.02111111},"value":"activity_comments","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_export_logs","depth":6,"bounds":{"left":0.011111111,"top":0.2777778,"width":0.15416667,"height":0.02111111},"value":"activity_export_logs","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_export_tokens","depth":6,"bounds":{"left":0.011111111,"top":0.3011111,"width":0.15416667,"height":0.02111111},"value":"activity_export_tokens","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_exports","depth":6,"bounds":{"left":0.011111111,"top":0.32444444,"width":0.15416667,"height":0.02111111},"value":"activity_exports","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_imports","depth":6,"bounds":{"left":0.011111111,"top":0.34777778,"width":0.15416667,"height":0.02111111},"value":"activity_imports","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_logs","depth":6,"bounds":{"left":0.011111111,"top":0.37111112,"width":0.15416667,"height":0.02111111},"value":"activity_logs","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_messages","depth":6,"bounds":{"left":0.011111111,"top":0.39444444,"width":0.15416667,"height":0.02111111},"value":"activity_messages","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_moments","depth":6,"bounds":{"left":0.011111111,"top":0.41777778,"width":0.15416667,"height":0.02111111},"value":"activity_moments","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_notes","depth":6,"bounds":{"left":0.011111111,"top":0.44111112,"width":0.15416667,"height":0.02111111},"value":"activity_notes","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_participant_data","depth":6,"bounds":{"left":0.011111111,"top":0.46444446,"width":0.15416667,"height":0.02111111},"value":"activity_participant_data","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_participant_speeches","depth":6,"bounds":{"left":0.011111111,"top":0.48777777,"width":0.15416667,"height":0.02111111},"value":"activity_participant_speeches","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_plays","depth":6,"bounds":{"left":0.011111111,"top":0.51111114,"width":0.15416667,"height":0.02111111},"value":"activity_plays","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_processing_states","depth":6,"bounds":{"left":0.011111111,"top":0.53444445,"width":0.15416667,"height":0.02111111},"value":"activity_processing_states","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_provider_users","depth":6,"bounds":{"left":0.011111111,"top":0.55777776,"width":0.15416667,"height":0.02111111},"value":"activity_provider_users","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_providers","depth":6,"bounds":{"left":0.011111111,"top":0.58111113,"width":0.15416667,"height":0.02111111},"value":"activity_providers","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_questions","depth":6,"bounds":{"left":0.011111111,"top":0.60444444,"width":0.15416667,"height":0.02111111},"value":"activity_questions","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_scorecard_rule_triggers","depth":6,"bounds":{"left":0.011111111,"top":0.62777776,"width":0.15416667,"height":0.02111111},"value":"activity_scorecard_rule_triggers","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_scorecard_rules","depth":6,"bounds":{"left":0.011111111,"top":0.6511111,"width":0.15416667,"height":0.02111111},"value":"activity_scorecard_rules","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_search_filters","depth":6,"bounds":{"left":0.011111111,"top":0.67444444,"width":0.15416667,"height":0.02111111},"value":"activity_search_filters","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_searches","depth":6,"bounds":{"left":0.011111111,"top":0.69777775,"width":0.15416667,"height":0.02111111},"value":"activity_searches","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_shares","depth":6,"bounds":{"left":0.011111111,"top":0.7211111,"width":0.15416667,"height":0.02111111},"value":"activity_shares","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_snapshots","depth":6,"bounds":{"left":0.011111111,"top":0.74444443,"width":0.15416667,"height":0.02111111},"value":"activity_snapshots","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_stats","depth":6,"bounds":{"left":0.011111111,"top":0.7677778,"width":0.15416667,"height":0.02111111},"value":"activity_stats","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_stats_specifications","depth":6,"bounds":{"left":0.011111111,"top":0.7911111,"width":0.15416667,"height":0.02111111},"value":"activity_stats_specifications","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_subscription_sets","depth":6,"bounds":{"left":0.011111111,"top":0.8144444,"width":0.15416667,"height":0.02111111},"value":"activity_subscription_sets","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_subscriptions","depth":6,"bounds":{"left":0.011111111,"top":0.8377778,"width":0.15416667,"height":0.02111111},"value":"activity_subscriptions","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_summary_logs","depth":6,"bounds":{"left":0.011111111,"top":0.8611111,"width":0.15416667,"height":0.02111111},"value":"activity_summary_logs","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_topic_triggers","depth":6,"bounds":{"left":0.011111111,"top":0.8844444,"width":0.15416667,"height":0.02111111},"value":"activity_topic_triggers","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"activity_upload_settings","depth":6,"bounds":{"left":0.011111111,"top":0.9077778,"width":0.15416667,"height":0.02111111},"value":"activity_upload_settings","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"addresses","depth":6,"bounds":{"left":0.011111111,"top":0.9311111,"width":0.15416667,"height":0.02111111},"value":"addresses","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ai_crm_template_fields","depth":6,"bounds":{"left":0.011111111,"top":0.95444447,"width":0.15416667,"height":0.02111111},"value":"ai_crm_template_fields","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ai_crm_template_filters","depth":6,"bounds":{"left":0.011111111,"top":0.9777778,"width":0.15416667,"height":0.02111111},"value":"ai_crm_template_filters","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ai_crm_template_log","depth":6,"bounds":{"left":0.011111111,"top":1.0,"width":0.15416667,"height":-0.0011111498},"value":"ai_crm_template_log","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ai_crm_template_runs","depth":6,"bounds":{"left":0.011111111,"top":1.0,"width":0.15416667,"height":-0.02444446},"value":"ai_crm_template_runs","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ai_crm_template_write_logs","depth":6,"bounds":{"left":0.011111111,"top":1.0,"width":0.15416667,"height":-0.047777772},"value":"ai_crm_template_write_logs","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ai_crm_templates","depth":6,"bounds":{"left":0.011111111,"top":1.0,"width":0.15416667,"height":-0.07111108},"value":"ai_crm_templates","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ai_prompts","depth":6,"bounds":{"left":0.011111111,"top":1.0,"width":0.15416667,"height":-0.094444394},"value":"ai_prompts","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ai_scorecard_filters","depth":6,"value":"ai_scorecard_filters","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ai_scorecard_rule_runs","depth":6,"value":"ai_scorecard_rule_runs","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ai_scorecard_rules","depth":6,"value":"ai_scorecard_rules","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ai_scorecard_runs","depth":6,"value":"ai_scorecard_runs","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ai_scorecards","depth":6,"value":"ai_scorecards","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"ask_anything_prompts","depth":6,"value":"ask_anything_prompts","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"automated_report_results","depth":6,"value":"automated_report_results","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"automated_reports","depth":6,"value":"automated_reports","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"business_process_stages","depth":6,"value":"business_process_stages","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"business_processes","depth":6,"value":"business_processes","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"calendar_events","depth":6,"value":"calendar_events","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"calendar_subscriptions","depth":6,"value":"calendar_subscriptions","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"calendars","depth":6,"value":"calendars","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"call_imports","depth":6,"value":"call_imports","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"coaching_feedback_visibility","depth":6,"value":"coaching_feedback_visibility","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"coaching_feedbacks","depth":6,"value":"coaching_feedbacks","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"coaching_section_criteria","depth":6,"value":"coaching_section_criteria","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"coaching_section_criterion_feedbacks","depth":6,"value":"coaching_section_criterion_feedbacks","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"coaching_section_feedbacks","depth":6,"value":"coaching_section_feedbacks","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"coaching_sections","depth":6,"value":"coaching_sections","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"connection_properties","depth":6,"value":"connection_properties","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"connection_statistics","depth":6,"value":"connection_statistics","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"contact_roles","depth":6,"value":"contact_roles","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"contacts","depth":6,"value":"contacts","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"crm_configurations","depth":6,"value":"crm_configurations","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"crm_field_data","depth":6,"value":"crm_field_data","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"crm_field_values","depth":6,"value":"crm_field_values","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"crm_fields","depth":6,"value":"crm_fields","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"crm_layout_entities","depth":6,"value":"crm_layout_entities","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"crm_layouts","depth":6,"value":"crm_layouts","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"crm_logs","depth":6,"value":"crm_logs","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"crm_profile_record_types","depth":6,"value":"crm_profile_record_types","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"crm_profiles","depth":6,"value":"crm_profiles","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"crm_sync_batches","depth":6,"value":"crm_sync_batches","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"deal_risks","depth":6,"value":"deal_risks","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"default_activity_types","depth":6,"value":"default_activity_types","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"devices","depth":6,"value":"devices","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"email_messages","depth":6,"value":"email_messages","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"events","depth":6,"value":"events","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"failed_jobs","depth":6,"value":"failed_jobs","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"features","depth":6,"value":"features","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"generic_ai_prompts","depth":6,"value":"generic_ai_prompts","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"group_deal_risk_types","depth":6,"value":"group_deal_risk_types","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"groups","depth":6,"value":"groups","role_description":"text field","is_enabled":true,"is_focused":false},{"role":"AXTextField","text":"inbox_email_batches","depth":6,"value":"inbox_email_batches","role_description":"text field","is_enabled":true,"is_focused":false}]...
|
3928389043123168597
|
-3195895905837008703
|
visual_change
|
accessibility
|
NULL
|
TABLES
accounts
activities
activity_availability_n TABLES
accounts
activities
activity_availability_notifications
activity_coach_requests
activity_comments
activity_export_logs
activity_export_tokens
activity_exports
activity_imports
activity_logs
activity_messages
activity_moments
activity_notes
activity_participant_data
activity_participant_speeches
activity_plays
activity_processing_states
activity_provider_users
activity_providers
activity_questions
activity_scorecard_rule_triggers
activity_scorecard_rules
activity_search_filters
activity_searches
activity_shares
activity_snapshots
activity_stats
activity_stats_specifications
activity_subscription_sets
activity_subscriptions
activity_summary_logs
activity_topic_triggers
activity_upload_settings
addresses
ai_crm_template_fields
ai_crm_template_filters
ai_crm_template_log
ai_crm_template_runs
ai_crm_template_write_logs
ai_crm_templates
ai_prompts
ai_scorecard_filters
ai_scorecard_rule_runs
ai_scorecard_rules
ai_scorecard_runs
ai_scorecards
ask_anything_prompts
automated_report_results
automated_reports
business_process_stages
business_processes
calendar_events
calendar_subscriptions
calendars
call_imports
coaching_feedback_visibility
coaching_feedbacks
coaching_section_criteria
coaching_section_criterion_feedbacks
coaching_section_feedbacks
coaching_sections
connection_properties
connection_statistics
contact_roles
contacts
crm_configurations
crm_field_data
crm_field_values
crm_fields
crm_layout_entities
crm_layouts
crm_logs
crm_profile_record_types
crm_profiles
crm_sync_batches
deal_risks
default_activity_types
devices
email_messages
events
failed_jobs
features
generic_ai_prompts
group_deal_risk_types
groups
inbox_email_batches...
|
13290
|
|
72998
|
1782
|
5
|
2026-04-23T06:32:32.191503+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-23/1776 /Users/lukas/.screenpipe/data/data/2026-04-23/1776925952191_m1.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsRepository.php
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Selection does not form a correct expression
text/ Selection does not form a correct expression
text/html
text/html
text/html
Project: faVsco.js, menu
JY-20157-AJ-report-not-send-notification, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Code changed:
Hide
Sync Changes
Hide This Notification
16
7
1
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Repositories;
use Carbon\CarbonImmutable;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Carbon;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Pagination\LengthAwarePaginator;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Jiminny\Services\Kiosk\AutomatedReports\ReportSort;
use Jiminny\Services\Kiosk\AutomatedReports\ReportSortDirection;
class AutomatedReportsRepository
{
/**
* Create a new automated report
*
* @param array $data
*
* @return AutomatedReport
*/
public function create(array $data): AutomatedReport
{
return AutomatedReport::create($data);
}
/**
* Find an automated report by UUID
*
* @param string $uuid
*
* @return AutomatedReport|null
*/
public function findByUuid(string $uuid): ?AutomatedReport
{
return AutomatedReport::where('uuid', AutomatedReport::toOptimized($uuid))->first();
}
public function findByIdOrUuid(string $idOrUuid): ?AutomatedReport
{
if (is_numeric($idOrUuid)) {
return AutomatedReport::find((int) $idOrUuid);
}
return AutomatedReport::where('uuid', AutomatedReport::toOptimized($idOrUuid))->first();
}
/**
* Retrieve all standard (non-Ask Jiminny) automated reports.
*
* @param string $sortColumn The column to sort by. Allowed values: 'created_by', 'created_at'. Defaults to 'created_at'.
* @param string $sortDirection The sort direction. Allowed values: 'asc', 'desc'. Defaults to 'desc'.
*
* @return Collection<AutomatedReport>
*/
public function getAllStandardReports(
string $sortColumn = 'created_at',
string $sortDirection = 'desc'
): Collection {
return $this->buildSortedQuery($sortColumn, $sortDirection)
->whereNot('type', AutomatedReportsService::TYPE_ASK_JIMINNY)
->get();
}
/**
* Retrieve all Ask Jiminny reports created by the given user.
*
* @param User $user The user whose reports to retrieve.
* @param string $sortColumn The column to sort by. Allowed values: 'created_by', 'created_at'. Defaults to 'created_at'.
* @param string $sortDirection The sort direction. Allowed values: 'asc', 'desc'. Defaults to 'desc'.
*
* @return Collection<AutomatedReport>
*/
public function getAskJiminnyReportsByUser(
User $user,
string $sortColumn = 'created_at',
string $sortDirection = 'desc'
): Collection {
return $this->buildSortedQuery($sortColumn, $sortDirection)
->where('type', AutomatedReportsService::TYPE_ASK_JIMINNY)
->where('created_by', $user->getId())
->get();
}
private function buildSortedQuery(string $sortColumn, string $sortDirection): \Illuminate\Database\Eloquent\Builder
{
$allowedColumns = ['created_by', 'created_at'];
if (! in_array($sortColumn, $allowedColumns)) {
$sortColumn = 'created_at';
}
$sortDirection = strtolower($sortDirection) === 'asc' ? 'asc' : 'desc';
$query = AutomatedReport::query()->with(['creator', 'team']);
if ($sortColumn === 'created_by') {
$query->leftJoin('users', 'users.id', '=', 'automated_reports.created_by')
->orderByRaw("users.name COLLATE utf8mb4_unicode_ci {$sortDirection}")
->select('automated_reports.*');
} else {
$query->orderBy($sortColumn, $sortDirection);
}
return $query;
}
/**
* Get all active Ask Jiminny reports whose expiry date has passed.
*
* @return Collection<AutomatedReport>
*/
public function getExpiredActiveAskJiminnyReports(): Collection
{
return AutomatedReport::where('status', true)
->where('type', AutomatedReportsService::TYPE_ASK_JIMINNY)
->whereNotNull('expires_at')
->where('expires_at', '<', now()->toDateString())
->get();
}
/**
* Get all active and enabled reports with active teams for the specified frequency.
*
* @param string $frequency
*
* @return Collection<AutomatedReport>
*/
public function getActiveReportsByFrequency(string $frequency): Collection
{
return AutomatedReport::where('automated_reports.status', true)
->where('automated_reports.frequency', $frequency)
->join('teams', 'automated_reports.team_id', '=', 'teams.id')
->where('teams.status', Team::STATUS_ACTIVE)
->where(function ($query) {
$query->whereNull('automated_reports.expires_at')
->orWhere('automated_reports.expires_at', '>=', now()->toDateString());
})
->select('automated_reports.*')
->get();
}
/**
* Update an automated report
*
* @param AutomatedReport $report
* @param array $data
*
* @return AutomatedReport
*/
public function update(AutomatedReport $report, array $data): AutomatedReport
{
$report->update($data);
return $report;
}
/**
* Create a new automated report result.
*
* @param array $data The data to create the automated report result with.
*
* @return AutomatedReportResult The newly created automated report result.
*/
public function createResult(array $data): AutomatedReportResult
{
return AutomatedReportResult::create($data);
}
/**
* Find an automated report result by UUID.
*
* @param string $uuid The UUID to find the automated report result with.
*
* @return AutomatedReportResult|null The automated report result if found, otherwise null.
*/
public function findResultByUuid(string $uuid): ?AutomatedReportResult
{
return AutomatedReportResult::where('uuid', AutomatedReportResult::toOptimized($uuid))->first();
}
public function findResultByUuidForUser(string $uuid, User $user): ?AutomatedReportResult
{
return AutomatedReportResult::query()
->where('uuid', AutomatedReportResult::toOptimized($uuid))
->whereHas('report', static function ($query) use ($user): void {
$query->where('team_id', $user->getTeamId())
->where('created_by', $user->getId());
})
->first();
}
public function findChildResult(AutomatedReportResult $result, string $type): ?AutomatedReportResult
{
return AutomatedReportResult::query()
->where('parent_id', $result->getId())
->where('media_type', $type)
->first();
}
public function findLatestDefaultOrFailedResult(AutomatedReport $report): ?AutomatedReportResult
{
return AutomatedReportResult::query()
->where('report_id', $report->getId())
->whereIn('status', [AutomatedReportResult::STATUS_DEFAULT, AutomatedReportResult::STATUS_FAILED])
->latest()
->first();
}
public function getGeneratedNotSentResults(): Collection
{
return AutomatedReportResult::query()
->whereNotNull('generated_at')
->whereNull('sent_at')
->where('status', AutomatedReportResult::STATUS_GENERATED)
->whereHas('report')
->with('report')
->get();
}
public function getPaginatedUserReports(
User $user,
ReportSort $sort,
ReportSortDirection $sortDirection,
int $resultsPerPage,
int $page,
?Carbon $fromDate,
?Carbon $toDate,
array $teamIds,
array $reportTypes,
?string $name,
): LengthAwarePaginator {
$query = AutomatedReportResult::query()
->whereNotNull('automated_report_results.generated_at')
->join('automated_reports', 'automated_report_results.report_id', '=', 'automated_reports.id')
->where(fn (Builder $q) => $this->applyUserAccessScope($q, $user))
->orderByRaw("$sort->value COLLATE utf8mb4_unicode_ci {$sortDirection->value}")
->select('automated_report_results.*')
->with('report.team');
if ($fromDate !== null && $toDate !== null) {
$query->whereBetween('generated_at', [$fromDate, $toDate]);
}
if (! empty($teamIds)) {
$query->where(function ($q) use ($teamIds) {
foreach ($teamIds as $id) {
$q->orWhereJsonContains('automated_reports.groups', $id);
}
});
}
if (! empty($reportTypes)) {
$query->whereIn('automated_reports.type', $reportTypes);
}
if (! empty($name)) {
$query->whereLike('name', "%$name%");
}
return $query->paginate($resultsPerPage, ['*'], 'page', $page);
}
public function countUserReports(User $user): int
{
return AutomatedReportResult::query()
->whereNotNull('generated_at')
->whereNotNull('sent_at')
->whereHas('report', function ($q) use ($user) {
$q->where('team_id', $user->getTeamId())
->whereJsonContains('recipients->users', $user->getId());
})
->count();
}
/**
* Restrict a query on the automated_reports table to reports the given user is allowed to see.
*
* Matches the customer-facing audience:
* - explicit user recipients (recipients.users)
* - members of any of the report's groups (Ask Jiminny reports)
*/
private function applyUserAccessScope(Builder $query, User $user): void
{
$userId = $user->getId();
$groupId = $user->getGroupId();
$query
->where('automated_reports.team_id', $user->getTeamId())
->where(function (Builder $q) use ($userId, $groupId): void {
$q->whereJsonContains('automated_reports.recipients->users', $userId);
if ($groupId !== null) {
$q->orWhere(function (Builder $sub) use ($groupId): void {
$sub->where('automated_reports.type', AutomatedReportsService::TYPE_ASK_JIMINNY)
->whereJsonContains('automated_reports.groups', $groupId);
});
}
});
}
/**
* Get report IDs for a specific team
*
* @param Team $team
*
* @return \Illuminate\Support\Collection
*/
public function getReportIdsByTeam(Team $team): \Illuminate\Support\Collection
{
return AutomatedReport::where('team_id', $team->getId())->pluck('id');
}
/**
* Get all reports for a specific team
*
* @param Team $team
*
* @return Collection
*/
public function getReportsByTeam(Team $team): Collection
{
return AutomatedReport::where('team_id', $team->getId())->get();
}
/**
* Get all report results for a specific report
*
* @param AutomatedReport $report
*
* @return Collection
*/
public function getResultsByReport(AutomatedReport $report): Collection
{
return $this->getResultsByReportQuery($report)->get();
}
public function getResultsByReportQuery(AutomatedReport $report): Builder
{
return AutomatedReportResult::where('report_id', $report->getId());
}
public function getReportResultsQueryForRetention(Team $team, CarbonImmutable $retentionDate): Builder
{
$reportIds = $this->getReportIdsByTeam($team);
return AutomatedReportResult::query()->whereIn('report_id', $reportIds)
->whereRaw('IFNULL(generated_at, created_at) <= ?', [$retentionDate]);
}
/**
* @param int|null $teamId Optional team ID to filter results
*
* @return \Illuminate\Support\Collection<int, int> Collection of team IDs
*/
public function getTeamIdsWithReportsResults(?int $teamId = null): \Illuminate\Support\Collection
{
$query = DB::table('automated_reports')
->join('teams', 'automated_reports.team_id', '=', 'teams.id')
->select('teams.id')
->distinct();
if ($teamId !== null) {
$query->where('teams.id', $teamId);
}
return $query->pluck('teams.id');
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
36
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Component\DealInsights;
use Doctrine\DBAL\Connection;
use Generator;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\DB;
use Jiminny\Component\DealInsights\Forecast\DealData;
use Jiminny\Component\DealInsights\Forecast\DealsFilter;
use Jiminny\Component\DealInsights\QueryBuilder\QueryBuilder;
use Jiminny\Component\DealInsights\QueryBuilder\Visitor\QueryBuilderVisitorInterface;
use Jiminny\Contracts\Services\Crm\ServiceInterface;
use Jiminny\Exceptions\SocialAccountTokenInvalidException;
use Jiminny\Models\Activity;
use Jiminny\Models\Crm\Configuration;
use Jiminny\Models\Crm\Field;
use Jiminny\Models\Stage;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Models;
use Jiminny\Services\Crm\IntegrationApp\DTO\Utils\UrlGeneratorInterface;
use Jiminny\Services\Crm\ProviderRegistry;
use Jiminny\Traits\RequiresUUID;
use Illuminate\Database\Query\Builder;
use Illuminate\Database\Eloquent;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
class DealsRepository implements DealsRepositoryInterface
{
private Connection $connection;
private ProviderRegistry $providerRegistry;
/**
* @var QueryBuilderVisitorInterface[]
*/
private array $visitors = [];
/**
* @param QueryBuilderVisitorInterface[] $visitors
*/
public function __construct(Connection $connection, ProviderRegistry $crmProviderRegistry, array $visitors = [])
{
$this->connection = $connection;
$this->providerRegistry = $crmProviderRegistry;
foreach ($visitors as $visitor) {
$this->visitors[$visitor->getIdentifier()] = $visitor;
}
}
public function getDeals(CriteriaInterface $criteria): array
{
$context = $criteria->getContext();
$team = $context->getTeam();
$crmService = $this->getCrmService($team);
$qb = $this->createQueryBuilder(QueryBuilder::REALM_DEALS);
$qb = $this->getSearchSelectAndWhereClauses($qb);
$this->visit($qb, $criteria);
return $this->execute($team, $crmService, $qb);
}
public function getDeal(Team $team, int $id): array
{
$crmService = $this->getCrmService($team);
$qb = $this->createQueryBuilder(QueryBuilder::REALM_DEALS);
$qb = $this->getSearchSelectAndWhereClauses($qb);
$qb->andWhere('opp.id = :id')->setParameter('id', $id);
return $this->execute($team, $crmService, $qb);
}
public function getCrmFieldData(array $crmFields, int $crmId, array $opportunityIds = [])
{
$qb = new QueryBuilder($this->connection);
$qb
->select('f.id', 'f.crm_provider_id AS field_name', 'f.label', 'fd.object_id AS dealId', 'fd.value')
->from('crm_fields', 'f')
->join('f', 'crm_field_data', 'fd', 'fd.crm_field_id = f.id')
->where('f.crm_configuration_id = :crm')
->andWhere('f.object_type = :type')
->andWhere('fd.object_id IN (' . implode(',', $opportunityIds) . ')')
->orderBy('fd.object_id', 'ASC')
->addOrderBy('fd.updated_at', 'ASC')
->setParameter('type', Field::OBJECT_OPPORTUNITY)
->setParameter('crm', $crmId)
;
if (! empty($crmFields)) {
$fields = array_map(fn ($value): string => '"' . $value . '"', $crmFields);
$qb->andWhere('f.crm_provider_id IN (' . implode(',', $fields) . ')');
}
return $qb->executeQuery()->fetchAllAssociative();
}
public function getTotalsInDefaultCurrency(CriteriaInterface $criteria): array
{
$qb = $this->createQueryBuilder(QueryBuilder::REALM_TOTALS);
$qb
->select('SUM(opp.value) as total')
->addSelect('count(*) as `count`')
->where($qb->expr()->isNotNull('opp.user_id')) // we should not include deals owned by external users
->andWhere($qb->expr()->isNull('opp.deleted_at'))
;
$this->visit($qb, $criteria);
return $qb->executeQuery()->fetchAssociative();
}
public function getTotals(CriteriaInterface $criteria, string $defaultCurrency): array
{
$qb = $this->createQueryBuilder(QueryBuilder::REALM_TOTALS);
$qb
->select('COALESCE(opp.currency_code, "' . $defaultCurrency . '") AS currency')
->addSelect('SUM(opp.value) as total')
->addSelect('count(*) as `count`')
->where($qb->expr()->isNotNull('opp.user_id')) // we should not include deals owned by external users
->andWhere($qb->expr()->isNull('opp.deleted_at'))
->groupBy('currency')
;
$this->visit($qb, $criteria);
return $qb->executeQuery()->fetchAllAssociative();
}
public function getDealActivities(CriteriaInterface $criteria): array
{
$qb = Activity::with(['participants', 'user'])
->where('opportunity_id', $criteria->getOpportunityId())
->whereDate('actual_start_time', '>=', $criteria->getPeriod()->getStartDate())
->whereDate('actual_start_time', '<=', $criteria->getPeriod()->getEndDate())
->orderBy($criteria->getSortBy(), $criteria->getSortDirection())
;
// Should we filter activities by criteria? It's intended to filter deals.
return $qb->get()->all();
}
public function getStages(CriteriaInterface $criteria): array
{
$qb = new QueryBuilder($this->connection);
$qb
->select('id', 'label', 'sequence')
->from('stages', 's')
->where('crm_configuration_id = :crm_configuration_id')
->andWhere('type = :type')
->orderBy('sequence', 'ASC')
->setParameter('crm_configuration_id', $criteria->getContext()->getTeam()->getCrmConfiguration()->getId())
->setParameter('type', Stage::TYPE_OPPORTUNITY);
$result = [];
foreach ($qb->executeQuery()->fetchAllAssociative() as $row) {
$result[$row['id']] = [
'label' => $row['label'],
'sequence' => $row['sequence'],
];
}
return $result;
}
public function getConfigurationStages(Configuration $configuration): Collection
{
return $configuration
->stages()
->where('type', Stage::TYPE_OPPORTUNITY)
->get();
}
public function getPipelineData(Configuration $crm): array
{
$qb = new QueryBuilder($this->connection);
$provider = $crm->provider;
$qb
->select('s.label', 's.crm_provider_id', 's.sequence', 'bps.business_process_id AS pipeline_id')
->from('stages', 's')
->join('s', 'business_process_stages', 'bps', 's.id=bps.stage_id')
->where('s.crm_configuration_id = :crm_configuration_id')
->andWhere('s.type = :type')
->orderBy('bps.business_process_id', 'ASC')
->addOrderBy('s.sequence', 'ASC')
->setParameter('crm_configuration_id', $crm->id)
->setParameter('type', Stage::TYPE_OPPORTUNITY)
;
$result = [];
foreach ($qb->executeQuery()->fetchAllAssociative() as $row) {
$value = $provider === Configuration::PROVIDER_SALESFORCE ? $row['label'] : $row['crm_provider_id'];
$result[$row['pipeline_id']][] = [
'value' => $value,
'label' => $row['label'],
'sequence' => $row['sequence'],
];
}
return $result;
}
private function createQueryBuilder(string $realm): QueryBuilder
{
return (new QueryBuilder($this->connection))
->setRealm($realm)
->from('opportunities', 'opp')
->leftJoin('opp', 'record_types', 'rt', 'opp.record_type_id = rt.id')
->leftJoin('opp', 'users', 'usr', 'opp.user_id = usr.id')
->leftJoin('opp', 'accounts', 'acc', 'opp.account_id = acc.id')
;
}
/**
* Applies all applicable visitors and returns the IDs of the executed ones
*
* @return string[]
*/
private function visit(QueryBuilder $queryBuilder, CriteriaInterface $criteria): array
{
$queryVisitors = [];
foreach ($this->visitors as $visitor) {
if ($visitor->isSatisfiedBy($criteria, $queryBuilder->getRealm())) {
$visitor->visit($queryBuilder, $criteria);
$queryVisitors[] = $visitor->getIdentifier();
}
}
return $queryVisitors;
}
private function hydrateStages(array $deals): array
{
foreach ($this->fetchStages(array_keys($deals)) as $stage) {
$oppId = (int) $stage['opportunity_id'];
if (! isset($deals[$oppId])) {
continue; // or throw??!
}
$deals[$oppId]['stages'][] = [
'id' => $stage['stage_id'],
'name' => $stage['label'],
'enteredAt' => $stage['created_at'],
];
}
return $deals;
}
/**
* @param int[] $dealIds
*/
private function fetchStages(array $dealIds): array
{
if (empty($dealIds)) {
return [];
}
$qb = new QueryBuilder($this->connection);
$qb
->select('os.opportunity_id', 's.id AS stage_id', 's.label', 's.created_at')
->from('opportunity_stages', 'os')
->leftJoin('os', 'stages', 's', 'os.stage_id=s.id')
->where($qb->expr()->in('os.opportunity_id', $dealIds))
->orderBy('os.opportunity_id', 'ASC')
->addOrderBy('s.created_at', 'ASC')
;
return $qb->executeQuery()->fetchAllAssociative();
}
private function execute(Team $team, ServiceInterface $crmService, QueryBuilder $qb): array
{
$result = [];
foreach ($qb->executeQuery()->fetchAllAssociative() as $row) {
$data = [
'uuid' => RequiresUUID::toNormal($row['uuid']),
'name' => $row['name'],
'url' => $crmService->generateProviderUrl($row['opp_provider_id'], 'opportunity'),
'account' => [
'name' => $row['acc_name'],
'url' => $crmService->generateProviderUrl(
providerId: $row['acc_provider_id'],
objectType: $row['acc_is_internal'] ? 'internal-account' : 'account'
),
],
'owner' => null,
'rawValue' => [
'amount' => (float) $row['value'],
'currency' => $row['currency_code'],
],
'value' => formatOpportunityValue((float) $row['value'], $row['currency_code']),
'openDate' => $row['remotely_created_at'] ?? null,
'closeDate' => $row['close_date'] ?? null,
'stages' => [],
'currentPipelineId' => $row['pipeline_id'],
'currentStage' => [
'id' => $row['stage_id'],
'enteredAt' => $row['stage_updated_at'],
],
'currentStageUpdatedAt' => $row['stage_updated_at'],
'isClosed' => (bool) $row['is_closed'],
'isWon' => (bool) $row['is_won'],
];
if (isset($row['owner_uuid'])) {
$data['owner'] = [
'uuid' => RequiresUUID::toNormal($row['owner_uuid']),
'name' => $row['owner_name'],
'photoUrl' => $row['owner_photo'] === null
? null
: client_cdn($row['owner_photo'], $team),
'id' => $row['owner_id'],
'job' => $row['owner_job'],
];
}
$result[(int) $row['opp_id']] = $data;
}
return $this->hydrateStages($result);
}
private function getSearchSelectAndWhereClauses(QueryBuilder $queryBuilder): QueryBuilder
{
$qb = clone $queryBuilder;
$qb->leftJoin('usr', 'job_titles', 'jt', 'usr.job_title_id = jt.id');
$qb
->select(...[
'opp.id as opp_id',
'opp.uuid',
'opp.name',
'opp.value',
'opp.currency_code',
'opp.close_date',
'opp.remotely_created_at',
'opp.is_closed',
'opp.is_won',
])
->addSelect(...[
'usr.uuid as owner_uuid',
'usr.name AS owner_name',
'usr.photo_path as owner_photo',
'usr.id AS owner_id',
'jt.name as owner_job',
])
->addSelect('opp.stage_id', 'opp.stage_updated_at')
->addSelect(...[
'acc.name AS acc_name',
'acc.is_internal as acc_is_internal',
'opp.stage_updated_at',
'acc.crm_provider_id AS acc_provider_id',
'opp.crm_provider_id AS opp_provider_id',
])
->addSelect('rt.business_process_id AS pipeline_id')
->where($qb->expr()->isNotNull('opp.user_id')) // we should not display deals owned by external users
->andWhere($qb->expr()->isNull('opp.deleted_at'));
return $qb;
}
/**
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
* @throws SocialAccountTokenInvalidException
*/
private function getCrmService(Team $team): ServiceInterface
{
$crmService = $this->providerRegistry->get($team->crm->provider);
$crmService->setConfiguration($team->crm);
if ($crmService instanceof UrlGeneratorInterface) {
$crmService->setCrmUrlGenerator($team->crm);
}
return $crmService;
}
/**
*
* @return Generator<DealData>
*/
public function getForecastData(DealsFilter $filter): Generator
{
$opportunities = DB::query()
->select([
'o.value',
'o.close_date',
'o.currency_code',
'o.is_won',
'o.is_closed',
'o.probability',
'o.forecast_category',
])
->from('opportunities', 'o')
->join('users', 'users.id', '=', 'o.user_id')
->join('groups', 'groups.id', '=', 'users.group_id')
->where('users.team_id', $filter->getTeam()->getId())
->where('o.close_date', '>=', $filter->getStartDate())
->where('o.close_date', '<=', $filter->getEndDate())
->where('o.currency_code', $filter->getCurrency())
->where('o.deleted_at', '=', null)
;
$userUuidList = $filter->getUserUuidList();
if (! empty($userUuidList)) {
$userUuidList = array_map(fn ($uuid) => RequiresUUID::toOptimized($uuid), $userUuidList);
$opportunities->whereIn('users.uuid', $userUuidList);
}
$groupUuidList = $filter->getGroupUuidList();
if (! empty($groupUuidList)) {
$groupUuidList = array_map(fn ($uuid) => RequiresUUID::toOptimized($uuid), $groupUuidList);
$opportunities->whereIn('groups.uuid', $groupUuidList);
}
foreach ($opportunities->cursor() as $row) {
yield new DealData(
(float) $row->value,
$row->close_date,
! empty($row->is_won),
! empty($row->is_closed),
$row->probability ?: 0,
$row->forecast_category ?: '',
);
}
}
public function getUserOpportunitySubscriptions(User $user, array $opportunityIds): Collection
{
return $user->subscriptionSets()
->where(static function (Eloquent\Builder $query): void {
$query
->whereNull('expired_at')
->orWhere('expired_at', '>=', now());
})
->join('activity_subscriptions', function (Builder $join) use ($opportunityIds) {
$join
->on('subscription_set_id', '=', 'activity_subscription_sets.id');
$join
->where('followable_type', Models\Activity\Subscription::FOLLOWABLE_TYPE_OPPORTUNITY)
->whereIn('followable_id', $opportunityIds);
})
->pluck('followable_id');
}
}
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Selection does not form a correct expression","depth":2,"value":"Selection does not form a correct expression","help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":3,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":3,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":3,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20157-AJ-report-not-send-notification, menu","depth":5,"help_text":"Git Branch: JY-20157-AJ-report-not-send-notification","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"RequestGenerateAskJiminnyReportJobTest","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"16","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"7","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Repositories;\n\nuse Carbon\\CarbonImmutable;\nuse Illuminate\\Database\\Eloquent\\Builder;\nuse Illuminate\\Support\\Carbon;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Pagination\\LengthAwarePaginator;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\ReportSort;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\ReportSortDirection;\n\nclass AutomatedReportsRepository\n{\n /**\n * Create a new automated report\n *\n * @param array $data\n *\n * @return AutomatedReport\n */\n public function create(array $data): AutomatedReport\n {\n return AutomatedReport::create($data);\n }\n\n /**\n * Find an automated report by UUID\n *\n * @param string $uuid\n *\n * @return AutomatedReport|null\n */\n public function findByUuid(string $uuid): ?AutomatedReport\n {\n return AutomatedReport::where('uuid', AutomatedReport::toOptimized($uuid))->first();\n }\n\n public function findByIdOrUuid(string $idOrUuid): ?AutomatedReport\n {\n if (is_numeric($idOrUuid)) {\n return AutomatedReport::find((int) $idOrUuid);\n }\n\n return AutomatedReport::where('uuid', AutomatedReport::toOptimized($idOrUuid))->first();\n }\n\n /**\n * Retrieve all standard (non-Ask Jiminny) automated reports.\n *\n * @param string $sortColumn The column to sort by. Allowed values: 'created_by', 'created_at'. Defaults to 'created_at'.\n * @param string $sortDirection The sort direction. Allowed values: 'asc', 'desc'. Defaults to 'desc'.\n *\n * @return Collection<AutomatedReport>\n */\n public function getAllStandardReports(\n string $sortColumn = 'created_at',\n string $sortDirection = 'desc'\n ): Collection {\n return $this->buildSortedQuery($sortColumn, $sortDirection)\n ->whereNot('type', AutomatedReportsService::TYPE_ASK_JIMINNY)\n ->get();\n }\n\n /**\n * Retrieve all Ask Jiminny reports created by the given user.\n *\n * @param User $user The user whose reports to retrieve.\n * @param string $sortColumn The column to sort by. Allowed values: 'created_by', 'created_at'. Defaults to 'created_at'.\n * @param string $sortDirection The sort direction. Allowed values: 'asc', 'desc'. Defaults to 'desc'.\n *\n * @return Collection<AutomatedReport>\n */\n public function getAskJiminnyReportsByUser(\n User $user,\n string $sortColumn = 'created_at',\n string $sortDirection = 'desc'\n ): Collection {\n return $this->buildSortedQuery($sortColumn, $sortDirection)\n ->where('type', AutomatedReportsService::TYPE_ASK_JIMINNY)\n ->where('created_by', $user->getId())\n ->get();\n }\n\n private function buildSortedQuery(string $sortColumn, string $sortDirection): \\Illuminate\\Database\\Eloquent\\Builder\n {\n $allowedColumns = ['created_by', 'created_at'];\n if (! in_array($sortColumn, $allowedColumns)) {\n $sortColumn = 'created_at';\n }\n\n $sortDirection = strtolower($sortDirection) === 'asc' ? 'asc' : 'desc';\n\n $query = AutomatedReport::query()->with(['creator', 'team']);\n\n if ($sortColumn === 'created_by') {\n $query->leftJoin('users', 'users.id', '=', 'automated_reports.created_by')\n ->orderByRaw(\"users.name COLLATE utf8mb4_unicode_ci {$sortDirection}\")\n ->select('automated_reports.*');\n } else {\n $query->orderBy($sortColumn, $sortDirection);\n }\n\n return $query;\n }\n\n /**\n * Get all active Ask Jiminny reports whose expiry date has passed.\n *\n * @return Collection<AutomatedReport>\n */\n public function getExpiredActiveAskJiminnyReports(): Collection\n {\n return AutomatedReport::where('status', true)\n ->where('type', AutomatedReportsService::TYPE_ASK_JIMINNY)\n ->whereNotNull('expires_at')\n ->where('expires_at', '<', now()->toDateString())\n ->get();\n }\n\n /**\n * Get all active and enabled reports with active teams for the specified frequency.\n *\n * @param string $frequency\n *\n * @return Collection<AutomatedReport>\n */\n public function getActiveReportsByFrequency(string $frequency): Collection\n {\n return AutomatedReport::where('automated_reports.status', true)\n ->where('automated_reports.frequency', $frequency)\n ->join('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->where('teams.status', Team::STATUS_ACTIVE)\n ->where(function ($query) {\n $query->whereNull('automated_reports.expires_at')\n ->orWhere('automated_reports.expires_at', '>=', now()->toDateString());\n })\n ->select('automated_reports.*')\n ->get();\n }\n\n /**\n * Update an automated report\n *\n * @param AutomatedReport $report\n * @param array $data\n *\n * @return AutomatedReport\n */\n public function update(AutomatedReport $report, array $data): AutomatedReport\n {\n $report->update($data);\n\n return $report;\n }\n\n /**\n * Create a new automated report result.\n *\n * @param array $data The data to create the automated report result with.\n *\n * @return AutomatedReportResult The newly created automated report result.\n */\n public function createResult(array $data): AutomatedReportResult\n {\n return AutomatedReportResult::create($data);\n }\n\n /**\n * Find an automated report result by UUID.\n *\n * @param string $uuid The UUID to find the automated report result with.\n *\n * @return AutomatedReportResult|null The automated report result if found, otherwise null.\n */\n public function findResultByUuid(string $uuid): ?AutomatedReportResult\n {\n return AutomatedReportResult::where('uuid', AutomatedReportResult::toOptimized($uuid))->first();\n }\n\n public function findResultByUuidForUser(string $uuid, User $user): ?AutomatedReportResult\n {\n return AutomatedReportResult::query()\n ->where('uuid', AutomatedReportResult::toOptimized($uuid))\n ->whereHas('report', static function ($query) use ($user): void {\n $query->where('team_id', $user->getTeamId())\n ->where('created_by', $user->getId());\n })\n ->first();\n }\n\n public function findChildResult(AutomatedReportResult $result, string $type): ?AutomatedReportResult\n {\n return AutomatedReportResult::query()\n ->where('parent_id', $result->getId())\n ->where('media_type', $type)\n ->first();\n }\n\n public function findLatestDefaultOrFailedResult(AutomatedReport $report): ?AutomatedReportResult\n {\n return AutomatedReportResult::query()\n ->where('report_id', $report->getId())\n ->whereIn('status', [AutomatedReportResult::STATUS_DEFAULT, AutomatedReportResult::STATUS_FAILED])\n ->latest()\n ->first();\n }\n\n public function getGeneratedNotSentResults(): Collection\n {\n return AutomatedReportResult::query()\n ->whereNotNull('generated_at')\n ->whereNull('sent_at')\n ->where('status', AutomatedReportResult::STATUS_GENERATED)\n ->whereHas('report')\n ->with('report')\n ->get();\n }\n\n public function getPaginatedUserReports(\n User $user,\n ReportSort $sort,\n ReportSortDirection $sortDirection,\n int $resultsPerPage,\n int $page,\n ?Carbon $fromDate,\n ?Carbon $toDate,\n array $teamIds,\n array $reportTypes,\n ?string $name,\n ): LengthAwarePaginator {\n $query = AutomatedReportResult::query()\n ->whereNotNull('automated_report_results.generated_at')\n ->join('automated_reports', 'automated_report_results.report_id', '=', 'automated_reports.id')\n ->where(fn (Builder $q) => $this->applyUserAccessScope($q, $user))\n ->orderByRaw(\"$sort->value COLLATE utf8mb4_unicode_ci {$sortDirection->value}\")\n ->select('automated_report_results.*')\n ->with('report.team');\n\n if ($fromDate !== null && $toDate !== null) {\n $query->whereBetween('generated_at', [$fromDate, $toDate]);\n }\n\n if (! empty($teamIds)) {\n $query->where(function ($q) use ($teamIds) {\n foreach ($teamIds as $id) {\n $q->orWhereJsonContains('automated_reports.groups', $id);\n }\n });\n }\n\n if (! empty($reportTypes)) {\n $query->whereIn('automated_reports.type', $reportTypes);\n }\n\n if (! empty($name)) {\n $query->whereLike('name', \"%$name%\");\n }\n\n return $query->paginate($resultsPerPage, ['*'], 'page', $page);\n }\n\n public function countUserReports(User $user): int\n {\n return AutomatedReportResult::query()\n ->whereNotNull('generated_at')\n ->whereNotNull('sent_at')\n ->whereHas('report', function ($q) use ($user) {\n $q->where('team_id', $user->getTeamId())\n ->whereJsonContains('recipients->users', $user->getId());\n })\n ->count();\n }\n\n /**\n * Restrict a query on the automated_reports table to reports the given user is allowed to see.\n *\n * Matches the customer-facing audience:\n * - explicit user recipients (recipients.users)\n * - members of any of the report's groups (Ask Jiminny reports)\n */\n private function applyUserAccessScope(Builder $query, User $user): void\n {\n $userId = $user->getId();\n $groupId = $user->getGroupId();\n\n $query\n ->where('automated_reports.team_id', $user->getTeamId())\n ->where(function (Builder $q) use ($userId, $groupId): void {\n $q->whereJsonContains('automated_reports.recipients->users', $userId);\n\n if ($groupId !== null) {\n $q->orWhere(function (Builder $sub) use ($groupId): void {\n $sub->where('automated_reports.type', AutomatedReportsService::TYPE_ASK_JIMINNY)\n ->whereJsonContains('automated_reports.groups', $groupId);\n });\n }\n });\n }\n\n /**\n * Get report IDs for a specific team\n *\n * @param Team $team\n *\n * @return \\Illuminate\\Support\\Collection\n */\n public function getReportIdsByTeam(Team $team): \\Illuminate\\Support\\Collection\n {\n return AutomatedReport::where('team_id', $team->getId())->pluck('id');\n }\n\n /**\n * Get all reports for a specific team\n *\n * @param Team $team\n *\n * @return Collection\n */\n public function getReportsByTeam(Team $team): Collection\n {\n return AutomatedReport::where('team_id', $team->getId())->get();\n }\n\n /**\n * Get all report results for a specific report\n *\n * @param AutomatedReport $report\n *\n * @return Collection\n */\n public function getResultsByReport(AutomatedReport $report): Collection\n {\n return $this->getResultsByReportQuery($report)->get();\n }\n\n public function getResultsByReportQuery(AutomatedReport $report): Builder\n {\n return AutomatedReportResult::where('report_id', $report->getId());\n }\n\n public function getReportResultsQueryForRetention(Team $team, CarbonImmutable $retentionDate): Builder\n {\n $reportIds = $this->getReportIdsByTeam($team);\n\n return AutomatedReportResult::query()->whereIn('report_id', $reportIds)\n ->whereRaw('IFNULL(generated_at, created_at) <= ?', [$retentionDate]);\n }\n\n /**\n * @param int|null $teamId Optional team ID to filter results\n *\n * @return \\Illuminate\\Support\\Collection<int, int> Collection of team IDs\n */\n public function getTeamIdsWithReportsResults(?int $teamId = null): \\Illuminate\\Support\\Collection\n {\n $query = DB::table('automated_reports')\n ->join('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->select('teams.id')\n ->distinct();\n\n if ($teamId !== null) {\n $query->where('teams.id', $teamId);\n }\n\n return $query->pluck('teams.id');\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Repositories;\n\nuse Carbon\\CarbonImmutable;\nuse Illuminate\\Database\\Eloquent\\Builder;\nuse Illuminate\\Support\\Carbon;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Pagination\\LengthAwarePaginator;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\ReportSort;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\ReportSortDirection;\n\nclass AutomatedReportsRepository\n{\n /**\n * Create a new automated report\n *\n * @param array $data\n *\n * @return AutomatedReport\n */\n public function create(array $data): AutomatedReport\n {\n return AutomatedReport::create($data);\n }\n\n /**\n * Find an automated report by UUID\n *\n * @param string $uuid\n *\n * @return AutomatedReport|null\n */\n public function findByUuid(string $uuid): ?AutomatedReport\n {\n return AutomatedReport::where('uuid', AutomatedReport::toOptimized($uuid))->first();\n }\n\n public function findByIdOrUuid(string $idOrUuid): ?AutomatedReport\n {\n if (is_numeric($idOrUuid)) {\n return AutomatedReport::find((int) $idOrUuid);\n }\n\n return AutomatedReport::where('uuid', AutomatedReport::toOptimized($idOrUuid))->first();\n }\n\n /**\n * Retrieve all standard (non-Ask Jiminny) automated reports.\n *\n * @param string $sortColumn The column to sort by. Allowed values: 'created_by', 'created_at'. Defaults to 'created_at'.\n * @param string $sortDirection The sort direction. Allowed values: 'asc', 'desc'. Defaults to 'desc'.\n *\n * @return Collection<AutomatedReport>\n */\n public function getAllStandardReports(\n string $sortColumn = 'created_at',\n string $sortDirection = 'desc'\n ): Collection {\n return $this->buildSortedQuery($sortColumn, $sortDirection)\n ->whereNot('type', AutomatedReportsService::TYPE_ASK_JIMINNY)\n ->get();\n }\n\n /**\n * Retrieve all Ask Jiminny reports created by the given user.\n *\n * @param User $user The user whose reports to retrieve.\n * @param string $sortColumn The column to sort by. Allowed values: 'created_by', 'created_at'. Defaults to 'created_at'.\n * @param string $sortDirection The sort direction. Allowed values: 'asc', 'desc'. Defaults to 'desc'.\n *\n * @return Collection<AutomatedReport>\n */\n public function getAskJiminnyReportsByUser(\n User $user,\n string $sortColumn = 'created_at',\n string $sortDirection = 'desc'\n ): Collection {\n return $this->buildSortedQuery($sortColumn, $sortDirection)\n ->where('type', AutomatedReportsService::TYPE_ASK_JIMINNY)\n ->where('created_by', $user->getId())\n ->get();\n }\n\n private function buildSortedQuery(string $sortColumn, string $sortDirection): \\Illuminate\\Database\\Eloquent\\Builder\n {\n $allowedColumns = ['created_by', 'created_at'];\n if (! in_array($sortColumn, $allowedColumns)) {\n $sortColumn = 'created_at';\n }\n\n $sortDirection = strtolower($sortDirection) === 'asc' ? 'asc' : 'desc';\n\n $query = AutomatedReport::query()->with(['creator', 'team']);\n\n if ($sortColumn === 'created_by') {\n $query->leftJoin('users', 'users.id', '=', 'automated_reports.created_by')\n ->orderByRaw(\"users.name COLLATE utf8mb4_unicode_ci {$sortDirection}\")\n ->select('automated_reports.*');\n } else {\n $query->orderBy($sortColumn, $sortDirection);\n }\n\n return $query;\n }\n\n /**\n * Get all active Ask Jiminny reports whose expiry date has passed.\n *\n * @return Collection<AutomatedReport>\n */\n public function getExpiredActiveAskJiminnyReports(): Collection\n {\n return AutomatedReport::where('status', true)\n ->where('type', AutomatedReportsService::TYPE_ASK_JIMINNY)\n ->whereNotNull('expires_at')\n ->where('expires_at', '<', now()->toDateString())\n ->get();\n }\n\n /**\n * Get all active and enabled reports with active teams for the specified frequency.\n *\n * @param string $frequency\n *\n * @return Collection<AutomatedReport>\n */\n public function getActiveReportsByFrequency(string $frequency): Collection\n {\n return AutomatedReport::where('automated_reports.status', true)\n ->where('automated_reports.frequency', $frequency)\n ->join('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->where('teams.status', Team::STATUS_ACTIVE)\n ->where(function ($query) {\n $query->whereNull('automated_reports.expires_at')\n ->orWhere('automated_reports.expires_at', '>=', now()->toDateString());\n })\n ->select('automated_reports.*')\n ->get();\n }\n\n /**\n * Update an automated report\n *\n * @param AutomatedReport $report\n * @param array $data\n *\n * @return AutomatedReport\n */\n public function update(AutomatedReport $report, array $data): AutomatedReport\n {\n $report->update($data);\n\n return $report;\n }\n\n /**\n * Create a new automated report result.\n *\n * @param array $data The data to create the automated report result with.\n *\n * @return AutomatedReportResult The newly created automated report result.\n */\n public function createResult(array $data): AutomatedReportResult\n {\n return AutomatedReportResult::create($data);\n }\n\n /**\n * Find an automated report result by UUID.\n *\n * @param string $uuid The UUID to find the automated report result with.\n *\n * @return AutomatedReportResult|null The automated report result if found, otherwise null.\n */\n public function findResultByUuid(string $uuid): ?AutomatedReportResult\n {\n return AutomatedReportResult::where('uuid', AutomatedReportResult::toOptimized($uuid))->first();\n }\n\n public function findResultByUuidForUser(string $uuid, User $user): ?AutomatedReportResult\n {\n return AutomatedReportResult::query()\n ->where('uuid', AutomatedReportResult::toOptimized($uuid))\n ->whereHas('report', static function ($query) use ($user): void {\n $query->where('team_id', $user->getTeamId())\n ->where('created_by', $user->getId());\n })\n ->first();\n }\n\n public function findChildResult(AutomatedReportResult $result, string $type): ?AutomatedReportResult\n {\n return AutomatedReportResult::query()\n ->where('parent_id', $result->getId())\n ->where('media_type', $type)\n ->first();\n }\n\n public function findLatestDefaultOrFailedResult(AutomatedReport $report): ?AutomatedReportResult\n {\n return AutomatedReportResult::query()\n ->where('report_id', $report->getId())\n ->whereIn('status', [AutomatedReportResult::STATUS_DEFAULT, AutomatedReportResult::STATUS_FAILED])\n ->latest()\n ->first();\n }\n\n public function getGeneratedNotSentResults(): Collection\n {\n return AutomatedReportResult::query()\n ->whereNotNull('generated_at')\n ->whereNull('sent_at')\n ->where('status', AutomatedReportResult::STATUS_GENERATED)\n ->whereHas('report')\n ->with('report')\n ->get();\n }\n\n public function getPaginatedUserReports(\n User $user,\n ReportSort $sort,\n ReportSortDirection $sortDirection,\n int $resultsPerPage,\n int $page,\n ?Carbon $fromDate,\n ?Carbon $toDate,\n array $teamIds,\n array $reportTypes,\n ?string $name,\n ): LengthAwarePaginator {\n $query = AutomatedReportResult::query()\n ->whereNotNull('automated_report_results.generated_at')\n ->join('automated_reports', 'automated_report_results.report_id', '=', 'automated_reports.id')\n ->where(fn (Builder $q) => $this->applyUserAccessScope($q, $user))\n ->orderByRaw(\"$sort->value COLLATE utf8mb4_unicode_ci {$sortDirection->value}\")\n ->select('automated_report_results.*')\n ->with('report.team');\n\n if ($fromDate !== null && $toDate !== null) {\n $query->whereBetween('generated_at', [$fromDate, $toDate]);\n }\n\n if (! empty($teamIds)) {\n $query->where(function ($q) use ($teamIds) {\n foreach ($teamIds as $id) {\n $q->orWhereJsonContains('automated_reports.groups', $id);\n }\n });\n }\n\n if (! empty($reportTypes)) {\n $query->whereIn('automated_reports.type', $reportTypes);\n }\n\n if (! empty($name)) {\n $query->whereLike('name', \"%$name%\");\n }\n\n return $query->paginate($resultsPerPage, ['*'], 'page', $page);\n }\n\n public function countUserReports(User $user): int\n {\n return AutomatedReportResult::query()\n ->whereNotNull('generated_at')\n ->whereNotNull('sent_at')\n ->whereHas('report', function ($q) use ($user) {\n $q->where('team_id', $user->getTeamId())\n ->whereJsonContains('recipients->users', $user->getId());\n })\n ->count();\n }\n\n /**\n * Restrict a query on the automated_reports table to reports the given user is allowed to see.\n *\n * Matches the customer-facing audience:\n * - explicit user recipients (recipients.users)\n * - members of any of the report's groups (Ask Jiminny reports)\n */\n private function applyUserAccessScope(Builder $query, User $user): void\n {\n $userId = $user->getId();\n $groupId = $user->getGroupId();\n\n $query\n ->where('automated_reports.team_id', $user->getTeamId())\n ->where(function (Builder $q) use ($userId, $groupId): void {\n $q->whereJsonContains('automated_reports.recipients->users', $userId);\n\n if ($groupId !== null) {\n $q->orWhere(function (Builder $sub) use ($groupId): void {\n $sub->where('automated_reports.type', AutomatedReportsService::TYPE_ASK_JIMINNY)\n ->whereJsonContains('automated_reports.groups', $groupId);\n });\n }\n });\n }\n\n /**\n * Get report IDs for a specific team\n *\n * @param Team $team\n *\n * @return \\Illuminate\\Support\\Collection\n */\n public function getReportIdsByTeam(Team $team): \\Illuminate\\Support\\Collection\n {\n return AutomatedReport::where('team_id', $team->getId())->pluck('id');\n }\n\n /**\n * Get all reports for a specific team\n *\n * @param Team $team\n *\n * @return Collection\n */\n public function getReportsByTeam(Team $team): Collection\n {\n return AutomatedReport::where('team_id', $team->getId())->get();\n }\n\n /**\n * Get all report results for a specific report\n *\n * @param AutomatedReport $report\n *\n * @return Collection\n */\n public function getResultsByReport(AutomatedReport $report): Collection\n {\n return $this->getResultsByReportQuery($report)->get();\n }\n\n public function getResultsByReportQuery(AutomatedReport $report): Builder\n {\n return AutomatedReportResult::where('report_id', $report->getId());\n }\n\n public function getReportResultsQueryForRetention(Team $team, CarbonImmutable $retentionDate): Builder\n {\n $reportIds = $this->getReportIdsByTeam($team);\n\n return AutomatedReportResult::query()->whereIn('report_id', $reportIds)\n ->whereRaw('IFNULL(generated_at, created_at) <= ?', [$retentionDate]);\n }\n\n /**\n * @param int|null $teamId Optional team ID to filter results\n *\n * @return \\Illuminate\\Support\\Collection<int, int> Collection of team IDs\n */\n public function getTeamIdsWithReportsResults(?int $teamId = null): \\Illuminate\\Support\\Collection\n {\n $query = DB::table('automated_reports')\n ->join('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->select('teams.id')\n ->distinct();\n\n if ($teamId !== null) {\n $query->where('teams.id', $teamId);\n }\n\n return $query->pluck('teams.id');\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"36","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Component\\DealInsights;\n\nuse Doctrine\\DBAL\\Connection;\nuse Generator;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Component\\DealInsights\\Forecast\\DealData;\nuse Jiminny\\Component\\DealInsights\\Forecast\\DealsFilter;\nuse Jiminny\\Component\\DealInsights\\QueryBuilder\\QueryBuilder;\nuse Jiminny\\Component\\DealInsights\\QueryBuilder\\Visitor\\QueryBuilderVisitorInterface;\nuse Jiminny\\Contracts\\Services\\Crm\\ServiceInterface;\nuse Jiminny\\Exceptions\\SocialAccountTokenInvalidException;\nuse Jiminny\\Models\\Activity;\nuse Jiminny\\Models\\Crm\\Configuration;\nuse Jiminny\\Models\\Crm\\Field;\nuse Jiminny\\Models\\Stage;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Models;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\Utils\\UrlGeneratorInterface;\nuse Jiminny\\Services\\Crm\\ProviderRegistry;\nuse Jiminny\\Traits\\RequiresUUID;\nuse Illuminate\\Database\\Query\\Builder;\nuse Illuminate\\Database\\Eloquent;\nuse Psr\\Container\\ContainerExceptionInterface;\nuse Psr\\Container\\NotFoundExceptionInterface;\n\nclass DealsRepository implements DealsRepositoryInterface\n{\n private Connection $connection;\n\n private ProviderRegistry $providerRegistry;\n\n /**\n * @var QueryBuilderVisitorInterface[]\n */\n private array $visitors = [];\n\n /**\n * @param QueryBuilderVisitorInterface[] $visitors\n */\n public function __construct(Connection $connection, ProviderRegistry $crmProviderRegistry, array $visitors = [])\n {\n $this->connection = $connection;\n $this->providerRegistry = $crmProviderRegistry;\n\n foreach ($visitors as $visitor) {\n $this->visitors[$visitor->getIdentifier()] = $visitor;\n }\n }\n\n public function getDeals(CriteriaInterface $criteria): array\n {\n $context = $criteria->getContext();\n $team = $context->getTeam();\n $crmService = $this->getCrmService($team);\n\n $qb = $this->createQueryBuilder(QueryBuilder::REALM_DEALS);\n $qb = $this->getSearchSelectAndWhereClauses($qb);\n\n $this->visit($qb, $criteria);\n\n return $this->execute($team, $crmService, $qb);\n }\n\n public function getDeal(Team $team, int $id): array\n {\n $crmService = $this->getCrmService($team);\n\n $qb = $this->createQueryBuilder(QueryBuilder::REALM_DEALS);\n $qb = $this->getSearchSelectAndWhereClauses($qb);\n $qb->andWhere('opp.id = :id')->setParameter('id', $id);\n\n return $this->execute($team, $crmService, $qb);\n }\n\n public function getCrmFieldData(array $crmFields, int $crmId, array $opportunityIds = [])\n {\n $qb = new QueryBuilder($this->connection);\n\n $qb\n ->select('f.id', 'f.crm_provider_id AS field_name', 'f.label', 'fd.object_id AS dealId', 'fd.value')\n ->from('crm_fields', 'f')\n ->join('f', 'crm_field_data', 'fd', 'fd.crm_field_id = f.id')\n ->where('f.crm_configuration_id = :crm')\n ->andWhere('f.object_type = :type')\n ->andWhere('fd.object_id IN (' . implode(',', $opportunityIds) . ')')\n ->orderBy('fd.object_id', 'ASC')\n ->addOrderBy('fd.updated_at', 'ASC')\n\n ->setParameter('type', Field::OBJECT_OPPORTUNITY)\n ->setParameter('crm', $crmId)\n ;\n\n if (! empty($crmFields)) {\n $fields = array_map(fn ($value): string => '\"' . $value . '\"', $crmFields);\n $qb->andWhere('f.crm_provider_id IN (' . implode(',', $fields) . ')');\n }\n\n return $qb->executeQuery()->fetchAllAssociative();\n }\n\n public function getTotalsInDefaultCurrency(CriteriaInterface $criteria): array\n {\n $qb = $this->createQueryBuilder(QueryBuilder::REALM_TOTALS);\n\n $qb\n ->select('SUM(opp.value) as total')\n ->addSelect('count(*) as `count`')\n ->where($qb->expr()->isNotNull('opp.user_id')) // we should not include deals owned by external users\n ->andWhere($qb->expr()->isNull('opp.deleted_at'))\n ;\n\n $this->visit($qb, $criteria);\n\n return $qb->executeQuery()->fetchAssociative();\n }\n\n public function getTotals(CriteriaInterface $criteria, string $defaultCurrency): array\n {\n $qb = $this->createQueryBuilder(QueryBuilder::REALM_TOTALS);\n\n $qb\n ->select('COALESCE(opp.currency_code, \"' . $defaultCurrency . '\") AS currency')\n ->addSelect('SUM(opp.value) as total')\n ->addSelect('count(*) as `count`')\n ->where($qb->expr()->isNotNull('opp.user_id')) // we should not include deals owned by external users\n ->andWhere($qb->expr()->isNull('opp.deleted_at'))\n ->groupBy('currency')\n ;\n\n $this->visit($qb, $criteria);\n\n return $qb->executeQuery()->fetchAllAssociative();\n }\n\n public function getDealActivities(CriteriaInterface $criteria): array\n {\n $qb = Activity::with(['participants', 'user'])\n ->where('opportunity_id', $criteria->getOpportunityId())\n ->whereDate('actual_start_time', '>=', $criteria->getPeriod()->getStartDate())\n ->whereDate('actual_start_time', '<=', $criteria->getPeriod()->getEndDate())\n ->orderBy($criteria->getSortBy(), $criteria->getSortDirection())\n ;\n\n // Should we filter activities by criteria? It's intended to filter deals.\n\n return $qb->get()->all();\n }\n\n public function getStages(CriteriaInterface $criteria): array\n {\n $qb = new QueryBuilder($this->connection);\n\n $qb\n ->select('id', 'label', 'sequence')\n ->from('stages', 's')\n ->where('crm_configuration_id = :crm_configuration_id')\n ->andWhere('type = :type')\n ->orderBy('sequence', 'ASC')\n\n ->setParameter('crm_configuration_id', $criteria->getContext()->getTeam()->getCrmConfiguration()->getId())\n ->setParameter('type', Stage::TYPE_OPPORTUNITY);\n\n $result = [];\n foreach ($qb->executeQuery()->fetchAllAssociative() as $row) {\n $result[$row['id']] = [\n 'label' => $row['label'],\n 'sequence' => $row['sequence'],\n ];\n }\n\n return $result;\n }\n\n public function getConfigurationStages(Configuration $configuration): Collection\n {\n return $configuration\n ->stages()\n ->where('type', Stage::TYPE_OPPORTUNITY)\n ->get();\n }\n\n public function getPipelineData(Configuration $crm): array\n {\n $qb = new QueryBuilder($this->connection);\n $provider = $crm->provider;\n\n $qb\n ->select('s.label', 's.crm_provider_id', 's.sequence', 'bps.business_process_id AS pipeline_id')\n ->from('stages', 's')\n ->join('s', 'business_process_stages', 'bps', 's.id=bps.stage_id')\n ->where('s.crm_configuration_id = :crm_configuration_id')\n ->andWhere('s.type = :type')\n ->orderBy('bps.business_process_id', 'ASC')\n ->addOrderBy('s.sequence', 'ASC')\n\n ->setParameter('crm_configuration_id', $crm->id)\n ->setParameter('type', Stage::TYPE_OPPORTUNITY)\n ;\n\n $result = [];\n foreach ($qb->executeQuery()->fetchAllAssociative() as $row) {\n $value = $provider === Configuration::PROVIDER_SALESFORCE ? $row['label'] : $row['crm_provider_id'];\n $result[$row['pipeline_id']][] = [\n 'value' => $value,\n 'label' => $row['label'],\n 'sequence' => $row['sequence'],\n ];\n }\n\n return $result;\n }\n\n private function createQueryBuilder(string $realm): QueryBuilder\n {\n return (new QueryBuilder($this->connection))\n ->setRealm($realm)\n ->from('opportunities', 'opp')\n ->leftJoin('opp', 'record_types', 'rt', 'opp.record_type_id = rt.id')\n ->leftJoin('opp', 'users', 'usr', 'opp.user_id = usr.id')\n ->leftJoin('opp', 'accounts', 'acc', 'opp.account_id = acc.id')\n ;\n }\n\n /**\n * Applies all applicable visitors and returns the IDs of the executed ones\n *\n * @return string[]\n */\n private function visit(QueryBuilder $queryBuilder, CriteriaInterface $criteria): array\n {\n $queryVisitors = [];\n\n foreach ($this->visitors as $visitor) {\n if ($visitor->isSatisfiedBy($criteria, $queryBuilder->getRealm())) {\n $visitor->visit($queryBuilder, $criteria);\n\n $queryVisitors[] = $visitor->getIdentifier();\n }\n }\n\n return $queryVisitors;\n }\n\n private function hydrateStages(array $deals): array\n {\n foreach ($this->fetchStages(array_keys($deals)) as $stage) {\n $oppId = (int) $stage['opportunity_id'];\n\n if (! isset($deals[$oppId])) {\n continue; // or throw??!\n }\n\n $deals[$oppId]['stages'][] = [\n 'id' => $stage['stage_id'],\n 'name' => $stage['label'],\n 'enteredAt' => $stage['created_at'],\n ];\n }\n\n return $deals;\n }\n\n /**\n * @param int[] $dealIds\n */\n private function fetchStages(array $dealIds): array\n {\n if (empty($dealIds)) {\n return [];\n }\n\n $qb = new QueryBuilder($this->connection);\n\n $qb\n ->select('os.opportunity_id', 's.id AS stage_id', 's.label', 's.created_at')\n ->from('opportunity_stages', 'os')\n ->leftJoin('os', 'stages', 's', 'os.stage_id=s.id')\n ->where($qb->expr()->in('os.opportunity_id', $dealIds))\n ->orderBy('os.opportunity_id', 'ASC')\n ->addOrderBy('s.created_at', 'ASC')\n ;\n\n return $qb->executeQuery()->fetchAllAssociative();\n }\n\n private function execute(Team $team, ServiceInterface $crmService, QueryBuilder $qb): array\n {\n $result = [];\n\n foreach ($qb->executeQuery()->fetchAllAssociative() as $row) {\n $data = [\n 'uuid' => RequiresUUID::toNormal($row['uuid']),\n 'name' => $row['name'],\n 'url' => $crmService->generateProviderUrl($row['opp_provider_id'], 'opportunity'),\n 'account' => [\n 'name' => $row['acc_name'],\n 'url' => $crmService->generateProviderUrl(\n providerId: $row['acc_provider_id'],\n objectType: $row['acc_is_internal'] ? 'internal-account' : 'account'\n ),\n ],\n 'owner' => null,\n 'rawValue' => [\n 'amount' => (float) $row['value'],\n 'currency' => $row['currency_code'],\n ],\n 'value' => formatOpportunityValue((float) $row['value'], $row['currency_code']),\n 'openDate' => $row['remotely_created_at'] ?? null,\n 'closeDate' => $row['close_date'] ?? null,\n 'stages' => [],\n 'currentPipelineId' => $row['pipeline_id'],\n 'currentStage' => [\n 'id' => $row['stage_id'],\n 'enteredAt' => $row['stage_updated_at'],\n ],\n 'currentStageUpdatedAt' => $row['stage_updated_at'],\n 'isClosed' => (bool) $row['is_closed'],\n 'isWon' => (bool) $row['is_won'],\n ];\n\n if (isset($row['owner_uuid'])) {\n $data['owner'] = [\n 'uuid' => RequiresUUID::toNormal($row['owner_uuid']),\n 'name' => $row['owner_name'],\n 'photoUrl' => $row['owner_photo'] === null\n ? null\n : client_cdn($row['owner_photo'], $team),\n 'id' => $row['owner_id'],\n 'job' => $row['owner_job'],\n ];\n }\n\n $result[(int) $row['opp_id']] = $data;\n }\n\n return $this->hydrateStages($result);\n }\n\n private function getSearchSelectAndWhereClauses(QueryBuilder $queryBuilder): QueryBuilder\n {\n $qb = clone $queryBuilder;\n $qb->leftJoin('usr', 'job_titles', 'jt', 'usr.job_title_id = jt.id');\n\n $qb\n ->select(...[\n 'opp.id as opp_id',\n 'opp.uuid',\n 'opp.name',\n 'opp.value',\n 'opp.currency_code',\n 'opp.close_date',\n 'opp.remotely_created_at',\n 'opp.is_closed',\n 'opp.is_won',\n ])\n ->addSelect(...[\n 'usr.uuid as owner_uuid',\n 'usr.name AS owner_name',\n 'usr.photo_path as owner_photo',\n 'usr.id AS owner_id',\n 'jt.name as owner_job',\n ])\n ->addSelect('opp.stage_id', 'opp.stage_updated_at')\n ->addSelect(...[\n 'acc.name AS acc_name',\n 'acc.is_internal as acc_is_internal',\n 'opp.stage_updated_at',\n 'acc.crm_provider_id AS acc_provider_id',\n 'opp.crm_provider_id AS opp_provider_id',\n ])\n ->addSelect('rt.business_process_id AS pipeline_id')\n\n ->where($qb->expr()->isNotNull('opp.user_id')) // we should not display deals owned by external users\n ->andWhere($qb->expr()->isNull('opp.deleted_at'));\n\n return $qb;\n }\n\n /**\n * @throws ContainerExceptionInterface\n * @throws NotFoundExceptionInterface\n * @throws SocialAccountTokenInvalidException\n */\n private function getCrmService(Team $team): ServiceInterface\n {\n $crmService = $this->providerRegistry->get($team->crm->provider);\n $crmService->setConfiguration($team->crm);\n if ($crmService instanceof UrlGeneratorInterface) {\n $crmService->setCrmUrlGenerator($team->crm);\n }\n\n return $crmService;\n }\n\n /**\n *\n * @return Generator<DealData>\n */\n public function getForecastData(DealsFilter $filter): Generator\n {\n $opportunities = DB::query()\n ->select([\n 'o.value',\n 'o.close_date',\n 'o.currency_code',\n 'o.is_won',\n 'o.is_closed',\n 'o.probability',\n 'o.forecast_category',\n ])\n ->from('opportunities', 'o')\n ->join('users', 'users.id', '=', 'o.user_id')\n ->join('groups', 'groups.id', '=', 'users.group_id')\n ->where('users.team_id', $filter->getTeam()->getId())\n ->where('o.close_date', '>=', $filter->getStartDate())\n ->where('o.close_date', '<=', $filter->getEndDate())\n ->where('o.currency_code', $filter->getCurrency())\n ->where('o.deleted_at', '=', null)\n ;\n\n $userUuidList = $filter->getUserUuidList();\n if (! empty($userUuidList)) {\n $userUuidList = array_map(fn ($uuid) => RequiresUUID::toOptimized($uuid), $userUuidList);\n\n $opportunities->whereIn('users.uuid', $userUuidList);\n }\n\n $groupUuidList = $filter->getGroupUuidList();\n if (! empty($groupUuidList)) {\n $groupUuidList = array_map(fn ($uuid) => RequiresUUID::toOptimized($uuid), $groupUuidList);\n\n $opportunities->whereIn('groups.uuid', $groupUuidList);\n }\n\n foreach ($opportunities->cursor() as $row) {\n yield new DealData(\n (float) $row->value,\n $row->close_date,\n ! empty($row->is_won),\n ! empty($row->is_closed),\n $row->probability ?: 0,\n $row->forecast_category ?: '',\n );\n }\n }\n\n public function getUserOpportunitySubscriptions(User $user, array $opportunityIds): Collection\n {\n return $user->subscriptionSets()\n ->where(static function (Eloquent\\Builder $query): void {\n $query\n ->whereNull('expired_at')\n ->orWhere('expired_at', '>=', now());\n })\n ->join('activity_subscriptions', function (Builder $join) use ($opportunityIds) {\n $join\n ->on('subscription_set_id', '=', 'activity_subscription_sets.id');\n $join\n ->where('followable_type', Models\\Activity\\Subscription::FOLLOWABLE_TYPE_OPPORTUNITY)\n ->whereIn('followable_id', $opportunityIds);\n })\n ->pluck('followable_id');\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Component\\DealInsights;\n\nuse Doctrine\\DBAL\\Connection;\nuse Generator;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Component\\DealInsights\\Forecast\\DealData;\nuse Jiminny\\Component\\DealInsights\\Forecast\\DealsFilter;\nuse Jiminny\\Component\\DealInsights\\QueryBuilder\\QueryBuilder;\nuse Jiminny\\Component\\DealInsights\\QueryBuilder\\Visitor\\QueryBuilderVisitorInterface;\nuse Jiminny\\Contracts\\Services\\Crm\\ServiceInterface;\nuse Jiminny\\Exceptions\\SocialAccountTokenInvalidException;\nuse Jiminny\\Models\\Activity;\nuse Jiminny\\Models\\Crm\\Configuration;\nuse Jiminny\\Models\\Crm\\Field;\nuse Jiminny\\Models\\Stage;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Models;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\Utils\\UrlGeneratorInterface;\nuse Jiminny\\Services\\Crm\\ProviderRegistry;\nuse Jiminny\\Traits\\RequiresUUID;\nuse Illuminate\\Database\\Query\\Builder;\nuse Illuminate\\Database\\Eloquent;\nuse Psr\\Container\\ContainerExceptionInterface;\nuse Psr\\Container\\NotFoundExceptionInterface;\n\nclass DealsRepository implements DealsRepositoryInterface\n{\n private Connection $connection;\n\n private ProviderRegistry $providerRegistry;\n\n /**\n * @var QueryBuilderVisitorInterface[]\n */\n private array $visitors = [];\n\n /**\n * @param QueryBuilderVisitorInterface[] $visitors\n */\n public function __construct(Connection $connection, ProviderRegistry $crmProviderRegistry, array $visitors = [])\n {\n $this->connection = $connection;\n $this->providerRegistry = $crmProviderRegistry;\n\n foreach ($visitors as $visitor) {\n $this->visitors[$visitor->getIdentifier()] = $visitor;\n }\n }\n\n public function getDeals(CriteriaInterface $criteria): array\n {\n $context = $criteria->getContext();\n $team = $context->getTeam();\n $crmService = $this->getCrmService($team);\n\n $qb = $this->createQueryBuilder(QueryBuilder::REALM_DEALS);\n $qb = $this->getSearchSelectAndWhereClauses($qb);\n\n $this->visit($qb, $criteria);\n\n return $this->execute($team, $crmService, $qb);\n }\n\n public function getDeal(Team $team, int $id): array\n {\n $crmService = $this->getCrmService($team);\n\n $qb = $this->createQueryBuilder(QueryBuilder::REALM_DEALS);\n $qb = $this->getSearchSelectAndWhereClauses($qb);\n $qb->andWhere('opp.id = :id')->setParameter('id', $id);\n\n return $this->execute($team, $crmService, $qb);\n }\n\n public function getCrmFieldData(array $crmFields, int $crmId, array $opportunityIds = [])\n {\n $qb = new QueryBuilder($this->connection);\n\n $qb\n ->select('f.id', 'f.crm_provider_id AS field_name', 'f.label', 'fd.object_id AS dealId', 'fd.value')\n ->from('crm_fields', 'f')\n ->join('f', 'crm_field_data', 'fd', 'fd.crm_field_id = f.id')\n ->where('f.crm_configuration_id = :crm')\n ->andWhere('f.object_type = :type')\n ->andWhere('fd.object_id IN (' . implode(',', $opportunityIds) . ')')\n ->orderBy('fd.object_id', 'ASC')\n ->addOrderBy('fd.updated_at', 'ASC')\n\n ->setParameter('type', Field::OBJECT_OPPORTUNITY)\n ->setParameter('crm', $crmId)\n ;\n\n if (! empty($crmFields)) {\n $fields = array_map(fn ($value): string => '\"' . $value . '\"', $crmFields);\n $qb->andWhere('f.crm_provider_id IN (' . implode(',', $fields) . ')');\n }\n\n return $qb->executeQuery()->fetchAllAssociative();\n }\n\n public function getTotalsInDefaultCurrency(CriteriaInterface $criteria): array\n {\n $qb = $this->createQueryBuilder(QueryBuilder::REALM_TOTALS);\n\n $qb\n ->select('SUM(opp.value) as total')\n ->addSelect('count(*) as `count`')\n ->where($qb->expr()->isNotNull('opp.user_id')) // we should not include deals owned by external users\n ->andWhere($qb->expr()->isNull('opp.deleted_at'))\n ;\n\n $this->visit($qb, $criteria);\n\n return $qb->executeQuery()->fetchAssociative();\n }\n\n public function getTotals(CriteriaInterface $criteria, string $defaultCurrency): array\n {\n $qb = $this->createQueryBuilder(QueryBuilder::REALM_TOTALS);\n\n $qb\n ->select('COALESCE(opp.currency_code, \"' . $defaultCurrency . '\") AS currency')\n ->addSelect('SUM(opp.value) as total')\n ->addSelect('count(*) as `count`')\n ->where($qb->expr()->isNotNull('opp.user_id')) // we should not include deals owned by external users\n ->andWhere($qb->expr()->isNull('opp.deleted_at'))\n ->groupBy('currency')\n ;\n\n $this->visit($qb, $criteria);\n\n return $qb->executeQuery()->fetchAllAssociative();\n }\n\n public function getDealActivities(CriteriaInterface $criteria): array\n {\n $qb = Activity::with(['participants', 'user'])\n ->where('opportunity_id', $criteria->getOpportunityId())\n ->whereDate('actual_start_time', '>=', $criteria->getPeriod()->getStartDate())\n ->whereDate('actual_start_time', '<=', $criteria->getPeriod()->getEndDate())\n ->orderBy($criteria->getSortBy(), $criteria->getSortDirection())\n ;\n\n // Should we filter activities by criteria? It's intended to filter deals.\n\n return $qb->get()->all();\n }\n\n public function getStages(CriteriaInterface $criteria): array\n {\n $qb = new QueryBuilder($this->connection);\n\n $qb\n ->select('id', 'label', 'sequence')\n ->from('stages', 's')\n ->where('crm_configuration_id = :crm_configuration_id')\n ->andWhere('type = :type')\n ->orderBy('sequence', 'ASC')\n\n ->setParameter('crm_configuration_id', $criteria->getContext()->getTeam()->getCrmConfiguration()->getId())\n ->setParameter('type', Stage::TYPE_OPPORTUNITY);\n\n $result = [];\n foreach ($qb->executeQuery()->fetchAllAssociative() as $row) {\n $result[$row['id']] = [\n 'label' => $row['label'],\n 'sequence' => $row['sequence'],\n ];\n }\n\n return $result;\n }\n\n public function getConfigurationStages(Configuration $configuration): Collection\n {\n return $configuration\n ->stages()\n ->where('type', Stage::TYPE_OPPORTUNITY)\n ->get();\n }\n\n public function getPipelineData(Configuration $crm): array\n {\n $qb = new QueryBuilder($this->connection);\n $provider = $crm->provider;\n\n $qb\n ->select('s.label', 's.crm_provider_id', 's.sequence', 'bps.business_process_id AS pipeline_id')\n ->from('stages', 's')\n ->join('s', 'business_process_stages', 'bps', 's.id=bps.stage_id')\n ->where('s.crm_configuration_id = :crm_configuration_id')\n ->andWhere('s.type = :type')\n ->orderBy('bps.business_process_id', 'ASC')\n ->addOrderBy('s.sequence', 'ASC')\n\n ->setParameter('crm_configuration_id', $crm->id)\n ->setParameter('type', Stage::TYPE_OPPORTUNITY)\n ;\n\n $result = [];\n foreach ($qb->executeQuery()->fetchAllAssociative() as $row) {\n $value = $provider === Configuration::PROVIDER_SALESFORCE ? $row['label'] : $row['crm_provider_id'];\n $result[$row['pipeline_id']][] = [\n 'value' => $value,\n 'label' => $row['label'],\n 'sequence' => $row['sequence'],\n ];\n }\n\n return $result;\n }\n\n private function createQueryBuilder(string $realm): QueryBuilder\n {\n return (new QueryBuilder($this->connection))\n ->setRealm($realm)\n ->from('opportunities', 'opp')\n ->leftJoin('opp', 'record_types', 'rt', 'opp.record_type_id = rt.id')\n ->leftJoin('opp', 'users', 'usr', 'opp.user_id = usr.id')\n ->leftJoin('opp', 'accounts', 'acc', 'opp.account_id = acc.id')\n ;\n }\n\n /**\n * Applies all applicable visitors and returns the IDs of the executed ones\n *\n * @return string[]\n */\n private function visit(QueryBuilder $queryBuilder, CriteriaInterface $criteria): array\n {\n $queryVisitors = [];\n\n foreach ($this->visitors as $visitor) {\n if ($visitor->isSatisfiedBy($criteria, $queryBuilder->getRealm())) {\n $visitor->visit($queryBuilder, $criteria);\n\n $queryVisitors[] = $visitor->getIdentifier();\n }\n }\n\n return $queryVisitors;\n }\n\n private function hydrateStages(array $deals): array\n {\n foreach ($this->fetchStages(array_keys($deals)) as $stage) {\n $oppId = (int) $stage['opportunity_id'];\n\n if (! isset($deals[$oppId])) {\n continue; // or throw??!\n }\n\n $deals[$oppId]['stages'][] = [\n 'id' => $stage['stage_id'],\n 'name' => $stage['label'],\n 'enteredAt' => $stage['created_at'],\n ];\n }\n\n return $deals;\n }\n\n /**\n * @param int[] $dealIds\n */\n private function fetchStages(array $dealIds): array\n {\n if (empty($dealIds)) {\n return [];\n }\n\n $qb = new QueryBuilder($this->connection);\n\n $qb\n ->select('os.opportunity_id', 's.id AS stage_id', 's.label', 's.created_at')\n ->from('opportunity_stages', 'os')\n ->leftJoin('os', 'stages', 's', 'os.stage_id=s.id')\n ->where($qb->expr()->in('os.opportunity_id', $dealIds))\n ->orderBy('os.opportunity_id', 'ASC')\n ->addOrderBy('s.created_at', 'ASC')\n ;\n\n return $qb->executeQuery()->fetchAllAssociative();\n }\n\n private function execute(Team $team, ServiceInterface $crmService, QueryBuilder $qb): array\n {\n $result = [];\n\n foreach ($qb->executeQuery()->fetchAllAssociative() as $row) {\n $data = [\n 'uuid' => RequiresUUID::toNormal($row['uuid']),\n 'name' => $row['name'],\n 'url' => $crmService->generateProviderUrl($row['opp_provider_id'], 'opportunity'),\n 'account' => [\n 'name' => $row['acc_name'],\n 'url' => $crmService->generateProviderUrl(\n providerId: $row['acc_provider_id'],\n objectType: $row['acc_is_internal'] ? 'internal-account' : 'account'\n ),\n ],\n 'owner' => null,\n 'rawValue' => [\n 'amount' => (float) $row['value'],\n 'currency' => $row['currency_code'],\n ],\n 'value' => formatOpportunityValue((float) $row['value'], $row['currency_code']),\n 'openDate' => $row['remotely_created_at'] ?? null,\n 'closeDate' => $row['close_date'] ?? null,\n 'stages' => [],\n 'currentPipelineId' => $row['pipeline_id'],\n 'currentStage' => [\n 'id' => $row['stage_id'],\n 'enteredAt' => $row['stage_updated_at'],\n ],\n 'currentStageUpdatedAt' => $row['stage_updated_at'],\n 'isClosed' => (bool) $row['is_closed'],\n 'isWon' => (bool) $row['is_won'],\n ];\n\n if (isset($row['owner_uuid'])) {\n $data['owner'] = [\n 'uuid' => RequiresUUID::toNormal($row['owner_uuid']),\n 'name' => $row['owner_name'],\n 'photoUrl' => $row['owner_photo'] === null\n ? null\n : client_cdn($row['owner_photo'], $team),\n 'id' => $row['owner_id'],\n 'job' => $row['owner_job'],\n ];\n }\n\n $result[(int) $row['opp_id']] = $data;\n }\n\n return $this->hydrateStages($result);\n }\n\n private function getSearchSelectAndWhereClauses(QueryBuilder $queryBuilder): QueryBuilder\n {\n $qb = clone $queryBuilder;\n $qb->leftJoin('usr', 'job_titles', 'jt', 'usr.job_title_id = jt.id');\n\n $qb\n ->select(...[\n 'opp.id as opp_id',\n 'opp.uuid',\n 'opp.name',\n 'opp.value',\n 'opp.currency_code',\n 'opp.close_date',\n 'opp.remotely_created_at',\n 'opp.is_closed',\n 'opp.is_won',\n ])\n ->addSelect(...[\n 'usr.uuid as owner_uuid',\n 'usr.name AS owner_name',\n 'usr.photo_path as owner_photo',\n 'usr.id AS owner_id',\n 'jt.name as owner_job',\n ])\n ->addSelect('opp.stage_id', 'opp.stage_updated_at')\n ->addSelect(...[\n 'acc.name AS acc_name',\n 'acc.is_internal as acc_is_internal',\n 'opp.stage_updated_at',\n 'acc.crm_provider_id AS acc_provider_id',\n 'opp.crm_provider_id AS opp_provider_id',\n ])\n ->addSelect('rt.business_process_id AS pipeline_id')\n\n ->where($qb->expr()->isNotNull('opp.user_id')) // we should not display deals owned by external users\n ->andWhere($qb->expr()->isNull('opp.deleted_at'));\n\n return $qb;\n }\n\n /**\n * @throws ContainerExceptionInterface\n * @throws NotFoundExceptionInterface\n * @throws SocialAccountTokenInvalidException\n */\n private function getCrmService(Team $team): ServiceInterface\n {\n $crmService = $this->providerRegistry->get($team->crm->provider);\n $crmService->setConfiguration($team->crm);\n if ($crmService instanceof UrlGeneratorInterface) {\n $crmService->setCrmUrlGenerator($team->crm);\n }\n\n return $crmService;\n }\n\n /**\n *\n * @return Generator<DealData>\n */\n public function getForecastData(DealsFilter $filter): Generator\n {\n $opportunities = DB::query()\n ->select([\n 'o.value',\n 'o.close_date',\n 'o.currency_code',\n 'o.is_won',\n 'o.is_closed',\n 'o.probability',\n 'o.forecast_category',\n ])\n ->from('opportunities', 'o')\n ->join('users', 'users.id', '=', 'o.user_id')\n ->join('groups', 'groups.id', '=', 'users.group_id')\n ->where('users.team_id', $filter->getTeam()->getId())\n ->where('o.close_date', '>=', $filter->getStartDate())\n ->where('o.close_date', '<=', $filter->getEndDate())\n ->where('o.currency_code', $filter->getCurrency())\n ->where('o.deleted_at', '=', null)\n ;\n\n $userUuidList = $filter->getUserUuidList();\n if (! empty($userUuidList)) {\n $userUuidList = array_map(fn ($uuid) => RequiresUUID::toOptimized($uuid), $userUuidList);\n\n $opportunities->whereIn('users.uuid', $userUuidList);\n }\n\n $groupUuidList = $filter->getGroupUuidList();\n if (! empty($groupUuidList)) {\n $groupUuidList = array_map(fn ($uuid) => RequiresUUID::toOptimized($uuid), $groupUuidList);\n\n $opportunities->whereIn('groups.uuid', $groupUuidList);\n }\n\n foreach ($opportunities->cursor() as $row) {\n yield new DealData(\n (float) $row->value,\n $row->close_date,\n ! empty($row->is_won),\n ! empty($row->is_closed),\n $row->probability ?: 0,\n $row->forecast_category ?: '',\n );\n }\n }\n\n public function getUserOpportunitySubscriptions(User $user, array $opportunityIds): Collection\n {\n return $user->subscriptionSets()\n ->where(static function (Eloquent\\Builder $query): void {\n $query\n ->whereNull('expired_at')\n ->orWhere('expired_at', '>=', now());\n })\n ->join('activity_subscriptions', function (Builder $join) use ($opportunityIds) {\n $join\n ->on('subscription_set_id', '=', 'activity_subscription_sets.id');\n $join\n ->where('followable_type', Models\\Activity\\Subscription::FOLLOWABLE_TYPE_OPPORTUNITY)\n ->whereIn('followable_id', $opportunityIds);\n })\n ->pluck('followable_id');\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-1105727908594094003
|
-3591005712274216332
|
click
|
accessibility
|
NULL
|
Selection does not form a correct expression
text/ Selection does not form a correct expression
text/html
text/html
text/html
Project: faVsco.js, menu
JY-20157-AJ-report-not-send-notification, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Code changed:
Hide
Sync Changes
Hide This Notification
16
7
1
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Repositories;
use Carbon\CarbonImmutable;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Carbon;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Pagination\LengthAwarePaginator;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Jiminny\Services\Kiosk\AutomatedReports\ReportSort;
use Jiminny\Services\Kiosk\AutomatedReports\ReportSortDirection;
class AutomatedReportsRepository
{
/**
* Create a new automated report
*
* @param array $data
*
* @return AutomatedReport
*/
public function create(array $data): AutomatedReport
{
return AutomatedReport::create($data);
}
/**
* Find an automated report by UUID
*
* @param string $uuid
*
* @return AutomatedReport|null
*/
public function findByUuid(string $uuid): ?AutomatedReport
{
return AutomatedReport::where('uuid', AutomatedReport::toOptimized($uuid))->first();
}
public function findByIdOrUuid(string $idOrUuid): ?AutomatedReport
{
if (is_numeric($idOrUuid)) {
return AutomatedReport::find((int) $idOrUuid);
}
return AutomatedReport::where('uuid', AutomatedReport::toOptimized($idOrUuid))->first();
}
/**
* Retrieve all standard (non-Ask Jiminny) automated reports.
*
* @param string $sortColumn The column to sort by. Allowed values: 'created_by', 'created_at'. Defaults to 'created_at'.
* @param string $sortDirection The sort direction. Allowed values: 'asc', 'desc'. Defaults to 'desc'.
*
* @return Collection<AutomatedReport>
*/
public function getAllStandardReports(
string $sortColumn = 'created_at',
string $sortDirection = 'desc'
): Collection {
return $this->buildSortedQuery($sortColumn, $sortDirection)
->whereNot('type', AutomatedReportsService::TYPE_ASK_JIMINNY)
->get();
}
/**
* Retrieve all Ask Jiminny reports created by the given user.
*
* @param User $user The user whose reports to retrieve.
* @param string $sortColumn The column to sort by. Allowed values: 'created_by', 'created_at'. Defaults to 'created_at'.
* @param string $sortDirection The sort direction. Allowed values: 'asc', 'desc'. Defaults to 'desc'.
*
* @return Collection<AutomatedReport>
*/
public function getAskJiminnyReportsByUser(
User $user,
string $sortColumn = 'created_at',
string $sortDirection = 'desc'
): Collection {
return $this->buildSortedQuery($sortColumn, $sortDirection)
->where('type', AutomatedReportsService::TYPE_ASK_JIMINNY)
->where('created_by', $user->getId())
->get();
}
private function buildSortedQuery(string $sortColumn, string $sortDirection): \Illuminate\Database\Eloquent\Builder
{
$allowedColumns = ['created_by', 'created_at'];
if (! in_array($sortColumn, $allowedColumns)) {
$sortColumn = 'created_at';
}
$sortDirection = strtolower($sortDirection) === 'asc' ? 'asc' : 'desc';
$query = AutomatedReport::query()->with(['creator', 'team']);
if ($sortColumn === 'created_by') {
$query->leftJoin('users', 'users.id', '=', 'automated_reports.created_by')
->orderByRaw("users.name COLLATE utf8mb4_unicode_ci {$sortDirection}")
->select('automated_reports.*');
} else {
$query->orderBy($sortColumn, $sortDirection);
}
return $query;
}
/**
* Get all active Ask Jiminny reports whose expiry date has passed.
*
* @return Collection<AutomatedReport>
*/
public function getExpiredActiveAskJiminnyReports(): Collection
{
return AutomatedReport::where('status', true)
->where('type', AutomatedReportsService::TYPE_ASK_JIMINNY)
->whereNotNull('expires_at')
->where('expires_at', '<', now()->toDateString())
->get();
}
/**
* Get all active and enabled reports with active teams for the specified frequency.
*
* @param string $frequency
*
* @return Collection<AutomatedReport>
*/
public function getActiveReportsByFrequency(string $frequency): Collection
{
return AutomatedReport::where('automated_reports.status', true)
->where('automated_reports.frequency', $frequency)
->join('teams', 'automated_reports.team_id', '=', 'teams.id')
->where('teams.status', Team::STATUS_ACTIVE)
->where(function ($query) {
$query->whereNull('automated_reports.expires_at')
->orWhere('automated_reports.expires_at', '>=', now()->toDateString());
})
->select('automated_reports.*')
->get();
}
/**
* Update an automated report
*
* @param AutomatedReport $report
* @param array $data
*
* @return AutomatedReport
*/
public function update(AutomatedReport $report, array $data): AutomatedReport
{
$report->update($data);
return $report;
}
/**
* Create a new automated report result.
*
* @param array $data The data to create the automated report result with.
*
* @return AutomatedReportResult The newly created automated report result.
*/
public function createResult(array $data): AutomatedReportResult
{
return AutomatedReportResult::create($data);
}
/**
* Find an automated report result by UUID.
*
* @param string $uuid The UUID to find the automated report result with.
*
* @return AutomatedReportResult|null The automated report result if found, otherwise null.
*/
public function findResultByUuid(string $uuid): ?AutomatedReportResult
{
return AutomatedReportResult::where('uuid', AutomatedReportResult::toOptimized($uuid))->first();
}
public function findResultByUuidForUser(string $uuid, User $user): ?AutomatedReportResult
{
return AutomatedReportResult::query()
->where('uuid', AutomatedReportResult::toOptimized($uuid))
->whereHas('report', static function ($query) use ($user): void {
$query->where('team_id', $user->getTeamId())
->where('created_by', $user->getId());
})
->first();
}
public function findChildResult(AutomatedReportResult $result, string $type): ?AutomatedReportResult
{
return AutomatedReportResult::query()
->where('parent_id', $result->getId())
->where('media_type', $type)
->first();
}
public function findLatestDefaultOrFailedResult(AutomatedReport $report): ?AutomatedReportResult
{
return AutomatedReportResult::query()
->where('report_id', $report->getId())
->whereIn('status', [AutomatedReportResult::STATUS_DEFAULT, AutomatedReportResult::STATUS_FAILED])
->latest()
->first();
}
public function getGeneratedNotSentResults(): Collection
{
return AutomatedReportResult::query()
->whereNotNull('generated_at')
->whereNull('sent_at')
->where('status', AutomatedReportResult::STATUS_GENERATED)
->whereHas('report')
->with('report')
->get();
}
public function getPaginatedUserReports(
User $user,
ReportSort $sort,
ReportSortDirection $sortDirection,
int $resultsPerPage,
int $page,
?Carbon $fromDate,
?Carbon $toDate,
array $teamIds,
array $reportTypes,
?string $name,
): LengthAwarePaginator {
$query = AutomatedReportResult::query()
->whereNotNull('automated_report_results.generated_at')
->join('automated_reports', 'automated_report_results.report_id', '=', 'automated_reports.id')
->where(fn (Builder $q) => $this->applyUserAccessScope($q, $user))
->orderByRaw("$sort->value COLLATE utf8mb4_unicode_ci {$sortDirection->value}")
->select('automated_report_results.*')
->with('report.team');
if ($fromDate !== null && $toDate !== null) {
$query->whereBetween('generated_at', [$fromDate, $toDate]);
}
if (! empty($teamIds)) {
$query->where(function ($q) use ($teamIds) {
foreach ($teamIds as $id) {
$q->orWhereJsonContains('automated_reports.groups', $id);
}
});
}
if (! empty($reportTypes)) {
$query->whereIn('automated_reports.type', $reportTypes);
}
if (! empty($name)) {
$query->whereLike('name', "%$name%");
}
return $query->paginate($resultsPerPage, ['*'], 'page', $page);
}
public function countUserReports(User $user): int
{
return AutomatedReportResult::query()
->whereNotNull('generated_at')
->whereNotNull('sent_at')
->whereHas('report', function ($q) use ($user) {
$q->where('team_id', $user->getTeamId())
->whereJsonContains('recipients->users', $user->getId());
})
->count();
}
/**
* Restrict a query on the automated_reports table to reports the given user is allowed to see.
*
* Matches the customer-facing audience:
* - explicit user recipients (recipients.users)
* - members of any of the report's groups (Ask Jiminny reports)
*/
private function applyUserAccessScope(Builder $query, User $user): void
{
$userId = $user->getId();
$groupId = $user->getGroupId();
$query
->where('automated_reports.team_id', $user->getTeamId())
->where(function (Builder $q) use ($userId, $groupId): void {
$q->whereJsonContains('automated_reports.recipients->users', $userId);
if ($groupId !== null) {
$q->orWhere(function (Builder $sub) use ($groupId): void {
$sub->where('automated_reports.type', AutomatedReportsService::TYPE_ASK_JIMINNY)
->whereJsonContains('automated_reports.groups', $groupId);
});
}
});
}
/**
* Get report IDs for a specific team
*
* @param Team $team
*
* @return \Illuminate\Support\Collection
*/
public function getReportIdsByTeam(Team $team): \Illuminate\Support\Collection
{
return AutomatedReport::where('team_id', $team->getId())->pluck('id');
}
/**
* Get all reports for a specific team
*
* @param Team $team
*
* @return Collection
*/
public function getReportsByTeam(Team $team): Collection
{
return AutomatedReport::where('team_id', $team->getId())->get();
}
/**
* Get all report results for a specific report
*
* @param AutomatedReport $report
*
* @return Collection
*/
public function getResultsByReport(AutomatedReport $report): Collection
{
return $this->getResultsByReportQuery($report)->get();
}
public function getResultsByReportQuery(AutomatedReport $report): Builder
{
return AutomatedReportResult::where('report_id', $report->getId());
}
public function getReportResultsQueryForRetention(Team $team, CarbonImmutable $retentionDate): Builder
{
$reportIds = $this->getReportIdsByTeam($team);
return AutomatedReportResult::query()->whereIn('report_id', $reportIds)
->whereRaw('IFNULL(generated_at, created_at) <= ?', [$retentionDate]);
}
/**
* @param int|null $teamId Optional team ID to filter results
*
* @return \Illuminate\Support\Collection<int, int> Collection of team IDs
*/
public function getTeamIdsWithReportsResults(?int $teamId = null): \Illuminate\Support\Collection
{
$query = DB::table('automated_reports')
->join('teams', 'automated_reports.team_id', '=', 'teams.id')
->select('teams.id')
->distinct();
if ($teamId !== null) {
$query->where('teams.id', $teamId);
}
return $query->pluck('teams.id');
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
36
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Component\DealInsights;
use Doctrine\DBAL\Connection;
use Generator;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\DB;
use Jiminny\Component\DealInsights\Forecast\DealData;
use Jiminny\Component\DealInsights\Forecast\DealsFilter;
use Jiminny\Component\DealInsights\QueryBuilder\QueryBuilder;
use Jiminny\Component\DealInsights\QueryBuilder\Visitor\QueryBuilderVisitorInterface;
use Jiminny\Contracts\Services\Crm\ServiceInterface;
use Jiminny\Exceptions\SocialAccountTokenInvalidException;
use Jiminny\Models\Activity;
use Jiminny\Models\Crm\Configuration;
use Jiminny\Models\Crm\Field;
use Jiminny\Models\Stage;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Models;
use Jiminny\Services\Crm\IntegrationApp\DTO\Utils\UrlGeneratorInterface;
use Jiminny\Services\Crm\ProviderRegistry;
use Jiminny\Traits\RequiresUUID;
use Illuminate\Database\Query\Builder;
use Illuminate\Database\Eloquent;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
class DealsRepository implements DealsRepositoryInterface
{
private Connection $connection;
private ProviderRegistry $providerRegistry;
/**
* @var QueryBuilderVisitorInterface[]
*/
private array $visitors = [];
/**
* @param QueryBuilderVisitorInterface[] $visitors
*/
public function __construct(Connection $connection, ProviderRegistry $crmProviderRegistry, array $visitors = [])
{
$this->connection = $connection;
$this->providerRegistry = $crmProviderRegistry;
foreach ($visitors as $visitor) {
$this->visitors[$visitor->getIdentifier()] = $visitor;
}
}
public function getDeals(CriteriaInterface $criteria): array
{
$context = $criteria->getContext();
$team = $context->getTeam();
$crmService = $this->getCrmService($team);
$qb = $this->createQueryBuilder(QueryBuilder::REALM_DEALS);
$qb = $this->getSearchSelectAndWhereClauses($qb);
$this->visit($qb, $criteria);
return $this->execute($team, $crmService, $qb);
}
public function getDeal(Team $team, int $id): array
{
$crmService = $this->getCrmService($team);
$qb = $this->createQueryBuilder(QueryBuilder::REALM_DEALS);
$qb = $this->getSearchSelectAndWhereClauses($qb);
$qb->andWhere('opp.id = :id')->setParameter('id', $id);
return $this->execute($team, $crmService, $qb);
}
public function getCrmFieldData(array $crmFields, int $crmId, array $opportunityIds = [])
{
$qb = new QueryBuilder($this->connection);
$qb
->select('f.id', 'f.crm_provider_id AS field_name', 'f.label', 'fd.object_id AS dealId', 'fd.value')
->from('crm_fields', 'f')
->join('f', 'crm_field_data', 'fd', 'fd.crm_field_id = f.id')
->where('f.crm_configuration_id = :crm')
->andWhere('f.object_type = :type')
->andWhere('fd.object_id IN (' . implode(',', $opportunityIds) . ')')
->orderBy('fd.object_id', 'ASC')
->addOrderBy('fd.updated_at', 'ASC')
->setParameter('type', Field::OBJECT_OPPORTUNITY)
->setParameter('crm', $crmId)
;
if (! empty($crmFields)) {
$fields = array_map(fn ($value): string => '"' . $value . '"', $crmFields);
$qb->andWhere('f.crm_provider_id IN (' . implode(',', $fields) . ')');
}
return $qb->executeQuery()->fetchAllAssociative();
}
public function getTotalsInDefaultCurrency(CriteriaInterface $criteria): array
{
$qb = $this->createQueryBuilder(QueryBuilder::REALM_TOTALS);
$qb
->select('SUM(opp.value) as total')
->addSelect('count(*) as `count`')
->where($qb->expr()->isNotNull('opp.user_id')) // we should not include deals owned by external users
->andWhere($qb->expr()->isNull('opp.deleted_at'))
;
$this->visit($qb, $criteria);
return $qb->executeQuery()->fetchAssociative();
}
public function getTotals(CriteriaInterface $criteria, string $defaultCurrency): array
{
$qb = $this->createQueryBuilder(QueryBuilder::REALM_TOTALS);
$qb
->select('COALESCE(opp.currency_code, "' . $defaultCurrency . '") AS currency')
->addSelect('SUM(opp.value) as total')
->addSelect('count(*) as `count`')
->where($qb->expr()->isNotNull('opp.user_id')) // we should not include deals owned by external users
->andWhere($qb->expr()->isNull('opp.deleted_at'))
->groupBy('currency')
;
$this->visit($qb, $criteria);
return $qb->executeQuery()->fetchAllAssociative();
}
public function getDealActivities(CriteriaInterface $criteria): array
{
$qb = Activity::with(['participants', 'user'])
->where('opportunity_id', $criteria->getOpportunityId())
->whereDate('actual_start_time', '>=', $criteria->getPeriod()->getStartDate())
->whereDate('actual_start_time', '<=', $criteria->getPeriod()->getEndDate())
->orderBy($criteria->getSortBy(), $criteria->getSortDirection())
;
// Should we filter activities by criteria? It's intended to filter deals.
return $qb->get()->all();
}
public function getStages(CriteriaInterface $criteria): array
{
$qb = new QueryBuilder($this->connection);
$qb
->select('id', 'label', 'sequence')
->from('stages', 's')
->where('crm_configuration_id = :crm_configuration_id')
->andWhere('type = :type')
->orderBy('sequence', 'ASC')
->setParameter('crm_configuration_id', $criteria->getContext()->getTeam()->getCrmConfiguration()->getId())
->setParameter('type', Stage::TYPE_OPPORTUNITY);
$result = [];
foreach ($qb->executeQuery()->fetchAllAssociative() as $row) {
$result[$row['id']] = [
'label' => $row['label'],
'sequence' => $row['sequence'],
];
}
return $result;
}
public function getConfigurationStages(Configuration $configuration): Collection
{
return $configuration
->stages()
->where('type', Stage::TYPE_OPPORTUNITY)
->get();
}
public function getPipelineData(Configuration $crm): array
{
$qb = new QueryBuilder($this->connection);
$provider = $crm->provider;
$qb
->select('s.label', 's.crm_provider_id', 's.sequence', 'bps.business_process_id AS pipeline_id')
->from('stages', 's')
->join('s', 'business_process_stages', 'bps', 's.id=bps.stage_id')
->where('s.crm_configuration_id = :crm_configuration_id')
->andWhere('s.type = :type')
->orderBy('bps.business_process_id', 'ASC')
->addOrderBy('s.sequence', 'ASC')
->setParameter('crm_configuration_id', $crm->id)
->setParameter('type', Stage::TYPE_OPPORTUNITY)
;
$result = [];
foreach ($qb->executeQuery()->fetchAllAssociative() as $row) {
$value = $provider === Configuration::PROVIDER_SALESFORCE ? $row['label'] : $row['crm_provider_id'];
$result[$row['pipeline_id']][] = [
'value' => $value,
'label' => $row['label'],
'sequence' => $row['sequence'],
];
}
return $result;
}
private function createQueryBuilder(string $realm): QueryBuilder
{
return (new QueryBuilder($this->connection))
->setRealm($realm)
->from('opportunities', 'opp')
->leftJoin('opp', 'record_types', 'rt', 'opp.record_type_id = rt.id')
->leftJoin('opp', 'users', 'usr', 'opp.user_id = usr.id')
->leftJoin('opp', 'accounts', 'acc', 'opp.account_id = acc.id')
;
}
/**
* Applies all applicable visitors and returns the IDs of the executed ones
*
* @return string[]
*/
private function visit(QueryBuilder $queryBuilder, CriteriaInterface $criteria): array
{
$queryVisitors = [];
foreach ($this->visitors as $visitor) {
if ($visitor->isSatisfiedBy($criteria, $queryBuilder->getRealm())) {
$visitor->visit($queryBuilder, $criteria);
$queryVisitors[] = $visitor->getIdentifier();
}
}
return $queryVisitors;
}
private function hydrateStages(array $deals): array
{
foreach ($this->fetchStages(array_keys($deals)) as $stage) {
$oppId = (int) $stage['opportunity_id'];
if (! isset($deals[$oppId])) {
continue; // or throw??!
}
$deals[$oppId]['stages'][] = [
'id' => $stage['stage_id'],
'name' => $stage['label'],
'enteredAt' => $stage['created_at'],
];
}
return $deals;
}
/**
* @param int[] $dealIds
*/
private function fetchStages(array $dealIds): array
{
if (empty($dealIds)) {
return [];
}
$qb = new QueryBuilder($this->connection);
$qb
->select('os.opportunity_id', 's.id AS stage_id', 's.label', 's.created_at')
->from('opportunity_stages', 'os')
->leftJoin('os', 'stages', 's', 'os.stage_id=s.id')
->where($qb->expr()->in('os.opportunity_id', $dealIds))
->orderBy('os.opportunity_id', 'ASC')
->addOrderBy('s.created_at', 'ASC')
;
return $qb->executeQuery()->fetchAllAssociative();
}
private function execute(Team $team, ServiceInterface $crmService, QueryBuilder $qb): array
{
$result = [];
foreach ($qb->executeQuery()->fetchAllAssociative() as $row) {
$data = [
'uuid' => RequiresUUID::toNormal($row['uuid']),
'name' => $row['name'],
'url' => $crmService->generateProviderUrl($row['opp_provider_id'], 'opportunity'),
'account' => [
'name' => $row['acc_name'],
'url' => $crmService->generateProviderUrl(
providerId: $row['acc_provider_id'],
objectType: $row['acc_is_internal'] ? 'internal-account' : 'account'
),
],
'owner' => null,
'rawValue' => [
'amount' => (float) $row['value'],
'currency' => $row['currency_code'],
],
'value' => formatOpportunityValue((float) $row['value'], $row['currency_code']),
'openDate' => $row['remotely_created_at'] ?? null,
'closeDate' => $row['close_date'] ?? null,
'stages' => [],
'currentPipelineId' => $row['pipeline_id'],
'currentStage' => [
'id' => $row['stage_id'],
'enteredAt' => $row['stage_updated_at'],
],
'currentStageUpdatedAt' => $row['stage_updated_at'],
'isClosed' => (bool) $row['is_closed'],
'isWon' => (bool) $row['is_won'],
];
if (isset($row['owner_uuid'])) {
$data['owner'] = [
'uuid' => RequiresUUID::toNormal($row['owner_uuid']),
'name' => $row['owner_name'],
'photoUrl' => $row['owner_photo'] === null
? null
: client_cdn($row['owner_photo'], $team),
'id' => $row['owner_id'],
'job' => $row['owner_job'],
];
}
$result[(int) $row['opp_id']] = $data;
}
return $this->hydrateStages($result);
}
private function getSearchSelectAndWhereClauses(QueryBuilder $queryBuilder): QueryBuilder
{
$qb = clone $queryBuilder;
$qb->leftJoin('usr', 'job_titles', 'jt', 'usr.job_title_id = jt.id');
$qb
->select(...[
'opp.id as opp_id',
'opp.uuid',
'opp.name',
'opp.value',
'opp.currency_code',
'opp.close_date',
'opp.remotely_created_at',
'opp.is_closed',
'opp.is_won',
])
->addSelect(...[
'usr.uuid as owner_uuid',
'usr.name AS owner_name',
'usr.photo_path as owner_photo',
'usr.id AS owner_id',
'jt.name as owner_job',
])
->addSelect('opp.stage_id', 'opp.stage_updated_at')
->addSelect(...[
'acc.name AS acc_name',
'acc.is_internal as acc_is_internal',
'opp.stage_updated_at',
'acc.crm_provider_id AS acc_provider_id',
'opp.crm_provider_id AS opp_provider_id',
])
->addSelect('rt.business_process_id AS pipeline_id')
->where($qb->expr()->isNotNull('opp.user_id')) // we should not display deals owned by external users
->andWhere($qb->expr()->isNull('opp.deleted_at'));
return $qb;
}
/**
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
* @throws SocialAccountTokenInvalidException
*/
private function getCrmService(Team $team): ServiceInterface
{
$crmService = $this->providerRegistry->get($team->crm->provider);
$crmService->setConfiguration($team->crm);
if ($crmService instanceof UrlGeneratorInterface) {
$crmService->setCrmUrlGenerator($team->crm);
}
return $crmService;
}
/**
*
* @return Generator<DealData>
*/
public function getForecastData(DealsFilter $filter): Generator
{
$opportunities = DB::query()
->select([
'o.value',
'o.close_date',
'o.currency_code',
'o.is_won',
'o.is_closed',
'o.probability',
'o.forecast_category',
])
->from('opportunities', 'o')
->join('users', 'users.id', '=', 'o.user_id')
->join('groups', 'groups.id', '=', 'users.group_id')
->where('users.team_id', $filter->getTeam()->getId())
->where('o.close_date', '>=', $filter->getStartDate())
->where('o.close_date', '<=', $filter->getEndDate())
->where('o.currency_code', $filter->getCurrency())
->where('o.deleted_at', '=', null)
;
$userUuidList = $filter->getUserUuidList();
if (! empty($userUuidList)) {
$userUuidList = array_map(fn ($uuid) => RequiresUUID::toOptimized($uuid), $userUuidList);
$opportunities->whereIn('users.uuid', $userUuidList);
}
$groupUuidList = $filter->getGroupUuidList();
if (! empty($groupUuidList)) {
$groupUuidList = array_map(fn ($uuid) => RequiresUUID::toOptimized($uuid), $groupUuidList);
$opportunities->whereIn('groups.uuid', $groupUuidList);
}
foreach ($opportunities->cursor() as $row) {
yield new DealData(
(float) $row->value,
$row->close_date,
! empty($row->is_won),
! empty($row->is_closed),
$row->probability ?: 0,
$row->forecast_category ?: '',
);
}
}
public function getUserOpportunitySubscriptions(User $user, array $opportunityIds): Collection
{
return $user->subscriptionSets()
->where(static function (Eloquent\Builder $query): void {
$query
->whereNull('expired_at')
->orWhere('expired_at', '>=', now());
})
->join('activity_subscriptions', function (Builder $join) use ($opportunityIds) {
$join
->on('subscription_set_id', '=', 'activity_subscription_sets.id');
$join
->where('followable_type', Models\Activity\Subscription::FOLLOWABLE_TYPE_OPPORTUNITY)
->whereIn('followable_id', $opportunityIds);
})
->pluck('followable_id');
}
}
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
72984
|
|
52527
|
1136
|
14
|
2026-04-20T07:19:54.590445+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-20/1776 /Users/lukas/.screenpipe/data/data/2026-04-20/1776669594590_m1.jpg...
|
PhpStorm
|
Tip of the Day
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Select In
To quickly select the currently edited e Select In
To quickly select the currently edited element (a class, file, method, or field) in another view, press ⌥ F1 or call Navigate | Select In.
Did you find this tip useful?
Like
Dislike
Don't show tips on startup
Close
Back
Next
Tip of the Day...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Select In\nTo quickly select the currently edited element (a class, file, method, or field) in another view, press ⌥ F1 or call Navigate | Select In.","depth":2,"value":"Select In\nTo quickly select the currently edited element (a class, file, method, or field) in another view, press ⌥ F1 or call Navigate | Select In.","help_text":"text/plain","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Did you find this tip useful?","depth":1,"role_description":"text"},{"role":"AXButton","text":"Like","depth":2,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Dislike","depth":2,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Don't show tips on startup","depth":1,"role_description":"checkbox","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close","depth":1,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Back","depth":1,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next","depth":1,"role_description":"button","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Tip of the Day","depth":1,"role_description":"text"}]...
|
-8434221441983544890
|
1407881917106439412
|
idle
|
accessibility
|
NULL
|
Select In
To quickly select the currently edited e Select In
To quickly select the currently edited element (a class, file, method, or field) in another view, press ⌥ F1 or call Navigate | Select In.
Did you find this tip useful?
Like
Dislike
Don't show tips on startup
Close
Back
Next
Tip of the Day...
|
52522
|
|
52529
|
1136
|
15
|
2026-04-20T07:20:24.736474+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-20/1776 /Users/lukas/.screenpipe/data/data/2026-04-20/1776669624736_m1.jpg...
|
PhpStorm
|
Tip of the Day
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Select In
To quickly select the currently edited e Select In
To quickly select the currently edited element (a class, file, method, or field) in another view, press ⌥ F1 or call Navigate | Select In.
Did you find this tip useful?
Like
Dislike
Don't show tips on startup
Close
Back
Next
Tip of the Day...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Select In\nTo quickly select the currently edited element (a class, file, method, or field) in another view, press ⌥ F1 or call Navigate | Select In.","depth":2,"value":"Select In\nTo quickly select the currently edited element (a class, file, method, or field) in another view, press ⌥ F1 or call Navigate | Select In.","help_text":"text/plain","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Did you find this tip useful?","depth":1,"role_description":"text"},{"role":"AXButton","text":"Like","depth":2,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Dislike","depth":2,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Don't show tips on startup","depth":1,"role_description":"checkbox","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close","depth":1,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Back","depth":1,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next","depth":1,"role_description":"button","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Tip of the Day","depth":1,"role_description":"text"}]...
|
-8434221441983544890
|
1407881917106439412
|
idle
|
accessibility
|
NULL
|
Select In
To quickly select the currently edited e Select In
To quickly select the currently edited element (a class, file, method, or field) in another view, press ⌥ F1 or call Navigate | Select In.
Did you find this tip useful?
Like
Dislike
Don't show tips on startup
Close
Back
Next
Tip of the Day...
|
NULL
|
|
52531
|
1136
|
16
|
2026-04-20T07:20:54.981716+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-20/1776 /Users/lukas/.screenpipe/data/data/2026-04-20/1776669654981_m1.jpg...
|
PhpStorm
|
Tip of the Day
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Select In
To quickly select the currently edited e Select In
To quickly select the currently edited element (a class, file, method, or field) in another view, press ⌥ F1 or call Navigate | Select In.
Did you find this tip useful?
Like
Dislike
Don't show tips on startup
Close
Back
Next
Tip of the Day...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Select In\nTo quickly select the currently edited element (a class, file, method, or field) in another view, press ⌥ F1 or call Navigate | Select In.","depth":2,"value":"Select In\nTo quickly select the currently edited element (a class, file, method, or field) in another view, press ⌥ F1 or call Navigate | Select In.","help_text":"text/plain","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Did you find this tip useful?","depth":1,"role_description":"text"},{"role":"AXButton","text":"Like","depth":2,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Dislike","depth":2,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Don't show tips on startup","depth":1,"role_description":"checkbox","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close","depth":1,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Back","depth":1,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next","depth":1,"role_description":"button","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Tip of the Day","depth":1,"role_description":"text"}]...
|
-8434221441983544890
|
1407881917106439412
|
idle
|
accessibility
|
NULL
|
Select In
To quickly select the currently edited e Select In
To quickly select the currently edited element (a class, file, method, or field) in another view, press ⌥ F1 or call Navigate | Select In.
Did you find this tip useful?
Like
Dislike
Don't show tips on startup
Close
Back
Next
Tip of the Day...
|
52529
|
|
52535
|
1136
|
18
|
2026-04-20T07:21:25.043978+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-20/1776 /Users/lukas/.screenpipe/data/data/2026-04-20/1776669685043_m1.jpg...
|
PhpStorm
|
Tip of the Day
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Select In
To quickly select the currently edited e Select In
To quickly select the currently edited element (a class, file, method, or field) in another view, press ⌥ F1 or call Navigate | Select In.
Did you find this tip useful?
Like
Dislike
Don't show tips on startup...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Select In\nTo quickly select the currently edited element (a class, file, method, or field) in another view, press ⌥ F1 or call Navigate | Select In.","depth":2,"value":"Select In\nTo quickly select the currently edited element (a class, file, method, or field) in another view, press ⌥ F1 or call Navigate | Select In.","help_text":"text/plain","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Did you find this tip useful?","depth":1,"bounds":{"left":0.0,"top":0.0,"width":0.11597222,"height":0.018888889},"role_description":"text"},{"role":"AXButton","text":"Like","depth":2,"bounds":{"left":0.0,"top":0.0,"width":0.022222223,"height":0.035555556},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Dislike","depth":2,"bounds":{"left":0.0,"top":0.0,"width":0.022222223,"height":0.035555556},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Don't show tips on startup","depth":1,"bounds":{"left":0.0,"top":0.0,"width":0.14583333,"height":0.037777778},"role_description":"checkbox","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
1897411562653101953
|
-5509792402304150336
|
visual_change
|
accessibility
|
NULL
|
Select In
To quickly select the currently edited e Select In
To quickly select the currently edited element (a class, file, method, or field) in another view, press ⌥ F1 or call Navigate | Select In.
Did you find this tip useful?
Like
Dislike
Don't show tips on startup...
|
NULL
|
|
52526
|
1137
|
17
|
2026-04-20T07:19:36.483006+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-20/1776 /Users/lukas/.screenpipe/data/data/2026-04-20/1776669576483_m2.jpg...
|
PhpStorm
|
Tip of the Day
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Select In
To quickly select the currently edited e Select In
To quickly select the currently edited element (a class, file, method, or field) in another view, press ⌥ F1 or call Navigate | Select In.
Did you find this tip useful?
Like
Dislike
Don't show tips on startup
Close
Back
Next
Tip of the Day...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Select In\nTo quickly select the currently edited element (a class, file, method, or field) in another view, press ⌥ F1 or call Navigate | Select In.","depth":2,"bounds":{"left":0.41722074,"top":0.33758977,"width":0.16555852,"height":0.29289705},"value":"Select In\nTo quickly select the currently edited element (a class, file, method, or field) in another view, press ⌥ F1 or call Navigate | Select In.","help_text":"text/plain","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Did you find this tip useful?","depth":1,"bounds":{"left":0.50332445,"top":0.6432562,"width":0.055518616,"height":0.013567438},"role_description":"text"},{"role":"AXButton","text":"Like","depth":2,"bounds":{"left":0.56150264,"top":0.6368715,"width":0.010638298,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Dislike","depth":2,"bounds":{"left":0.57214093,"top":0.6368715,"width":0.010638298,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Don't show tips on startup","depth":1,"bounds":{"left":0.41722074,"top":0.67996806,"width":0.06981383,"height":0.027134877},"role_description":"checkbox","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close","depth":1,"bounds":{"left":0.50099736,"top":0.67996806,"width":0.025930852,"height":0.027134877},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Back","depth":1,"bounds":{"left":0.52892286,"top":0.67996806,"width":0.025930852,"height":0.027134877},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next","depth":1,"bounds":{"left":0.5568484,"top":0.67996806,"width":0.025930852,"height":0.027134877},"role_description":"button","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Tip of the Day","depth":1,"bounds":{"left":0.484375,"top":0.3048683,"width":0.03125,"height":0.012769354},"role_description":"text"}]...
|
-8434221441983544890
|
1407881917106439412
|
visual_change
|
accessibility
|
NULL
|
Select In
To quickly select the currently edited e Select In
To quickly select the currently edited element (a class, file, method, or field) in another view, press ⌥ F1 or call Navigate | Select In.
Did you find this tip useful?
Like
Dislike
Don't show tips on startup
Close
Back
Next
Tip of the Day...
|
NULL
|
|
52528
|
1137
|
18
|
2026-04-20T07:20:06.902842+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-20/1776 /Users/lukas/.screenpipe/data/data/2026-04-20/1776669606902_m2.jpg...
|
PhpStorm
|
Tip of the Day
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Select In
To quickly select the currently edited e Select In
To quickly select the currently edited element (a class, file, method, or field) in another view, press ⌥ F1 or call Navigate | Select In.
Did you find this tip useful?
Like
Dislike
Don't show tips on startup
Close
Back
Next
Tip of the Day...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Select In\nTo quickly select the currently edited element (a class, file, method, or field) in another view, press ⌥ F1 or call Navigate | Select In.","depth":2,"bounds":{"left":0.41722074,"top":0.33758977,"width":0.16555852,"height":0.29289705},"value":"Select In\nTo quickly select the currently edited element (a class, file, method, or field) in another view, press ⌥ F1 or call Navigate | Select In.","help_text":"text/plain","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Did you find this tip useful?","depth":1,"bounds":{"left":0.50332445,"top":0.6432562,"width":0.055518616,"height":0.013567438},"role_description":"text"},{"role":"AXButton","text":"Like","depth":2,"bounds":{"left":0.56150264,"top":0.6368715,"width":0.010638298,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Dislike","depth":2,"bounds":{"left":0.57214093,"top":0.6368715,"width":0.010638298,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Don't show tips on startup","depth":1,"bounds":{"left":0.41722074,"top":0.67996806,"width":0.06981383,"height":0.027134877},"role_description":"checkbox","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close","depth":1,"bounds":{"left":0.50099736,"top":0.67996806,"width":0.025930852,"height":0.027134877},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Back","depth":1,"bounds":{"left":0.52892286,"top":0.67996806,"width":0.025930852,"height":0.027134877},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next","depth":1,"bounds":{"left":0.5568484,"top":0.67996806,"width":0.025930852,"height":0.027134877},"role_description":"button","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Tip of the Day","depth":1,"bounds":{"left":0.484375,"top":0.3048683,"width":0.03125,"height":0.012769354},"role_description":"text"}]...
|
-8434221441983544890
|
1407881917106439412
|
idle
|
accessibility
|
NULL
|
Select In
To quickly select the currently edited e Select In
To quickly select the currently edited element (a class, file, method, or field) in another view, press ⌥ F1 or call Navigate | Select In.
Did you find this tip useful?
Like
Dislike
Don't show tips on startup
Close
Back
Next
Tip of the Day...
|
52526
|