|
36397
|
NULL
|
0
|
2026-05-13T14:11:40.435822+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778681500435_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
master, menu
Start Listen Project: faVsco.js, menu
master, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"master, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.034242023,"height":0.025538707},"on_screen":true,"help_text":"Git Branch: master","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.8081782,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AskJiminnyReportActivityServiceTest","depth":6,"bounds":{"left":0.8234708,"top":0.019952115,"width":0.09208777,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AskJiminnyReportActivityServiceTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AskJiminnyReportActivityServiceTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-4235983745889776938
|
-8204421443435123770
|
idle
|
hybrid
|
NULL
|
Project: faVsco.js, menu
master, menu
Start Listen Project: faVsco.js, menu
master, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
PhostormVIewINavigareCodeKeractorFV faVsco.js°9 JY-20891-improve-sms-text-relaysProledey© MailboxController.phpM MakefileJ package-lock.json= phpstan.neon.dist= phpstan-baseline.neon<> phpunit.xmlTaraw_sqL_query.sqMLPEADME mdC) TextRelayService.onp© Sso.phpossocontroller.ong© TextMessa©smsmessage.ong© SmsLength.php© TextRelay.phpService/Search.php x © ActivityStatusin.phpclass SearchM A10 A V< sonar-project.propertiesE test.py‹› Untitea Diagram.Xmiis vetur.config.jsM+ WEBHOOK_FILTERING_IMPLEM› ih External Librariesv E° Scratches and Consolesv C Database ConsolesV AEU& console EUl& DEALRISKS EUIA DI (EU)AEUEUvdiminnv@localhostA console fiminnv@localho# DI lliminnv@localhost4 HS local fiminnv@localhd4 SF [jiminny@localhost]Azoho dev fiminnvalocall• DROn# concole [ROnll# concole 1 [pponlA DI (PRODI› AQAЛAAI› A QAI PRODA STAGINGA console [STAGINGIA console 1 [STAGING]& uranus STAGING> C Extensionsv @ ScratchesEphostorm_shortcuts.txt=° scratch.txt{° scratch_1.ison{° scratch 2 ison<° scratch 3lison125= scratch 4 txtphe scratch 5.ohnphe scratch 6.ohnSscratch 7isonscratch R.isonstaae? ison= toctselt s...iprivate function createSearch(Query $query, Searchable|string $modelOrindex): Elastica \Searchif (request() && request()->has('debug')) {"dehua' => requesto->aet('dehua')'userUuid' => request(->user?->getIdString) ?? 'anonymous','query' => ison_encode(Squery->toArrayOflaas: LISON THROW ON ERROR).'url' => request->fullUrlO,1):— 96recurn schis->cllent-›createIndex( indexName: $model0rIndex instanceof Searchable ? Smodel0rIndex->getIndex() : $model0r 94->createsearch squery)96public function scroll(Query Squery. Searchable|string Smodel): Elastica\Scroll{...}98100* dparam searchablestrino smodelurindex usaoe of model 1s deprecated102* dreturn Lazucollection<int. Document>public function scrolloverDocuments(query Squery, SearchabLe|string SmodeLOrIndex): LazyCollection(...* I105Lix** Aoaran Searchable|strina Snodel0rIndey usage of model is denrecatedT109public function search(Query $query, Searchablelstring $modelOrIndex, ?string $queryName = null): Elastica 11€Datadog::increment( stats: 'jiminny.es.search', sampleRate: 1, ['query' => $queryName ?? "']);—112$before = microtime( as_float: true);Sresult = $this->createSearch($query, Smodel0rIndex)->search0:117Cofton = micnotimed as tloat: true)"Datadog:: timing( stat: "jiminny.es.search.time', (int) (($after - $before) * 1000)sampleRate: 1, ['quer: 120return sresult.• sonnt Keview • In 21m100% L2• Wed 13 May 15:33:40AskJiminnyReportActivityServiceTest v= custom.logscratch. &.ison= laravel.logA SF jiminny@localhost]« HS_local [jiminny@localhost] X console [PROD]cascadeA console (EU]A console [STACINClrial Owner Role SeleRetactoring User EmaDashboard Activity De+0 ..~/Library/Application Support/JetBrains/PhpStorm2026.1/consoles/db/5b1549d5-9876-4d9e-9ce3-025f12a83283/console.sait is there lust didn't include it "tracks"D69.select * from opportunities where team id = 2 and erm providen id TN (1374720564° 1145274235891 1490086191 X565571wsELEcT * FruM opportunity contacts whERE opportunity 1d = '414'*SELECT * FROM opportunity_contacts WHERE crm_provider_id = '131501';select * rrom contacts where 1d in (414. 464)1select * from activities where crm confiquration 1d = 2select settinas from crm conficurations where 1d = 11:Perfect - the activity has both video and audio tracks, so it would pass the ActivityRecorded filter even if appliedselect * From teams: # 1. 2select * from users;select * from crm_configurations where id = 39;select * from team_features where team_id = 2›select * from features;# SELECT * FROM opportunities WHERE crm_configuration_id = 2order by id desc;# and crm_provider_id = '49908861993';|Confirmed Fields (All Pass V)•• status : "failed" - Included in default status filtertype: "conference" - Allowed activity typeVis private : false - Passes privacy filter• V is internal: false - Should be visible• V actual_start_time : "2026-05-12 13:14:08" - Required field existsvtracks: Has video + audio tracks - Passes recorded tilterNext Stens to Deouaselect * from activity providers where id IN (443, 202, 203, 227):Since all fields nass the filters. check these:1. Date Range Selected in Dashboardselect * from activity imports where id = 795889:What date range is the user viewing? The detault is last 90 days. May 12, 2026 should be within range, but verity theselect c.id, c.provider, c.settings, t.* from teams t join crm confiqurations c 1<->1.n: on t.id = c.team_idactual Start date and end date parameters in te dasnooaro recuestwhere c.provider = 'hubspot'2. User/Team ScopeIs user 29089 (Line Kristensen) viewina her own dashboard? Verifv.select * from crm confiqurations crm JOIN teams + 1..n<->1: on crm.team id = t.id• User belonas to team 575 (NationBuilder) 7• User's group (Sales Team) has team_id: 575 VSELE * FROM teamsWHERE 1d = 311SELECT * FROM users WHERE id = 257;opportunities WHERE team 1d = 2• Check it RestrictTeam or RestrictUserGroupScope filters are excluding this3. Sxolicit Filter ValuesCheck if the dashboard request is passing explicit filter values that might exclude this activity, particularly:select * from opportunity_contacts where opportunity_id = 5124;select * fron contacts where id TN (3850.3853. 3851. 4073.4140.4155.4480.4530.4623. 5986. 513. 687. 1806. 1523. 3613) |activity status_values - might be set to only "completed"•only recorded activities - miaht be exolicitly set despite the override4. Actual Elasticsearch Quervselect * from activities where eom confiaunation id = 13.SELECT * FROM activities WHERE uuid_to_bin('826619ce-ec8e-4e59-8467-a01f5f6ad71e') = uuid; # 418141|Add logging in TeamInsightsRepository::getDashboardActivity0verTime to capture the exact Elasticsearch querybeina executed and see why this activitv is excluded!Most likely cause: Either the date range filter is excluding it, or an explicit filter value is being passed that overrides thedefault behavionselect id, team id, crm provider id from crm confiqurations where provider = 'hubspot' and crm provider id IS NOT NULSELECT * FROM accounts WHERE team id = 2 and crm provider id = '1212213464' order by id desc:SSISCT + SP0M contactc WHGPEteam id = 2 and account id = 5189 order by id desc:SELECT * FROM contacts WHERE team id = 2 order by id desc:select * from opportunity contacts where contact id = 6223:SELECT * FROM opportunities WHERE team id = 2 and account id = 5189 order by id desr.al .Ask anvthina (84L)"Code SWF-1.6•0 1.select * from erm profiles where crm confiquration id = 2:WN Windsurf Teams121-1UTF.A...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
36381
|
1360
|
14
|
2026-05-13T14:09:08.257782+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778681348257_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhostormVIewINavigareCodeKeractorFV faVsco.js°9 JY PhostormVIewINavigareCodeKeractorFV faVsco.js°9 JY-20891-improve-sms-text-relaysProledey© MailboxController.phpM MakefileJ package-lock.json= phpstan.neon.dist= phpstan-baseline.neon<> phpunit.xmlTaraw_sqL_query.sqMLPEADME mdC) TextRelayService.onp© Sso.phpossocontroller.ong© TextMessa©smsmessage.ong© SmsLength.php© TextRelay.phpService/Search.php x © ActivityStatusin.phpclass SearchM A10 A V< sonar-project.propertiesE test.py‹› Untitea Diagram.Xmiis vetur.config.jsM+ WEBHOOK_FILTERING_IMPLEM› ih External Librariesv E° Scratches and Consolesv C Database ConsolesV AEU& console EUl& DEALRISKS EUIA DI (EU)AEUEUvdiminnv@localhostA console fiminnv@localho# DI lliminnv@localhost4 HS local fiminnv@localhd4 SF [jiminny@localhost]Azoho dev fiminnvalocall• DROn# concole [ROnll# concole 1 [pponlA DI (PRODI› AQAЛAAI› A QAI PRODA STAGINGA console [STAGINGIA console 1 [STAGING]& uranus STAGING> C Extensionsv @ ScratchesEphostorm_shortcuts.txt=° scratch.txt{° scratch_1.ison{° scratch 2 ison<° scratch 3lison125= scratch 4 txtphe scratch 5.ohnphe scratch 6.ohnSscratch 7isonscratch R.isonstaae? ison= toctselt s...iprivate function createSearch(Query $query, Searchable|string $modelOrindex): Elastica \Searchif (request() && request()->has('debug')) {"dehua' => requesto->aet('dehua')'userUuid' => request(->user?->getIdString) ?? 'anonymous','query' => ison_encode(Squery->toArrayOflaas: LISON THROW ON ERROR).'url' => request->fullUrlO,1):— 96recurn schis->cllent-›createIndex( indexName: $model0rIndex instanceof Searchable ? Smodel0rIndex->getIndex() : $model0r 94->createsearch squery)96public function scroll(Query Squery. Searchable|string Smodel): Elastica\Scroll{...}98100* dparam searchablestrino smodelurindex usaoe of model 1s deprecated102* dreturn Lazucollection<int. Document>public function scrolloverDocuments(query Squery, SearchabLe|string SmodeLOrIndex): LazyCollection(...* I105Lix** Aoaran Searchable|strina Snodel0rIndey usage of model is denrecatedT109public function search(Query $query, Searchablelstring $modelOrIndex, ?string $queryName = null): Elastica 11€Datadog::increment( stats: 'jiminny.es.search', sampleRate: 1, ['query' => $queryName ?? "']);—112$before = microtime( as_float: true);Sresult = $this->createSearch($query, Smodel0rIndex)->search0:117Cofton = micnotimed as tloat: true)"Datadog:: timing( stat: "jiminny.es.search.time', (int) (($after - $before) * 1000)sampleRate: 1, ['quer: 120return sresult.• sonnt Keview • In 21m100% L2• Wed 13 May 15:33:40AskJiminnyReportActivityServiceTest v= custom.logscratch. &.ison= laravel.logA SF jiminny@localhost]« HS_local [jiminny@localhost] X console [PROD]cascadeA console (EU]A console [STACINClrial Owner Role SeleRetactoring User EmaDashboard Activity De+0 ..~/Library/Application Support/JetBrains/PhpStorm2026.1/consoles/db/5b1549d5-9876-4d9e-9ce3-025f12a83283/console.sait is there lust didn't include it "tracks"D69.select * from opportunities where team id = 2 and erm providen id TN (1374720564° 1145274235891 1490086191 X565571wsELEcT * FruM opportunity contacts whERE opportunity 1d = '414'*SELECT * FROM opportunity_contacts WHERE crm_provider_id = '131501';select * rrom contacts where 1d in (414. 464)1select * from activities where crm confiquration 1d = 2select settinas from crm conficurations where 1d = 11:Perfect - the activity has both video and audio tracks, so it would pass the ActivityRecorded filter even if appliedselect * From teams: # 1. 2select * from users;select * from crm_configurations where id = 39;select * from team_features where team_id = 2›select * from features;# SELECT * FROM opportunities WHERE crm_configuration_id = 2order by id desc;# and crm_provider_id = '49908861993';|Confirmed Fields (All Pass V)•• status : "failed" - Included in default status filtertype: "conference" - Allowed activity typeVis private : false - Passes privacy filter• V is internal: false - Should be visible• V actual_start_time : "2026-05-12 13:14:08" - Required field existsvtracks: Has video + audio tracks - Passes recorded tilterNext Stens to Deouaselect * from activity providers where id IN (443, 202, 203, 227):Since all fields nass the filters. check these:1. Date Range Selected in Dashboardselect * from activity imports where id = 795889:What date range is the user viewing? The detault is last 90 days. May 12, 2026 should be within range, but verity theselect c.id, c.provider, c.settings, t.* from teams t join crm confiqurations c 1<->1.n: on t.id = c.team_idactual Start date and end date parameters in te dasnooaro recuestwhere c.provider = 'hubspot'2. User/Team ScopeIs user 29089 (Line Kristensen) viewina her own dashboard? Verifv.select * from crm confiqurations crm JOIN teams + 1..n<->1: on crm.team id = t.id• User belonas to team 575 (NationBuilder) 7• User's group (Sales Team) has team_id: 575 VSELE * FROM teamsWHERE 1d = 311SELECT * FROM users WHERE id = 257;opportunities WHERE team 1d = 2• Check it RestrictTeam or RestrictUserGroupScope filters are excluding this3. Sxolicit Filter ValuesCheck if the dashboard request is passing explicit filter values that might exclude this activity, particularly:select * from opportunity_contacts where opportunity_id = 5124;select * fron contacts where id TN (3850.3853. 3851. 4073.4140.4155.4480.4530.4623. 5986. 513. 687. 1806. 1523. 3613) |activity status_values - might be set to only "completed"•only recorded activities - miaht be exolicitly set despite the override4. Actual Elasticsearch Quervselect * from activities where eom confiaunation id = 13.SELECT * FROM activities WHERE uuid_to_bin('826619ce-ec8e-4e59-8467-a01f5f6ad71e') = uuid; # 418141|Add logging in TeamInsightsRepository::getDashboardActivity0verTime to capture the exact Elasticsearch querybeina executed and see why this activitv is excluded!Most likely cause: Either the date range filter is excluding it, or an explicit filter value is being passed that overrides thedefault behavionselect id, team id, crm provider id from crm confiqurations where provider = 'hubspot' and crm provider id IS NOT NULSELECT * FROM accounts WHERE team id = 2 and crm provider id = '1212213464' order by id desc:SSISCT + SP0M contactc WHGPEteam id = 2 and account id = 5189 order by id desc:SELECT * FROM contacts WHERE team id = 2 order by id desc:select * from opportunity contacts where contact id = 6223:SELECT * FROM opportunities WHERE team id = 2 and account id = 5189 order by id desr.al .Ask anvthina (84L)"Code SWF-1.6•0 1.select * from erm profiles where crm confiquration id = 2:WN Windsurf Teams121-1UTF.A...
|
NULL
|
1837425836067260207
|
NULL
|
click
|
ocr
|
NULL
|
PhostormVIewINavigareCodeKeractorFV faVsco.js°9 JY PhostormVIewINavigareCodeKeractorFV faVsco.js°9 JY-20891-improve-sms-text-relaysProledey© MailboxController.phpM MakefileJ package-lock.json= phpstan.neon.dist= phpstan-baseline.neon<> phpunit.xmlTaraw_sqL_query.sqMLPEADME mdC) TextRelayService.onp© Sso.phpossocontroller.ong© TextMessa©smsmessage.ong© SmsLength.php© TextRelay.phpService/Search.php x © ActivityStatusin.phpclass SearchM A10 A V< sonar-project.propertiesE test.py‹› Untitea Diagram.Xmiis vetur.config.jsM+ WEBHOOK_FILTERING_IMPLEM› ih External Librariesv E° Scratches and Consolesv C Database ConsolesV AEU& console EUl& DEALRISKS EUIA DI (EU)AEUEUvdiminnv@localhostA console fiminnv@localho# DI lliminnv@localhost4 HS local fiminnv@localhd4 SF [jiminny@localhost]Azoho dev fiminnvalocall• DROn# concole [ROnll# concole 1 [pponlA DI (PRODI› AQAЛAAI› A QAI PRODA STAGINGA console [STAGINGIA console 1 [STAGING]& uranus STAGING> C Extensionsv @ ScratchesEphostorm_shortcuts.txt=° scratch.txt{° scratch_1.ison{° scratch 2 ison<° scratch 3lison125= scratch 4 txtphe scratch 5.ohnphe scratch 6.ohnSscratch 7isonscratch R.isonstaae? ison= toctselt s...iprivate function createSearch(Query $query, Searchable|string $modelOrindex): Elastica \Searchif (request() && request()->has('debug')) {"dehua' => requesto->aet('dehua')'userUuid' => request(->user?->getIdString) ?? 'anonymous','query' => ison_encode(Squery->toArrayOflaas: LISON THROW ON ERROR).'url' => request->fullUrlO,1):— 96recurn schis->cllent-›createIndex( indexName: $model0rIndex instanceof Searchable ? Smodel0rIndex->getIndex() : $model0r 94->createsearch squery)96public function scroll(Query Squery. Searchable|string Smodel): Elastica\Scroll{...}98100* dparam searchablestrino smodelurindex usaoe of model 1s deprecated102* dreturn Lazucollection<int. Document>public function scrolloverDocuments(query Squery, SearchabLe|string SmodeLOrIndex): LazyCollection(...* I105Lix** Aoaran Searchable|strina Snodel0rIndey usage of model is denrecatedT109public function search(Query $query, Searchablelstring $modelOrIndex, ?string $queryName = null): Elastica 11€Datadog::increment( stats: 'jiminny.es.search', sampleRate: 1, ['query' => $queryName ?? "']);—112$before = microtime( as_float: true);Sresult = $this->createSearch($query, Smodel0rIndex)->search0:117Cofton = micnotimed as tloat: true)"Datadog:: timing( stat: "jiminny.es.search.time', (int) (($after - $before) * 1000)sampleRate: 1, ['quer: 120return sresult.• sonnt Keview • In 21m100% L2• Wed 13 May 15:33:40AskJiminnyReportActivityServiceTest v= custom.logscratch. &.ison= laravel.logA SF jiminny@localhost]« HS_local [jiminny@localhost] X console [PROD]cascadeA console (EU]A console [STACINClrial Owner Role SeleRetactoring User EmaDashboard Activity De+0 ..~/Library/Application Support/JetBrains/PhpStorm2026.1/consoles/db/5b1549d5-9876-4d9e-9ce3-025f12a83283/console.sait is there lust didn't include it "tracks"D69.select * from opportunities where team id = 2 and erm providen id TN (1374720564° 1145274235891 1490086191 X565571wsELEcT * FruM opportunity contacts whERE opportunity 1d = '414'*SELECT * FROM opportunity_contacts WHERE crm_provider_id = '131501';select * rrom contacts where 1d in (414. 464)1select * from activities where crm confiquration 1d = 2select settinas from crm conficurations where 1d = 11:Perfect - the activity has both video and audio tracks, so it would pass the ActivityRecorded filter even if appliedselect * From teams: # 1. 2select * from users;select * from crm_configurations where id = 39;select * from team_features where team_id = 2›select * from features;# SELECT * FROM opportunities WHERE crm_configuration_id = 2order by id desc;# and crm_provider_id = '49908861993';|Confirmed Fields (All Pass V)•• status : "failed" - Included in default status filtertype: "conference" - Allowed activity typeVis private : false - Passes privacy filter• V is internal: false - Should be visible• V actual_start_time : "2026-05-12 13:14:08" - Required field existsvtracks: Has video + audio tracks - Passes recorded tilterNext Stens to Deouaselect * from activity providers where id IN (443, 202, 203, 227):Since all fields nass the filters. check these:1. Date Range Selected in Dashboardselect * from activity imports where id = 795889:What date range is the user viewing? The detault is last 90 days. May 12, 2026 should be within range, but verity theselect c.id, c.provider, c.settings, t.* from teams t join crm confiqurations c 1<->1.n: on t.id = c.team_idactual Start date and end date parameters in te dasnooaro recuestwhere c.provider = 'hubspot'2. User/Team ScopeIs user 29089 (Line Kristensen) viewina her own dashboard? Verifv.select * from crm confiqurations crm JOIN teams + 1..n<->1: on crm.team id = t.id• User belonas to team 575 (NationBuilder) 7• User's group (Sales Team) has team_id: 575 VSELE * FROM teamsWHERE 1d = 311SELECT * FROM users WHERE id = 257;opportunities WHERE team 1d = 2• Check it RestrictTeam or RestrictUserGroupScope filters are excluding this3. Sxolicit Filter ValuesCheck if the dashboard request is passing explicit filter values that might exclude this activity, particularly:select * from opportunity_contacts where opportunity_id = 5124;select * fron contacts where id TN (3850.3853. 3851. 4073.4140.4155.4480.4530.4623. 5986. 513. 687. 1806. 1523. 3613) |activity status_values - might be set to only "completed"•only recorded activities - miaht be exolicitly set despite the override4. Actual Elasticsearch Quervselect * from activities where eom confiaunation id = 13.SELECT * FROM activities WHERE uuid_to_bin('826619ce-ec8e-4e59-8467-a01f5f6ad71e') = uuid; # 418141|Add logging in TeamInsightsRepository::getDashboardActivity0verTime to capture the exact Elasticsearch querybeina executed and see why this activitv is excluded!Most likely cause: Either the date range filter is excluding it, or an explicit filter value is being passed that overrides thedefault behavionselect id, team id, crm provider id from crm confiqurations where provider = 'hubspot' and crm provider id IS NOT NULSELECT * FROM accounts WHERE team id = 2 and crm provider id = '1212213464' order by id desc:SSISCT + SP0M contactc WHGPEteam id = 2 and account id = 5189 order by id desc:SELECT * FROM contacts WHERE team id = 2 order by id desc:select * from opportunity contacts where contact id = 6223:SELECT * FROM opportunities WHERE team id = 2 and account id = 5189 order by id desr.al .Ask anvthina (84L)"Code SWF-1.6•0 1.select * from erm profiles where crm confiquration id = 2:WN Windsurf Teams121-1UTF.A...
|
36379
|
NULL
|
NULL
|
NULL
|
|
36380
|
1359
|
11
|
2026-05-13T14:09:08.286599+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778681348286_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp>0 lыlec2-user@ip-10-30-129-190:~883-zshSprint Review - in 27 mA100% C8• Wed 13 May 15:33:40181DOCKERC *1DEV (docker)Last login: Wed May 13 09:16:21 on ttys010982APP (-zsh)84screenpipe"• ₴5Poetry could not find a pyproject.toml file in /Users/lukas or its parentsPoetry could not find a pyproject.toml file in /Users/lukas or its parentslukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ ssh jiminny-prod-ecs1 -L 7970:vpc-activities7g-t6nxe5qk7zis7pa5i7qlmp3zwm.us-east-2.es.amazonaws.com:80Enter MFA code for arn:aws:iam::438740370364:mfa/[EMAIL]:Warning: Permanently added 'jiminny-prod-ecs1' (ED25519) to the list of known hosts.A newer release of "Amazon Linux" is available.Version 2023.10.20260330:Version 2023.11.20260406:Version 2023.11.20260413:Version 2023.11.20260427:Version 2023.11.20260505:Version 2023.11.20260509:Run "/usr/bin/dnf check-release-update" for full release and version update info#_####_\_#####\\###|\#/v~'Amazon Linux 2023 (ECS Optimized)ec2-user@ip-10-30-129-190:~ (. 26Im/*Fordocumentation,visit [URL_WITH_CREDENTIALS] ~]$ ||...
|
NULL
|
5725358035782193467
|
NULL
|
click
|
ocr
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp>0 lыlec2-user@ip-10-30-129-190:~883-zshSprint Review - in 27 mA100% C8• Wed 13 May 15:33:40181DOCKERC *1DEV (docker)Last login: Wed May 13 09:16:21 on ttys010982APP (-zsh)84screenpipe"• ₴5Poetry could not find a pyproject.toml file in /Users/lukas or its parentsPoetry could not find a pyproject.toml file in /Users/lukas or its parentslukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ ssh jiminny-prod-ecs1 -L 7970:vpc-activities7g-t6nxe5qk7zis7pa5i7qlmp3zwm.us-east-2.es.amazonaws.com:80Enter MFA code for arn:aws:iam::438740370364:mfa/[EMAIL]:Warning: Permanently added 'jiminny-prod-ecs1' (ED25519) to the list of known hosts.A newer release of "Amazon Linux" is available.Version 2023.10.20260330:Version 2023.11.20260406:Version 2023.11.20260413:Version 2023.11.20260427:Version 2023.11.20260505:Version 2023.11.20260509:Run "/usr/bin/dnf check-release-update" for full release and version update info#_####_\_#####\\###|\#/v~'Amazon Linux 2023 (ECS Optimized)ec2-user@ip-10-30-129-190:~ (. 26Im/*Fordocumentation,visit [URL_WITH_CREDENTIALS] ~]$ ||...
|
36374
|
NULL
|
NULL
|
NULL
|
|
36379
|
1360
|
13
|
2026-05-13T14:09:01.518564+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778681341518_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhostormVIewINavigareCodeKeractorFV faVsco.js°9 JY PhostormVIewINavigareCodeKeractorFV faVsco.js°9 JY-20891-improve-sms-text-relaysProledey© MailboxController.phpM MakefileJ package-lock.json= phpstan.neon.dist= phpstan-baseline.neon<> phpunit.xmlTaraw_sqL_query.sqMLPEADME mdC) TextRelayService.onp© Sso.phpossocontroller.ong© TextMessa©smsmessage.ong© SmsLength.php© TextRelay.phpService/Search.php x © ActivityStatusin.phpclass SearchM A10 A V< sonar-project.propertiesE test.py‹› Untitea Diagram.Xmiis vetur.config.jsM+ WEBHOOK_FILTERING_IMPLEM› ih External Librariesv E° Scratches and Consolesv C Database ConsolesV AEU& console EUl& DEALRISKS EUIA DI (EU)AEUEUvdiminnv@localhostA console fiminnv@localho# DI lliminnv@localhost4 HS local fiminnv@localhd4 SF [jiminny@localhost]Azoho dev fiminnvalocall• DROn# concole [ROnll# concole 1 [pponlA DI (PRODI› AQAЛAAI› A QAI PRODA STAGINGA console [STAGINGIA console 1 [STAGING]& uranus STAGING> C Extensionsv @ ScratchesEphostorm_shortcuts.txt=° scratch.txt{° scratch_1.ison{° scratch 2 ison<° scratch 3lison125= scratch 4 txtphe scratch 5.ohnphe scratch 6.ohnSscratch 7isonscratch R.isonstaae? ison= toctselt s...iprivate function createSearch(Query $query, Searchable|string $modelOrindex): Elastica \Searchif (request() && request()->has('debug')) {"dehua' => requesto->aet('dehua')'userUuid' => request(->user?->getIdString) ?? 'anonymous','query' => ison_encode(Squery->toArrayOflaas: LISON THROW ON ERROR).'url' => request->fullUrlO,1):— 96recurn schis->cllent-›createIndex( indexName: $model0rIndex instanceof Searchable ? Smodel0rIndex->getIndex() : $model0r 94->createsearch squery)96public function scroll(Query Squery. Searchable|string Smodel): Elastica\Scroll{...}98100* dparam searchablestrino smodelurindex usaoe of model 1s deprecated102* dreturn Lazucollection<int. Document>public function scrolloverDocuments(query Squery, SearchabLe|string SmodeLOrIndex): LazyCollection(...* I105Lix** Aoaran Searchable|strina Snodel0rIndey usage of model is denrecatedT109public function search(Query $query, Searchablelstring $modelOrIndex, ?string $queryName = null): Elastica 11€Datadog::increment( stats: 'jiminny.es.search', sampleRate: 1, ['query' => $queryName ?? "']);—112$before = microtime( as_float: true);Sresult = $this->createSearch($query, Smodel0rIndex)->search0:117Cofton = micnotimed as tloat: true)"Datadog:: timing( stat: "jiminny.es.search.time', (int) (($after - $before) * 1000)sampleRate: 1, ['quer: 120return sresult.• sonnt Keview • In 21m100% L2• Wed 13 May 15:33:40AskJiminnyReportActivityServiceTest v= custom.logscratch. &.ison= laravel.logA SF jiminny@localhost]« HS_local [jiminny@localhost] X console [PROD]cascadeA console (EU]A console [STACINClrial Owner Role SeleRetactoring User EmaDashboard Activity De+0 ..~/Library/Application Support/JetBrains/PhpStorm2026.1/consoles/db/5b1549d5-9876-4d9e-9ce3-025f12a83283/console.sait is there lust didn't include it "tracks"D69.select * from opportunities where team id = 2 and erm providen id TN (1374720564° 1145274235891 1490086191 X565571wsELEcT * FruM opportunity contacts whERE opportunity 1d = '414'*SELECT * FROM opportunity_contacts WHERE crm_provider_id = '131501';select * rrom contacts where 1d in (414. 464)1select * from activities where crm confiquration 1d = 2select settinas from crm conficurations where 1d = 11:Perfect - the activity has both video and audio tracks, so it would pass the ActivityRecorded filter even if appliedselect * From teams: # 1. 2select * from users;select * from crm_configurations where id = 39;select * from team_features where team_id = 2›select * from features;# SELECT * FROM opportunities WHERE crm_configuration_id = 2order by id desc;# and crm_provider_id = '49908861993';|Confirmed Fields (All Pass V)•• status : "failed" - Included in default status filtertype: "conference" - Allowed activity typeVis private : false - Passes privacy filter• V is internal: false - Should be visible• V actual_start_time : "2026-05-12 13:14:08" - Required field existsvtracks: Has video + audio tracks - Passes recorded tilterNext Stens to Deouaselect * from activity providers where id IN (443, 202, 203, 227):Since all fields nass the filters. check these:1. Date Range Selected in Dashboardselect * from activity imports where id = 795889:What date range is the user viewing? The detault is last 90 days. May 12, 2026 should be within range, but verity theselect c.id, c.provider, c.settings, t.* from teams t join crm confiqurations c 1<->1.n: on t.id = c.team_idactual Start date and end date parameters in te dasnooaro recuestwhere c.provider = 'hubspot'2. User/Team ScopeIs user 29089 (Line Kristensen) viewina her own dashboard? Verifv.select * from crm confiqurations crm JOIN teams + 1..n<->1: on crm.team id = t.id• User belonas to team 575 (NationBuilder) 7• User's group (Sales Team) has team_id: 575 VSELE * FROM teamsWHERE 1d = 311SELECT * FROM users WHERE id = 257;opportunities WHERE team 1d = 2• Check it RestrictTeam or RestrictUserGroupScope filters are excluding this3. Sxolicit Filter ValuesCheck if the dashboard request is passing explicit filter values that might exclude this activity, particularly:select * from opportunity_contacts where opportunity_id = 5124;select * fron contacts where id TN (3850.3853. 3851. 4073.4140.4155.4480.4530.4623. 5986. 513. 687. 1806. 1523. 3613) |activity status_values - might be set to only "completed"•only recorded activities - miaht be exolicitly set despite the override4. Actual Elasticsearch Quervselect * from activities where eom confiaunation id = 13.SELECT * FROM activities WHERE uuid_to_bin('826619ce-ec8e-4e59-8467-a01f5f6ad71e') = uuid; # 418141|Add logging in TeamInsightsRepository::getDashboardActivity0verTime to capture the exact Elasticsearch querybeina executed and see why this activitv is excluded!Most likely cause: Either the date range filter is excluding it, or an explicit filter value is being passed that overrides thedefault behavionselect id, team id, crm provider id from crm confiqurations where provider = 'hubspot' and crm provider id IS NOT NULSELECT * FROM accounts WHERE team id = 2 and crm provider id = '1212213464' order by id desc:SSISCT + SP0M contactc WHGPEteam id = 2 and account id = 5189 order by id desc:SELECT * FROM contacts WHERE team id = 2 order by id desc:select * from opportunity contacts where contact id = 6223:SELECT * FROM opportunities WHERE team id = 2 and account id = 5189 order by id desr.al .Ask anvthina (84L)"Code SWF-1.6•0 1.select * from erm profiles where crm confiquration id = 2:WN Windsurf Teams121-1UTF.A...
|
NULL
|
1837425836067260207
|
NULL
|
click
|
ocr
|
NULL
|
PhostormVIewINavigareCodeKeractorFV faVsco.js°9 JY PhostormVIewINavigareCodeKeractorFV faVsco.js°9 JY-20891-improve-sms-text-relaysProledey© MailboxController.phpM MakefileJ package-lock.json= phpstan.neon.dist= phpstan-baseline.neon<> phpunit.xmlTaraw_sqL_query.sqMLPEADME mdC) TextRelayService.onp© Sso.phpossocontroller.ong© TextMessa©smsmessage.ong© SmsLength.php© TextRelay.phpService/Search.php x © ActivityStatusin.phpclass SearchM A10 A V< sonar-project.propertiesE test.py‹› Untitea Diagram.Xmiis vetur.config.jsM+ WEBHOOK_FILTERING_IMPLEM› ih External Librariesv E° Scratches and Consolesv C Database ConsolesV AEU& console EUl& DEALRISKS EUIA DI (EU)AEUEUvdiminnv@localhostA console fiminnv@localho# DI lliminnv@localhost4 HS local fiminnv@localhd4 SF [jiminny@localhost]Azoho dev fiminnvalocall• DROn# concole [ROnll# concole 1 [pponlA DI (PRODI› AQAЛAAI› A QAI PRODA STAGINGA console [STAGINGIA console 1 [STAGING]& uranus STAGING> C Extensionsv @ ScratchesEphostorm_shortcuts.txt=° scratch.txt{° scratch_1.ison{° scratch 2 ison<° scratch 3lison125= scratch 4 txtphe scratch 5.ohnphe scratch 6.ohnSscratch 7isonscratch R.isonstaae? ison= toctselt s...iprivate function createSearch(Query $query, Searchable|string $modelOrindex): Elastica \Searchif (request() && request()->has('debug')) {"dehua' => requesto->aet('dehua')'userUuid' => request(->user?->getIdString) ?? 'anonymous','query' => ison_encode(Squery->toArrayOflaas: LISON THROW ON ERROR).'url' => request->fullUrlO,1):— 96recurn schis->cllent-›createIndex( indexName: $model0rIndex instanceof Searchable ? Smodel0rIndex->getIndex() : $model0r 94->createsearch squery)96public function scroll(Query Squery. Searchable|string Smodel): Elastica\Scroll{...}98100* dparam searchablestrino smodelurindex usaoe of model 1s deprecated102* dreturn Lazucollection<int. Document>public function scrolloverDocuments(query Squery, SearchabLe|string SmodeLOrIndex): LazyCollection(...* I105Lix** Aoaran Searchable|strina Snodel0rIndey usage of model is denrecatedT109public function search(Query $query, Searchablelstring $modelOrIndex, ?string $queryName = null): Elastica 11€Datadog::increment( stats: 'jiminny.es.search', sampleRate: 1, ['query' => $queryName ?? "']);—112$before = microtime( as_float: true);Sresult = $this->createSearch($query, Smodel0rIndex)->search0:117Cofton = micnotimed as tloat: true)"Datadog:: timing( stat: "jiminny.es.search.time', (int) (($after - $before) * 1000)sampleRate: 1, ['quer: 120return sresult.• sonnt Keview • In 21m100% L2• Wed 13 May 15:33:40AskJiminnyReportActivityServiceTest v= custom.logscratch. &.ison= laravel.logA SF jiminny@localhost]« HS_local [jiminny@localhost] X console [PROD]cascadeA console (EU]A console [STACINClrial Owner Role SeleRetactoring User EmaDashboard Activity De+0 ..~/Library/Application Support/JetBrains/PhpStorm2026.1/consoles/db/5b1549d5-9876-4d9e-9ce3-025f12a83283/console.sait is there lust didn't include it "tracks"D69.select * from opportunities where team id = 2 and erm providen id TN (1374720564° 1145274235891 1490086191 X565571wsELEcT * FruM opportunity contacts whERE opportunity 1d = '414'*SELECT * FROM opportunity_contacts WHERE crm_provider_id = '131501';select * rrom contacts where 1d in (414. 464)1select * from activities where crm confiquration 1d = 2select settinas from crm conficurations where 1d = 11:Perfect - the activity has both video and audio tracks, so it would pass the ActivityRecorded filter even if appliedselect * From teams: # 1. 2select * from users;select * from crm_configurations where id = 39;select * from team_features where team_id = 2›select * from features;# SELECT * FROM opportunities WHERE crm_configuration_id = 2order by id desc;# and crm_provider_id = '49908861993';|Confirmed Fields (All Pass V)•• status : "failed" - Included in default status filtertype: "conference" - Allowed activity typeVis private : false - Passes privacy filter• V is internal: false - Should be visible• V actual_start_time : "2026-05-12 13:14:08" - Required field existsvtracks: Has video + audio tracks - Passes recorded tilterNext Stens to Deouaselect * from activity providers where id IN (443, 202, 203, 227):Since all fields nass the filters. check these:1. Date Range Selected in Dashboardselect * from activity imports where id = 795889:What date range is the user viewing? The detault is last 90 days. May 12, 2026 should be within range, but verity theselect c.id, c.provider, c.settings, t.* from teams t join crm confiqurations c 1<->1.n: on t.id = c.team_idactual Start date and end date parameters in te dasnooaro recuestwhere c.provider = 'hubspot'2. User/Team ScopeIs user 29089 (Line Kristensen) viewina her own dashboard? Verifv.select * from crm confiqurations crm JOIN teams + 1..n<->1: on crm.team id = t.id• User belonas to team 575 (NationBuilder) 7• User's group (Sales Team) has team_id: 575 VSELE * FROM teamsWHERE 1d = 311SELECT * FROM users WHERE id = 257;opportunities WHERE team 1d = 2• Check it RestrictTeam or RestrictUserGroupScope filters are excluding this3. Sxolicit Filter ValuesCheck if the dashboard request is passing explicit filter values that might exclude this activity, particularly:select * from opportunity_contacts where opportunity_id = 5124;select * fron contacts where id TN (3850.3853. 3851. 4073.4140.4155.4480.4530.4623. 5986. 513. 687. 1806. 1523. 3613) |activity status_values - might be set to only "completed"•only recorded activities - miaht be exolicitly set despite the override4. Actual Elasticsearch Quervselect * from activities where eom confiaunation id = 13.SELECT * FROM activities WHERE uuid_to_bin('826619ce-ec8e-4e59-8467-a01f5f6ad71e') = uuid; # 418141|Add logging in TeamInsightsRepository::getDashboardActivity0verTime to capture the exact Elasticsearch querybeina executed and see why this activitv is excluded!Most likely cause: Either the date range filter is excluding it, or an explicit filter value is being passed that overrides thedefault behavionselect id, team id, crm provider id from crm confiqurations where provider = 'hubspot' and crm provider id IS NOT NULSELECT * FROM accounts WHERE team id = 2 and crm provider id = '1212213464' order by id desc:SSISCT + SP0M contactc WHGPEteam id = 2 and account id = 5189 order by id desc:SELECT * FROM contacts WHERE team id = 2 order by id desc:select * from opportunity contacts where contact id = 6223:SELECT * FROM opportunities WHERE team id = 2 and account id = 5189 order by id desr.al .Ask anvthina (84L)"Code SWF-1.6•0 1.select * from erm profiles where crm confiquration id = 2:WN Windsurf Teams121-1UTF.A...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
36258
|
1353
|
18
|
2026-05-13T13:55:13.912228+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778680513912_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp>0 lыlec2-user@ip-10-30-129-190:~883-zshSprint Review - in 27 mA100% C8• Wed 13 May 15:33:40181DOCKERC *1DEV (docker)Last login: Wed May 13 09:16:21 on ttys010982APP (-zsh)84screenpipe"• ₴5Poetry could not find a pyproject.toml file in /Users/lukas or its parentsPoetry could not find a pyproject.toml file in /Users/lukas or its parentslukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ ssh jiminny-prod-ecs1 -L 7970:vpc-activities7g-t6nxe5qk7zis7pa5i7qlmp3zwm.us-east-2.es.amazonaws.com:80Enter MFA code for arn:aws:iam::438740370364:mfa/[EMAIL]:Warning: Permanently added 'jiminny-prod-ecs1' (ED25519) to the list of known hosts.A newer release of "Amazon Linux" is available.Version 2023.10.20260330:Version 2023.11.20260406:Version 2023.11.20260413:Version 2023.11.20260427:Version 2023.11.20260505:Version 2023.11.20260509:Run "/usr/bin/dnf check-release-update" for full release and version update info#_####_\_#####\\###|\#/v~'Amazon Linux 2023 (ECS Optimized)ec2-user@ip-10-30-129-190:~ (. 26Im/*Fordocumentation,visit [URL_WITH_CREDENTIALS] ~]$ ||...
|
NULL
|
5725358035782193467
|
NULL
|
click
|
ocr
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp>0 lыlec2-user@ip-10-30-129-190:~883-zshSprint Review - in 27 mA100% C8• Wed 13 May 15:33:40181DOCKERC *1DEV (docker)Last login: Wed May 13 09:16:21 on ttys010982APP (-zsh)84screenpipe"• ₴5Poetry could not find a pyproject.toml file in /Users/lukas or its parentsPoetry could not find a pyproject.toml file in /Users/lukas or its parentslukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ ssh jiminny-prod-ecs1 -L 7970:vpc-activities7g-t6nxe5qk7zis7pa5i7qlmp3zwm.us-east-2.es.amazonaws.com:80Enter MFA code for arn:aws:iam::438740370364:mfa/[EMAIL]:Warning: Permanently added 'jiminny-prod-ecs1' (ED25519) to the list of known hosts.A newer release of "Amazon Linux" is available.Version 2023.10.20260330:Version 2023.11.20260406:Version 2023.11.20260413:Version 2023.11.20260427:Version 2023.11.20260505:Version 2023.11.20260509:Run "/usr/bin/dnf check-release-update" for full release and version update info#_####_\_#####\\###|\#/v~'Amazon Linux 2023 (ECS Optimized)ec2-user@ip-10-30-129-190:~ (. 26Im/*Fordocumentation,visit [URL_WITH_CREDENTIALS] ~]$ ||...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
36223
|
1354
|
0
|
2026-05-13T13:51:12.913992+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778680272913_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Code changed:
Hide
Sync Changes
Hide This Notification
<?php
namespace Jiminny\Console\Commands\Activities;
use Illuminate\Console\Command;
use Illuminate\Contracts\Events\Dispatcher;
use Jiminny\Contracts\ES\Events\UpdateSingleEntity;
use Jiminny\Contracts\ES\UpdateTargetEnum;
use Jiminny\Models\Activity;
class UpdateActivityElasticSearchDocumentCommand extends Command
{
protected $signature = 'activity:update:es {activityId}';
protected $description = 'Update ES document synchronously';
public function __construct(private readonly Dispatcher $eventDispatcher)
{
parent::__construct();
}
public function handle(): void
{
$activityId = $this->argument('activityId');
/** @var Activity $activity */
$activity = Activity::idOrUuId($activityId)->first();
$this->info('Sending activity for ES update...');
$this->eventDispatcher->dispatch(
new UpdateSingleEntity(
entityId: $activity->getId(),
updateTarget: UpdateTargetEnum::ACTIVITY,
purpose: 'cli-command-activity-update-es',
isSyncEvent: true,
)
);
$this->info('Done.');
}
}...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20891-improve-sms-text-relays, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.08843085,"height":0.025538707},"on_screen":true,"help_text":"Git Branch: JY-20891-improve-sms-text-relays","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.8081782,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AskJiminnyReportActivityServiceTest","depth":6,"bounds":{"left":0.8234708,"top":0.019952115,"width":0.09208777,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AskJiminnyReportActivityServiceTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AskJiminnyReportActivityServiceTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"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.27027926,"top":1.0,"width":0.042220745,"height":0.0},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\nnamespace Jiminny\\Console\\Commands\\Activities;\n\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Events\\Dispatcher;\nuse Jiminny\\Contracts\\ES\\Events\\UpdateSingleEntity;\nuse Jiminny\\Contracts\\ES\\UpdateTargetEnum;\nuse Jiminny\\Models\\Activity;\n\nclass UpdateActivityElasticSearchDocumentCommand extends Command\n{\n protected $signature = 'activity:update:es {activityId}';\n protected $description = 'Update ES document synchronously';\n\n public function __construct(private readonly Dispatcher $eventDispatcher)\n {\n parent::__construct();\n }\n\n public function handle(): void\n {\n $activityId = $this->argument('activityId');\n /** @var Activity $activity */\n $activity = Activity::idOrUuId($activityId)->first();\n $this->info('Sending activity for ES update...');\n\n $this->eventDispatcher->dispatch(\n new UpdateSingleEntity(\n entityId: $activity->getId(),\n updateTarget: UpdateTargetEnum::ACTIVITY,\n purpose: 'cli-command-activity-update-es',\n isSyncEvent: true,\n )\n );\n\n $this->info('Done.');\n }\n}","depth":4,"bounds":{"left":0.16722074,"top":0.1963288,"width":0.24069148,"height":0.782921},"on_screen":true,"lines":[{"char_start":0,"char_count":6,"bounds":{"left":0.16722074,"top":0.0,"width":0.012965426,"height":0.014365523}},{"char_start":7,"char_count":47,"bounds":{"left":0.16722074,"top":0.0,"width":0.119015954,"height":0.014365523}},{"char_start":55,"char_count":32,"bounds":{"left":0.16722074,"top":0.0,"width":0.010305851,"height":0.014365523}},{"char_start":87,"char_count":44,"bounds":{"left":0.1775266,"top":0.0,"width":0.0026595744,"height":0.014365523}},{"char_start":131,"char_count":52,"bounds":{"left":0.1775266,"top":0.0,"width":0.0026595744,"height":0.014365523}},{"char_start":183,"char_count":43,"bounds":{"left":0.1775266,"top":0.0,"width":0.0026595744,"height":0.014365523}},{"char_start":226,"char_count":29,"bounds":{"left":0.1775266,"top":0.0,"width":0.0076462766,"height":0.014365523}},{"char_start":256,"char_count":65,"bounds":{"left":0.16722074,"top":0.019952115,"width":0.16589096,"height":0.014365523}},{"char_start":321,"char_count":2,"bounds":{"left":0.16722074,"top":0.037509978,"width":0.0026595744,"height":0.014365523}},{"char_start":323,"char_count":62,"bounds":{"left":0.16722074,"top":0.055067837,"width":0.15791224,"height":0.014365523}},{"char_start":385,"char_count":65,"bounds":{"left":0.16722074,"top":0.0726257,"width":0.16589096,"height":0.014365523}},{"char_start":451,"char_count":78,"bounds":{"left":0.16722074,"top":0.10774142,"width":0.19946809,"height":0.014365523}},{"char_start":529,"char_count":6,"bounds":{"left":0.16722074,"top":0.12529927,"width":0.012965426,"height":0.014365523}}],"value":"<?php\n\nnamespace Jiminny\\Console\\Commands\\Activities;\n\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Events\\Dispatcher;\nuse Jiminny\\Contracts\\ES\\Events\\UpdateSingleEntity;\nuse Jiminny\\Contracts\\ES\\UpdateTargetEnum;\nuse Jiminny\\Models\\Activity;\n\nclass UpdateActivityElasticSearchDocumentCommand extends Command\n{\n protected $signature = 'activity:update:es {activityId}';\n protected $description = 'Update ES document synchronously';\n\n public function __construct(private readonly Dispatcher $eventDispatcher)\n {\n parent::__construct();\n }\n\n public function handle(): void\n {\n $activityId = $this->argument('activityId');\n /** @var Activity $activity */\n $activity = Activity::idOrUuId($activityId)->first();\n $this->info('Sending activity for ES update...');\n\n $this->eventDispatcher->dispatch(\n new UpdateSingleEntity(\n entityId: $activity->getId(),\n updateTarget: UpdateTargetEnum::ACTIVITY,\n purpose: 'cli-command-activity-update-es',\n isSyncEvent: true,\n )\n );\n\n $this->info('Done.');\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
7267224809832250378
|
-3671441499405218046
|
click
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Code changed:
Hide
Sync Changes
Hide This Notification
<?php
namespace Jiminny\Console\Commands\Activities;
use Illuminate\Console\Command;
use Illuminate\Contracts\Events\Dispatcher;
use Jiminny\Contracts\ES\Events\UpdateSingleEntity;
use Jiminny\Contracts\ES\UpdateTargetEnum;
use Jiminny\Models\Activity;
class UpdateActivityElasticSearchDocumentCommand extends Command
{
protected $signature = 'activity:update:es {activityId}';
protected $description = 'Update ES document synchronously';
public function __construct(private readonly Dispatcher $eventDispatcher)
{
parent::__construct();
}
public function handle(): void
{
$activityId = $this->argument('activityId');
/** @var Activity $activity */
$activity = Activity::idOrUuId($activityId)->first();
$this->info('Sending activity for ES update...');
$this->eventDispatcher->dispatch(
new UpdateSingleEntity(
entityId: $activity->getId(),
updateTarget: UpdateTargetEnum::ACTIVITY,
purpose: 'cli-command-activity-update-es',
isSyncEvent: true,
)
);
$this->info('Done.');
}
}...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
36222
|
NULL
|
0
|
2026-05-13T13:51:12.601362+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778680272601_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Code changed:
Hide
Sync Changes
Hide This Notification
<?php
namespace Jiminny\Console\Commands\Activities;
use Illuminate\Console\Command;
use Illuminate\Contracts\Events\Dispatcher;
use Jiminny\Contracts\ES\Events\UpdateSingleEntity;
use Jiminny\Contracts\ES\UpdateTargetEnum;
use Jiminny\Models\Activity;
class UpdateActivityElasticSearchDocumentCommand extends Command
{
protected $signature = 'activity:update:es {activityId}';
protected $description = 'Update ES document synchronously';
public function __construct(private readonly Dispatcher $eventDispatcher)
{
parent::__construct();
}
public function handle(): void
{
$activityId = $this->argument('activityId');
/** @var Activity $activity */
$activity = Activity::idOrUuId($activityId)->first();
$this->info('Sending activity for ES update...');
$this->eventDispatcher->dispatch(
new UpdateSingleEntity(
entityId: $activity->getId(),
updateTarget: UpdateTargetEnum::ACTIVITY,
purpose: 'cli-command-activity-update-es',
isSyncEvent: true,
)
);
$this->info('Done.');
}
}...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20891-improve-sms-text-relays, menu","depth":5,"on_screen":true,"help_text":"Git Branch: JY-20891-improve-sms-text-relays","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,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AskJiminnyReportActivityServiceTest","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AskJiminnyReportActivityServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AskJiminnyReportActivityServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\nnamespace Jiminny\\Console\\Commands\\Activities;\n\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Events\\Dispatcher;\nuse Jiminny\\Contracts\\ES\\Events\\UpdateSingleEntity;\nuse Jiminny\\Contracts\\ES\\UpdateTargetEnum;\nuse Jiminny\\Models\\Activity;\n\nclass UpdateActivityElasticSearchDocumentCommand extends Command\n{\n protected $signature = 'activity:update:es {activityId}';\n protected $description = 'Update ES document synchronously';\n\n public function __construct(private readonly Dispatcher $eventDispatcher)\n {\n parent::__construct();\n }\n\n public function handle(): void\n {\n $activityId = $this->argument('activityId');\n /** @var Activity $activity */\n $activity = Activity::idOrUuId($activityId)->first();\n $this->info('Sending activity for ES update...');\n\n $this->eventDispatcher->dispatch(\n new UpdateSingleEntity(\n entityId: $activity->getId(),\n updateTarget: UpdateTargetEnum::ACTIVITY,\n purpose: 'cli-command-activity-update-es',\n isSyncEvent: true,\n )\n );\n\n $this->info('Done.');\n }\n}","depth":4,"on_screen":true,"value":"<?php\n\nnamespace Jiminny\\Console\\Commands\\Activities;\n\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Events\\Dispatcher;\nuse Jiminny\\Contracts\\ES\\Events\\UpdateSingleEntity;\nuse Jiminny\\Contracts\\ES\\UpdateTargetEnum;\nuse Jiminny\\Models\\Activity;\n\nclass UpdateActivityElasticSearchDocumentCommand extends Command\n{\n protected $signature = 'activity:update:es {activityId}';\n protected $description = 'Update ES document synchronously';\n\n public function __construct(private readonly Dispatcher $eventDispatcher)\n {\n parent::__construct();\n }\n\n public function handle(): void\n {\n $activityId = $this->argument('activityId');\n /** @var Activity $activity */\n $activity = Activity::idOrUuId($activityId)->first();\n $this->info('Sending activity for ES update...');\n\n $this->eventDispatcher->dispatch(\n new UpdateSingleEntity(\n entityId: $activity->getId(),\n updateTarget: UpdateTargetEnum::ACTIVITY,\n purpose: 'cli-command-activity-update-es',\n isSyncEvent: true,\n )\n );\n\n $this->info('Done.');\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
7267224809832250378
|
-3671441499405218046
|
click
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Code changed:
Hide
Sync Changes
Hide This Notification
<?php
namespace Jiminny\Console\Commands\Activities;
use Illuminate\Console\Command;
use Illuminate\Contracts\Events\Dispatcher;
use Jiminny\Contracts\ES\Events\UpdateSingleEntity;
use Jiminny\Contracts\ES\UpdateTargetEnum;
use Jiminny\Models\Activity;
class UpdateActivityElasticSearchDocumentCommand extends Command
{
protected $signature = 'activity:update:es {activityId}';
protected $description = 'Update ES document synchronously';
public function __construct(private readonly Dispatcher $eventDispatcher)
{
parent::__construct();
}
public function handle(): void
{
$activityId = $this->argument('activityId');
/** @var Activity $activity */
$activity = Activity::idOrUuId($activityId)->first();
$this->info('Sending activity for ES update...');
$this->eventDispatcher->dispatch(
new UpdateSingleEntity(
entityId: $activity->getId(),
updateTarget: UpdateTargetEnum::ACTIVITY,
purpose: 'cli-command-activity-update-es',
isSyncEvent: true,
)
);
$this->info('Done.');
}
}...
|
36220
|
NULL
|
NULL
|
NULL
|
|
36221
|
NULL
|
0
|
2026-05-13T13:51:09.640065+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778680269640_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhostormVIewINavigareCodeKeractorFV faVsco.js°9 JY PhostormVIewINavigareCodeKeractorFV faVsco.js°9 JY-20891-improve-sms-text-relaysProledey© MailboxController.phpM MakefileJ package-lock.json= phpstan.neon.dist= phpstan-baseline.neon<> phpunit.xmlTaraw_sqL_query.sqMLPEADME mdC) TextRelayService.onp© Sso.phpossocontroller.ong© TextMessa©smsmessage.ong© SmsLength.php© TextRelay.phpService/Search.php x © ActivityStatusin.phpclass SearchM A10 A V< sonar-project.propertiesE test.py‹› Untitea Diagram.Xmiis vetur.config.jsM+ WEBHOOK_FILTERING_IMPLEM› ih External Librariesv E° Scratches and Consolesv C Database ConsolesV AEU& console EUl& DEALRISKS EUIA DI (EU)AEUEUvdiminnv@localhostA console fiminnv@localho# DI lliminnv@localhost4 HS local fiminnv@localhd4 SF [jiminny@localhost]Azoho dev fiminnvalocall• DROn# concole [ROnll# concole 1 [pponlA DI (PRODI› AQAЛAAI› A QAI PRODA STAGINGA console [STAGINGIA console 1 [STAGING]& uranus STAGING> C Extensionsv @ ScratchesEphostorm_shortcuts.txt=° scratch.txt{° scratch_1.ison{° scratch 2 ison<° scratch 3lison125= scratch 4 txtphe scratch 5.ohnphe scratch 6.ohnSscratch 7isonscratch R.isonstaae? ison= toctselt s...iprivate function createSearch(Query $query, Searchable|string $modelOrindex): Elastica \Searchif (request() && request()->has('debug')) {"dehua' => requesto->aet('dehua')'userUuid' => request(->user?->getIdString) ?? 'anonymous','query' => ison_encode(Squery->toArrayOflaas: LISON THROW ON ERROR).'url' => request->fullUrlO,1):— 96recurn schis->cllent-›createIndex( indexName: $model0rIndex instanceof Searchable ? Smodel0rIndex->getIndex() : $model0r 94->createsearch squery)96public function scroll(Query Squery. Searchable|string Smodel): Elastica\Scroll{...}98100* dparam searchablestrino smodelurindex usaoe of model 1s deprecated102* dreturn Lazucollection<int. Document>public function scrolloverDocuments(query Squery, SearchabLe|string SmodeLOrIndex): LazyCollection(...* I105Lix** Aoaran Searchable|strina Snodel0rIndey usage of model is denrecatedT109public function search(Query $query, Searchablelstring $modelOrIndex, ?string $queryName = null): Elastica 11€Datadog::increment( stats: 'jiminny.es.search', sampleRate: 1, ['query' => $queryName ?? "']);—112$before = microtime( as_float: true);Sresult = $this->createSearch($query, Smodel0rIndex)->search0:117Cofton = micnotimed as tloat: true)"Datadog:: timing( stat: "jiminny.es.search.time', (int) (($after - $before) * 1000)sampleRate: 1, ['quer: 120return sresult.• sonnt Keview • In 21m100% L2• Wed 13 May 15:33:40AskJiminnyReportActivityServiceTest v= custom.logscratch. &.ison= laravel.logA SF jiminny@localhost]« HS_local [jiminny@localhost] X console [PROD]cascadeA console (EU]A console [STACINClrial Owner Role SeleRetactoring User EmaDashboard Activity De+0 ..~/Library/Application Support/JetBrains/PhpStorm2026.1/consoles/db/5b1549d5-9876-4d9e-9ce3-025f12a83283/console.sait is there lust didn't include it "tracks"D69.select * from opportunities where team id = 2 and erm providen id TN (1374720564° 1145274235891 1490086191 X565571wsELEcT * FruM opportunity contacts whERE opportunity 1d = '414'*SELECT * FROM opportunity_contacts WHERE crm_provider_id = '131501';select * rrom contacts where 1d in (414. 464)1select * from activities where crm confiquration 1d = 2select settinas from crm conficurations where 1d = 11:Perfect - the activity has both video and audio tracks, so it would pass the ActivityRecorded filter even if appliedselect * From teams: # 1. 2select * from users;select * from crm_configurations where id = 39;select * from team_features where team_id = 2›select * from features;# SELECT * FROM opportunities WHERE crm_configuration_id = 2order by id desc;# and crm_provider_id = '49908861993';|Confirmed Fields (All Pass V)•• status : "failed" - Included in default status filtertype: "conference" - Allowed activity typeVis private : false - Passes privacy filter• V is internal: false - Should be visible• V actual_start_time : "2026-05-12 13:14:08" - Required field existsvtracks: Has video + audio tracks - Passes recorded tilterNext Stens to Deouaselect * from activity providers where id IN (443, 202, 203, 227):Since all fields nass the filters. check these:1. Date Range Selected in Dashboardselect * from activity imports where id = 795889:What date range is the user viewing? The detault is last 90 days. May 12, 2026 should be within range, but verity theselect c.id, c.provider, c.settings, t.* from teams t join crm confiqurations c 1<->1.n: on t.id = c.team_idactual Start date and end date parameters in te dasnooaro recuestwhere c.provider = 'hubspot'2. User/Team ScopeIs user 29089 (Line Kristensen) viewina her own dashboard? Verifv.select * from crm confiqurations crm JOIN teams + 1..n<->1: on crm.team id = t.id• User belonas to team 575 (NationBuilder) 7• User's group (Sales Team) has team_id: 575 VSELE * FROM teamsWHERE 1d = 311SELECT * FROM users WHERE id = 257;opportunities WHERE team 1d = 2• Check it RestrictTeam or RestrictUserGroupScope filters are excluding this3. Sxolicit Filter ValuesCheck if the dashboard request is passing explicit filter values that might exclude this activity, particularly:select * from opportunity_contacts where opportunity_id = 5124;select * fron contacts where id TN (3850.3853. 3851. 4073.4140.4155.4480.4530.4623. 5986. 513. 687. 1806. 1523. 3613) |activity status_values - might be set to only "completed"•only recorded activities - miaht be exolicitly set despite the override4. Actual Elasticsearch Quervselect * from activities where eom confiaunation id = 13.SELECT * FROM activities WHERE uuid_to_bin('826619ce-ec8e-4e59-8467-a01f5f6ad71e') = uuid; # 418141|Add logging in TeamInsightsRepository::getDashboardActivity0verTime to capture the exact Elasticsearch querybeina executed and see why this activitv is excluded!Most likely cause: Either the date range filter is excluding it, or an explicit filter value is being passed that overrides thedefault behavionselect id, team id, crm provider id from crm confiqurations where provider = 'hubspot' and crm provider id IS NOT NULSELECT * FROM accounts WHERE team id = 2 and crm provider id = '1212213464' order by id desc:SSISCT + SP0M contactc WHGPEteam id = 2 and account id = 5189 order by id desc:SELECT * FROM contacts WHERE team id = 2 order by id desc:select * from opportunity contacts where contact id = 6223:SELECT * FROM opportunities WHERE team id = 2 and account id = 5189 order by id desr.al .Ask anvthina (84L)"Code SWF-1.6•0 1.select * from erm profiles where crm confiquration id = 2:WN Windsurf Teams121-1UTF.A...
|
NULL
|
1837425836067260207
|
NULL
|
click
|
ocr
|
NULL
|
PhostormVIewINavigareCodeKeractorFV faVsco.js°9 JY PhostormVIewINavigareCodeKeractorFV faVsco.js°9 JY-20891-improve-sms-text-relaysProledey© MailboxController.phpM MakefileJ package-lock.json= phpstan.neon.dist= phpstan-baseline.neon<> phpunit.xmlTaraw_sqL_query.sqMLPEADME mdC) TextRelayService.onp© Sso.phpossocontroller.ong© TextMessa©smsmessage.ong© SmsLength.php© TextRelay.phpService/Search.php x © ActivityStatusin.phpclass SearchM A10 A V< sonar-project.propertiesE test.py‹› Untitea Diagram.Xmiis vetur.config.jsM+ WEBHOOK_FILTERING_IMPLEM› ih External Librariesv E° Scratches and Consolesv C Database ConsolesV AEU& console EUl& DEALRISKS EUIA DI (EU)AEUEUvdiminnv@localhostA console fiminnv@localho# DI lliminnv@localhost4 HS local fiminnv@localhd4 SF [jiminny@localhost]Azoho dev fiminnvalocall• DROn# concole [ROnll# concole 1 [pponlA DI (PRODI› AQAЛAAI› A QAI PRODA STAGINGA console [STAGINGIA console 1 [STAGING]& uranus STAGING> C Extensionsv @ ScratchesEphostorm_shortcuts.txt=° scratch.txt{° scratch_1.ison{° scratch 2 ison<° scratch 3lison125= scratch 4 txtphe scratch 5.ohnphe scratch 6.ohnSscratch 7isonscratch R.isonstaae? ison= toctselt s...iprivate function createSearch(Query $query, Searchable|string $modelOrindex): Elastica \Searchif (request() && request()->has('debug')) {"dehua' => requesto->aet('dehua')'userUuid' => request(->user?->getIdString) ?? 'anonymous','query' => ison_encode(Squery->toArrayOflaas: LISON THROW ON ERROR).'url' => request->fullUrlO,1):— 96recurn schis->cllent-›createIndex( indexName: $model0rIndex instanceof Searchable ? Smodel0rIndex->getIndex() : $model0r 94->createsearch squery)96public function scroll(Query Squery. Searchable|string Smodel): Elastica\Scroll{...}98100* dparam searchablestrino smodelurindex usaoe of model 1s deprecated102* dreturn Lazucollection<int. Document>public function scrolloverDocuments(query Squery, SearchabLe|string SmodeLOrIndex): LazyCollection(...* I105Lix** Aoaran Searchable|strina Snodel0rIndey usage of model is denrecatedT109public function search(Query $query, Searchablelstring $modelOrIndex, ?string $queryName = null): Elastica 11€Datadog::increment( stats: 'jiminny.es.search', sampleRate: 1, ['query' => $queryName ?? "']);—112$before = microtime( as_float: true);Sresult = $this->createSearch($query, Smodel0rIndex)->search0:117Cofton = micnotimed as tloat: true)"Datadog:: timing( stat: "jiminny.es.search.time', (int) (($after - $before) * 1000)sampleRate: 1, ['quer: 120return sresult.• sonnt Keview • In 21m100% L2• Wed 13 May 15:33:40AskJiminnyReportActivityServiceTest v= custom.logscratch. &.ison= laravel.logA SF jiminny@localhost]« HS_local [jiminny@localhost] X console [PROD]cascadeA console (EU]A console [STACINClrial Owner Role SeleRetactoring User EmaDashboard Activity De+0 ..~/Library/Application Support/JetBrains/PhpStorm2026.1/consoles/db/5b1549d5-9876-4d9e-9ce3-025f12a83283/console.sait is there lust didn't include it "tracks"D69.select * from opportunities where team id = 2 and erm providen id TN (1374720564° 1145274235891 1490086191 X565571wsELEcT * FruM opportunity contacts whERE opportunity 1d = '414'*SELECT * FROM opportunity_contacts WHERE crm_provider_id = '131501';select * rrom contacts where 1d in (414. 464)1select * from activities where crm confiquration 1d = 2select settinas from crm conficurations where 1d = 11:Perfect - the activity has both video and audio tracks, so it would pass the ActivityRecorded filter even if appliedselect * From teams: # 1. 2select * from users;select * from crm_configurations where id = 39;select * from team_features where team_id = 2›select * from features;# SELECT * FROM opportunities WHERE crm_configuration_id = 2order by id desc;# and crm_provider_id = '49908861993';|Confirmed Fields (All Pass V)•• status : "failed" - Included in default status filtertype: "conference" - Allowed activity typeVis private : false - Passes privacy filter• V is internal: false - Should be visible• V actual_start_time : "2026-05-12 13:14:08" - Required field existsvtracks: Has video + audio tracks - Passes recorded tilterNext Stens to Deouaselect * from activity providers where id IN (443, 202, 203, 227):Since all fields nass the filters. check these:1. Date Range Selected in Dashboardselect * from activity imports where id = 795889:What date range is the user viewing? The detault is last 90 days. May 12, 2026 should be within range, but verity theselect c.id, c.provider, c.settings, t.* from teams t join crm confiqurations c 1<->1.n: on t.id = c.team_idactual Start date and end date parameters in te dasnooaro recuestwhere c.provider = 'hubspot'2. User/Team ScopeIs user 29089 (Line Kristensen) viewina her own dashboard? Verifv.select * from crm confiqurations crm JOIN teams + 1..n<->1: on crm.team id = t.id• User belonas to team 575 (NationBuilder) 7• User's group (Sales Team) has team_id: 575 VSELE * FROM teamsWHERE 1d = 311SELECT * FROM users WHERE id = 257;opportunities WHERE team 1d = 2• Check it RestrictTeam or RestrictUserGroupScope filters are excluding this3. Sxolicit Filter ValuesCheck if the dashboard request is passing explicit filter values that might exclude this activity, particularly:select * from opportunity_contacts where opportunity_id = 5124;select * fron contacts where id TN (3850.3853. 3851. 4073.4140.4155.4480.4530.4623. 5986. 513. 687. 1806. 1523. 3613) |activity status_values - might be set to only "completed"•only recorded activities - miaht be exolicitly set despite the override4. Actual Elasticsearch Quervselect * from activities where eom confiaunation id = 13.SELECT * FROM activities WHERE uuid_to_bin('826619ce-ec8e-4e59-8467-a01f5f6ad71e') = uuid; # 418141|Add logging in TeamInsightsRepository::getDashboardActivity0verTime to capture the exact Elasticsearch querybeina executed and see why this activitv is excluded!Most likely cause: Either the date range filter is excluding it, or an explicit filter value is being passed that overrides thedefault behavionselect id, team id, crm provider id from crm confiqurations where provider = 'hubspot' and crm provider id IS NOT NULSELECT * FROM accounts WHERE team id = 2 and crm provider id = '1212213464' order by id desc:SSISCT + SP0M contactc WHGPEteam id = 2 and account id = 5189 order by id desc:SELECT * FROM contacts WHERE team id = 2 order by id desc:select * from opportunity contacts where contact id = 6223:SELECT * FROM opportunities WHERE team id = 2 and account id = 5189 order by id desr.al .Ask anvthina (84L)"Code SWF-1.6•0 1.select * from erm profiles where crm confiquration id = 2:WN Windsurf Teams121-1UTF.A...
|
36219
|
NULL
|
NULL
|
NULL
|
|
36220
|
1351
|
25
|
2026-05-13T13:51:09.629143+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778680269629_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp>0 lыlec2-user@ip-10-30-129-190:~883-zshSprint Review - in 27 mA100% C8• Wed 13 May 15:33:40181DOCKERC *1DEV (docker)Last login: Wed May 13 09:16:21 on ttys010982APP (-zsh)84screenpipe"• ₴5Poetry could not find a pyproject.toml file in /Users/lukas or its parentsPoetry could not find a pyproject.toml file in /Users/lukas or its parentslukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ ssh jiminny-prod-ecs1 -L 7970:vpc-activities7g-t6nxe5qk7zis7pa5i7qlmp3zwm.us-east-2.es.amazonaws.com:80Enter MFA code for arn:aws:iam::438740370364:mfa/[EMAIL]:Warning: Permanently added 'jiminny-prod-ecs1' (ED25519) to the list of known hosts.A newer release of "Amazon Linux" is available.Version 2023.10.20260330:Version 2023.11.20260406:Version 2023.11.20260413:Version 2023.11.20260427:Version 2023.11.20260505:Version 2023.11.20260509:Run "/usr/bin/dnf check-release-update" for full release and version update info#_####_\_#####\\###|\#/v~'Amazon Linux 2023 (ECS Optimized)ec2-user@ip-10-30-129-190:~ (. 26Im/*Fordocumentation,visit [URL_WITH_CREDENTIALS] ~]$ ||...
|
NULL
|
5725358035782193467
|
NULL
|
click
|
ocr
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp>0 lыlec2-user@ip-10-30-129-190:~883-zshSprint Review - in 27 mA100% C8• Wed 13 May 15:33:40181DOCKERC *1DEV (docker)Last login: Wed May 13 09:16:21 on ttys010982APP (-zsh)84screenpipe"• ₴5Poetry could not find a pyproject.toml file in /Users/lukas or its parentsPoetry could not find a pyproject.toml file in /Users/lukas or its parentslukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ ssh jiminny-prod-ecs1 -L 7970:vpc-activities7g-t6nxe5qk7zis7pa5i7qlmp3zwm.us-east-2.es.amazonaws.com:80Enter MFA code for arn:aws:iam::438740370364:mfa/[EMAIL]:Warning: Permanently added 'jiminny-prod-ecs1' (ED25519) to the list of known hosts.A newer release of "Amazon Linux" is available.Version 2023.10.20260330:Version 2023.11.20260406:Version 2023.11.20260413:Version 2023.11.20260427:Version 2023.11.20260505:Version 2023.11.20260509:Run "/usr/bin/dnf check-release-update" for full release and version update info#_####_\_#####\\###|\#/v~'Amazon Linux 2023 (ECS Optimized)ec2-user@ip-10-30-129-190:~ (. 26Im/*Fordocumentation,visit [URL_WITH_CREDENTIALS] ~]$ ||...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
36208
|
1352
|
18
|
2026-05-13T13:50:24.818740+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778680224818_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhostormVIewINavigareCodeKeractorFV faVsco.js°9 JY PhostormVIewINavigareCodeKeractorFV faVsco.js°9 JY-20891-improve-sms-text-relaysProledey© MailboxController.phpM MakefileJ package-lock.json= phpstan.neon.dist= phpstan-baseline.neon<> phpunit.xmlTaraw_sqL_query.sqMLPEADME mdC) TextRelayService.onp© Sso.phpossocontroller.ong© TextMessa©smsmessage.ong© SmsLength.php© TextRelay.phpService/Search.php x © ActivityStatusin.phpclass SearchM A10 A V< sonar-project.propertiesE test.py‹› Untitea Diagram.Xmiis vetur.config.jsM+ WEBHOOK_FILTERING_IMPLEM› ih External Librariesv E° Scratches and Consolesv C Database ConsolesV AEU& console EUl& DEALRISKS EUIA DI (EU)AEUEUvdiminnv@localhostA console fiminnv@localho# DI lliminnv@localhost4 HS local fiminnv@localhd4 SF [jiminny@localhost]Azoho dev fiminnvalocall• DROn# concole [ROnll# concole 1 [pponlA DI (PRODI› AQAЛAAI› A QAI PRODA STAGINGA console [STAGINGIA console 1 [STAGING]& uranus STAGING> C Extensionsv @ ScratchesEphostorm_shortcuts.txt=° scratch.txt{° scratch_1.ison{° scratch 2 ison<° scratch 3lison125= scratch 4 txtphe scratch 5.ohnphe scratch 6.ohnSscratch 7isonscratch R.isonstaae? ison= toctselt s...iprivate function createSearch(Query $query, Searchable|string $modelOrindex): Elastica \Searchif (request() && request()->has('debug')) {"dehua' => requesto->aet('dehua')'userUuid' => request(->user?->getIdString) ?? 'anonymous','query' => ison_encode(Squery->toArrayOflaas: LISON THROW ON ERROR).'url' => request->fullUrlO,1):— 96recurn schis->cllent-›createIndex( indexName: $model0rIndex instanceof Searchable ? Smodel0rIndex->getIndex() : $model0r 94->createsearch squery)96public function scroll(Query Squery. Searchable|string Smodel): Elastica\Scroll{...}98100* dparam searchablestrino smodelurindex usaoe of model 1s deprecated102* dreturn Lazucollection<int. Document>public function scrolloverDocuments(query Squery, SearchabLe|string SmodeLOrIndex): LazyCollection(...* I105Lix** Aoaran Searchable|strina Snodel0rIndey usage of model is denrecatedT109public function search(Query $query, Searchablelstring $modelOrIndex, ?string $queryName = null): Elastica 11€Datadog::increment( stats: 'jiminny.es.search', sampleRate: 1, ['query' => $queryName ?? "']);—112$before = microtime( as_float: true);Sresult = $this->createSearch($query, Smodel0rIndex)->search0:117Cofton = micnotimed as tloat: true)"Datadog:: timing( stat: "jiminny.es.search.time', (int) (($after - $before) * 1000)sampleRate: 1, ['quer: 120return sresult.• sonnt Keview • In 21m100% L2• Wed 13 May 15:33:40AskJiminnyReportActivityServiceTest v= custom.logscratch. &.ison= laravel.logA SF jiminny@localhost]« HS_local [jiminny@localhost] X console [PROD]cascadeA console (EU]A console [STACINClrial Owner Role SeleRetactoring User EmaDashboard Activity De+0 ..~/Library/Application Support/JetBrains/PhpStorm2026.1/consoles/db/5b1549d5-9876-4d9e-9ce3-025f12a83283/console.sait is there lust didn't include it "tracks"D69.select * from opportunities where team id = 2 and erm providen id TN (1374720564° 1145274235891 1490086191 X565571wsELEcT * FruM opportunity contacts whERE opportunity 1d = '414'*SELECT * FROM opportunity_contacts WHERE crm_provider_id = '131501';select * rrom contacts where 1d in (414. 464)1select * from activities where crm confiquration 1d = 2select settinas from crm conficurations where 1d = 11:Perfect - the activity has both video and audio tracks, so it would pass the ActivityRecorded filter even if appliedselect * From teams: # 1. 2select * from users;select * from crm_configurations where id = 39;select * from team_features where team_id = 2›select * from features;# SELECT * FROM opportunities WHERE crm_configuration_id = 2order by id desc;# and crm_provider_id = '49908861993';|Confirmed Fields (All Pass V)•• status : "failed" - Included in default status filtertype: "conference" - Allowed activity typeVis private : false - Passes privacy filter• V is internal: false - Should be visible• V actual_start_time : "2026-05-12 13:14:08" - Required field existsvtracks: Has video + audio tracks - Passes recorded tilterNext Stens to Deouaselect * from activity providers where id IN (443, 202, 203, 227):Since all fields nass the filters. check these:1. Date Range Selected in Dashboardselect * from activity imports where id = 795889:What date range is the user viewing? The detault is last 90 days. May 12, 2026 should be within range, but verity theselect c.id, c.provider, c.settings, t.* from teams t join crm confiqurations c 1<->1.n: on t.id = c.team_idactual Start date and end date parameters in te dasnooaro recuestwhere c.provider = 'hubspot'2. User/Team ScopeIs user 29089 (Line Kristensen) viewina her own dashboard? Verifv.select * from crm confiqurations crm JOIN teams + 1..n<->1: on crm.team id = t.id• User belonas to team 575 (NationBuilder) 7• User's group (Sales Team) has team_id: 575 VSELE * FROM teamsWHERE 1d = 311SELECT * FROM users WHERE id = 257;opportunities WHERE team 1d = 2• Check it RestrictTeam or RestrictUserGroupScope filters are excluding this3. Sxolicit Filter ValuesCheck if the dashboard request is passing explicit filter values that might exclude this activity, particularly:select * from opportunity_contacts where opportunity_id = 5124;select * fron contacts where id TN (3850.3853. 3851. 4073.4140.4155.4480.4530.4623. 5986. 513. 687. 1806. 1523. 3613) |activity status_values - might be set to only "completed"•only recorded activities - miaht be exolicitly set despite the override4. Actual Elasticsearch Quervselect * from activities where eom confiaunation id = 13.SELECT * FROM activities WHERE uuid_to_bin('826619ce-ec8e-4e59-8467-a01f5f6ad71e') = uuid; # 418141|Add logging in TeamInsightsRepository::getDashboardActivity0verTime to capture the exact Elasticsearch querybeina executed and see why this activitv is excluded!Most likely cause: Either the date range filter is excluding it, or an explicit filter value is being passed that overrides thedefault behavionselect id, team id, crm provider id from crm confiqurations where provider = 'hubspot' and crm provider id IS NOT NULSELECT * FROM accounts WHERE team id = 2 and crm provider id = '1212213464' order by id desc:SSISCT + SP0M contactc WHGPEteam id = 2 and account id = 5189 order by id desc:SELECT * FROM contacts WHERE team id = 2 order by id desc:select * from opportunity contacts where contact id = 6223:SELECT * FROM opportunities WHERE team id = 2 and account id = 5189 order by id desr.al .Ask anvthina (84L)"Code SWF-1.6•0 1.select * from erm profiles where crm confiquration id = 2:WN Windsurf Teams121-1UTF.A...
|
NULL
|
1837425836067260207
|
NULL
|
click
|
ocr
|
NULL
|
PhostormVIewINavigareCodeKeractorFV faVsco.js°9 JY PhostormVIewINavigareCodeKeractorFV faVsco.js°9 JY-20891-improve-sms-text-relaysProledey© MailboxController.phpM MakefileJ package-lock.json= phpstan.neon.dist= phpstan-baseline.neon<> phpunit.xmlTaraw_sqL_query.sqMLPEADME mdC) TextRelayService.onp© Sso.phpossocontroller.ong© TextMessa©smsmessage.ong© SmsLength.php© TextRelay.phpService/Search.php x © ActivityStatusin.phpclass SearchM A10 A V< sonar-project.propertiesE test.py‹› Untitea Diagram.Xmiis vetur.config.jsM+ WEBHOOK_FILTERING_IMPLEM› ih External Librariesv E° Scratches and Consolesv C Database ConsolesV AEU& console EUl& DEALRISKS EUIA DI (EU)AEUEUvdiminnv@localhostA console fiminnv@localho# DI lliminnv@localhost4 HS local fiminnv@localhd4 SF [jiminny@localhost]Azoho dev fiminnvalocall• DROn# concole [ROnll# concole 1 [pponlA DI (PRODI› AQAЛAAI› A QAI PRODA STAGINGA console [STAGINGIA console 1 [STAGING]& uranus STAGING> C Extensionsv @ ScratchesEphostorm_shortcuts.txt=° scratch.txt{° scratch_1.ison{° scratch 2 ison<° scratch 3lison125= scratch 4 txtphe scratch 5.ohnphe scratch 6.ohnSscratch 7isonscratch R.isonstaae? ison= toctselt s...iprivate function createSearch(Query $query, Searchable|string $modelOrindex): Elastica \Searchif (request() && request()->has('debug')) {"dehua' => requesto->aet('dehua')'userUuid' => request(->user?->getIdString) ?? 'anonymous','query' => ison_encode(Squery->toArrayOflaas: LISON THROW ON ERROR).'url' => request->fullUrlO,1):— 96recurn schis->cllent-›createIndex( indexName: $model0rIndex instanceof Searchable ? Smodel0rIndex->getIndex() : $model0r 94->createsearch squery)96public function scroll(Query Squery. Searchable|string Smodel): Elastica\Scroll{...}98100* dparam searchablestrino smodelurindex usaoe of model 1s deprecated102* dreturn Lazucollection<int. Document>public function scrolloverDocuments(query Squery, SearchabLe|string SmodeLOrIndex): LazyCollection(...* I105Lix** Aoaran Searchable|strina Snodel0rIndey usage of model is denrecatedT109public function search(Query $query, Searchablelstring $modelOrIndex, ?string $queryName = null): Elastica 11€Datadog::increment( stats: 'jiminny.es.search', sampleRate: 1, ['query' => $queryName ?? "']);—112$before = microtime( as_float: true);Sresult = $this->createSearch($query, Smodel0rIndex)->search0:117Cofton = micnotimed as tloat: true)"Datadog:: timing( stat: "jiminny.es.search.time', (int) (($after - $before) * 1000)sampleRate: 1, ['quer: 120return sresult.• sonnt Keview • In 21m100% L2• Wed 13 May 15:33:40AskJiminnyReportActivityServiceTest v= custom.logscratch. &.ison= laravel.logA SF jiminny@localhost]« HS_local [jiminny@localhost] X console [PROD]cascadeA console (EU]A console [STACINClrial Owner Role SeleRetactoring User EmaDashboard Activity De+0 ..~/Library/Application Support/JetBrains/PhpStorm2026.1/consoles/db/5b1549d5-9876-4d9e-9ce3-025f12a83283/console.sait is there lust didn't include it "tracks"D69.select * from opportunities where team id = 2 and erm providen id TN (1374720564° 1145274235891 1490086191 X565571wsELEcT * FruM opportunity contacts whERE opportunity 1d = '414'*SELECT * FROM opportunity_contacts WHERE crm_provider_id = '131501';select * rrom contacts where 1d in (414. 464)1select * from activities where crm confiquration 1d = 2select settinas from crm conficurations where 1d = 11:Perfect - the activity has both video and audio tracks, so it would pass the ActivityRecorded filter even if appliedselect * From teams: # 1. 2select * from users;select * from crm_configurations where id = 39;select * from team_features where team_id = 2›select * from features;# SELECT * FROM opportunities WHERE crm_configuration_id = 2order by id desc;# and crm_provider_id = '49908861993';|Confirmed Fields (All Pass V)•• status : "failed" - Included in default status filtertype: "conference" - Allowed activity typeVis private : false - Passes privacy filter• V is internal: false - Should be visible• V actual_start_time : "2026-05-12 13:14:08" - Required field existsvtracks: Has video + audio tracks - Passes recorded tilterNext Stens to Deouaselect * from activity providers where id IN (443, 202, 203, 227):Since all fields nass the filters. check these:1. Date Range Selected in Dashboardselect * from activity imports where id = 795889:What date range is the user viewing? The detault is last 90 days. May 12, 2026 should be within range, but verity theselect c.id, c.provider, c.settings, t.* from teams t join crm confiqurations c 1<->1.n: on t.id = c.team_idactual Start date and end date parameters in te dasnooaro recuestwhere c.provider = 'hubspot'2. User/Team ScopeIs user 29089 (Line Kristensen) viewina her own dashboard? Verifv.select * from crm confiqurations crm JOIN teams + 1..n<->1: on crm.team id = t.id• User belonas to team 575 (NationBuilder) 7• User's group (Sales Team) has team_id: 575 VSELE * FROM teamsWHERE 1d = 311SELECT * FROM users WHERE id = 257;opportunities WHERE team 1d = 2• Check it RestrictTeam or RestrictUserGroupScope filters are excluding this3. Sxolicit Filter ValuesCheck if the dashboard request is passing explicit filter values that might exclude this activity, particularly:select * from opportunity_contacts where opportunity_id = 5124;select * fron contacts where id TN (3850.3853. 3851. 4073.4140.4155.4480.4530.4623. 5986. 513. 687. 1806. 1523. 3613) |activity status_values - might be set to only "completed"•only recorded activities - miaht be exolicitly set despite the override4. Actual Elasticsearch Quervselect * from activities where eom confiaunation id = 13.SELECT * FROM activities WHERE uuid_to_bin('826619ce-ec8e-4e59-8467-a01f5f6ad71e') = uuid; # 418141|Add logging in TeamInsightsRepository::getDashboardActivity0verTime to capture the exact Elasticsearch querybeina executed and see why this activitv is excluded!Most likely cause: Either the date range filter is excluding it, or an explicit filter value is being passed that overrides thedefault behavionselect id, team id, crm provider id from crm confiqurations where provider = 'hubspot' and crm provider id IS NOT NULSELECT * FROM accounts WHERE team id = 2 and crm provider id = '1212213464' order by id desc:SSISCT + SP0M contactc WHGPEteam id = 2 and account id = 5189 order by id desc:SELECT * FROM contacts WHERE team id = 2 order by id desc:select * from opportunity contacts where contact id = 6223:SELECT * FROM opportunities WHERE team id = 2 and account id = 5189 order by id desr.al .Ask anvthina (84L)"Code SWF-1.6•0 1.select * from erm profiles where crm confiquration id = 2:WN Windsurf Teams121-1UTF.A...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
36207
|
1351
|
19
|
2026-05-13T13:50:24.831507+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778680224831_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp>0 lыlec2-user@ip-10-30-129-190:~883-zshSprint Review - in 27 mA100% C8• Wed 13 May 15:33:40181DOCKERC *1DEV (docker)Last login: Wed May 13 09:16:21 on ttys010982APP (-zsh)84screenpipe"• ₴5Poetry could not find a pyproject.toml file in /Users/lukas or its parentsPoetry could not find a pyproject.toml file in /Users/lukas or its parentslukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ ssh jiminny-prod-ecs1 -L 7970:vpc-activities7g-t6nxe5qk7zis7pa5i7qlmp3zwm.us-east-2.es.amazonaws.com:80Enter MFA code for arn:aws:iam::438740370364:mfa/[EMAIL]:Warning: Permanently added 'jiminny-prod-ecs1' (ED25519) to the list of known hosts.A newer release of "Amazon Linux" is available.Version 2023.10.20260330:Version 2023.11.20260406:Version 2023.11.20260413:Version 2023.11.20260427:Version 2023.11.20260505:Version 2023.11.20260509:Run "/usr/bin/dnf check-release-update" for full release and version update info#_####_\_#####\\###|\#/v~'Amazon Linux 2023 (ECS Optimized)ec2-user@ip-10-30-129-190:~ (. 26Im/*Fordocumentation,visit [URL_WITH_CREDENTIALS] ~]$ ||...
|
NULL
|
5725358035782193467
|
NULL
|
click
|
ocr
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp>0 lыlec2-user@ip-10-30-129-190:~883-zshSprint Review - in 27 mA100% C8• Wed 13 May 15:33:40181DOCKERC *1DEV (docker)Last login: Wed May 13 09:16:21 on ttys010982APP (-zsh)84screenpipe"• ₴5Poetry could not find a pyproject.toml file in /Users/lukas or its parentsPoetry could not find a pyproject.toml file in /Users/lukas or its parentslukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ ssh jiminny-prod-ecs1 -L 7970:vpc-activities7g-t6nxe5qk7zis7pa5i7qlmp3zwm.us-east-2.es.amazonaws.com:80Enter MFA code for arn:aws:iam::438740370364:mfa/[EMAIL]:Warning: Permanently added 'jiminny-prod-ecs1' (ED25519) to the list of known hosts.A newer release of "Amazon Linux" is available.Version 2023.10.20260330:Version 2023.11.20260406:Version 2023.11.20260413:Version 2023.11.20260427:Version 2023.11.20260505:Version 2023.11.20260509:Run "/usr/bin/dnf check-release-update" for full release and version update info#_####_\_#####\\###|\#/v~'Amazon Linux 2023 (ECS Optimized)ec2-user@ip-10-30-129-190:~ (. 26Im/*Fordocumentation,visit [URL_WITH_CREDENTIALS] ~]$ ||...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
36206
|
1352
|
17
|
2026-05-13T13:50:08.561884+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778680208561_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Code changed:
Hide
Sync Changes
Hide This Notification
<?php
namespace Jiminny\Console\Commands\Activities;
use Illuminate\Console\Command;
use Illuminate\Contracts\Events\Dispatcher;
use Jiminny\Contracts\ES\Events\UpdateSingleEntity;
use Jiminny\Contracts\ES\UpdateTargetEnum;
use Jiminny\Models\Activity;
class UpdateActivityElasticSearchDocumentCommand extends Command
{
protected $signature = 'activity:update:es {activityId}';
protected $description = 'Update ES document synchronously';
public function __construct(private readonly Dispatcher $eventDispatcher)
{
parent::__construct();
}
public function handle(): void
{
$activityId = $this->argument('activityId');
/** @var Activity $activity */
$activity = Activity::idOrUuId($activityId)->first();
$this->info('Sending activity for ES update...');
$this->eventDispatcher->dispatch(
new UpdateSingleEntity(
entityId: $activity->getId(),
updateTarget: UpdateTargetEnum::ACTIVITY,
purpose: 'cli-command-activity-update-es',
isSyncEvent: true,
)
);
$this->info('Done.');
}
}
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
20
1
17
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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
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 * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
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 `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
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;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20891-improve-sms-text-relays, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.08843085,"height":0.025538707},"on_screen":true,"help_text":"Git Branch: JY-20891-improve-sms-text-relays","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.8081782,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AskJiminnyReportActivityServiceTest","depth":6,"bounds":{"left":0.8234708,"top":0.019952115,"width":0.09208777,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AskJiminnyReportActivityServiceTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AskJiminnyReportActivityServiceTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"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.27027926,"top":1.0,"width":0.042220745,"height":0.0},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\nnamespace Jiminny\\Console\\Commands\\Activities;\n\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Events\\Dispatcher;\nuse Jiminny\\Contracts\\ES\\Events\\UpdateSingleEntity;\nuse Jiminny\\Contracts\\ES\\UpdateTargetEnum;\nuse Jiminny\\Models\\Activity;\n\nclass UpdateActivityElasticSearchDocumentCommand extends Command\n{\n protected $signature = 'activity:update:es {activityId}';\n protected $description = 'Update ES document synchronously';\n\n public function __construct(private readonly Dispatcher $eventDispatcher)\n {\n parent::__construct();\n }\n\n public function handle(): void\n {\n $activityId = $this->argument('activityId');\n /** @var Activity $activity */\n $activity = Activity::idOrUuId($activityId)->first();\n $this->info('Sending activity for ES update...');\n\n $this->eventDispatcher->dispatch(\n new UpdateSingleEntity(\n entityId: $activity->getId(),\n updateTarget: UpdateTargetEnum::ACTIVITY,\n purpose: 'cli-command-activity-update-es',\n isSyncEvent: true,\n )\n );\n\n $this->info('Done.');\n }\n}","depth":4,"bounds":{"left":0.16722074,"top":0.1963288,"width":0.24069148,"height":0.782921},"on_screen":true,"lines":[{"char_start":0,"char_count":6,"bounds":{"left":0.16722074,"top":0.0,"width":0.012965426,"height":0.014365523}},{"char_start":7,"char_count":47,"bounds":{"left":0.16722074,"top":0.0,"width":0.119015954,"height":0.014365523}},{"char_start":55,"char_count":32,"bounds":{"left":0.16722074,"top":0.0,"width":0.010305851,"height":0.014365523}},{"char_start":87,"char_count":44,"bounds":{"left":0.1775266,"top":0.0,"width":0.0026595744,"height":0.014365523}},{"char_start":131,"char_count":52,"bounds":{"left":0.1775266,"top":0.0,"width":0.0026595744,"height":0.014365523}},{"char_start":183,"char_count":43,"bounds":{"left":0.1775266,"top":0.0,"width":0.0026595744,"height":0.014365523}},{"char_start":226,"char_count":29,"bounds":{"left":0.1775266,"top":0.0,"width":0.0076462766,"height":0.014365523}},{"char_start":256,"char_count":65,"bounds":{"left":0.16722074,"top":0.019952115,"width":0.16589096,"height":0.014365523}},{"char_start":321,"char_count":2,"bounds":{"left":0.16722074,"top":0.037509978,"width":0.0026595744,"height":0.014365523}},{"char_start":323,"char_count":62,"bounds":{"left":0.16722074,"top":0.055067837,"width":0.15791224,"height":0.014365523}},{"char_start":385,"char_count":65,"bounds":{"left":0.16722074,"top":0.0726257,"width":0.16589096,"height":0.014365523}},{"char_start":451,"char_count":78,"bounds":{"left":0.16722074,"top":0.10774142,"width":0.19946809,"height":0.014365523}},{"char_start":529,"char_count":6,"bounds":{"left":0.16722074,"top":0.12529927,"width":0.012965426,"height":0.014365523}}],"value":"<?php\n\nnamespace Jiminny\\Console\\Commands\\Activities;\n\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Events\\Dispatcher;\nuse Jiminny\\Contracts\\ES\\Events\\UpdateSingleEntity;\nuse Jiminny\\Contracts\\ES\\UpdateTargetEnum;\nuse Jiminny\\Models\\Activity;\n\nclass UpdateActivityElasticSearchDocumentCommand extends Command\n{\n protected $signature = 'activity:update:es {activityId}';\n protected $description = 'Update ES document synchronously';\n\n public function __construct(private readonly Dispatcher $eventDispatcher)\n {\n parent::__construct();\n }\n\n public function handle(): void\n {\n $activityId = $this->argument('activityId');\n /** @var Activity $activity */\n $activity = Activity::idOrUuId($activityId)->first();\n $this->info('Sending activity for ES update...');\n\n $this->eventDispatcher->dispatch(\n new UpdateSingleEntity(\n entityId: $activity->getId(),\n updateTarget: UpdateTargetEnum::ACTIVITY,\n purpose: 'cli-command-activity-update-es',\n isSyncEvent: true,\n )\n );\n\n $this->info('Done.');\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.40957448,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"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.41821808,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"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.42918882,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"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.43783244,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"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.44647607,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"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.4574468,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"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.46841756,"top":0.09896249,"width":0.024268618,"height":0.01915403},"on_screen":true,"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.4950133,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"bounds":{"left":0.50598407,"top":0.09896249,"width":0.029587766,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"bounds":{"left":0.7084442,"top":0.09896249,"width":0.02825798,"height":0.01915403},"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"20","depth":4,"bounds":{"left":0.6712101,"top":0.123703115,"width":0.010305851,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"bounds":{"left":0.68351066,"top":0.123703115,"width":0.00731383,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"17","depth":4,"bounds":{"left":0.6928192,"top":0.123703115,"width":0.00930851,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.70412236,"top":0.123703115,"width":0.007978723,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"bounds":{"left":0.7140958,"top":0.123703115,"width":0.007978723,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.7237367,"top":0.12210695,"width":0.00731383,"height":0.018355945},"on_screen":true,"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.73105055,"top":0.12210695,"width":0.006981383,"height":0.018355945},"on_screen":true,"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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\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 * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\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 `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\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;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;","depth":4,"on_screen":true,"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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\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 * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\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 `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\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;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"on_screen":false,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.011968086,"top":0.047885075,"width":0.024268618,"height":0.024740623},"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
4480627095972953463
|
6830303734541719117
|
idle
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Code changed:
Hide
Sync Changes
Hide This Notification
<?php
namespace Jiminny\Console\Commands\Activities;
use Illuminate\Console\Command;
use Illuminate\Contracts\Events\Dispatcher;
use Jiminny\Contracts\ES\Events\UpdateSingleEntity;
use Jiminny\Contracts\ES\UpdateTargetEnum;
use Jiminny\Models\Activity;
class UpdateActivityElasticSearchDocumentCommand extends Command
{
protected $signature = 'activity:update:es {activityId}';
protected $description = 'Update ES document synchronously';
public function __construct(private readonly Dispatcher $eventDispatcher)
{
parent::__construct();
}
public function handle(): void
{
$activityId = $this->argument('activityId');
/** @var Activity $activity */
$activity = Activity::idOrUuId($activityId)->first();
$this->info('Sending activity for ES update...');
$this->eventDispatcher->dispatch(
new UpdateSingleEntity(
entityId: $activity->getId(),
updateTarget: UpdateTargetEnum::ACTIVITY,
purpose: 'cli-command-activity-update-es',
isSyncEvent: true,
)
);
$this->info('Done.');
}
}
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
20
1
17
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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
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 * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
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 `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
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;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
36204
|
NULL
|
NULL
|
NULL
|
|
36205
|
1351
|
18
|
2026-05-13T13:50:08.433615+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778680208433_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Code changed:
Hide
Sync Changes
Hide This Notification
<?php
namespace Jiminny\Console\Commands\Activities;
use Illuminate\Console\Command;
use Illuminate\Contracts\Events\Dispatcher;
use Jiminny\Contracts\ES\Events\UpdateSingleEntity;
use Jiminny\Contracts\ES\UpdateTargetEnum;
use Jiminny\Models\Activity;
class UpdateActivityElasticSearchDocumentCommand extends Command
{
protected $signature = 'activity:update:es {activityId}';
protected $description = 'Update ES document synchronously';
public function __construct(private readonly Dispatcher $eventDispatcher)
{
parent::__construct();
}
public function handle(): void
{
$activityId = $this->argument('activityId');
/** @var Activity $activity */
$activity = Activity::idOrUuId($activityId)->first();
$this->info('Sending activity for ES update...');
$this->eventDispatcher->dispatch(
new UpdateSingleEntity(
entityId: $activity->getId(),
updateTarget: UpdateTargetEnum::ACTIVITY,
purpose: 'cli-command-activity-update-es',
isSyncEvent: true,
)
);
$this->info('Done.');
}
}
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
20
1
17
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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
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 * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
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 `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
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;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20891-improve-sms-text-relays, menu","depth":5,"on_screen":true,"help_text":"Git Branch: JY-20891-improve-sms-text-relays","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,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AskJiminnyReportActivityServiceTest","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AskJiminnyReportActivityServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AskJiminnyReportActivityServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\nnamespace Jiminny\\Console\\Commands\\Activities;\n\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Events\\Dispatcher;\nuse Jiminny\\Contracts\\ES\\Events\\UpdateSingleEntity;\nuse Jiminny\\Contracts\\ES\\UpdateTargetEnum;\nuse Jiminny\\Models\\Activity;\n\nclass UpdateActivityElasticSearchDocumentCommand extends Command\n{\n protected $signature = 'activity:update:es {activityId}';\n protected $description = 'Update ES document synchronously';\n\n public function __construct(private readonly Dispatcher $eventDispatcher)\n {\n parent::__construct();\n }\n\n public function handle(): void\n {\n $activityId = $this->argument('activityId');\n /** @var Activity $activity */\n $activity = Activity::idOrUuId($activityId)->first();\n $this->info('Sending activity for ES update...');\n\n $this->eventDispatcher->dispatch(\n new UpdateSingleEntity(\n entityId: $activity->getId(),\n updateTarget: UpdateTargetEnum::ACTIVITY,\n purpose: 'cli-command-activity-update-es',\n isSyncEvent: true,\n )\n );\n\n $this->info('Done.');\n }\n}","depth":4,"on_screen":true,"value":"<?php\n\nnamespace Jiminny\\Console\\Commands\\Activities;\n\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Events\\Dispatcher;\nuse Jiminny\\Contracts\\ES\\Events\\UpdateSingleEntity;\nuse Jiminny\\Contracts\\ES\\UpdateTargetEnum;\nuse Jiminny\\Models\\Activity;\n\nclass UpdateActivityElasticSearchDocumentCommand extends Command\n{\n protected $signature = 'activity:update:es {activityId}';\n protected $description = 'Update ES document synchronously';\n\n public function __construct(private readonly Dispatcher $eventDispatcher)\n {\n parent::__construct();\n }\n\n public function handle(): void\n {\n $activityId = $this->argument('activityId');\n /** @var Activity $activity */\n $activity = Activity::idOrUuId($activityId)->first();\n $this->info('Sending activity for ES update...');\n\n $this->eventDispatcher->dispatch(\n new UpdateSingleEntity(\n entityId: $activity->getId(),\n updateTarget: UpdateTargetEnum::ACTIVITY,\n purpose: 'cli-command-activity-update-es',\n isSyncEvent: true,\n )\n );\n\n $this->info('Done.');\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,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"on_screen":true,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"20","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"17","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"on_screen":true,"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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\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 * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\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 `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\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;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;","depth":4,"on_screen":true,"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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\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 * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\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 `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\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;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"on_screen":false,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
4480627095972953463
|
6830303734541719117
|
idle
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Code changed:
Hide
Sync Changes
Hide This Notification
<?php
namespace Jiminny\Console\Commands\Activities;
use Illuminate\Console\Command;
use Illuminate\Contracts\Events\Dispatcher;
use Jiminny\Contracts\ES\Events\UpdateSingleEntity;
use Jiminny\Contracts\ES\UpdateTargetEnum;
use Jiminny\Models\Activity;
class UpdateActivityElasticSearchDocumentCommand extends Command
{
protected $signature = 'activity:update:es {activityId}';
protected $description = 'Update ES document synchronously';
public function __construct(private readonly Dispatcher $eventDispatcher)
{
parent::__construct();
}
public function handle(): void
{
$activityId = $this->argument('activityId');
/** @var Activity $activity */
$activity = Activity::idOrUuId($activityId)->first();
$this->info('Sending activity for ES update...');
$this->eventDispatcher->dispatch(
new UpdateSingleEntity(
entityId: $activity->getId(),
updateTarget: UpdateTargetEnum::ACTIVITY,
purpose: 'cli-command-activity-update-es',
isSyncEvent: true,
)
);
$this->info('Done.');
}
}
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
20
1
17
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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
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 * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
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 `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
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;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
36203
|
NULL
|
NULL
|
NULL
|
|
36204
|
1352
|
16
|
2026-05-13T13:49:37.976007+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778680177976_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Code changed:
Hide
Sync Changes
Hide This Notification
<?php
namespace Jiminny\Console\Commands\Activities;
use Illuminate\Console\Command;
use Illuminate\Contracts\Events\Dispatcher;
use Jiminny\Contracts\ES\Events\UpdateSingleEntity;
use Jiminny\Contracts\ES\UpdateTargetEnum;
use Jiminny\Models\Activity;
class UpdateActivityElasticSearchDocumentCommand extends Command
{
protected $signature = 'activity:update:es {activityId}';
protected $description = 'Update ES document synchronously';
public function __construct(private readonly Dispatcher $eventDispatcher)
{
parent::__construct();
}
public function handle(): void
{
$activityId = $this->argument('activityId');
/** @var Activity $activity */
$activity = Activity::idOrUuId($activityId)->first();
$this->info('Sending activity for ES update...');
$this->eventDispatcher->dispatch(
new UpdateSingleEntity(
entityId: $activity->getId(),
updateTarget: UpdateTargetEnum::ACTIVITY,
purpose: 'cli-command-activity-update-es',
isSyncEvent: true,
)
);
$this->info('Done.');
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20891-improve-sms-text-relays, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.08843085,"height":0.025538707},"on_screen":true,"help_text":"Git Branch: JY-20891-improve-sms-text-relays","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.8081782,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AskJiminnyReportActivityServiceTest","depth":6,"bounds":{"left":0.8234708,"top":0.019952115,"width":0.09208777,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AskJiminnyReportActivityServiceTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AskJiminnyReportActivityServiceTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"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.27027926,"top":1.0,"width":0.042220745,"height":0.0},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\nnamespace Jiminny\\Console\\Commands\\Activities;\n\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Events\\Dispatcher;\nuse Jiminny\\Contracts\\ES\\Events\\UpdateSingleEntity;\nuse Jiminny\\Contracts\\ES\\UpdateTargetEnum;\nuse Jiminny\\Models\\Activity;\n\nclass UpdateActivityElasticSearchDocumentCommand extends Command\n{\n protected $signature = 'activity:update:es {activityId}';\n protected $description = 'Update ES document synchronously';\n\n public function __construct(private readonly Dispatcher $eventDispatcher)\n {\n parent::__construct();\n }\n\n public function handle(): void\n {\n $activityId = $this->argument('activityId');\n /** @var Activity $activity */\n $activity = Activity::idOrUuId($activityId)->first();\n $this->info('Sending activity for ES update...');\n\n $this->eventDispatcher->dispatch(\n new UpdateSingleEntity(\n entityId: $activity->getId(),\n updateTarget: UpdateTargetEnum::ACTIVITY,\n purpose: 'cli-command-activity-update-es',\n isSyncEvent: true,\n )\n );\n\n $this->info('Done.');\n }\n}","depth":4,"on_screen":true,"value":"<?php\n\nnamespace Jiminny\\Console\\Commands\\Activities;\n\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Events\\Dispatcher;\nuse Jiminny\\Contracts\\ES\\Events\\UpdateSingleEntity;\nuse Jiminny\\Contracts\\ES\\UpdateTargetEnum;\nuse Jiminny\\Models\\Activity;\n\nclass UpdateActivityElasticSearchDocumentCommand extends Command\n{\n protected $signature = 'activity:update:es {activityId}';\n protected $description = 'Update ES document synchronously';\n\n public function __construct(private readonly Dispatcher $eventDispatcher)\n {\n parent::__construct();\n }\n\n public function handle(): void\n {\n $activityId = $this->argument('activityId');\n /** @var Activity $activity */\n $activity = Activity::idOrUuId($activityId)->first();\n $this->info('Sending activity for ES update...');\n\n $this->eventDispatcher->dispatch(\n new UpdateSingleEntity(\n entityId: $activity->getId(),\n updateTarget: UpdateTargetEnum::ACTIVITY,\n purpose: 'cli-command-activity-update-es',\n isSyncEvent: true,\n )\n );\n\n $this->info('Done.');\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.40957448,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"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.41821808,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"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.42918882,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"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.43783244,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"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.44647607,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"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.4574468,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"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.46841756,"top":0.09896249,"width":0.024268618,"height":0.01915403},"on_screen":true,"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.4950133,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"bounds":{"left":0.50598407,"top":0.09896249,"width":0.029587766,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"bounds":{"left":0.7084442,"top":0.09896249,"width":0.02825798,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-6526997147684895350
|
-3662469622070567158
|
click
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Code changed:
Hide
Sync Changes
Hide This Notification
<?php
namespace Jiminny\Console\Commands\Activities;
use Illuminate\Console\Command;
use Illuminate\Contracts\Events\Dispatcher;
use Jiminny\Contracts\ES\Events\UpdateSingleEntity;
use Jiminny\Contracts\ES\UpdateTargetEnum;
use Jiminny\Models\Activity;
class UpdateActivityElasticSearchDocumentCommand extends Command
{
protected $signature = 'activity:update:es {activityId}';
protected $description = 'Update ES document synchronously';
public function __construct(private readonly Dispatcher $eventDispatcher)
{
parent::__construct();
}
public function handle(): void
{
$activityId = $this->argument('activityId');
/** @var Activity $activity */
$activity = Activity::idOrUuId($activityId)->first();
$this->info('Sending activity for ES update...');
$this->eventDispatcher->dispatch(
new UpdateSingleEntity(
entityId: $activity->getId(),
updateTarget: UpdateTargetEnum::ACTIVITY,
purpose: 'cli-command-activity-update-es',
isSyncEvent: true,
)
);
$this->info('Done.');
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
36203
|
1351
|
17
|
2026-05-13T13:49:37.980442+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778680177980_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Code changed:
Hide
Sync Changes
Hide This Notification
<?php
namespace Jiminny\Console\Commands\Activities;
use Illuminate\Console\Command;
use Illuminate\Contracts\Events\Dispatcher;
use Jiminny\Contracts\ES\Events\UpdateSingleEntity;
use Jiminny\Contracts\ES\UpdateTargetEnum;
use Jiminny\Models\Activity;
class UpdateActivityElasticSearchDocumentCommand extends Command
{
protected $signature = 'activity:update:es {activityId}';
protected $description = 'Update ES document synchronously';
public function __construct(private readonly Dispatcher $eventDispatcher)
{
parent::__construct();
}
public function handle(): void
{
$activityId = $this->argument('activityId');
/** @var Activity $activity */
$activity = Activity::idOrUuId($activityId)->first();
$this->info('Sending activity for ES update...');
$this->eventDispatcher->dispatch(
new UpdateSingleEntity(
entityId: $activity->getId(),
updateTarget: UpdateTargetEnum::ACTIVITY,
purpose: 'cli-command-activity-update-es',
isSyncEvent: true,
)
);
$this->info('Done.');
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20891-improve-sms-text-relays, menu","depth":5,"on_screen":true,"help_text":"Git Branch: JY-20891-improve-sms-text-relays","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,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AskJiminnyReportActivityServiceTest","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AskJiminnyReportActivityServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AskJiminnyReportActivityServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\nnamespace Jiminny\\Console\\Commands\\Activities;\n\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Events\\Dispatcher;\nuse Jiminny\\Contracts\\ES\\Events\\UpdateSingleEntity;\nuse Jiminny\\Contracts\\ES\\UpdateTargetEnum;\nuse Jiminny\\Models\\Activity;\n\nclass UpdateActivityElasticSearchDocumentCommand extends Command\n{\n protected $signature = 'activity:update:es {activityId}';\n protected $description = 'Update ES document synchronously';\n\n public function __construct(private readonly Dispatcher $eventDispatcher)\n {\n parent::__construct();\n }\n\n public function handle(): void\n {\n $activityId = $this->argument('activityId');\n /** @var Activity $activity */\n $activity = Activity::idOrUuId($activityId)->first();\n $this->info('Sending activity for ES update...');\n\n $this->eventDispatcher->dispatch(\n new UpdateSingleEntity(\n entityId: $activity->getId(),\n updateTarget: UpdateTargetEnum::ACTIVITY,\n purpose: 'cli-command-activity-update-es',\n isSyncEvent: true,\n )\n );\n\n $this->info('Done.');\n }\n}","depth":4,"on_screen":true,"value":"<?php\n\nnamespace Jiminny\\Console\\Commands\\Activities;\n\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Events\\Dispatcher;\nuse Jiminny\\Contracts\\ES\\Events\\UpdateSingleEntity;\nuse Jiminny\\Contracts\\ES\\UpdateTargetEnum;\nuse Jiminny\\Models\\Activity;\n\nclass UpdateActivityElasticSearchDocumentCommand extends Command\n{\n protected $signature = 'activity:update:es {activityId}';\n protected $description = 'Update ES document synchronously';\n\n public function __construct(private readonly Dispatcher $eventDispatcher)\n {\n parent::__construct();\n }\n\n public function handle(): void\n {\n $activityId = $this->argument('activityId');\n /** @var Activity $activity */\n $activity = Activity::idOrUuId($activityId)->first();\n $this->info('Sending activity for ES update...');\n\n $this->eventDispatcher->dispatch(\n new UpdateSingleEntity(\n entityId: $activity->getId(),\n updateTarget: UpdateTargetEnum::ACTIVITY,\n purpose: 'cli-command-activity-update-es',\n isSyncEvent: true,\n )\n );\n\n $this->info('Done.');\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,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"on_screen":true,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-6526997147684895350
|
-3662469622070567158
|
click
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Code changed:
Hide
Sync Changes
Hide This Notification
<?php
namespace Jiminny\Console\Commands\Activities;
use Illuminate\Console\Command;
use Illuminate\Contracts\Events\Dispatcher;
use Jiminny\Contracts\ES\Events\UpdateSingleEntity;
use Jiminny\Contracts\ES\UpdateTargetEnum;
use Jiminny\Models\Activity;
class UpdateActivityElasticSearchDocumentCommand extends Command
{
protected $signature = 'activity:update:es {activityId}';
protected $description = 'Update ES document synchronously';
public function __construct(private readonly Dispatcher $eventDispatcher)
{
parent::__construct();
}
public function handle(): void
{
$activityId = $this->argument('activityId');
/** @var Activity $activity */
$activity = Activity::idOrUuId($activityId)->first();
$this->info('Sending activity for ES update...');
$this->eventDispatcher->dispatch(
new UpdateSingleEntity(
entityId: $activity->getId(),
updateTarget: UpdateTargetEnum::ACTIVITY,
purpose: 'cli-command-activity-update-es',
isSyncEvent: true,
)
);
$this->info('Done.');
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
36192
|
1352
|
10
|
2026-05-13T13:48:44.922691+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778680124922_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Code changed:
Hide
Sync Changes
Hide This Notification
<?php
namespace Jiminny\Console\Commands\Activities;
use Illuminate\Console\Command;
use Illuminate\Contracts\Events\Dispatcher;
use Jiminny\Contracts\ES\Events\UpdateSingleEntity;
use Jiminny\Contracts\ES\UpdateTargetEnum;
use Jiminny\Models\Activity;
class UpdateActivityElasticSearchDocumentCommand extends Command
{
protected $signature = 'activity:update:es {activityId}';
protected $description = 'Update ES document synchronously';
public function __construct(private readonly Dispatcher $eventDispatcher)
{
parent::__construct();
}
public function handle(): void
{
$activityId = $this->argument('activityId');
/** @var Activity $activity */
$activity = Activity::idOrUuId($activityId)->first();
$this->info('Sending activity for ES update...');
$this->eventDispatcher->dispatch(
new UpdateSingleEntity(
entityId: $activity->getId(),
updateTarget: UpdateTargetEnum::ACTIVITY,
purpose: 'cli-command-activity-update-es',
isSyncEvent: true,
)
);
$this->info('Done.');
}
}
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
20
1
17
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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
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 * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
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 `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
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;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20891-improve-sms-text-relays, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.08843085,"height":0.025538707},"on_screen":true,"help_text":"Git Branch: JY-20891-improve-sms-text-relays","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.8081782,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AskJiminnyReportActivityServiceTest","depth":6,"bounds":{"left":0.8234708,"top":0.019952115,"width":0.09208777,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AskJiminnyReportActivityServiceTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AskJiminnyReportActivityServiceTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"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.27027926,"top":1.0,"width":0.042220745,"height":0.0},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\nnamespace Jiminny\\Console\\Commands\\Activities;\n\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Events\\Dispatcher;\nuse Jiminny\\Contracts\\ES\\Events\\UpdateSingleEntity;\nuse Jiminny\\Contracts\\ES\\UpdateTargetEnum;\nuse Jiminny\\Models\\Activity;\n\nclass UpdateActivityElasticSearchDocumentCommand extends Command\n{\n protected $signature = 'activity:update:es {activityId}';\n protected $description = 'Update ES document synchronously';\n\n public function __construct(private readonly Dispatcher $eventDispatcher)\n {\n parent::__construct();\n }\n\n public function handle(): void\n {\n $activityId = $this->argument('activityId');\n /** @var Activity $activity */\n $activity = Activity::idOrUuId($activityId)->first();\n $this->info('Sending activity for ES update...');\n\n $this->eventDispatcher->dispatch(\n new UpdateSingleEntity(\n entityId: $activity->getId(),\n updateTarget: UpdateTargetEnum::ACTIVITY,\n purpose: 'cli-command-activity-update-es',\n isSyncEvent: true,\n )\n );\n\n $this->info('Done.');\n }\n}","depth":4,"on_screen":true,"value":"<?php\n\nnamespace Jiminny\\Console\\Commands\\Activities;\n\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Events\\Dispatcher;\nuse Jiminny\\Contracts\\ES\\Events\\UpdateSingleEntity;\nuse Jiminny\\Contracts\\ES\\UpdateTargetEnum;\nuse Jiminny\\Models\\Activity;\n\nclass UpdateActivityElasticSearchDocumentCommand extends Command\n{\n protected $signature = 'activity:update:es {activityId}';\n protected $description = 'Update ES document synchronously';\n\n public function __construct(private readonly Dispatcher $eventDispatcher)\n {\n parent::__construct();\n }\n\n public function handle(): void\n {\n $activityId = $this->argument('activityId');\n /** @var Activity $activity */\n $activity = Activity::idOrUuId($activityId)->first();\n $this->info('Sending activity for ES update...');\n\n $this->eventDispatcher->dispatch(\n new UpdateSingleEntity(\n entityId: $activity->getId(),\n updateTarget: UpdateTargetEnum::ACTIVITY,\n purpose: 'cli-command-activity-update-es',\n isSyncEvent: true,\n )\n );\n\n $this->info('Done.');\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.40957448,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"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.41821808,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"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.42918882,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"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.43783244,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"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.44647607,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"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.4574468,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"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.46841756,"top":0.09896249,"width":0.024268618,"height":0.01915403},"on_screen":true,"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.4950133,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"bounds":{"left":0.50598407,"top":0.09896249,"width":0.029587766,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"bounds":{"left":0.7084442,"top":0.09896249,"width":0.02825798,"height":0.01915403},"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"20","depth":4,"bounds":{"left":0.6712101,"top":0.123703115,"width":0.010305851,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"bounds":{"left":0.68351066,"top":0.123703115,"width":0.00731383,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"17","depth":4,"bounds":{"left":0.6928192,"top":0.123703115,"width":0.00930851,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.70412236,"top":0.123703115,"width":0.007978723,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"bounds":{"left":0.7140958,"top":0.123703115,"width":0.007978723,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.7237367,"top":0.12210695,"width":0.00731383,"height":0.018355945},"on_screen":true,"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.73105055,"top":0.12210695,"width":0.006981383,"height":0.018355945},"on_screen":true,"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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\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 * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\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 `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\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;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;","depth":4,"on_screen":true,"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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\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 * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\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 `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\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;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"on_screen":false,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.011968086,"top":0.047885075,"width":0.024268618,"height":0.024740623},"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
4480627095972953463
|
6830303734541719117
|
idle
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Code changed:
Hide
Sync Changes
Hide This Notification
<?php
namespace Jiminny\Console\Commands\Activities;
use Illuminate\Console\Command;
use Illuminate\Contracts\Events\Dispatcher;
use Jiminny\Contracts\ES\Events\UpdateSingleEntity;
use Jiminny\Contracts\ES\UpdateTargetEnum;
use Jiminny\Models\Activity;
class UpdateActivityElasticSearchDocumentCommand extends Command
{
protected $signature = 'activity:update:es {activityId}';
protected $description = 'Update ES document synchronously';
public function __construct(private readonly Dispatcher $eventDispatcher)
{
parent::__construct();
}
public function handle(): void
{
$activityId = $this->argument('activityId');
/** @var Activity $activity */
$activity = Activity::idOrUuId($activityId)->first();
$this->info('Sending activity for ES update...');
$this->eventDispatcher->dispatch(
new UpdateSingleEntity(
entityId: $activity->getId(),
updateTarget: UpdateTargetEnum::ACTIVITY,
purpose: 'cli-command-activity-update-es',
isSyncEvent: true,
)
);
$this->info('Done.');
}
}
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
20
1
17
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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
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 * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
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 `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
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;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
36191
|
1351
|
11
|
2026-05-13T13:48:44.734110+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778680124734_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Code changed:
Hide
Sync Changes
Hide This Notification
<?php
namespace Jiminny\Console\Commands\Activities;
use Illuminate\Console\Command;
use Illuminate\Contracts\Events\Dispatcher;
use Jiminny\Contracts\ES\Events\UpdateSingleEntity;
use Jiminny\Contracts\ES\UpdateTargetEnum;
use Jiminny\Models\Activity;
class UpdateActivityElasticSearchDocumentCommand extends Command
{
protected $signature = 'activity:update:es {activityId}';
protected $description = 'Update ES document synchronously';
public function __construct(private readonly Dispatcher $eventDispatcher)
{
parent::__construct();
}
public function handle(): void
{
$activityId = $this->argument('activityId');
/** @var Activity $activity */
$activity = Activity::idOrUuId($activityId)->first();
$this->info('Sending activity for ES update...');
$this->eventDispatcher->dispatch(
new UpdateSingleEntity(
entityId: $activity->getId(),
updateTarget: UpdateTargetEnum::ACTIVITY,
purpose: 'cli-command-activity-update-es',
isSyncEvent: true,
)
);
$this->info('Done.');
}
}
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
20
1
17
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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
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 * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
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 `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
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;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20891-improve-sms-text-relays, menu","depth":5,"on_screen":true,"help_text":"Git Branch: JY-20891-improve-sms-text-relays","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,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AskJiminnyReportActivityServiceTest","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AskJiminnyReportActivityServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AskJiminnyReportActivityServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\nnamespace Jiminny\\Console\\Commands\\Activities;\n\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Events\\Dispatcher;\nuse Jiminny\\Contracts\\ES\\Events\\UpdateSingleEntity;\nuse Jiminny\\Contracts\\ES\\UpdateTargetEnum;\nuse Jiminny\\Models\\Activity;\n\nclass UpdateActivityElasticSearchDocumentCommand extends Command\n{\n protected $signature = 'activity:update:es {activityId}';\n protected $description = 'Update ES document synchronously';\n\n public function __construct(private readonly Dispatcher $eventDispatcher)\n {\n parent::__construct();\n }\n\n public function handle(): void\n {\n $activityId = $this->argument('activityId');\n /** @var Activity $activity */\n $activity = Activity::idOrUuId($activityId)->first();\n $this->info('Sending activity for ES update...');\n\n $this->eventDispatcher->dispatch(\n new UpdateSingleEntity(\n entityId: $activity->getId(),\n updateTarget: UpdateTargetEnum::ACTIVITY,\n purpose: 'cli-command-activity-update-es',\n isSyncEvent: true,\n )\n );\n\n $this->info('Done.');\n }\n}","depth":4,"on_screen":true,"value":"<?php\n\nnamespace Jiminny\\Console\\Commands\\Activities;\n\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Events\\Dispatcher;\nuse Jiminny\\Contracts\\ES\\Events\\UpdateSingleEntity;\nuse Jiminny\\Contracts\\ES\\UpdateTargetEnum;\nuse Jiminny\\Models\\Activity;\n\nclass UpdateActivityElasticSearchDocumentCommand extends Command\n{\n protected $signature = 'activity:update:es {activityId}';\n protected $description = 'Update ES document synchronously';\n\n public function __construct(private readonly Dispatcher $eventDispatcher)\n {\n parent::__construct();\n }\n\n public function handle(): void\n {\n $activityId = $this->argument('activityId');\n /** @var Activity $activity */\n $activity = Activity::idOrUuId($activityId)->first();\n $this->info('Sending activity for ES update...');\n\n $this->eventDispatcher->dispatch(\n new UpdateSingleEntity(\n entityId: $activity->getId(),\n updateTarget: UpdateTargetEnum::ACTIVITY,\n purpose: 'cli-command-activity-update-es',\n isSyncEvent: true,\n )\n );\n\n $this->info('Done.');\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,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"on_screen":true,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"20","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"17","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"on_screen":true,"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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\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 * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\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 `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\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;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;","depth":4,"on_screen":true,"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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\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 * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\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 `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\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;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"on_screen":false,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
4480627095972953463
|
6830303734541719117
|
idle
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Code changed:
Hide
Sync Changes
Hide This Notification
<?php
namespace Jiminny\Console\Commands\Activities;
use Illuminate\Console\Command;
use Illuminate\Contracts\Events\Dispatcher;
use Jiminny\Contracts\ES\Events\UpdateSingleEntity;
use Jiminny\Contracts\ES\UpdateTargetEnum;
use Jiminny\Models\Activity;
class UpdateActivityElasticSearchDocumentCommand extends Command
{
protected $signature = 'activity:update:es {activityId}';
protected $description = 'Update ES document synchronously';
public function __construct(private readonly Dispatcher $eventDispatcher)
{
parent::__construct();
}
public function handle(): void
{
$activityId = $this->argument('activityId');
/** @var Activity $activity */
$activity = Activity::idOrUuId($activityId)->first();
$this->info('Sending activity for ES update...');
$this->eventDispatcher->dispatch(
new UpdateSingleEntity(
entityId: $activity->getId(),
updateTarget: UpdateTargetEnum::ACTIVITY,
purpose: 'cli-command-activity-update-es',
isSyncEvent: true,
)
);
$this->info('Done.');
}
}
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
20
1
17
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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
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 * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
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 `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
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;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
36189
|
NULL
|
NULL
|
NULL
|
|
36190
|
1352
|
9
|
2026-05-13T13:48:13.030670+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778680093030_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhostormVIewINavigareCodeKeractorFV faVsco.js°9 JY PhostormVIewINavigareCodeKeractorFV faVsco.js°9 JY-20891-improve-sms-text-relaysProledey© MailboxController.phpM MakefileJ package-lock.json= phpstan.neon.dist= phpstan-baseline.neon<> phpunit.xmlTaraw_sqL_query.sqMLPEADME mdC) TextRelayService.onp© Sso.phpossocontroller.ong© TextMessa©smsmessage.ong© SmsLength.php© TextRelay.phpService/Search.php x © ActivityStatusin.phpclass SearchM A10 A V< sonar-project.propertiesE test.py‹› Untitea Diagram.Xmiis vetur.config.jsM+ WEBHOOK_FILTERING_IMPLEM› ih External Librariesv E° Scratches and Consolesv C Database ConsolesV AEU& console EUl& DEALRISKS EUIA DI (EU)AEUEUvdiminnv@localhostA console fiminnv@localho# DI lliminnv@localhost4 HS local fiminnv@localhd4 SF [jiminny@localhost]Azoho dev fiminnvalocall• DROn# concole [ROnll# concole 1 [pponlA DI (PRODI› AQAЛAAI› A QAI PRODA STAGINGA console [STAGINGIA console 1 [STAGING]& uranus STAGING> C Extensionsv @ ScratchesEphostorm_shortcuts.txt=° scratch.txt{° scratch_1.ison{° scratch 2 ison<° scratch 3lison125= scratch 4 txtphe scratch 5.ohnphe scratch 6.ohnSscratch 7isonscratch R.isonstaae? ison= toctselt s...iprivate function createSearch(Query $query, Searchable|string $modelOrindex): Elastica \Searchif (request() && request()->has('debug')) {"dehua' => requesto->aet('dehua')'userUuid' => request(->user?->getIdString) ?? 'anonymous','query' => ison_encode(Squery->toArrayOflaas: LISON THROW ON ERROR).'url' => request->fullUrlO,1):— 96recurn schis->cllent-›createIndex( indexName: $model0rIndex instanceof Searchable ? Smodel0rIndex->getIndex() : $model0r 94->createsearch squery)96public function scroll(Query Squery. Searchable|string Smodel): Elastica\Scroll{...}98100* dparam searchablestrino smodelurindex usaoe of model 1s deprecated102* dreturn Lazucollection<int. Document>public function scrolloverDocuments(query Squery, SearchabLe|string SmodeLOrIndex): LazyCollection(...* I105Lix** Aoaran Searchable|strina Snodel0rIndey usage of model is denrecatedT109public function search(Query $query, Searchablelstring $modelOrIndex, ?string $queryName = null): Elastica 11€Datadog::increment( stats: 'jiminny.es.search', sampleRate: 1, ['query' => $queryName ?? "']);—112$before = microtime( as_float: true);Sresult = $this->createSearch($query, Smodel0rIndex)->search0:117Cofton = micnotimed as tloat: true)"Datadog:: timing( stat: "jiminny.es.search.time', (int) (($after - $before) * 1000)sampleRate: 1, ['quer: 120return sresult.• sonnt Keview • In 21m100% L2• Wed 13 May 15:33:40AskJiminnyReportActivityServiceTest v= custom.logscratch. &.ison= laravel.logA SF jiminny@localhost]« HS_local [jiminny@localhost] X console [PROD]cascadeA console (EU]A console [STACINClrial Owner Role SeleRetactoring User EmaDashboard Activity De+0 ..~/Library/Application Support/JetBrains/PhpStorm2026.1/consoles/db/5b1549d5-9876-4d9e-9ce3-025f12a83283/console.sait is there lust didn't include it "tracks"D69.select * from opportunities where team id = 2 and erm providen id TN (1374720564° 1145274235891 1490086191 X565571wsELEcT * FruM opportunity contacts whERE opportunity 1d = '414'*SELECT * FROM opportunity_contacts WHERE crm_provider_id = '131501';select * rrom contacts where 1d in (414. 464)1select * from activities where crm confiquration 1d = 2select settinas from crm conficurations where 1d = 11:Perfect - the activity has both video and audio tracks, so it would pass the ActivityRecorded filter even if appliedselect * From teams: # 1. 2select * from users;select * from crm_configurations where id = 39;select * from team_features where team_id = 2›select * from features;# SELECT * FROM opportunities WHERE crm_configuration_id = 2order by id desc;# and crm_provider_id = '49908861993';|Confirmed Fields (All Pass V)•• status : "failed" - Included in default status filtertype: "conference" - Allowed activity typeVis private : false - Passes privacy filter• V is internal: false - Should be visible• V actual_start_time : "2026-05-12 13:14:08" - Required field existsvtracks: Has video + audio tracks - Passes recorded tilterNext Stens to Deouaselect * from activity providers where id IN (443, 202, 203, 227):Since all fields nass the filters. check these:1. Date Range Selected in Dashboardselect * from activity imports where id = 795889:What date range is the user viewing? The detault is last 90 days. May 12, 2026 should be within range, but verity theselect c.id, c.provider, c.settings, t.* from teams t join crm confiqurations c 1<->1.n: on t.id = c.team_idactual Start date and end date parameters in te dasnooaro recuestwhere c.provider = 'hubspot'2. User/Team ScopeIs user 29089 (Line Kristensen) viewina her own dashboard? Verifv.select * from crm confiqurations crm JOIN teams + 1..n<->1: on crm.team id = t.id• User belonas to team 575 (NationBuilder) 7• User's group (Sales Team) has team_id: 575 VSELE * FROM teamsWHERE 1d = 311SELECT * FROM users WHERE id = 257;opportunities WHERE team 1d = 2• Check it RestrictTeam or RestrictUserGroupScope filters are excluding this3. Sxolicit Filter ValuesCheck if the dashboard request is passing explicit filter values that might exclude this activity, particularly:select * from opportunity_contacts where opportunity_id = 5124;select * fron contacts where id TN (3850.3853. 3851. 4073.4140.4155.4480.4530.4623. 5986. 513. 687. 1806. 1523. 3613) |activity status_values - might be set to only "completed"•only recorded activities - miaht be exolicitly set despite the override4. Actual Elasticsearch Quervselect * from activities where eom confiaunation id = 13.SELECT * FROM activities WHERE uuid_to_bin('826619ce-ec8e-4e59-8467-a01f5f6ad71e') = uuid; # 418141|Add logging in TeamInsightsRepository::getDashboardActivity0verTime to capture the exact Elasticsearch querybeina executed and see why this activitv is excluded!Most likely cause: Either the date range filter is excluding it, or an explicit filter value is being passed that overrides thedefault behavionselect id, team id, crm provider id from crm confiqurations where provider = 'hubspot' and crm provider id IS NOT NULSELECT * FROM accounts WHERE team id = 2 and crm provider id = '1212213464' order by id desc:SSISCT + SP0M contactc WHGPEteam id = 2 and account id = 5189 order by id desc:SELECT * FROM contacts WHERE team id = 2 order by id desc:select * from opportunity contacts where contact id = 6223:SELECT * FROM opportunities WHERE team id = 2 and account id = 5189 order by id desr.al .Ask anvthina (84L)"Code SWF-1.6•0 1.select * from erm profiles where crm confiquration id = 2:WN Windsurf Teams121-1UTF.A...
|
NULL
|
1837425836067260207
|
NULL
|
click
|
ocr
|
NULL
|
PhostormVIewINavigareCodeKeractorFV faVsco.js°9 JY PhostormVIewINavigareCodeKeractorFV faVsco.js°9 JY-20891-improve-sms-text-relaysProledey© MailboxController.phpM MakefileJ package-lock.json= phpstan.neon.dist= phpstan-baseline.neon<> phpunit.xmlTaraw_sqL_query.sqMLPEADME mdC) TextRelayService.onp© Sso.phpossocontroller.ong© TextMessa©smsmessage.ong© SmsLength.php© TextRelay.phpService/Search.php x © ActivityStatusin.phpclass SearchM A10 A V< sonar-project.propertiesE test.py‹› Untitea Diagram.Xmiis vetur.config.jsM+ WEBHOOK_FILTERING_IMPLEM› ih External Librariesv E° Scratches and Consolesv C Database ConsolesV AEU& console EUl& DEALRISKS EUIA DI (EU)AEUEUvdiminnv@localhostA console fiminnv@localho# DI lliminnv@localhost4 HS local fiminnv@localhd4 SF [jiminny@localhost]Azoho dev fiminnvalocall• DROn# concole [ROnll# concole 1 [pponlA DI (PRODI› AQAЛAAI› A QAI PRODA STAGINGA console [STAGINGIA console 1 [STAGING]& uranus STAGING> C Extensionsv @ ScratchesEphostorm_shortcuts.txt=° scratch.txt{° scratch_1.ison{° scratch 2 ison<° scratch 3lison125= scratch 4 txtphe scratch 5.ohnphe scratch 6.ohnSscratch 7isonscratch R.isonstaae? ison= toctselt s...iprivate function createSearch(Query $query, Searchable|string $modelOrindex): Elastica \Searchif (request() && request()->has('debug')) {"dehua' => requesto->aet('dehua')'userUuid' => request(->user?->getIdString) ?? 'anonymous','query' => ison_encode(Squery->toArrayOflaas: LISON THROW ON ERROR).'url' => request->fullUrlO,1):— 96recurn schis->cllent-›createIndex( indexName: $model0rIndex instanceof Searchable ? Smodel0rIndex->getIndex() : $model0r 94->createsearch squery)96public function scroll(Query Squery. Searchable|string Smodel): Elastica\Scroll{...}98100* dparam searchablestrino smodelurindex usaoe of model 1s deprecated102* dreturn Lazucollection<int. Document>public function scrolloverDocuments(query Squery, SearchabLe|string SmodeLOrIndex): LazyCollection(...* I105Lix** Aoaran Searchable|strina Snodel0rIndey usage of model is denrecatedT109public function search(Query $query, Searchablelstring $modelOrIndex, ?string $queryName = null): Elastica 11€Datadog::increment( stats: 'jiminny.es.search', sampleRate: 1, ['query' => $queryName ?? "']);—112$before = microtime( as_float: true);Sresult = $this->createSearch($query, Smodel0rIndex)->search0:117Cofton = micnotimed as tloat: true)"Datadog:: timing( stat: "jiminny.es.search.time', (int) (($after - $before) * 1000)sampleRate: 1, ['quer: 120return sresult.• sonnt Keview • In 21m100% L2• Wed 13 May 15:33:40AskJiminnyReportActivityServiceTest v= custom.logscratch. &.ison= laravel.logA SF jiminny@localhost]« HS_local [jiminny@localhost] X console [PROD]cascadeA console (EU]A console [STACINClrial Owner Role SeleRetactoring User EmaDashboard Activity De+0 ..~/Library/Application Support/JetBrains/PhpStorm2026.1/consoles/db/5b1549d5-9876-4d9e-9ce3-025f12a83283/console.sait is there lust didn't include it "tracks"D69.select * from opportunities where team id = 2 and erm providen id TN (1374720564° 1145274235891 1490086191 X565571wsELEcT * FruM opportunity contacts whERE opportunity 1d = '414'*SELECT * FROM opportunity_contacts WHERE crm_provider_id = '131501';select * rrom contacts where 1d in (414. 464)1select * from activities where crm confiquration 1d = 2select settinas from crm conficurations where 1d = 11:Perfect - the activity has both video and audio tracks, so it would pass the ActivityRecorded filter even if appliedselect * From teams: # 1. 2select * from users;select * from crm_configurations where id = 39;select * from team_features where team_id = 2›select * from features;# SELECT * FROM opportunities WHERE crm_configuration_id = 2order by id desc;# and crm_provider_id = '49908861993';|Confirmed Fields (All Pass V)•• status : "failed" - Included in default status filtertype: "conference" - Allowed activity typeVis private : false - Passes privacy filter• V is internal: false - Should be visible• V actual_start_time : "2026-05-12 13:14:08" - Required field existsvtracks: Has video + audio tracks - Passes recorded tilterNext Stens to Deouaselect * from activity providers where id IN (443, 202, 203, 227):Since all fields nass the filters. check these:1. Date Range Selected in Dashboardselect * from activity imports where id = 795889:What date range is the user viewing? The detault is last 90 days. May 12, 2026 should be within range, but verity theselect c.id, c.provider, c.settings, t.* from teams t join crm confiqurations c 1<->1.n: on t.id = c.team_idactual Start date and end date parameters in te dasnooaro recuestwhere c.provider = 'hubspot'2. User/Team ScopeIs user 29089 (Line Kristensen) viewina her own dashboard? Verifv.select * from crm confiqurations crm JOIN teams + 1..n<->1: on crm.team id = t.id• User belonas to team 575 (NationBuilder) 7• User's group (Sales Team) has team_id: 575 VSELE * FROM teamsWHERE 1d = 311SELECT * FROM users WHERE id = 257;opportunities WHERE team 1d = 2• Check it RestrictTeam or RestrictUserGroupScope filters are excluding this3. Sxolicit Filter ValuesCheck if the dashboard request is passing explicit filter values that might exclude this activity, particularly:select * from opportunity_contacts where opportunity_id = 5124;select * fron contacts where id TN (3850.3853. 3851. 4073.4140.4155.4480.4530.4623. 5986. 513. 687. 1806. 1523. 3613) |activity status_values - might be set to only "completed"•only recorded activities - miaht be exolicitly set despite the override4. Actual Elasticsearch Quervselect * from activities where eom confiaunation id = 13.SELECT * FROM activities WHERE uuid_to_bin('826619ce-ec8e-4e59-8467-a01f5f6ad71e') = uuid; # 418141|Add logging in TeamInsightsRepository::getDashboardActivity0verTime to capture the exact Elasticsearch querybeina executed and see why this activitv is excluded!Most likely cause: Either the date range filter is excluding it, or an explicit filter value is being passed that overrides thedefault behavionselect id, team id, crm provider id from crm confiqurations where provider = 'hubspot' and crm provider id IS NOT NULSELECT * FROM accounts WHERE team id = 2 and crm provider id = '1212213464' order by id desc:SSISCT + SP0M contactc WHGPEteam id = 2 and account id = 5189 order by id desc:SELECT * FROM contacts WHERE team id = 2 order by id desc:select * from opportunity contacts where contact id = 6223:SELECT * FROM opportunities WHERE team id = 2 and account id = 5189 order by id desr.al .Ask anvthina (84L)"Code SWF-1.6•0 1.select * from erm profiles where crm confiquration id = 2:WN Windsurf Teams121-1UTF.A...
|
36187
|
NULL
|
NULL
|
NULL
|
|
36189
|
1351
|
10
|
2026-05-13T13:48:14.464980+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778680094464_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Code changed:
Hide
Sync Changes
Hide This Notification
<?php
namespace Jiminny\Console\Commands\Activities;
use Illuminate\Console\Command;
use Illuminate\Contracts\Events\Dispatcher;
use Jiminny\Contracts\ES\Events\UpdateSingleEntity;
use Jiminny\Contracts\ES\UpdateTargetEnum;
use Jiminny\Models\Activity;
class UpdateActivityElasticSearchDocumentCommand extends Command
{
protected $signature = 'activity:update:es {activityId}';
protected $description = 'Update ES document synchronously';
public function __construct(private readonly Dispatcher $eventDispatcher)
{
parent::__construct();
}
public function handle(): void
{
$activityId = $this->argument('activityId');
/** @var Activity $activity */
$activity = Activity::idOrUuId($activityId)->first();
$this->info('Sending activity for ES update...');
$this->eventDispatcher->dispatch(
new UpdateSingleEntity(
entityId: $activity->getId(),
updateTarget: UpdateTargetEnum::ACTIVITY,
purpose: 'cli-command-activity-update-es',
isSyncEvent: true,
)
);
$this->info('Done.');
}
}
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
20
1
17
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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
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 * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
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 `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
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;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20891-improve-sms-text-relays, menu","depth":5,"on_screen":true,"help_text":"Git Branch: JY-20891-improve-sms-text-relays","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,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AskJiminnyReportActivityServiceTest","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AskJiminnyReportActivityServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AskJiminnyReportActivityServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\nnamespace Jiminny\\Console\\Commands\\Activities;\n\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Events\\Dispatcher;\nuse Jiminny\\Contracts\\ES\\Events\\UpdateSingleEntity;\nuse Jiminny\\Contracts\\ES\\UpdateTargetEnum;\nuse Jiminny\\Models\\Activity;\n\nclass UpdateActivityElasticSearchDocumentCommand extends Command\n{\n protected $signature = 'activity:update:es {activityId}';\n protected $description = 'Update ES document synchronously';\n\n public function __construct(private readonly Dispatcher $eventDispatcher)\n {\n parent::__construct();\n }\n\n public function handle(): void\n {\n $activityId = $this->argument('activityId');\n /** @var Activity $activity */\n $activity = Activity::idOrUuId($activityId)->first();\n $this->info('Sending activity for ES update...');\n\n $this->eventDispatcher->dispatch(\n new UpdateSingleEntity(\n entityId: $activity->getId(),\n updateTarget: UpdateTargetEnum::ACTIVITY,\n purpose: 'cli-command-activity-update-es',\n isSyncEvent: true,\n )\n );\n\n $this->info('Done.');\n }\n}","depth":4,"on_screen":true,"value":"<?php\n\nnamespace Jiminny\\Console\\Commands\\Activities;\n\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Events\\Dispatcher;\nuse Jiminny\\Contracts\\ES\\Events\\UpdateSingleEntity;\nuse Jiminny\\Contracts\\ES\\UpdateTargetEnum;\nuse Jiminny\\Models\\Activity;\n\nclass UpdateActivityElasticSearchDocumentCommand extends Command\n{\n protected $signature = 'activity:update:es {activityId}';\n protected $description = 'Update ES document synchronously';\n\n public function __construct(private readonly Dispatcher $eventDispatcher)\n {\n parent::__construct();\n }\n\n public function handle(): void\n {\n $activityId = $this->argument('activityId');\n /** @var Activity $activity */\n $activity = Activity::idOrUuId($activityId)->first();\n $this->info('Sending activity for ES update...');\n\n $this->eventDispatcher->dispatch(\n new UpdateSingleEntity(\n entityId: $activity->getId(),\n updateTarget: UpdateTargetEnum::ACTIVITY,\n purpose: 'cli-command-activity-update-es',\n isSyncEvent: true,\n )\n );\n\n $this->info('Done.');\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,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"on_screen":true,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"20","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"17","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"on_screen":true,"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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\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 * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\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 `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\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;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;","depth":4,"on_screen":true,"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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\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 * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\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 `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\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;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"on_screen":false,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
4480627095972953463
|
6830303734541719117
|
click
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Code changed:
Hide
Sync Changes
Hide This Notification
<?php
namespace Jiminny\Console\Commands\Activities;
use Illuminate\Console\Command;
use Illuminate\Contracts\Events\Dispatcher;
use Jiminny\Contracts\ES\Events\UpdateSingleEntity;
use Jiminny\Contracts\ES\UpdateTargetEnum;
use Jiminny\Models\Activity;
class UpdateActivityElasticSearchDocumentCommand extends Command
{
protected $signature = 'activity:update:es {activityId}';
protected $description = 'Update ES document synchronously';
public function __construct(private readonly Dispatcher $eventDispatcher)
{
parent::__construct();
}
public function handle(): void
{
$activityId = $this->argument('activityId');
/** @var Activity $activity */
$activity = Activity::idOrUuId($activityId)->first();
$this->info('Sending activity for ES update...');
$this->eventDispatcher->dispatch(
new UpdateSingleEntity(
entityId: $activity->getId(),
updateTarget: UpdateTargetEnum::ACTIVITY,
purpose: 'cli-command-activity-update-es',
isSyncEvent: true,
)
);
$this->info('Done.');
}
}
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
20
1
17
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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
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 * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
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 `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
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;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
36188
|
1351
|
9
|
2026-05-13T13:48:13.017970+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778680093017_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp>0 lыlec2-user@ip-10-30-129-190:~883-zshSprint Review - in 27 mA100% C8• Wed 13 May 15:33:40181DOCKERC *1DEV (docker)Last login: Wed May 13 09:16:21 on ttys010982APP (-zsh)84screenpipe"• ₴5Poetry could not find a pyproject.toml file in /Users/lukas or its parentsPoetry could not find a pyproject.toml file in /Users/lukas or its parentslukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ ssh jiminny-prod-ecs1 -L 7970:vpc-activities7g-t6nxe5qk7zis7pa5i7qlmp3zwm.us-east-2.es.amazonaws.com:80Enter MFA code for arn:aws:iam::438740370364:mfa/[EMAIL]:Warning: Permanently added 'jiminny-prod-ecs1' (ED25519) to the list of known hosts.A newer release of "Amazon Linux" is available.Version 2023.10.20260330:Version 2023.11.20260406:Version 2023.11.20260413:Version 2023.11.20260427:Version 2023.11.20260505:Version 2023.11.20260509:Run "/usr/bin/dnf check-release-update" for full release and version update info#_####_\_#####\\###|\#/v~'Amazon Linux 2023 (ECS Optimized)ec2-user@ip-10-30-129-190:~ (. 26Im/*Fordocumentation,visit [URL_WITH_CREDENTIALS] ~]$ ||...
|
NULL
|
5725358035782193467
|
NULL
|
click
|
ocr
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp>0 lыlec2-user@ip-10-30-129-190:~883-zshSprint Review - in 27 mA100% C8• Wed 13 May 15:33:40181DOCKERC *1DEV (docker)Last login: Wed May 13 09:16:21 on ttys010982APP (-zsh)84screenpipe"• ₴5Poetry could not find a pyproject.toml file in /Users/lukas or its parentsPoetry could not find a pyproject.toml file in /Users/lukas or its parentslukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ ssh jiminny-prod-ecs1 -L 7970:vpc-activities7g-t6nxe5qk7zis7pa5i7qlmp3zwm.us-east-2.es.amazonaws.com:80Enter MFA code for arn:aws:iam::438740370364:mfa/[EMAIL]:Warning: Permanently added 'jiminny-prod-ecs1' (ED25519) to the list of known hosts.A newer release of "Amazon Linux" is available.Version 2023.10.20260330:Version 2023.11.20260406:Version 2023.11.20260413:Version 2023.11.20260427:Version 2023.11.20260505:Version 2023.11.20260509:Run "/usr/bin/dnf check-release-update" for full release and version update info#_####_\_#####\\###|\#/v~'Amazon Linux 2023 (ECS Optimized)ec2-user@ip-10-30-129-190:~ (. 26Im/*Fordocumentation,visit [URL_WITH_CREDENTIALS] ~]$ ||...
|
36186
|
NULL
|
NULL
|
NULL
|
|
36117
|
1349
|
1
|
2026-05-13T13:41:44.879477+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778679704879_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Code changed:
Hide
Sync Changes
Hide This Notification
<?php
namespace Jiminny\Console\Commands\Activities;
use Illuminate\Console\Command;
use Illuminate\Contracts\Events\Dispatcher;
use Jiminny\Contracts\ES\Events\UpdateSingleEntity;
use Jiminny\Contracts\ES\UpdateTargetEnum;
use Jiminny\Models\Activity;
class UpdateActivityElasticSearchDocumentCommand extends Command
{
protected $signature = 'activity:update:es {activityId}';
protected $description = 'Update ES document synchronously';
public function __construct(private readonly Dispatcher $eventDispatcher)
{
parent::__construct();
}
public function handle(): void
{
$activityId = $this->argument('activityId');
/** @var Activity $activity */
$activity = Activity::idOrUuId($activityId)->first();
$this->info('Sending activity for ES update...');
$this->eventDispatcher->dispatch(
new UpdateSingleEntity(
entityId: $activity->getId(),
updateTarget: UpdateTargetEnum::ACTIVITY,
purpose: 'cli-command-activity-update-es',
)
);
$this->info('Done.');
}
}
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
20
1
17
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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
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 * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
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 `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
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;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20891-improve-sms-text-relays, menu","depth":5,"on_screen":true,"help_text":"Git Branch: JY-20891-improve-sms-text-relays","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,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AskJiminnyReportActivityServiceTest","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AskJiminnyReportActivityServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AskJiminnyReportActivityServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\nnamespace Jiminny\\Console\\Commands\\Activities;\n\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Events\\Dispatcher;\nuse Jiminny\\Contracts\\ES\\Events\\UpdateSingleEntity;\nuse Jiminny\\Contracts\\ES\\UpdateTargetEnum;\nuse Jiminny\\Models\\Activity;\n\nclass UpdateActivityElasticSearchDocumentCommand extends Command\n{\n protected $signature = 'activity:update:es {activityId}';\n protected $description = 'Update ES document synchronously';\n\n public function __construct(private readonly Dispatcher $eventDispatcher)\n {\n parent::__construct();\n }\n\n public function handle(): void\n {\n $activityId = $this->argument('activityId');\n /** @var Activity $activity */\n $activity = Activity::idOrUuId($activityId)->first();\n $this->info('Sending activity for ES update...');\n\n $this->eventDispatcher->dispatch(\n new UpdateSingleEntity(\n entityId: $activity->getId(),\n updateTarget: UpdateTargetEnum::ACTIVITY,\n purpose: 'cli-command-activity-update-es',\n )\n );\n\n $this->info('Done.');\n }\n}","depth":4,"on_screen":true,"value":"<?php\n\nnamespace Jiminny\\Console\\Commands\\Activities;\n\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Events\\Dispatcher;\nuse Jiminny\\Contracts\\ES\\Events\\UpdateSingleEntity;\nuse Jiminny\\Contracts\\ES\\UpdateTargetEnum;\nuse Jiminny\\Models\\Activity;\n\nclass UpdateActivityElasticSearchDocumentCommand extends Command\n{\n protected $signature = 'activity:update:es {activityId}';\n protected $description = 'Update ES document synchronously';\n\n public function __construct(private readonly Dispatcher $eventDispatcher)\n {\n parent::__construct();\n }\n\n public function handle(): void\n {\n $activityId = $this->argument('activityId');\n /** @var Activity $activity */\n $activity = Activity::idOrUuId($activityId)->first();\n $this->info('Sending activity for ES update...');\n\n $this->eventDispatcher->dispatch(\n new UpdateSingleEntity(\n entityId: $activity->getId(),\n updateTarget: UpdateTargetEnum::ACTIVITY,\n purpose: 'cli-command-activity-update-es',\n )\n );\n\n $this->info('Done.');\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,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"on_screen":true,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"20","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"17","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"on_screen":true,"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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\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 * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\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 `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\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;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;","depth":4,"on_screen":true,"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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\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 * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\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 `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\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;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"on_screen":false,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
6289561633417344386
|
6830303734541719117
|
idle
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Code changed:
Hide
Sync Changes
Hide This Notification
<?php
namespace Jiminny\Console\Commands\Activities;
use Illuminate\Console\Command;
use Illuminate\Contracts\Events\Dispatcher;
use Jiminny\Contracts\ES\Events\UpdateSingleEntity;
use Jiminny\Contracts\ES\UpdateTargetEnum;
use Jiminny\Models\Activity;
class UpdateActivityElasticSearchDocumentCommand extends Command
{
protected $signature = 'activity:update:es {activityId}';
protected $description = 'Update ES document synchronously';
public function __construct(private readonly Dispatcher $eventDispatcher)
{
parent::__construct();
}
public function handle(): void
{
$activityId = $this->argument('activityId');
/** @var Activity $activity */
$activity = Activity::idOrUuId($activityId)->first();
$this->info('Sending activity for ES update...');
$this->eventDispatcher->dispatch(
new UpdateSingleEntity(
entityId: $activity->getId(),
updateTarget: UpdateTargetEnum::ACTIVITY,
purpose: 'cli-command-activity-update-es',
)
);
$this->info('Done.');
}
}
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
20
1
17
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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
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 * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
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 `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
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;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
36116
|
1350
|
0
|
2026-05-13T13:41:14.009697+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778679674009_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20891-improve-sms-text-relays, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.08843085,"height":0.025538707},"on_screen":true,"help_text":"Git Branch: JY-20891-improve-sms-text-relays","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.8081782,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AskJiminnyReportActivityServiceTest","depth":6,"bounds":{"left":0.8234708,"top":0.019952115,"width":0.09208777,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AskJiminnyReportActivityServiceTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AskJiminnyReportActivityServiceTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
7581618884890279806
|
-8204352174202572862
|
click
|
hybrid
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
PhostormVIewINavigareCodeKeractorFV faVsco.js°9 JY-20891-improve-sms-text-relaysProledey© MailboxController.phpM MakefileJ package-lock.json= phpstan.neon.dist= phpstan-baseline.neon<> phpunit.xmlTaraw_sqL_query.sqMLPEADME mdC) TextRelayService.onp© Sso.phpossocontroller.ong© TextMessa©smsmessage.ong© SmsLength.php© TextRelay.phpService/Search.php x © ActivityStatusin.phpclass SearchM A10 A V< sonar-project.propertiesE test.py‹› Untitea Diagram.Xmiis vetur.config.jsM+ WEBHOOK_FILTERING_IMPLEM› ih External Librariesv E° Scratches and Consolesv C Database ConsolesV AEU& console EUl& DEALRISKS EUIA DI (EU)AEUEUvdiminnv@localhostA console fiminnv@localho# DI lliminnv@localhost4 HS local fiminnv@localhd4 SF [jiminny@localhost]Azoho dev fiminnvalocall• DROn# concole [ROnll# concole 1 [pponlA DI (PRODI› AQAЛAAI› A QAI PRODA STAGINGA console [STAGINGIA console 1 [STAGING]& uranus STAGING> C Extensionsv @ ScratchesEphostorm_shortcuts.txt=° scratch.txt{° scratch_1.ison{° scratch 2 ison<° scratch 3lison125= scratch 4 txtphe scratch 5.ohnphe scratch 6.ohnSscratch 7isonscratch R.isonstaae? ison= toctselt s...iprivate function createSearch(Query $query, Searchable|string $modelOrindex): Elastica \Searchif (request() && request()->has('debug')) {"dehua' => requesto->aet('dehua')'userUuid' => request(->user?->getIdString) ?? 'anonymous','query' => ison_encode(Squery->toArrayOflaas: LISON THROW ON ERROR).'url' => request->fullUrlO,1):— 96recurn schis->cllent-›createIndex( indexName: $model0rIndex instanceof Searchable ? Smodel0rIndex->getIndex() : $model0r 94->createsearch squery)96public function scroll(Query Squery. Searchable|string Smodel): Elastica\Scroll{...}98100* dparam searchablestrino smodelurindex usaoe of model 1s deprecated102* dreturn Lazucollection<int. Document>public function scrolloverDocuments(query Squery, SearchabLe|string SmodeLOrIndex): LazyCollection(...* I105Lix** Aoaran Searchable|strina Snodel0rIndey usage of model is denrecatedT109public function search(Query $query, Searchablelstring $modelOrIndex, ?string $queryName = null): Elastica 11€Datadog::increment( stats: 'jiminny.es.search', sampleRate: 1, ['query' => $queryName ?? "']);—112$before = microtime( as_float: true);Sresult = $this->createSearch($query, Smodel0rIndex)->search0:117Cofton = micnotimed as tloat: true)"Datadog:: timing( stat: "jiminny.es.search.time', (int) (($after - $before) * 1000)sampleRate: 1, ['quer: 120return sresult.• sonnt Keview • In 21m100% L2• Wed 13 May 15:33:40AskJiminnyReportActivityServiceTest v= custom.logscratch. &.ison= laravel.logA SF jiminny@localhost]« HS_local [jiminny@localhost] X console [PROD]cascadeA console (EU]A console [STACINClrial Owner Role SeleRetactoring User EmaDashboard Activity De+0 ..~/Library/Application Support/JetBrains/PhpStorm2026.1/consoles/db/5b1549d5-9876-4d9e-9ce3-025f12a83283/console.sait is there lust didn't include it "tracks"D69.select * from opportunities where team id = 2 and erm providen id TN (1374720564° 1145274235891 1490086191 X565571wsELEcT * FruM opportunity contacts whERE opportunity 1d = '414'*SELECT * FROM opportunity_contacts WHERE crm_provider_id = '131501';select * rrom contacts where 1d in (414. 464)1select * from activities where crm confiquration 1d = 2select settinas from crm conficurations where 1d = 11:Perfect - the activity has both video and audio tracks, so it would pass the ActivityRecorded filter even if appliedselect * From teams: # 1. 2select * from users;select * from crm_configurations where id = 39;select * from team_features where team_id = 2›select * from features;# SELECT * FROM opportunities WHERE crm_configuration_id = 2order by id desc;# and crm_provider_id = '49908861993';|Confirmed Fields (All Pass V)•• status : "failed" - Included in default status filtertype: "conference" - Allowed activity typeVis private : false - Passes privacy filter• V is internal: false - Should be visible• V actual_start_time : "2026-05-12 13:14:08" - Required field existsvtracks: Has video + audio tracks - Passes recorded tilterNext Stens to Deouaselect * from activity providers where id IN (443, 202, 203, 227):Since all fields nass the filters. check these:1. Date Range Selected in Dashboardselect * from activity imports where id = 795889:What date range is the user viewing? The detault is last 90 days. May 12, 2026 should be within range, but verity theselect c.id, c.provider, c.settings, t.* from teams t join crm confiqurations c 1<->1.n: on t.id = c.team_idactual Start date and end date parameters in te dasnooaro recuestwhere c.provider = 'hubspot'2. User/Team ScopeIs user 29089 (Line Kristensen) viewina her own dashboard? Verifv.select * from crm confiqurations crm JOIN teams + 1..n<->1: on crm.team id = t.id• User belonas to team 575 (NationBuilder) 7• User's group (Sales Team) has team_id: 575 VSELE * FROM teamsWHERE 1d = 311SELECT * FROM users WHERE id = 257;opportunities WHERE team 1d = 2• Check it RestrictTeam or RestrictUserGroupScope filters are excluding this3. Sxolicit Filter ValuesCheck if the dashboard request is passing explicit filter values that might exclude this activity, particularly:select * from opportunity_contacts where opportunity_id = 5124;select * fron contacts where id TN (3850.3853. 3851. 4073.4140.4155.4480.4530.4623. 5986. 513. 687. 1806. 1523. 3613) |activity status_values - might be set to only "completed"•only recorded activities - miaht be exolicitly set despite the override4. Actual Elasticsearch Quervselect * from activities where eom confiaunation id = 13.SELECT * FROM activities WHERE uuid_to_bin('826619ce-ec8e-4e59-8467-a01f5f6ad71e') = uuid; # 418141|Add logging in TeamInsightsRepository::getDashboardActivity0verTime to capture the exact Elasticsearch querybeina executed and see why this activitv is excluded!Most likely cause: Either the date range filter is excluding it, or an explicit filter value is being passed that overrides thedefault behavionselect id, team id, crm provider id from crm confiqurations where provider = 'hubspot' and crm provider id IS NOT NULSELECT * FROM accounts WHERE team id = 2 and crm provider id = '1212213464' order by id desc:SSISCT + SP0M contactc WHGPEteam id = 2 and account id = 5189 order by id desc:SELECT * FROM contacts WHERE team id = 2 order by id desc:select * from opportunity contacts where contact id = 6223:SELECT * FROM opportunities WHERE team id = 2 and account id = 5189 order by id desr.al .Ask anvthina (84L)"Code SWF-1.6•0 1.select * from erm profiles where crm confiquration id = 2:WN Windsurf Teams121-1UTF.A...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
36115
|
1349
|
0
|
2026-05-13T13:41:14.041547+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778679674041_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20891-improve-sms-text-relays, menu","depth":5,"on_screen":true,"help_text":"Git Branch: JY-20891-improve-sms-text-relays","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,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AskJiminnyReportActivityServiceTest","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AskJiminnyReportActivityServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AskJiminnyReportActivityServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
7581618884890279806
|
-8204352174202572862
|
click
|
hybrid
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
iTerm2ShellEditViewSessionScriptsProfilesWindowHelp>0 lыlec2-user@ip-10-30-129-190:~883-zshSprint Review - in 27 mA100% C8• Wed 13 May 15:33:40181DOCKERC *1DEV (docker)Last login: Wed May 13 09:16:21 on ttys010982APP (-zsh)84screenpipe"• ₴5Poetry could not find a pyproject.toml file in /Users/lukas or its parentsPoetry could not find a pyproject.toml file in /Users/lukas or its parentslukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ ssh jiminny-prod-ecs1 -L 7970:vpc-activities7g-t6nxe5qk7zis7pa5i7qlmp3zwm.us-east-2.es.amazonaws.com:80Enter MFA code for arn:aws:iam::438740370364:mfa/[EMAIL]:Warning: Permanently added 'jiminny-prod-ecs1' (ED25519) to the list of known hosts.A newer release of "Amazon Linux" is available.Version 2023.10.20260330:Version 2023.11.20260406:Version 2023.11.20260413:Version 2023.11.20260427:Version 2023.11.20260505:Version 2023.11.20260509:Run "/usr/bin/dnf check-release-update" for full release and version update info#_####_\_#####\\###|\#/v~'Amazon Linux 2023 (ECS Optimized)ec2-user@ip-10-30-129-190:~ (. 26Im/*Fordocumentation,visit [URL_WITH_CREDENTIALS] ~]$ ||...
|
36113
|
NULL
|
NULL
|
NULL
|
|
36011
|
1344
|
29
|
2026-05-13T13:30:32.091931+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778679032091_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhostormVIewINavigareCodeKeractorFV faVsco.js°9 JY PhostormVIewINavigareCodeKeractorFV faVsco.js°9 JY-20891-improve-sms-text-relaysProledey© MailboxController.phpM MakefileJ package-lock.json= phpstan.neon.dist= phpstan-baseline.neon<> phpunit.xmlTaraw_sqL_query.sqMLPEADME mdC) TextRelayService.onp© Sso.phpossocontroller.ong© TextMessa©smsmessage.ong© SmsLength.php© TextRelay.phpService/Search.php x © ActivityStatusin.phpclass SearchM A10 A V< sonar-project.propertiesE test.py‹› Untitea Diagram.Xmiis vetur.config.jsM+ WEBHOOK_FILTERING_IMPLEM› ih External Librariesv E° Scratches and Consolesv C Database ConsolesV AEU& console EUl& DEALRISKS EUIA DI (EU)AEUEUvdiminnv@localhostA console fiminnv@localho# DI lliminnv@localhost4 HS local fiminnv@localhd4 SF [jiminny@localhost]Azoho dev fiminnvalocall• DROn# concole [ROnll# concole 1 [pponlA DI (PRODI› AQAЛAAI› A QAI PRODA STAGINGA console [STAGINGIA console 1 [STAGING]& uranus STAGING> C Extensionsv @ ScratchesEphostorm_shortcuts.txt=° scratch.txt{° scratch_1.ison{° scratch 2 ison<° scratch 3lison125= scratch 4 txtphe scratch 5.ohnphe scratch 6.ohnSscratch 7isonscratch R.isonstaae? ison= toctselt s...iprivate function createSearch(Query $query, Searchable|string $modelOrindex): Elastica \Searchif (request() && request()->has('debug')) {"dehua' => requesto->aet('dehua')'userUuid' => request(->user?->getIdString) ?? 'anonymous','query' => ison_encode(Squery->toArrayOflaas: LISON THROW ON ERROR).'url' => request->fullUrlO,1):— 96recurn schis->cllent-›createIndex( indexName: $model0rIndex instanceof Searchable ? Smodel0rIndex->getIndex() : $model0r 94->createsearch squery)96public function scroll(Query Squery. Searchable|string Smodel): Elastica\Scroll{...}98100* dparam searchablestrino smodelurindex usaoe of model 1s deprecated102* dreturn Lazucollection<int. Document>public function scrolloverDocuments(query Squery, SearchabLe|string SmodeLOrIndex): LazyCollection(...* I105Lix** Aoaran Searchable|strina Snodel0rIndey usage of model is denrecatedT109public function search(Query $query, Searchablelstring $modelOrIndex, ?string $queryName = null): Elastica 11€Datadog::increment( stats: 'jiminny.es.search', sampleRate: 1, ['query' => $queryName ?? "']);—112$before = microtime( as_float: true);Sresult = $this->createSearch($query, Smodel0rIndex)->search0:117Cofton = micnotimed as tloat: true)"Datadog:: timing( stat: "jiminny.es.search.time', (int) (($after - $before) * 1000)sampleRate: 1, ['quer: 120return sresult.• sonnt Keview • In 21m100% L2• Wed 13 May 15:33:40AskJiminnyReportActivityServiceTest v= custom.logscratch. &.ison= laravel.logA SF jiminny@localhost]« HS_local [jiminny@localhost] X console [PROD]cascadeA console (EU]A console [STACINClrial Owner Role SeleRetactoring User EmaDashboard Activity De+0 ..~/Library/Application Support/JetBrains/PhpStorm2026.1/consoles/db/5b1549d5-9876-4d9e-9ce3-025f12a83283/console.sait is there lust didn't include it "tracks"D69.select * from opportunities where team id = 2 and erm providen id TN (1374720564° 1145274235891 1490086191 X565571wsELEcT * FruM opportunity contacts whERE opportunity 1d = '414'*SELECT * FROM opportunity_contacts WHERE crm_provider_id = '131501';select * rrom contacts where 1d in (414. 464)1select * from activities where crm confiquration 1d = 2select settinas from crm conficurations where 1d = 11:Perfect - the activity has both video and audio tracks, so it would pass the ActivityRecorded filter even if appliedselect * From teams: # 1. 2select * from users;select * from crm_configurations where id = 39;select * from team_features where team_id = 2›select * from features;# SELECT * FROM opportunities WHERE crm_configuration_id = 2order by id desc;# and crm_provider_id = '49908861993';|Confirmed Fields (All Pass V)•• status : "failed" - Included in default status filtertype: "conference" - Allowed activity typeVis private : false - Passes privacy filter• V is internal: false - Should be visible• V actual_start_time : "2026-05-12 13:14:08" - Required field existsvtracks: Has video + audio tracks - Passes recorded tilterNext Stens to Deouaselect * from activity providers where id IN (443, 202, 203, 227):Since all fields nass the filters. check these:1. Date Range Selected in Dashboardselect * from activity imports where id = 795889:What date range is the user viewing? The detault is last 90 days. May 12, 2026 should be within range, but verity theselect c.id, c.provider, c.settings, t.* from teams t join crm confiqurations c 1<->1.n: on t.id = c.team_idactual Start date and end date parameters in te dasnooaro recuestwhere c.provider = 'hubspot'2. User/Team ScopeIs user 29089 (Line Kristensen) viewina her own dashboard? Verifv.select * from crm confiqurations crm JOIN teams + 1..n<->1: on crm.team id = t.id• User belonas to team 575 (NationBuilder) 7• User's group (Sales Team) has team_id: 575 VSELE * FROM teamsWHERE 1d = 311SELECT * FROM users WHERE id = 257;opportunities WHERE team 1d = 2• Check it RestrictTeam or RestrictUserGroupScope filters are excluding this3. Sxolicit Filter ValuesCheck if the dashboard request is passing explicit filter values that might exclude this activity, particularly:select * from opportunity_contacts where opportunity_id = 5124;select * fron contacts where id TN (3850.3853. 3851. 4073.4140.4155.4480.4530.4623. 5986. 513. 687. 1806. 1523. 3613) |activity status_values - might be set to only "completed"•only recorded activities - miaht be exolicitly set despite the override4. Actual Elasticsearch Quervselect * from activities where eom confiaunation id = 13.SELECT * FROM activities WHERE uuid_to_bin('826619ce-ec8e-4e59-8467-a01f5f6ad71e') = uuid; # 418141|Add logging in TeamInsightsRepository::getDashboardActivity0verTime to capture the exact Elasticsearch querybeina executed and see why this activitv is excluded!Most likely cause: Either the date range filter is excluding it, or an explicit filter value is being passed that overrides thedefault behavionselect id, team id, crm provider id from crm confiqurations where provider = 'hubspot' and crm provider id IS NOT NULSELECT * FROM accounts WHERE team id = 2 and crm provider id = '1212213464' order by id desc:SSISCT + SP0M contactc WHGPEteam id = 2 and account id = 5189 order by id desc:SELECT * FROM contacts WHERE team id = 2 order by id desc:select * from opportunity contacts where contact id = 6223:SELECT * FROM opportunities WHERE team id = 2 and account id = 5189 order by id desr.al .Ask anvthina (84L)"Code SWF-1.6•0 1.select * from erm profiles where crm confiquration id = 2:WN Windsurf Teams121-1UTF.A...
|
NULL
|
1837425836067260207
|
NULL
|
click
|
ocr
|
NULL
|
PhostormVIewINavigareCodeKeractorFV faVsco.js°9 JY PhostormVIewINavigareCodeKeractorFV faVsco.js°9 JY-20891-improve-sms-text-relaysProledey© MailboxController.phpM MakefileJ package-lock.json= phpstan.neon.dist= phpstan-baseline.neon<> phpunit.xmlTaraw_sqL_query.sqMLPEADME mdC) TextRelayService.onp© Sso.phpossocontroller.ong© TextMessa©smsmessage.ong© SmsLength.php© TextRelay.phpService/Search.php x © ActivityStatusin.phpclass SearchM A10 A V< sonar-project.propertiesE test.py‹› Untitea Diagram.Xmiis vetur.config.jsM+ WEBHOOK_FILTERING_IMPLEM› ih External Librariesv E° Scratches and Consolesv C Database ConsolesV AEU& console EUl& DEALRISKS EUIA DI (EU)AEUEUvdiminnv@localhostA console fiminnv@localho# DI lliminnv@localhost4 HS local fiminnv@localhd4 SF [jiminny@localhost]Azoho dev fiminnvalocall• DROn# concole [ROnll# concole 1 [pponlA DI (PRODI› AQAЛAAI› A QAI PRODA STAGINGA console [STAGINGIA console 1 [STAGING]& uranus STAGING> C Extensionsv @ ScratchesEphostorm_shortcuts.txt=° scratch.txt{° scratch_1.ison{° scratch 2 ison<° scratch 3lison125= scratch 4 txtphe scratch 5.ohnphe scratch 6.ohnSscratch 7isonscratch R.isonstaae? ison= toctselt s...iprivate function createSearch(Query $query, Searchable|string $modelOrindex): Elastica \Searchif (request() && request()->has('debug')) {"dehua' => requesto->aet('dehua')'userUuid' => request(->user?->getIdString) ?? 'anonymous','query' => ison_encode(Squery->toArrayOflaas: LISON THROW ON ERROR).'url' => request->fullUrlO,1):— 96recurn schis->cllent-›createIndex( indexName: $model0rIndex instanceof Searchable ? Smodel0rIndex->getIndex() : $model0r 94->createsearch squery)96public function scroll(Query Squery. Searchable|string Smodel): Elastica\Scroll{...}98100* dparam searchablestrino smodelurindex usaoe of model 1s deprecated102* dreturn Lazucollection<int. Document>public function scrolloverDocuments(query Squery, SearchabLe|string SmodeLOrIndex): LazyCollection(...* I105Lix** Aoaran Searchable|strina Snodel0rIndey usage of model is denrecatedT109public function search(Query $query, Searchablelstring $modelOrIndex, ?string $queryName = null): Elastica 11€Datadog::increment( stats: 'jiminny.es.search', sampleRate: 1, ['query' => $queryName ?? "']);—112$before = microtime( as_float: true);Sresult = $this->createSearch($query, Smodel0rIndex)->search0:117Cofton = micnotimed as tloat: true)"Datadog:: timing( stat: "jiminny.es.search.time', (int) (($after - $before) * 1000)sampleRate: 1, ['quer: 120return sresult.• sonnt Keview • In 21m100% L2• Wed 13 May 15:33:40AskJiminnyReportActivityServiceTest v= custom.logscratch. &.ison= laravel.logA SF jiminny@localhost]« HS_local [jiminny@localhost] X console [PROD]cascadeA console (EU]A console [STACINClrial Owner Role SeleRetactoring User EmaDashboard Activity De+0 ..~/Library/Application Support/JetBrains/PhpStorm2026.1/consoles/db/5b1549d5-9876-4d9e-9ce3-025f12a83283/console.sait is there lust didn't include it "tracks"D69.select * from opportunities where team id = 2 and erm providen id TN (1374720564° 1145274235891 1490086191 X565571wsELEcT * FruM opportunity contacts whERE opportunity 1d = '414'*SELECT * FROM opportunity_contacts WHERE crm_provider_id = '131501';select * rrom contacts where 1d in (414. 464)1select * from activities where crm confiquration 1d = 2select settinas from crm conficurations where 1d = 11:Perfect - the activity has both video and audio tracks, so it would pass the ActivityRecorded filter even if appliedselect * From teams: # 1. 2select * from users;select * from crm_configurations where id = 39;select * from team_features where team_id = 2›select * from features;# SELECT * FROM opportunities WHERE crm_configuration_id = 2order by id desc;# and crm_provider_id = '49908861993';|Confirmed Fields (All Pass V)•• status : "failed" - Included in default status filtertype: "conference" - Allowed activity typeVis private : false - Passes privacy filter• V is internal: false - Should be visible• V actual_start_time : "2026-05-12 13:14:08" - Required field existsvtracks: Has video + audio tracks - Passes recorded tilterNext Stens to Deouaselect * from activity providers where id IN (443, 202, 203, 227):Since all fields nass the filters. check these:1. Date Range Selected in Dashboardselect * from activity imports where id = 795889:What date range is the user viewing? The detault is last 90 days. May 12, 2026 should be within range, but verity theselect c.id, c.provider, c.settings, t.* from teams t join crm confiqurations c 1<->1.n: on t.id = c.team_idactual Start date and end date parameters in te dasnooaro recuestwhere c.provider = 'hubspot'2. User/Team ScopeIs user 29089 (Line Kristensen) viewina her own dashboard? Verifv.select * from crm confiqurations crm JOIN teams + 1..n<->1: on crm.team id = t.id• User belonas to team 575 (NationBuilder) 7• User's group (Sales Team) has team_id: 575 VSELE * FROM teamsWHERE 1d = 311SELECT * FROM users WHERE id = 257;opportunities WHERE team 1d = 2• Check it RestrictTeam or RestrictUserGroupScope filters are excluding this3. Sxolicit Filter ValuesCheck if the dashboard request is passing explicit filter values that might exclude this activity, particularly:select * from opportunity_contacts where opportunity_id = 5124;select * fron contacts where id TN (3850.3853. 3851. 4073.4140.4155.4480.4530.4623. 5986. 513. 687. 1806. 1523. 3613) |activity status_values - might be set to only "completed"•only recorded activities - miaht be exolicitly set despite the override4. Actual Elasticsearch Quervselect * from activities where eom confiaunation id = 13.SELECT * FROM activities WHERE uuid_to_bin('826619ce-ec8e-4e59-8467-a01f5f6ad71e') = uuid; # 418141|Add logging in TeamInsightsRepository::getDashboardActivity0verTime to capture the exact Elasticsearch querybeina executed and see why this activitv is excluded!Most likely cause: Either the date range filter is excluding it, or an explicit filter value is being passed that overrides thedefault behavionselect id, team id, crm provider id from crm confiqurations where provider = 'hubspot' and crm provider id IS NOT NULSELECT * FROM accounts WHERE team id = 2 and crm provider id = '1212213464' order by id desc:SSISCT + SP0M contactc WHGPEteam id = 2 and account id = 5189 order by id desc:SELECT * FROM contacts WHERE team id = 2 order by id desc:select * from opportunity contacts where contact id = 6223:SELECT * FROM opportunities WHERE team id = 2 and account id = 5189 order by id desr.al .Ask anvthina (84L)"Code SWF-1.6•0 1.select * from erm profiles where crm confiquration id = 2:WN Windsurf Teams121-1UTF.A...
|
36008
|
NULL
|
NULL
|
NULL
|
|
36009
|
1343
|
31
|
2026-05-13T13:30:32.112627+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778679032112_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp>0 lыlec2-user@ip-10-30-129-190:~883-zshSprint Review - in 27 mA100% C8• Wed 13 May 15:33:40181DOCKERC *1DEV (docker)Last login: Wed May 13 09:16:21 on ttys010982APP (-zsh)84screenpipe"• ₴5Poetry could not find a pyproject.toml file in /Users/lukas or its parentsPoetry could not find a pyproject.toml file in /Users/lukas or its parentslukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ ssh jiminny-prod-ecs1 -L 7970:vpc-activities7g-t6nxe5qk7zis7pa5i7qlmp3zwm.us-east-2.es.amazonaws.com:80Enter MFA code for arn:aws:iam::438740370364:mfa/[EMAIL]:Warning: Permanently added 'jiminny-prod-ecs1' (ED25519) to the list of known hosts.A newer release of "Amazon Linux" is available.Version 2023.10.20260330:Version 2023.11.20260406:Version 2023.11.20260413:Version 2023.11.20260427:Version 2023.11.20260505:Version 2023.11.20260509:Run "/usr/bin/dnf check-release-update" for full release and version update info#_####_\_#####\\###|\#/v~'Amazon Linux 2023 (ECS Optimized)ec2-user@ip-10-30-129-190:~ (. 26Im/*Fordocumentation,visit [URL_WITH_CREDENTIALS] ~]$ ||...
|
NULL
|
5725358035782193467
|
NULL
|
click
|
ocr
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp>0 lыlec2-user@ip-10-30-129-190:~883-zshSprint Review - in 27 mA100% C8• Wed 13 May 15:33:40181DOCKERC *1DEV (docker)Last login: Wed May 13 09:16:21 on ttys010982APP (-zsh)84screenpipe"• ₴5Poetry could not find a pyproject.toml file in /Users/lukas or its parentsPoetry could not find a pyproject.toml file in /Users/lukas or its parentslukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ ssh jiminny-prod-ecs1 -L 7970:vpc-activities7g-t6nxe5qk7zis7pa5i7qlmp3zwm.us-east-2.es.amazonaws.com:80Enter MFA code for arn:aws:iam::438740370364:mfa/[EMAIL]:Warning: Permanently added 'jiminny-prod-ecs1' (ED25519) to the list of known hosts.A newer release of "Amazon Linux" is available.Version 2023.10.20260330:Version 2023.11.20260406:Version 2023.11.20260413:Version 2023.11.20260427:Version 2023.11.20260505:Version 2023.11.20260509:Run "/usr/bin/dnf check-release-update" for full release and version update info#_####_\_#####\\###|\#/v~'Amazon Linux 2023 (ECS Optimized)ec2-user@ip-10-30-129-190:~ (. 26Im/*Fordocumentation,visit [URL_WITH_CREDENTIALS] ~]$ ||...
|
36007
|
NULL
|
NULL
|
NULL
|
|
36008
|
1344
|
28
|
2026-05-13T13:30:27.077722+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778679027077_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20891-improve-sms-text-relays, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.08843085,"height":0.025538707},"on_screen":true,"help_text":"Git Branch: JY-20891-improve-sms-text-relays","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.8081782,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AskJiminnyReportActivityServiceTest","depth":6,"bounds":{"left":0.8234708,"top":0.019952115,"width":0.09208777,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AskJiminnyReportActivityServiceTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AskJiminnyReportActivityServiceTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
7581618884890279806
|
-8204352174202572862
|
click
|
hybrid
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
PhostormVIewINavigareCodeKeractorFV faVsco.js°9 JY-20891-improve-sms-text-relaysProledey© MailboxController.phpM MakefileJ package-lock.json= phpstan.neon.dist= phpstan-baseline.neon<> phpunit.xmlTaraw_sqL_query.sqMLPEADME mdC) TextRelayService.onp© Sso.phpossocontroller.ong© TextMessa©smsmessage.ong© SmsLength.php© TextRelay.phpService/Search.php x © ActivityStatusin.phpclass SearchM A10 A V< sonar-project.propertiesE test.py‹› Untitea Diagram.Xmiis vetur.config.jsM+ WEBHOOK_FILTERING_IMPLEM› ih External Librariesv E° Scratches and Consolesv C Database ConsolesV AEU& console EUl& DEALRISKS EUIA DI (EU)AEUEUvdiminnv@localhostA console fiminnv@localho# DI lliminnv@localhost4 HS local fiminnv@localhd4 SF [jiminny@localhost]Azoho dev fiminnvalocall• DROn# concole [ROnll# concole 1 [pponlA DI (PRODI› AQAЛAAI› A QAI PRODA STAGINGA console [STAGINGIA console 1 [STAGING]& uranus STAGING> C Extensionsv @ ScratchesEphostorm_shortcuts.txt=° scratch.txt{° scratch_1.ison{° scratch 2 ison<° scratch 3lison125= scratch 4 txtphe scratch 5.ohnphe scratch 6.ohnSscratch 7isonscratch R.isonstaae? ison= toctselt s...iprivate function createSearch(Query $query, Searchable|string $modelOrindex): Elastica \Searchif (request() && request()->has('debug')) {"dehua' => requesto->aet('dehua')'userUuid' => request(->user?->getIdString) ?? 'anonymous','query' => ison_encode(Squery->toArrayOflaas: LISON THROW ON ERROR).'url' => request->fullUrlO,1):— 96recurn schis->cllent-›createIndex( indexName: $model0rIndex instanceof Searchable ? Smodel0rIndex->getIndex() : $model0r 94->createsearch squery)96public function scroll(Query Squery. Searchable|string Smodel): Elastica\Scroll{...}98100* dparam searchablestrino smodelurindex usaoe of model 1s deprecated102* dreturn Lazucollection<int. Document>public function scrolloverDocuments(query Squery, SearchabLe|string SmodeLOrIndex): LazyCollection(...* I105Lix** Aoaran Searchable|strina Snodel0rIndey usage of model is denrecatedT109public function search(Query $query, Searchablelstring $modelOrIndex, ?string $queryName = null): Elastica 11€Datadog::increment( stats: 'jiminny.es.search', sampleRate: 1, ['query' => $queryName ?? "']);—112$before = microtime( as_float: true);Sresult = $this->createSearch($query, Smodel0rIndex)->search0:117Cofton = micnotimed as tloat: true)"Datadog:: timing( stat: "jiminny.es.search.time', (int) (($after - $before) * 1000)sampleRate: 1, ['quer: 120return sresult.• sonnt Keview • In 21m100% L2• Wed 13 May 15:33:40AskJiminnyReportActivityServiceTest v= custom.logscratch. &.ison= laravel.logA SF jiminny@localhost]« HS_local [jiminny@localhost] X console [PROD]cascadeA console (EU]A console [STACINClrial Owner Role SeleRetactoring User EmaDashboard Activity De+0 ..~/Library/Application Support/JetBrains/PhpStorm2026.1/consoles/db/5b1549d5-9876-4d9e-9ce3-025f12a83283/console.sait is there lust didn't include it "tracks"D69.select * from opportunities where team id = 2 and erm providen id TN (1374720564° 1145274235891 1490086191 X565571wsELEcT * FruM opportunity contacts whERE opportunity 1d = '414'*SELECT * FROM opportunity_contacts WHERE crm_provider_id = '131501';select * rrom contacts where 1d in (414. 464)1select * from activities where crm confiquration 1d = 2select settinas from crm conficurations where 1d = 11:Perfect - the activity has both video and audio tracks, so it would pass the ActivityRecorded filter even if appliedselect * From teams: # 1. 2select * from users;select * from crm_configurations where id = 39;select * from team_features where team_id = 2›select * from features;# SELECT * FROM opportunities WHERE crm_configuration_id = 2order by id desc;# and crm_provider_id = '49908861993';|Confirmed Fields (All Pass V)•• status : "failed" - Included in default status filtertype: "conference" - Allowed activity typeVis private : false - Passes privacy filter• V is internal: false - Should be visible• V actual_start_time : "2026-05-12 13:14:08" - Required field existsvtracks: Has video + audio tracks - Passes recorded tilterNext Stens to Deouaselect * from activity providers where id IN (443, 202, 203, 227):Since all fields nass the filters. check these:1. Date Range Selected in Dashboardselect * from activity imports where id = 795889:What date range is the user viewing? The detault is last 90 days. May 12, 2026 should be within range, but verity theselect c.id, c.provider, c.settings, t.* from teams t join crm confiqurations c 1<->1.n: on t.id = c.team_idactual Start date and end date parameters in te dasnooaro recuestwhere c.provider = 'hubspot'2. User/Team ScopeIs user 29089 (Line Kristensen) viewina her own dashboard? Verifv.select * from crm confiqurations crm JOIN teams + 1..n<->1: on crm.team id = t.id• User belonas to team 575 (NationBuilder) 7• User's group (Sales Team) has team_id: 575 VSELE * FROM teamsWHERE 1d = 311SELECT * FROM users WHERE id = 257;opportunities WHERE team 1d = 2• Check it RestrictTeam or RestrictUserGroupScope filters are excluding this3. Sxolicit Filter ValuesCheck if the dashboard request is passing explicit filter values that might exclude this activity, particularly:select * from opportunity_contacts where opportunity_id = 5124;select * fron contacts where id TN (3850.3853. 3851. 4073.4140.4155.4480.4530.4623. 5986. 513. 687. 1806. 1523. 3613) |activity status_values - might be set to only "completed"•only recorded activities - miaht be exolicitly set despite the override4. Actual Elasticsearch Quervselect * from activities where eom confiaunation id = 13.SELECT * FROM activities WHERE uuid_to_bin('826619ce-ec8e-4e59-8467-a01f5f6ad71e') = uuid; # 418141|Add logging in TeamInsightsRepository::getDashboardActivity0verTime to capture the exact Elasticsearch querybeina executed and see why this activitv is excluded!Most likely cause: Either the date range filter is excluding it, or an explicit filter value is being passed that overrides thedefault behavionselect id, team id, crm provider id from crm confiqurations where provider = 'hubspot' and crm provider id IS NOT NULSELECT * FROM accounts WHERE team id = 2 and crm provider id = '1212213464' order by id desc:SSISCT + SP0M contactc WHGPEteam id = 2 and account id = 5189 order by id desc:SELECT * FROM contacts WHERE team id = 2 order by id desc:select * from opportunity contacts where contact id = 6223:SELECT * FROM opportunities WHERE team id = 2 and account id = 5189 order by id desr.al .Ask anvthina (84L)"Code SWF-1.6•0 1.select * from erm profiles where crm confiquration id = 2:WN Windsurf Teams121-1UTF.A...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
36007
|
1343
|
30
|
2026-05-13T13:30:27.059516+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778679027059_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp>0 lыlec2-user@ip-10-30-129-190:~883-zshSprint Review - in 27 mA100% C8• Wed 13 May 15:33:40181DOCKERC *1DEV (docker)Last login: Wed May 13 09:16:21 on ttys010982APP (-zsh)84screenpipe"• ₴5Poetry could not find a pyproject.toml file in /Users/lukas or its parentsPoetry could not find a pyproject.toml file in /Users/lukas or its parentslukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ ssh jiminny-prod-ecs1 -L 7970:vpc-activities7g-t6nxe5qk7zis7pa5i7qlmp3zwm.us-east-2.es.amazonaws.com:80Enter MFA code for arn:aws:iam::438740370364:mfa/[EMAIL]:Warning: Permanently added 'jiminny-prod-ecs1' (ED25519) to the list of known hosts.A newer release of "Amazon Linux" is available.Version 2023.10.20260330:Version 2023.11.20260406:Version 2023.11.20260413:Version 2023.11.20260427:Version 2023.11.20260505:Version 2023.11.20260509:Run "/usr/bin/dnf check-release-update" for full release and version update info#_####_\_#####\\###|\#/v~'Amazon Linux 2023 (ECS Optimized)ec2-user@ip-10-30-129-190:~ (. 26Im/*Fordocumentation,visit [URL_WITH_CREDENTIALS] ~]$ ||...
|
NULL
|
5725358035782193467
|
NULL
|
click
|
ocr
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp>0 lыlec2-user@ip-10-30-129-190:~883-zshSprint Review - in 27 mA100% C8• Wed 13 May 15:33:40181DOCKERC *1DEV (docker)Last login: Wed May 13 09:16:21 on ttys010982APP (-zsh)84screenpipe"• ₴5Poetry could not find a pyproject.toml file in /Users/lukas or its parentsPoetry could not find a pyproject.toml file in /Users/lukas or its parentslukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ ssh jiminny-prod-ecs1 -L 7970:vpc-activities7g-t6nxe5qk7zis7pa5i7qlmp3zwm.us-east-2.es.amazonaws.com:80Enter MFA code for arn:aws:iam::438740370364:mfa/[EMAIL]:Warning: Permanently added 'jiminny-prod-ecs1' (ED25519) to the list of known hosts.A newer release of "Amazon Linux" is available.Version 2023.10.20260330:Version 2023.11.20260406:Version 2023.11.20260413:Version 2023.11.20260427:Version 2023.11.20260505:Version 2023.11.20260509:Run "/usr/bin/dnf check-release-update" for full release and version update info#_####_\_#####\\###|\#/v~'Amazon Linux 2023 (ECS Optimized)ec2-user@ip-10-30-129-190:~ (. 26Im/*Fordocumentation,visit [URL_WITH_CREDENTIALS] ~]$ ||...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
35962
|
1344
|
6
|
2026-05-13T13:27:04.499347+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778678824499_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, 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
10
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Component\ElasticSearch\Service;
use ChaseConey\LaravelDatadogHelper\Datadog;
use Elastica;
use Elastica\Document;
use Elastica\Query;
use Generator;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\LazyCollection;
use Jiminny\Component\ElasticSearch\Client;
use Jiminny\Component\ElasticSearch\Contract\Searchable;
use Jiminny\Component\ElasticSearch\ModelFiller;
use Jiminny\Models\Activity;
/**
* Class Search
*
* @package Jiminny\Component\ElasticSearch\Service
*/
class Search
{
/**
* @var Client
*/
private $client;
/**
* @var ModelFiller\Elastica
*/
private $modelFiller;
public function __construct(Client $client, ModelFiller\Elastica $modelFiller)
{
$this->client = $client;
$this->modelFiller = $modelFiller;
}
public function updateDocument(Searchable $model): self
{
return $this->updateDocumentCollection($model, new Collection([$model]));
}
public function updateDocumentCollection(
Searchable $model,
Collection $collection,
int $chunkSize = 10,
?callable $callback = null,
): self {
if ($collection->count() === 0) {
return $this;
}
$documentType = $this->client->createIndex($model->getIndex());
$collection
->chunk($chunkSize)
->each(static function (Collection $collection) use ($documentType, $callback): void {
$documents = $collection->map(static function (Searchable $model): Document {
return new Document((string) $model->getId(), $model->getIndexableAttributes());
});
$documentType->addDocuments($documents->all());
if ($callback !== null) {
$callback($collection, $documents);
}
gc_collect_cycles();
});
return $this;
}
private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\Search
{
if (request() && request()->has('debug')) {
Log::info('Debug ES query: ', [
'debug' => request()->get('debug'),
'userId' => request()->user()?->id ?? 'anonymous',
'userUuid' => request()->user()?->getIdString() ?? 'anonymous',
'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),
'url' => request()->fullUrl(),
]);
}
return $this->client
->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)
->createSearch($query);
}
public function scroll(Query $query, Searchable|string $model): Elastica\Scroll
{
return new Elastica\Scroll($this->createSearch($query, $model));
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*
* @return LazyCollection<int, Document>
*/
public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection
{
return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {
foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {
foreach ($resultSet->getDocuments() as $document) {
yield $document;
}
}
});
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*/
public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\ResultSet
{
Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);
$before = microtime(true);
$result = $this->createSearch($query, $modelOrIndex)->search();
$after = microtime(true);
Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);
return $result;
}
/**
* @TODO use LazyCollection
*
* @return Collection<int, Activity>
*/
public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection
{
return $this
->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)
->collect();
}
/**
* @return array{totalHits: int, results: Collection<int, Activity>}
*/
public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array
{
$search = $this->search($query, $model, $queryName);
/**
* @TODO Use value-object instead.
*/
return [
'totalHits' => $search->getTotalHits(),
'results' => $this
->hydrateCollection($search->getDocuments(), $model)
->collect(),
];
}
private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection
{
return LazyCollection::make($collection)
->map(function (Document $document) use ($model): Searchable {
return $this->hydrateModel($document, $model);
});
}
private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable
{
$attributes = $document->getData();
$attributes['id'] = $document->getId();
/** @var Searchable&Model */
return $this->modelFiller->newFromBuilderRecursive($model, $attributes);
}
}
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
20
1
17
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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
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 * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
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 `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
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;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20891-improve-sms-text-relays, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.08843085,"height":0.025538707},"on_screen":true,"help_text":"Git Branch: JY-20891-improve-sms-text-relays","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.8081782,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AskJiminnyReportActivityServiceTest","depth":6,"bounds":{"left":0.8234708,"top":0.019952115,"width":0.09208777,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AskJiminnyReportActivityServiceTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AskJiminnyReportActivityServiceTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10","depth":4,"bounds":{"left":0.38231382,"top":0.17478053,"width":0.009640957,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.39361703,"top":0.17318435,"width":0.00731383,"height":0.018355945},"on_screen":true,"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.40093085,"top":0.17318435,"width":0.006981383,"height":0.018355945},"on_screen":true,"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\\ElasticSearch\\Service;\n\nuse ChaseConey\\LaravelDatadogHelper\\Datadog;\nuse Elastica;\nuse Elastica\\Document;\nuse Elastica\\Query;\nuse Generator;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\Log;\nuse Illuminate\\Support\\LazyCollection;\nuse Jiminny\\Component\\ElasticSearch\\Client;\nuse Jiminny\\Component\\ElasticSearch\\Contract\\Searchable;\nuse Jiminny\\Component\\ElasticSearch\\ModelFiller;\nuse Jiminny\\Models\\Activity;\n\n/**\n * Class Search\n *\n * @package Jiminny\\Component\\ElasticSearch\\Service\n */\nclass Search\n{\n /**\n * @var Client\n */\n private $client;\n\n /**\n * @var ModelFiller\\Elastica\n */\n private $modelFiller;\n\n public function __construct(Client $client, ModelFiller\\Elastica $modelFiller)\n {\n $this->client = $client;\n $this->modelFiller = $modelFiller;\n }\n\n public function updateDocument(Searchable $model): self\n {\n return $this->updateDocumentCollection($model, new Collection([$model]));\n }\n\n public function updateDocumentCollection(\n Searchable $model,\n Collection $collection,\n int $chunkSize = 10,\n ?callable $callback = null,\n ): self {\n if ($collection->count() === 0) {\n return $this;\n }\n\n $documentType = $this->client->createIndex($model->getIndex());\n\n $collection\n ->chunk($chunkSize)\n ->each(static function (Collection $collection) use ($documentType, $callback): void {\n $documents = $collection->map(static function (Searchable $model): Document {\n return new Document((string) $model->getId(), $model->getIndexableAttributes());\n });\n\n $documentType->addDocuments($documents->all());\n\n if ($callback !== null) {\n $callback($collection, $documents);\n }\n\n gc_collect_cycles();\n });\n\n return $this;\n }\n\n private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\\Search\n {\n if (request() && request()->has('debug')) {\n Log::info('Debug ES query: ', [\n 'debug' => request()->get('debug'),\n 'userId' => request()->user()?->id ?? 'anonymous',\n 'userUuid' => request()->user()?->getIdString() ?? 'anonymous',\n 'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),\n 'url' => request()->fullUrl(),\n ]);\n }\n\n return $this->client\n ->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)\n ->createSearch($query);\n }\n\n public function scroll(Query $query, Searchable|string $model): Elastica\\Scroll\n {\n return new Elastica\\Scroll($this->createSearch($query, $model));\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n *\n * @return LazyCollection<int, Document>\n */\n public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection\n {\n return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {\n foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {\n foreach ($resultSet->getDocuments() as $document) {\n yield $document;\n }\n }\n });\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n */\n public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\\ResultSet\n {\n Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);\n\n $before = microtime(true);\n\n $result = $this->createSearch($query, $modelOrIndex)->search();\n\n $after = microtime(true);\n\n Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);\n\n return $result;\n }\n\n /**\n * @TODO use LazyCollection\n *\n * @return Collection<int, Activity>\n */\n public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection\n {\n return $this\n ->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)\n ->collect();\n }\n\n /**\n * @return array{totalHits: int, results: Collection<int, Activity>}\n */\n public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array\n {\n $search = $this->search($query, $model, $queryName);\n\n /**\n * @TODO Use value-object instead.\n */\n return [\n 'totalHits' => $search->getTotalHits(),\n 'results' => $this\n ->hydrateCollection($search->getDocuments(), $model)\n ->collect(),\n ];\n }\n\n private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection\n {\n return LazyCollection::make($collection)\n ->map(function (Document $document) use ($model): Searchable {\n return $this->hydrateModel($document, $model);\n });\n }\n\n private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable\n {\n $attributes = $document->getData();\n $attributes['id'] = $document->getId();\n\n /** @var Searchable&Model */\n return $this->modelFiller->newFromBuilderRecursive($model, $attributes);\n }\n}","depth":4,"on_screen":true,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Component\\ElasticSearch\\Service;\n\nuse ChaseConey\\LaravelDatadogHelper\\Datadog;\nuse Elastica;\nuse Elastica\\Document;\nuse Elastica\\Query;\nuse Generator;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\Log;\nuse Illuminate\\Support\\LazyCollection;\nuse Jiminny\\Component\\ElasticSearch\\Client;\nuse Jiminny\\Component\\ElasticSearch\\Contract\\Searchable;\nuse Jiminny\\Component\\ElasticSearch\\ModelFiller;\nuse Jiminny\\Models\\Activity;\n\n/**\n * Class Search\n *\n * @package Jiminny\\Component\\ElasticSearch\\Service\n */\nclass Search\n{\n /**\n * @var Client\n */\n private $client;\n\n /**\n * @var ModelFiller\\Elastica\n */\n private $modelFiller;\n\n public function __construct(Client $client, ModelFiller\\Elastica $modelFiller)\n {\n $this->client = $client;\n $this->modelFiller = $modelFiller;\n }\n\n public function updateDocument(Searchable $model): self\n {\n return $this->updateDocumentCollection($model, new Collection([$model]));\n }\n\n public function updateDocumentCollection(\n Searchable $model,\n Collection $collection,\n int $chunkSize = 10,\n ?callable $callback = null,\n ): self {\n if ($collection->count() === 0) {\n return $this;\n }\n\n $documentType = $this->client->createIndex($model->getIndex());\n\n $collection\n ->chunk($chunkSize)\n ->each(static function (Collection $collection) use ($documentType, $callback): void {\n $documents = $collection->map(static function (Searchable $model): Document {\n return new Document((string) $model->getId(), $model->getIndexableAttributes());\n });\n\n $documentType->addDocuments($documents->all());\n\n if ($callback !== null) {\n $callback($collection, $documents);\n }\n\n gc_collect_cycles();\n });\n\n return $this;\n }\n\n private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\\Search\n {\n if (request() && request()->has('debug')) {\n Log::info('Debug ES query: ', [\n 'debug' => request()->get('debug'),\n 'userId' => request()->user()?->id ?? 'anonymous',\n 'userUuid' => request()->user()?->getIdString() ?? 'anonymous',\n 'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),\n 'url' => request()->fullUrl(),\n ]);\n }\n\n return $this->client\n ->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)\n ->createSearch($query);\n }\n\n public function scroll(Query $query, Searchable|string $model): Elastica\\Scroll\n {\n return new Elastica\\Scroll($this->createSearch($query, $model));\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n *\n * @return LazyCollection<int, Document>\n */\n public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection\n {\n return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {\n foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {\n foreach ($resultSet->getDocuments() as $document) {\n yield $document;\n }\n }\n });\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n */\n public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\\ResultSet\n {\n Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);\n\n $before = microtime(true);\n\n $result = $this->createSearch($query, $modelOrIndex)->search();\n\n $after = microtime(true);\n\n Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);\n\n return $result;\n }\n\n /**\n * @TODO use LazyCollection\n *\n * @return Collection<int, Activity>\n */\n public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection\n {\n return $this\n ->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)\n ->collect();\n }\n\n /**\n * @return array{totalHits: int, results: Collection<int, Activity>}\n */\n public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array\n {\n $search = $this->search($query, $model, $queryName);\n\n /**\n * @TODO Use value-object instead.\n */\n return [\n 'totalHits' => $search->getTotalHits(),\n 'results' => $this\n ->hydrateCollection($search->getDocuments(), $model)\n ->collect(),\n ];\n }\n\n private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection\n {\n return LazyCollection::make($collection)\n ->map(function (Document $document) use ($model): Searchable {\n return $this->hydrateModel($document, $model);\n });\n }\n\n private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable\n {\n $attributes = $document->getData();\n $attributes['id'] = $document->getId();\n\n /** @var Searchable&Model */\n return $this->modelFiller->newFromBuilderRecursive($model, $attributes);\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.40957448,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"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.41821808,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"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.42918882,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"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.43783244,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"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.44647607,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"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.4574468,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"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.46841756,"top":0.09896249,"width":0.024268618,"height":0.01915403},"on_screen":true,"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.4950133,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"bounds":{"left":0.50598407,"top":0.09896249,"width":0.029587766,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"bounds":{"left":0.7084442,"top":0.09896249,"width":0.02825798,"height":0.01915403},"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"20","depth":4,"bounds":{"left":0.6712101,"top":0.123703115,"width":0.010305851,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"bounds":{"left":0.68351066,"top":0.123703115,"width":0.00731383,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"17","depth":4,"bounds":{"left":0.6928192,"top":0.123703115,"width":0.00930851,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.70412236,"top":0.123703115,"width":0.007978723,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"bounds":{"left":0.7140958,"top":0.123703115,"width":0.007978723,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.7237367,"top":0.12210695,"width":0.00731383,"height":0.018355945},"on_screen":true,"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.73105055,"top":0.12210695,"width":0.006981383,"height":0.018355945},"on_screen":true,"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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\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 * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\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 `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\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;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;","depth":4,"on_screen":true,"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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\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 * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\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 `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\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;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"on_screen":false,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.011968086,"top":0.047885075,"width":0.024268618,"height":0.024740623},"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
7644424702618419
|
-7004613033495161267
|
click
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, 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
10
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Component\ElasticSearch\Service;
use ChaseConey\LaravelDatadogHelper\Datadog;
use Elastica;
use Elastica\Document;
use Elastica\Query;
use Generator;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\LazyCollection;
use Jiminny\Component\ElasticSearch\Client;
use Jiminny\Component\ElasticSearch\Contract\Searchable;
use Jiminny\Component\ElasticSearch\ModelFiller;
use Jiminny\Models\Activity;
/**
* Class Search
*
* @package Jiminny\Component\ElasticSearch\Service
*/
class Search
{
/**
* @var Client
*/
private $client;
/**
* @var ModelFiller\Elastica
*/
private $modelFiller;
public function __construct(Client $client, ModelFiller\Elastica $modelFiller)
{
$this->client = $client;
$this->modelFiller = $modelFiller;
}
public function updateDocument(Searchable $model): self
{
return $this->updateDocumentCollection($model, new Collection([$model]));
}
public function updateDocumentCollection(
Searchable $model,
Collection $collection,
int $chunkSize = 10,
?callable $callback = null,
): self {
if ($collection->count() === 0) {
return $this;
}
$documentType = $this->client->createIndex($model->getIndex());
$collection
->chunk($chunkSize)
->each(static function (Collection $collection) use ($documentType, $callback): void {
$documents = $collection->map(static function (Searchable $model): Document {
return new Document((string) $model->getId(), $model->getIndexableAttributes());
});
$documentType->addDocuments($documents->all());
if ($callback !== null) {
$callback($collection, $documents);
}
gc_collect_cycles();
});
return $this;
}
private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\Search
{
if (request() && request()->has('debug')) {
Log::info('Debug ES query: ', [
'debug' => request()->get('debug'),
'userId' => request()->user()?->id ?? 'anonymous',
'userUuid' => request()->user()?->getIdString() ?? 'anonymous',
'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),
'url' => request()->fullUrl(),
]);
}
return $this->client
->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)
->createSearch($query);
}
public function scroll(Query $query, Searchable|string $model): Elastica\Scroll
{
return new Elastica\Scroll($this->createSearch($query, $model));
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*
* @return LazyCollection<int, Document>
*/
public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection
{
return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {
foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {
foreach ($resultSet->getDocuments() as $document) {
yield $document;
}
}
});
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*/
public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\ResultSet
{
Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);
$before = microtime(true);
$result = $this->createSearch($query, $modelOrIndex)->search();
$after = microtime(true);
Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);
return $result;
}
/**
* @TODO use LazyCollection
*
* @return Collection<int, Activity>
*/
public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection
{
return $this
->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)
->collect();
}
/**
* @return array{totalHits: int, results: Collection<int, Activity>}
*/
public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array
{
$search = $this->search($query, $model, $queryName);
/**
* @TODO Use value-object instead.
*/
return [
'totalHits' => $search->getTotalHits(),
'results' => $this
->hydrateCollection($search->getDocuments(), $model)
->collect(),
];
}
private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection
{
return LazyCollection::make($collection)
->map(function (Document $document) use ($model): Searchable {
return $this->hydrateModel($document, $model);
});
}
private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable
{
$attributes = $document->getData();
$attributes['id'] = $document->getId();
/** @var Searchable&Model */
return $this->modelFiller->newFromBuilderRecursive($model, $attributes);
}
}
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
20
1
17
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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
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 * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
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 `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
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;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
35961
|
1343
|
6
|
2026-05-13T13:27:04.499327+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778678824499_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, 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
10
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Component\ElasticSearch\Service;
use ChaseConey\LaravelDatadogHelper\Datadog;
use Elastica;
use Elastica\Document;
use Elastica\Query;
use Generator;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\LazyCollection;
use Jiminny\Component\ElasticSearch\Client;
use Jiminny\Component\ElasticSearch\Contract\Searchable;
use Jiminny\Component\ElasticSearch\ModelFiller;
use Jiminny\Models\Activity;
/**
* Class Search
*
* @package Jiminny\Component\ElasticSearch\Service
*/
class Search
{
/**
* @var Client
*/
private $client;
/**
* @var ModelFiller\Elastica
*/
private $modelFiller;
public function __construct(Client $client, ModelFiller\Elastica $modelFiller)
{
$this->client = $client;
$this->modelFiller = $modelFiller;
}
public function updateDocument(Searchable $model): self
{
return $this->updateDocumentCollection($model, new Collection([$model]));
}
public function updateDocumentCollection(
Searchable $model,
Collection $collection,
int $chunkSize = 10,
?callable $callback = null,
): self {
if ($collection->count() === 0) {
return $this;
}
$documentType = $this->client->createIndex($model->getIndex());
$collection
->chunk($chunkSize)
->each(static function (Collection $collection) use ($documentType, $callback): void {
$documents = $collection->map(static function (Searchable $model): Document {
return new Document((string) $model->getId(), $model->getIndexableAttributes());
});
$documentType->addDocuments($documents->all());
if ($callback !== null) {
$callback($collection, $documents);
}
gc_collect_cycles();
});
return $this;
}
private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\Search
{
if (request() && request()->has('debug')) {
Log::info('Debug ES query: ', [
'debug' => request()->get('debug'),
'userId' => request()->user()?->id ?? 'anonymous',
'userUuid' => request()->user()?->getIdString() ?? 'anonymous',
'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),
'url' => request()->fullUrl(),
]);
}
return $this->client
->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)
->createSearch($query);
}
public function scroll(Query $query, Searchable|string $model): Elastica\Scroll
{
return new Elastica\Scroll($this->createSearch($query, $model));
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*
* @return LazyCollection<int, Document>
*/
public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection
{
return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {
foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {
foreach ($resultSet->getDocuments() as $document) {
yield $document;
}
}
});
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*/
public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\ResultSet
{
Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);
$before = microtime(true);
$result = $this->createSearch($query, $modelOrIndex)->search();
$after = microtime(true);
Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);
return $result;
}
/**
* @TODO use LazyCollection
*
* @return Collection<int, Activity>
*/
public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection
{
return $this
->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)
->collect();
}
/**
* @return array{totalHits: int, results: Collection<int, Activity>}
*/
public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array
{
$search = $this->search($query, $model, $queryName);
/**
* @TODO Use value-object instead.
*/
return [
'totalHits' => $search->getTotalHits(),
'results' => $this
->hydrateCollection($search->getDocuments(), $model)
->collect(),
];
}
private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection
{
return LazyCollection::make($collection)
->map(function (Document $document) use ($model): Searchable {
return $this->hydrateModel($document, $model);
});
}
private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable
{
$attributes = $document->getData();
$attributes['id'] = $document->getId();
/** @var Searchable&Model */
return $this->modelFiller->newFromBuilderRecursive($model, $attributes);
}
}
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...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20891-improve-sms-text-relays, menu","depth":5,"on_screen":true,"help_text":"Git Branch: JY-20891-improve-sms-text-relays","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,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AskJiminnyReportActivityServiceTest","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AskJiminnyReportActivityServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AskJiminnyReportActivityServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"on_screen":true,"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\\ElasticSearch\\Service;\n\nuse ChaseConey\\LaravelDatadogHelper\\Datadog;\nuse Elastica;\nuse Elastica\\Document;\nuse Elastica\\Query;\nuse Generator;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\Log;\nuse Illuminate\\Support\\LazyCollection;\nuse Jiminny\\Component\\ElasticSearch\\Client;\nuse Jiminny\\Component\\ElasticSearch\\Contract\\Searchable;\nuse Jiminny\\Component\\ElasticSearch\\ModelFiller;\nuse Jiminny\\Models\\Activity;\n\n/**\n * Class Search\n *\n * @package Jiminny\\Component\\ElasticSearch\\Service\n */\nclass Search\n{\n /**\n * @var Client\n */\n private $client;\n\n /**\n * @var ModelFiller\\Elastica\n */\n private $modelFiller;\n\n public function __construct(Client $client, ModelFiller\\Elastica $modelFiller)\n {\n $this->client = $client;\n $this->modelFiller = $modelFiller;\n }\n\n public function updateDocument(Searchable $model): self\n {\n return $this->updateDocumentCollection($model, new Collection([$model]));\n }\n\n public function updateDocumentCollection(\n Searchable $model,\n Collection $collection,\n int $chunkSize = 10,\n ?callable $callback = null,\n ): self {\n if ($collection->count() === 0) {\n return $this;\n }\n\n $documentType = $this->client->createIndex($model->getIndex());\n\n $collection\n ->chunk($chunkSize)\n ->each(static function (Collection $collection) use ($documentType, $callback): void {\n $documents = $collection->map(static function (Searchable $model): Document {\n return new Document((string) $model->getId(), $model->getIndexableAttributes());\n });\n\n $documentType->addDocuments($documents->all());\n\n if ($callback !== null) {\n $callback($collection, $documents);\n }\n\n gc_collect_cycles();\n });\n\n return $this;\n }\n\n private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\\Search\n {\n if (request() && request()->has('debug')) {\n Log::info('Debug ES query: ', [\n 'debug' => request()->get('debug'),\n 'userId' => request()->user()?->id ?? 'anonymous',\n 'userUuid' => request()->user()?->getIdString() ?? 'anonymous',\n 'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),\n 'url' => request()->fullUrl(),\n ]);\n }\n\n return $this->client\n ->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)\n ->createSearch($query);\n }\n\n public function scroll(Query $query, Searchable|string $model): Elastica\\Scroll\n {\n return new Elastica\\Scroll($this->createSearch($query, $model));\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n *\n * @return LazyCollection<int, Document>\n */\n public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection\n {\n return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {\n foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {\n foreach ($resultSet->getDocuments() as $document) {\n yield $document;\n }\n }\n });\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n */\n public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\\ResultSet\n {\n Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);\n\n $before = microtime(true);\n\n $result = $this->createSearch($query, $modelOrIndex)->search();\n\n $after = microtime(true);\n\n Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);\n\n return $result;\n }\n\n /**\n * @TODO use LazyCollection\n *\n * @return Collection<int, Activity>\n */\n public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection\n {\n return $this\n ->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)\n ->collect();\n }\n\n /**\n * @return array{totalHits: int, results: Collection<int, Activity>}\n */\n public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array\n {\n $search = $this->search($query, $model, $queryName);\n\n /**\n * @TODO Use value-object instead.\n */\n return [\n 'totalHits' => $search->getTotalHits(),\n 'results' => $this\n ->hydrateCollection($search->getDocuments(), $model)\n ->collect(),\n ];\n }\n\n private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection\n {\n return LazyCollection::make($collection)\n ->map(function (Document $document) use ($model): Searchable {\n return $this->hydrateModel($document, $model);\n });\n }\n\n private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable\n {\n $attributes = $document->getData();\n $attributes['id'] = $document->getId();\n\n /** @var Searchable&Model */\n return $this->modelFiller->newFromBuilderRecursive($model, $attributes);\n }\n}","depth":4,"on_screen":true,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Component\\ElasticSearch\\Service;\n\nuse ChaseConey\\LaravelDatadogHelper\\Datadog;\nuse Elastica;\nuse Elastica\\Document;\nuse Elastica\\Query;\nuse Generator;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\Log;\nuse Illuminate\\Support\\LazyCollection;\nuse Jiminny\\Component\\ElasticSearch\\Client;\nuse Jiminny\\Component\\ElasticSearch\\Contract\\Searchable;\nuse Jiminny\\Component\\ElasticSearch\\ModelFiller;\nuse Jiminny\\Models\\Activity;\n\n/**\n * Class Search\n *\n * @package Jiminny\\Component\\ElasticSearch\\Service\n */\nclass Search\n{\n /**\n * @var Client\n */\n private $client;\n\n /**\n * @var ModelFiller\\Elastica\n */\n private $modelFiller;\n\n public function __construct(Client $client, ModelFiller\\Elastica $modelFiller)\n {\n $this->client = $client;\n $this->modelFiller = $modelFiller;\n }\n\n public function updateDocument(Searchable $model): self\n {\n return $this->updateDocumentCollection($model, new Collection([$model]));\n }\n\n public function updateDocumentCollection(\n Searchable $model,\n Collection $collection,\n int $chunkSize = 10,\n ?callable $callback = null,\n ): self {\n if ($collection->count() === 0) {\n return $this;\n }\n\n $documentType = $this->client->createIndex($model->getIndex());\n\n $collection\n ->chunk($chunkSize)\n ->each(static function (Collection $collection) use ($documentType, $callback): void {\n $documents = $collection->map(static function (Searchable $model): Document {\n return new Document((string) $model->getId(), $model->getIndexableAttributes());\n });\n\n $documentType->addDocuments($documents->all());\n\n if ($callback !== null) {\n $callback($collection, $documents);\n }\n\n gc_collect_cycles();\n });\n\n return $this;\n }\n\n private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\\Search\n {\n if (request() && request()->has('debug')) {\n Log::info('Debug ES query: ', [\n 'debug' => request()->get('debug'),\n 'userId' => request()->user()?->id ?? 'anonymous',\n 'userUuid' => request()->user()?->getIdString() ?? 'anonymous',\n 'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),\n 'url' => request()->fullUrl(),\n ]);\n }\n\n return $this->client\n ->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)\n ->createSearch($query);\n }\n\n public function scroll(Query $query, Searchable|string $model): Elastica\\Scroll\n {\n return new Elastica\\Scroll($this->createSearch($query, $model));\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n *\n * @return LazyCollection<int, Document>\n */\n public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection\n {\n return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {\n foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {\n foreach ($resultSet->getDocuments() as $document) {\n yield $document;\n }\n }\n });\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n */\n public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\\ResultSet\n {\n Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);\n\n $before = microtime(true);\n\n $result = $this->createSearch($query, $modelOrIndex)->search();\n\n $after = microtime(true);\n\n Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);\n\n return $result;\n }\n\n /**\n * @TODO use LazyCollection\n *\n * @return Collection<int, Activity>\n */\n public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection\n {\n return $this\n ->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)\n ->collect();\n }\n\n /**\n * @return array{totalHits: int, results: Collection<int, Activity>}\n */\n public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array\n {\n $search = $this->search($query, $model, $queryName);\n\n /**\n * @TODO Use value-object instead.\n */\n return [\n 'totalHits' => $search->getTotalHits(),\n 'results' => $this\n ->hydrateCollection($search->getDocuments(), $model)\n ->collect(),\n ];\n }\n\n private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection\n {\n return LazyCollection::make($collection)\n ->map(function (Document $document) use ($model): Searchable {\n return $this->hydrateModel($document, $model);\n });\n }\n\n private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable\n {\n $attributes = $document->getData();\n $attributes['id'] = $document->getId();\n\n /** @var Searchable&Model */\n return $this->modelFiller->newFromBuilderRecursive($model, $attributes);\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,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"on_screen":true,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
6375276480214113839
|
-7881077389668029571
|
click
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, 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
10
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Component\ElasticSearch\Service;
use ChaseConey\LaravelDatadogHelper\Datadog;
use Elastica;
use Elastica\Document;
use Elastica\Query;
use Generator;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\LazyCollection;
use Jiminny\Component\ElasticSearch\Client;
use Jiminny\Component\ElasticSearch\Contract\Searchable;
use Jiminny\Component\ElasticSearch\ModelFiller;
use Jiminny\Models\Activity;
/**
* Class Search
*
* @package Jiminny\Component\ElasticSearch\Service
*/
class Search
{
/**
* @var Client
*/
private $client;
/**
* @var ModelFiller\Elastica
*/
private $modelFiller;
public function __construct(Client $client, ModelFiller\Elastica $modelFiller)
{
$this->client = $client;
$this->modelFiller = $modelFiller;
}
public function updateDocument(Searchable $model): self
{
return $this->updateDocumentCollection($model, new Collection([$model]));
}
public function updateDocumentCollection(
Searchable $model,
Collection $collection,
int $chunkSize = 10,
?callable $callback = null,
): self {
if ($collection->count() === 0) {
return $this;
}
$documentType = $this->client->createIndex($model->getIndex());
$collection
->chunk($chunkSize)
->each(static function (Collection $collection) use ($documentType, $callback): void {
$documents = $collection->map(static function (Searchable $model): Document {
return new Document((string) $model->getId(), $model->getIndexableAttributes());
});
$documentType->addDocuments($documents->all());
if ($callback !== null) {
$callback($collection, $documents);
}
gc_collect_cycles();
});
return $this;
}
private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\Search
{
if (request() && request()->has('debug')) {
Log::info('Debug ES query: ', [
'debug' => request()->get('debug'),
'userId' => request()->user()?->id ?? 'anonymous',
'userUuid' => request()->user()?->getIdString() ?? 'anonymous',
'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),
'url' => request()->fullUrl(),
]);
}
return $this->client
->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)
->createSearch($query);
}
public function scroll(Query $query, Searchable|string $model): Elastica\Scroll
{
return new Elastica\Scroll($this->createSearch($query, $model));
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*
* @return LazyCollection<int, Document>
*/
public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection
{
return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {
foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {
foreach ($resultSet->getDocuments() as $document) {
yield $document;
}
}
});
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*/
public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\ResultSet
{
Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);
$before = microtime(true);
$result = $this->createSearch($query, $modelOrIndex)->search();
$after = microtime(true);
Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);
return $result;
}
/**
* @TODO use LazyCollection
*
* @return Collection<int, Activity>
*/
public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection
{
return $this
->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)
->collect();
}
/**
* @return array{totalHits: int, results: Collection<int, Activity>}
*/
public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array
{
$search = $this->search($query, $model, $queryName);
/**
* @TODO Use value-object instead.
*/
return [
'totalHits' => $search->getTotalHits(),
'results' => $this
->hydrateCollection($search->getDocuments(), $model)
->collect(),
];
}
private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection
{
return LazyCollection::make($collection)
->map(function (Document $document) use ($model): Searchable {
return $this->hydrateModel($document, $model);
});
}
private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable
{
$attributes = $document->getData();
$attributes['id'] = $document->getId();
/** @var Searchable&Model */
return $this->modelFiller->newFromBuilderRecursive($model, $attributes);
}
}
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...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
35950
|
1344
|
0
|
2026-05-13T13:25:35.338945+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778678735338_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhostormVIewINavigareCodeKeractorFV faVsco.js°9 JY PhostormVIewINavigareCodeKeractorFV faVsco.js°9 JY-20891-improve-sms-text-relaysProledey© MailboxController.phpM MakefileJ package-lock.json= phpstan.neon.dist= phpstan-baseline.neon<> phpunit.xmlTaraw_sqL_query.sqMLPEADME mdC) TextRelayService.onp© Sso.phpossocontroller.ong© TextMessa©smsmessage.ong© SmsLength.php© TextRelay.phpService/Search.php x © ActivityStatusin.phpclass SearchM A10 A V< sonar-project.propertiesE test.py‹› Untitea Diagram.Xmiis vetur.config.jsM+ WEBHOOK_FILTERING_IMPLEM› ih External Librariesv E° Scratches and Consolesv C Database ConsolesV AEU& console EUl& DEALRISKS EUIA DI (EU)AEUEUvdiminnv@localhostA console fiminnv@localho# DI lliminnv@localhost4 HS local fiminnv@localhd4 SF [jiminny@localhost]Azoho dev fiminnvalocall• DROn# concole [ROnll# concole 1 [pponlA DI (PRODI› AQAЛAAI› A QAI PRODA STAGINGA console [STAGINGIA console 1 [STAGING]& uranus STAGING> C Extensionsv @ ScratchesEphostorm_shortcuts.txt=° scratch.txt{° scratch_1.ison{° scratch 2 ison<° scratch 3lison125= scratch 4 txtphe scratch 5.ohnphe scratch 6.ohnSscratch 7isonscratch R.isonstaae? ison= toctselt s...iprivate function createSearch(Query $query, Searchable|string $modelOrindex): Elastica \Searchif (request() && request()->has('debug')) {"dehua' => requesto->aet('dehua')'userUuid' => request(->user?->getIdString) ?? 'anonymous','query' => ison_encode(Squery->toArrayOflaas: LISON THROW ON ERROR).'url' => request->fullUrlO,1):— 96recurn schis->cllent-›createIndex( indexName: $model0rIndex instanceof Searchable ? Smodel0rIndex->getIndex() : $model0r 94->createsearch squery)96public function scroll(Query Squery. Searchable|string Smodel): Elastica\Scroll{...}98100* dparam searchablestrino smodelurindex usaoe of model 1s deprecated102* dreturn Lazucollection<int. Document>public function scrolloverDocuments(query Squery, SearchabLe|string SmodeLOrIndex): LazyCollection(...* I105Lix** Aoaran Searchable|strina Snodel0rIndey usage of model is denrecatedT109public function search(Query $query, Searchablelstring $modelOrIndex, ?string $queryName = null): Elastica 11€Datadog::increment( stats: 'jiminny.es.search', sampleRate: 1, ['query' => $queryName ?? "']);—112$before = microtime( as_float: true);Sresult = $this->createSearch($query, Smodel0rIndex)->search0:117Cofton = micnotimed as tloat: true)"Datadog:: timing( stat: "jiminny.es.search.time', (int) (($after - $before) * 1000)sampleRate: 1, ['quer: 120return sresult.• sonnt Keview • In 21m100% L2• Wed 13 May 15:33:40AskJiminnyReportActivityServiceTest v= custom.logscratch. &.ison= laravel.logA SF jiminny@localhost]« HS_local [jiminny@localhost] X console [PROD]cascadeA console (EU]A console [STACINClrial Owner Role SeleRetactoring User EmaDashboard Activity De+0 ..~/Library/Application Support/JetBrains/PhpStorm2026.1/consoles/db/5b1549d5-9876-4d9e-9ce3-025f12a83283/console.sait is there lust didn't include it "tracks"D69.select * from opportunities where team id = 2 and erm providen id TN (1374720564° 1145274235891 1490086191 X565571wsELEcT * FruM opportunity contacts whERE opportunity 1d = '414'*SELECT * FROM opportunity_contacts WHERE crm_provider_id = '131501';select * rrom contacts where 1d in (414. 464)1select * from activities where crm confiquration 1d = 2select settinas from crm conficurations where 1d = 11:Perfect - the activity has both video and audio tracks, so it would pass the ActivityRecorded filter even if appliedselect * From teams: # 1. 2select * from users;select * from crm_configurations where id = 39;select * from team_features where team_id = 2›select * from features;# SELECT * FROM opportunities WHERE crm_configuration_id = 2order by id desc;# and crm_provider_id = '49908861993';|Confirmed Fields (All Pass V)•• status : "failed" - Included in default status filtertype: "conference" - Allowed activity typeVis private : false - Passes privacy filter• V is internal: false - Should be visible• V actual_start_time : "2026-05-12 13:14:08" - Required field existsvtracks: Has video + audio tracks - Passes recorded tilterNext Stens to Deouaselect * from activity providers where id IN (443, 202, 203, 227):Since all fields nass the filters. check these:1. Date Range Selected in Dashboardselect * from activity imports where id = 795889:What date range is the user viewing? The detault is last 90 days. May 12, 2026 should be within range, but verity theselect c.id, c.provider, c.settings, t.* from teams t join crm confiqurations c 1<->1.n: on t.id = c.team_idactual Start date and end date parameters in te dasnooaro recuestwhere c.provider = 'hubspot'2. User/Team ScopeIs user 29089 (Line Kristensen) viewina her own dashboard? Verifv.select * from crm confiqurations crm JOIN teams + 1..n<->1: on crm.team id = t.id• User belonas to team 575 (NationBuilder) 7• User's group (Sales Team) has team_id: 575 VSELE * FROM teamsWHERE 1d = 311SELECT * FROM users WHERE id = 257;opportunities WHERE team 1d = 2• Check it RestrictTeam or RestrictUserGroupScope filters are excluding this3. Sxolicit Filter ValuesCheck if the dashboard request is passing explicit filter values that might exclude this activity, particularly:select * from opportunity_contacts where opportunity_id = 5124;select * fron contacts where id TN (3850.3853. 3851. 4073.4140.4155.4480.4530.4623. 5986. 513. 687. 1806. 1523. 3613) |activity status_values - might be set to only "completed"•only recorded activities - miaht be exolicitly set despite the override4. Actual Elasticsearch Quervselect * from activities where eom confiaunation id = 13.SELECT * FROM activities WHERE uuid_to_bin('826619ce-ec8e-4e59-8467-a01f5f6ad71e') = uuid; # 418141|Add logging in TeamInsightsRepository::getDashboardActivity0verTime to capture the exact Elasticsearch querybeina executed and see why this activitv is excluded!Most likely cause: Either the date range filter is excluding it, or an explicit filter value is being passed that overrides thedefault behavionselect id, team id, crm provider id from crm confiqurations where provider = 'hubspot' and crm provider id IS NOT NULSELECT * FROM accounts WHERE team id = 2 and crm provider id = '1212213464' order by id desc:SSISCT + SP0M contactc WHGPEteam id = 2 and account id = 5189 order by id desc:SELECT * FROM contacts WHERE team id = 2 order by id desc:select * from opportunity contacts where contact id = 6223:SELECT * FROM opportunities WHERE team id = 2 and account id = 5189 order by id desr.al .Ask anvthina (84L)"Code SWF-1.6•0 1.select * from erm profiles where crm confiquration id = 2:WN Windsurf Teams121-1UTF.A...
|
NULL
|
1837425836067260207
|
NULL
|
click
|
ocr
|
NULL
|
PhostormVIewINavigareCodeKeractorFV faVsco.js°9 JY PhostormVIewINavigareCodeKeractorFV faVsco.js°9 JY-20891-improve-sms-text-relaysProledey© MailboxController.phpM MakefileJ package-lock.json= phpstan.neon.dist= phpstan-baseline.neon<> phpunit.xmlTaraw_sqL_query.sqMLPEADME mdC) TextRelayService.onp© Sso.phpossocontroller.ong© TextMessa©smsmessage.ong© SmsLength.php© TextRelay.phpService/Search.php x © ActivityStatusin.phpclass SearchM A10 A V< sonar-project.propertiesE test.py‹› Untitea Diagram.Xmiis vetur.config.jsM+ WEBHOOK_FILTERING_IMPLEM› ih External Librariesv E° Scratches and Consolesv C Database ConsolesV AEU& console EUl& DEALRISKS EUIA DI (EU)AEUEUvdiminnv@localhostA console fiminnv@localho# DI lliminnv@localhost4 HS local fiminnv@localhd4 SF [jiminny@localhost]Azoho dev fiminnvalocall• DROn# concole [ROnll# concole 1 [pponlA DI (PRODI› AQAЛAAI› A QAI PRODA STAGINGA console [STAGINGIA console 1 [STAGING]& uranus STAGING> C Extensionsv @ ScratchesEphostorm_shortcuts.txt=° scratch.txt{° scratch_1.ison{° scratch 2 ison<° scratch 3lison125= scratch 4 txtphe scratch 5.ohnphe scratch 6.ohnSscratch 7isonscratch R.isonstaae? ison= toctselt s...iprivate function createSearch(Query $query, Searchable|string $modelOrindex): Elastica \Searchif (request() && request()->has('debug')) {"dehua' => requesto->aet('dehua')'userUuid' => request(->user?->getIdString) ?? 'anonymous','query' => ison_encode(Squery->toArrayOflaas: LISON THROW ON ERROR).'url' => request->fullUrlO,1):— 96recurn schis->cllent-›createIndex( indexName: $model0rIndex instanceof Searchable ? Smodel0rIndex->getIndex() : $model0r 94->createsearch squery)96public function scroll(Query Squery. Searchable|string Smodel): Elastica\Scroll{...}98100* dparam searchablestrino smodelurindex usaoe of model 1s deprecated102* dreturn Lazucollection<int. Document>public function scrolloverDocuments(query Squery, SearchabLe|string SmodeLOrIndex): LazyCollection(...* I105Lix** Aoaran Searchable|strina Snodel0rIndey usage of model is denrecatedT109public function search(Query $query, Searchablelstring $modelOrIndex, ?string $queryName = null): Elastica 11€Datadog::increment( stats: 'jiminny.es.search', sampleRate: 1, ['query' => $queryName ?? "']);—112$before = microtime( as_float: true);Sresult = $this->createSearch($query, Smodel0rIndex)->search0:117Cofton = micnotimed as tloat: true)"Datadog:: timing( stat: "jiminny.es.search.time', (int) (($after - $before) * 1000)sampleRate: 1, ['quer: 120return sresult.• sonnt Keview • In 21m100% L2• Wed 13 May 15:33:40AskJiminnyReportActivityServiceTest v= custom.logscratch. &.ison= laravel.logA SF jiminny@localhost]« HS_local [jiminny@localhost] X console [PROD]cascadeA console (EU]A console [STACINClrial Owner Role SeleRetactoring User EmaDashboard Activity De+0 ..~/Library/Application Support/JetBrains/PhpStorm2026.1/consoles/db/5b1549d5-9876-4d9e-9ce3-025f12a83283/console.sait is there lust didn't include it "tracks"D69.select * from opportunities where team id = 2 and erm providen id TN (1374720564° 1145274235891 1490086191 X565571wsELEcT * FruM opportunity contacts whERE opportunity 1d = '414'*SELECT * FROM opportunity_contacts WHERE crm_provider_id = '131501';select * rrom contacts where 1d in (414. 464)1select * from activities where crm confiquration 1d = 2select settinas from crm conficurations where 1d = 11:Perfect - the activity has both video and audio tracks, so it would pass the ActivityRecorded filter even if appliedselect * From teams: # 1. 2select * from users;select * from crm_configurations where id = 39;select * from team_features where team_id = 2›select * from features;# SELECT * FROM opportunities WHERE crm_configuration_id = 2order by id desc;# and crm_provider_id = '49908861993';|Confirmed Fields (All Pass V)•• status : "failed" - Included in default status filtertype: "conference" - Allowed activity typeVis private : false - Passes privacy filter• V is internal: false - Should be visible• V actual_start_time : "2026-05-12 13:14:08" - Required field existsvtracks: Has video + audio tracks - Passes recorded tilterNext Stens to Deouaselect * from activity providers where id IN (443, 202, 203, 227):Since all fields nass the filters. check these:1. Date Range Selected in Dashboardselect * from activity imports where id = 795889:What date range is the user viewing? The detault is last 90 days. May 12, 2026 should be within range, but verity theselect c.id, c.provider, c.settings, t.* from teams t join crm confiqurations c 1<->1.n: on t.id = c.team_idactual Start date and end date parameters in te dasnooaro recuestwhere c.provider = 'hubspot'2. User/Team ScopeIs user 29089 (Line Kristensen) viewina her own dashboard? Verifv.select * from crm confiqurations crm JOIN teams + 1..n<->1: on crm.team id = t.id• User belonas to team 575 (NationBuilder) 7• User's group (Sales Team) has team_id: 575 VSELE * FROM teamsWHERE 1d = 311SELECT * FROM users WHERE id = 257;opportunities WHERE team 1d = 2• Check it RestrictTeam or RestrictUserGroupScope filters are excluding this3. Sxolicit Filter ValuesCheck if the dashboard request is passing explicit filter values that might exclude this activity, particularly:select * from opportunity_contacts where opportunity_id = 5124;select * fron contacts where id TN (3850.3853. 3851. 4073.4140.4155.4480.4530.4623. 5986. 513. 687. 1806. 1523. 3613) |activity status_values - might be set to only "completed"•only recorded activities - miaht be exolicitly set despite the override4. Actual Elasticsearch Quervselect * from activities where eom confiaunation id = 13.SELECT * FROM activities WHERE uuid_to_bin('826619ce-ec8e-4e59-8467-a01f5f6ad71e') = uuid; # 418141|Add logging in TeamInsightsRepository::getDashboardActivity0verTime to capture the exact Elasticsearch querybeina executed and see why this activitv is excluded!Most likely cause: Either the date range filter is excluding it, or an explicit filter value is being passed that overrides thedefault behavionselect id, team id, crm provider id from crm confiqurations where provider = 'hubspot' and crm provider id IS NOT NULSELECT * FROM accounts WHERE team id = 2 and crm provider id = '1212213464' order by id desc:SSISCT + SP0M contactc WHGPEteam id = 2 and account id = 5189 order by id desc:SELECT * FROM contacts WHERE team id = 2 order by id desc:select * from opportunity contacts where contact id = 6223:SELECT * FROM opportunities WHERE team id = 2 and account id = 5189 order by id desr.al .Ask anvthina (84L)"Code SWF-1.6•0 1.select * from erm profiles where crm confiquration id = 2:WN Windsurf Teams121-1UTF.A...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
35949
|
1343
|
0
|
2026-05-13T13:25:35.317512+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778678735317_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp>0 lыlec2-user@ip-10-30-129-190:~883-zshSprint Review - in 27 mA100% C8• Wed 13 May 15:33:40181DOCKERC *1DEV (docker)Last login: Wed May 13 09:16:21 on ttys010982APP (-zsh)84screenpipe"• ₴5Poetry could not find a pyproject.toml file in /Users/lukas or its parentsPoetry could not find a pyproject.toml file in /Users/lukas or its parentslukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ ssh jiminny-prod-ecs1 -L 7970:vpc-activities7g-t6nxe5qk7zis7pa5i7qlmp3zwm.us-east-2.es.amazonaws.com:80Enter MFA code for arn:aws:iam::438740370364:mfa/[EMAIL]:Warning: Permanently added 'jiminny-prod-ecs1' (ED25519) to the list of known hosts.A newer release of "Amazon Linux" is available.Version 2023.10.20260330:Version 2023.11.20260406:Version 2023.11.20260413:Version 2023.11.20260427:Version 2023.11.20260505:Version 2023.11.20260509:Run "/usr/bin/dnf check-release-update" for full release and version update info#_####_\_#####\\###|\#/v~'Amazon Linux 2023 (ECS Optimized)ec2-user@ip-10-30-129-190:~ (. 26Im/*Fordocumentation,visit [URL_WITH_CREDENTIALS] ~]$ ||...
|
NULL
|
5725358035782193467
|
NULL
|
click
|
ocr
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp>0 lыlec2-user@ip-10-30-129-190:~883-zshSprint Review - in 27 mA100% C8• Wed 13 May 15:33:40181DOCKERC *1DEV (docker)Last login: Wed May 13 09:16:21 on ttys010982APP (-zsh)84screenpipe"• ₴5Poetry could not find a pyproject.toml file in /Users/lukas or its parentsPoetry could not find a pyproject.toml file in /Users/lukas or its parentslukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ ssh jiminny-prod-ecs1 -L 7970:vpc-activities7g-t6nxe5qk7zis7pa5i7qlmp3zwm.us-east-2.es.amazonaws.com:80Enter MFA code for arn:aws:iam::438740370364:mfa/[EMAIL]:Warning: Permanently added 'jiminny-prod-ecs1' (ED25519) to the list of known hosts.A newer release of "Amazon Linux" is available.Version 2023.10.20260330:Version 2023.11.20260406:Version 2023.11.20260413:Version 2023.11.20260427:Version 2023.11.20260505:Version 2023.11.20260509:Run "/usr/bin/dnf check-release-update" for full release and version update info#_####_\_#####\\###|\#/v~'Amazon Linux 2023 (ECS Optimized)ec2-user@ip-10-30-129-190:~ (. 26Im/*Fordocumentation,visit [URL_WITH_CREDENTIALS] ~]$ ||...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
35948
|
NULL
|
0
|
2026-05-13T13:25:25.886746+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778678725886_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, 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...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20891-improve-sms-text-relays, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.08843085,"height":0.025538707},"on_screen":true,"help_text":"Git Branch: JY-20891-improve-sms-text-relays","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.8081782,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AskJiminnyReportActivityServiceTest","depth":6,"bounds":{"left":0.8234708,"top":0.019952115,"width":0.09208777,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AskJiminnyReportActivityServiceTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AskJiminnyReportActivityServiceTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-3217526785416111167
|
-8132290182084711486
|
click
|
hybrid
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, 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
PhostormVIewINavigareCodeKeractorFV faVsco.js°9 JY-20891-improve-sms-text-relaysProledey© MailboxController.phpM MakefileJ package-lock.json= phpstan.neon.dist= phpstan-baseline.neon<> phpunit.xmlTaraw_sqL_query.sqMLPEADME mdC) TextRelayService.onp© Sso.phpossocontroller.ong© TextMessa©smsmessage.ong© SmsLength.php© TextRelay.phpService/Search.php x © ActivityStatusin.phpclass SearchM A10 A V< sonar-project.propertiesE test.py‹› Untitea Diagram.Xmiis vetur.config.jsM+ WEBHOOK_FILTERING_IMPLEM› ih External Librariesv E° Scratches and Consolesv C Database ConsolesV AEU& console EUl& DEALRISKS EUIA DI (EU)AEUEUvdiminnv@localhostA console fiminnv@localho# DI lliminnv@localhost4 HS local fiminnv@localhd4 SF [jiminny@localhost]Azoho dev fiminnvalocall• DROn# concole [ROnll# concole 1 [pponlA DI (PRODI› AQAЛAAI› A QAI PRODA STAGINGA console [STAGINGIA console 1 [STAGING]& uranus STAGING> C Extensionsv @ ScratchesEphostorm_shortcuts.txt=° scratch.txt{° scratch_1.ison{° scratch 2 ison<° scratch 3lison125= scratch 4 txtphe scratch 5.ohnphe scratch 6.ohnSscratch 7isonscratch R.isonstaae? ison= toctselt s...iprivate function createSearch(Query $query, Searchable|string $modelOrindex): Elastica \Searchif (request() && request()->has('debug')) {"dehua' => requesto->aet('dehua')'userUuid' => request(->user?->getIdString) ?? 'anonymous','query' => ison_encode(Squery->toArrayOflaas: LISON THROW ON ERROR).'url' => request->fullUrlO,1):— 96recurn schis->cllent-›createIndex( indexName: $model0rIndex instanceof Searchable ? Smodel0rIndex->getIndex() : $model0r 94->createsearch squery)96public function scroll(Query Squery. Searchable|string Smodel): Elastica\Scroll{...}98100* dparam searchablestrino smodelurindex usaoe of model 1s deprecated102* dreturn Lazucollection<int. Document>public function scrolloverDocuments(query Squery, SearchabLe|string SmodeLOrIndex): LazyCollection(...* I105Lix** Aoaran Searchable|strina Snodel0rIndey usage of model is denrecatedT109public function search(Query $query, Searchablelstring $modelOrIndex, ?string $queryName = null): Elastica 11€Datadog::increment( stats: 'jiminny.es.search', sampleRate: 1, ['query' => $queryName ?? "']);—112$before = microtime( as_float: true);Sresult = $this->createSearch($query, Smodel0rIndex)->search0:117Cofton = micnotimed as tloat: true)"Datadog:: timing( stat: "jiminny.es.search.time', (int) (($after - $before) * 1000)sampleRate: 1, ['quer: 120return sresult.• sonnt Keview • In 21m100% L2• Wed 13 May 15:33:40AskJiminnyReportActivityServiceTest v= custom.logscratch. &.ison= laravel.logA SF jiminny@localhost]« HS_local [jiminny@localhost] X console [PROD]cascadeA console (EU]A console [STACINClrial Owner Role SeleRetactoring User EmaDashboard Activity De+0 ..~/Library/Application Support/JetBrains/PhpStorm2026.1/consoles/db/5b1549d5-9876-4d9e-9ce3-025f12a83283/console.sait is there lust didn't include it "tracks"D69.select * from opportunities where team id = 2 and erm providen id TN (1374720564° 1145274235891 1490086191 X565571wsELEcT * FruM opportunity contacts whERE opportunity 1d = '414'*SELECT * FROM opportunity_contacts WHERE crm_provider_id = '131501';select * rrom contacts where 1d in (414. 464)1select * from activities where crm confiquration 1d = 2select settinas from crm conficurations where 1d = 11:Perfect - the activity has both video and audio tracks, so it would pass the ActivityRecorded filter even if appliedselect * From teams: # 1. 2select * from users;select * from crm_configurations where id = 39;select * from team_features where team_id = 2›select * from features;# SELECT * FROM opportunities WHERE crm_configuration_id = 2order by id desc;# and crm_provider_id = '49908861993';|Confirmed Fields (All Pass V)•• status : "failed" - Included in default status filtertype: "conference" - Allowed activity typeVis private : false - Passes privacy filter• V is internal: false - Should be visible• V actual_start_time : "2026-05-12 13:14:08" - Required field existsvtracks: Has video + audio tracks - Passes recorded tilterNext Stens to Deouaselect * from activity providers where id IN (443, 202, 203, 227):Since all fields nass the filters. check these:1. Date Range Selected in Dashboardselect * from activity imports where id = 795889:What date range is the user viewing? The detault is last 90 days. May 12, 2026 should be within range, but verity theselect c.id, c.provider, c.settings, t.* from teams t join crm confiqurations c 1<->1.n: on t.id = c.team_idactual Start date and end date parameters in te dasnooaro recuestwhere c.provider = 'hubspot'2. User/Team ScopeIs user 29089 (Line Kristensen) viewina her own dashboard? Verifv.select * from crm confiqurations crm JOIN teams + 1..n<->1: on crm.team id = t.id• User belonas to team 575 (NationBuilder) 7• User's group (Sales Team) has team_id: 575 VSELE * FROM teamsWHERE 1d = 311SELECT * FROM users WHERE id = 257;opportunities WHERE team 1d = 2• Check it RestrictTeam or RestrictUserGroupScope filters are excluding this3. Sxolicit Filter ValuesCheck if the dashboard request is passing explicit filter values that might exclude this activity, particularly:select * from opportunity_contacts where opportunity_id = 5124;select * fron contacts where id TN (3850.3853. 3851. 4073.4140.4155.4480.4530.4623. 5986. 513. 687. 1806. 1523. 3613) |activity status_values - might be set to only "completed"•only recorded activities - miaht be exolicitly set despite the override4. Actual Elasticsearch Quervselect * from activities where eom confiaunation id = 13.SELECT * FROM activities WHERE uuid_to_bin('826619ce-ec8e-4e59-8467-a01f5f6ad71e') = uuid; # 418141|Add logging in TeamInsightsRepository::getDashboardActivity0verTime to capture the exact Elasticsearch querybeina executed and see why this activitv is excluded!Most likely cause: Either the date range filter is excluding it, or an explicit filter value is being passed that overrides thedefault behavionselect id, team id, crm provider id from crm confiqurations where provider = 'hubspot' and crm provider id IS NOT NULSELECT * FROM accounts WHERE team id = 2 and crm provider id = '1212213464' order by id desc:SSISCT + SP0M contactc WHGPEteam id = 2 and account id = 5189 order by id desc:SELECT * FROM contacts WHERE team id = 2 order by id desc:select * from opportunity contacts where contact id = 6223:SELECT * FROM opportunities WHERE team id = 2 and account id = 5189 order by id desr.al .Ask anvthina (84L)"Code SWF-1.6•0 1.select * from erm profiles where crm confiquration id = 2:WN Windsurf Teams121-1UTF.A...
|
35945
|
NULL
|
NULL
|
NULL
|
|
35947
|
NULL
|
0
|
2026-05-13T13:25:25.886793+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778678725886_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, 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
10...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20891-improve-sms-text-relays, menu","depth":5,"on_screen":true,"help_text":"Git Branch: JY-20891-improve-sms-text-relays","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,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AskJiminnyReportActivityServiceTest","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AskJiminnyReportActivityServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AskJiminnyReportActivityServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10","depth":4,"on_screen":true,"role_description":"text"}]...
|
7130865360800391539
|
-8132290182084580414
|
click
|
hybrid
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, 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
10
iTerm2ShellEditViewSessionScriptsProfilesWindowHelp>0 lыlec2-user@ip-10-30-129-190:~883-zshSprint Review - in 27 mA100% C8• Wed 13 May 15:33:40181DOCKERC *1DEV (docker)Last login: Wed May 13 09:16:21 on ttys010982APP (-zsh)84screenpipe"• ₴5Poetry could not find a pyproject.toml file in /Users/lukas or its parentsPoetry could not find a pyproject.toml file in /Users/lukas or its parentslukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ ssh jiminny-prod-ecs1 -L 7970:vpc-activities7g-t6nxe5qk7zis7pa5i7qlmp3zwm.us-east-2.es.amazonaws.com:80Enter MFA code for arn:aws:iam::438740370364:mfa/[EMAIL]:Warning: Permanently added 'jiminny-prod-ecs1' (ED25519) to the list of known hosts.A newer release of "Amazon Linux" is available.Version 2023.10.20260330:Version 2023.11.20260406:Version 2023.11.20260413:Version 2023.11.20260427:Version 2023.11.20260505:Version 2023.11.20260509:Run "/usr/bin/dnf check-release-update" for full release and version update info#_####_\_#####\\###|\#/v~'Amazon Linux 2023 (ECS Optimized)ec2-user@ip-10-30-129-190:~ (. 26Im/*Fordocumentation,visit [URL_WITH_CREDENTIALS] ~]$ ||...
|
35946
|
NULL
|
NULL
|
NULL
|
|
35946
|
1341
|
31
|
2026-05-13T13:25:09.188100+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778678709188_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, 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
10
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Component\ElasticSearch\Service;
use ChaseConey\LaravelDatadogHelper\Datadog;
use Elastica;
use Elastica\Document;
use Elastica\Query;
use Generator;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\LazyCollection;
use Jiminny\Component\ElasticSearch\Client;
use Jiminny\Component\ElasticSearch\Contract\Searchable;
use Jiminny\Component\ElasticSearch\ModelFiller;
use Jiminny\Models\Activity;
/**
* Class Search
*
* @package Jiminny\Component\ElasticSearch\Service
*/
class Search
{
/**
* @var Client
*/
private $client;
/**
* @var ModelFiller\Elastica
*/
private $modelFiller;
public function __construct(Client $client, ModelFiller\Elastica $modelFiller)
{
$this->client = $client;
$this->modelFiller = $modelFiller;
}
public function updateDocument(Searchable $model): self
{
return $this->updateDocumentCollection($model, new Collection([$model]));
}
public function updateDocumentCollection(
Searchable $model,
Collection $collection,
int $chunkSize = 10,
?callable $callback = null,
): self {
if ($collection->count() === 0) {
return $this;
}
$documentType = $this->client->createIndex($model->getIndex());
$collection
->chunk($chunkSize)
->each(static function (Collection $collection) use ($documentType, $callback): void {
$documents = $collection->map(static function (Searchable $model): Document {
return new Document((string) $model->getId(), $model->getIndexableAttributes());
});
$documentType->addDocuments($documents->all());
if ($callback !== null) {
$callback($collection, $documents);
}
gc_collect_cycles();
});
return $this;
}
private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\Search
{
if (request() && request()->has('debug')) {
Log::info('Debug ES query: ', [
'debug' => request()->get('debug'),
'userId' => request()->user()?->id ?? 'anonymous',
'userUuid' => request()->user()?->getIdString() ?? 'anonymous',
'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),
'url' => request()->fullUrl(),
]);
}
return $this->client
->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)
->createSearch($query);
}
public function scroll(Query $query, Searchable|string $model): Elastica\Scroll
{
return new Elastica\Scroll($this->createSearch($query, $model));
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*
* @return LazyCollection<int, Document>
*/
public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection
{
return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {
foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {
foreach ($resultSet->getDocuments() as $document) {
yield $document;
}
}
});
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*/
public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\ResultSet
{
Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);
$before = microtime(true);
$result = $this->createSearch($query, $modelOrIndex)->search();
$after = microtime(true);
Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);
return $result;
}
/**
* @TODO use LazyCollection
*
* @return Collection<int, Activity>
*/
public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection
{
return $this
->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)
->collect();
}
/**
* @return array{totalHits: int, results: Collection<int, Activity>}
*/
public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array
{
$search = $this->search($query, $model, $queryName);
/**
* @TODO Use value-object instead.
*/
return [
'totalHits' => $search->getTotalHits(),
'results' => $this
->hydrateCollection($search->getDocuments(), $model)
->collect(),
];
}
private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection
{
return LazyCollection::make($collection)
->map(function (Document $document) use ($model): Searchable {
return $this->hydrateModel($document, $model);
});
}
private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable
{
$attributes = $document->getData();
$attributes['id'] = $document->getId();
/** @var Searchable&Model */
return $this->modelFiller->newFromBuilderRecursive($model, $attributes);
}
}
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
20
1
17
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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
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 * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
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 `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
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;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;
Project
Project
New File or Directory…...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20891-improve-sms-text-relays, menu","depth":5,"on_screen":true,"help_text":"Git Branch: JY-20891-improve-sms-text-relays","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,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AskJiminnyReportActivityServiceTest","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AskJiminnyReportActivityServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AskJiminnyReportActivityServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"on_screen":true,"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\\ElasticSearch\\Service;\n\nuse ChaseConey\\LaravelDatadogHelper\\Datadog;\nuse Elastica;\nuse Elastica\\Document;\nuse Elastica\\Query;\nuse Generator;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\Log;\nuse Illuminate\\Support\\LazyCollection;\nuse Jiminny\\Component\\ElasticSearch\\Client;\nuse Jiminny\\Component\\ElasticSearch\\Contract\\Searchable;\nuse Jiminny\\Component\\ElasticSearch\\ModelFiller;\nuse Jiminny\\Models\\Activity;\n\n/**\n * Class Search\n *\n * @package Jiminny\\Component\\ElasticSearch\\Service\n */\nclass Search\n{\n /**\n * @var Client\n */\n private $client;\n\n /**\n * @var ModelFiller\\Elastica\n */\n private $modelFiller;\n\n public function __construct(Client $client, ModelFiller\\Elastica $modelFiller)\n {\n $this->client = $client;\n $this->modelFiller = $modelFiller;\n }\n\n public function updateDocument(Searchable $model): self\n {\n return $this->updateDocumentCollection($model, new Collection([$model]));\n }\n\n public function updateDocumentCollection(\n Searchable $model,\n Collection $collection,\n int $chunkSize = 10,\n ?callable $callback = null,\n ): self {\n if ($collection->count() === 0) {\n return $this;\n }\n\n $documentType = $this->client->createIndex($model->getIndex());\n\n $collection\n ->chunk($chunkSize)\n ->each(static function (Collection $collection) use ($documentType, $callback): void {\n $documents = $collection->map(static function (Searchable $model): Document {\n return new Document((string) $model->getId(), $model->getIndexableAttributes());\n });\n\n $documentType->addDocuments($documents->all());\n\n if ($callback !== null) {\n $callback($collection, $documents);\n }\n\n gc_collect_cycles();\n });\n\n return $this;\n }\n\n private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\\Search\n {\n if (request() && request()->has('debug')) {\n Log::info('Debug ES query: ', [\n 'debug' => request()->get('debug'),\n 'userId' => request()->user()?->id ?? 'anonymous',\n 'userUuid' => request()->user()?->getIdString() ?? 'anonymous',\n 'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),\n 'url' => request()->fullUrl(),\n ]);\n }\n\n return $this->client\n ->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)\n ->createSearch($query);\n }\n\n public function scroll(Query $query, Searchable|string $model): Elastica\\Scroll\n {\n return new Elastica\\Scroll($this->createSearch($query, $model));\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n *\n * @return LazyCollection<int, Document>\n */\n public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection\n {\n return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {\n foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {\n foreach ($resultSet->getDocuments() as $document) {\n yield $document;\n }\n }\n });\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n */\n public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\\ResultSet\n {\n Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);\n\n $before = microtime(true);\n\n $result = $this->createSearch($query, $modelOrIndex)->search();\n\n $after = microtime(true);\n\n Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);\n\n return $result;\n }\n\n /**\n * @TODO use LazyCollection\n *\n * @return Collection<int, Activity>\n */\n public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection\n {\n return $this\n ->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)\n ->collect();\n }\n\n /**\n * @return array{totalHits: int, results: Collection<int, Activity>}\n */\n public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array\n {\n $search = $this->search($query, $model, $queryName);\n\n /**\n * @TODO Use value-object instead.\n */\n return [\n 'totalHits' => $search->getTotalHits(),\n 'results' => $this\n ->hydrateCollection($search->getDocuments(), $model)\n ->collect(),\n ];\n }\n\n private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection\n {\n return LazyCollection::make($collection)\n ->map(function (Document $document) use ($model): Searchable {\n return $this->hydrateModel($document, $model);\n });\n }\n\n private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable\n {\n $attributes = $document->getData();\n $attributes['id'] = $document->getId();\n\n /** @var Searchable&Model */\n return $this->modelFiller->newFromBuilderRecursive($model, $attributes);\n }\n}","depth":4,"on_screen":true,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Component\\ElasticSearch\\Service;\n\nuse ChaseConey\\LaravelDatadogHelper\\Datadog;\nuse Elastica;\nuse Elastica\\Document;\nuse Elastica\\Query;\nuse Generator;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\Log;\nuse Illuminate\\Support\\LazyCollection;\nuse Jiminny\\Component\\ElasticSearch\\Client;\nuse Jiminny\\Component\\ElasticSearch\\Contract\\Searchable;\nuse Jiminny\\Component\\ElasticSearch\\ModelFiller;\nuse Jiminny\\Models\\Activity;\n\n/**\n * Class Search\n *\n * @package Jiminny\\Component\\ElasticSearch\\Service\n */\nclass Search\n{\n /**\n * @var Client\n */\n private $client;\n\n /**\n * @var ModelFiller\\Elastica\n */\n private $modelFiller;\n\n public function __construct(Client $client, ModelFiller\\Elastica $modelFiller)\n {\n $this->client = $client;\n $this->modelFiller = $modelFiller;\n }\n\n public function updateDocument(Searchable $model): self\n {\n return $this->updateDocumentCollection($model, new Collection([$model]));\n }\n\n public function updateDocumentCollection(\n Searchable $model,\n Collection $collection,\n int $chunkSize = 10,\n ?callable $callback = null,\n ): self {\n if ($collection->count() === 0) {\n return $this;\n }\n\n $documentType = $this->client->createIndex($model->getIndex());\n\n $collection\n ->chunk($chunkSize)\n ->each(static function (Collection $collection) use ($documentType, $callback): void {\n $documents = $collection->map(static function (Searchable $model): Document {\n return new Document((string) $model->getId(), $model->getIndexableAttributes());\n });\n\n $documentType->addDocuments($documents->all());\n\n if ($callback !== null) {\n $callback($collection, $documents);\n }\n\n gc_collect_cycles();\n });\n\n return $this;\n }\n\n private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\\Search\n {\n if (request() && request()->has('debug')) {\n Log::info('Debug ES query: ', [\n 'debug' => request()->get('debug'),\n 'userId' => request()->user()?->id ?? 'anonymous',\n 'userUuid' => request()->user()?->getIdString() ?? 'anonymous',\n 'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),\n 'url' => request()->fullUrl(),\n ]);\n }\n\n return $this->client\n ->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)\n ->createSearch($query);\n }\n\n public function scroll(Query $query, Searchable|string $model): Elastica\\Scroll\n {\n return new Elastica\\Scroll($this->createSearch($query, $model));\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n *\n * @return LazyCollection<int, Document>\n */\n public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection\n {\n return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {\n foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {\n foreach ($resultSet->getDocuments() as $document) {\n yield $document;\n }\n }\n });\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n */\n public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\\ResultSet\n {\n Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);\n\n $before = microtime(true);\n\n $result = $this->createSearch($query, $modelOrIndex)->search();\n\n $after = microtime(true);\n\n Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);\n\n return $result;\n }\n\n /**\n * @TODO use LazyCollection\n *\n * @return Collection<int, Activity>\n */\n public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection\n {\n return $this\n ->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)\n ->collect();\n }\n\n /**\n * @return array{totalHits: int, results: Collection<int, Activity>}\n */\n public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array\n {\n $search = $this->search($query, $model, $queryName);\n\n /**\n * @TODO Use value-object instead.\n */\n return [\n 'totalHits' => $search->getTotalHits(),\n 'results' => $this\n ->hydrateCollection($search->getDocuments(), $model)\n ->collect(),\n ];\n }\n\n private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection\n {\n return LazyCollection::make($collection)\n ->map(function (Document $document) use ($model): Searchable {\n return $this->hydrateModel($document, $model);\n });\n }\n\n private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable\n {\n $attributes = $document->getData();\n $attributes['id'] = $document->getId();\n\n /** @var Searchable&Model */\n return $this->modelFiller->newFromBuilderRecursive($model, $attributes);\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,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"on_screen":true,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"20","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"17","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"on_screen":true,"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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\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 * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\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 `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\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;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;","depth":4,"on_screen":true,"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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\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 * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\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 `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\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;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"on_screen":false,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"on_screen":true,"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},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-5839616706868510148
|
-7004613034568903091
|
click
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, 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
10
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Component\ElasticSearch\Service;
use ChaseConey\LaravelDatadogHelper\Datadog;
use Elastica;
use Elastica\Document;
use Elastica\Query;
use Generator;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\LazyCollection;
use Jiminny\Component\ElasticSearch\Client;
use Jiminny\Component\ElasticSearch\Contract\Searchable;
use Jiminny\Component\ElasticSearch\ModelFiller;
use Jiminny\Models\Activity;
/**
* Class Search
*
* @package Jiminny\Component\ElasticSearch\Service
*/
class Search
{
/**
* @var Client
*/
private $client;
/**
* @var ModelFiller\Elastica
*/
private $modelFiller;
public function __construct(Client $client, ModelFiller\Elastica $modelFiller)
{
$this->client = $client;
$this->modelFiller = $modelFiller;
}
public function updateDocument(Searchable $model): self
{
return $this->updateDocumentCollection($model, new Collection([$model]));
}
public function updateDocumentCollection(
Searchable $model,
Collection $collection,
int $chunkSize = 10,
?callable $callback = null,
): self {
if ($collection->count() === 0) {
return $this;
}
$documentType = $this->client->createIndex($model->getIndex());
$collection
->chunk($chunkSize)
->each(static function (Collection $collection) use ($documentType, $callback): void {
$documents = $collection->map(static function (Searchable $model): Document {
return new Document((string) $model->getId(), $model->getIndexableAttributes());
});
$documentType->addDocuments($documents->all());
if ($callback !== null) {
$callback($collection, $documents);
}
gc_collect_cycles();
});
return $this;
}
private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\Search
{
if (request() && request()->has('debug')) {
Log::info('Debug ES query: ', [
'debug' => request()->get('debug'),
'userId' => request()->user()?->id ?? 'anonymous',
'userUuid' => request()->user()?->getIdString() ?? 'anonymous',
'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),
'url' => request()->fullUrl(),
]);
}
return $this->client
->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)
->createSearch($query);
}
public function scroll(Query $query, Searchable|string $model): Elastica\Scroll
{
return new Elastica\Scroll($this->createSearch($query, $model));
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*
* @return LazyCollection<int, Document>
*/
public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection
{
return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {
foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {
foreach ($resultSet->getDocuments() as $document) {
yield $document;
}
}
});
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*/
public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\ResultSet
{
Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);
$before = microtime(true);
$result = $this->createSearch($query, $modelOrIndex)->search();
$after = microtime(true);
Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);
return $result;
}
/**
* @TODO use LazyCollection
*
* @return Collection<int, Activity>
*/
public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection
{
return $this
->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)
->collect();
}
/**
* @return array{totalHits: int, results: Collection<int, Activity>}
*/
public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array
{
$search = $this->search($query, $model, $queryName);
/**
* @TODO Use value-object instead.
*/
return [
'totalHits' => $search->getTotalHits(),
'results' => $this
->hydrateCollection($search->getDocuments(), $model)
->collect(),
];
}
private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection
{
return LazyCollection::make($collection)
->map(function (Document $document) use ($model): Searchable {
return $this->hydrateModel($document, $model);
});
}
private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable
{
$attributes = $document->getData();
$attributes['id'] = $document->getId();
/** @var Searchable&Model */
return $this->modelFiller->newFromBuilderRecursive($model, $attributes);
}
}
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
20
1
17
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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
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 * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
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 `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
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;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;
Project
Project
New File or Directory…...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
35945
|
1342
|
25
|
2026-05-13T13:25:07.698612+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778678707698_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20891-improve-sms-text-relays, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.08843085,"height":0.025538707},"on_screen":true,"help_text":"Git Branch: JY-20891-improve-sms-text-relays","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.8081782,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AskJiminnyReportActivityServiceTest","depth":6,"bounds":{"left":0.8234708,"top":0.019952115,"width":0.09208777,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AskJiminnyReportActivityServiceTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AskJiminnyReportActivityServiceTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"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},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-6806836429312449700
|
-8204352174203622462
|
click
|
hybrid
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
PhostormVIewINavigareCodeKeractorFV faVsco.js°9 JY-20891-improve-sms-text-relaysProledey© MailboxController.phpM MakefileJ package-lock.json= phpstan.neon.dist= phpstan-baseline.neon<> phpunit.xmlTaraw_sqL_query.sqMLPEADME mdC) TextRelayService.onp© Sso.phpossocontroller.ong© TextMessa©smsmessage.ong© SmsLength.php© TextRelay.phpService/Search.php x © ActivityStatusin.phpclass SearchM A10 A V< sonar-project.propertiesE test.py‹› Untitea Diagram.Xmiis vetur.config.jsM+ WEBHOOK_FILTERING_IMPLEM› ih External Librariesv E° Scratches and Consolesv C Database ConsolesV AEU& console EUl& DEALRISKS EUIA DI (EU)AEUEUvdiminnv@localhostA console fiminnv@localho# DI lliminnv@localhost4 HS local fiminnv@localhd4 SF [jiminny@localhost]Azoho dev fiminnvalocall• DROn# concole [ROnll# concole 1 [pponlA DI (PRODI› AQAЛAAI› A QAI PRODA STAGINGA console [STAGINGIA console 1 [STAGING]& uranus STAGING> C Extensionsv @ ScratchesEphostorm_shortcuts.txt=° scratch.txt{° scratch_1.ison{° scratch 2 ison<° scratch 3lison125= scratch 4 txtphe scratch 5.ohnphe scratch 6.ohnSscratch 7isonscratch R.isonstaae? ison= toctselt s...iprivate function createSearch(Query $query, Searchable|string $modelOrindex): Elastica \Searchif (request() && request()->has('debug')) {"dehua' => requesto->aet('dehua')'userUuid' => request(->user?->getIdString) ?? 'anonymous','query' => ison_encode(Squery->toArrayOflaas: LISON THROW ON ERROR).'url' => request->fullUrlO,1):— 96recurn schis->cllent-›createIndex( indexName: $model0rIndex instanceof Searchable ? Smodel0rIndex->getIndex() : $model0r 94->createsearch squery)96public function scroll(Query Squery. Searchable|string Smodel): Elastica\Scroll{...}98100* dparam searchablestrino smodelurindex usaoe of model 1s deprecated102* dreturn Lazucollection<int. Document>public function scrolloverDocuments(query Squery, SearchabLe|string SmodeLOrIndex): LazyCollection(...* I105Lix** Aoaran Searchable|strina Snodel0rIndey usage of model is denrecatedT109public function search(Query $query, Searchablelstring $modelOrIndex, ?string $queryName = null): Elastica 11€Datadog::increment( stats: 'jiminny.es.search', sampleRate: 1, ['query' => $queryName ?? "']);—112$before = microtime( as_float: true);Sresult = $this->createSearch($query, Smodel0rIndex)->search0:117Cofton = micnotimed as tloat: true)"Datadog:: timing( stat: "jiminny.es.search.time', (int) (($after - $before) * 1000)sampleRate: 1, ['quer: 120return sresult.• sonnt Keview • In 21m100% L2• Wed 13 May 15:33:40AskJiminnyReportActivityServiceTest v= custom.logscratch. &.ison= laravel.logA SF jiminny@localhost]« HS_local [jiminny@localhost] X console [PROD]cascadeA console (EU]A console [STACINClrial Owner Role SeleRetactoring User EmaDashboard Activity De+0 ..~/Library/Application Support/JetBrains/PhpStorm2026.1/consoles/db/5b1549d5-9876-4d9e-9ce3-025f12a83283/console.sait is there lust didn't include it "tracks"D69.select * from opportunities where team id = 2 and erm providen id TN (1374720564° 1145274235891 1490086191 X565571wsELEcT * FruM opportunity contacts whERE opportunity 1d = '414'*SELECT * FROM opportunity_contacts WHERE crm_provider_id = '131501';select * rrom contacts where 1d in (414. 464)1select * from activities where crm confiquration 1d = 2select settinas from crm conficurations where 1d = 11:Perfect - the activity has both video and audio tracks, so it would pass the ActivityRecorded filter even if appliedselect * From teams: # 1. 2select * from users;select * from crm_configurations where id = 39;select * from team_features where team_id = 2›select * from features;# SELECT * FROM opportunities WHERE crm_configuration_id = 2order by id desc;# and crm_provider_id = '49908861993';|Confirmed Fields (All Pass V)•• status : "failed" - Included in default status filtertype: "conference" - Allowed activity typeVis private : false - Passes privacy filter• V is internal: false - Should be visible• V actual_start_time : "2026-05-12 13:14:08" - Required field existsvtracks: Has video + audio tracks - Passes recorded tilterNext Stens to Deouaselect * from activity providers where id IN (443, 202, 203, 227):Since all fields nass the filters. check these:1. Date Range Selected in Dashboardselect * from activity imports where id = 795889:What date range is the user viewing? The detault is last 90 days. May 12, 2026 should be within range, but verity theselect c.id, c.provider, c.settings, t.* from teams t join crm confiqurations c 1<->1.n: on t.id = c.team_idactual Start date and end date parameters in te dasnooaro recuestwhere c.provider = 'hubspot'2. User/Team ScopeIs user 29089 (Line Kristensen) viewina her own dashboard? Verifv.select * from crm confiqurations crm JOIN teams + 1..n<->1: on crm.team id = t.id• User belonas to team 575 (NationBuilder) 7• User's group (Sales Team) has team_id: 575 VSELE * FROM teamsWHERE 1d = 311SELECT * FROM users WHERE id = 257;opportunities WHERE team 1d = 2• Check it RestrictTeam or RestrictUserGroupScope filters are excluding this3. Sxolicit Filter ValuesCheck if the dashboard request is passing explicit filter values that might exclude this activity, particularly:select * from opportunity_contacts where opportunity_id = 5124;select * fron contacts where id TN (3850.3853. 3851. 4073.4140.4155.4480.4530.4623. 5986. 513. 687. 1806. 1523. 3613) |activity status_values - might be set to only "completed"•only recorded activities - miaht be exolicitly set despite the override4. Actual Elasticsearch Quervselect * from activities where eom confiaunation id = 13.SELECT * FROM activities WHERE uuid_to_bin('826619ce-ec8e-4e59-8467-a01f5f6ad71e') = uuid; # 418141|Add logging in TeamInsightsRepository::getDashboardActivity0verTime to capture the exact Elasticsearch querybeina executed and see why this activitv is excluded!Most likely cause: Either the date range filter is excluding it, or an explicit filter value is being passed that overrides thedefault behavionselect id, team id, crm provider id from crm confiqurations where provider = 'hubspot' and crm provider id IS NOT NULSELECT * FROM accounts WHERE team id = 2 and crm provider id = '1212213464' order by id desc:SSISCT + SP0M contactc WHGPEteam id = 2 and account id = 5189 order by id desc:SELECT * FROM contacts WHERE team id = 2 order by id desc:select * from opportunity contacts where contact id = 6223:SELECT * FROM opportunities WHERE team id = 2 and account id = 5189 order by id desr.al .Ask anvthina (84L)"Code SWF-1.6•0 1.select * from erm profiles where crm confiquration id = 2:WN Windsurf Teams121-1UTF.A...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
35944
|
1341
|
30
|
2026-05-13T13:25:07.704284+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778678707704_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20891-improve-sms-text-relays, menu","depth":5,"on_screen":true,"help_text":"Git Branch: JY-20891-improve-sms-text-relays","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,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AskJiminnyReportActivityServiceTest","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-8820308511646877981
|
-7196540777719685949
|
click
|
hybrid
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
iTerm2ShellEditViewSessionScriptsProfilesWindowHelp>0 lыlec2-user@ip-10-30-129-190:~883-zshSprint Review - in 27 mA100% C8• Wed 13 May 15:33:40181DOCKERC *1DEV (docker)Last login: Wed May 13 09:16:21 on ttys010982APP (-zsh)84screenpipe"• ₴5Poetry could not find a pyproject.toml file in /Users/lukas or its parentsPoetry could not find a pyproject.toml file in /Users/lukas or its parentslukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ ssh jiminny-prod-ecs1 -L 7970:vpc-activities7g-t6nxe5qk7zis7pa5i7qlmp3zwm.us-east-2.es.amazonaws.com:80Enter MFA code for arn:aws:iam::438740370364:mfa/[EMAIL]:Warning: Permanently added 'jiminny-prod-ecs1' (ED25519) to the list of known hosts.A newer release of "Amazon Linux" is available.Version 2023.10.20260330:Version 2023.11.20260406:Version 2023.11.20260413:Version 2023.11.20260427:Version 2023.11.20260505:Version 2023.11.20260509:Run "/usr/bin/dnf check-release-update" for full release and version update info#_####_\_#####\\###|\#/v~'Amazon Linux 2023 (ECS Optimized)ec2-user@ip-10-30-129-190:~ (. 26Im/*Fordocumentation,visit [URL_WITH_CREDENTIALS] ~]$ ||...
|
35942
|
NULL
|
NULL
|
NULL
|
|
35943
|
1342
|
24
|
2026-05-13T13:25:05.702972+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778678705702_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, 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
10
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Component\ElasticSearch\Service;
use ChaseConey\LaravelDatadogHelper\Datadog;
use Elastica;
use Elastica\Document;
use Elastica\Query;
use Generator;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\LazyCollection;
use Jiminny\Component\ElasticSearch\Client;
use Jiminny\Component\ElasticSearch\Contract\Searchable;
use Jiminny\Component\ElasticSearch\ModelFiller;
use Jiminny\Models\Activity;
/**
* Class Search
*
* @package Jiminny\Component\ElasticSearch\Service
*/
class Search
{
/**
* @var Client
*/
private $client;
/**
* @var ModelFiller\Elastica
*/
private $modelFiller;
public function __construct(Client $client, ModelFiller\Elastica $modelFiller)
{
$this->client = $client;
$this->modelFiller = $modelFiller;
}
public function updateDocument(Searchable $model): self
{
return $this->updateDocumentCollection($model, new Collection([$model]));
}
public function updateDocumentCollection(
Searchable $model,
Collection $collection,
int $chunkSize = 10,
?callable $callback = null,
): self {
if ($collection->count() === 0) {
return $this;
}
$documentType = $this->client->createIndex($model->getIndex());
$collection
->chunk($chunkSize)
->each(static function (Collection $collection) use ($documentType, $callback): void {
$documents = $collection->map(static function (Searchable $model): Document {
return new Document((string) $model->getId(), $model->getIndexableAttributes());
});
$documentType->addDocuments($documents->all());
if ($callback !== null) {
$callback($collection, $documents);
}
gc_collect_cycles();
});
return $this;
}
private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\Search
{
if (request() && request()->has('debug')) {
Log::info('Debug ES query: ', [
'debug' => request()->get('debug'),
'userId' => request()->user()?->id ?? 'anonymous',
'userUuid' => request()->user()?->getIdString() ?? 'anonymous',
'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),
'url' => request()->fullUrl(),
]);
}
return $this->client
->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)
->createSearch($query);
}
public function scroll(Query $query, Searchable|string $model): Elastica\Scroll
{
return new Elastica\Scroll($this->createSearch($query, $model));
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*
* @return LazyCollection<int, Document>
*/
public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection
{
return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {
foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {
foreach ($resultSet->getDocuments() as $document) {
yield $document;
}
}
});
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*/
public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\ResultSet
{
Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);
$before = microtime(true);
$result = $this->createSearch($query, $modelOrIndex)->search();
$after = microtime(true);
Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);
return $result;
}
/**
* @TODO use LazyCollection
*
* @return Collection<int, Activity>
*/
public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection
{
return $this
->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)
->collect();
}
/**
* @return array{totalHits: int, results: Collection<int, Activity>}
*/
public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array
{
$search = $this->search($query, $model, $queryName);
/**
* @TODO Use value-object instead.
*/
return [
'totalHits' => $search->getTotalHits(),
'results' => $this
->hydrateCollection($search->getDocuments(), $model)
->collect(),
];
}
private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection
{
return LazyCollection::make($collection)
->map(function (Document $document) use ($model): Searchable {
return $this->hydrateModel($document, $model);
});
}
private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable
{
$attributes = $document->getData();
$attributes['id'] = $document->getId();
/** @var Searchable&Model */
return $this->modelFiller->newFromBuilderRecursive($model, $attributes);
}
}
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
20
1
17
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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
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 * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
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 `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
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;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20891-improve-sms-text-relays, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.08843085,"height":0.025538707},"on_screen":true,"help_text":"Git Branch: JY-20891-improve-sms-text-relays","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.8081782,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AskJiminnyReportActivityServiceTest","depth":6,"bounds":{"left":0.8234708,"top":0.019952115,"width":0.09208777,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AskJiminnyReportActivityServiceTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AskJiminnyReportActivityServiceTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10","depth":4,"bounds":{"left":0.38231382,"top":0.17478053,"width":0.009640957,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.39361703,"top":0.17318435,"width":0.00731383,"height":0.018355945},"on_screen":true,"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.40093085,"top":0.17318435,"width":0.006981383,"height":0.018355945},"on_screen":true,"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\\ElasticSearch\\Service;\n\nuse ChaseConey\\LaravelDatadogHelper\\Datadog;\nuse Elastica;\nuse Elastica\\Document;\nuse Elastica\\Query;\nuse Generator;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\Log;\nuse Illuminate\\Support\\LazyCollection;\nuse Jiminny\\Component\\ElasticSearch\\Client;\nuse Jiminny\\Component\\ElasticSearch\\Contract\\Searchable;\nuse Jiminny\\Component\\ElasticSearch\\ModelFiller;\nuse Jiminny\\Models\\Activity;\n\n/**\n * Class Search\n *\n * @package Jiminny\\Component\\ElasticSearch\\Service\n */\nclass Search\n{\n /**\n * @var Client\n */\n private $client;\n\n /**\n * @var ModelFiller\\Elastica\n */\n private $modelFiller;\n\n public function __construct(Client $client, ModelFiller\\Elastica $modelFiller)\n {\n $this->client = $client;\n $this->modelFiller = $modelFiller;\n }\n\n public function updateDocument(Searchable $model): self\n {\n return $this->updateDocumentCollection($model, new Collection([$model]));\n }\n\n public function updateDocumentCollection(\n Searchable $model,\n Collection $collection,\n int $chunkSize = 10,\n ?callable $callback = null,\n ): self {\n if ($collection->count() === 0) {\n return $this;\n }\n\n $documentType = $this->client->createIndex($model->getIndex());\n\n $collection\n ->chunk($chunkSize)\n ->each(static function (Collection $collection) use ($documentType, $callback): void {\n $documents = $collection->map(static function (Searchable $model): Document {\n return new Document((string) $model->getId(), $model->getIndexableAttributes());\n });\n\n $documentType->addDocuments($documents->all());\n\n if ($callback !== null) {\n $callback($collection, $documents);\n }\n\n gc_collect_cycles();\n });\n\n return $this;\n }\n\n private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\\Search\n {\n if (request() && request()->has('debug')) {\n Log::info('Debug ES query: ', [\n 'debug' => request()->get('debug'),\n 'userId' => request()->user()?->id ?? 'anonymous',\n 'userUuid' => request()->user()?->getIdString() ?? 'anonymous',\n 'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),\n 'url' => request()->fullUrl(),\n ]);\n }\n\n return $this->client\n ->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)\n ->createSearch($query);\n }\n\n public function scroll(Query $query, Searchable|string $model): Elastica\\Scroll\n {\n return new Elastica\\Scroll($this->createSearch($query, $model));\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n *\n * @return LazyCollection<int, Document>\n */\n public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection\n {\n return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {\n foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {\n foreach ($resultSet->getDocuments() as $document) {\n yield $document;\n }\n }\n });\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n */\n public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\\ResultSet\n {\n Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);\n\n $before = microtime(true);\n\n $result = $this->createSearch($query, $modelOrIndex)->search();\n\n $after = microtime(true);\n\n Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);\n\n return $result;\n }\n\n /**\n * @TODO use LazyCollection\n *\n * @return Collection<int, Activity>\n */\n public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection\n {\n return $this\n ->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)\n ->collect();\n }\n\n /**\n * @return array{totalHits: int, results: Collection<int, Activity>}\n */\n public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array\n {\n $search = $this->search($query, $model, $queryName);\n\n /**\n * @TODO Use value-object instead.\n */\n return [\n 'totalHits' => $search->getTotalHits(),\n 'results' => $this\n ->hydrateCollection($search->getDocuments(), $model)\n ->collect(),\n ];\n }\n\n private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection\n {\n return LazyCollection::make($collection)\n ->map(function (Document $document) use ($model): Searchable {\n return $this->hydrateModel($document, $model);\n });\n }\n\n private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable\n {\n $attributes = $document->getData();\n $attributes['id'] = $document->getId();\n\n /** @var Searchable&Model */\n return $this->modelFiller->newFromBuilderRecursive($model, $attributes);\n }\n}","depth":4,"on_screen":true,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Component\\ElasticSearch\\Service;\n\nuse ChaseConey\\LaravelDatadogHelper\\Datadog;\nuse Elastica;\nuse Elastica\\Document;\nuse Elastica\\Query;\nuse Generator;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\Log;\nuse Illuminate\\Support\\LazyCollection;\nuse Jiminny\\Component\\ElasticSearch\\Client;\nuse Jiminny\\Component\\ElasticSearch\\Contract\\Searchable;\nuse Jiminny\\Component\\ElasticSearch\\ModelFiller;\nuse Jiminny\\Models\\Activity;\n\n/**\n * Class Search\n *\n * @package Jiminny\\Component\\ElasticSearch\\Service\n */\nclass Search\n{\n /**\n * @var Client\n */\n private $client;\n\n /**\n * @var ModelFiller\\Elastica\n */\n private $modelFiller;\n\n public function __construct(Client $client, ModelFiller\\Elastica $modelFiller)\n {\n $this->client = $client;\n $this->modelFiller = $modelFiller;\n }\n\n public function updateDocument(Searchable $model): self\n {\n return $this->updateDocumentCollection($model, new Collection([$model]));\n }\n\n public function updateDocumentCollection(\n Searchable $model,\n Collection $collection,\n int $chunkSize = 10,\n ?callable $callback = null,\n ): self {\n if ($collection->count() === 0) {\n return $this;\n }\n\n $documentType = $this->client->createIndex($model->getIndex());\n\n $collection\n ->chunk($chunkSize)\n ->each(static function (Collection $collection) use ($documentType, $callback): void {\n $documents = $collection->map(static function (Searchable $model): Document {\n return new Document((string) $model->getId(), $model->getIndexableAttributes());\n });\n\n $documentType->addDocuments($documents->all());\n\n if ($callback !== null) {\n $callback($collection, $documents);\n }\n\n gc_collect_cycles();\n });\n\n return $this;\n }\n\n private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\\Search\n {\n if (request() && request()->has('debug')) {\n Log::info('Debug ES query: ', [\n 'debug' => request()->get('debug'),\n 'userId' => request()->user()?->id ?? 'anonymous',\n 'userUuid' => request()->user()?->getIdString() ?? 'anonymous',\n 'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),\n 'url' => request()->fullUrl(),\n ]);\n }\n\n return $this->client\n ->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)\n ->createSearch($query);\n }\n\n public function scroll(Query $query, Searchable|string $model): Elastica\\Scroll\n {\n return new Elastica\\Scroll($this->createSearch($query, $model));\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n *\n * @return LazyCollection<int, Document>\n */\n public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection\n {\n return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {\n foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {\n foreach ($resultSet->getDocuments() as $document) {\n yield $document;\n }\n }\n });\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n */\n public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\\ResultSet\n {\n Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);\n\n $before = microtime(true);\n\n $result = $this->createSearch($query, $modelOrIndex)->search();\n\n $after = microtime(true);\n\n Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);\n\n return $result;\n }\n\n /**\n * @TODO use LazyCollection\n *\n * @return Collection<int, Activity>\n */\n public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection\n {\n return $this\n ->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)\n ->collect();\n }\n\n /**\n * @return array{totalHits: int, results: Collection<int, Activity>}\n */\n public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array\n {\n $search = $this->search($query, $model, $queryName);\n\n /**\n * @TODO Use value-object instead.\n */\n return [\n 'totalHits' => $search->getTotalHits(),\n 'results' => $this\n ->hydrateCollection($search->getDocuments(), $model)\n ->collect(),\n ];\n }\n\n private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection\n {\n return LazyCollection::make($collection)\n ->map(function (Document $document) use ($model): Searchable {\n return $this->hydrateModel($document, $model);\n });\n }\n\n private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable\n {\n $attributes = $document->getData();\n $attributes['id'] = $document->getId();\n\n /** @var Searchable&Model */\n return $this->modelFiller->newFromBuilderRecursive($model, $attributes);\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.40957448,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"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.41821808,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"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.42918882,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"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.43783244,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"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.44647607,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"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.4574468,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"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.46841756,"top":0.09896249,"width":0.024268618,"height":0.01915403},"on_screen":true,"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.4950133,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"bounds":{"left":0.50598407,"top":0.09896249,"width":0.029587766,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"bounds":{"left":0.7084442,"top":0.09896249,"width":0.02825798,"height":0.01915403},"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"20","depth":4,"bounds":{"left":0.6712101,"top":0.123703115,"width":0.010305851,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"bounds":{"left":0.68351066,"top":0.123703115,"width":0.00731383,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"17","depth":4,"bounds":{"left":0.6928192,"top":0.123703115,"width":0.00930851,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.70412236,"top":0.123703115,"width":0.007978723,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"bounds":{"left":0.7140958,"top":0.123703115,"width":0.007978723,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.7237367,"top":0.12210695,"width":0.00731383,"height":0.018355945},"on_screen":true,"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.73105055,"top":0.12210695,"width":0.006981383,"height":0.018355945},"on_screen":true,"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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\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 * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\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 `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\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;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;","depth":4,"on_screen":true,"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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\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 * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\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 `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\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;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"on_screen":false,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.011968086,"top":0.047885075,"width":0.024268618,"height":0.024740623},"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
7644424702618419
|
-7004613033495161267
|
click
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, 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
10
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Component\ElasticSearch\Service;
use ChaseConey\LaravelDatadogHelper\Datadog;
use Elastica;
use Elastica\Document;
use Elastica\Query;
use Generator;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\LazyCollection;
use Jiminny\Component\ElasticSearch\Client;
use Jiminny\Component\ElasticSearch\Contract\Searchable;
use Jiminny\Component\ElasticSearch\ModelFiller;
use Jiminny\Models\Activity;
/**
* Class Search
*
* @package Jiminny\Component\ElasticSearch\Service
*/
class Search
{
/**
* @var Client
*/
private $client;
/**
* @var ModelFiller\Elastica
*/
private $modelFiller;
public function __construct(Client $client, ModelFiller\Elastica $modelFiller)
{
$this->client = $client;
$this->modelFiller = $modelFiller;
}
public function updateDocument(Searchable $model): self
{
return $this->updateDocumentCollection($model, new Collection([$model]));
}
public function updateDocumentCollection(
Searchable $model,
Collection $collection,
int $chunkSize = 10,
?callable $callback = null,
): self {
if ($collection->count() === 0) {
return $this;
}
$documentType = $this->client->createIndex($model->getIndex());
$collection
->chunk($chunkSize)
->each(static function (Collection $collection) use ($documentType, $callback): void {
$documents = $collection->map(static function (Searchable $model): Document {
return new Document((string) $model->getId(), $model->getIndexableAttributes());
});
$documentType->addDocuments($documents->all());
if ($callback !== null) {
$callback($collection, $documents);
}
gc_collect_cycles();
});
return $this;
}
private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\Search
{
if (request() && request()->has('debug')) {
Log::info('Debug ES query: ', [
'debug' => request()->get('debug'),
'userId' => request()->user()?->id ?? 'anonymous',
'userUuid' => request()->user()?->getIdString() ?? 'anonymous',
'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),
'url' => request()->fullUrl(),
]);
}
return $this->client
->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)
->createSearch($query);
}
public function scroll(Query $query, Searchable|string $model): Elastica\Scroll
{
return new Elastica\Scroll($this->createSearch($query, $model));
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*
* @return LazyCollection<int, Document>
*/
public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection
{
return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {
foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {
foreach ($resultSet->getDocuments() as $document) {
yield $document;
}
}
});
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*/
public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\ResultSet
{
Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);
$before = microtime(true);
$result = $this->createSearch($query, $modelOrIndex)->search();
$after = microtime(true);
Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);
return $result;
}
/**
* @TODO use LazyCollection
*
* @return Collection<int, Activity>
*/
public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection
{
return $this
->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)
->collect();
}
/**
* @return array{totalHits: int, results: Collection<int, Activity>}
*/
public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array
{
$search = $this->search($query, $model, $queryName);
/**
* @TODO Use value-object instead.
*/
return [
'totalHits' => $search->getTotalHits(),
'results' => $this
->hydrateCollection($search->getDocuments(), $model)
->collect(),
];
}
private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection
{
return LazyCollection::make($collection)
->map(function (Document $document) use ($model): Searchable {
return $this->hydrateModel($document, $model);
});
}
private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable
{
$attributes = $document->getData();
$attributes['id'] = $document->getId();
/** @var Searchable&Model */
return $this->modelFiller->newFromBuilderRecursive($model, $attributes);
}
}
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
20
1
17
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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
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 * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
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 `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
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;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
35941
|
NULL
|
NULL
|
NULL
|
|
35942
|
1341
|
29
|
2026-05-13T13:25:05.702946+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778678705702_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, 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
10
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Component\ElasticSearch\Service;
use ChaseConey\LaravelDatadogHelper\Datadog;
use Elastica;
use Elastica\Document;
use Elastica\Query;
use Generator;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\LazyCollection;
use Jiminny\Component\ElasticSearch\Client;
use Jiminny\Component\ElasticSearch\Contract\Searchable;
use Jiminny\Component\ElasticSearch\ModelFiller;
use Jiminny\Models\Activity;
/**
* Class Search
*
* @package Jiminny\Component\ElasticSearch\Service
*/
class Search
{
/**
* @var Client
*/
private $client;
/**
* @var ModelFiller\Elastica
*/
private $modelFiller;
public function __construct(Client $client, ModelFiller\Elastica $modelFiller)
{
$this->client = $client;
$this->modelFiller = $modelFiller;
}
public function updateDocument(Searchable $model): self
{
return $this->updateDocumentCollection($model, new Collection([$model]));
}
public function updateDocumentCollection(
Searchable $model,
Collection $collection,
int $chunkSize = 10,
?callable $callback = null,
): self {
if ($collection->count() === 0) {
return $this;
}
$documentType = $this->client->createIndex($model->getIndex());
$collection
->chunk($chunkSize)
->each(static function (Collection $collection) use ($documentType, $callback): void {
$documents = $collection->map(static function (Searchable $model): Document {
return new Document((string) $model->getId(), $model->getIndexableAttributes());
});
$documentType->addDocuments($documents->all());
if ($callback !== null) {
$callback($collection, $documents);
}
gc_collect_cycles();
});
return $this;
}
private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\Search
{
if (request() && request()->has('debug')) {
Log::info('Debug ES query: ', [
'debug' => request()->get('debug'),
'userId' => request()->user()?->id ?? 'anonymous',
'userUuid' => request()->user()?->getIdString() ?? 'anonymous',
'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),
'url' => request()->fullUrl(),
]);
}
return $this->client
->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)
->createSearch($query);
}
public function scroll(Query $query, Searchable|string $model): Elastica\Scroll
{
return new Elastica\Scroll($this->createSearch($query, $model));
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*
* @return LazyCollection<int, Document>
*/
public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection
{
return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {
foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {
foreach ($resultSet->getDocuments() as $document) {
yield $document;
}
}
});
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*/
public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\ResultSet
{
Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);
$before = microtime(true);
$result = $this->createSearch($query, $modelOrIndex)->search();
$after = microtime(true);
Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);
return $result;
}
/**
* @TODO use LazyCollection
*
* @return Collection<int, Activity>
*/
public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection
{
return $this
->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)
->collect();
}
/**
* @return array{totalHits: int, results: Collection<int, Activity>}
*/
public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array
{
$search = $this->search($query, $model, $queryName);
/**
* @TODO Use value-object instead.
*/
return [
'totalHits' => $search->getTotalHits(),
'results' => $this
->hydrateCollection($search->getDocuments(), $model)
->collect(),
];
}
private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection
{
return LazyCollection::make($collection)
->map(function (Document $document) use ($model): Searchable {
return $this->hydrateModel($document, $model);
});
}
private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable
{
$attributes = $document->getData();
$attributes['id'] = $document->getId();
/** @var Searchable&Model */
return $this->modelFiller->newFromBuilderRecursive($model, $attributes);
}
}
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
20
1
17
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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
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 * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
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 `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
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;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20891-improve-sms-text-relays, menu","depth":5,"on_screen":true,"help_text":"Git Branch: JY-20891-improve-sms-text-relays","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,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AskJiminnyReportActivityServiceTest","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AskJiminnyReportActivityServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AskJiminnyReportActivityServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"on_screen":true,"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\\ElasticSearch\\Service;\n\nuse ChaseConey\\LaravelDatadogHelper\\Datadog;\nuse Elastica;\nuse Elastica\\Document;\nuse Elastica\\Query;\nuse Generator;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\Log;\nuse Illuminate\\Support\\LazyCollection;\nuse Jiminny\\Component\\ElasticSearch\\Client;\nuse Jiminny\\Component\\ElasticSearch\\Contract\\Searchable;\nuse Jiminny\\Component\\ElasticSearch\\ModelFiller;\nuse Jiminny\\Models\\Activity;\n\n/**\n * Class Search\n *\n * @package Jiminny\\Component\\ElasticSearch\\Service\n */\nclass Search\n{\n /**\n * @var Client\n */\n private $client;\n\n /**\n * @var ModelFiller\\Elastica\n */\n private $modelFiller;\n\n public function __construct(Client $client, ModelFiller\\Elastica $modelFiller)\n {\n $this->client = $client;\n $this->modelFiller = $modelFiller;\n }\n\n public function updateDocument(Searchable $model): self\n {\n return $this->updateDocumentCollection($model, new Collection([$model]));\n }\n\n public function updateDocumentCollection(\n Searchable $model,\n Collection $collection,\n int $chunkSize = 10,\n ?callable $callback = null,\n ): self {\n if ($collection->count() === 0) {\n return $this;\n }\n\n $documentType = $this->client->createIndex($model->getIndex());\n\n $collection\n ->chunk($chunkSize)\n ->each(static function (Collection $collection) use ($documentType, $callback): void {\n $documents = $collection->map(static function (Searchable $model): Document {\n return new Document((string) $model->getId(), $model->getIndexableAttributes());\n });\n\n $documentType->addDocuments($documents->all());\n\n if ($callback !== null) {\n $callback($collection, $documents);\n }\n\n gc_collect_cycles();\n });\n\n return $this;\n }\n\n private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\\Search\n {\n if (request() && request()->has('debug')) {\n Log::info('Debug ES query: ', [\n 'debug' => request()->get('debug'),\n 'userId' => request()->user()?->id ?? 'anonymous',\n 'userUuid' => request()->user()?->getIdString() ?? 'anonymous',\n 'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),\n 'url' => request()->fullUrl(),\n ]);\n }\n\n return $this->client\n ->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)\n ->createSearch($query);\n }\n\n public function scroll(Query $query, Searchable|string $model): Elastica\\Scroll\n {\n return new Elastica\\Scroll($this->createSearch($query, $model));\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n *\n * @return LazyCollection<int, Document>\n */\n public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection\n {\n return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {\n foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {\n foreach ($resultSet->getDocuments() as $document) {\n yield $document;\n }\n }\n });\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n */\n public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\\ResultSet\n {\n Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);\n\n $before = microtime(true);\n\n $result = $this->createSearch($query, $modelOrIndex)->search();\n\n $after = microtime(true);\n\n Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);\n\n return $result;\n }\n\n /**\n * @TODO use LazyCollection\n *\n * @return Collection<int, Activity>\n */\n public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection\n {\n return $this\n ->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)\n ->collect();\n }\n\n /**\n * @return array{totalHits: int, results: Collection<int, Activity>}\n */\n public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array\n {\n $search = $this->search($query, $model, $queryName);\n\n /**\n * @TODO Use value-object instead.\n */\n return [\n 'totalHits' => $search->getTotalHits(),\n 'results' => $this\n ->hydrateCollection($search->getDocuments(), $model)\n ->collect(),\n ];\n }\n\n private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection\n {\n return LazyCollection::make($collection)\n ->map(function (Document $document) use ($model): Searchable {\n return $this->hydrateModel($document, $model);\n });\n }\n\n private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable\n {\n $attributes = $document->getData();\n $attributes['id'] = $document->getId();\n\n /** @var Searchable&Model */\n return $this->modelFiller->newFromBuilderRecursive($model, $attributes);\n }\n}","depth":4,"on_screen":true,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Component\\ElasticSearch\\Service;\n\nuse ChaseConey\\LaravelDatadogHelper\\Datadog;\nuse Elastica;\nuse Elastica\\Document;\nuse Elastica\\Query;\nuse Generator;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\Log;\nuse Illuminate\\Support\\LazyCollection;\nuse Jiminny\\Component\\ElasticSearch\\Client;\nuse Jiminny\\Component\\ElasticSearch\\Contract\\Searchable;\nuse Jiminny\\Component\\ElasticSearch\\ModelFiller;\nuse Jiminny\\Models\\Activity;\n\n/**\n * Class Search\n *\n * @package Jiminny\\Component\\ElasticSearch\\Service\n */\nclass Search\n{\n /**\n * @var Client\n */\n private $client;\n\n /**\n * @var ModelFiller\\Elastica\n */\n private $modelFiller;\n\n public function __construct(Client $client, ModelFiller\\Elastica $modelFiller)\n {\n $this->client = $client;\n $this->modelFiller = $modelFiller;\n }\n\n public function updateDocument(Searchable $model): self\n {\n return $this->updateDocumentCollection($model, new Collection([$model]));\n }\n\n public function updateDocumentCollection(\n Searchable $model,\n Collection $collection,\n int $chunkSize = 10,\n ?callable $callback = null,\n ): self {\n if ($collection->count() === 0) {\n return $this;\n }\n\n $documentType = $this->client->createIndex($model->getIndex());\n\n $collection\n ->chunk($chunkSize)\n ->each(static function (Collection $collection) use ($documentType, $callback): void {\n $documents = $collection->map(static function (Searchable $model): Document {\n return new Document((string) $model->getId(), $model->getIndexableAttributes());\n });\n\n $documentType->addDocuments($documents->all());\n\n if ($callback !== null) {\n $callback($collection, $documents);\n }\n\n gc_collect_cycles();\n });\n\n return $this;\n }\n\n private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\\Search\n {\n if (request() && request()->has('debug')) {\n Log::info('Debug ES query: ', [\n 'debug' => request()->get('debug'),\n 'userId' => request()->user()?->id ?? 'anonymous',\n 'userUuid' => request()->user()?->getIdString() ?? 'anonymous',\n 'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),\n 'url' => request()->fullUrl(),\n ]);\n }\n\n return $this->client\n ->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)\n ->createSearch($query);\n }\n\n public function scroll(Query $query, Searchable|string $model): Elastica\\Scroll\n {\n return new Elastica\\Scroll($this->createSearch($query, $model));\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n *\n * @return LazyCollection<int, Document>\n */\n public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection\n {\n return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {\n foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {\n foreach ($resultSet->getDocuments() as $document) {\n yield $document;\n }\n }\n });\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n */\n public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\\ResultSet\n {\n Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);\n\n $before = microtime(true);\n\n $result = $this->createSearch($query, $modelOrIndex)->search();\n\n $after = microtime(true);\n\n Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);\n\n return $result;\n }\n\n /**\n * @TODO use LazyCollection\n *\n * @return Collection<int, Activity>\n */\n public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection\n {\n return $this\n ->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)\n ->collect();\n }\n\n /**\n * @return array{totalHits: int, results: Collection<int, Activity>}\n */\n public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array\n {\n $search = $this->search($query, $model, $queryName);\n\n /**\n * @TODO Use value-object instead.\n */\n return [\n 'totalHits' => $search->getTotalHits(),\n 'results' => $this\n ->hydrateCollection($search->getDocuments(), $model)\n ->collect(),\n ];\n }\n\n private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection\n {\n return LazyCollection::make($collection)\n ->map(function (Document $document) use ($model): Searchable {\n return $this->hydrateModel($document, $model);\n });\n }\n\n private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable\n {\n $attributes = $document->getData();\n $attributes['id'] = $document->getId();\n\n /** @var Searchable&Model */\n return $this->modelFiller->newFromBuilderRecursive($model, $attributes);\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,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"on_screen":true,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"20","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"17","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"on_screen":true,"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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\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 * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\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 `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\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;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;","depth":4,"on_screen":true,"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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\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 * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\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 `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\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;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"on_screen":false,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
7644424702618419
|
-7004613033495161267
|
click
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, 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
10
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Component\ElasticSearch\Service;
use ChaseConey\LaravelDatadogHelper\Datadog;
use Elastica;
use Elastica\Document;
use Elastica\Query;
use Generator;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\LazyCollection;
use Jiminny\Component\ElasticSearch\Client;
use Jiminny\Component\ElasticSearch\Contract\Searchable;
use Jiminny\Component\ElasticSearch\ModelFiller;
use Jiminny\Models\Activity;
/**
* Class Search
*
* @package Jiminny\Component\ElasticSearch\Service
*/
class Search
{
/**
* @var Client
*/
private $client;
/**
* @var ModelFiller\Elastica
*/
private $modelFiller;
public function __construct(Client $client, ModelFiller\Elastica $modelFiller)
{
$this->client = $client;
$this->modelFiller = $modelFiller;
}
public function updateDocument(Searchable $model): self
{
return $this->updateDocumentCollection($model, new Collection([$model]));
}
public function updateDocumentCollection(
Searchable $model,
Collection $collection,
int $chunkSize = 10,
?callable $callback = null,
): self {
if ($collection->count() === 0) {
return $this;
}
$documentType = $this->client->createIndex($model->getIndex());
$collection
->chunk($chunkSize)
->each(static function (Collection $collection) use ($documentType, $callback): void {
$documents = $collection->map(static function (Searchable $model): Document {
return new Document((string) $model->getId(), $model->getIndexableAttributes());
});
$documentType->addDocuments($documents->all());
if ($callback !== null) {
$callback($collection, $documents);
}
gc_collect_cycles();
});
return $this;
}
private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\Search
{
if (request() && request()->has('debug')) {
Log::info('Debug ES query: ', [
'debug' => request()->get('debug'),
'userId' => request()->user()?->id ?? 'anonymous',
'userUuid' => request()->user()?->getIdString() ?? 'anonymous',
'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),
'url' => request()->fullUrl(),
]);
}
return $this->client
->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)
->createSearch($query);
}
public function scroll(Query $query, Searchable|string $model): Elastica\Scroll
{
return new Elastica\Scroll($this->createSearch($query, $model));
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*
* @return LazyCollection<int, Document>
*/
public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection
{
return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {
foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {
foreach ($resultSet->getDocuments() as $document) {
yield $document;
}
}
});
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*/
public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\ResultSet
{
Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);
$before = microtime(true);
$result = $this->createSearch($query, $modelOrIndex)->search();
$after = microtime(true);
Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);
return $result;
}
/**
* @TODO use LazyCollection
*
* @return Collection<int, Activity>
*/
public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection
{
return $this
->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)
->collect();
}
/**
* @return array{totalHits: int, results: Collection<int, Activity>}
*/
public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array
{
$search = $this->search($query, $model, $queryName);
/**
* @TODO Use value-object instead.
*/
return [
'totalHits' => $search->getTotalHits(),
'results' => $this
->hydrateCollection($search->getDocuments(), $model)
->collect(),
];
}
private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection
{
return LazyCollection::make($collection)
->map(function (Document $document) use ($model): Searchable {
return $this->hydrateModel($document, $model);
});
}
private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable
{
$attributes = $document->getData();
$attributes['id'] = $document->getId();
/** @var Searchable&Model */
return $this->modelFiller->newFromBuilderRecursive($model, $attributes);
}
}
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
20
1
17
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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
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 * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
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 `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
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;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
35941
|
1342
|
23
|
2026-05-13T13:25:03.465209+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778678703465_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, 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
10
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Component\ElasticSearch\Service;
use ChaseConey\LaravelDatadogHelper\Datadog;
use Elastica;
use Elastica\Document;
use Elastica\Query;
use Generator;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\LazyCollection;
use Jiminny\Component\ElasticSearch\Client;
use Jiminny\Component\ElasticSearch\Contract\Searchable;
use Jiminny\Component\ElasticSearch\ModelFiller;
use Jiminny\Models\Activity;
/**
* Class Search
*
* @package Jiminny\Component\ElasticSearch\Service
*/
class Search
{
/**
* @var Client
*/
private $client;
/**
* @var ModelFiller\Elastica
*/
private $modelFiller;
public function __construct(Client $client, ModelFiller\Elastica $modelFiller)
{
$this->client = $client;
$this->modelFiller = $modelFiller;
}
public function updateDocument(Searchable $model): self
{
return $this->updateDocumentCollection($model, new Collection([$model]));
}
public function updateDocumentCollection(
Searchable $model,
Collection $collection,
int $chunkSize = 10,
?callable $callback = null,
): self {
if ($collection->count() === 0) {
return $this;
}
$documentType = $this->client->createIndex($model->getIndex());
$collection
->chunk($chunkSize)
->each(static function (Collection $collection) use ($documentType, $callback): void {
$documents = $collection->map(static function (Searchable $model): Document {
return new Document((string) $model->getId(), $model->getIndexableAttributes());
});
$documentType->addDocuments($documents->all());
if ($callback !== null) {
$callback($collection, $documents);
}
gc_collect_cycles();
});
return $this;
}
private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\Search
{
if (request() && request()->has('debug')) {
Log::info('Debug ES query: ', [
'debug' => request()->get('debug'),
'userId' => request()->user()?->id ?? 'anonymous',
'userUuid' => request()->user()?->getIdString() ?? 'anonymous',
'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),
'url' => request()->fullUrl(),
]);
}
return $this->client
->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)
->createSearch($query);
}
public function scroll(Query $query, Searchable|string $model): Elastica\Scroll
{
return new Elastica\Scroll($this->createSearch($query, $model));
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*
* @return LazyCollection<int, Document>
*/
public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection
{
return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {
foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {
foreach ($resultSet->getDocuments() as $document) {
yield $document;
}
}
});
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*/
public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\ResultSet
{
Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);
$before = microtime(true);
$result = $this->createSearch($query, $modelOrIndex)->search();
$after = microtime(true);
Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);
return $result;
}
/**
* @TODO use LazyCollection
*
* @return Collection<int, Activity>
*/
public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection
{
return $this
->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)
->collect();
}
/**
* @return array{totalHits: int, results: Collection<int, Activity>}
*/
public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array
{
$search = $this->search($query, $model, $queryName);
/**
* @TODO Use value-object instead.
*/
return [
'totalHits' => $search->getTotalHits(),
'results' => $this
->hydrateCollection($search->getDocuments(), $model)
->collect(),
];
}
private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection
{
return LazyCollection::make($collection)
->map(function (Document $document) use ($model): Searchable {
return $this->hydrateModel($document, $model);
});
}
private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable
{
$attributes = $document->getData();
$attributes['id'] = $document->getId();
/** @var Searchable&Model */
return $this->modelFiller->newFromBuilderRecursive($model, $attributes);
}
}...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20891-improve-sms-text-relays, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.08843085,"height":0.025538707},"on_screen":true,"help_text":"Git Branch: JY-20891-improve-sms-text-relays","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.8081782,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AskJiminnyReportActivityServiceTest","depth":6,"bounds":{"left":0.8234708,"top":0.019952115,"width":0.09208777,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AskJiminnyReportActivityServiceTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AskJiminnyReportActivityServiceTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10","depth":4,"bounds":{"left":0.38231382,"top":0.17478053,"width":0.009640957,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.39361703,"top":0.17318435,"width":0.00731383,"height":0.018355945},"on_screen":true,"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.40093085,"top":0.17318435,"width":0.006981383,"height":0.018355945},"on_screen":true,"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\\ElasticSearch\\Service;\n\nuse ChaseConey\\LaravelDatadogHelper\\Datadog;\nuse Elastica;\nuse Elastica\\Document;\nuse Elastica\\Query;\nuse Generator;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\Log;\nuse Illuminate\\Support\\LazyCollection;\nuse Jiminny\\Component\\ElasticSearch\\Client;\nuse Jiminny\\Component\\ElasticSearch\\Contract\\Searchable;\nuse Jiminny\\Component\\ElasticSearch\\ModelFiller;\nuse Jiminny\\Models\\Activity;\n\n/**\n * Class Search\n *\n * @package Jiminny\\Component\\ElasticSearch\\Service\n */\nclass Search\n{\n /**\n * @var Client\n */\n private $client;\n\n /**\n * @var ModelFiller\\Elastica\n */\n private $modelFiller;\n\n public function __construct(Client $client, ModelFiller\\Elastica $modelFiller)\n {\n $this->client = $client;\n $this->modelFiller = $modelFiller;\n }\n\n public function updateDocument(Searchable $model): self\n {\n return $this->updateDocumentCollection($model, new Collection([$model]));\n }\n\n public function updateDocumentCollection(\n Searchable $model,\n Collection $collection,\n int $chunkSize = 10,\n ?callable $callback = null,\n ): self {\n if ($collection->count() === 0) {\n return $this;\n }\n\n $documentType = $this->client->createIndex($model->getIndex());\n\n $collection\n ->chunk($chunkSize)\n ->each(static function (Collection $collection) use ($documentType, $callback): void {\n $documents = $collection->map(static function (Searchable $model): Document {\n return new Document((string) $model->getId(), $model->getIndexableAttributes());\n });\n\n $documentType->addDocuments($documents->all());\n\n if ($callback !== null) {\n $callback($collection, $documents);\n }\n\n gc_collect_cycles();\n });\n\n return $this;\n }\n\n private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\\Search\n {\n if (request() && request()->has('debug')) {\n Log::info('Debug ES query: ', [\n 'debug' => request()->get('debug'),\n 'userId' => request()->user()?->id ?? 'anonymous',\n 'userUuid' => request()->user()?->getIdString() ?? 'anonymous',\n 'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),\n 'url' => request()->fullUrl(),\n ]);\n }\n\n return $this->client\n ->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)\n ->createSearch($query);\n }\n\n public function scroll(Query $query, Searchable|string $model): Elastica\\Scroll\n {\n return new Elastica\\Scroll($this->createSearch($query, $model));\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n *\n * @return LazyCollection<int, Document>\n */\n public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection\n {\n return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {\n foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {\n foreach ($resultSet->getDocuments() as $document) {\n yield $document;\n }\n }\n });\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n */\n public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\\ResultSet\n {\n Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);\n\n $before = microtime(true);\n\n $result = $this->createSearch($query, $modelOrIndex)->search();\n\n $after = microtime(true);\n\n Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);\n\n return $result;\n }\n\n /**\n * @TODO use LazyCollection\n *\n * @return Collection<int, Activity>\n */\n public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection\n {\n return $this\n ->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)\n ->collect();\n }\n\n /**\n * @return array{totalHits: int, results: Collection<int, Activity>}\n */\n public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array\n {\n $search = $this->search($query, $model, $queryName);\n\n /**\n * @TODO Use value-object instead.\n */\n return [\n 'totalHits' => $search->getTotalHits(),\n 'results' => $this\n ->hydrateCollection($search->getDocuments(), $model)\n ->collect(),\n ];\n }\n\n private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection\n {\n return LazyCollection::make($collection)\n ->map(function (Document $document) use ($model): Searchable {\n return $this->hydrateModel($document, $model);\n });\n }\n\n private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable\n {\n $attributes = $document->getData();\n $attributes['id'] = $document->getId();\n\n /** @var Searchable&Model */\n return $this->modelFiller->newFromBuilderRecursive($model, $attributes);\n }\n}","depth":4,"on_screen":true,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Component\\ElasticSearch\\Service;\n\nuse ChaseConey\\LaravelDatadogHelper\\Datadog;\nuse Elastica;\nuse Elastica\\Document;\nuse Elastica\\Query;\nuse Generator;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\Log;\nuse Illuminate\\Support\\LazyCollection;\nuse Jiminny\\Component\\ElasticSearch\\Client;\nuse Jiminny\\Component\\ElasticSearch\\Contract\\Searchable;\nuse Jiminny\\Component\\ElasticSearch\\ModelFiller;\nuse Jiminny\\Models\\Activity;\n\n/**\n * Class Search\n *\n * @package Jiminny\\Component\\ElasticSearch\\Service\n */\nclass Search\n{\n /**\n * @var Client\n */\n private $client;\n\n /**\n * @var ModelFiller\\Elastica\n */\n private $modelFiller;\n\n public function __construct(Client $client, ModelFiller\\Elastica $modelFiller)\n {\n $this->client = $client;\n $this->modelFiller = $modelFiller;\n }\n\n public function updateDocument(Searchable $model): self\n {\n return $this->updateDocumentCollection($model, new Collection([$model]));\n }\n\n public function updateDocumentCollection(\n Searchable $model,\n Collection $collection,\n int $chunkSize = 10,\n ?callable $callback = null,\n ): self {\n if ($collection->count() === 0) {\n return $this;\n }\n\n $documentType = $this->client->createIndex($model->getIndex());\n\n $collection\n ->chunk($chunkSize)\n ->each(static function (Collection $collection) use ($documentType, $callback): void {\n $documents = $collection->map(static function (Searchable $model): Document {\n return new Document((string) $model->getId(), $model->getIndexableAttributes());\n });\n\n $documentType->addDocuments($documents->all());\n\n if ($callback !== null) {\n $callback($collection, $documents);\n }\n\n gc_collect_cycles();\n });\n\n return $this;\n }\n\n private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\\Search\n {\n if (request() && request()->has('debug')) {\n Log::info('Debug ES query: ', [\n 'debug' => request()->get('debug'),\n 'userId' => request()->user()?->id ?? 'anonymous',\n 'userUuid' => request()->user()?->getIdString() ?? 'anonymous',\n 'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),\n 'url' => request()->fullUrl(),\n ]);\n }\n\n return $this->client\n ->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)\n ->createSearch($query);\n }\n\n public function scroll(Query $query, Searchable|string $model): Elastica\\Scroll\n {\n return new Elastica\\Scroll($this->createSearch($query, $model));\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n *\n * @return LazyCollection<int, Document>\n */\n public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection\n {\n return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {\n foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {\n foreach ($resultSet->getDocuments() as $document) {\n yield $document;\n }\n }\n });\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n */\n public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\\ResultSet\n {\n Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);\n\n $before = microtime(true);\n\n $result = $this->createSearch($query, $modelOrIndex)->search();\n\n $after = microtime(true);\n\n Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);\n\n return $result;\n }\n\n /**\n * @TODO use LazyCollection\n *\n * @return Collection<int, Activity>\n */\n public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection\n {\n return $this\n ->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)\n ->collect();\n }\n\n /**\n * @return array{totalHits: int, results: Collection<int, Activity>}\n */\n public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array\n {\n $search = $this->search($query, $model, $queryName);\n\n /**\n * @TODO Use value-object instead.\n */\n return [\n 'totalHits' => $search->getTotalHits(),\n 'results' => $this\n ->hydrateCollection($search->getDocuments(), $model)\n ->collect(),\n ];\n }\n\n private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection\n {\n return LazyCollection::make($collection)\n ->map(function (Document $document) use ($model): Searchable {\n return $this->hydrateModel($document, $model);\n });\n }\n\n private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable\n {\n $attributes = $document->getData();\n $attributes['id'] = $document->getId();\n\n /** @var Searchable&Model */\n return $this->modelFiller->newFromBuilderRecursive($model, $attributes);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-2343244149218324613
|
-7881077389668029571
|
click
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, 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
10
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Component\ElasticSearch\Service;
use ChaseConey\LaravelDatadogHelper\Datadog;
use Elastica;
use Elastica\Document;
use Elastica\Query;
use Generator;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\LazyCollection;
use Jiminny\Component\ElasticSearch\Client;
use Jiminny\Component\ElasticSearch\Contract\Searchable;
use Jiminny\Component\ElasticSearch\ModelFiller;
use Jiminny\Models\Activity;
/**
* Class Search
*
* @package Jiminny\Component\ElasticSearch\Service
*/
class Search
{
/**
* @var Client
*/
private $client;
/**
* @var ModelFiller\Elastica
*/
private $modelFiller;
public function __construct(Client $client, ModelFiller\Elastica $modelFiller)
{
$this->client = $client;
$this->modelFiller = $modelFiller;
}
public function updateDocument(Searchable $model): self
{
return $this->updateDocumentCollection($model, new Collection([$model]));
}
public function updateDocumentCollection(
Searchable $model,
Collection $collection,
int $chunkSize = 10,
?callable $callback = null,
): self {
if ($collection->count() === 0) {
return $this;
}
$documentType = $this->client->createIndex($model->getIndex());
$collection
->chunk($chunkSize)
->each(static function (Collection $collection) use ($documentType, $callback): void {
$documents = $collection->map(static function (Searchable $model): Document {
return new Document((string) $model->getId(), $model->getIndexableAttributes());
});
$documentType->addDocuments($documents->all());
if ($callback !== null) {
$callback($collection, $documents);
}
gc_collect_cycles();
});
return $this;
}
private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\Search
{
if (request() && request()->has('debug')) {
Log::info('Debug ES query: ', [
'debug' => request()->get('debug'),
'userId' => request()->user()?->id ?? 'anonymous',
'userUuid' => request()->user()?->getIdString() ?? 'anonymous',
'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),
'url' => request()->fullUrl(),
]);
}
return $this->client
->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)
->createSearch($query);
}
public function scroll(Query $query, Searchable|string $model): Elastica\Scroll
{
return new Elastica\Scroll($this->createSearch($query, $model));
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*
* @return LazyCollection<int, Document>
*/
public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection
{
return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {
foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {
foreach ($resultSet->getDocuments() as $document) {
yield $document;
}
}
});
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*/
public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\ResultSet
{
Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);
$before = microtime(true);
$result = $this->createSearch($query, $modelOrIndex)->search();
$after = microtime(true);
Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);
return $result;
}
/**
* @TODO use LazyCollection
*
* @return Collection<int, Activity>
*/
public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection
{
return $this
->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)
->collect();
}
/**
* @return array{totalHits: int, results: Collection<int, Activity>}
*/
public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array
{
$search = $this->search($query, $model, $queryName);
/**
* @TODO Use value-object instead.
*/
return [
'totalHits' => $search->getTotalHits(),
'results' => $this
->hydrateCollection($search->getDocuments(), $model)
->collect(),
];
}
private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection
{
return LazyCollection::make($collection)
->map(function (Document $document) use ($model): Searchable {
return $this->hydrateModel($document, $model);
});
}
private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable
{
$attributes = $document->getData();
$attributes['id'] = $document->getId();
/** @var Searchable&Model */
return $this->modelFiller->newFromBuilderRecursive($model, $attributes);
}
}...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
35940
|
1341
|
28
|
2026-05-13T13:25:03.499158+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778678703499_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, 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
10
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Component\ElasticSearch\Service;
use ChaseConey\LaravelDatadogHelper\Datadog;
use Elastica;
use Elastica\Document;
use Elastica\Query;
use Generator;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\LazyCollection;
use Jiminny\Component\ElasticSearch\Client;
use Jiminny\Component\ElasticSearch\Contract\Searchable;
use Jiminny\Component\ElasticSearch\ModelFiller;
use Jiminny\Models\Activity;
/**
* Class Search
*
* @package Jiminny\Component\ElasticSearch\Service
*/
class Search
{
/**
* @var Client
*/
private $client;
/**
* @var ModelFiller\Elastica
*/
private $modelFiller;
public function __construct(Client $client, ModelFiller\Elastica $modelFiller)
{
$this->client = $client;
$this->modelFiller = $modelFiller;
}
public function updateDocument(Searchable $model): self
{
return $this->updateDocumentCollection($model, new Collection([$model]));
}
public function updateDocumentCollection(
Searchable $model,
Collection $collection,
int $chunkSize = 10,
?callable $callback = null,
): self {
if ($collection->count() === 0) {
return $this;
}
$documentType = $this->client->createIndex($model->getIndex());
$collection
->chunk($chunkSize)
->each(static function (Collection $collection) use ($documentType, $callback): void {
$documents = $collection->map(static function (Searchable $model): Document {
return new Document((string) $model->getId(), $model->getIndexableAttributes());
});
$documentType->addDocuments($documents->all());
if ($callback !== null) {
$callback($collection, $documents);
}
gc_collect_cycles();
});
return $this;
}
private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\Search
{
if (request() && request()->has('debug')) {
Log::info('Debug ES query: ', [
'debug' => request()->get('debug'),
'userId' => request()->user()?->id ?? 'anonymous',
'userUuid' => request()->user()?->getIdString() ?? 'anonymous',
'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),
'url' => request()->fullUrl(),
]);
}
return $this->client
->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)
->createSearch($query);
}
public function scroll(Query $query, Searchable|string $model): Elastica\Scroll
{
return new Elastica\Scroll($this->createSearch($query, $model));
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*
* @return LazyCollection<int, Document>
*/
public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection
{
return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {
foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {
foreach ($resultSet->getDocuments() as $document) {
yield $document;
}
}
});
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*/
public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\ResultSet
{
Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);
$before = microtime(true);
$result = $this->createSearch($query, $modelOrIndex)->search();
$after = microtime(true);
Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);
return $result;
}
/**
* @TODO use LazyCollection
*
* @return Collection<int, Activity>
*/
public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection
{
return $this
->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)
->collect();
}
/**
* @return array{totalHits: int, results: Collection<int, Activity>}
*/
public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array
{
$search = $this->search($query, $model, $queryName);
/**
* @TODO Use value-object instead.
*/
return [
'totalHits' => $search->getTotalHits(),
'results' => $this
->hydrateCollection($search->getDocuments(), $model)
->collect(),
];
}
private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection
{
return LazyCollection::make($collection)
->map(function (Document $document) use ($model): Searchable {
return $this->hydrateModel($document, $model);
});
}
private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable
{
$attributes = $document->getData();
$attributes['id'] = $document->getId();
/** @var Searchable&Model */
return $this->modelFiller->newFromBuilderRecursive($model, $attributes);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20891-improve-sms-text-relays, menu","depth":5,"on_screen":true,"help_text":"Git Branch: JY-20891-improve-sms-text-relays","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,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AskJiminnyReportActivityServiceTest","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AskJiminnyReportActivityServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AskJiminnyReportActivityServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"on_screen":true,"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\\ElasticSearch\\Service;\n\nuse ChaseConey\\LaravelDatadogHelper\\Datadog;\nuse Elastica;\nuse Elastica\\Document;\nuse Elastica\\Query;\nuse Generator;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\Log;\nuse Illuminate\\Support\\LazyCollection;\nuse Jiminny\\Component\\ElasticSearch\\Client;\nuse Jiminny\\Component\\ElasticSearch\\Contract\\Searchable;\nuse Jiminny\\Component\\ElasticSearch\\ModelFiller;\nuse Jiminny\\Models\\Activity;\n\n/**\n * Class Search\n *\n * @package Jiminny\\Component\\ElasticSearch\\Service\n */\nclass Search\n{\n /**\n * @var Client\n */\n private $client;\n\n /**\n * @var ModelFiller\\Elastica\n */\n private $modelFiller;\n\n public function __construct(Client $client, ModelFiller\\Elastica $modelFiller)\n {\n $this->client = $client;\n $this->modelFiller = $modelFiller;\n }\n\n public function updateDocument(Searchable $model): self\n {\n return $this->updateDocumentCollection($model, new Collection([$model]));\n }\n\n public function updateDocumentCollection(\n Searchable $model,\n Collection $collection,\n int $chunkSize = 10,\n ?callable $callback = null,\n ): self {\n if ($collection->count() === 0) {\n return $this;\n }\n\n $documentType = $this->client->createIndex($model->getIndex());\n\n $collection\n ->chunk($chunkSize)\n ->each(static function (Collection $collection) use ($documentType, $callback): void {\n $documents = $collection->map(static function (Searchable $model): Document {\n return new Document((string) $model->getId(), $model->getIndexableAttributes());\n });\n\n $documentType->addDocuments($documents->all());\n\n if ($callback !== null) {\n $callback($collection, $documents);\n }\n\n gc_collect_cycles();\n });\n\n return $this;\n }\n\n private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\\Search\n {\n if (request() && request()->has('debug')) {\n Log::info('Debug ES query: ', [\n 'debug' => request()->get('debug'),\n 'userId' => request()->user()?->id ?? 'anonymous',\n 'userUuid' => request()->user()?->getIdString() ?? 'anonymous',\n 'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),\n 'url' => request()->fullUrl(),\n ]);\n }\n\n return $this->client\n ->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)\n ->createSearch($query);\n }\n\n public function scroll(Query $query, Searchable|string $model): Elastica\\Scroll\n {\n return new Elastica\\Scroll($this->createSearch($query, $model));\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n *\n * @return LazyCollection<int, Document>\n */\n public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection\n {\n return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {\n foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {\n foreach ($resultSet->getDocuments() as $document) {\n yield $document;\n }\n }\n });\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n */\n public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\\ResultSet\n {\n Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);\n\n $before = microtime(true);\n\n $result = $this->createSearch($query, $modelOrIndex)->search();\n\n $after = microtime(true);\n\n Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);\n\n return $result;\n }\n\n /**\n * @TODO use LazyCollection\n *\n * @return Collection<int, Activity>\n */\n public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection\n {\n return $this\n ->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)\n ->collect();\n }\n\n /**\n * @return array{totalHits: int, results: Collection<int, Activity>}\n */\n public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array\n {\n $search = $this->search($query, $model, $queryName);\n\n /**\n * @TODO Use value-object instead.\n */\n return [\n 'totalHits' => $search->getTotalHits(),\n 'results' => $this\n ->hydrateCollection($search->getDocuments(), $model)\n ->collect(),\n ];\n }\n\n private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection\n {\n return LazyCollection::make($collection)\n ->map(function (Document $document) use ($model): Searchable {\n return $this->hydrateModel($document, $model);\n });\n }\n\n private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable\n {\n $attributes = $document->getData();\n $attributes['id'] = $document->getId();\n\n /** @var Searchable&Model */\n return $this->modelFiller->newFromBuilderRecursive($model, $attributes);\n }\n}","depth":4,"on_screen":true,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Component\\ElasticSearch\\Service;\n\nuse ChaseConey\\LaravelDatadogHelper\\Datadog;\nuse Elastica;\nuse Elastica\\Document;\nuse Elastica\\Query;\nuse Generator;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\Log;\nuse Illuminate\\Support\\LazyCollection;\nuse Jiminny\\Component\\ElasticSearch\\Client;\nuse Jiminny\\Component\\ElasticSearch\\Contract\\Searchable;\nuse Jiminny\\Component\\ElasticSearch\\ModelFiller;\nuse Jiminny\\Models\\Activity;\n\n/**\n * Class Search\n *\n * @package Jiminny\\Component\\ElasticSearch\\Service\n */\nclass Search\n{\n /**\n * @var Client\n */\n private $client;\n\n /**\n * @var ModelFiller\\Elastica\n */\n private $modelFiller;\n\n public function __construct(Client $client, ModelFiller\\Elastica $modelFiller)\n {\n $this->client = $client;\n $this->modelFiller = $modelFiller;\n }\n\n public function updateDocument(Searchable $model): self\n {\n return $this->updateDocumentCollection($model, new Collection([$model]));\n }\n\n public function updateDocumentCollection(\n Searchable $model,\n Collection $collection,\n int $chunkSize = 10,\n ?callable $callback = null,\n ): self {\n if ($collection->count() === 0) {\n return $this;\n }\n\n $documentType = $this->client->createIndex($model->getIndex());\n\n $collection\n ->chunk($chunkSize)\n ->each(static function (Collection $collection) use ($documentType, $callback): void {\n $documents = $collection->map(static function (Searchable $model): Document {\n return new Document((string) $model->getId(), $model->getIndexableAttributes());\n });\n\n $documentType->addDocuments($documents->all());\n\n if ($callback !== null) {\n $callback($collection, $documents);\n }\n\n gc_collect_cycles();\n });\n\n return $this;\n }\n\n private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\\Search\n {\n if (request() && request()->has('debug')) {\n Log::info('Debug ES query: ', [\n 'debug' => request()->get('debug'),\n 'userId' => request()->user()?->id ?? 'anonymous',\n 'userUuid' => request()->user()?->getIdString() ?? 'anonymous',\n 'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),\n 'url' => request()->fullUrl(),\n ]);\n }\n\n return $this->client\n ->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)\n ->createSearch($query);\n }\n\n public function scroll(Query $query, Searchable|string $model): Elastica\\Scroll\n {\n return new Elastica\\Scroll($this->createSearch($query, $model));\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n *\n * @return LazyCollection<int, Document>\n */\n public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection\n {\n return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {\n foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {\n foreach ($resultSet->getDocuments() as $document) {\n yield $document;\n }\n }\n });\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n */\n public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\\ResultSet\n {\n Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);\n\n $before = microtime(true);\n\n $result = $this->createSearch($query, $modelOrIndex)->search();\n\n $after = microtime(true);\n\n Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);\n\n return $result;\n }\n\n /**\n * @TODO use LazyCollection\n *\n * @return Collection<int, Activity>\n */\n public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection\n {\n return $this\n ->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)\n ->collect();\n }\n\n /**\n * @return array{totalHits: int, results: Collection<int, Activity>}\n */\n public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array\n {\n $search = $this->search($query, $model, $queryName);\n\n /**\n * @TODO Use value-object instead.\n */\n return [\n 'totalHits' => $search->getTotalHits(),\n 'results' => $this\n ->hydrateCollection($search->getDocuments(), $model)\n ->collect(),\n ];\n }\n\n private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection\n {\n return LazyCollection::make($collection)\n ->map(function (Document $document) use ($model): Searchable {\n return $this->hydrateModel($document, $model);\n });\n }\n\n private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable\n {\n $attributes = $document->getData();\n $attributes['id'] = $document->getId();\n\n /** @var Searchable&Model */\n return $this->modelFiller->newFromBuilderRecursive($model, $attributes);\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,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
1636466358099017845
|
-7881077389668029571
|
click
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, 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
10
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Component\ElasticSearch\Service;
use ChaseConey\LaravelDatadogHelper\Datadog;
use Elastica;
use Elastica\Document;
use Elastica\Query;
use Generator;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\LazyCollection;
use Jiminny\Component\ElasticSearch\Client;
use Jiminny\Component\ElasticSearch\Contract\Searchable;
use Jiminny\Component\ElasticSearch\ModelFiller;
use Jiminny\Models\Activity;
/**
* Class Search
*
* @package Jiminny\Component\ElasticSearch\Service
*/
class Search
{
/**
* @var Client
*/
private $client;
/**
* @var ModelFiller\Elastica
*/
private $modelFiller;
public function __construct(Client $client, ModelFiller\Elastica $modelFiller)
{
$this->client = $client;
$this->modelFiller = $modelFiller;
}
public function updateDocument(Searchable $model): self
{
return $this->updateDocumentCollection($model, new Collection([$model]));
}
public function updateDocumentCollection(
Searchable $model,
Collection $collection,
int $chunkSize = 10,
?callable $callback = null,
): self {
if ($collection->count() === 0) {
return $this;
}
$documentType = $this->client->createIndex($model->getIndex());
$collection
->chunk($chunkSize)
->each(static function (Collection $collection) use ($documentType, $callback): void {
$documents = $collection->map(static function (Searchable $model): Document {
return new Document((string) $model->getId(), $model->getIndexableAttributes());
});
$documentType->addDocuments($documents->all());
if ($callback !== null) {
$callback($collection, $documents);
}
gc_collect_cycles();
});
return $this;
}
private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\Search
{
if (request() && request()->has('debug')) {
Log::info('Debug ES query: ', [
'debug' => request()->get('debug'),
'userId' => request()->user()?->id ?? 'anonymous',
'userUuid' => request()->user()?->getIdString() ?? 'anonymous',
'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),
'url' => request()->fullUrl(),
]);
}
return $this->client
->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)
->createSearch($query);
}
public function scroll(Query $query, Searchable|string $model): Elastica\Scroll
{
return new Elastica\Scroll($this->createSearch($query, $model));
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*
* @return LazyCollection<int, Document>
*/
public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection
{
return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {
foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {
foreach ($resultSet->getDocuments() as $document) {
yield $document;
}
}
});
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*/
public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\ResultSet
{
Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);
$before = microtime(true);
$result = $this->createSearch($query, $modelOrIndex)->search();
$after = microtime(true);
Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);
return $result;
}
/**
* @TODO use LazyCollection
*
* @return Collection<int, Activity>
*/
public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection
{
return $this
->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)
->collect();
}
/**
* @return array{totalHits: int, results: Collection<int, Activity>}
*/
public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array
{
$search = $this->search($query, $model, $queryName);
/**
* @TODO Use value-object instead.
*/
return [
'totalHits' => $search->getTotalHits(),
'results' => $this
->hydrateCollection($search->getDocuments(), $model)
->collect(),
];
}
private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection
{
return LazyCollection::make($collection)
->map(function (Document $document) use ($model): Searchable {
return $this->hydrateModel($document, $model);
});
}
private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable
{
$attributes = $document->getData();
$attributes['id'] = $document->getId();
/** @var Searchable&Model */
return $this->modelFiller->newFromBuilderRecursive($model, $attributes);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto...
|
35939
|
NULL
|
NULL
|
NULL
|
|
35938
|
1342
|
22
|
2026-05-13T13:25:00.406069+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778678700406_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhostormVIewINavigareCodeKeractorFV faVsco.js°9 JY PhostormVIewINavigareCodeKeractorFV faVsco.js°9 JY-20891-improve-sms-text-relaysProledey© MailboxController.phpM MakefileJ package-lock.json= phpstan.neon.dist= phpstan-baseline.neon<> phpunit.xmlTaraw_sqL_query.sqMLPEADME mdC) TextRelayService.onp© Sso.phpossocontroller.ong© TextMessa©smsmessage.ong© SmsLength.php© TextRelay.phpService/Search.php x © ActivityStatusin.phpclass SearchM A10 A V< sonar-project.propertiesE test.py‹› Untitea Diagram.Xmiis vetur.config.jsM+ WEBHOOK_FILTERING_IMPLEM› ih External Librariesv E° Scratches and Consolesv C Database ConsolesV AEU& console EUl& DEALRISKS EUIA DI (EU)AEUEUvdiminnv@localhostA console fiminnv@localho# DI lliminnv@localhost4 HS local fiminnv@localhd4 SF [jiminny@localhost]Azoho dev fiminnvalocall• DROn# concole [ROnll# concole 1 [pponlA DI (PRODI› AQAЛAAI› A QAI PRODA STAGINGA console [STAGINGIA console 1 [STAGING]& uranus STAGING> C Extensionsv @ ScratchesEphostorm_shortcuts.txt=° scratch.txt{° scratch_1.ison{° scratch 2 ison<° scratch 3lison125= scratch 4 txtphe scratch 5.ohnphe scratch 6.ohnSscratch 7isonscratch R.isonstaae? ison= toctselt s...iprivate function createSearch(Query $query, Searchable|string $modelOrindex): Elastica \Searchif (request() && request()->has('debug')) {"dehua' => requesto->aet('dehua')'userUuid' => request(->user?->getIdString) ?? 'anonymous','query' => ison_encode(Squery->toArrayOflaas: LISON THROW ON ERROR).'url' => request->fullUrlO,1):— 96recurn schis->cllent-›createIndex( indexName: $model0rIndex instanceof Searchable ? Smodel0rIndex->getIndex() : $model0r 94->createsearch squery)96public function scroll(Query Squery. Searchable|string Smodel): Elastica\Scroll{...}98100* dparam searchablestrino smodelurindex usaoe of model 1s deprecated102* dreturn Lazucollection<int. Document>public function scrolloverDocuments(query Squery, SearchabLe|string SmodeLOrIndex): LazyCollection(...* I105Lix** Aoaran Searchable|strina Snodel0rIndey usage of model is denrecatedT109public function search(Query $query, Searchablelstring $modelOrIndex, ?string $queryName = null): Elastica 11€Datadog::increment( stats: 'jiminny.es.search', sampleRate: 1, ['query' => $queryName ?? "']);—112$before = microtime( as_float: true);Sresult = $this->createSearch($query, Smodel0rIndex)->search0:117Cofton = micnotimed as tloat: true)"Datadog:: timing( stat: "jiminny.es.search.time', (int) (($after - $before) * 1000)sampleRate: 1, ['quer: 120return sresult.• sonnt Keview • In 21m100% L2• Wed 13 May 15:33:40AskJiminnyReportActivityServiceTest v= custom.logscratch. &.ison= laravel.logA SF jiminny@localhost]« HS_local [jiminny@localhost] X console [PROD]cascadeA console (EU]A console [STACINClrial Owner Role SeleRetactoring User EmaDashboard Activity De+0 ..~/Library/Application Support/JetBrains/PhpStorm2026.1/consoles/db/5b1549d5-9876-4d9e-9ce3-025f12a83283/console.sait is there lust didn't include it "tracks"D69.select * from opportunities where team id = 2 and erm providen id TN (1374720564° 1145274235891 1490086191 X565571wsELEcT * FruM opportunity contacts whERE opportunity 1d = '414'*SELECT * FROM opportunity_contacts WHERE crm_provider_id = '131501';select * rrom contacts where 1d in (414. 464)1select * from activities where crm confiquration 1d = 2select settinas from crm conficurations where 1d = 11:Perfect - the activity has both video and audio tracks, so it would pass the ActivityRecorded filter even if appliedselect * From teams: # 1. 2select * from users;select * from crm_configurations where id = 39;select * from team_features where team_id = 2›select * from features;# SELECT * FROM opportunities WHERE crm_configuration_id = 2order by id desc;# and crm_provider_id = '49908861993';|Confirmed Fields (All Pass V)•• status : "failed" - Included in default status filtertype: "conference" - Allowed activity typeVis private : false - Passes privacy filter• V is internal: false - Should be visible• V actual_start_time : "2026-05-12 13:14:08" - Required field existsvtracks: Has video + audio tracks - Passes recorded tilterNext Stens to Deouaselect * from activity providers where id IN (443, 202, 203, 227):Since all fields nass the filters. check these:1. Date Range Selected in Dashboardselect * from activity imports where id = 795889:What date range is the user viewing? The detault is last 90 days. May 12, 2026 should be within range, but verity theselect c.id, c.provider, c.settings, t.* from teams t join crm confiqurations c 1<->1.n: on t.id = c.team_idactual Start date and end date parameters in te dasnooaro recuestwhere c.provider = 'hubspot'2. User/Team ScopeIs user 29089 (Line Kristensen) viewina her own dashboard? Verifv.select * from crm confiqurations crm JOIN teams + 1..n<->1: on crm.team id = t.id• User belonas to team 575 (NationBuilder) 7• User's group (Sales Team) has team_id: 575 VSELE * FROM teamsWHERE 1d = 311SELECT * FROM users WHERE id = 257;opportunities WHERE team 1d = 2• Check it RestrictTeam or RestrictUserGroupScope filters are excluding this3. Sxolicit Filter ValuesCheck if the dashboard request is passing explicit filter values that might exclude this activity, particularly:select * from opportunity_contacts where opportunity_id = 5124;select * fron contacts where id TN (3850.3853. 3851. 4073.4140.4155.4480.4530.4623. 5986. 513. 687. 1806. 1523. 3613) |activity status_values - might be set to only "completed"•only recorded activities - miaht be exolicitly set despite the override4. Actual Elasticsearch Quervselect * from activities where eom confiaunation id = 13.SELECT * FROM activities WHERE uuid_to_bin('826619ce-ec8e-4e59-8467-a01f5f6ad71e') = uuid; # 418141|Add logging in TeamInsightsRepository::getDashboardActivity0verTime to capture the exact Elasticsearch querybeina executed and see why this activitv is excluded!Most likely cause: Either the date range filter is excluding it, or an explicit filter value is being passed that overrides thedefault behavionselect id, team id, crm provider id from crm confiqurations where provider = 'hubspot' and crm provider id IS NOT NULSELECT * FROM accounts WHERE team id = 2 and crm provider id = '1212213464' order by id desc:SSISCT + SP0M contactc WHGPEteam id = 2 and account id = 5189 order by id desc:SELECT * FROM contacts WHERE team id = 2 order by id desc:select * from opportunity contacts where contact id = 6223:SELECT * FROM opportunities WHERE team id = 2 and account id = 5189 order by id desr.al .Ask anvthina (84L)"Code SWF-1.6•0 1.select * from erm profiles where crm confiquration id = 2:WN Windsurf Teams121-1UTF.A...
|
NULL
|
1837425836067260207
|
NULL
|
click
|
ocr
|
NULL
|
PhostormVIewINavigareCodeKeractorFV faVsco.js°9 JY PhostormVIewINavigareCodeKeractorFV faVsco.js°9 JY-20891-improve-sms-text-relaysProledey© MailboxController.phpM MakefileJ package-lock.json= phpstan.neon.dist= phpstan-baseline.neon<> phpunit.xmlTaraw_sqL_query.sqMLPEADME mdC) TextRelayService.onp© Sso.phpossocontroller.ong© TextMessa©smsmessage.ong© SmsLength.php© TextRelay.phpService/Search.php x © ActivityStatusin.phpclass SearchM A10 A V< sonar-project.propertiesE test.py‹› Untitea Diagram.Xmiis vetur.config.jsM+ WEBHOOK_FILTERING_IMPLEM› ih External Librariesv E° Scratches and Consolesv C Database ConsolesV AEU& console EUl& DEALRISKS EUIA DI (EU)AEUEUvdiminnv@localhostA console fiminnv@localho# DI lliminnv@localhost4 HS local fiminnv@localhd4 SF [jiminny@localhost]Azoho dev fiminnvalocall• DROn# concole [ROnll# concole 1 [pponlA DI (PRODI› AQAЛAAI› A QAI PRODA STAGINGA console [STAGINGIA console 1 [STAGING]& uranus STAGING> C Extensionsv @ ScratchesEphostorm_shortcuts.txt=° scratch.txt{° scratch_1.ison{° scratch 2 ison<° scratch 3lison125= scratch 4 txtphe scratch 5.ohnphe scratch 6.ohnSscratch 7isonscratch R.isonstaae? ison= toctselt s...iprivate function createSearch(Query $query, Searchable|string $modelOrindex): Elastica \Searchif (request() && request()->has('debug')) {"dehua' => requesto->aet('dehua')'userUuid' => request(->user?->getIdString) ?? 'anonymous','query' => ison_encode(Squery->toArrayOflaas: LISON THROW ON ERROR).'url' => request->fullUrlO,1):— 96recurn schis->cllent-›createIndex( indexName: $model0rIndex instanceof Searchable ? Smodel0rIndex->getIndex() : $model0r 94->createsearch squery)96public function scroll(Query Squery. Searchable|string Smodel): Elastica\Scroll{...}98100* dparam searchablestrino smodelurindex usaoe of model 1s deprecated102* dreturn Lazucollection<int. Document>public function scrolloverDocuments(query Squery, SearchabLe|string SmodeLOrIndex): LazyCollection(...* I105Lix** Aoaran Searchable|strina Snodel0rIndey usage of model is denrecatedT109public function search(Query $query, Searchablelstring $modelOrIndex, ?string $queryName = null): Elastica 11€Datadog::increment( stats: 'jiminny.es.search', sampleRate: 1, ['query' => $queryName ?? "']);—112$before = microtime( as_float: true);Sresult = $this->createSearch($query, Smodel0rIndex)->search0:117Cofton = micnotimed as tloat: true)"Datadog:: timing( stat: "jiminny.es.search.time', (int) (($after - $before) * 1000)sampleRate: 1, ['quer: 120return sresult.• sonnt Keview • In 21m100% L2• Wed 13 May 15:33:40AskJiminnyReportActivityServiceTest v= custom.logscratch. &.ison= laravel.logA SF jiminny@localhost]« HS_local [jiminny@localhost] X console [PROD]cascadeA console (EU]A console [STACINClrial Owner Role SeleRetactoring User EmaDashboard Activity De+0 ..~/Library/Application Support/JetBrains/PhpStorm2026.1/consoles/db/5b1549d5-9876-4d9e-9ce3-025f12a83283/console.sait is there lust didn't include it "tracks"D69.select * from opportunities where team id = 2 and erm providen id TN (1374720564° 1145274235891 1490086191 X565571wsELEcT * FruM opportunity contacts whERE opportunity 1d = '414'*SELECT * FROM opportunity_contacts WHERE crm_provider_id = '131501';select * rrom contacts where 1d in (414. 464)1select * from activities where crm confiquration 1d = 2select settinas from crm conficurations where 1d = 11:Perfect - the activity has both video and audio tracks, so it would pass the ActivityRecorded filter even if appliedselect * From teams: # 1. 2select * from users;select * from crm_configurations where id = 39;select * from team_features where team_id = 2›select * from features;# SELECT * FROM opportunities WHERE crm_configuration_id = 2order by id desc;# and crm_provider_id = '49908861993';|Confirmed Fields (All Pass V)•• status : "failed" - Included in default status filtertype: "conference" - Allowed activity typeVis private : false - Passes privacy filter• V is internal: false - Should be visible• V actual_start_time : "2026-05-12 13:14:08" - Required field existsvtracks: Has video + audio tracks - Passes recorded tilterNext Stens to Deouaselect * from activity providers where id IN (443, 202, 203, 227):Since all fields nass the filters. check these:1. Date Range Selected in Dashboardselect * from activity imports where id = 795889:What date range is the user viewing? The detault is last 90 days. May 12, 2026 should be within range, but verity theselect c.id, c.provider, c.settings, t.* from teams t join crm confiqurations c 1<->1.n: on t.id = c.team_idactual Start date and end date parameters in te dasnooaro recuestwhere c.provider = 'hubspot'2. User/Team ScopeIs user 29089 (Line Kristensen) viewina her own dashboard? Verifv.select * from crm confiqurations crm JOIN teams + 1..n<->1: on crm.team id = t.id• User belonas to team 575 (NationBuilder) 7• User's group (Sales Team) has team_id: 575 VSELE * FROM teamsWHERE 1d = 311SELECT * FROM users WHERE id = 257;opportunities WHERE team 1d = 2• Check it RestrictTeam or RestrictUserGroupScope filters are excluding this3. Sxolicit Filter ValuesCheck if the dashboard request is passing explicit filter values that might exclude this activity, particularly:select * from opportunity_contacts where opportunity_id = 5124;select * fron contacts where id TN (3850.3853. 3851. 4073.4140.4155.4480.4530.4623. 5986. 513. 687. 1806. 1523. 3613) |activity status_values - might be set to only "completed"•only recorded activities - miaht be exolicitly set despite the override4. Actual Elasticsearch Quervselect * from activities where eom confiaunation id = 13.SELECT * FROM activities WHERE uuid_to_bin('826619ce-ec8e-4e59-8467-a01f5f6ad71e') = uuid; # 418141|Add logging in TeamInsightsRepository::getDashboardActivity0verTime to capture the exact Elasticsearch querybeina executed and see why this activitv is excluded!Most likely cause: Either the date range filter is excluding it, or an explicit filter value is being passed that overrides thedefault behavionselect id, team id, crm provider id from crm confiqurations where provider = 'hubspot' and crm provider id IS NOT NULSELECT * FROM accounts WHERE team id = 2 and crm provider id = '1212213464' order by id desc:SSISCT + SP0M contactc WHGPEteam id = 2 and account id = 5189 order by id desc:SELECT * FROM contacts WHERE team id = 2 order by id desc:select * from opportunity contacts where contact id = 6223:SELECT * FROM opportunities WHERE team id = 2 and account id = 5189 order by id desr.al .Ask anvthina (84L)"Code SWF-1.6•0 1.select * from erm profiles where crm confiquration id = 2:WN Windsurf Teams121-1UTF.A...
|
35936
|
NULL
|
NULL
|
NULL
|
|
35937
|
1341
|
26
|
2026-05-13T13:25:00.401045+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778678700401_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp>0 lыlec2-user@ip-10-30-129-190:~883-zshSprint Review - in 27 mA100% C8• Wed 13 May 15:33:40181DOCKERC *1DEV (docker)Last login: Wed May 13 09:16:21 on ttys010982APP (-zsh)84screenpipe"• ₴5Poetry could not find a pyproject.toml file in /Users/lukas or its parentsPoetry could not find a pyproject.toml file in /Users/lukas or its parentslukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ ssh jiminny-prod-ecs1 -L 7970:vpc-activities7g-t6nxe5qk7zis7pa5i7qlmp3zwm.us-east-2.es.amazonaws.com:80Enter MFA code for arn:aws:iam::438740370364:mfa/[EMAIL]:Warning: Permanently added 'jiminny-prod-ecs1' (ED25519) to the list of known hosts.A newer release of "Amazon Linux" is available.Version 2023.10.20260330:Version 2023.11.20260406:Version 2023.11.20260413:Version 2023.11.20260427:Version 2023.11.20260505:Version 2023.11.20260509:Run "/usr/bin/dnf check-release-update" for full release and version update info#_####_\_#####\\###|\#/v~'Amazon Linux 2023 (ECS Optimized)ec2-user@ip-10-30-129-190:~ (. 26Im/*Fordocumentation,visit [URL_WITH_CREDENTIALS] ~]$ ||...
|
NULL
|
5725358035782193467
|
NULL
|
click
|
ocr
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp>0 lыlec2-user@ip-10-30-129-190:~883-zshSprint Review - in 27 mA100% C8• Wed 13 May 15:33:40181DOCKERC *1DEV (docker)Last login: Wed May 13 09:16:21 on ttys010982APP (-zsh)84screenpipe"• ₴5Poetry could not find a pyproject.toml file in /Users/lukas or its parentsPoetry could not find a pyproject.toml file in /Users/lukas or its parentslukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ ssh jiminny-prod-ecs1 -L 7970:vpc-activities7g-t6nxe5qk7zis7pa5i7qlmp3zwm.us-east-2.es.amazonaws.com:80Enter MFA code for arn:aws:iam::438740370364:mfa/[EMAIL]:Warning: Permanently added 'jiminny-prod-ecs1' (ED25519) to the list of known hosts.A newer release of "Amazon Linux" is available.Version 2023.10.20260330:Version 2023.11.20260406:Version 2023.11.20260413:Version 2023.11.20260427:Version 2023.11.20260505:Version 2023.11.20260509:Run "/usr/bin/dnf check-release-update" for full release and version update info#_####_\_#####\\###|\#/v~'Amazon Linux 2023 (ECS Optimized)ec2-user@ip-10-30-129-190:~ (. 26Im/*Fordocumentation,visit [URL_WITH_CREDENTIALS] ~]$ ||...
|
35935
|
NULL
|
NULL
|
NULL
|
|
35936
|
1342
|
21
|
2026-05-13T13:24:41.457493+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778678681457_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, 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
10
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Component\ElasticSearch\Service;
use ChaseConey\LaravelDatadogHelper\Datadog;
use Elastica;
use Elastica\Document;
use Elastica\Query;
use Generator;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\LazyCollection;
use Jiminny\Component\ElasticSearch\Client;
use Jiminny\Component\ElasticSearch\Contract\Searchable;
use Jiminny\Component\ElasticSearch\ModelFiller;
use Jiminny\Models\Activity;
/**
* Class Search
*
* @package Jiminny\Component\ElasticSearch\Service
*/
class Search
{
/**
* @var Client
*/
private $client;
/**
* @var ModelFiller\Elastica
*/
private $modelFiller;
public function __construct(Client $client, ModelFiller\Elastica $modelFiller)
{
$this->client = $client;
$this->modelFiller = $modelFiller;
}
public function updateDocument(Searchable $model): self
{
return $this->updateDocumentCollection($model, new Collection([$model]));
}
public function updateDocumentCollection(
Searchable $model,
Collection $collection,
int $chunkSize = 10,
?callable $callback = null,
): self {
if ($collection->count() === 0) {
return $this;
}
$documentType = $this->client->createIndex($model->getIndex());
$collection
->chunk($chunkSize)
->each(static function (Collection $collection) use ($documentType, $callback): void {
$documents = $collection->map(static function (Searchable $model): Document {
return new Document((string) $model->getId(), $model->getIndexableAttributes());
});
$documentType->addDocuments($documents->all());
if ($callback !== null) {
$callback($collection, $documents);
}
gc_collect_cycles();
});
return $this;
}
private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\Search
{
if (request() && request()->has('debug')) {
Log::info('Debug ES query: ', [
'debug' => request()->get('debug'),
'userId' => request()->user()?->id ?? 'anonymous',
'userUuid' => request()->user()?->getIdString() ?? 'anonymous',
'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),
'url' => request()->fullUrl(),
]);
}
return $this->client
->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)
->createSearch($query);
}
public function scroll(Query $query, Searchable|string $model): Elastica\Scroll
{
return new Elastica\Scroll($this->createSearch($query, $model));
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*
* @return LazyCollection<int, Document>
*/
public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection
{
return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {
foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {
foreach ($resultSet->getDocuments() as $document) {
yield $document;
}
}
});
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*/
public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\ResultSet
{
Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);
$before = microtime(true);
$result = $this->createSearch($query, $modelOrIndex)->search();
$after = microtime(true);
Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);
return $result;
}
/**
* @TODO use LazyCollection
*
* @return Collection<int, Activity>
*/
public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection
{
return $this
->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)
->collect();
}
/**
* @return array{totalHits: int, results: Collection<int, Activity>}
*/
public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array
{
$search = $this->search($query, $model, $queryName);
/**
* @TODO Use value-object instead.
*/
return [
'totalHits' => $search->getTotalHits(),
'results' => $this
->hydrateCollection($search->getDocuments(), $model)
->collect(),
];
}
private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection
{
return LazyCollection::make($collection)
->map(function (Document $document) use ($model): Searchable {
return $this->hydrateModel($document, $model);
});
}
private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable
{
$attributes = $document->getData();
$attributes['id'] = $document->getId();
/** @var Searchable&Model */
return $this->modelFiller->newFromBuilderRecursive($model, $attributes);
}
}
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
20
1
17
2...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20891-improve-sms-text-relays, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.08843085,"height":0.025538707},"on_screen":true,"help_text":"Git Branch: JY-20891-improve-sms-text-relays","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.8081782,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AskJiminnyReportActivityServiceTest","depth":6,"bounds":{"left":0.8234708,"top":0.019952115,"width":0.09208777,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AskJiminnyReportActivityServiceTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AskJiminnyReportActivityServiceTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10","depth":4,"bounds":{"left":0.38231382,"top":0.17478053,"width":0.009640957,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.39361703,"top":0.17318435,"width":0.00731383,"height":0.018355945},"on_screen":true,"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.40093085,"top":0.17318435,"width":0.006981383,"height":0.018355945},"on_screen":true,"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\\ElasticSearch\\Service;\n\nuse ChaseConey\\LaravelDatadogHelper\\Datadog;\nuse Elastica;\nuse Elastica\\Document;\nuse Elastica\\Query;\nuse Generator;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\Log;\nuse Illuminate\\Support\\LazyCollection;\nuse Jiminny\\Component\\ElasticSearch\\Client;\nuse Jiminny\\Component\\ElasticSearch\\Contract\\Searchable;\nuse Jiminny\\Component\\ElasticSearch\\ModelFiller;\nuse Jiminny\\Models\\Activity;\n\n/**\n * Class Search\n *\n * @package Jiminny\\Component\\ElasticSearch\\Service\n */\nclass Search\n{\n /**\n * @var Client\n */\n private $client;\n\n /**\n * @var ModelFiller\\Elastica\n */\n private $modelFiller;\n\n public function __construct(Client $client, ModelFiller\\Elastica $modelFiller)\n {\n $this->client = $client;\n $this->modelFiller = $modelFiller;\n }\n\n public function updateDocument(Searchable $model): self\n {\n return $this->updateDocumentCollection($model, new Collection([$model]));\n }\n\n public function updateDocumentCollection(\n Searchable $model,\n Collection $collection,\n int $chunkSize = 10,\n ?callable $callback = null,\n ): self {\n if ($collection->count() === 0) {\n return $this;\n }\n\n $documentType = $this->client->createIndex($model->getIndex());\n\n $collection\n ->chunk($chunkSize)\n ->each(static function (Collection $collection) use ($documentType, $callback): void {\n $documents = $collection->map(static function (Searchable $model): Document {\n return new Document((string) $model->getId(), $model->getIndexableAttributes());\n });\n\n $documentType->addDocuments($documents->all());\n\n if ($callback !== null) {\n $callback($collection, $documents);\n }\n\n gc_collect_cycles();\n });\n\n return $this;\n }\n\n private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\\Search\n {\n if (request() && request()->has('debug')) {\n Log::info('Debug ES query: ', [\n 'debug' => request()->get('debug'),\n 'userId' => request()->user()?->id ?? 'anonymous',\n 'userUuid' => request()->user()?->getIdString() ?? 'anonymous',\n 'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),\n 'url' => request()->fullUrl(),\n ]);\n }\n\n return $this->client\n ->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)\n ->createSearch($query);\n }\n\n public function scroll(Query $query, Searchable|string $model): Elastica\\Scroll\n {\n return new Elastica\\Scroll($this->createSearch($query, $model));\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n *\n * @return LazyCollection<int, Document>\n */\n public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection\n {\n return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {\n foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {\n foreach ($resultSet->getDocuments() as $document) {\n yield $document;\n }\n }\n });\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n */\n public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\\ResultSet\n {\n Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);\n\n $before = microtime(true);\n\n $result = $this->createSearch($query, $modelOrIndex)->search();\n\n $after = microtime(true);\n\n Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);\n\n return $result;\n }\n\n /**\n * @TODO use LazyCollection\n *\n * @return Collection<int, Activity>\n */\n public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection\n {\n return $this\n ->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)\n ->collect();\n }\n\n /**\n * @return array{totalHits: int, results: Collection<int, Activity>}\n */\n public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array\n {\n $search = $this->search($query, $model, $queryName);\n\n /**\n * @TODO Use value-object instead.\n */\n return [\n 'totalHits' => $search->getTotalHits(),\n 'results' => $this\n ->hydrateCollection($search->getDocuments(), $model)\n ->collect(),\n ];\n }\n\n private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection\n {\n return LazyCollection::make($collection)\n ->map(function (Document $document) use ($model): Searchable {\n return $this->hydrateModel($document, $model);\n });\n }\n\n private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable\n {\n $attributes = $document->getData();\n $attributes['id'] = $document->getId();\n\n /** @var Searchable&Model */\n return $this->modelFiller->newFromBuilderRecursive($model, $attributes);\n }\n}","depth":4,"on_screen":true,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Component\\ElasticSearch\\Service;\n\nuse ChaseConey\\LaravelDatadogHelper\\Datadog;\nuse Elastica;\nuse Elastica\\Document;\nuse Elastica\\Query;\nuse Generator;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\Log;\nuse Illuminate\\Support\\LazyCollection;\nuse Jiminny\\Component\\ElasticSearch\\Client;\nuse Jiminny\\Component\\ElasticSearch\\Contract\\Searchable;\nuse Jiminny\\Component\\ElasticSearch\\ModelFiller;\nuse Jiminny\\Models\\Activity;\n\n/**\n * Class Search\n *\n * @package Jiminny\\Component\\ElasticSearch\\Service\n */\nclass Search\n{\n /**\n * @var Client\n */\n private $client;\n\n /**\n * @var ModelFiller\\Elastica\n */\n private $modelFiller;\n\n public function __construct(Client $client, ModelFiller\\Elastica $modelFiller)\n {\n $this->client = $client;\n $this->modelFiller = $modelFiller;\n }\n\n public function updateDocument(Searchable $model): self\n {\n return $this->updateDocumentCollection($model, new Collection([$model]));\n }\n\n public function updateDocumentCollection(\n Searchable $model,\n Collection $collection,\n int $chunkSize = 10,\n ?callable $callback = null,\n ): self {\n if ($collection->count() === 0) {\n return $this;\n }\n\n $documentType = $this->client->createIndex($model->getIndex());\n\n $collection\n ->chunk($chunkSize)\n ->each(static function (Collection $collection) use ($documentType, $callback): void {\n $documents = $collection->map(static function (Searchable $model): Document {\n return new Document((string) $model->getId(), $model->getIndexableAttributes());\n });\n\n $documentType->addDocuments($documents->all());\n\n if ($callback !== null) {\n $callback($collection, $documents);\n }\n\n gc_collect_cycles();\n });\n\n return $this;\n }\n\n private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\\Search\n {\n if (request() && request()->has('debug')) {\n Log::info('Debug ES query: ', [\n 'debug' => request()->get('debug'),\n 'userId' => request()->user()?->id ?? 'anonymous',\n 'userUuid' => request()->user()?->getIdString() ?? 'anonymous',\n 'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),\n 'url' => request()->fullUrl(),\n ]);\n }\n\n return $this->client\n ->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)\n ->createSearch($query);\n }\n\n public function scroll(Query $query, Searchable|string $model): Elastica\\Scroll\n {\n return new Elastica\\Scroll($this->createSearch($query, $model));\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n *\n * @return LazyCollection<int, Document>\n */\n public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection\n {\n return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {\n foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {\n foreach ($resultSet->getDocuments() as $document) {\n yield $document;\n }\n }\n });\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n */\n public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\\ResultSet\n {\n Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);\n\n $before = microtime(true);\n\n $result = $this->createSearch($query, $modelOrIndex)->search();\n\n $after = microtime(true);\n\n Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);\n\n return $result;\n }\n\n /**\n * @TODO use LazyCollection\n *\n * @return Collection<int, Activity>\n */\n public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection\n {\n return $this\n ->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)\n ->collect();\n }\n\n /**\n * @return array{totalHits: int, results: Collection<int, Activity>}\n */\n public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array\n {\n $search = $this->search($query, $model, $queryName);\n\n /**\n * @TODO Use value-object instead.\n */\n return [\n 'totalHits' => $search->getTotalHits(),\n 'results' => $this\n ->hydrateCollection($search->getDocuments(), $model)\n ->collect(),\n ];\n }\n\n private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection\n {\n return LazyCollection::make($collection)\n ->map(function (Document $document) use ($model): Searchable {\n return $this->hydrateModel($document, $model);\n });\n }\n\n private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable\n {\n $attributes = $document->getData();\n $attributes['id'] = $document->getId();\n\n /** @var Searchable&Model */\n return $this->modelFiller->newFromBuilderRecursive($model, $attributes);\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.40957448,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"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.41821808,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"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.42918882,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"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.43783244,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"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.44647607,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"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.4574468,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"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.46841756,"top":0.09896249,"width":0.024268618,"height":0.01915403},"on_screen":true,"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.4950133,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"bounds":{"left":0.50598407,"top":0.09896249,"width":0.029587766,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"bounds":{"left":0.7084442,"top":0.09896249,"width":0.02825798,"height":0.01915403},"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"20","depth":4,"bounds":{"left":0.6712101,"top":0.123703115,"width":0.010305851,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"bounds":{"left":0.68351066,"top":0.123703115,"width":0.00731383,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"17","depth":4,"bounds":{"left":0.6928192,"top":0.123703115,"width":0.00930851,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.70412236,"top":0.123703115,"width":0.007978723,"height":0.015163607},"on_screen":true,"role_description":"text"}]...
|
25684516435480125
|
-9033998894274884739
|
click
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, 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
10
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Component\ElasticSearch\Service;
use ChaseConey\LaravelDatadogHelper\Datadog;
use Elastica;
use Elastica\Document;
use Elastica\Query;
use Generator;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\LazyCollection;
use Jiminny\Component\ElasticSearch\Client;
use Jiminny\Component\ElasticSearch\Contract\Searchable;
use Jiminny\Component\ElasticSearch\ModelFiller;
use Jiminny\Models\Activity;
/**
* Class Search
*
* @package Jiminny\Component\ElasticSearch\Service
*/
class Search
{
/**
* @var Client
*/
private $client;
/**
* @var ModelFiller\Elastica
*/
private $modelFiller;
public function __construct(Client $client, ModelFiller\Elastica $modelFiller)
{
$this->client = $client;
$this->modelFiller = $modelFiller;
}
public function updateDocument(Searchable $model): self
{
return $this->updateDocumentCollection($model, new Collection([$model]));
}
public function updateDocumentCollection(
Searchable $model,
Collection $collection,
int $chunkSize = 10,
?callable $callback = null,
): self {
if ($collection->count() === 0) {
return $this;
}
$documentType = $this->client->createIndex($model->getIndex());
$collection
->chunk($chunkSize)
->each(static function (Collection $collection) use ($documentType, $callback): void {
$documents = $collection->map(static function (Searchable $model): Document {
return new Document((string) $model->getId(), $model->getIndexableAttributes());
});
$documentType->addDocuments($documents->all());
if ($callback !== null) {
$callback($collection, $documents);
}
gc_collect_cycles();
});
return $this;
}
private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\Search
{
if (request() && request()->has('debug')) {
Log::info('Debug ES query: ', [
'debug' => request()->get('debug'),
'userId' => request()->user()?->id ?? 'anonymous',
'userUuid' => request()->user()?->getIdString() ?? 'anonymous',
'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),
'url' => request()->fullUrl(),
]);
}
return $this->client
->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)
->createSearch($query);
}
public function scroll(Query $query, Searchable|string $model): Elastica\Scroll
{
return new Elastica\Scroll($this->createSearch($query, $model));
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*
* @return LazyCollection<int, Document>
*/
public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection
{
return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {
foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {
foreach ($resultSet->getDocuments() as $document) {
yield $document;
}
}
});
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*/
public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\ResultSet
{
Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);
$before = microtime(true);
$result = $this->createSearch($query, $modelOrIndex)->search();
$after = microtime(true);
Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);
return $result;
}
/**
* @TODO use LazyCollection
*
* @return Collection<int, Activity>
*/
public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection
{
return $this
->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)
->collect();
}
/**
* @return array{totalHits: int, results: Collection<int, Activity>}
*/
public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array
{
$search = $this->search($query, $model, $queryName);
/**
* @TODO Use value-object instead.
*/
return [
'totalHits' => $search->getTotalHits(),
'results' => $this
->hydrateCollection($search->getDocuments(), $model)
->collect(),
];
}
private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection
{
return LazyCollection::make($collection)
->map(function (Document $document) use ($model): Searchable {
return $this->hydrateModel($document, $model);
});
}
private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable
{
$attributes = $document->getData();
$attributes['id'] = $document->getId();
/** @var Searchable&Model */
return $this->modelFiller->newFromBuilderRecursive($model, $attributes);
}
}
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
20
1
17
2...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
35935
|
1341
|
25
|
2026-05-13T13:24:41.426+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778678681426_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, 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
10
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Component\ElasticSearch\Service;
use ChaseConey\LaravelDatadogHelper\Datadog;
use Elastica;
use Elastica\Document;
use Elastica\Query;
use Generator;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\LazyCollection;
use Jiminny\Component\ElasticSearch\Client;
use Jiminny\Component\ElasticSearch\Contract\Searchable;
use Jiminny\Component\ElasticSearch\ModelFiller;
use Jiminny\Models\Activity;
/**
* Class Search
*
* @package Jiminny\Component\ElasticSearch\Service
*/
class Search
{
/**
* @var Client
*/
private $client;
/**
* @var ModelFiller\Elastica
*/
private $modelFiller;
public function __construct(Client $client, ModelFiller\Elastica $modelFiller)
{
$this->client = $client;
$this->modelFiller = $modelFiller;
}
public function updateDocument(Searchable $model): self
{
return $this->updateDocumentCollection($model, new Collection([$model]));
}
public function updateDocumentCollection(
Searchable $model,
Collection $collection,
int $chunkSize = 10,
?callable $callback = null,
): self {
if ($collection->count() === 0) {
return $this;
}
$documentType = $this->client->createIndex($model->getIndex());
$collection
->chunk($chunkSize)
->each(static function (Collection $collection) use ($documentType, $callback): void {
$documents = $collection->map(static function (Searchable $model): Document {
return new Document((string) $model->getId(), $model->getIndexableAttributes());
});
$documentType->addDocuments($documents->all());
if ($callback !== null) {
$callback($collection, $documents);
}
gc_collect_cycles();
});
return $this;
}
private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\Search
{
if (request() && request()->has('debug')) {
Log::info('Debug ES query: ', [
'debug' => request()->get('debug'),
'userId' => request()->user()?->id ?? 'anonymous',
'userUuid' => request()->user()?->getIdString() ?? 'anonymous',
'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),
'url' => request()->fullUrl(),
]);
}
return $this->client
->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)
->createSearch($query);
}
public function scroll(Query $query, Searchable|string $model): Elastica\Scroll
{
return new Elastica\Scroll($this->createSearch($query, $model));
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*
* @return LazyCollection<int, Document>
*/
public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection
{
return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {
foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {
foreach ($resultSet->getDocuments() as $document) {
yield $document;
}
}
});
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*/
public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\ResultSet
{
Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);
$before = microtime(true);
$result = $this->createSearch($query, $modelOrIndex)->search();
$after = microtime(true);
Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);
return $result;
}
/**
* @TODO use LazyCollection
*
* @return Collection<int, Activity>
*/
public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection
{
return $this
->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)
->collect();
}
/**
* @return array{totalHits: int, results: Collection<int, Activity>}
*/
public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array
{
$search = $this->search($query, $model, $queryName);
/**
* @TODO Use value-object instead.
*/
return [
'totalHits' => $search->getTotalHits(),
'results' => $this
->hydrateCollection($search->getDocuments(), $model)
->collect(),
];
}
private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection
{
return LazyCollection::make($collection)
->map(function (Document $document) use ($model): Searchable {
return $this->hydrateModel($document, $model);
});
}
private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable
{
$attributes = $document->getData();
$attributes['id'] = $document->getId();
/** @var Searchable&Model */
return $this->modelFiller->newFromBuilderRecursive($model, $attributes);
}
}
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
20
1
17
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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
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 * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
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 `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
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;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20891-improve-sms-text-relays, menu","depth":5,"on_screen":true,"help_text":"Git Branch: JY-20891-improve-sms-text-relays","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,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AskJiminnyReportActivityServiceTest","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AskJiminnyReportActivityServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AskJiminnyReportActivityServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"on_screen":true,"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\\ElasticSearch\\Service;\n\nuse ChaseConey\\LaravelDatadogHelper\\Datadog;\nuse Elastica;\nuse Elastica\\Document;\nuse Elastica\\Query;\nuse Generator;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\Log;\nuse Illuminate\\Support\\LazyCollection;\nuse Jiminny\\Component\\ElasticSearch\\Client;\nuse Jiminny\\Component\\ElasticSearch\\Contract\\Searchable;\nuse Jiminny\\Component\\ElasticSearch\\ModelFiller;\nuse Jiminny\\Models\\Activity;\n\n/**\n * Class Search\n *\n * @package Jiminny\\Component\\ElasticSearch\\Service\n */\nclass Search\n{\n /**\n * @var Client\n */\n private $client;\n\n /**\n * @var ModelFiller\\Elastica\n */\n private $modelFiller;\n\n public function __construct(Client $client, ModelFiller\\Elastica $modelFiller)\n {\n $this->client = $client;\n $this->modelFiller = $modelFiller;\n }\n\n public function updateDocument(Searchable $model): self\n {\n return $this->updateDocumentCollection($model, new Collection([$model]));\n }\n\n public function updateDocumentCollection(\n Searchable $model,\n Collection $collection,\n int $chunkSize = 10,\n ?callable $callback = null,\n ): self {\n if ($collection->count() === 0) {\n return $this;\n }\n\n $documentType = $this->client->createIndex($model->getIndex());\n\n $collection\n ->chunk($chunkSize)\n ->each(static function (Collection $collection) use ($documentType, $callback): void {\n $documents = $collection->map(static function (Searchable $model): Document {\n return new Document((string) $model->getId(), $model->getIndexableAttributes());\n });\n\n $documentType->addDocuments($documents->all());\n\n if ($callback !== null) {\n $callback($collection, $documents);\n }\n\n gc_collect_cycles();\n });\n\n return $this;\n }\n\n private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\\Search\n {\n if (request() && request()->has('debug')) {\n Log::info('Debug ES query: ', [\n 'debug' => request()->get('debug'),\n 'userId' => request()->user()?->id ?? 'anonymous',\n 'userUuid' => request()->user()?->getIdString() ?? 'anonymous',\n 'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),\n 'url' => request()->fullUrl(),\n ]);\n }\n\n return $this->client\n ->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)\n ->createSearch($query);\n }\n\n public function scroll(Query $query, Searchable|string $model): Elastica\\Scroll\n {\n return new Elastica\\Scroll($this->createSearch($query, $model));\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n *\n * @return LazyCollection<int, Document>\n */\n public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection\n {\n return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {\n foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {\n foreach ($resultSet->getDocuments() as $document) {\n yield $document;\n }\n }\n });\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n */\n public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\\ResultSet\n {\n Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);\n\n $before = microtime(true);\n\n $result = $this->createSearch($query, $modelOrIndex)->search();\n\n $after = microtime(true);\n\n Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);\n\n return $result;\n }\n\n /**\n * @TODO use LazyCollection\n *\n * @return Collection<int, Activity>\n */\n public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection\n {\n return $this\n ->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)\n ->collect();\n }\n\n /**\n * @return array{totalHits: int, results: Collection<int, Activity>}\n */\n public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array\n {\n $search = $this->search($query, $model, $queryName);\n\n /**\n * @TODO Use value-object instead.\n */\n return [\n 'totalHits' => $search->getTotalHits(),\n 'results' => $this\n ->hydrateCollection($search->getDocuments(), $model)\n ->collect(),\n ];\n }\n\n private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection\n {\n return LazyCollection::make($collection)\n ->map(function (Document $document) use ($model): Searchable {\n return $this->hydrateModel($document, $model);\n });\n }\n\n private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable\n {\n $attributes = $document->getData();\n $attributes['id'] = $document->getId();\n\n /** @var Searchable&Model */\n return $this->modelFiller->newFromBuilderRecursive($model, $attributes);\n }\n}","depth":4,"on_screen":true,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Component\\ElasticSearch\\Service;\n\nuse ChaseConey\\LaravelDatadogHelper\\Datadog;\nuse Elastica;\nuse Elastica\\Document;\nuse Elastica\\Query;\nuse Generator;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\Log;\nuse Illuminate\\Support\\LazyCollection;\nuse Jiminny\\Component\\ElasticSearch\\Client;\nuse Jiminny\\Component\\ElasticSearch\\Contract\\Searchable;\nuse Jiminny\\Component\\ElasticSearch\\ModelFiller;\nuse Jiminny\\Models\\Activity;\n\n/**\n * Class Search\n *\n * @package Jiminny\\Component\\ElasticSearch\\Service\n */\nclass Search\n{\n /**\n * @var Client\n */\n private $client;\n\n /**\n * @var ModelFiller\\Elastica\n */\n private $modelFiller;\n\n public function __construct(Client $client, ModelFiller\\Elastica $modelFiller)\n {\n $this->client = $client;\n $this->modelFiller = $modelFiller;\n }\n\n public function updateDocument(Searchable $model): self\n {\n return $this->updateDocumentCollection($model, new Collection([$model]));\n }\n\n public function updateDocumentCollection(\n Searchable $model,\n Collection $collection,\n int $chunkSize = 10,\n ?callable $callback = null,\n ): self {\n if ($collection->count() === 0) {\n return $this;\n }\n\n $documentType = $this->client->createIndex($model->getIndex());\n\n $collection\n ->chunk($chunkSize)\n ->each(static function (Collection $collection) use ($documentType, $callback): void {\n $documents = $collection->map(static function (Searchable $model): Document {\n return new Document((string) $model->getId(), $model->getIndexableAttributes());\n });\n\n $documentType->addDocuments($documents->all());\n\n if ($callback !== null) {\n $callback($collection, $documents);\n }\n\n gc_collect_cycles();\n });\n\n return $this;\n }\n\n private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\\Search\n {\n if (request() && request()->has('debug')) {\n Log::info('Debug ES query: ', [\n 'debug' => request()->get('debug'),\n 'userId' => request()->user()?->id ?? 'anonymous',\n 'userUuid' => request()->user()?->getIdString() ?? 'anonymous',\n 'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),\n 'url' => request()->fullUrl(),\n ]);\n }\n\n return $this->client\n ->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)\n ->createSearch($query);\n }\n\n public function scroll(Query $query, Searchable|string $model): Elastica\\Scroll\n {\n return new Elastica\\Scroll($this->createSearch($query, $model));\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n *\n * @return LazyCollection<int, Document>\n */\n public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection\n {\n return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {\n foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {\n foreach ($resultSet->getDocuments() as $document) {\n yield $document;\n }\n }\n });\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n */\n public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\\ResultSet\n {\n Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);\n\n $before = microtime(true);\n\n $result = $this->createSearch($query, $modelOrIndex)->search();\n\n $after = microtime(true);\n\n Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);\n\n return $result;\n }\n\n /**\n * @TODO use LazyCollection\n *\n * @return Collection<int, Activity>\n */\n public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection\n {\n return $this\n ->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)\n ->collect();\n }\n\n /**\n * @return array{totalHits: int, results: Collection<int, Activity>}\n */\n public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array\n {\n $search = $this->search($query, $model, $queryName);\n\n /**\n * @TODO Use value-object instead.\n */\n return [\n 'totalHits' => $search->getTotalHits(),\n 'results' => $this\n ->hydrateCollection($search->getDocuments(), $model)\n ->collect(),\n ];\n }\n\n private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection\n {\n return LazyCollection::make($collection)\n ->map(function (Document $document) use ($model): Searchable {\n return $this->hydrateModel($document, $model);\n });\n }\n\n private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable\n {\n $attributes = $document->getData();\n $attributes['id'] = $document->getId();\n\n /** @var Searchable&Model */\n return $this->modelFiller->newFromBuilderRecursive($model, $attributes);\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,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"on_screen":true,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"20","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"17","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"on_screen":true,"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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\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 * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\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 `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\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;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;","depth":4,"on_screen":true,"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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\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 * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\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 `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\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;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
4661973279792415384
|
-7004613034568903091
|
click
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, 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
10
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Component\ElasticSearch\Service;
use ChaseConey\LaravelDatadogHelper\Datadog;
use Elastica;
use Elastica\Document;
use Elastica\Query;
use Generator;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\LazyCollection;
use Jiminny\Component\ElasticSearch\Client;
use Jiminny\Component\ElasticSearch\Contract\Searchable;
use Jiminny\Component\ElasticSearch\ModelFiller;
use Jiminny\Models\Activity;
/**
* Class Search
*
* @package Jiminny\Component\ElasticSearch\Service
*/
class Search
{
/**
* @var Client
*/
private $client;
/**
* @var ModelFiller\Elastica
*/
private $modelFiller;
public function __construct(Client $client, ModelFiller\Elastica $modelFiller)
{
$this->client = $client;
$this->modelFiller = $modelFiller;
}
public function updateDocument(Searchable $model): self
{
return $this->updateDocumentCollection($model, new Collection([$model]));
}
public function updateDocumentCollection(
Searchable $model,
Collection $collection,
int $chunkSize = 10,
?callable $callback = null,
): self {
if ($collection->count() === 0) {
return $this;
}
$documentType = $this->client->createIndex($model->getIndex());
$collection
->chunk($chunkSize)
->each(static function (Collection $collection) use ($documentType, $callback): void {
$documents = $collection->map(static function (Searchable $model): Document {
return new Document((string) $model->getId(), $model->getIndexableAttributes());
});
$documentType->addDocuments($documents->all());
if ($callback !== null) {
$callback($collection, $documents);
}
gc_collect_cycles();
});
return $this;
}
private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\Search
{
if (request() && request()->has('debug')) {
Log::info('Debug ES query: ', [
'debug' => request()->get('debug'),
'userId' => request()->user()?->id ?? 'anonymous',
'userUuid' => request()->user()?->getIdString() ?? 'anonymous',
'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),
'url' => request()->fullUrl(),
]);
}
return $this->client
->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)
->createSearch($query);
}
public function scroll(Query $query, Searchable|string $model): Elastica\Scroll
{
return new Elastica\Scroll($this->createSearch($query, $model));
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*
* @return LazyCollection<int, Document>
*/
public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection
{
return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {
foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {
foreach ($resultSet->getDocuments() as $document) {
yield $document;
}
}
});
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*/
public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\ResultSet
{
Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);
$before = microtime(true);
$result = $this->createSearch($query, $modelOrIndex)->search();
$after = microtime(true);
Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);
return $result;
}
/**
* @TODO use LazyCollection
*
* @return Collection<int, Activity>
*/
public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection
{
return $this
->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)
->collect();
}
/**
* @return array{totalHits: int, results: Collection<int, Activity>}
*/
public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array
{
$search = $this->search($query, $model, $queryName);
/**
* @TODO Use value-object instead.
*/
return [
'totalHits' => $search->getTotalHits(),
'results' => $this
->hydrateCollection($search->getDocuments(), $model)
->collect(),
];
}
private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection
{
return LazyCollection::make($collection)
->map(function (Document $document) use ($model): Searchable {
return $this->hydrateModel($document, $model);
});
}
private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable
{
$attributes = $document->getData();
$attributes['id'] = $document->getId();
/** @var Searchable&Model */
return $this->modelFiller->newFromBuilderRecursive($model, $attributes);
}
}
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
20
1
17
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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
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 * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
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 `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
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;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
35934
|
1342
|
20
|
2026-05-13T13:24:36.174282+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778678676174_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, 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
10
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Component\ElasticSearch\Service;
use ChaseConey\LaravelDatadogHelper\Datadog;
use Elastica;
use Elastica\Document;
use Elastica\Query;
use Generator;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\LazyCollection;
use Jiminny\Component\ElasticSearch\Client;
use Jiminny\Component\ElasticSearch\Contract\Searchable;
use Jiminny\Component\ElasticSearch\ModelFiller;
use Jiminny\Models\Activity;
/**
* Class Search
*
* @package Jiminny\Component\ElasticSearch\Service
*/
class Search
{
/**
* @var Client
*/
private $client;
/**
* @var ModelFiller\Elastica
*/
private $modelFiller;
public function __construct(Client $client, ModelFiller\Elastica $modelFiller)
{
$this->client = $client;
$this->modelFiller = $modelFiller;
}
public function updateDocument(Searchable $model): self
{
return $this->updateDocumentCollection($model, new Collection([$model]));
}
public function updateDocumentCollection(
Searchable $model,
Collection $collection,
int $chunkSize = 10,
?callable $callback = null,
): self {
if ($collection->count() === 0) {
return $this;
}
$documentType = $this->client->createIndex($model->getIndex());
$collection
->chunk($chunkSize)
->each(static function (Collection $collection) use ($documentType, $callback): void {
$documents = $collection->map(static function (Searchable $model): Document {
return new Document((string) $model->getId(), $model->getIndexableAttributes());
});
$documentType->addDocuments($documents->all());
if ($callback !== null) {
$callback($collection, $documents);
}
gc_collect_cycles();
});
return $this;
}
private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\Search
{
if (request() && request()->has('debug')) {
Log::info('Debug ES query: ', [
'debug' => request()->get('debug'),
'userId' => request()->user()?->id ?? 'anonymous',
'userUuid' => request()->user()?->getIdString() ?? 'anonymous',
'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),
'url' => request()->fullUrl(),
]);
}
return $this->client
->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)
->createSearch($query);
}
public function scroll(Query $query, Searchable|string $model): Elastica\Scroll
{
return new Elastica\Scroll($this->createSearch($query, $model));
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*
* @return LazyCollection<int, Document>
*/
public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection
{
return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {
foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {
foreach ($resultSet->getDocuments() as $document) {
yield $document;
}
}
});
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*/
public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\ResultSet
{
Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);
$before = microtime(true);
$result = $this->createSearch($query, $modelOrIndex)->search();
$after = microtime(true);
Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);
return $result;
}
/**
* @TODO use LazyCollection
*
* @return Collection<int, Activity>
*/
public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection
{
return $this
->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)
->collect();
}
/**
* @return array{totalHits: int, results: Collection<int, Activity>}
*/
public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array
{
$search = $this->search($query, $model, $queryName);
/**
* @TODO Use value-object instead.
*/
return [
'totalHits' => $search->getTotalHits(),
'results' => $this
->hydrateCollection($search->getDocuments(), $model)
->collect(),
];
}
private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection
{
return LazyCollection::make($collection)
->map(function (Document $document) use ($model): Searchable {
return $this->hydrateModel($document, $model);
});
}
private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable
{
$attributes = $document->getData();
$attributes['id'] = $document->getId();
/** @var Searchable&Model */
return $this->modelFiller->newFromBuilderRecursive($model, $attributes);
}
}
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
20
1
17
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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
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 * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
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 `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
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;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20891-improve-sms-text-relays, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.08843085,"height":0.025538707},"on_screen":true,"help_text":"Git Branch: JY-20891-improve-sms-text-relays","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.8081782,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AskJiminnyReportActivityServiceTest","depth":6,"bounds":{"left":0.8234708,"top":0.019952115,"width":0.09208777,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AskJiminnyReportActivityServiceTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AskJiminnyReportActivityServiceTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10","depth":4,"bounds":{"left":0.38231382,"top":0.17478053,"width":0.009640957,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.39361703,"top":0.17318435,"width":0.00731383,"height":0.018355945},"on_screen":true,"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.40093085,"top":0.17318435,"width":0.006981383,"height":0.018355945},"on_screen":true,"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\\ElasticSearch\\Service;\n\nuse ChaseConey\\LaravelDatadogHelper\\Datadog;\nuse Elastica;\nuse Elastica\\Document;\nuse Elastica\\Query;\nuse Generator;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\Log;\nuse Illuminate\\Support\\LazyCollection;\nuse Jiminny\\Component\\ElasticSearch\\Client;\nuse Jiminny\\Component\\ElasticSearch\\Contract\\Searchable;\nuse Jiminny\\Component\\ElasticSearch\\ModelFiller;\nuse Jiminny\\Models\\Activity;\n\n/**\n * Class Search\n *\n * @package Jiminny\\Component\\ElasticSearch\\Service\n */\nclass Search\n{\n /**\n * @var Client\n */\n private $client;\n\n /**\n * @var ModelFiller\\Elastica\n */\n private $modelFiller;\n\n public function __construct(Client $client, ModelFiller\\Elastica $modelFiller)\n {\n $this->client = $client;\n $this->modelFiller = $modelFiller;\n }\n\n public function updateDocument(Searchable $model): self\n {\n return $this->updateDocumentCollection($model, new Collection([$model]));\n }\n\n public function updateDocumentCollection(\n Searchable $model,\n Collection $collection,\n int $chunkSize = 10,\n ?callable $callback = null,\n ): self {\n if ($collection->count() === 0) {\n return $this;\n }\n\n $documentType = $this->client->createIndex($model->getIndex());\n\n $collection\n ->chunk($chunkSize)\n ->each(static function (Collection $collection) use ($documentType, $callback): void {\n $documents = $collection->map(static function (Searchable $model): Document {\n return new Document((string) $model->getId(), $model->getIndexableAttributes());\n });\n\n $documentType->addDocuments($documents->all());\n\n if ($callback !== null) {\n $callback($collection, $documents);\n }\n\n gc_collect_cycles();\n });\n\n return $this;\n }\n\n private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\\Search\n {\n if (request() && request()->has('debug')) {\n Log::info('Debug ES query: ', [\n 'debug' => request()->get('debug'),\n 'userId' => request()->user()?->id ?? 'anonymous',\n 'userUuid' => request()->user()?->getIdString() ?? 'anonymous',\n 'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),\n 'url' => request()->fullUrl(),\n ]);\n }\n\n return $this->client\n ->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)\n ->createSearch($query);\n }\n\n public function scroll(Query $query, Searchable|string $model): Elastica\\Scroll\n {\n return new Elastica\\Scroll($this->createSearch($query, $model));\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n *\n * @return LazyCollection<int, Document>\n */\n public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection\n {\n return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {\n foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {\n foreach ($resultSet->getDocuments() as $document) {\n yield $document;\n }\n }\n });\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n */\n public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\\ResultSet\n {\n Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);\n\n $before = microtime(true);\n\n $result = $this->createSearch($query, $modelOrIndex)->search();\n\n $after = microtime(true);\n\n Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);\n\n return $result;\n }\n\n /**\n * @TODO use LazyCollection\n *\n * @return Collection<int, Activity>\n */\n public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection\n {\n return $this\n ->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)\n ->collect();\n }\n\n /**\n * @return array{totalHits: int, results: Collection<int, Activity>}\n */\n public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array\n {\n $search = $this->search($query, $model, $queryName);\n\n /**\n * @TODO Use value-object instead.\n */\n return [\n 'totalHits' => $search->getTotalHits(),\n 'results' => $this\n ->hydrateCollection($search->getDocuments(), $model)\n ->collect(),\n ];\n }\n\n private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection\n {\n return LazyCollection::make($collection)\n ->map(function (Document $document) use ($model): Searchable {\n return $this->hydrateModel($document, $model);\n });\n }\n\n private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable\n {\n $attributes = $document->getData();\n $attributes['id'] = $document->getId();\n\n /** @var Searchable&Model */\n return $this->modelFiller->newFromBuilderRecursive($model, $attributes);\n }\n}","depth":4,"on_screen":true,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Component\\ElasticSearch\\Service;\n\nuse ChaseConey\\LaravelDatadogHelper\\Datadog;\nuse Elastica;\nuse Elastica\\Document;\nuse Elastica\\Query;\nuse Generator;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\Log;\nuse Illuminate\\Support\\LazyCollection;\nuse Jiminny\\Component\\ElasticSearch\\Client;\nuse Jiminny\\Component\\ElasticSearch\\Contract\\Searchable;\nuse Jiminny\\Component\\ElasticSearch\\ModelFiller;\nuse Jiminny\\Models\\Activity;\n\n/**\n * Class Search\n *\n * @package Jiminny\\Component\\ElasticSearch\\Service\n */\nclass Search\n{\n /**\n * @var Client\n */\n private $client;\n\n /**\n * @var ModelFiller\\Elastica\n */\n private $modelFiller;\n\n public function __construct(Client $client, ModelFiller\\Elastica $modelFiller)\n {\n $this->client = $client;\n $this->modelFiller = $modelFiller;\n }\n\n public function updateDocument(Searchable $model): self\n {\n return $this->updateDocumentCollection($model, new Collection([$model]));\n }\n\n public function updateDocumentCollection(\n Searchable $model,\n Collection $collection,\n int $chunkSize = 10,\n ?callable $callback = null,\n ): self {\n if ($collection->count() === 0) {\n return $this;\n }\n\n $documentType = $this->client->createIndex($model->getIndex());\n\n $collection\n ->chunk($chunkSize)\n ->each(static function (Collection $collection) use ($documentType, $callback): void {\n $documents = $collection->map(static function (Searchable $model): Document {\n return new Document((string) $model->getId(), $model->getIndexableAttributes());\n });\n\n $documentType->addDocuments($documents->all());\n\n if ($callback !== null) {\n $callback($collection, $documents);\n }\n\n gc_collect_cycles();\n });\n\n return $this;\n }\n\n private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\\Search\n {\n if (request() && request()->has('debug')) {\n Log::info('Debug ES query: ', [\n 'debug' => request()->get('debug'),\n 'userId' => request()->user()?->id ?? 'anonymous',\n 'userUuid' => request()->user()?->getIdString() ?? 'anonymous',\n 'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),\n 'url' => request()->fullUrl(),\n ]);\n }\n\n return $this->client\n ->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)\n ->createSearch($query);\n }\n\n public function scroll(Query $query, Searchable|string $model): Elastica\\Scroll\n {\n return new Elastica\\Scroll($this->createSearch($query, $model));\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n *\n * @return LazyCollection<int, Document>\n */\n public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection\n {\n return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {\n foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {\n foreach ($resultSet->getDocuments() as $document) {\n yield $document;\n }\n }\n });\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n */\n public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\\ResultSet\n {\n Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);\n\n $before = microtime(true);\n\n $result = $this->createSearch($query, $modelOrIndex)->search();\n\n $after = microtime(true);\n\n Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);\n\n return $result;\n }\n\n /**\n * @TODO use LazyCollection\n *\n * @return Collection<int, Activity>\n */\n public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection\n {\n return $this\n ->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)\n ->collect();\n }\n\n /**\n * @return array{totalHits: int, results: Collection<int, Activity>}\n */\n public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array\n {\n $search = $this->search($query, $model, $queryName);\n\n /**\n * @TODO Use value-object instead.\n */\n return [\n 'totalHits' => $search->getTotalHits(),\n 'results' => $this\n ->hydrateCollection($search->getDocuments(), $model)\n ->collect(),\n ];\n }\n\n private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection\n {\n return LazyCollection::make($collection)\n ->map(function (Document $document) use ($model): Searchable {\n return $this->hydrateModel($document, $model);\n });\n }\n\n private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable\n {\n $attributes = $document->getData();\n $attributes['id'] = $document->getId();\n\n /** @var Searchable&Model */\n return $this->modelFiller->newFromBuilderRecursive($model, $attributes);\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.40957448,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"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.41821808,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"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.42918882,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"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.43783244,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"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.44647607,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"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.4574468,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"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.46841756,"top":0.09896249,"width":0.024268618,"height":0.01915403},"on_screen":true,"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.4950133,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"bounds":{"left":0.50598407,"top":0.09896249,"width":0.029587766,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"bounds":{"left":0.7084442,"top":0.09896249,"width":0.02825798,"height":0.01915403},"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"20","depth":4,"bounds":{"left":0.6712101,"top":0.123703115,"width":0.010305851,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"bounds":{"left":0.68351066,"top":0.123703115,"width":0.00731383,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"17","depth":4,"bounds":{"left":0.6928192,"top":0.123703115,"width":0.00930851,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.70412236,"top":0.123703115,"width":0.007978723,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"bounds":{"left":0.7140958,"top":0.123703115,"width":0.007978723,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.7237367,"top":0.12210695,"width":0.00731383,"height":0.018355945},"on_screen":true,"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.73105055,"top":0.12210695,"width":0.006981383,"height":0.018355945},"on_screen":true,"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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\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 * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\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 `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\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;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;","depth":4,"on_screen":true,"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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\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 * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\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 `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\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;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"on_screen":false,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.011968086,"top":0.047885075,"width":0.024268618,"height":0.024740623},"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
7644424702618419
|
-7004613033495161267
|
click
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, 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
10
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Component\ElasticSearch\Service;
use ChaseConey\LaravelDatadogHelper\Datadog;
use Elastica;
use Elastica\Document;
use Elastica\Query;
use Generator;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\LazyCollection;
use Jiminny\Component\ElasticSearch\Client;
use Jiminny\Component\ElasticSearch\Contract\Searchable;
use Jiminny\Component\ElasticSearch\ModelFiller;
use Jiminny\Models\Activity;
/**
* Class Search
*
* @package Jiminny\Component\ElasticSearch\Service
*/
class Search
{
/**
* @var Client
*/
private $client;
/**
* @var ModelFiller\Elastica
*/
private $modelFiller;
public function __construct(Client $client, ModelFiller\Elastica $modelFiller)
{
$this->client = $client;
$this->modelFiller = $modelFiller;
}
public function updateDocument(Searchable $model): self
{
return $this->updateDocumentCollection($model, new Collection([$model]));
}
public function updateDocumentCollection(
Searchable $model,
Collection $collection,
int $chunkSize = 10,
?callable $callback = null,
): self {
if ($collection->count() === 0) {
return $this;
}
$documentType = $this->client->createIndex($model->getIndex());
$collection
->chunk($chunkSize)
->each(static function (Collection $collection) use ($documentType, $callback): void {
$documents = $collection->map(static function (Searchable $model): Document {
return new Document((string) $model->getId(), $model->getIndexableAttributes());
});
$documentType->addDocuments($documents->all());
if ($callback !== null) {
$callback($collection, $documents);
}
gc_collect_cycles();
});
return $this;
}
private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\Search
{
if (request() && request()->has('debug')) {
Log::info('Debug ES query: ', [
'debug' => request()->get('debug'),
'userId' => request()->user()?->id ?? 'anonymous',
'userUuid' => request()->user()?->getIdString() ?? 'anonymous',
'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),
'url' => request()->fullUrl(),
]);
}
return $this->client
->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)
->createSearch($query);
}
public function scroll(Query $query, Searchable|string $model): Elastica\Scroll
{
return new Elastica\Scroll($this->createSearch($query, $model));
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*
* @return LazyCollection<int, Document>
*/
public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection
{
return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {
foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {
foreach ($resultSet->getDocuments() as $document) {
yield $document;
}
}
});
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*/
public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\ResultSet
{
Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);
$before = microtime(true);
$result = $this->createSearch($query, $modelOrIndex)->search();
$after = microtime(true);
Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);
return $result;
}
/**
* @TODO use LazyCollection
*
* @return Collection<int, Activity>
*/
public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection
{
return $this
->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)
->collect();
}
/**
* @return array{totalHits: int, results: Collection<int, Activity>}
*/
public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array
{
$search = $this->search($query, $model, $queryName);
/**
* @TODO Use value-object instead.
*/
return [
'totalHits' => $search->getTotalHits(),
'results' => $this
->hydrateCollection($search->getDocuments(), $model)
->collect(),
];
}
private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection
{
return LazyCollection::make($collection)
->map(function (Document $document) use ($model): Searchable {
return $this->hydrateModel($document, $model);
});
}
private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable
{
$attributes = $document->getData();
$attributes['id'] = $document->getId();
/** @var Searchable&Model */
return $this->modelFiller->newFromBuilderRecursive($model, $attributes);
}
}
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
20
1
17
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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
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 * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
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 `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
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;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
35932
|
NULL
|
NULL
|
NULL
|
|
35933
|
1341
|
24
|
2026-05-13T13:24:36.177013+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778678676177_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, 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
10
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Component\ElasticSearch\Service;
use ChaseConey\LaravelDatadogHelper\Datadog;
use Elastica;
use Elastica\Document;
use Elastica\Query;
use Generator;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\LazyCollection;
use Jiminny\Component\ElasticSearch\Client;
use Jiminny\Component\ElasticSearch\Contract\Searchable;
use Jiminny\Component\ElasticSearch\ModelFiller;
use Jiminny\Models\Activity;
/**
* Class Search
*
* @package Jiminny\Component\ElasticSearch\Service
*/
class Search
{
/**
* @var Client
*/
private $client;
/**
* @var ModelFiller\Elastica
*/
private $modelFiller;
public function __construct(Client $client, ModelFiller\Elastica $modelFiller)
{
$this->client = $client;
$this->modelFiller = $modelFiller;
}
public function updateDocument(Searchable $model): self
{
return $this->updateDocumentCollection($model, new Collection([$model]));
}
public function updateDocumentCollection(
Searchable $model,
Collection $collection,
int $chunkSize = 10,
?callable $callback = null,
): self {
if ($collection->count() === 0) {
return $this;
}
$documentType = $this->client->createIndex($model->getIndex());
$collection
->chunk($chunkSize)
->each(static function (Collection $collection) use ($documentType, $callback): void {
$documents = $collection->map(static function (Searchable $model): Document {
return new Document((string) $model->getId(), $model->getIndexableAttributes());
});
$documentType->addDocuments($documents->all());
if ($callback !== null) {
$callback($collection, $documents);
}
gc_collect_cycles();
});
return $this;
}
private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\Search
{
if (request() && request()->has('debug')) {
Log::info('Debug ES query: ', [
'debug' => request()->get('debug'),
'userId' => request()->user()?->id ?? 'anonymous',
'userUuid' => request()->user()?->getIdString() ?? 'anonymous',
'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),
'url' => request()->fullUrl(),
]);
}
return $this->client
->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)
->createSearch($query);
}
public function scroll(Query $query, Searchable|string $model): Elastica\Scroll
{
return new Elastica\Scroll($this->createSearch($query, $model));
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*
* @return LazyCollection<int, Document>
*/
public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection
{
return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {
foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {
foreach ($resultSet->getDocuments() as $document) {
yield $document;
}
}
});
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*/
public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\ResultSet
{
Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);
$before = microtime(true);
$result = $this->createSearch($query, $modelOrIndex)->search();
$after = microtime(true);
Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);
return $result;
}
/**
* @TODO use LazyCollection
*
* @return Collection<int, Activity>
*/
public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection
{
return $this
->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)
->collect();
}
/**
* @return array{totalHits: int, results: Collection<int, Activity>}
*/
public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array
{
$search = $this->search($query, $model, $queryName);
/**
* @TODO Use value-object instead.
*/
return [
'totalHits' => $search->getTotalHits(),
'results' => $this
->hydrateCollection($search->getDocuments(), $model)
->collect(),
];
}
private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection
{
return LazyCollection::make($collection)
->map(function (Document $document) use ($model): Searchable {
return $this->hydrateModel($document, $model);
});
}
private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable
{
$attributes = $document->getData();
$attributes['id'] = $document->getId();
/** @var Searchable&Model */
return $this->modelFiller->newFromBuilderRecursive($model, $attributes);
}
}
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
20
1
17
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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
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 * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
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 `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
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;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20891-improve-sms-text-relays, menu","depth":5,"on_screen":true,"help_text":"Git Branch: JY-20891-improve-sms-text-relays","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,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AskJiminnyReportActivityServiceTest","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AskJiminnyReportActivityServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AskJiminnyReportActivityServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"on_screen":true,"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\\ElasticSearch\\Service;\n\nuse ChaseConey\\LaravelDatadogHelper\\Datadog;\nuse Elastica;\nuse Elastica\\Document;\nuse Elastica\\Query;\nuse Generator;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\Log;\nuse Illuminate\\Support\\LazyCollection;\nuse Jiminny\\Component\\ElasticSearch\\Client;\nuse Jiminny\\Component\\ElasticSearch\\Contract\\Searchable;\nuse Jiminny\\Component\\ElasticSearch\\ModelFiller;\nuse Jiminny\\Models\\Activity;\n\n/**\n * Class Search\n *\n * @package Jiminny\\Component\\ElasticSearch\\Service\n */\nclass Search\n{\n /**\n * @var Client\n */\n private $client;\n\n /**\n * @var ModelFiller\\Elastica\n */\n private $modelFiller;\n\n public function __construct(Client $client, ModelFiller\\Elastica $modelFiller)\n {\n $this->client = $client;\n $this->modelFiller = $modelFiller;\n }\n\n public function updateDocument(Searchable $model): self\n {\n return $this->updateDocumentCollection($model, new Collection([$model]));\n }\n\n public function updateDocumentCollection(\n Searchable $model,\n Collection $collection,\n int $chunkSize = 10,\n ?callable $callback = null,\n ): self {\n if ($collection->count() === 0) {\n return $this;\n }\n\n $documentType = $this->client->createIndex($model->getIndex());\n\n $collection\n ->chunk($chunkSize)\n ->each(static function (Collection $collection) use ($documentType, $callback): void {\n $documents = $collection->map(static function (Searchable $model): Document {\n return new Document((string) $model->getId(), $model->getIndexableAttributes());\n });\n\n $documentType->addDocuments($documents->all());\n\n if ($callback !== null) {\n $callback($collection, $documents);\n }\n\n gc_collect_cycles();\n });\n\n return $this;\n }\n\n private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\\Search\n {\n if (request() && request()->has('debug')) {\n Log::info('Debug ES query: ', [\n 'debug' => request()->get('debug'),\n 'userId' => request()->user()?->id ?? 'anonymous',\n 'userUuid' => request()->user()?->getIdString() ?? 'anonymous',\n 'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),\n 'url' => request()->fullUrl(),\n ]);\n }\n\n return $this->client\n ->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)\n ->createSearch($query);\n }\n\n public function scroll(Query $query, Searchable|string $model): Elastica\\Scroll\n {\n return new Elastica\\Scroll($this->createSearch($query, $model));\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n *\n * @return LazyCollection<int, Document>\n */\n public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection\n {\n return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {\n foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {\n foreach ($resultSet->getDocuments() as $document) {\n yield $document;\n }\n }\n });\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n */\n public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\\ResultSet\n {\n Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);\n\n $before = microtime(true);\n\n $result = $this->createSearch($query, $modelOrIndex)->search();\n\n $after = microtime(true);\n\n Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);\n\n return $result;\n }\n\n /**\n * @TODO use LazyCollection\n *\n * @return Collection<int, Activity>\n */\n public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection\n {\n return $this\n ->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)\n ->collect();\n }\n\n /**\n * @return array{totalHits: int, results: Collection<int, Activity>}\n */\n public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array\n {\n $search = $this->search($query, $model, $queryName);\n\n /**\n * @TODO Use value-object instead.\n */\n return [\n 'totalHits' => $search->getTotalHits(),\n 'results' => $this\n ->hydrateCollection($search->getDocuments(), $model)\n ->collect(),\n ];\n }\n\n private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection\n {\n return LazyCollection::make($collection)\n ->map(function (Document $document) use ($model): Searchable {\n return $this->hydrateModel($document, $model);\n });\n }\n\n private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable\n {\n $attributes = $document->getData();\n $attributes['id'] = $document->getId();\n\n /** @var Searchable&Model */\n return $this->modelFiller->newFromBuilderRecursive($model, $attributes);\n }\n}","depth":4,"on_screen":true,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Component\\ElasticSearch\\Service;\n\nuse ChaseConey\\LaravelDatadogHelper\\Datadog;\nuse Elastica;\nuse Elastica\\Document;\nuse Elastica\\Query;\nuse Generator;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\Log;\nuse Illuminate\\Support\\LazyCollection;\nuse Jiminny\\Component\\ElasticSearch\\Client;\nuse Jiminny\\Component\\ElasticSearch\\Contract\\Searchable;\nuse Jiminny\\Component\\ElasticSearch\\ModelFiller;\nuse Jiminny\\Models\\Activity;\n\n/**\n * Class Search\n *\n * @package Jiminny\\Component\\ElasticSearch\\Service\n */\nclass Search\n{\n /**\n * @var Client\n */\n private $client;\n\n /**\n * @var ModelFiller\\Elastica\n */\n private $modelFiller;\n\n public function __construct(Client $client, ModelFiller\\Elastica $modelFiller)\n {\n $this->client = $client;\n $this->modelFiller = $modelFiller;\n }\n\n public function updateDocument(Searchable $model): self\n {\n return $this->updateDocumentCollection($model, new Collection([$model]));\n }\n\n public function updateDocumentCollection(\n Searchable $model,\n Collection $collection,\n int $chunkSize = 10,\n ?callable $callback = null,\n ): self {\n if ($collection->count() === 0) {\n return $this;\n }\n\n $documentType = $this->client->createIndex($model->getIndex());\n\n $collection\n ->chunk($chunkSize)\n ->each(static function (Collection $collection) use ($documentType, $callback): void {\n $documents = $collection->map(static function (Searchable $model): Document {\n return new Document((string) $model->getId(), $model->getIndexableAttributes());\n });\n\n $documentType->addDocuments($documents->all());\n\n if ($callback !== null) {\n $callback($collection, $documents);\n }\n\n gc_collect_cycles();\n });\n\n return $this;\n }\n\n private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\\Search\n {\n if (request() && request()->has('debug')) {\n Log::info('Debug ES query: ', [\n 'debug' => request()->get('debug'),\n 'userId' => request()->user()?->id ?? 'anonymous',\n 'userUuid' => request()->user()?->getIdString() ?? 'anonymous',\n 'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),\n 'url' => request()->fullUrl(),\n ]);\n }\n\n return $this->client\n ->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)\n ->createSearch($query);\n }\n\n public function scroll(Query $query, Searchable|string $model): Elastica\\Scroll\n {\n return new Elastica\\Scroll($this->createSearch($query, $model));\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n *\n * @return LazyCollection<int, Document>\n */\n public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection\n {\n return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {\n foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {\n foreach ($resultSet->getDocuments() as $document) {\n yield $document;\n }\n }\n });\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n */\n public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\\ResultSet\n {\n Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);\n\n $before = microtime(true);\n\n $result = $this->createSearch($query, $modelOrIndex)->search();\n\n $after = microtime(true);\n\n Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);\n\n return $result;\n }\n\n /**\n * @TODO use LazyCollection\n *\n * @return Collection<int, Activity>\n */\n public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection\n {\n return $this\n ->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)\n ->collect();\n }\n\n /**\n * @return array{totalHits: int, results: Collection<int, Activity>}\n */\n public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array\n {\n $search = $this->search($query, $model, $queryName);\n\n /**\n * @TODO Use value-object instead.\n */\n return [\n 'totalHits' => $search->getTotalHits(),\n 'results' => $this\n ->hydrateCollection($search->getDocuments(), $model)\n ->collect(),\n ];\n }\n\n private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection\n {\n return LazyCollection::make($collection)\n ->map(function (Document $document) use ($model): Searchable {\n return $this->hydrateModel($document, $model);\n });\n }\n\n private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable\n {\n $attributes = $document->getData();\n $attributes['id'] = $document->getId();\n\n /** @var Searchable&Model */\n return $this->modelFiller->newFromBuilderRecursive($model, $attributes);\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,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"on_screen":true,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"20","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"17","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"on_screen":true,"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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\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 * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\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 `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\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;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;","depth":4,"on_screen":true,"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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\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 * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\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 `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\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;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"on_screen":false,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
7644424702618419
|
-7004613033495161267
|
click
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, 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
10
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Component\ElasticSearch\Service;
use ChaseConey\LaravelDatadogHelper\Datadog;
use Elastica;
use Elastica\Document;
use Elastica\Query;
use Generator;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\LazyCollection;
use Jiminny\Component\ElasticSearch\Client;
use Jiminny\Component\ElasticSearch\Contract\Searchable;
use Jiminny\Component\ElasticSearch\ModelFiller;
use Jiminny\Models\Activity;
/**
* Class Search
*
* @package Jiminny\Component\ElasticSearch\Service
*/
class Search
{
/**
* @var Client
*/
private $client;
/**
* @var ModelFiller\Elastica
*/
private $modelFiller;
public function __construct(Client $client, ModelFiller\Elastica $modelFiller)
{
$this->client = $client;
$this->modelFiller = $modelFiller;
}
public function updateDocument(Searchable $model): self
{
return $this->updateDocumentCollection($model, new Collection([$model]));
}
public function updateDocumentCollection(
Searchable $model,
Collection $collection,
int $chunkSize = 10,
?callable $callback = null,
): self {
if ($collection->count() === 0) {
return $this;
}
$documentType = $this->client->createIndex($model->getIndex());
$collection
->chunk($chunkSize)
->each(static function (Collection $collection) use ($documentType, $callback): void {
$documents = $collection->map(static function (Searchable $model): Document {
return new Document((string) $model->getId(), $model->getIndexableAttributes());
});
$documentType->addDocuments($documents->all());
if ($callback !== null) {
$callback($collection, $documents);
}
gc_collect_cycles();
});
return $this;
}
private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\Search
{
if (request() && request()->has('debug')) {
Log::info('Debug ES query: ', [
'debug' => request()->get('debug'),
'userId' => request()->user()?->id ?? 'anonymous',
'userUuid' => request()->user()?->getIdString() ?? 'anonymous',
'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),
'url' => request()->fullUrl(),
]);
}
return $this->client
->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)
->createSearch($query);
}
public function scroll(Query $query, Searchable|string $model): Elastica\Scroll
{
return new Elastica\Scroll($this->createSearch($query, $model));
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*
* @return LazyCollection<int, Document>
*/
public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection
{
return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {
foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {
foreach ($resultSet->getDocuments() as $document) {
yield $document;
}
}
});
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*/
public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\ResultSet
{
Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);
$before = microtime(true);
$result = $this->createSearch($query, $modelOrIndex)->search();
$after = microtime(true);
Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);
return $result;
}
/**
* @TODO use LazyCollection
*
* @return Collection<int, Activity>
*/
public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection
{
return $this
->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)
->collect();
}
/**
* @return array{totalHits: int, results: Collection<int, Activity>}
*/
public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array
{
$search = $this->search($query, $model, $queryName);
/**
* @TODO Use value-object instead.
*/
return [
'totalHits' => $search->getTotalHits(),
'results' => $this
->hydrateCollection($search->getDocuments(), $model)
->collect(),
];
}
private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection
{
return LazyCollection::make($collection)
->map(function (Document $document) use ($model): Searchable {
return $this->hydrateModel($document, $model);
});
}
private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable
{
$attributes = $document->getData();
$attributes['id'] = $document->getId();
/** @var Searchable&Model */
return $this->modelFiller->newFromBuilderRecursive($model, $attributes);
}
}
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
20
1
17
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 activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
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 * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
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 `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
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;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
35931
|
NULL
|
NULL
|
NULL
|
|
35932
|
1342
|
19
|
2026-05-13T13:24:33.619347+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778678673619_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, 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
10
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Component\ElasticSearch\Service;
use ChaseConey\LaravelDatadogHelper\Datadog;
use Elastica;
use Elastica\Document;
use Elastica\Query;
use Generator;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\LazyCollection;
use Jiminny\Component\ElasticSearch\Client;
use Jiminny\Component\ElasticSearch\Contract\Searchable;
use Jiminny\Component\ElasticSearch\ModelFiller;
use Jiminny\Models\Activity;
/**
* Class Search
*
* @package Jiminny\Component\ElasticSearch\Service
*/
class Search
{
/**
* @var Client
*/
private $client;
/**
* @var ModelFiller\Elastica
*/
private $modelFiller;
public function __construct(Client $client, ModelFiller\Elastica $modelFiller)
{
$this->client = $client;
$this->modelFiller = $modelFiller;
}
public function updateDocument(Searchable $model): self
{
return $this->updateDocumentCollection($model, new Collection([$model]));
}
public function updateDocumentCollection(
Searchable $model,
Collection $collection,
int $chunkSize = 10,
?callable $callback = null,
): self {
if ($collection->count() === 0) {
return $this;
}
$documentType = $this->client->createIndex($model->getIndex());
$collection
->chunk($chunkSize)
->each(static function (Collection $collection) use ($documentType, $callback): void {
$documents = $collection->map(static function (Searchable $model): Document {
return new Document((string) $model->getId(), $model->getIndexableAttributes());
});
$documentType->addDocuments($documents->all());
if ($callback !== null) {
$callback($collection, $documents);
}
gc_collect_cycles();
});
return $this;
}
private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\Search
{
if (request() && request()->has('debug')) {
Log::info('Debug ES query: ', [
'debug' => request()->get('debug'),
'userId' => request()->user()?->id ?? 'anonymous',
'userUuid' => request()->user()?->getIdString() ?? 'anonymous',
'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),
'url' => request()->fullUrl(),
]);
}
return $this->client
->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)
->createSearch($query);
}
public function scroll(Query $query, Searchable|string $model): Elastica\Scroll
{
return new Elastica\Scroll($this->createSearch($query, $model));
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*
* @return LazyCollection<int, Document>
*/
public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection
{
return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {
foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {
foreach ($resultSet->getDocuments() as $document) {
yield $document;
}
}
});
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*/
public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\ResultSet
{
Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);
$before = microtime(true);
$result = $this->createSearch($query, $modelOrIndex)->search();
$after = microtime(true);
Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);
return $result;
}
/**
* @TODO use LazyCollection
*
* @return Collection<int, Activity>
*/
public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection
{
return $this
->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)
->collect();
}
/**
* @return array{totalHits: int, results: Collection<int, Activity>}
*/
public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array
{
$search = $this->search($query, $model, $queryName);
/**
* @TODO Use value-object instead.
*/
return [
'totalHits' => $search->getTotalHits(),
'results' => $this
->hydrateCollection($search->getDocuments(), $model)
->collect(),
];
}
private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection
{
return LazyCollection::make($collection)
->map(function (Document $document) use ($model): Searchable {
return $this->hydrateModel($document, $model);
});
}
private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable
{
$attributes = $document->getData();
$attributes['id'] = $document->getId();
/** @var Searchable&Model */
return $this->modelFiller->newFromBuilderRecursive($model, $attributes);
}
}
Execute...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20891-improve-sms-text-relays, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.08843085,"height":0.025538707},"on_screen":true,"help_text":"Git Branch: JY-20891-improve-sms-text-relays","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.8081782,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AskJiminnyReportActivityServiceTest","depth":6,"bounds":{"left":0.8234708,"top":0.019952115,"width":0.09208777,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AskJiminnyReportActivityServiceTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AskJiminnyReportActivityServiceTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"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},"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10","depth":4,"bounds":{"left":0.50265956,"top":0.15003991,"width":0.009640957,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.51396275,"top":0.14844373,"width":0.00731383,"height":0.018355945},"on_screen":true,"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.5212766,"top":0.14844373,"width":0.006981383,"height":0.018355945},"on_screen":true,"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\\ElasticSearch\\Service;\n\nuse ChaseConey\\LaravelDatadogHelper\\Datadog;\nuse Elastica;\nuse Elastica\\Document;\nuse Elastica\\Query;\nuse Generator;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\Log;\nuse Illuminate\\Support\\LazyCollection;\nuse Jiminny\\Component\\ElasticSearch\\Client;\nuse Jiminny\\Component\\ElasticSearch\\Contract\\Searchable;\nuse Jiminny\\Component\\ElasticSearch\\ModelFiller;\nuse Jiminny\\Models\\Activity;\n\n/**\n * Class Search\n *\n * @package Jiminny\\Component\\ElasticSearch\\Service\n */\nclass Search\n{\n /**\n * @var Client\n */\n private $client;\n\n /**\n * @var ModelFiller\\Elastica\n */\n private $modelFiller;\n\n public function __construct(Client $client, ModelFiller\\Elastica $modelFiller)\n {\n $this->client = $client;\n $this->modelFiller = $modelFiller;\n }\n\n public function updateDocument(Searchable $model): self\n {\n return $this->updateDocumentCollection($model, new Collection([$model]));\n }\n\n public function updateDocumentCollection(\n Searchable $model,\n Collection $collection,\n int $chunkSize = 10,\n ?callable $callback = null,\n ): self {\n if ($collection->count() === 0) {\n return $this;\n }\n\n $documentType = $this->client->createIndex($model->getIndex());\n\n $collection\n ->chunk($chunkSize)\n ->each(static function (Collection $collection) use ($documentType, $callback): void {\n $documents = $collection->map(static function (Searchable $model): Document {\n return new Document((string) $model->getId(), $model->getIndexableAttributes());\n });\n\n $documentType->addDocuments($documents->all());\n\n if ($callback !== null) {\n $callback($collection, $documents);\n }\n\n gc_collect_cycles();\n });\n\n return $this;\n }\n\n private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\\Search\n {\n if (request() && request()->has('debug')) {\n Log::info('Debug ES query: ', [\n 'debug' => request()->get('debug'),\n 'userId' => request()->user()?->id ?? 'anonymous',\n 'userUuid' => request()->user()?->getIdString() ?? 'anonymous',\n 'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),\n 'url' => request()->fullUrl(),\n ]);\n }\n\n return $this->client\n ->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)\n ->createSearch($query);\n }\n\n public function scroll(Query $query, Searchable|string $model): Elastica\\Scroll\n {\n return new Elastica\\Scroll($this->createSearch($query, $model));\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n *\n * @return LazyCollection<int, Document>\n */\n public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection\n {\n return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {\n foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {\n foreach ($resultSet->getDocuments() as $document) {\n yield $document;\n }\n }\n });\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n */\n public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\\ResultSet\n {\n Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);\n\n $before = microtime(true);\n\n $result = $this->createSearch($query, $modelOrIndex)->search();\n\n $after = microtime(true);\n\n Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);\n\n return $result;\n }\n\n /**\n * @TODO use LazyCollection\n *\n * @return Collection<int, Activity>\n */\n public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection\n {\n return $this\n ->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)\n ->collect();\n }\n\n /**\n * @return array{totalHits: int, results: Collection<int, Activity>}\n */\n public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array\n {\n $search = $this->search($query, $model, $queryName);\n\n /**\n * @TODO Use value-object instead.\n */\n return [\n 'totalHits' => $search->getTotalHits(),\n 'results' => $this\n ->hydrateCollection($search->getDocuments(), $model)\n ->collect(),\n ];\n }\n\n private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection\n {\n return LazyCollection::make($collection)\n ->map(function (Document $document) use ($model): Searchable {\n return $this->hydrateModel($document, $model);\n });\n }\n\n private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable\n {\n $attributes = $document->getData();\n $attributes['id'] = $document->getId();\n\n /** @var Searchable&Model */\n return $this->modelFiller->newFromBuilderRecursive($model, $attributes);\n }\n}","depth":4,"on_screen":true,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Component\\ElasticSearch\\Service;\n\nuse ChaseConey\\LaravelDatadogHelper\\Datadog;\nuse Elastica;\nuse Elastica\\Document;\nuse Elastica\\Query;\nuse Generator;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\Log;\nuse Illuminate\\Support\\LazyCollection;\nuse Jiminny\\Component\\ElasticSearch\\Client;\nuse Jiminny\\Component\\ElasticSearch\\Contract\\Searchable;\nuse Jiminny\\Component\\ElasticSearch\\ModelFiller;\nuse Jiminny\\Models\\Activity;\n\n/**\n * Class Search\n *\n * @package Jiminny\\Component\\ElasticSearch\\Service\n */\nclass Search\n{\n /**\n * @var Client\n */\n private $client;\n\n /**\n * @var ModelFiller\\Elastica\n */\n private $modelFiller;\n\n public function __construct(Client $client, ModelFiller\\Elastica $modelFiller)\n {\n $this->client = $client;\n $this->modelFiller = $modelFiller;\n }\n\n public function updateDocument(Searchable $model): self\n {\n return $this->updateDocumentCollection($model, new Collection([$model]));\n }\n\n public function updateDocumentCollection(\n Searchable $model,\n Collection $collection,\n int $chunkSize = 10,\n ?callable $callback = null,\n ): self {\n if ($collection->count() === 0) {\n return $this;\n }\n\n $documentType = $this->client->createIndex($model->getIndex());\n\n $collection\n ->chunk($chunkSize)\n ->each(static function (Collection $collection) use ($documentType, $callback): void {\n $documents = $collection->map(static function (Searchable $model): Document {\n return new Document((string) $model->getId(), $model->getIndexableAttributes());\n });\n\n $documentType->addDocuments($documents->all());\n\n if ($callback !== null) {\n $callback($collection, $documents);\n }\n\n gc_collect_cycles();\n });\n\n return $this;\n }\n\n private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\\Search\n {\n if (request() && request()->has('debug')) {\n Log::info('Debug ES query: ', [\n 'debug' => request()->get('debug'),\n 'userId' => request()->user()?->id ?? 'anonymous',\n 'userUuid' => request()->user()?->getIdString() ?? 'anonymous',\n 'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),\n 'url' => request()->fullUrl(),\n ]);\n }\n\n return $this->client\n ->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)\n ->createSearch($query);\n }\n\n public function scroll(Query $query, Searchable|string $model): Elastica\\Scroll\n {\n return new Elastica\\Scroll($this->createSearch($query, $model));\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n *\n * @return LazyCollection<int, Document>\n */\n public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection\n {\n return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {\n foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {\n foreach ($resultSet->getDocuments() as $document) {\n yield $document;\n }\n }\n });\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n */\n public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\\ResultSet\n {\n Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);\n\n $before = microtime(true);\n\n $result = $this->createSearch($query, $modelOrIndex)->search();\n\n $after = microtime(true);\n\n Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);\n\n return $result;\n }\n\n /**\n * @TODO use LazyCollection\n *\n * @return Collection<int, Activity>\n */\n public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection\n {\n return $this\n ->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)\n ->collect();\n }\n\n /**\n * @return array{totalHits: int, results: Collection<int, Activity>}\n */\n public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array\n {\n $search = $this->search($query, $model, $queryName);\n\n /**\n * @TODO Use value-object instead.\n */\n return [\n 'totalHits' => $search->getTotalHits(),\n 'results' => $this\n ->hydrateCollection($search->getDocuments(), $model)\n ->collect(),\n ];\n }\n\n private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection\n {\n return LazyCollection::make($collection)\n ->map(function (Document $document) use ($model): Searchable {\n return $this->hydrateModel($document, $model);\n });\n }\n\n private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable\n {\n $attributes = $document->getData();\n $attributes['id'] = $document->getId();\n\n /** @var Searchable&Model */\n return $this->modelFiller->newFromBuilderRecursive($model, $attributes);\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.5299202,"top":0.074221864,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-3459108418915007581
|
-7881077389668029571
|
click
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, 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
10
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Component\ElasticSearch\Service;
use ChaseConey\LaravelDatadogHelper\Datadog;
use Elastica;
use Elastica\Document;
use Elastica\Query;
use Generator;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\LazyCollection;
use Jiminny\Component\ElasticSearch\Client;
use Jiminny\Component\ElasticSearch\Contract\Searchable;
use Jiminny\Component\ElasticSearch\ModelFiller;
use Jiminny\Models\Activity;
/**
* Class Search
*
* @package Jiminny\Component\ElasticSearch\Service
*/
class Search
{
/**
* @var Client
*/
private $client;
/**
* @var ModelFiller\Elastica
*/
private $modelFiller;
public function __construct(Client $client, ModelFiller\Elastica $modelFiller)
{
$this->client = $client;
$this->modelFiller = $modelFiller;
}
public function updateDocument(Searchable $model): self
{
return $this->updateDocumentCollection($model, new Collection([$model]));
}
public function updateDocumentCollection(
Searchable $model,
Collection $collection,
int $chunkSize = 10,
?callable $callback = null,
): self {
if ($collection->count() === 0) {
return $this;
}
$documentType = $this->client->createIndex($model->getIndex());
$collection
->chunk($chunkSize)
->each(static function (Collection $collection) use ($documentType, $callback): void {
$documents = $collection->map(static function (Searchable $model): Document {
return new Document((string) $model->getId(), $model->getIndexableAttributes());
});
$documentType->addDocuments($documents->all());
if ($callback !== null) {
$callback($collection, $documents);
}
gc_collect_cycles();
});
return $this;
}
private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\Search
{
if (request() && request()->has('debug')) {
Log::info('Debug ES query: ', [
'debug' => request()->get('debug'),
'userId' => request()->user()?->id ?? 'anonymous',
'userUuid' => request()->user()?->getIdString() ?? 'anonymous',
'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),
'url' => request()->fullUrl(),
]);
}
return $this->client
->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)
->createSearch($query);
}
public function scroll(Query $query, Searchable|string $model): Elastica\Scroll
{
return new Elastica\Scroll($this->createSearch($query, $model));
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*
* @return LazyCollection<int, Document>
*/
public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection
{
return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {
foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {
foreach ($resultSet->getDocuments() as $document) {
yield $document;
}
}
});
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*/
public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\ResultSet
{
Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);
$before = microtime(true);
$result = $this->createSearch($query, $modelOrIndex)->search();
$after = microtime(true);
Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);
return $result;
}
/**
* @TODO use LazyCollection
*
* @return Collection<int, Activity>
*/
public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection
{
return $this
->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)
->collect();
}
/**
* @return array{totalHits: int, results: Collection<int, Activity>}
*/
public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array
{
$search = $this->search($query, $model, $queryName);
/**
* @TODO Use value-object instead.
*/
return [
'totalHits' => $search->getTotalHits(),
'results' => $this
->hydrateCollection($search->getDocuments(), $model)
->collect(),
];
}
private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection
{
return LazyCollection::make($collection)
->map(function (Document $document) use ($model): Searchable {
return $this->hydrateModel($document, $model);
});
}
private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable
{
$attributes = $document->getData();
$attributes['id'] = $document->getId();
/** @var Searchable&Model */
return $this->modelFiller->newFromBuilderRecursive($model, $attributes);
}
}
Execute...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
35931
|
1341
|
23
|
2026-05-13T13:24:33.606589+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778678673606_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, 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
10
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Component\ElasticSearch\Service;
use ChaseConey\LaravelDatadogHelper\Datadog;
use Elastica;
use Elastica\Document;
use Elastica\Query;
use Generator;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\LazyCollection;
use Jiminny\Component\ElasticSearch\Client;
use Jiminny\Component\ElasticSearch\Contract\Searchable;
use Jiminny\Component\ElasticSearch\ModelFiller;
use Jiminny\Models\Activity;
/**
* Class Search
*
* @package Jiminny\Component\ElasticSearch\Service
*/
class Search
{
/**
* @var Client
*/
private $client;
/**
* @var ModelFiller\Elastica
*/
private $modelFiller;
public function __construct(Client $client, ModelFiller\Elastica $modelFiller)
{
$this->client = $client;
$this->modelFiller = $modelFiller;
}
public function updateDocument(Searchable $model): self
{
return $this->updateDocumentCollection($model, new Collection([$model]));
}
public function updateDocumentCollection(
Searchable $model,
Collection $collection,
int $chunkSize = 10,
?callable $callback = null,
): self {
if ($collection->count() === 0) {
return $this;
}
$documentType = $this->client->createIndex($model->getIndex());
$collection
->chunk($chunkSize)
->each(static function (Collection $collection) use ($documentType, $callback): void {
$documents = $collection->map(static function (Searchable $model): Document {
return new Document((string) $model->getId(), $model->getIndexableAttributes());
});
$documentType->addDocuments($documents->all());
if ($callback !== null) {
$callback($collection, $documents);
}
gc_collect_cycles();
});
return $this;
}
private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\Search
{
if (request() && request()->has('debug')) {
Log::info('Debug ES query: ', [
'debug' => request()->get('debug'),
'userId' => request()->user()?->id ?? 'anonymous',
'userUuid' => request()->user()?->getIdString() ?? 'anonymous',
'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),
'url' => request()->fullUrl(),
]);
}
return $this->client
->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)
->createSearch($query);
}
public function scroll(Query $query, Searchable|string $model): Elastica\Scroll
{
return new Elastica\Scroll($this->createSearch($query, $model));
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*
* @return LazyCollection<int, Document>
*/
public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection
{
return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {
foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {
foreach ($resultSet->getDocuments() as $document) {
yield $document;
}
}
});
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*/
public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\ResultSet
{
Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);
$before = microtime(true);
$result = $this->createSearch($query, $modelOrIndex)->search();
$after = microtime(true);
Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);
return $result;
}
/**
* @TODO use LazyCollection
*
* @return Collection<int, Activity>
*/
public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection
{
return $this
->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)
->collect();
}
/**
* @return array{totalHits: int, results: Collection<int, Activity>}
*/
public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array
{
$search = $this->search($query, $model, $queryName);
/**
* @TODO Use value-object instead.
*/
return [
'totalHits' => $search->getTotalHits(),
'results' => $this
->hydrateCollection($search->getDocuments(), $model)
->collect(),
];
}
private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection
{
return LazyCollection::make($collection)
->map(function (Document $document) use ($model): Searchable {
return $this->hydrateModel($document, $model);
});
}
private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable
{
$attributes = $document->getData();
$attributes['id'] = $document->getId();
/** @var Searchable&Model */
return $this->modelFiller->newFromBuilderRecursive($model, $attributes);
}
}
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:...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20891-improve-sms-text-relays, menu","depth":5,"on_screen":true,"help_text":"Git Branch: JY-20891-improve-sms-text-relays","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,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AskJiminnyReportActivityServiceTest","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AskJiminnyReportActivityServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AskJiminnyReportActivityServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"on_screen":true,"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\\ElasticSearch\\Service;\n\nuse ChaseConey\\LaravelDatadogHelper\\Datadog;\nuse Elastica;\nuse Elastica\\Document;\nuse Elastica\\Query;\nuse Generator;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\Log;\nuse Illuminate\\Support\\LazyCollection;\nuse Jiminny\\Component\\ElasticSearch\\Client;\nuse Jiminny\\Component\\ElasticSearch\\Contract\\Searchable;\nuse Jiminny\\Component\\ElasticSearch\\ModelFiller;\nuse Jiminny\\Models\\Activity;\n\n/**\n * Class Search\n *\n * @package Jiminny\\Component\\ElasticSearch\\Service\n */\nclass Search\n{\n /**\n * @var Client\n */\n private $client;\n\n /**\n * @var ModelFiller\\Elastica\n */\n private $modelFiller;\n\n public function __construct(Client $client, ModelFiller\\Elastica $modelFiller)\n {\n $this->client = $client;\n $this->modelFiller = $modelFiller;\n }\n\n public function updateDocument(Searchable $model): self\n {\n return $this->updateDocumentCollection($model, new Collection([$model]));\n }\n\n public function updateDocumentCollection(\n Searchable $model,\n Collection $collection,\n int $chunkSize = 10,\n ?callable $callback = null,\n ): self {\n if ($collection->count() === 0) {\n return $this;\n }\n\n $documentType = $this->client->createIndex($model->getIndex());\n\n $collection\n ->chunk($chunkSize)\n ->each(static function (Collection $collection) use ($documentType, $callback): void {\n $documents = $collection->map(static function (Searchable $model): Document {\n return new Document((string) $model->getId(), $model->getIndexableAttributes());\n });\n\n $documentType->addDocuments($documents->all());\n\n if ($callback !== null) {\n $callback($collection, $documents);\n }\n\n gc_collect_cycles();\n });\n\n return $this;\n }\n\n private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\\Search\n {\n if (request() && request()->has('debug')) {\n Log::info('Debug ES query: ', [\n 'debug' => request()->get('debug'),\n 'userId' => request()->user()?->id ?? 'anonymous',\n 'userUuid' => request()->user()?->getIdString() ?? 'anonymous',\n 'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),\n 'url' => request()->fullUrl(),\n ]);\n }\n\n return $this->client\n ->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)\n ->createSearch($query);\n }\n\n public function scroll(Query $query, Searchable|string $model): Elastica\\Scroll\n {\n return new Elastica\\Scroll($this->createSearch($query, $model));\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n *\n * @return LazyCollection<int, Document>\n */\n public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection\n {\n return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {\n foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {\n foreach ($resultSet->getDocuments() as $document) {\n yield $document;\n }\n }\n });\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n */\n public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\\ResultSet\n {\n Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);\n\n $before = microtime(true);\n\n $result = $this->createSearch($query, $modelOrIndex)->search();\n\n $after = microtime(true);\n\n Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);\n\n return $result;\n }\n\n /**\n * @TODO use LazyCollection\n *\n * @return Collection<int, Activity>\n */\n public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection\n {\n return $this\n ->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)\n ->collect();\n }\n\n /**\n * @return array{totalHits: int, results: Collection<int, Activity>}\n */\n public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array\n {\n $search = $this->search($query, $model, $queryName);\n\n /**\n * @TODO Use value-object instead.\n */\n return [\n 'totalHits' => $search->getTotalHits(),\n 'results' => $this\n ->hydrateCollection($search->getDocuments(), $model)\n ->collect(),\n ];\n }\n\n private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection\n {\n return LazyCollection::make($collection)\n ->map(function (Document $document) use ($model): Searchable {\n return $this->hydrateModel($document, $model);\n });\n }\n\n private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable\n {\n $attributes = $document->getData();\n $attributes['id'] = $document->getId();\n\n /** @var Searchable&Model */\n return $this->modelFiller->newFromBuilderRecursive($model, $attributes);\n }\n}","depth":4,"on_screen":true,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Component\\ElasticSearch\\Service;\n\nuse ChaseConey\\LaravelDatadogHelper\\Datadog;\nuse Elastica;\nuse Elastica\\Document;\nuse Elastica\\Query;\nuse Generator;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\Log;\nuse Illuminate\\Support\\LazyCollection;\nuse Jiminny\\Component\\ElasticSearch\\Client;\nuse Jiminny\\Component\\ElasticSearch\\Contract\\Searchable;\nuse Jiminny\\Component\\ElasticSearch\\ModelFiller;\nuse Jiminny\\Models\\Activity;\n\n/**\n * Class Search\n *\n * @package Jiminny\\Component\\ElasticSearch\\Service\n */\nclass Search\n{\n /**\n * @var Client\n */\n private $client;\n\n /**\n * @var ModelFiller\\Elastica\n */\n private $modelFiller;\n\n public function __construct(Client $client, ModelFiller\\Elastica $modelFiller)\n {\n $this->client = $client;\n $this->modelFiller = $modelFiller;\n }\n\n public function updateDocument(Searchable $model): self\n {\n return $this->updateDocumentCollection($model, new Collection([$model]));\n }\n\n public function updateDocumentCollection(\n Searchable $model,\n Collection $collection,\n int $chunkSize = 10,\n ?callable $callback = null,\n ): self {\n if ($collection->count() === 0) {\n return $this;\n }\n\n $documentType = $this->client->createIndex($model->getIndex());\n\n $collection\n ->chunk($chunkSize)\n ->each(static function (Collection $collection) use ($documentType, $callback): void {\n $documents = $collection->map(static function (Searchable $model): Document {\n return new Document((string) $model->getId(), $model->getIndexableAttributes());\n });\n\n $documentType->addDocuments($documents->all());\n\n if ($callback !== null) {\n $callback($collection, $documents);\n }\n\n gc_collect_cycles();\n });\n\n return $this;\n }\n\n private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\\Search\n {\n if (request() && request()->has('debug')) {\n Log::info('Debug ES query: ', [\n 'debug' => request()->get('debug'),\n 'userId' => request()->user()?->id ?? 'anonymous',\n 'userUuid' => request()->user()?->getIdString() ?? 'anonymous',\n 'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),\n 'url' => request()->fullUrl(),\n ]);\n }\n\n return $this->client\n ->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)\n ->createSearch($query);\n }\n\n public function scroll(Query $query, Searchable|string $model): Elastica\\Scroll\n {\n return new Elastica\\Scroll($this->createSearch($query, $model));\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n *\n * @return LazyCollection<int, Document>\n */\n public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection\n {\n return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {\n foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {\n foreach ($resultSet->getDocuments() as $document) {\n yield $document;\n }\n }\n });\n }\n\n /**\n * @param Searchable|string $modelOrIndex usage of model is deprecated\n */\n public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\\ResultSet\n {\n Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);\n\n $before = microtime(true);\n\n $result = $this->createSearch($query, $modelOrIndex)->search();\n\n $after = microtime(true);\n\n Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);\n\n return $result;\n }\n\n /**\n * @TODO use LazyCollection\n *\n * @return Collection<int, Activity>\n */\n public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection\n {\n return $this\n ->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)\n ->collect();\n }\n\n /**\n * @return array{totalHits: int, results: Collection<int, Activity>}\n */\n public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array\n {\n $search = $this->search($query, $model, $queryName);\n\n /**\n * @TODO Use value-object instead.\n */\n return [\n 'totalHits' => $search->getTotalHits(),\n 'results' => $this\n ->hydrateCollection($search->getDocuments(), $model)\n ->collect(),\n ];\n }\n\n private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection\n {\n return LazyCollection::make($collection)\n ->map(function (Document $document) use ($model): Searchable {\n return $this->hydrateModel($document, $model);\n });\n }\n\n private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable\n {\n $attributes = $document->getData();\n $attributes['id'] = $document->getId();\n\n /** @var Searchable&Model */\n return $this->modelFiller->newFromBuilderRecursive($model, $attributes);\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,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"on_screen":true,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"on_screen":true,"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},"on_screen":false,"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},"on_screen":false,"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},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
3282727660807053209
|
-9033998894274884739
|
click
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20891-improve-sms-text Project: faVsco.js, menu
JY-20891-improve-sms-text-relays, 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
10
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Component\ElasticSearch\Service;
use ChaseConey\LaravelDatadogHelper\Datadog;
use Elastica;
use Elastica\Document;
use Elastica\Query;
use Generator;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\LazyCollection;
use Jiminny\Component\ElasticSearch\Client;
use Jiminny\Component\ElasticSearch\Contract\Searchable;
use Jiminny\Component\ElasticSearch\ModelFiller;
use Jiminny\Models\Activity;
/**
* Class Search
*
* @package Jiminny\Component\ElasticSearch\Service
*/
class Search
{
/**
* @var Client
*/
private $client;
/**
* @var ModelFiller\Elastica
*/
private $modelFiller;
public function __construct(Client $client, ModelFiller\Elastica $modelFiller)
{
$this->client = $client;
$this->modelFiller = $modelFiller;
}
public function updateDocument(Searchable $model): self
{
return $this->updateDocumentCollection($model, new Collection([$model]));
}
public function updateDocumentCollection(
Searchable $model,
Collection $collection,
int $chunkSize = 10,
?callable $callback = null,
): self {
if ($collection->count() === 0) {
return $this;
}
$documentType = $this->client->createIndex($model->getIndex());
$collection
->chunk($chunkSize)
->each(static function (Collection $collection) use ($documentType, $callback): void {
$documents = $collection->map(static function (Searchable $model): Document {
return new Document((string) $model->getId(), $model->getIndexableAttributes());
});
$documentType->addDocuments($documents->all());
if ($callback !== null) {
$callback($collection, $documents);
}
gc_collect_cycles();
});
return $this;
}
private function createSearch(Query $query, Searchable|string $modelOrIndex): Elastica\Search
{
if (request() && request()->has('debug')) {
Log::info('Debug ES query: ', [
'debug' => request()->get('debug'),
'userId' => request()->user()?->id ?? 'anonymous',
'userUuid' => request()->user()?->getIdString() ?? 'anonymous',
'query' => json_encode($query->toArray(), JSON_THROW_ON_ERROR),
'url' => request()->fullUrl(),
]);
}
return $this->client
->createIndex($modelOrIndex instanceof Searchable ? $modelOrIndex->getIndex() : $modelOrIndex)
->createSearch($query);
}
public function scroll(Query $query, Searchable|string $model): Elastica\Scroll
{
return new Elastica\Scroll($this->createSearch($query, $model));
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*
* @return LazyCollection<int, Document>
*/
public function scrollOverDocuments(Query $query, Searchable|string $modelOrIndex): LazyCollection
{
return LazyCollection::make(function () use ($query, $modelOrIndex): Generator {
foreach ($this->scroll($query, $modelOrIndex) as $resultSet) {
foreach ($resultSet->getDocuments() as $document) {
yield $document;
}
}
});
}
/**
* @param Searchable|string $modelOrIndex usage of model is deprecated
*/
public function search(Query $query, Searchable|string $modelOrIndex, ?string $queryName = null): Elastica\ResultSet
{
Datadog::increment('jiminny.es.search', 1, ['query' => $queryName ?? '']);
$before = microtime(true);
$result = $this->createSearch($query, $modelOrIndex)->search();
$after = microtime(true);
Datadog::timing('jiminny.es.search.time', (int) (($after - $before) * 1000), 1, ['query' => $queryName ?? '']);
return $result;
}
/**
* @TODO use LazyCollection
*
* @return Collection<int, Activity>
*/
public function getQueryDocuments(Query $query, Model&Searchable $model, ?string $queryName = null): Collection
{
return $this
->hydrateCollection($this->search($query, $model, $queryName)->getDocuments(), $model)
->collect();
}
/**
* @return array{totalHits: int, results: Collection<int, Activity>}
*/
public function getQueryDocumentsPaginated(Query $query, Model&Searchable $model, ?string $queryName = null): array
{
$search = $this->search($query, $model, $queryName);
/**
* @TODO Use value-object instead.
*/
return [
'totalHits' => $search->getTotalHits(),
'results' => $this
->hydrateCollection($search->getDocuments(), $model)
->collect(),
];
}
private function hydrateCollection(array $collection, Model&Searchable $model): LazyCollection
{
return LazyCollection::make($collection)
->map(function (Document $document) use ($model): Searchable {
return $this->hydrateModel($document, $model);
});
}
private function hydrateModel(Document $document, Model&Searchable $model): Model&Searchable
{
$attributes = $document->getData();
$attributes['id'] = $document->getId();
/** @var Searchable&Model */
return $this->modelFiller->newFromBuilderRecursive($model, $attributes);
}
}
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:...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
35926
|
1342
|
16
|
2026-05-13T13:23:47.563417+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778678627563_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhostormVIewINavigareCodeKeractorFV faVsco.js°9 JY PhostormVIewINavigareCodeKeractorFV faVsco.js°9 JY-20891-improve-sms-text-relaysProledey© MailboxController.phpM MakefileJ package-lock.json= phpstan.neon.dist= phpstan-baseline.neon<> phpunit.xmlTaraw_sqL_query.sqMLPEADME mdC) TextRelayService.onp© Sso.phpossocontroller.ong© TextMessa©smsmessage.ong© SmsLength.php© TextRelay.phpService/Search.php x © ActivityStatusin.phpclass SearchM A10 A V< sonar-project.propertiesE test.py‹› Untitea Diagram.Xmiis vetur.config.jsM+ WEBHOOK_FILTERING_IMPLEM› ih External Librariesv E° Scratches and Consolesv C Database ConsolesV AEU& console EUl& DEALRISKS EUIA DI (EU)AEUEUvdiminnv@localhostA console fiminnv@localho# DI lliminnv@localhost4 HS local fiminnv@localhd4 SF [jiminny@localhost]Azoho dev fiminnvalocall• DROn# concole [ROnll# concole 1 [pponlA DI (PRODI› AQAЛAAI› A QAI PRODA STAGINGA console [STAGINGIA console 1 [STAGING]& uranus STAGING> C Extensionsv @ ScratchesEphostorm_shortcuts.txt=° scratch.txt{° scratch_1.ison{° scratch 2 ison<° scratch 3lison125= scratch 4 txtphe scratch 5.ohnphe scratch 6.ohnSscratch 7isonscratch R.isonstaae? ison= toctselt s...iprivate function createSearch(Query $query, Searchable|string $modelOrindex): Elastica \Searchif (request() && request()->has('debug')) {"dehua' => requesto->aet('dehua')'userUuid' => request(->user?->getIdString) ?? 'anonymous','query' => ison_encode(Squery->toArrayOflaas: LISON THROW ON ERROR).'url' => request->fullUrlO,1):— 96recurn schis->cllent-›createIndex( indexName: $model0rIndex instanceof Searchable ? Smodel0rIndex->getIndex() : $model0r 94->createsearch squery)96public function scroll(Query Squery. Searchable|string Smodel): Elastica\Scroll{...}98100* dparam searchablestrino smodelurindex usaoe of model 1s deprecated102* dreturn Lazucollection<int. Document>public function scrolloverDocuments(query Squery, SearchabLe|string SmodeLOrIndex): LazyCollection(...* I105Lix** Aoaran Searchable|strina Snodel0rIndey usage of model is denrecatedT109public function search(Query $query, Searchablelstring $modelOrIndex, ?string $queryName = null): Elastica 11€Datadog::increment( stats: 'jiminny.es.search', sampleRate: 1, ['query' => $queryName ?? "']);—112$before = microtime( as_float: true);Sresult = $this->createSearch($query, Smodel0rIndex)->search0:117Cofton = micnotimed as tloat: true)"Datadog:: timing( stat: "jiminny.es.search.time', (int) (($after - $before) * 1000)sampleRate: 1, ['quer: 120return sresult.• sonnt Keview • In 21m100% L2• Wed 13 May 15:33:40AskJiminnyReportActivityServiceTest v= custom.logscratch. &.ison= laravel.logA SF jiminny@localhost]« HS_local [jiminny@localhost] X console [PROD]cascadeA console (EU]A console [STACINClrial Owner Role SeleRetactoring User EmaDashboard Activity De+0 ..~/Library/Application Support/JetBrains/PhpStorm2026.1/consoles/db/5b1549d5-9876-4d9e-9ce3-025f12a83283/console.sait is there lust didn't include it "tracks"D69.select * from opportunities where team id = 2 and erm providen id TN (1374720564° 1145274235891 1490086191 X565571wsELEcT * FruM opportunity contacts whERE opportunity 1d = '414'*SELECT * FROM opportunity_contacts WHERE crm_provider_id = '131501';select * rrom contacts where 1d in (414. 464)1select * from activities where crm confiquration 1d = 2select settinas from crm conficurations where 1d = 11:Perfect - the activity has both video and audio tracks, so it would pass the ActivityRecorded filter even if appliedselect * From teams: # 1. 2select * from users;select * from crm_configurations where id = 39;select * from team_features where team_id = 2›select * from features;# SELECT * FROM opportunities WHERE crm_configuration_id = 2order by id desc;# and crm_provider_id = '49908861993';|Confirmed Fields (All Pass V)•• status : "failed" - Included in default status filtertype: "conference" - Allowed activity typeVis private : false - Passes privacy filter• V is internal: false - Should be visible• V actual_start_time : "2026-05-12 13:14:08" - Required field existsvtracks: Has video + audio tracks - Passes recorded tilterNext Stens to Deouaselect * from activity providers where id IN (443, 202, 203, 227):Since all fields nass the filters. check these:1. Date Range Selected in Dashboardselect * from activity imports where id = 795889:What date range is the user viewing? The detault is last 90 days. May 12, 2026 should be within range, but verity theselect c.id, c.provider, c.settings, t.* from teams t join crm confiqurations c 1<->1.n: on t.id = c.team_idactual Start date and end date parameters in te dasnooaro recuestwhere c.provider = 'hubspot'2. User/Team ScopeIs user 29089 (Line Kristensen) viewina her own dashboard? Verifv.select * from crm confiqurations crm JOIN teams + 1..n<->1: on crm.team id = t.id• User belonas to team 575 (NationBuilder) 7• User's group (Sales Team) has team_id: 575 VSELE * FROM teamsWHERE 1d = 311SELECT * FROM users WHERE id = 257;opportunities WHERE team 1d = 2• Check it RestrictTeam or RestrictUserGroupScope filters are excluding this3. Sxolicit Filter ValuesCheck if the dashboard request is passing explicit filter values that might exclude this activity, particularly:select * from opportunity_contacts where opportunity_id = 5124;select * fron contacts where id TN (3850.3853. 3851. 4073.4140.4155.4480.4530.4623. 5986. 513. 687. 1806. 1523. 3613) |activity status_values - might be set to only "completed"•only recorded activities - miaht be exolicitly set despite the override4. Actual Elasticsearch Quervselect * from activities where eom confiaunation id = 13.SELECT * FROM activities WHERE uuid_to_bin('826619ce-ec8e-4e59-8467-a01f5f6ad71e') = uuid; # 418141|Add logging in TeamInsightsRepository::getDashboardActivity0verTime to capture the exact Elasticsearch querybeina executed and see why this activitv is excluded!Most likely cause: Either the date range filter is excluding it, or an explicit filter value is being passed that overrides thedefault behavionselect id, team id, crm provider id from crm confiqurations where provider = 'hubspot' and crm provider id IS NOT NULSELECT * FROM accounts WHERE team id = 2 and crm provider id = '1212213464' order by id desc:SSISCT + SP0M contactc WHGPEteam id = 2 and account id = 5189 order by id desc:SELECT * FROM contacts WHERE team id = 2 order by id desc:select * from opportunity contacts where contact id = 6223:SELECT * FROM opportunities WHERE team id = 2 and account id = 5189 order by id desr.al .Ask anvthina (84L)"Code SWF-1.6•0 1.select * from erm profiles where crm confiquration id = 2:WN Windsurf Teams121-1UTF.A...
|
NULL
|
1837425836067260207
|
NULL
|
click
|
ocr
|
NULL
|
PhostormVIewINavigareCodeKeractorFV faVsco.js°9 JY PhostormVIewINavigareCodeKeractorFV faVsco.js°9 JY-20891-improve-sms-text-relaysProledey© MailboxController.phpM MakefileJ package-lock.json= phpstan.neon.dist= phpstan-baseline.neon<> phpunit.xmlTaraw_sqL_query.sqMLPEADME mdC) TextRelayService.onp© Sso.phpossocontroller.ong© TextMessa©smsmessage.ong© SmsLength.php© TextRelay.phpService/Search.php x © ActivityStatusin.phpclass SearchM A10 A V< sonar-project.propertiesE test.py‹› Untitea Diagram.Xmiis vetur.config.jsM+ WEBHOOK_FILTERING_IMPLEM› ih External Librariesv E° Scratches and Consolesv C Database ConsolesV AEU& console EUl& DEALRISKS EUIA DI (EU)AEUEUvdiminnv@localhostA console fiminnv@localho# DI lliminnv@localhost4 HS local fiminnv@localhd4 SF [jiminny@localhost]Azoho dev fiminnvalocall• DROn# concole [ROnll# concole 1 [pponlA DI (PRODI› AQAЛAAI› A QAI PRODA STAGINGA console [STAGINGIA console 1 [STAGING]& uranus STAGING> C Extensionsv @ ScratchesEphostorm_shortcuts.txt=° scratch.txt{° scratch_1.ison{° scratch 2 ison<° scratch 3lison125= scratch 4 txtphe scratch 5.ohnphe scratch 6.ohnSscratch 7isonscratch R.isonstaae? ison= toctselt s...iprivate function createSearch(Query $query, Searchable|string $modelOrindex): Elastica \Searchif (request() && request()->has('debug')) {"dehua' => requesto->aet('dehua')'userUuid' => request(->user?->getIdString) ?? 'anonymous','query' => ison_encode(Squery->toArrayOflaas: LISON THROW ON ERROR).'url' => request->fullUrlO,1):— 96recurn schis->cllent-›createIndex( indexName: $model0rIndex instanceof Searchable ? Smodel0rIndex->getIndex() : $model0r 94->createsearch squery)96public function scroll(Query Squery. Searchable|string Smodel): Elastica\Scroll{...}98100* dparam searchablestrino smodelurindex usaoe of model 1s deprecated102* dreturn Lazucollection<int. Document>public function scrolloverDocuments(query Squery, SearchabLe|string SmodeLOrIndex): LazyCollection(...* I105Lix** Aoaran Searchable|strina Snodel0rIndey usage of model is denrecatedT109public function search(Query $query, Searchablelstring $modelOrIndex, ?string $queryName = null): Elastica 11€Datadog::increment( stats: 'jiminny.es.search', sampleRate: 1, ['query' => $queryName ?? "']);—112$before = microtime( as_float: true);Sresult = $this->createSearch($query, Smodel0rIndex)->search0:117Cofton = micnotimed as tloat: true)"Datadog:: timing( stat: "jiminny.es.search.time', (int) (($after - $before) * 1000)sampleRate: 1, ['quer: 120return sresult.• sonnt Keview • In 21m100% L2• Wed 13 May 15:33:40AskJiminnyReportActivityServiceTest v= custom.logscratch. &.ison= laravel.logA SF jiminny@localhost]« HS_local [jiminny@localhost] X console [PROD]cascadeA console (EU]A console [STACINClrial Owner Role SeleRetactoring User EmaDashboard Activity De+0 ..~/Library/Application Support/JetBrains/PhpStorm2026.1/consoles/db/5b1549d5-9876-4d9e-9ce3-025f12a83283/console.sait is there lust didn't include it "tracks"D69.select * from opportunities where team id = 2 and erm providen id TN (1374720564° 1145274235891 1490086191 X565571wsELEcT * FruM opportunity contacts whERE opportunity 1d = '414'*SELECT * FROM opportunity_contacts WHERE crm_provider_id = '131501';select * rrom contacts where 1d in (414. 464)1select * from activities where crm confiquration 1d = 2select settinas from crm conficurations where 1d = 11:Perfect - the activity has both video and audio tracks, so it would pass the ActivityRecorded filter even if appliedselect * From teams: # 1. 2select * from users;select * from crm_configurations where id = 39;select * from team_features where team_id = 2›select * from features;# SELECT * FROM opportunities WHERE crm_configuration_id = 2order by id desc;# and crm_provider_id = '49908861993';|Confirmed Fields (All Pass V)•• status : "failed" - Included in default status filtertype: "conference" - Allowed activity typeVis private : false - Passes privacy filter• V is internal: false - Should be visible• V actual_start_time : "2026-05-12 13:14:08" - Required field existsvtracks: Has video + audio tracks - Passes recorded tilterNext Stens to Deouaselect * from activity providers where id IN (443, 202, 203, 227):Since all fields nass the filters. check these:1. Date Range Selected in Dashboardselect * from activity imports where id = 795889:What date range is the user viewing? The detault is last 90 days. May 12, 2026 should be within range, but verity theselect c.id, c.provider, c.settings, t.* from teams t join crm confiqurations c 1<->1.n: on t.id = c.team_idactual Start date and end date parameters in te dasnooaro recuestwhere c.provider = 'hubspot'2. User/Team ScopeIs user 29089 (Line Kristensen) viewina her own dashboard? Verifv.select * from crm confiqurations crm JOIN teams + 1..n<->1: on crm.team id = t.id• User belonas to team 575 (NationBuilder) 7• User's group (Sales Team) has team_id: 575 VSELE * FROM teamsWHERE 1d = 311SELECT * FROM users WHERE id = 257;opportunities WHERE team 1d = 2• Check it RestrictTeam or RestrictUserGroupScope filters are excluding this3. Sxolicit Filter ValuesCheck if the dashboard request is passing explicit filter values that might exclude this activity, particularly:select * from opportunity_contacts where opportunity_id = 5124;select * fron contacts where id TN (3850.3853. 3851. 4073.4140.4155.4480.4530.4623. 5986. 513. 687. 1806. 1523. 3613) |activity status_values - might be set to only "completed"•only recorded activities - miaht be exolicitly set despite the override4. Actual Elasticsearch Quervselect * from activities where eom confiaunation id = 13.SELECT * FROM activities WHERE uuid_to_bin('826619ce-ec8e-4e59-8467-a01f5f6ad71e') = uuid; # 418141|Add logging in TeamInsightsRepository::getDashboardActivity0verTime to capture the exact Elasticsearch querybeina executed and see why this activitv is excluded!Most likely cause: Either the date range filter is excluding it, or an explicit filter value is being passed that overrides thedefault behavionselect id, team id, crm provider id from crm confiqurations where provider = 'hubspot' and crm provider id IS NOT NULSELECT * FROM accounts WHERE team id = 2 and crm provider id = '1212213464' order by id desc:SSISCT + SP0M contactc WHGPEteam id = 2 and account id = 5189 order by id desc:SELECT * FROM contacts WHERE team id = 2 order by id desc:select * from opportunity contacts where contact id = 6223:SELECT * FROM opportunities WHERE team id = 2 and account id = 5189 order by id desr.al .Ask anvthina (84L)"Code SWF-1.6•0 1.select * from erm profiles where crm confiquration id = 2:WN Windsurf Teams121-1UTF.A...
|
35923
|
NULL
|
NULL
|
NULL
|
|
35925
|
1341
|
20
|
2026-05-13T13:23:47.561337+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-13/1778 /Users/lukas/.screenpipe/data/data/2026-05-13/1778678627561_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp>0 lыlec2-user@ip-10-30-129-190:~883-zshSprint Review - in 27 mA100% C8• Wed 13 May 15:33:40181DOCKERC *1DEV (docker)Last login: Wed May 13 09:16:21 on ttys010982APP (-zsh)84screenpipe"• ₴5Poetry could not find a pyproject.toml file in /Users/lukas or its parentsPoetry could not find a pyproject.toml file in /Users/lukas or its parentslukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ ssh jiminny-prod-ecs1 -L 7970:vpc-activities7g-t6nxe5qk7zis7pa5i7qlmp3zwm.us-east-2.es.amazonaws.com:80Enter MFA code for arn:aws:iam::438740370364:mfa/[EMAIL]:Warning: Permanently added 'jiminny-prod-ecs1' (ED25519) to the list of known hosts.A newer release of "Amazon Linux" is available.Version 2023.10.20260330:Version 2023.11.20260406:Version 2023.11.20260413:Version 2023.11.20260427:Version 2023.11.20260505:Version 2023.11.20260509:Run "/usr/bin/dnf check-release-update" for full release and version update info#_####_\_#####\\###|\#/v~'Amazon Linux 2023 (ECS Optimized)ec2-user@ip-10-30-129-190:~ (. 26Im/*Fordocumentation,visit [URL_WITH_CREDENTIALS] ~]$ ||...
|
NULL
|
5725358035782193467
|
NULL
|
click
|
ocr
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp>0 lыlec2-user@ip-10-30-129-190:~883-zshSprint Review - in 27 mA100% C8• Wed 13 May 15:33:40181DOCKERC *1DEV (docker)Last login: Wed May 13 09:16:21 on ttys010982APP (-zsh)84screenpipe"• ₴5Poetry could not find a pyproject.toml file in /Users/lukas or its parentsPoetry could not find a pyproject.toml file in /Users/lukas or its parentslukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ ssh jiminny-prod-ecs1 -L 7970:vpc-activities7g-t6nxe5qk7zis7pa5i7qlmp3zwm.us-east-2.es.amazonaws.com:80Enter MFA code for arn:aws:iam::438740370364:mfa/[EMAIL]:Warning: Permanently added 'jiminny-prod-ecs1' (ED25519) to the list of known hosts.A newer release of "Amazon Linux" is available.Version 2023.10.20260330:Version 2023.11.20260406:Version 2023.11.20260413:Version 2023.11.20260427:Version 2023.11.20260505:Version 2023.11.20260509:Run "/usr/bin/dnf check-release-update" for full release and version update info#_####_\_#####\\###|\#/v~'Amazon Linux 2023 (ECS Optimized)ec2-user@ip-10-30-129-190:~ (. 26Im/*Fordocumentation,visit [URL_WITH_CREDENTIALS] ~]$ ||...
|
35924
|
NULL
|
NULL
|
NULL
|