|
52530
|
1137
|
19
|
2026-04-20T07:20:37.130048+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-20/1776 /Users/lukas/.screenpipe/data/data/2026-04-20/1776669637130_m2.jpg...
|
PhpStorm
|
Tip of the Day
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Select In
To quickly select the currently edited e Select In
To quickly select the currently edited element (a class, file, method, or field) in another view, press ⌥ F1 or call Navigate | Select In.
Did you find this tip useful?
Like
Dislike
Don't show tips on startup
Close
Back
Next
Tip of the Day...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Select In\nTo quickly select the currently edited element (a class, file, method, or field) in another view, press ⌥ F1 or call Navigate | Select In.","depth":2,"bounds":{"left":0.41722074,"top":0.33758977,"width":0.16555852,"height":0.29289705},"value":"Select In\nTo quickly select the currently edited element (a class, file, method, or field) in another view, press ⌥ F1 or call Navigate | Select In.","help_text":"text/plain","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Did you find this tip useful?","depth":1,"bounds":{"left":0.50332445,"top":0.6432562,"width":0.055518616,"height":0.013567438},"role_description":"text"},{"role":"AXButton","text":"Like","depth":2,"bounds":{"left":0.56150264,"top":0.6368715,"width":0.010638298,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Dislike","depth":2,"bounds":{"left":0.57214093,"top":0.6368715,"width":0.010638298,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Don't show tips on startup","depth":1,"bounds":{"left":0.41722074,"top":0.67996806,"width":0.06981383,"height":0.027134877},"role_description":"checkbox","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close","depth":1,"bounds":{"left":0.50099736,"top":0.67996806,"width":0.025930852,"height":0.027134877},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Back","depth":1,"bounds":{"left":0.52892286,"top":0.67996806,"width":0.025930852,"height":0.027134877},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next","depth":1,"bounds":{"left":0.5568484,"top":0.67996806,"width":0.025930852,"height":0.027134877},"role_description":"button","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Tip of the Day","depth":1,"bounds":{"left":0.484375,"top":0.3048683,"width":0.03125,"height":0.012769354},"role_description":"text"}]...
|
-8434221441983544890
|
1407881917106439412
|
idle
|
accessibility
|
NULL
|
Select In
To quickly select the currently edited e Select In
To quickly select the currently edited element (a class, file, method, or field) in another view, press ⌥ F1 or call Navigate | Select In.
Did you find this tip useful?
Like
Dislike
Don't show tips on startup
Close
Back
Next
Tip of the Day...
|
52526
|
|
52532
|
1137
|
20
|
2026-04-20T07:21:07.489664+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-20/1776 /Users/lukas/.screenpipe/data/data/2026-04-20/1776669667489_m2.jpg...
|
PhpStorm
|
Tip of the Day
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Select In
To quickly select the currently edited e Select In
To quickly select the currently edited element (a class, file, method, or field) in another view, press ⌥ F1 or call Navigate | Select In.
Did you find this tip useful?
Like
Dislike
Don't show tips on startup
Close
Back
Next
Tip of the Day...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Select In\nTo quickly select the currently edited element (a class, file, method, or field) in another view, press ⌥ F1 or call Navigate | Select In.","depth":2,"bounds":{"left":0.41722074,"top":0.33758977,"width":0.16555852,"height":0.29289705},"value":"Select In\nTo quickly select the currently edited element (a class, file, method, or field) in another view, press ⌥ F1 or call Navigate | Select In.","help_text":"text/plain","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Did you find this tip useful?","depth":1,"bounds":{"left":0.50332445,"top":0.6432562,"width":0.055518616,"height":0.013567438},"role_description":"text"},{"role":"AXButton","text":"Like","depth":2,"bounds":{"left":0.56150264,"top":0.6368715,"width":0.010638298,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Dislike","depth":2,"bounds":{"left":0.57214093,"top":0.6368715,"width":0.010638298,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Don't show tips on startup","depth":1,"bounds":{"left":0.41722074,"top":0.67996806,"width":0.06981383,"height":0.027134877},"role_description":"checkbox","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close","depth":1,"bounds":{"left":0.50099736,"top":0.67996806,"width":0.025930852,"height":0.027134877},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Back","depth":1,"bounds":{"left":0.52892286,"top":0.67996806,"width":0.025930852,"height":0.027134877},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next","depth":1,"bounds":{"left":0.5568484,"top":0.67996806,"width":0.025930852,"height":0.027134877},"role_description":"button","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Tip of the Day","depth":1,"bounds":{"left":0.484375,"top":0.3048683,"width":0.03125,"height":0.012769354},"role_description":"text"}]...
|
-8434221441983544890
|
1407881917106439412
|
idle
|
accessibility
|
NULL
|
Select In
To quickly select the currently edited e Select In
To quickly select the currently edited element (a class, file, method, or field) in another view, press ⌥ F1 or call Navigate | Select In.
Did you find this tip useful?
Like
Dislike
Don't show tips on startup
Close
Back
Next
Tip of the Day...
|
52526
|
|
65790
|
1467
|
34
|
2026-04-21T13:03:09.523930+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-21/1776 /Users/lukas/.screenpipe/data/data/2026-04-21/1776776589523_m1.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
1834478591854514657
|
1834478591854514657
|
click
|
hybrid
|
NULL
|
Search
Notion CalendarEditViewWindowHelp+April 202 Search
Notion CalendarEditViewWindowHelp+April 2026 Week 17EESTMon 20Tue 21Chloe Cross (Parental Leave - 256 days)Ivelina Hristova (Parental Leave - 184 days)Andrea Zlatanova (Parental Leave - 189 days)Wed 22Thu 23Week vSat 25TodayFri 24( Lauren Hudson (PTO...( Steliyan Georgiev (P…..Sun 26100% <78Tue 21 Apr 16:03:10181ec2-user@ip-..• *8-zsh+PROD5.153.8711:0012:00UserpilotIntroduction11:30-12:3013:0014:0015:00Preparatior! Support1) Support Daily 15:001 Support Daily 15:001 Support Daily 15:001 Support Daily 15:00forRefinement15:00-16:0016:03[Platform]Refinemen:16:00-17:00Sos S..16:00-1117:00Al chapter17:00-18:00Lukas/Stefka 12117:30=18:00..18:005.153.87docker_lamp_12S DONEdocker_lamp_1fd/1' 2>&12026-04-21 13:03:06 Running ['artisan' meeting-bot:schedule-bot] ...X 17 EXT (-zsh)Last login: Mon Apr 20 19:48:04 on ttys0051 '/usr/local/bin/php' 'artisan' meeting-bot:schedule-bot › */proc/1//Users/lukas or its parentsSTAGE/Users/lukas or its parents/Users/lukas or its parents/Users/lukas or its parents/Users/lukas or its parentsFRONTEND/Users/lukas or its parentsPoetry could not find a pyproject.toml file in /Users/lukas or its parents EXTENSIONView in Docker Desktopo View ConfigEnable WatchPoetry could not find a pyproject.toml file in /Users/lukas or its parentsukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $...
|
65789
|
|
41837
|
884
|
54
|
2026-04-17T06:27:15.308332+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-17/1776 /Users/lukas/.screenpipe/data/data/2026-04-17/1776407235308_m1.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
select id, media_type, response from automa Search
select id, media_type, response from automated_rep...
SELECT * FROM teams WHERE name LIKE '%litify%'; # ...
Customize
Statements...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"select id, media_type, response from automated_rep...","depth":5,"bounds":{"left":0.0,"top":0.0,"width":0.23958333,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"SELECT * FROM teams WHERE name LIKE '%litify%'; # ...","depth":5,"bounds":{"left":0.0,"top":0.0,"width":0.23958333,"height":0.024444444},"role_description":"text"},{"role":"AXLink","text":"Customize","depth":1,"bounds":{"left":0.47013888,"top":0.0,"width":0.26180556,"height":0.02111111},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Statements","depth":1,"role_description":"text"}]...
|
-1058904752980371913
|
-8207058113232972418
|
click
|
accessibility
|
NULL
|
Search
select id, media_type, response from automa Search
select id, media_type, response from automated_rep...
SELECT * FROM teams WHERE name LIKE '%litify%'; # ...
Customize
Statements...
|
NULL
|
|
68314
|
1545
|
24
|
2026-04-21T16:53:23.248679+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-21/1776 /Users/lukas/.screenpipe/data/data/2026-04-21/1776790403248_m2.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
select * from contacts where crm_configurat Search
select * from contacts where crm_configuration_id ...
SELECT * FROM teams WHERE name LIKE '%litify%'; # ...
Customize
Statements...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"select * from contacts where crm_configuration_id ...","depth":5,"bounds":{"left":0.27027926,"top":1.0,"width":0.11469415,"height":0.0},"role_description":"text"},{"role":"AXStaticText","text":"SELECT * FROM teams WHERE name LIKE '%litify%'; # ...","depth":5,"bounds":{"left":0.27027926,"top":1.0,"width":0.11469415,"height":0.0},"role_description":"text"},{"role":"AXLink","text":"Customize","depth":1,"bounds":{"left":0.60671544,"top":0.5251397,"width":0.12533244,"height":0.015163607},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Statements","depth":1,"bounds":{"left":0.6100399,"top":0.45730248,"width":0.11868351,"height":0.026336791},"role_description":"text"}]...
|
-2839715928480776283
|
833234513524987484
|
click
|
accessibility
|
NULL
|
Search
select * from contacts where crm_configurat Search
select * from contacts where crm_configuration_id ...
SELECT * FROM teams WHERE name LIKE '%litify%'; # ...
Customize
Statements...
|
68312
|
|
20701
|
454
|
0
|
2026-04-15T09:17:31.197584+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-15/1776 /Users/lukas/.screenpipe/data/data/2026-04-15/1776244651197_m2.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
select * from automated_reports order by id Search
select * from automated_reports order by id desc
SELECT * FROM teams WHERE id = 1; select * from cr...
Customize
Statements...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"select * from automated_reports order by id desc","depth":5,"bounds":{"left":0.23320313,"top":1.0,"width":0.13320312,"height":0.0},"role_description":"text"},{"role":"AXStaticText","text":"SELECT * FROM teams WHERE id = 1; select * from cr...","depth":5,"bounds":{"left":0.23320313,"top":1.0,"width":0.13320312,"height":0.0},"role_description":"text"},{"role":"AXLink","text":"Customize","depth":1,"bounds":{"left":0.67148435,"top":0.5173611,"width":0.14570312,"height":0.013194445},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Statements","depth":1,"bounds":{"left":0.6753906,"top":0.45833334,"width":0.13789062,"height":0.022916667},"role_description":"text"}]...
|
-7197455836812187795
|
-7113110557106457987
|
idle
|
accessibility
|
NULL
|
Search
select * from automated_reports order by id Search
select * from automated_reports order by id desc
SELECT * FROM teams WHERE id = 1; select * from cr...
Customize
Statements...
|
NULL
|
|
20703
|
454
|
1
|
2026-04-15T09:18:01.406127+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-15/1776 /Users/lukas/.screenpipe/data/data/2026-04-15/1776244681406_m2.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
select * from automated_reports order by id Search
select * from automated_reports order by id desc
SELECT * FROM teams WHERE id = 1; select * from cr...
Customize
Statements...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"select * from automated_reports order by id desc","depth":5,"bounds":{"left":0.23320313,"top":1.0,"width":0.13320312,"height":0.0},"role_description":"text"},{"role":"AXStaticText","text":"SELECT * FROM teams WHERE id = 1; select * from cr...","depth":5,"bounds":{"left":0.23320313,"top":1.0,"width":0.13320312,"height":0.0},"role_description":"text"},{"role":"AXLink","text":"Customize","depth":1,"bounds":{"left":0.67148435,"top":0.5173611,"width":0.14570312,"height":0.013194445},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Statements","depth":1,"bounds":{"left":0.6753906,"top":0.45833334,"width":0.13789062,"height":0.022916667},"role_description":"text"}]...
|
-7197455836812187795
|
-7113110557106457987
|
idle
|
accessibility
|
NULL
|
Search
select * from automated_reports order by id Search
select * from automated_reports order by id desc
SELECT * FROM teams WHERE id = 1; select * from cr...
Customize
Statements...
|
20701
|
|
20705
|
454
|
2
|
2026-04-15T09:18:31.581546+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-15/1776 /Users/lukas/.screenpipe/data/data/2026-04-15/1776244711581_m2.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
select * from automated_reports order by id Search
select * from automated_reports order by id desc
SELECT * FROM teams WHERE id = 1; select * from cr...
Customize
Statements...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"select * from automated_reports order by id desc","depth":5,"bounds":{"left":0.23320313,"top":1.0,"width":0.13320312,"height":0.0},"role_description":"text"},{"role":"AXStaticText","text":"SELECT * FROM teams WHERE id = 1; select * from cr...","depth":5,"bounds":{"left":0.23320313,"top":1.0,"width":0.13320312,"height":0.0},"role_description":"text"},{"role":"AXLink","text":"Customize","depth":1,"bounds":{"left":0.67148435,"top":0.5173611,"width":0.14570312,"height":0.013194445},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Statements","depth":1,"bounds":{"left":0.6753906,"top":0.45833334,"width":0.13789062,"height":0.022916667},"role_description":"text"}]...
|
-7197455836812187795
|
-7113110557106457987
|
idle
|
accessibility
|
NULL
|
Search
select * from automated_reports order by id Search
select * from automated_reports order by id desc
SELECT * FROM teams WHERE id = 1; select * from cr...
Customize
Statements...
|
20701
|
|
20707
|
454
|
3
|
2026-04-15T09:19:01.787913+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-15/1776 /Users/lukas/.screenpipe/data/data/2026-04-15/1776244741787_m2.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
select * from automated_reports order by id Search
select * from automated_reports order by id desc
SELECT * FROM teams WHERE id = 1; select * from cr...
Customize
Statements...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"select * from automated_reports order by id desc","depth":5,"bounds":{"left":0.23320313,"top":1.0,"width":0.13320312,"height":0.0},"role_description":"text"},{"role":"AXStaticText","text":"SELECT * FROM teams WHERE id = 1; select * from cr...","depth":5,"bounds":{"left":0.23320313,"top":1.0,"width":0.13320312,"height":0.0},"role_description":"text"},{"role":"AXLink","text":"Customize","depth":1,"bounds":{"left":0.67148435,"top":0.5173611,"width":0.14570312,"height":0.013194445},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Statements","depth":1,"bounds":{"left":0.6753906,"top":0.45833334,"width":0.13789062,"height":0.022916667},"role_description":"text"}]...
|
-7197455836812187795
|
-7113110557106457987
|
idle
|
accessibility
|
NULL
|
Search
select * from automated_reports order by id Search
select * from automated_reports order by id desc
SELECT * FROM teams WHERE id = 1; select * from cr...
Customize
Statements...
|
20701
|
|
20709
|
454
|
4
|
2026-04-15T09:19:31.938352+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-15/1776 /Users/lukas/.screenpipe/data/data/2026-04-15/1776244771938_m2.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
select * from automated_reports order by id Search
select * from automated_reports order by id desc
SELECT * FROM teams WHERE id = 1; select * from cr...
Customize
Statements...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"select * from automated_reports order by id desc","depth":5,"bounds":{"left":0.23320313,"top":1.0,"width":0.13320312,"height":0.0},"role_description":"text"},{"role":"AXStaticText","text":"SELECT * FROM teams WHERE id = 1; select * from cr...","depth":5,"bounds":{"left":0.23320313,"top":1.0,"width":0.13320312,"height":0.0},"role_description":"text"},{"role":"AXLink","text":"Customize","depth":1,"bounds":{"left":0.67148435,"top":0.5173611,"width":0.14570312,"height":0.013194445},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Statements","depth":1,"bounds":{"left":0.6753906,"top":0.45833334,"width":0.13789062,"height":0.022916667},"role_description":"text"}]...
|
-7197455836812187795
|
-7113110557106457987
|
idle
|
accessibility
|
NULL
|
Search
select * from automated_reports order by id Search
select * from automated_reports order by id desc
SELECT * FROM teams WHERE id = 1; select * from cr...
Customize
Statements...
|
20701
|
|
20711
|
454
|
5
|
2026-04-15T09:20:02.170566+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-15/1776 /Users/lukas/.screenpipe/data/data/2026-04-15/1776244802170_m2.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
select * from automated_reports order by id Search
select * from automated_reports order by id desc
SELECT * FROM teams WHERE id = 1; select * from cr...
Customize
Statements...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"select * from automated_reports order by id desc","depth":5,"bounds":{"left":0.23320313,"top":1.0,"width":0.13320312,"height":0.0},"role_description":"text"},{"role":"AXStaticText","text":"SELECT * FROM teams WHERE id = 1; select * from cr...","depth":5,"bounds":{"left":0.23320313,"top":1.0,"width":0.13320312,"height":0.0},"role_description":"text"},{"role":"AXLink","text":"Customize","depth":1,"bounds":{"left":0.67148435,"top":0.5173611,"width":0.14570312,"height":0.013194445},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Statements","depth":1,"bounds":{"left":0.6753906,"top":0.45833334,"width":0.13789062,"height":0.022916667},"role_description":"text"}]...
|
-7197455836812187795
|
-7113110557106457987
|
idle
|
accessibility
|
NULL
|
Search
select * from automated_reports order by id Search
select * from automated_reports order by id desc
SELECT * FROM teams WHERE id = 1; select * from cr...
Customize
Statements...
|
20701
|
|
20713
|
454
|
6
|
2026-04-15T09:20:32.359265+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-15/1776 /Users/lukas/.screenpipe/data/data/2026-04-15/1776244832359_m2.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
select * from automated_reports order by id Search
select * from automated_reports order by id desc
SELECT * FROM teams WHERE id = 1; select * from cr...
Customize
Statements...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"select * from automated_reports order by id desc","depth":5,"bounds":{"left":0.23320313,"top":1.0,"width":0.13320312,"height":0.0},"role_description":"text"},{"role":"AXStaticText","text":"SELECT * FROM teams WHERE id = 1; select * from cr...","depth":5,"bounds":{"left":0.23320313,"top":1.0,"width":0.13320312,"height":0.0},"role_description":"text"},{"role":"AXLink","text":"Customize","depth":1,"bounds":{"left":0.67148435,"top":0.5173611,"width":0.14570312,"height":0.013194445},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Statements","depth":1,"bounds":{"left":0.6753906,"top":0.45833334,"width":0.13789062,"height":0.022916667},"role_description":"text"}]...
|
-7197455836812187795
|
-7113110557106457987
|
idle
|
accessibility
|
NULL
|
Search
select * from automated_reports order by id Search
select * from automated_reports order by id desc
SELECT * FROM teams WHERE id = 1; select * from cr...
Customize
Statements...
|
20701
|
|
20715
|
454
|
7
|
2026-04-15T09:21:02.491112+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-15/1776 /Users/lukas/.screenpipe/data/data/2026-04-15/1776244862491_m2.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
select * from automated_reports order by id Search
select * from automated_reports order by id desc
SELECT * FROM teams WHERE id = 1; select * from cr...
Customize
Statements...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"select * from automated_reports order by id desc","depth":5,"bounds":{"left":0.23320313,"top":1.0,"width":0.13320312,"height":0.0},"role_description":"text"},{"role":"AXStaticText","text":"SELECT * FROM teams WHERE id = 1; select * from cr...","depth":5,"bounds":{"left":0.23320313,"top":1.0,"width":0.13320312,"height":0.0},"role_description":"text"},{"role":"AXLink","text":"Customize","depth":1,"bounds":{"left":0.67148435,"top":0.5173611,"width":0.14570312,"height":0.013194445},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Statements","depth":1,"bounds":{"left":0.6753906,"top":0.45833334,"width":0.13789062,"height":0.022916667},"role_description":"text"}]...
|
-7197455836812187795
|
-7113110557106457987
|
idle
|
accessibility
|
NULL
|
Search
select * from automated_reports order by id Search
select * from automated_reports order by id desc
SELECT * FROM teams WHERE id = 1; select * from cr...
Customize
Statements...
|
20701
|
|
20700
|
453
|
0
|
2026-04-15T09:17:31.321510+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-15/1776 /Users/lukas/.screenpipe/data/data/2026-04-15/1776244651321_m1.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
select * from automated_reports order by id Search
select * from automated_reports order by id desc
SELECT * FROM teams WHERE id = 1; select * from cr...
Customize
Statements...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"select * from automated_reports order by id desc","depth":5,"bounds":{"left":0.0,"top":0.0,"width":0.23680556,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"SELECT * FROM teams WHERE id = 1; select * from cr...","depth":5,"bounds":{"left":0.0,"top":0.0,"width":0.23680556,"height":0.024444444},"role_description":"text"},{"role":"AXLink","text":"Customize","depth":1,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Statements","depth":1,"role_description":"text"}]...
|
-7197455836812187795
|
-7113110557106457987
|
idle
|
accessibility
|
NULL
|
Search
select * from automated_reports order by id Search
select * from automated_reports order by id desc
SELECT * FROM teams WHERE id = 1; select * from cr...
Customize
Statements...
|
20699
|
|
20702
|
453
|
1
|
2026-04-15T09:18:01.371974+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-15/1776 /Users/lukas/.screenpipe/data/data/2026-04-15/1776244681371_m1.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
select * from automated_reports order by id Search
select * from automated_reports order by id desc
SELECT * FROM teams WHERE id = 1; select * from cr...
Customize
Statements...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"select * from automated_reports order by id desc","depth":5,"bounds":{"left":0.0,"top":0.0,"width":0.23680556,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"SELECT * FROM teams WHERE id = 1; select * from cr...","depth":5,"bounds":{"left":0.0,"top":0.0,"width":0.23680556,"height":0.024444444},"role_description":"text"},{"role":"AXLink","text":"Customize","depth":1,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Statements","depth":1,"role_description":"text"}]...
|
-7197455836812187795
|
-7113110557106457987
|
idle
|
accessibility
|
NULL
|
Search
select * from automated_reports order by id Search
select * from automated_reports order by id desc
SELECT * FROM teams WHERE id = 1; select * from cr...
Customize
Statements...
|
NULL
|
|
20704
|
453
|
2
|
2026-04-15T09:18:31.461148+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-15/1776 /Users/lukas/.screenpipe/data/data/2026-04-15/1776244711461_m1.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
select * from automated_reports order by id Search
select * from automated_reports order by id desc
SELECT * FROM teams WHERE id = 1; select * from cr...
Customize
Statements...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"select * from automated_reports order by id desc","depth":5,"bounds":{"left":0.0,"top":0.0,"width":0.23680556,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"SELECT * FROM teams WHERE id = 1; select * from cr...","depth":5,"bounds":{"left":0.0,"top":0.0,"width":0.23680556,"height":0.024444444},"role_description":"text"},{"role":"AXLink","text":"Customize","depth":1,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Statements","depth":1,"role_description":"text"}]...
|
-7197455836812187795
|
-7113110557106457987
|
idle
|
accessibility
|
NULL
|
Search
select * from automated_reports order by id Search
select * from automated_reports order by id desc
SELECT * FROM teams WHERE id = 1; select * from cr...
Customize
Statements...
|
20702
|
|
20706
|
453
|
3
|
2026-04-15T09:19:01.561368+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-15/1776 /Users/lukas/.screenpipe/data/data/2026-04-15/1776244741561_m1.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
select * from automated_reports order by id Search
select * from automated_reports order by id desc
SELECT * FROM teams WHERE id = 1; select * from cr...
Customize
Statements...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"select * from automated_reports order by id desc","depth":5,"bounds":{"left":0.0,"top":0.0,"width":0.23680556,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"SELECT * FROM teams WHERE id = 1; select * from cr...","depth":5,"bounds":{"left":0.0,"top":0.0,"width":0.23680556,"height":0.024444444},"role_description":"text"},{"role":"AXLink","text":"Customize","depth":1,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Statements","depth":1,"role_description":"text"}]...
|
-7197455836812187795
|
-7113110557106457987
|
idle
|
accessibility
|
NULL
|
Search
select * from automated_reports order by id Search
select * from automated_reports order by id desc
SELECT * FROM teams WHERE id = 1; select * from cr...
Customize
Statements...
|
20702
|
|
20708
|
453
|
4
|
2026-04-15T09:19:31.638054+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-15/1776 /Users/lukas/.screenpipe/data/data/2026-04-15/1776244771638_m1.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
select * from automated_reports order by id Search
select * from automated_reports order by id desc
SELECT * FROM teams WHERE id = 1; select * from cr...
Customize
Statements...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"select * from automated_reports order by id desc","depth":5,"bounds":{"left":0.0,"top":0.0,"width":0.23680556,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"SELECT * FROM teams WHERE id = 1; select * from cr...","depth":5,"bounds":{"left":0.0,"top":0.0,"width":0.23680556,"height":0.024444444},"role_description":"text"},{"role":"AXLink","text":"Customize","depth":1,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Statements","depth":1,"role_description":"text"}]...
|
-7197455836812187795
|
-7113110557106457987
|
idle
|
accessibility
|
NULL
|
Search
select * from automated_reports order by id Search
select * from automated_reports order by id desc
SELECT * FROM teams WHERE id = 1; select * from cr...
Customize
Statements...
|
20702
|
|
20710
|
453
|
5
|
2026-04-15T09:20:01.780144+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-15/1776 /Users/lukas/.screenpipe/data/data/2026-04-15/1776244801780_m1.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
select * from automated_reports order by id Search
select * from automated_reports order by id desc
SELECT * FROM teams WHERE id = 1; select * from cr...
Customize
Statements...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"select * from automated_reports order by id desc","depth":5,"bounds":{"left":0.0,"top":0.0,"width":0.23680556,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"SELECT * FROM teams WHERE id = 1; select * from cr...","depth":5,"bounds":{"left":0.0,"top":0.0,"width":0.23680556,"height":0.024444444},"role_description":"text"},{"role":"AXLink","text":"Customize","depth":1,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Statements","depth":1,"role_description":"text"}]...
|
-7197455836812187795
|
-7113110557106457987
|
idle
|
accessibility
|
NULL
|
Search
select * from automated_reports order by id Search
select * from automated_reports order by id desc
SELECT * FROM teams WHERE id = 1; select * from cr...
Customize
Statements...
|
20702
|
|
20712
|
453
|
6
|
2026-04-15T09:20:31.874844+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-15/1776 /Users/lukas/.screenpipe/data/data/2026-04-15/1776244831874_m1.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
select * from automated_reports order by id Search
select * from automated_reports order by id desc
SELECT * FROM teams WHERE id = 1; select * from cr...
Customize
Statements...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"select * from automated_reports order by id desc","depth":5,"bounds":{"left":0.0,"top":0.0,"width":0.23680556,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"SELECT * FROM teams WHERE id = 1; select * from cr...","depth":5,"bounds":{"left":0.0,"top":0.0,"width":0.23680556,"height":0.024444444},"role_description":"text"},{"role":"AXLink","text":"Customize","depth":1,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Statements","depth":1,"role_description":"text"}]...
|
-7197455836812187795
|
-7113110557106457987
|
idle
|
accessibility
|
NULL
|
Search
select * from automated_reports order by id Search
select * from automated_reports order by id desc
SELECT * FROM teams WHERE id = 1; select * from cr...
Customize
Statements...
|
20702
|
|
20714
|
453
|
7
|
2026-04-15T09:21:01.947915+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-15/1776 /Users/lukas/.screenpipe/data/data/2026-04-15/1776244861947_m1.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
select * from automated_reports order by id Search
select * from automated_reports order by id desc
SELECT * FROM teams WHERE id = 1; select * from cr...
Customize
Statements...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"select * from automated_reports order by id desc","depth":5,"bounds":{"left":0.0,"top":0.0,"width":0.23680556,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"SELECT * FROM teams WHERE id = 1; select * from cr...","depth":5,"bounds":{"left":0.0,"top":0.0,"width":0.23680556,"height":0.024444444},"role_description":"text"},{"role":"AXLink","text":"Customize","depth":1,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Statements","depth":1,"role_description":"text"}]...
|
-7197455836812187795
|
-7113110557106457987
|
idle
|
accessibility
|
NULL
|
Search
select * from automated_reports order by id Search
select * from automated_reports order by id desc
SELECT * FROM teams WHERE id = 1; select * from cr...
Customize
Statements...
|
20702
|
|
71133
|
1691
|
5
|
2026-04-22T12:08:49.528065+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-22/1776 /Users/lukas/.screenpipe/data/data/2026-04-22/1776859729528_m2.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
select * from automated_report_results wher Search
select * from automated_report_results where id = ...
SELECT * FROM teams WHERE name LIKE '%litify%'; # ...
Customize
Statements...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"select * from automated_report_results where id = ...","depth":5,"bounds":{"left":0.27027926,"top":1.0,"width":0.11469415,"height":0.0},"role_description":"text"},{"role":"AXStaticText","text":"SELECT * FROM teams WHERE name LIKE '%litify%'; # ...","depth":5,"bounds":{"left":0.27027926,"top":1.0,"width":0.11469415,"height":0.0},"role_description":"text"},{"role":"AXLink","text":"Customize","depth":1,"bounds":{"left":0.73670214,"top":0.95690346,"width":0.12533244,"height":0.015163607},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Statements","depth":1,"bounds":{"left":0.7400266,"top":0.8890662,"width":0.11868351,"height":0.026336791},"role_description":"text"}]...
|
-101527262937854169
|
4209387352601106013
|
click
|
accessibility
|
NULL
|
Search
select * from automated_report_results wher Search
select * from automated_report_results where id = ...
SELECT * FROM teams WHERE name LIKE '%litify%'; # ...
Customize
Statements...
|
NULL
|
|
71161
|
1690
|
17
|
2026-04-22T12:10:20.656642+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-22/1776 /Users/lukas/.screenpipe/data/data/2026-04-22/1776859820656_m1.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
select * from activity_searches where id = Search
select * from activity_searches where id = 87714
SELECT * FROM teams WHERE name LIKE '%litify%'; # ...
Customize
Statements...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"select * from activity_searches where id = 87714","depth":5,"bounds":{"left":0.0,"top":0.0,"width":0.23958333,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"SELECT * FROM teams WHERE name LIKE '%litify%'; # ...","depth":5,"bounds":{"left":0.0,"top":0.0,"width":0.23958333,"height":0.024444444},"role_description":"text"},{"role":"AXLink","text":"Customize","depth":1,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Statements","depth":1,"role_description":"text"}]...
|
-4053968678660682580
|
2229490709491978846
|
click
|
accessibility
|
NULL
|
Search
select * from activity_searches where id = Search
select * from activity_searches where id = 87714
SELECT * FROM teams WHERE name LIKE '%litify%'; # ...
Customize
Statements...
|
71159
|
|
71416
|
1699
|
20
|
2026-04-22T12:32:43.727059+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-22/1776 /Users/lukas/.screenpipe/data/data/2026-04-22/1776861163727_m2.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
select * from activity_search_filters where Search
select * from activity_search_filters where activi...
SELECT * FROM teams WHERE name LIKE '%litify%'; # ...
Customize
Statements...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"select * from activity_search_filters where activi...","depth":5,"bounds":{"left":0.27027926,"top":1.0,"width":0.11469415,"height":0.0},"role_description":"text"},{"role":"AXStaticText","text":"SELECT * FROM teams WHERE name LIKE '%litify%'; # ...","depth":5,"bounds":{"left":0.27027926,"top":1.0,"width":0.11469415,"height":0.0},"role_description":"text"},{"role":"AXLink","text":"Customize","depth":1,"bounds":{"left":0.6402925,"top":0.54269755,"width":0.12533244,"height":0.015163607},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Statements","depth":1,"bounds":{"left":0.64361703,"top":0.47486034,"width":0.11868351,"height":0.026336791},"role_description":"text"}]...
|
-5810538310836269511
|
1105703778660291197
|
click
|
accessibility
|
NULL
|
Search
select * from activity_search_filters where Search
select * from activity_search_filters where activi...
SELECT * FROM teams WHERE name LIKE '%litify%'; # ...
Customize
Statements...
|
NULL
|
|
54662
|
1182
|
11
|
2026-04-20T09:14:07.288430+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-20/1776 /Users/lukas/.screenpipe/data/data/2026-04-20/1776676447288_m2.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
select * from activities where crm_configur Search
select * from activities where crm_configuration_i...
SELECT a.id, a.uuid, a.actual_start_time, o.id, o....
Customize
Statements...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"select * from activities where crm_configuration_i...","depth":5,"bounds":{"left":0.27027926,"top":1.0,"width":0.1043883,"height":0.0},"role_description":"text"},{"role":"AXStaticText","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o....","depth":5,"bounds":{"left":0.27027926,"top":1.0,"width":0.1043883,"height":0.0},"role_description":"text"},{"role":"AXLink","text":"Customize","depth":1,"bounds":{"left":0.55452126,"top":0.50039905,"width":0.11502659,"height":0.015163607},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Statements","depth":1,"bounds":{"left":0.5578458,"top":0.43256184,"width":0.10837766,"height":0.026336791},"role_description":"text"}]...
|
-6459082561811055408
|
928748932400219755
|
visual_change
|
accessibility
|
NULL
|
Search
select * from activities where crm_configur Search
select * from activities where crm_configuration_i...
SELECT a.id, a.uuid, a.actual_start_time, o.id, o....
Customize
Statements...
|
NULL
|
|
68408
|
1549
|
28
|
2026-04-21T17:04:34.120453+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-21/1776 /Users/lukas/.screenpipe/data/data/2026-04-21/1776791074120_m2.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
select * from accounts where crm_configurat Search
select * from accounts where crm_configuration_id ...
SELECT * FROM teams WHERE name LIKE '%litify%'; # ...
Customize
Statements...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"select * from accounts where crm_configuration_id ...","depth":5,"bounds":{"left":0.27027926,"top":1.0,"width":0.11469415,"height":0.0},"role_description":"text"},{"role":"AXStaticText","text":"SELECT * FROM teams WHERE name LIKE '%litify%'; # ...","depth":5,"bounds":{"left":0.27027926,"top":1.0,"width":0.11469415,"height":0.0},"role_description":"text"},{"role":"AXLink","text":"Customize","depth":1,"bounds":{"left":0.43550533,"top":0.95690346,"width":0.12533244,"height":0.015163607},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Statements","depth":1,"bounds":{"left":0.43882978,"top":0.8890662,"width":0.11868351,"height":0.026336791},"role_description":"text"}]...
|
-1343755400461407577
|
977490164748292701
|
click
|
accessibility
|
NULL
|
Search
select * from accounts where crm_configurat Search
select * from accounts where crm_configuration_id ...
SELECT * FROM teams WHERE name LIKE '%litify%'; # ...
Customize
Statements...
|
68406
|
|
63332
|
1370
|
41
|
2026-04-21T08:49:03.733015+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-21/1776 /Users/lukas/.screenpipe/data/data/2026-04-21/1776761343733_m2.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
saveActivity (Service .../app/Services/Crm/ Search
saveActivity (Service .../app/Services/Crm/Close), public method
saveActivity (Service .../app/Services/Crm/Copper), public method
saveActivity (Service .../app/Services/Crm/IntegrationApp), public method
saveActivity (RemoteEntityManipulationInterface .../app/Contracts/Services/Crm), public abstract method
saveActivity (Service .../app/Services/Crm/Dummy), public method
saveActivity (Service .../app/Services/Crm/Pipedrive), public method
saveActivity (Service .../app/Services/Crm/Salesforce), public method
saveActivity (WriteCrmTrait .../app/Services/Crm/Hubspot/ServiceTraits), public method
saveActivity (ServiceInterface .../app/Contracts/Services/Crm), public abstract method
saveActivity (BullhornService .../app/Services/Crm/Bullhorn), public method
Choose Declaration...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"saveActivity (Service .../app/Services/Crm/Close), public method","depth":4,"bounds":{"left":0.2526596,"top":0.79010373,"width":0.22240691,"height":0.017557861},"role_description":"text"},{"role":"AXStaticText","text":"saveActivity (Service .../app/Services/Crm/Copper), public method","depth":4,"bounds":{"left":0.2526596,"top":0.8076616,"width":0.22240691,"height":0.017557861},"role_description":"text"},{"role":"AXStaticText","text":"saveActivity (Service .../app/Services/Crm/IntegrationApp), public method","depth":4,"bounds":{"left":0.2526596,"top":0.82521945,"width":0.22240691,"height":0.017557861},"role_description":"text"},{"role":"AXStaticText","text":"saveActivity (RemoteEntityManipulationInterface .../app/Contracts/Services/Crm), public abstract method","depth":4,"bounds":{"left":0.2526596,"top":0.8427773,"width":0.22240691,"height":0.017557861},"role_description":"text"},{"role":"AXStaticText","text":"saveActivity (Service .../app/Services/Crm/Dummy), public method","depth":4,"bounds":{"left":0.2526596,"top":0.8603352,"width":0.22240691,"height":0.017557861},"role_description":"text"},{"role":"AXStaticText","text":"saveActivity (Service .../app/Services/Crm/Pipedrive), public method","depth":4,"bounds":{"left":0.2526596,"top":0.87789303,"width":0.22240691,"height":0.017557861},"role_description":"text"},{"role":"AXStaticText","text":"saveActivity (Service .../app/Services/Crm/Salesforce), public method","depth":4,"bounds":{"left":0.2526596,"top":0.8954509,"width":0.22240691,"height":0.017557861},"role_description":"text"},{"role":"AXStaticText","text":"saveActivity (WriteCrmTrait .../app/Services/Crm/Hubspot/ServiceTraits), public method","depth":4,"bounds":{"left":0.2526596,"top":0.91300875,"width":0.22240691,"height":0.017557861},"role_description":"text"},{"role":"AXStaticText","text":"saveActivity (ServiceInterface .../app/Contracts/Services/Crm), public abstract method","depth":4,"bounds":{"left":0.2526596,"top":0.93056667,"width":0.22240691,"height":0.017557861},"role_description":"text"},{"role":"AXStaticText","text":"saveActivity (BullhornService .../app/Services/Crm/Bullhorn), public method","depth":4,"bounds":{"left":0.2526596,"top":0.9481245,"width":0.22240691,"height":0.017557861},"role_description":"text"},{"role":"AXStaticText","text":"Choose Declaration","depth":1,"bounds":{"left":0.25598404,"top":0.76376694,"width":0.21575798,"height":0.026336791},"role_description":"text"}]...
|
99896569694803001
|
-970076010725088882
|
visual_change
|
accessibility
|
NULL
|
Search
saveActivity (Service .../app/Services/Crm/ Search
saveActivity (Service .../app/Services/Crm/Close), public method
saveActivity (Service .../app/Services/Crm/Copper), public method
saveActivity (Service .../app/Services/Crm/IntegrationApp), public method
saveActivity (RemoteEntityManipulationInterface .../app/Contracts/Services/Crm), public abstract method
saveActivity (Service .../app/Services/Crm/Dummy), public method
saveActivity (Service .../app/Services/Crm/Pipedrive), public method
saveActivity (Service .../app/Services/Crm/Salesforce), public method
saveActivity (WriteCrmTrait .../app/Services/Crm/Hubspot/ServiceTraits), public method
saveActivity (ServiceInterface .../app/Contracts/Services/Crm), public abstract method
saveActivity (BullhornService .../app/Services/Crm/Bullhorn), public method
Choose Declaration...
|
NULL
|
|
63333
|
1369
|
33
|
2026-04-21T08:49:06.091676+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-21/1776 /Users/lukas/.screenpipe/data/data/2026-04-21/1776761346091_m1.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
saveActivity (Service .../app/Services/Crm/ Search
saveActivity (Service .../app/Services/Crm/Close), public method
saveActivity (Service .../app/Services/Crm/Copper), public method...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"saveActivity (Service .../app/Services/Crm/Close), public method","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.46458334,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"saveActivity (Service .../app/Services/Crm/Copper), public method","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.46458334,"height":0.024444444},"role_description":"text"}]...
|
6157969343768184211
|
-320977121172098900
|
click
|
accessibility
|
NULL
|
Search
saveActivity (Service .../app/Services/Crm/ Search
saveActivity (Service .../app/Services/Crm/Close), public method
saveActivity (Service .../app/Services/Crm/Copper), public method...
|
NULL
|
|
55438
|
1195
|
21
|
2026-04-20T09:50:10.355063+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-20/1776 /Users/lukas/.screenpipe/data/data/2026-04-20/1776678610355_m1.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
resolveAccountId (OpportunitySyncTrait .../ Search
resolveAccountId (OpportunitySyncTrait .../app/Services/Crm/Hubspot/ServiceTraits), private method
resolveAccountId (OpportunitySyncTraitMatchActivitiesTest .../tests/Unit/Services/Crm/Hubspot/ServiceTraits), protected method
Choose Declaration...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"resolveAccountId (OpportunitySyncTrait .../app/Services/Crm/Hubspot/ServiceTraits), private method","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"resolveAccountId (OpportunitySyncTraitMatchActivitiesTest .../tests/Unit/Services/Crm/Hubspot/ServiceTraits), protected method","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Choose Declaration","depth":1,"role_description":"text"}]...
|
-4755648514678325934
|
2528090091462458253
|
click
|
accessibility
|
NULL
|
Search
resolveAccountId (OpportunitySyncTrait .../ Search
resolveAccountId (OpportunitySyncTrait .../app/Services/Crm/Hubspot/ServiceTraits), private method
resolveAccountId (OpportunitySyncTraitMatchActivitiesTest .../tests/Unit/Services/Crm/Hubspot/ServiceTraits), protected method
Choose Declaration...
|
55436
|
|
55439
|
1196
|
29
|
2026-04-20T09:50:10.355116+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-20/1776 /Users/lukas/.screenpipe/data/data/2026-04-20/1776678610355_m2.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
resolveAccountId (OpportunitySyncTrait .../ Search
resolveAccountId (OpportunitySyncTrait .../app/Services/Crm/Hubspot/ServiceTraits), private method
resolveAccountId (OpportunitySyncTraitMatchActivitiesTest .../tests/Unit/Services/Crm/Hubspot/ServiceTraits), protected method
Choose Declaration...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"resolveAccountId (OpportunitySyncTrait .../app/Services/Crm/Hubspot/ServiceTraits), private method","depth":4,"bounds":{"left":0.23404256,"top":0.547486,"width":0.2975399,"height":0.017557861},"role_description":"text"},{"role":"AXStaticText","text":"resolveAccountId (OpportunitySyncTraitMatchActivitiesTest .../tests/Unit/Services/Crm/Hubspot/ServiceTraits), protected method","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.2975399,"height":0.0},"role_description":"text"},{"role":"AXStaticText","text":"Choose Declaration","depth":1,"bounds":{"left":0.27027926,"top":1.0,"width":0.29089096,"height":0.0},"role_description":"text"}]...
|
-4755648514678325934
|
2528090091462458253
|
click
|
accessibility
|
NULL
|
Search
resolveAccountId (OpportunitySyncTrait .../ Search
resolveAccountId (OpportunitySyncTrait .../app/Services/Crm/Hubspot/ServiceTraits), private method
resolveAccountId (OpportunitySyncTraitMatchActivitiesTest .../tests/Unit/Services/Crm/Hubspot/ServiceTraits), protected method
Choose Declaration...
|
NULL
|
|
55522
|
1196
|
79
|
2026-04-20T09:53:05.165374+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-20/1776 /Users/lukas/.screenpipe/data/data/2026-04-20/1776678785165_m2.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
resolveAccountId (OpportunitySyncTrait .../ Search
resolveAccountId (OpportunitySyncTrait .../app/Services/Crm/Hubspot/ServiceTraits), private method
resolveAccountId (OpportunitySyncTraitMatchActivitiesTest .../tests/Unit/Services/Crm/Hubspot/ServiceTraits), protected method
Choose Declaration...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"resolveAccountId (OpportunitySyncTrait .../app/Services/Crm/Hubspot/ServiceTraits), private method","depth":4,"bounds":{"left":0.22639628,"top":0.5243416,"width":0.2975399,"height":0.017557861},"role_description":"text"},{"role":"AXStaticText","text":"resolveAccountId (OpportunitySyncTraitMatchActivitiesTest .../tests/Unit/Services/Crm/Hubspot/ServiceTraits), protected method","depth":4,"bounds":{"left":0.22639628,"top":0.54189944,"width":0.2975399,"height":0.017557861},"role_description":"text"},{"role":"AXStaticText","text":"Choose Declaration","depth":1,"bounds":{"left":0.22972074,"top":0.4980048,"width":0.29089096,"height":0.026336791},"role_description":"text"}]...
|
-4755648514678325934
|
2528090091462458253
|
click
|
accessibility
|
NULL
|
Search
resolveAccountId (OpportunitySyncTrait .../ Search
resolveAccountId (OpportunitySyncTrait .../app/Services/Crm/Hubspot/ServiceTraits), private method
resolveAccountId (OpportunitySyncTraitMatchActivitiesTest .../tests/Unit/Services/Crm/Hubspot/ServiceTraits), protected method
Choose Declaration...
|
NULL
|
|
45130
|
951
|
49
|
2026-04-17T09:21:47.674766+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-17/1776 /Users/lukas/.screenpipe/data/data/2026-04-17/1776417707674_m1.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
SELECT os.stage_id, s.crm_provider_id, s.na Search
SELECT os.stage_id, s.crm_provider_id, s.name, COU...
SELECT * FROM team_features where team_id = 1; SEL...
Customize
Statements...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"SELECT os.stage_id, s.crm_provider_id, s.name, COU...","depth":5,"bounds":{"left":0.0,"top":0.0,"width":0.24236111,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"SELECT * FROM team_features where team_id = 1; SEL...","depth":5,"bounds":{"left":0.0,"top":0.0,"width":0.24236111,"height":0.024444444},"role_description":"text"},{"role":"AXLink","text":"Customize","depth":1,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Statements","depth":1,"role_description":"text"}]...
|
-5430221936286280296
|
-4409480764929503876
|
visual_change
|
accessibility
|
NULL
|
Search
SELECT os.stage_id, s.crm_provider_id, s.na Search
SELECT os.stage_id, s.crm_provider_id, s.name, COU...
SELECT * FROM team_features where team_id = 1; SEL...
Customize
Statements...
|
NULL
|
|
54663
|
1181
|
6
|
2026-04-20T09:14:07.479594+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-20/1776 /Users/lukas/.screenpipe/data/data/2026-04-20/1776676447479_m1.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
SELECT a.id, a.uuid, a.actual_start_time, o Search
SELECT a.id, a.uuid, a.actual_start_time, o.id, o....
SELECT a.id, a.uuid, a.actual_start_time, o.id, o....
Customize
Statements...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o....","depth":5,"bounds":{"left":0.0,"top":0.0,"width":0.21805556,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o....","depth":5,"bounds":{"left":0.0,"top":0.0,"width":0.21805556,"height":0.024444444},"role_description":"text"},{"role":"AXLink","text":"Customize","depth":1,"bounds":{"left":0.0,"top":0.0,"width":0.24027778,"height":0.02111111},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Statements","depth":1,"bounds":{"left":0.0,"top":0.0,"width":0.22638889,"height":0.036666665},"role_description":"text"}]...
|
1038802725399877059
|
714827930769312346
|
click
|
accessibility
|
NULL
|
Search
SELECT a.id, a.uuid, a.actual_start_time, o Search
SELECT a.id, a.uuid, a.actual_start_time, o.id, o....
SELECT a.id, a.uuid, a.actual_start_time, o.id, o....
Customize
Statements...
|
54661
|
|
65782
|
1467
|
29
|
2026-04-21T13:02:27.295962+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-21/1776 /Users/lukas/.screenpipe/data/data/2026-04-21/1776776547295_m1.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
SELECT * FROM users WHERE group_id = 1439
S Search
SELECT * FROM users WHERE group_id = 1439
SELECT a.id, a.uuid, a.actual_start_time, o.id, o....
Customize
Statements...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"SELECT * FROM users WHERE group_id = 1439","depth":5,"bounds":{"left":0.0,"top":0.0,"width":0.20902778,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o....","depth":5,"bounds":{"left":0.0,"top":0.0,"width":0.20902778,"height":0.024444444},"role_description":"text"},{"role":"AXLink","text":"Customize","depth":1,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Statements","depth":1,"role_description":"text"}]...
|
4234198698997288865
|
-7932354896659460383
|
visual_change
|
accessibility
|
NULL
|
Search
SELECT * FROM users WHERE group_id = 1439
S Search
SELECT * FROM users WHERE group_id = 1439
SELECT a.id, a.uuid, a.actual_start_time, o.id, o....
Customize
Statements...
|
NULL
|
|
55472
|
1196
|
51
|
2026-04-20T09:51:22.935147+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-20/1776 /Users/lukas/.screenpipe/data/data/2026-04-20/1776678682935_m2.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
SELECT * FROM opportunities WHERE team_id = Search
SELECT * FROM opportunities WHERE team_id = 2 and ...
# [PASSWORD_DOTS] HS [PASSWORD_DOTS]...
Customize
Statements...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"SELECT * FROM opportunities WHERE team_id = 2 and ...","depth":5,"bounds":{"left":0.27027926,"top":1.0,"width":0.11668883,"height":0.0},"role_description":"text"},{"role":"AXStaticText","text":"# **************************** HS ****************...","depth":5,"bounds":{"left":0.27027926,"top":1.0,"width":0.11668883,"height":0.0},"role_description":"text"},{"role":"AXLink","text":"Customize","depth":1,"bounds":{"left":0.5934175,"top":0.87230647,"width":0.12732713,"height":0.015163607},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Statements","depth":1,"bounds":{"left":0.59674203,"top":0.8044693,"width":0.120678194,"height":0.026336791},"role_description":"text"}]...
|
-3516197308497016691
|
-7001375947777232187
|
click
|
accessibility
|
NULL
|
Search
SELECT * FROM opportunities WHERE team_id = Search
SELECT * FROM opportunities WHERE team_id = 2 and ...
# [PASSWORD_DOTS] HS [PASSWORD_DOTS]...
Customize
Statements...
|
NULL
|
|
65219
|
1451
|
2
|
2026-04-21T12:18:01.209229+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-21/1776 /Users/lukas/.screenpipe/data/data/2026-04-21/1776773881209_m1.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
SELECT * FROM automated_reports where id = Search
SELECT * FROM automated_reports where id = 68
SELECT a.id, a.uuid, a.actual_start_time, o.id, o....
Customize
Statements...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"SELECT * FROM automated_reports where id = 68","depth":5,"bounds":{"left":0.0,"top":0.0,"width":0.21458334,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o....","depth":5,"bounds":{"left":0.0,"top":0.0,"width":0.21458334,"height":0.024444444},"role_description":"text"},{"role":"AXLink","text":"Customize","depth":1,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Statements","depth":1,"role_description":"text"}]...
|
5654814077053448652
|
1002980239179533928
|
visual_change
|
accessibility
|
NULL
|
Search
SELECT * FROM automated_reports where id = Search
SELECT * FROM automated_reports where id = 68
SELECT a.id, a.uuid, a.actual_start_time, o.id, o....
Customize
Statements...
|
NULL
|
|
65259
|
1451
|
23
|
2026-04-21T12:19:44.086132+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-21/1776 /Users/lukas/.screenpipe/data/data/2026-04-21/1776773984086_m1.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
SELECT * FROM automated_reports where id = Search
SELECT * FROM automated_reports where id = 68
SELECT a.id, a.uuid, a.actual_start_time, o.id, o....
Customize
Statements...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"SELECT * FROM automated_reports where id = 68","depth":5,"bounds":{"left":0.0,"top":0.0,"width":0.21458334,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o....","depth":5,"bounds":{"left":0.0,"top":0.0,"width":0.21458334,"height":0.024444444},"role_description":"text"},{"role":"AXLink","text":"Customize","depth":1,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Statements","depth":1,"role_description":"text"}]...
|
5654814077053448652
|
1002980239179533928
|
visual_change
|
accessibility
|
NULL
|
Search
SELECT * FROM automated_reports where id = Search
SELECT * FROM automated_reports where id = 68
SELECT a.id, a.uuid, a.actual_start_time, o.id, o....
Customize
Statements...
|
65258
|
|
73828
|
1832
|
0
|
2026-04-23T08:38:56.826248+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-23/1776 /Users/lukas/.screenpipe/data/data/2026-04-23/1776933536826_m1.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
SELECT * FROM automated_reports where id = Search
SELECT * FROM automated_reports where id = 42
SELECT a.id, a.uuid, a.actual_start_time, o.id, o....
Customize
Statements...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"SELECT * FROM automated_reports where id = 42","depth":5,"bounds":{"left":0.0,"top":0.0,"width":0.21458334,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o....","depth":5,"bounds":{"left":0.0,"top":0.0,"width":0.21458334,"height":0.024444444},"role_description":"text"},{"role":"AXLink","text":"Customize","depth":1,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Statements","depth":1,"role_description":"text"}]...
|
-3641035365897994942
|
863439041252118124
|
visual_change
|
accessibility
|
NULL
|
Search
SELECT * FROM automated_reports where id = Search
SELECT * FROM automated_reports where id = 42
SELECT a.id, a.uuid, a.actual_start_time, o.id, o....
Customize
Statements...
|
NULL
|
|
70621
|
1663
|
6
|
2026-04-22T10:59:53.540105+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-22/1776 /Users/lukas/.screenpipe/data/data/2026-04-22/1776855593540_m2.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
SELECT * FROM automated_report_results wher Search
SELECT * FROM automated_report_results where id = ...
SELECT a.id, a.uuid, a.actual_start_time, o.id, o....
Customize
Statements...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"SELECT * FROM automated_report_results where id = ...","depth":5,"bounds":{"left":0.27027926,"top":1.0,"width":0.1143617,"height":0.0},"role_description":"text"},{"role":"AXStaticText","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o....","depth":5,"bounds":{"left":0.27027926,"top":1.0,"width":0.1143617,"height":0.0},"role_description":"text"},{"role":"AXLink","text":"Customize","depth":1,"bounds":{"left":0.72672874,"top":0.46288908,"width":0.125,"height":0.015163607},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Statements","depth":1,"bounds":{"left":0.7300532,"top":0.39505187,"width":0.118351065,"height":0.026336791},"role_description":"text"}]...
|
109963738881701837
|
6551212706772049657
|
click
|
accessibility
|
NULL
|
Search
SELECT * FROM automated_report_results wher Search
SELECT * FROM automated_report_results where id = ...
SELECT a.id, a.uuid, a.actual_start_time, o.id, o....
Customize
Statements...
|
70609
|
|
73536
|
1814
|
8
|
2026-04-23T07:53:37.089420+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-23/1776 /Users/lukas/.screenpipe/data/data/2026-04-23/1776930817089_m1.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
Jiminny\Models\User, class
Jiminny\Services Search
Jiminny\Models\User, class
Jiminny\Services\Crm\IntegrationApp\DTO\User, final class
Jiminny\Component\Slack\DTO\Event\BlockAction\User, class
Jiminny\Component\LiveFeed\Item\User, final class
Jiminny\Component\CoachingFeedback\Export\User, final class
Couchbase\User, class
http\Client\Curl\User, interface
Laravel\Passport\Bridge\User, class
Workbench\App\Models\User, class
Microsoft\Graph\Generated\Models\User, class
User, class
Illuminate\Foundation\Auth\User, class
Illuminate\Tests\Database\User, class
Illuminate\Tests\Database\Fixtures\Models\User, class
Illuminate\Tests\Validation\User, class
Illuminate\Tests\Integration\Http\Resources\JsonApi\Fixtures\User, class
Illuminate\Tests\Integration\Queue\User, class
Illuminate\Tests\Integration\Support\User, class
Illuminate\Tests\Integration\Database\EloquentPivotWithoutTimestampTest\User, class
Illuminate\Tests\Integration\Database\EloquentMultiDimensionalArrayEagerLoadingTest\User, class
Illuminate\Tests\Integration\Database\EloquentMorphLazyEagerLoadingTest\User, class
Illuminate\Tests\Integration\Database\EloquentWhereHasTest\User, class
Illuminate\Tests\Integration\Database\EloquentBelongsToTest\User, class
Illuminate\Tests\Integration\Database\EloquentHasOneOfManyTest\User, class
Illuminate\Tests\Integration\Database\EloquentModelLoadMissingTest\User, class
Illuminate\Tests\Integration\Database\EloquentEagerLoadingLimitTest\User, class
Illuminate\Tests\Integration\Database\User, class
Illuminate\Tests\Integration\Database\EloquentMorphToLazyEagerLoadingTest\User, class
Illuminate\Tests\Integration\Database\EloquentHasManyThroughTest\User, class
Illuminate\Tests\Integration\Database\EloquentMorphEagerLoadingTest\User, class
Illuminate\Tests\Integration\Database\EloquentCollectionLoadMissingTest\User, class
Illuminate\Tests\Integration\Database\EloquentBelongsToManyTest\User, class
Illuminate\Tests\Integration\Database\Fixtures\User, class
Illuminate\Tests\Integration\Validation\User, class
Illuminate\Types\Relations\User, class
Illuminate\Types\Builder\User, class
Google\Service\Keep\User, class
Google\Service\Drive\User, class
Google\Service\Blogger\User, class
Google\Service\SQLAdmin\User, class
Google\Service\Directory\User, class
Google\Service\AlertCenter\User, class
Google\Service\CloudSearch\User, class
Google\Service\DisplayVideo\User, class
Google\Service\HangoutsChat\User, class
Google\Service\DriveActivity\User, class
Google\Service\AndroidPublisher\User, class
Google\Service\DeveloperConnect\User, class
Google\Service\AndroidEnterprise\User, class
Google\Service\AndroidManagement\User, class
Google\Service\CloudAlloyDBAdmin\User, class
Google\Service\AnalyticsReporting\User, class
Google\Showcase\V1beta1\User, class
Psy\Test\Fixtures\ImplicitUse\App\Model\User, class
Psy\Test\Fixtures\ImplicitUse\App\View\User, class
Psy\Test\Fixtures\ImplicitUse\App\Legacy\User, class
Psy\Test\Fixtures\Completion\User, class
Class to import...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Jiminny\\Models\\User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\User, final class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Jiminny\\Component\\Slack\\DTO\\Event\\BlockAction\\User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Jiminny\\Component\\LiveFeed\\Item\\User, final class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Jiminny\\Component\\CoachingFeedback\\Export\\User, final class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Couchbase\\User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"http\\Client\\Curl\\User, interface","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Laravel\\Passport\\Bridge\\User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Workbench\\App\\Models\\User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Microsoft\\Graph\\Generated\\Models\\User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Foundation\\Auth\\User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Database\\User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Database\\Fixtures\\Models\\User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Validation\\User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Integration\\Http\\Resources\\JsonApi\\Fixtures\\User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Integration\\Queue\\User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Integration\\Support\\User, class","depth":4,"bounds":{"left":0.29375,"top":0.0,"width":0.5229167,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Integration\\Database\\EloquentPivotWithoutTimestampTest\\User, class","depth":4,"bounds":{"left":0.29375,"top":0.0,"width":0.5229167,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Integration\\Database\\EloquentMultiDimensionalArrayEagerLoadingTest\\User, class","depth":4,"bounds":{"left":0.29375,"top":0.0,"width":0.5229167,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Integration\\Database\\EloquentMorphLazyEagerLoadingTest\\User, class","depth":4,"bounds":{"left":0.29375,"top":0.0,"width":0.5229167,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Integration\\Database\\EloquentWhereHasTest\\User, class","depth":4,"bounds":{"left":0.29375,"top":0.0022222223,"width":0.5229167,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Integration\\Database\\EloquentBelongsToTest\\User, class","depth":4,"bounds":{"left":0.29375,"top":0.026666667,"width":0.5229167,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Integration\\Database\\EloquentHasOneOfManyTest\\User, class","depth":4,"bounds":{"left":0.29375,"top":0.05111111,"width":0.5229167,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Integration\\Database\\EloquentModelLoadMissingTest\\User, class","depth":4,"bounds":{"left":0.29375,"top":0.075555556,"width":0.5229167,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Integration\\Database\\EloquentEagerLoadingLimitTest\\User, class","depth":4,"bounds":{"left":0.29375,"top":0.1,"width":0.5229167,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Integration\\Database\\User, class","depth":4,"bounds":{"left":0.29375,"top":0.12444445,"width":0.5229167,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Integration\\Database\\EloquentMorphToLazyEagerLoadingTest\\User, class","depth":4,"bounds":{"left":0.29375,"top":0.14888889,"width":0.5229167,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Integration\\Database\\EloquentHasManyThroughTest\\User, class","depth":4,"bounds":{"left":0.29375,"top":0.17333333,"width":0.5229167,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Integration\\Database\\EloquentMorphEagerLoadingTest\\User, class","depth":4,"bounds":{"left":0.29375,"top":0.19777778,"width":0.5229167,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Integration\\Database\\EloquentCollectionLoadMissingTest\\User, class","depth":4,"bounds":{"left":0.29375,"top":0.22222222,"width":0.5229167,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Integration\\Database\\EloquentBelongsToManyTest\\User, class","depth":4,"bounds":{"left":0.29375,"top":0.24666667,"width":0.5229167,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Integration\\Database\\Fixtures\\User, class","depth":4,"bounds":{"left":0.29375,"top":0.2711111,"width":0.5229167,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Integration\\Validation\\User, class","depth":4,"bounds":{"left":0.29375,"top":0.29555556,"width":0.5229167,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Types\\Relations\\User, class","depth":4,"bounds":{"left":0.29375,"top":0.32,"width":0.5229167,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Types\\Builder\\User, class","depth":4,"bounds":{"left":0.29375,"top":0.34444445,"width":0.5229167,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"Google\\Service\\Keep\\User, class","depth":4,"bounds":{"left":0.29375,"top":0.36888888,"width":0.5229167,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"Google\\Service\\Drive\\User, class","depth":4,"bounds":{"left":0.29375,"top":0.39333335,"width":0.5229167,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"Google\\Service\\Blogger\\User, class","depth":4,"bounds":{"left":0.29375,"top":0.41777778,"width":0.5229167,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"Google\\Service\\SQLAdmin\\User, class","depth":4,"bounds":{"left":0.29375,"top":0.4422222,"width":0.5229167,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"Google\\Service\\Directory\\User, class","depth":4,"bounds":{"left":0.29375,"top":0.46666667,"width":0.5229167,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"Google\\Service\\AlertCenter\\User, class","depth":4,"bounds":{"left":0.29375,"top":0.4911111,"width":0.5229167,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"Google\\Service\\CloudSearch\\User, class","depth":4,"bounds":{"left":0.29375,"top":0.51555556,"width":0.5229167,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"Google\\Service\\DisplayVideo\\User, class","depth":4,"bounds":{"left":0.29375,"top":0.54,"width":0.5229167,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"Google\\Service\\HangoutsChat\\User, class","depth":4,"bounds":{"left":0.29375,"top":0.5644444,"width":0.5229167,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"Google\\Service\\DriveActivity\\User, class","depth":4,"bounds":{"left":0.29375,"top":0.5888889,"width":0.5229167,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"Google\\Service\\AndroidPublisher\\User, class","depth":4,"bounds":{"left":0.29375,"top":0.61333334,"width":0.5229167,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"Google\\Service\\DeveloperConnect\\User, class","depth":4,"bounds":{"left":0.29375,"top":0.6377778,"width":0.5229167,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"Google\\Service\\AndroidEnterprise\\User, class","depth":4,"bounds":{"left":0.29375,"top":0.6622222,"width":0.5229167,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"Google\\Service\\AndroidManagement\\User, class","depth":4,"bounds":{"left":0.29375,"top":0.68666667,"width":0.5229167,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"Google\\Service\\CloudAlloyDBAdmin\\User, class","depth":4,"bounds":{"left":0.29375,"top":0.7111111,"width":0.5229167,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"Google\\Service\\AnalyticsReporting\\User, class","depth":4,"bounds":{"left":0.29375,"top":0.7355555,"width":0.5229167,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"Google\\Showcase\\V1beta1\\User, class","depth":4,"bounds":{"left":0.29375,"top":0.76,"width":0.5229167,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"Psy\\Test\\Fixtures\\ImplicitUse\\App\\Model\\User, class","depth":4,"bounds":{"left":0.29375,"top":0.78444445,"width":0.5229167,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"Psy\\Test\\Fixtures\\ImplicitUse\\App\\View\\User, class","depth":4,"bounds":{"left":0.29375,"top":0.8088889,"width":0.5229167,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"Psy\\Test\\Fixtures\\ImplicitUse\\App\\Legacy\\User, class","depth":4,"bounds":{"left":0.29375,"top":0.8333333,"width":0.5229167,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"Psy\\Test\\Fixtures\\Completion\\User, class","depth":4,"bounds":{"left":0.29375,"top":0.8577778,"width":0.5229167,"height":0.024444444},"role_description":"text"},{"role":"AXStaticText","text":"Class to import","depth":1,"role_description":"text"}]...
|
11378629446154887
|
-6164043535022962829
|
click
|
accessibility
|
NULL
|
Search
Jiminny\Models\User, class
Jiminny\Services Search
Jiminny\Models\User, class
Jiminny\Services\Crm\IntegrationApp\DTO\User, final class
Jiminny\Component\Slack\DTO\Event\BlockAction\User, class
Jiminny\Component\LiveFeed\Item\User, final class
Jiminny\Component\CoachingFeedback\Export\User, final class
Couchbase\User, class
http\Client\Curl\User, interface
Laravel\Passport\Bridge\User, class
Workbench\App\Models\User, class
Microsoft\Graph\Generated\Models\User, class
User, class
Illuminate\Foundation\Auth\User, class
Illuminate\Tests\Database\User, class
Illuminate\Tests\Database\Fixtures\Models\User, class
Illuminate\Tests\Validation\User, class
Illuminate\Tests\Integration\Http\Resources\JsonApi\Fixtures\User, class
Illuminate\Tests\Integration\Queue\User, class
Illuminate\Tests\Integration\Support\User, class
Illuminate\Tests\Integration\Database\EloquentPivotWithoutTimestampTest\User, class
Illuminate\Tests\Integration\Database\EloquentMultiDimensionalArrayEagerLoadingTest\User, class
Illuminate\Tests\Integration\Database\EloquentMorphLazyEagerLoadingTest\User, class
Illuminate\Tests\Integration\Database\EloquentWhereHasTest\User, class
Illuminate\Tests\Integration\Database\EloquentBelongsToTest\User, class
Illuminate\Tests\Integration\Database\EloquentHasOneOfManyTest\User, class
Illuminate\Tests\Integration\Database\EloquentModelLoadMissingTest\User, class
Illuminate\Tests\Integration\Database\EloquentEagerLoadingLimitTest\User, class
Illuminate\Tests\Integration\Database\User, class
Illuminate\Tests\Integration\Database\EloquentMorphToLazyEagerLoadingTest\User, class
Illuminate\Tests\Integration\Database\EloquentHasManyThroughTest\User, class
Illuminate\Tests\Integration\Database\EloquentMorphEagerLoadingTest\User, class
Illuminate\Tests\Integration\Database\EloquentCollectionLoadMissingTest\User, class
Illuminate\Tests\Integration\Database\EloquentBelongsToManyTest\User, class
Illuminate\Tests\Integration\Database\Fixtures\User, class
Illuminate\Tests\Integration\Validation\User, class
Illuminate\Types\Relations\User, class
Illuminate\Types\Builder\User, class
Google\Service\Keep\User, class
Google\Service\Drive\User, class
Google\Service\Blogger\User, class
Google\Service\SQLAdmin\User, class
Google\Service\Directory\User, class
Google\Service\AlertCenter\User, class
Google\Service\CloudSearch\User, class
Google\Service\DisplayVideo\User, class
Google\Service\HangoutsChat\User, class
Google\Service\DriveActivity\User, class
Google\Service\AndroidPublisher\User, class
Google\Service\DeveloperConnect\User, class
Google\Service\AndroidEnterprise\User, class
Google\Service\AndroidManagement\User, class
Google\Service\CloudAlloyDBAdmin\User, class
Google\Service\AnalyticsReporting\User, class
Google\Showcase\V1beta1\User, class
Psy\Test\Fixtures\ImplicitUse\App\Model\User, class
Psy\Test\Fixtures\ImplicitUse\App\View\User, class
Psy\Test\Fixtures\ImplicitUse\App\Legacy\User, class
Psy\Test\Fixtures\Completion\User, class
Class to import...
|
73534
|
|
73535
|
1815
|
12
|
2026-04-23T07:53:36.451633+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-23/1776 /Users/lukas/.screenpipe/data/data/2026-04-23/1776930816451_m2.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
Jiminny\Models\User, class
Jiminny\Services Search
Jiminny\Models\User, class
Jiminny\Services\Crm\IntegrationApp\DTO\User, final class
Jiminny\Component\Slack\DTO\Event\BlockAction\User, class
Jiminny\Component\LiveFeed\Item\User, final class
Jiminny\Component\CoachingFeedback\Export\User, final class
Couchbase\User, class
http\Client\Curl\User, interface
Laravel\Passport\Bridge\User, class
Workbench\App\Models\User, class
Microsoft\Graph\Generated\Models\User, class
User, class
Illuminate\Foundation\Auth\User, class
Illuminate\Tests\Database\User, class
Illuminate\Tests\Database\Fixtures\Models\User, class
Illuminate\Tests\Validation\User, class
Illuminate\Tests\Integration\Http\Resources\JsonApi\Fixtures\User, class
Illuminate\Tests\Integration\Queue\User, class
Illuminate\Tests\Integration\Support\User, class
Illuminate\Tests\Integration\Database\EloquentPivotWithoutTimestampTest\User, class
Illuminate\Tests\Integration\Database\EloquentMultiDimensionalArrayEagerLoadingTest\User, class
Illuminate\Tests\Integration\Database\EloquentMorphLazyEagerLoadingTest\User, class
Illuminate\Tests\Integration\Database\EloquentWhereHasTest\User, class
Illuminate\Tests\Integration\Database\EloquentBelongsToTest\User, class
Illuminate\Tests\Integration\Database\EloquentHasOneOfManyTest\User, class
Illuminate\Tests\Integration\Database\EloquentModelLoadMissingTest\User, class
Illuminate\Tests\Integration\Database\EloquentEagerLoadingLimitTest\User, class
Illuminate\Tests\Integration\Database\User, class
Illuminate\Tests\Integration\Database\EloquentMorphToLazyEagerLoadingTest\User, class
Illuminate\Tests\Integration\Database\EloquentHasManyThroughTest\User, class
Illuminate\Tests\Integration\Database\EloquentMorphEagerLoadingTest\User, class
Illuminate\Tests\Integration\Database\EloquentCollectionLoadMissingTest\User, class
Illuminate\Tests\Integration\Database\EloquentBelongsToManyTest\User, class
Illuminate\Tests\Integration\Database\Fixtures\User, class
Illuminate\Tests\Integration\Validation\User, class
Illuminate\Types\Relations\User, class
Illuminate\Types\Builder\User, class
Google\Service\Keep\User, class
Google\Service\Drive\User, class
Google\Service\Blogger\User, class
Google\Service\SQLAdmin\User, class
Google\Service\Directory\User, class
Google\Service\AlertCenter\User, class
Google\Service\CloudSearch\User, class
Google\Service\DisplayVideo\User, class
Google\Service\HangoutsChat\User, class
Google\Service\DriveActivity\User, class
Google\Service\AndroidPublisher\User, class
Google\Service\DeveloperConnect\User, class
Google\Service\AndroidEnterprise\User, class
Google\Service\AndroidManagement\User, class
Google\Service\CloudAlloyDBAdmin\User, class
Google\Service\AnalyticsReporting\User, class
Google\Showcase\V1beta1\User, class
Psy\Test\Fixtures\ImplicitUse\App\Model\User, class
Psy\Test\Fixtures\ImplicitUse\App\View\User, class
Psy\Test\Fixtures\ImplicitUse\App\Legacy\User, class
Psy\Test\Fixtures\Completion\User, class
Class to import...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Jiminny\\Models\\User, class","depth":4,"bounds":{"left":0.41090426,"top":0.6328811,"width":0.25033244,"height":0.017557861},"role_description":"text"},{"role":"AXStaticText","text":"Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\User, final class","depth":4,"bounds":{"left":0.41090426,"top":0.65043896,"width":0.25033244,"height":0.017557861},"role_description":"text"},{"role":"AXStaticText","text":"Jiminny\\Component\\Slack\\DTO\\Event\\BlockAction\\User, class","depth":4,"bounds":{"left":0.41090426,"top":0.6679968,"width":0.25033244,"height":0.017557861},"role_description":"text"},{"role":"AXStaticText","text":"Jiminny\\Component\\LiveFeed\\Item\\User, final class","depth":4,"bounds":{"left":0.41090426,"top":0.6855547,"width":0.25033244,"height":0.017557861},"role_description":"text"},{"role":"AXStaticText","text":"Jiminny\\Component\\CoachingFeedback\\Export\\User, final class","depth":4,"bounds":{"left":0.41090426,"top":0.70311254,"width":0.25033244,"height":0.017557861},"role_description":"text"},{"role":"AXStaticText","text":"Couchbase\\User, class","depth":4,"bounds":{"left":0.41090426,"top":0.7206704,"width":0.25033244,"height":0.017557861},"role_description":"text"},{"role":"AXStaticText","text":"http\\Client\\Curl\\User, interface","depth":4,"bounds":{"left":0.41090426,"top":0.73822826,"width":0.25033244,"height":0.017557861},"role_description":"text"},{"role":"AXStaticText","text":"Laravel\\Passport\\Bridge\\User, class","depth":4,"bounds":{"left":0.41090426,"top":0.7557861,"width":0.25033244,"height":0.017557861},"role_description":"text"},{"role":"AXStaticText","text":"Workbench\\App\\Models\\User, class","depth":4,"bounds":{"left":0.41090426,"top":0.773344,"width":0.25033244,"height":0.017557861},"role_description":"text"},{"role":"AXStaticText","text":"Microsoft\\Graph\\Generated\\Models\\User, class","depth":4,"bounds":{"left":0.41090426,"top":0.79090184,"width":0.25033244,"height":0.017557861},"role_description":"text"},{"role":"AXStaticText","text":"User, class","depth":4,"bounds":{"left":0.41090426,"top":0.8084597,"width":0.25033244,"height":0.017557861},"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Foundation\\Auth\\User, class","depth":4,"bounds":{"left":0.41090426,"top":0.82601756,"width":0.25033244,"height":0.017557861},"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Database\\User, class","depth":4,"bounds":{"left":0.41090426,"top":0.8435754,"width":0.25033244,"height":0.017557861},"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Database\\Fixtures\\Models\\User, class","depth":4,"bounds":{"left":0.41090426,"top":0.8611333,"width":0.25033244,"height":0.017557861},"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Validation\\User, class","depth":4,"bounds":{"left":0.41090426,"top":0.87869114,"width":0.25033244,"height":0.017557861},"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Integration\\Http\\Resources\\JsonApi\\Fixtures\\User, class","depth":4,"bounds":{"left":0.41090426,"top":0.896249,"width":0.25033244,"height":0.017557861},"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Integration\\Queue\\User, class","depth":4,"bounds":{"left":0.41090426,"top":0.91380686,"width":0.25033244,"height":0.017557861},"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Integration\\Support\\User, class","depth":4,"bounds":{"left":0.41090426,"top":0.9313647,"width":0.25033244,"height":0.017557861},"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Integration\\Database\\EloquentPivotWithoutTimestampTest\\User, class","depth":4,"bounds":{"left":0.41090426,"top":0.9489226,"width":0.25033244,"height":0.017557861},"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Integration\\Database\\EloquentMultiDimensionalArrayEagerLoadingTest\\User, class","depth":4,"bounds":{"left":0.41090426,"top":0.96648043,"width":0.25033244,"height":0.017557861},"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Integration\\Database\\EloquentMorphLazyEagerLoadingTest\\User, class","depth":4,"bounds":{"left":0.41090426,"top":0.9840383,"width":0.25033244,"height":0.015961707},"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Integration\\Database\\EloquentWhereHasTest\\User, class","depth":4,"bounds":{"left":0.41090426,"top":1.0,"width":0.25033244,"height":-0.0015962124},"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Integration\\Database\\EloquentBelongsToTest\\User, class","depth":4,"bounds":{"left":0.41090426,"top":1.0,"width":0.25033244,"height":-0.019154072},"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Integration\\Database\\EloquentHasOneOfManyTest\\User, class","depth":4,"bounds":{"left":0.41090426,"top":1.0,"width":0.25033244,"height":-0.03671193},"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Integration\\Database\\EloquentModelLoadMissingTest\\User, class","depth":4,"bounds":{"left":0.41090426,"top":1.0,"width":0.25033244,"height":-0.05426979},"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Integration\\Database\\EloquentEagerLoadingLimitTest\\User, class","depth":4,"bounds":{"left":0.41090426,"top":1.0,"width":0.25033244,"height":-0.07182765},"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Integration\\Database\\User, class","depth":4,"bounds":{"left":0.41090426,"top":1.0,"width":0.25033244,"height":-0.08938551},"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Integration\\Database\\EloquentMorphToLazyEagerLoadingTest\\User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Integration\\Database\\EloquentHasManyThroughTest\\User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Integration\\Database\\EloquentMorphEagerLoadingTest\\User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Integration\\Database\\EloquentCollectionLoadMissingTest\\User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Integration\\Database\\EloquentBelongsToManyTest\\User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Integration\\Database\\Fixtures\\User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Tests\\Integration\\Validation\\User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Types\\Relations\\User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Illuminate\\Types\\Builder\\User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Google\\Service\\Keep\\User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Google\\Service\\Drive\\User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Google\\Service\\Blogger\\User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Google\\Service\\SQLAdmin\\User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Google\\Service\\Directory\\User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Google\\Service\\AlertCenter\\User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Google\\Service\\CloudSearch\\User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Google\\Service\\DisplayVideo\\User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Google\\Service\\HangoutsChat\\User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Google\\Service\\DriveActivity\\User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Google\\Service\\AndroidPublisher\\User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Google\\Service\\DeveloperConnect\\User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Google\\Service\\AndroidEnterprise\\User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Google\\Service\\AndroidManagement\\User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Google\\Service\\CloudAlloyDBAdmin\\User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Google\\Service\\AnalyticsReporting\\User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Google\\Showcase\\V1beta1\\User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Psy\\Test\\Fixtures\\ImplicitUse\\App\\Model\\User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Psy\\Test\\Fixtures\\ImplicitUse\\App\\View\\User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Psy\\Test\\Fixtures\\ImplicitUse\\App\\Legacy\\User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Psy\\Test\\Fixtures\\Completion\\User, class","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"Class to import","depth":1,"bounds":{"left":0.41422874,"top":0.6065443,"width":0.24368352,"height":0.026336791},"role_description":"text"}]...
|
11378629446154887
|
-6164043535022962829
|
click
|
accessibility
|
NULL
|
Search
Jiminny\Models\User, class
Jiminny\Services Search
Jiminny\Models\User, class
Jiminny\Services\Crm\IntegrationApp\DTO\User, final class
Jiminny\Component\Slack\DTO\Event\BlockAction\User, class
Jiminny\Component\LiveFeed\Item\User, final class
Jiminny\Component\CoachingFeedback\Export\User, final class
Couchbase\User, class
http\Client\Curl\User, interface
Laravel\Passport\Bridge\User, class
Workbench\App\Models\User, class
Microsoft\Graph\Generated\Models\User, class
User, class
Illuminate\Foundation\Auth\User, class
Illuminate\Tests\Database\User, class
Illuminate\Tests\Database\Fixtures\Models\User, class
Illuminate\Tests\Validation\User, class
Illuminate\Tests\Integration\Http\Resources\JsonApi\Fixtures\User, class
Illuminate\Tests\Integration\Queue\User, class
Illuminate\Tests\Integration\Support\User, class
Illuminate\Tests\Integration\Database\EloquentPivotWithoutTimestampTest\User, class
Illuminate\Tests\Integration\Database\EloquentMultiDimensionalArrayEagerLoadingTest\User, class
Illuminate\Tests\Integration\Database\EloquentMorphLazyEagerLoadingTest\User, class
Illuminate\Tests\Integration\Database\EloquentWhereHasTest\User, class
Illuminate\Tests\Integration\Database\EloquentBelongsToTest\User, class
Illuminate\Tests\Integration\Database\EloquentHasOneOfManyTest\User, class
Illuminate\Tests\Integration\Database\EloquentModelLoadMissingTest\User, class
Illuminate\Tests\Integration\Database\EloquentEagerLoadingLimitTest\User, class
Illuminate\Tests\Integration\Database\User, class
Illuminate\Tests\Integration\Database\EloquentMorphToLazyEagerLoadingTest\User, class
Illuminate\Tests\Integration\Database\EloquentHasManyThroughTest\User, class
Illuminate\Tests\Integration\Database\EloquentMorphEagerLoadingTest\User, class
Illuminate\Tests\Integration\Database\EloquentCollectionLoadMissingTest\User, class
Illuminate\Tests\Integration\Database\EloquentBelongsToManyTest\User, class
Illuminate\Tests\Integration\Database\Fixtures\User, class
Illuminate\Tests\Integration\Validation\User, class
Illuminate\Types\Relations\User, class
Illuminate\Types\Builder\User, class
Google\Service\Keep\User, class
Google\Service\Drive\User, class
Google\Service\Blogger\User, class
Google\Service\SQLAdmin\User, class
Google\Service\Directory\User, class
Google\Service\AlertCenter\User, class
Google\Service\CloudSearch\User, class
Google\Service\DisplayVideo\User, class
Google\Service\HangoutsChat\User, class
Google\Service\DriveActivity\User, class
Google\Service\AndroidPublisher\User, class
Google\Service\DeveloperConnect\User, class
Google\Service\AndroidEnterprise\User, class
Google\Service\AndroidManagement\User, class
Google\Service\CloudAlloyDBAdmin\User, class
Google\Service\AnalyticsReporting\User, class
Google\Showcase\V1beta1\User, class
Psy\Test\Fixtures\ImplicitUse\App\Model\User, class
Psy\Test\Fixtures\ImplicitUse\App\View\User, class
Psy\Test\Fixtures\ImplicitUse\App\Legacy\User, class
Psy\Test\Fixtures\Completion\User, class
Class to import...
|
73533
|
|
51794
|
1120
|
12
|
2026-04-20T06:21:18.305124+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-20/1776 /Users/lukas/.screenpipe/data/data/2026-04-20/1776666078305_m1.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
Fetch
Settings
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"help_text":"Search for branches and actions","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Fetch","depth":2,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Settings","depth":2,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
5263564318784573174
|
3786626487802504865
|
app_switch
|
hybrid
|
NULL
|
Search
Fetch
Settings
iTerm2ShellEditViewSessionSc Search
Fetch
Settings
iTerm2ShellEditViewSessionScriptsProfilesWindowHelpalo)Daily - Platform • in 24 mA100% CAPP (-zsh)DOCKERO ₴1DEV (-zsh)₴2APP (-zsh)On branch JY-18909-automated-reports-ask-jiminnyYour branch is behind 'origin/JY-18909-automated-reports-ask-jiminny'by 255Cuse "git pull" to update your local branch)-zsh84screenpipe*• ₴5commits, and can be fast-forwarded.Changes notstaged for commit:Cuse"git add<file>..."to update what will be committed)Cuse "git restore ‹file›..."to discard changes in working directory)modified:.env.localmodified:app/Console/Commands/JiminnyDebugCommand.phpmodified:app/Http/Controllers/API/ActivityController.phpmodified:app/Http/Controllers/Webhook/ReportController.phpmodified:app/Jobs/Team/SyncToIntercom.phpmodified:app/Services/PlaybackService.phpmodified:config/logging.phpmodified:routes/web.phpUntracked files:Cuse "git add<file>..."to include in what will be committed).env.nikilocal.env.otherWEBHOOK_FILTERING_IMPLEMENTATION.mdapp/Console/Commands/Crm/Hubspot/SimulateWebhooksCommand.phpapp/Console/Commands/Reports/CreateMockAskJiminnyReportResultCommand.phpids.txtraw_sql_query.sqltests/Unit/Policies/CanAccessAiReportsTest.phpnochanges added to commitCuse"gitadd"and/or "git commit -a")lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (JY-18909-automated-reports-ask-jiminny) $ git pullremote: Enumerating objects: 183, done.remote: Counting objects: 100% (183/183), done.remote: Compressing objects: 100% (62/62), done.remote: Total 183 (delta 130), reused 174 (delta121), pack-reused 0 (from 0)Receiving objects: 100% (183/183), 31.57 KiB | 1.86 MiB/s, done.Resolving deltas: 100% (130/130), completed with 24 local objects.From github.com:jiminny/app360f12addd..cf378aa07bJY-20541-cleanup-stale-tasks-and-events -> origin/JY-20541-cleanup-stale-tasks-and-events+ 01c43d2aa6...f6c0ec3d8b JY-20553-debug-crm-sync-delays-> origin/JY-20553-debug-crm-sync-delays* [new branch]JY-20701-reschedule-HubSpot-processing-> origin/JY-20701-reschedule-HubSpot-processingUpdating a0a9685c0d..da535e5554error: Your local changesto the following files would be overwritten by merge:app/Http/Controllers/Webhook/ReportController.phpPlease commit your changes or stash them before you merge.Aborting(forced update)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (JY-18909-automated-reports-ask-jiminny) $O* Review screenpipe u...• 86Mon 20 Apr 9:21:18-zshT81APP...
|
NULL
|
|
74216
|
1844
|
18
|
2026-04-23T09:27:39.073243+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-23/1776 /Users/lukas/.screenpipe/data/data/2026-04-23/1776936459073_m2.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
Fetch
Settings
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"bounds":{"left":0.29986703,"top":0.058260176,"width":0.09674202,"height":0.022346368},"help_text":"Search for branches and actions","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Fetch","depth":2,"bounds":{"left":0.39993352,"top":0.059856344,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Settings","depth":2,"bounds":{"left":0.4085771,"top":0.059856344,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
5263564318784573174
|
3786626487802504865
|
click
|
hybrid
|
NULL
|
Search
Fetch
Settings
DMSActivityMorePhpStormViewI Search
Fetch
Settings
DMSActivityMorePhpStormViewINavigarecodeLaravelKeractorTOOISWindowmelpJiminny... v# platform-tickets# product launches# random# releases# sofia-office# support# thank-yous# the_people_of jimi...6? Direct messagesAdelina Petrova D(3) Aneliva Angelova. ...Stoyan TomovNikolay YankovP Petko Kashinski. Aneliya AngelovaNikolay Nikolov# Mario GeoreievSe: Todor StamatovA Gabriela DurevaVasil Vasilev. Galva DimitrovaStefka Stoyanova*% Stoyan Tanev::: AppsJira CloudConolo CalelFV faVsco.js°9 JY-20157-AJ-report-not-send-notificationProiectvAdelina Petrova• MessagesAdd canvaur Filesла звьнна пі!Thursdav. Apri 9th vAdelina Peuovaлай даA huddle happened 2:26 PMYou and Adelina Petrova were in the huddle forLukas Kovalik 2:30 PMIautomated-revort-generated"Adelina Perrova 2:45 PMlnuos:/run.useroilot.lo/events/trackedeventu run.useroilor.1oUseroilotUseroilot helos product teams delivernersonalized in-aon experiences toincrease growtn metrics at every stage oithe user iourneyLukas Kovallk 12.22 PMзппасти длиAdelina Petrova F 12:22 PMLukas Kovallk 12:22 PMкогато имаш влеме ла те питам за userollot.Message Adelina Petrova In a meeting • Goo..+ Aalv @ Automatv D UserluestGenerateAskJiminnyReportJob.php= custom.log= laravel.logA HS_local ([jiminny@localhost]< Update Project..o- commit...A PuSn..« SF jiminny@localhost] X# concale [pponi© DatabaseActivities.php& console [STAGING)>@ CalendavGCrmCa bool.© Impo- New Branch...Checkout Taa or Revision..© Impo© Initpr© Layo© LayorRema© RemcC) Reso© SyncC) Svnc© SyncRecentJY-2015/-AJ-report-not-send-notification ›masterJy. 18302- atiomors promnotion iles v)%9 JY-20692-fix-integration-app-token-auth• >• Locall• Remote• Tags› M DealRisks> M slasticSearch>O Groups> D Import> M Mailhoyv D Nudges> MUcerPilot© CreateNudgeCreatedEvent.ph 5€> • Opportunitiesv D Playbooks© AttachLayout.php© ChangeSidekickSettings.php© CreatePlaybookCreatedEvent.v 0 Playlists> @ Activitiesv → Planhat© CreateActivityAddedToPlay> M UserPilot@ ImportGroupPlavlistSharesList._Teams> O Transcriptionv Users© AutomatedReportsCommandTest.phpTrackAutomatedReportGeneratedEvent.php x(©) DealsRepository.pnpconsole EUTy: AutoyGo jiminnyselect * trom teams where 1d = 11021 A1 A17 X.2 X4Aselect * from aroups a JOIN plavbooks p 1..n<->1: on a.plavbook id = r182select * from groups where id = 28select * from playbooks where team_id = 1;select * from plavbooks where id = 179:select * from plavbook categories where id = 1391:ain/JY-20372stion-pades >sortResult nhnl5 Cc W *ReportGeneratedEvent .A1A2 V1 ^ V1192matedReport) asSthis-susenPilotclientl>tnack/SusenseventNarcatch (GuzzleFycention So) &sthis-neleased delav. 3490)•199200201202private function resolveUsers(AutomatedReport SautomatedRe 206if (SautomatedReport->isAskJiminnvReport@) {Screator = SautomatedReport->qetCreator@:©ActivityProviderintegrated.phpC CreateDefaultPlaylist.php© CreateDefaultSavedSearches.1 usageselect * from crm profiles where user 1d = 143:select * from activities where crm_configuration_id = 39 and type =and erm nroviden id is Not NUUL OROSk hy id desc.select * fron activities where id = 422003• # A0U0400000nR6fnMAc.SELECT ar.id, ar.uuid, ar.media type, ar.status, a.typeEROM automated nenont nesults arJOIN automated_reports a ON a.id = ar.reportidWHERE a.type = 'ask_jiminny'ITMTT 10.SELECT 'automated report results'.* FROM 'automated_report_resultsTMNEP I0TN 'automatod nononteiautomated report results'.'report id' = 'automated_reports'.'irwuCoe 1=1automated_report_results'.'generated at IS NOT NULLAND 'automated report results'.'sent at' IS NOT NULLIANDmated reports', 'team id' = 1AND JSON CONTAINS('automated reports','recipients'. 143.'$. "usersSELECT * FROM automated reports where id = 67:SELECT * FROM automated_reports where id = 42;CascadeNew Cascade#Userpilot Introducti... 3 m left100% S2Inu 23 Aor 12-2/.39AutomatedReportsCommandTestv+0 ..Cascade Code xKick off a new project. Make changesacross your entre codedase.select * from activities where crm_configuration_id = 39and nocondina ctato = Inocondedi and dunation > 4aland ctatuc -'2025-12-01':colont d Gnom loode.(e) CotunMailSune nhn© Syncintercom.phpAutomated Reports Logic ReviewC, Deal Insights Scheduled Activities© Report Activity Count MismatchAsk anvthing (*4L)+ « Code1ucanoWN Windsurf Teams62•55UTE.8io 4 spaces...
|
74215
|
|
51511
|
1115
|
2
|
2026-04-20T06:09:12.818172+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-20/1776 /Users/lukas/.screenpipe/data/data/2026-04-20/1776665352818_m2.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"bounds":{"left":0.068484046,"top":0.058260176,"width":0.09674202,"height":0.022346368},"help_text":"Search for branches and actions","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
1834478591854514657
|
1834478591854514657
|
visual_change
|
hybrid
|
NULL
|
Search
PhpStormFV faVsco.jsVIeWINavigareCodeLarave Search
PhpStormFV faVsco.jsVIeWINavigareCodeLaravelKeractor#11988 on JY-20698-fix-SF-activity-types-on...ybookTOOISWindowmelpProledeycroup.onp© ImportActivity TypesTest.phpSearch for branches and actions= env.circleci-n= .env.localE .env.migrateE .env.nikilocalE .env.otherE .env.productioE .env.productioE.env.qaE .env.qaiE.env.rootE .env.stagingE ,qutattributesO .gitignore= .ono-cs-rixer.cC) FieldRepository.phpkeponcontroller.on:JiminnyDeougcommano.ong< Update Prolect...o commit...A PuSn..e snow Pull kequestin the 1ool WindowSubmit Review...Review Mode© AutomatedReportsCommand.php(©) CreateHeldActivityEvent.phpС)1rackProviderinstalledevent.php©) ACtiViLyLoqged,onoce.php(C) RequestGenerateReportJob.php© AutomatedReportResult.php- New Branch..checkout liad or Revision...LobNModel implenents GroupcontractE.phpunit.result= orettierianoreE.windsurfrulesRecent# JY-20698-fix-SF-Jgy tivity-types-on-new-playbook origin/JY-20698-fix-SF-activity-types-on-new-playbook>* masterorigin/master ›f° JY-18909-automated-reports-ask-jl...setCountryCodeAttcibute($value){..}f9 JY-20692-fix-integration-app-token-auth >F9 JY-20543-AJ-report-trackingorigin/J... >getCountryNameAttribute(): stringf….,› LocalRemotegetCountryName(): stringf.,› TagsgetCountryCode(): stringf.,php artisan0 composer.json*comooser lock0 dependency-checker.json0 dev.jsonE ids.txt2072082132141219220= infection ison distM+INSTALL.mdM+INTERNAL_WEBHOOK_SETUP.md222Ejiminny_storageM+licenses.mdM Makefile0 package-lock.jsonE phpstan.neon.distE phpstan-baseline.neon229<$ phpunit.xmlTa raw_sql_query.sql+ README.md{ô sonar-proiect.properties233E test.ov‹> Untitled Diagram.xml234238fis vetur.confia.is239M+ WEBHOOK_FILTERING_IMPLEMENTATI 240> 1h Extemnal Librariesv E° Scratches and Consolesv M Database Consoles246251public function getDefaultLanguage(): stringf….,public function getDefaultTimezone(): stringf..,pubLic tunction getPhotourlAttribute): stringreturn cdn( asset: 'img/flags/1x1/' . strtolower($this->country_code) . '.svg');nubuic function detPhotolrlo: strino/** @var string */return $this->getAttribute( key: 'photo_url');* The channels the user receives notification broadcasts on.public function receivesBroadcastNotificationsOn(): stringf..,/** @return BelongsTo<User, self> */public function user(): BelongsTof.,public function getowner(): Userf..,public function members(): HasMany{…..,#concole =llllA DEAL RISKS [EU]public function membersActive(): HasManyf….ADieUlA FUTFINDublic function Dlavbook()f..The Hunspell plugin has been deprecated. If you're not writing in Hungarian, you can safely uninstall Hunspell without affecting the dictionaries for other languages. (mlents ago)= custom.logA console [STAGING]E laravel.logA SF [jiminny@localhost]A console (PROD]A console [EU] X15851586158715881589|46 ^ Y 15901591159215931594=1595— 1596=1597— 1598-1599-[CREDIT_CARD]=16041605=160616081609161016111612=16131614T161516161618=1619=1620-162116221623162416251626—16271628=1629-1630=16311632Tx: Autovsa.*,t.owner_id FROM social_accounts saJOIN users u on u.id = sa.sociable_idJOIN teams t 1.n<->1: on t.id = u.team_idWHERE U.team_id = 556 and sa.provider = 'integration-app';select * from opportunities where id = 7594349;select * from opportunity_stages where opportunity_id = 7594349 order by created_at desc;select * from business_processes where id = 6024;select * from business_process_stages where stage_id = 16352;select * from business_process_stages where business_process_id = 6024;select * from stages where team_id = 459;select * from teams where id = 459;SELECTCONCAT(u.id, CASE WHEN U.id = t.owner_id THEN ' (owner)' ELSE "' END) AS user_id,u.email,sa.*,t.owner_id FROM social_accounts saJOIN users u on u.id = sa.sociable_idJOIN teams t 1.n<->1: on t.id = u.team_idWHERE u. team_id = 459 and sa.provider = 'hubspot';SELECT os.stage_id, s.crm_provider_id, s.name,COUNT(*) as cntFROM opportunity_stages osJOIN stages s1..n<->1: ON s.id = os.stage_idWHERE os.opportunity_id = 7594349GROUP BY os.stage_id, s.crm_provider_id, s.nameORDER BY cnt DESC;SELECT s.id, s.crm_provider_id, s.name, s.team_id, s.crm_configuration_idFROM stages sJOIN business_process_stages bps 1<->1.n: ON bps.stage_id = s.idWHERE bps.business_process_id = 6024AND s.crm_provider_id = 'contractsent';select * from stages where id IN (16352,20612, 18281, 7344,16378, 16309,5036, 15223, 14535, 6293, 12098, 11607)SELECT * FROM teams WHERE name LIKE "%Pulsar Group%'; # 472, 380, 15138, [EMAIL] * from playbooks where team_id = 472; # event 226147SELECT * FROM playbook_categories WHERE playbook_id = 5515;SELECT * FROM crm_fields WHERE id = 226147;SELECT * FROM crm_field_values WHERE crm_field_id = 226147;SELECT * FROM crm_configurations WHERE id = 380;SELECTCONCAT(u.id, CASE WHEN U.id = t.owner_id THEN ' (owner)' ELSE "' END) AS user_iduemanlsa.*towner id FROM social accounts saNew Cascade50 lihi"Dally - Platrorm • In 3om100% S2Mon ZU Aor 9:09.12L RequestGenerateAskJiminnyReportJobTest+O •dojiminny vBISAYCacanda Coda es.Kick off a new project. Make changesacross your entire codedaseGroup Photo URL ReviewUpdate Connection LoaicAsk anvthing (84D)C° Adantive• The Hunspell plugin has been deprecated. Ifyou're notwriting in Hungarian, you can safelydictionaries tor ell ver laut afteswithout arrecting te• Laravel Idea: Generate Helper Code?Heloer Code willl nelo IDe to understand vourLaravel apo code.GenerateDon't Show AnvmoreW Windsurf Team1612•67 1UTE.R4 spaces...
|
NULL
|
|
51795
|
1121
|
16
|
2026-04-20T06:21:18.398868+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-20/1776 /Users/lukas/.screenpipe/data/data/2026-04-20/1776666078398_m2.jpg...
|
PhpStorm
|
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
Fetch
Settings
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"bounds":{"left":0.068484046,"top":0.058260176,"width":0.09674202,"height":0.022346368},"help_text":"Search for branches and actions","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Fetch","depth":2,"bounds":{"left":0.16855054,"top":0.059856344,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Settings","depth":2,"bounds":{"left":0.17719415,"top":0.059856344,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
5263564318784573174
|
3786626487802504865
|
visual_change
|
hybrid
|
NULL
|
Search
Fetch
Settings
PhostormProledeyVIewNavicare Search
Fetch
Settings
PhostormProledeyVIewNavicarecodeLaravelKeractorJOOISWindowFV faVsco.jsSearch for branches and actions.D Crm© ImportActivityTypesTest.php© Playbook.php© ReportController.php= custom.log=laravel.log4 SF [jiminny@localhost]A HS_local (jiminny@localhost]& console (PROD]4 console [EU] XA console [STAGING]< Update Proect...o commit..A PuSn..snow Pull kequestin the 1ool Windowsubmit Review• Update to Enable Review Mode..©) AutomatedReporisservice.ong© CreateActivityLoqgedEvent.php)Acuivilyloqged.ohp© LayorRem© Reso- New Branch..checkout liag or Revision...LobN(C) SvndC Svncc) SvndRecent• DealRisc JY-18909-automated-renorts-ask-1..l Easticst1 JY-20692-fix-intearation-aop-token-auth.>GrounsmlimoorM MailboxM NudaesM Onnortu• Playboo'9 JY-20698-fix-SF-activitv-tvoes-on-new-rmaster# JY-20543-AJ-report-trackingorigin/J...>> LocalRemote> TagsD Playlistsrreams1 TranscrintionMMUsersWebhookE.gitkeep© ChangeLogContextCorrelationld.f• MMoillv D Models0 Activity0 AiASKAnythinaCalendarconnectiona contractsM CrmC)BusinessProcess.ohoC) Confiauration.ohoC) ContactRole.oho© Field.ohp© FieldData.phpCSieldValue.oho(C) Lavout nhn@ LavoutEntitv.ohn© Log.php@ Profile nhn© RecordType.php© SyncBatch.phpTm CinctinCoarchM SonturoMonnortunitv.ce.phpC) AutomatedReport.php(C) RequestGenerateAskJiminnyReportJob.php(C) RequestGenerateReportJob.php11584158511586÷ A2 л v 1587,Uypes implements ShouldQueueconstructdonly FieldRepository $fieldRepository,only PlaybookCategoryRepository Srepository.15891591andard Event/Task Type picklist options from the CRM.15931159411595nandle(PlaybookCreated Sevent): void11597159811599I Don't run if somehow we already have categories.if (Splaybook->qetCategories->isNotEmptyO) {scrmservice = sth1s->crmresolver-›resoveror eamcsolavbook->oeteano):ScrmService->svncrieldsplavbook->qetActivitvrieldop:1601.160211603116041605116061607svalues = ScrmService->imoortPickuistValues(Solavbook->qetActivitvFieldo0:*16081609if (emptv($values)) {Svalues = Sthis->fetchActivitvFieldValues(Solavbook->aetActivitvField@)•** Avan stdClass.lahel• strina- Svalue */foreach (Svalues as Svalue) ^$data = L"namel => Svalue->lahel)"onahledi =s toue'type' => PlaybookCategory::TYPE_ALL if (Str::contains(strtolower(Svalve->label), ['sms sent', 'sms out', 'text in'])) {$data['type'] = PlaybookCategory::TYPE_SMS_OUTBOUND:if (Str::contains(strtolower(Svalue->label), ['sms received', 'sms in'. 'text out'])) {Sdatal 'type'] = PlaybookCategorv::TYPE_ SMS_ INBOUND:16241629116261162"116281Tx: Autovdojiminny v027 A9 A23 V3 V105 ^ VCONCAT(u.id, CASE WHEN V.id = t.owner_id THEN ' (owner)' ELSE'' END) AS user_ia,u.emantsa.*t.owner_id FROM social_accounts saJOIN users u on u.id = sa.sociable_idJOIN teams t 1.n<->1: on t.id = u.team_idWHERE u.team_id = 556 and sa.provider = 'integration-app';select * from opportunities where id = 7594349;select * from opportunity_stages where opportunity_id = 7594349 order by created_at desc;select x Tron business processes where 10 = 0024select * from business process stages where stage id = 16352:select * from business process stages where business process id = 6024select * trom stages where team 10 = 459select * from teams where id = 459:SELECTCONCAT(u.id. CASE WHEN U.id = t.owner id THEN ' (owner)' ELSE 1I END) AS user id!t.owner 1d FROM social accounts saJOIN users u on u.id = sa.sociable_idJOIN teams t 1..n<->1: on t.1d = U.team1dWHERE U.team 1d = 459 and sa.orovider = 'hubspot":ISELECT os stage id. s.erm nrovider id. s.name. COUNT(*) as ent.FROM onnortunity stages osJOTN stages s 1.n<->1: ON s.id = os.stage dWHERE os onnortunitv 1d = 7594349GROUP BY os.stage_id, s.crm_provider_id, s.nameORnER Ry ent nesc•SELECT s.id, s.crm_provider id, s.name, s.team_id, s.crm_configuration_idFROM stages sJOIN business process stages bps 1<->1.n: ON bps.stage id = s.idWHERE bps.business_process_ id = 6024AND s.crm provider id = 'contractsent':select * from stages where id IN (16352,20612,18281,7344, 16378,16309,5036,15223, 14535,6293, 12098, 11607)SELECT * FROM teams WHERE name LIKE '%Pulsar Group%'; # 472, 380, 15138, [EMAIL] * from playbooks where team_id = 472: # event 226147ISELECT * FROM DLavbook categories WHERE Dlavbook 10 = 55151SELECT * FROM crm fields WHERE 10 = 2261475SELECT * FROM crm_field values WHERE crm field id = 226147:SELECT * FROM com confiqurations WHERE id = 3805SELECTCONCAT(u.id. CASE WHEN u.id = t.ownen id THEN • (owner)' ELSE 1I END) AS user idhel"Dally - Platrorm • In 24 m100% S2Mon zu Aor 9:21:10CascadeRequestGenerateAskJiminnyReportJobTest ~Retactor ConnectionNew Cascade+O •Cacanda Coda es.Kick off a new project. Make changesacross your entire codedaseRefactor Connection Conditionals© Playbook Categories Import Debugging and TestingAsk anvthing (84D)C° AdantiveWN Windsurf Teams28-56UTF.RPo 4 spaces...
|
NULL
|
|
77304
|
1941
|
23
|
2026-04-24T09:03:57.333771+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-24/1777 /Users/lukas/.screenpipe/data/data/2026-04-24/1777021437333_m1.jpg...
|
PhpStorm
|
faVsco.js – JiminnyDebugCommand.php
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Pushed JY-20738-debug-AJ-tracking-UP to new branch Pushed JY-20738-debug-AJ-tracking-UP to new branch origin/JY-20738-debug-AJ-tracking-UP
text/html
text/html
text/html
Create pull request
4 files committed
JY-20738 add debug logs on AJ report UP tracking
text/html
text/html
text/html
Edit Commit Message…...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Pushed JY-20738-debug-AJ-tracking-UP to new branch origin/JY-20738-debug-AJ-tracking-UP","depth":3,"value":"Pushed JY-20738-debug-AJ-tracking-UP to new branch origin/JY-20738-debug-AJ-tracking-UP","help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"Create pull request","depth":2,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"4 files committed","depth":2,"role_description":"text"},{"role":"AXTextField","text":"JY-20738 add debug logs on AJ report UP tracking","depth":3,"value":"JY-20738 add debug logs on AJ report UP tracking","help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"Edit Commit Message…","depth":2,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
5462938620976369065
|
-8356179312409174946
|
app_switch
|
accessibility
|
NULL
|
Pushed JY-20738-debug-AJ-tracking-UP to new branch Pushed JY-20738-debug-AJ-tracking-UP to new branch origin/JY-20738-debug-AJ-tracking-UP
text/html
text/html
text/html
Create pull request
4 files committed
JY-20738 add debug logs on AJ report UP tracking
text/html
text/html
text/html
Edit Commit Message…...
|
NULL
|
|
77306
|
1941
|
24
|
2026-04-24T09:03:59.773833+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-24/1777 /Users/lukas/.screenpipe/data/data/2026-04-24/1777021439773_m1.jpg...
|
PhpStorm
|
faVsco.js – JiminnyDebugCommand.php
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Pushed JY-20738-debug-AJ-tracking-UP to new branch Pushed JY-20738-debug-AJ-tracking-UP to new branch origin/JY-20738-debug-AJ-tracking-UP
text/html
text/html
text/html
Create pull request
4 files committed
JY-20738 add debug logs on AJ report UP tracking
text/html
text/html
text/html
Edit Commit Message…
Project: faVsco.js, menu
JY-20738-debug-AJ-tracking-UP, menu
Start Listening for PHP Debug Connections
ReportControllerTest
Run 'ReportControllerTest'
Debug 'ReportControllerTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
3
115
4
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Console\Commands;
use Carbon\Carbon;
use Illuminate\Console\Command;
use InvalidArgumentException;
use Jiminny\Jobs\AutomatedReports\RequestGenerateAskJiminnyReportJob;
use Jiminny\Jobs\AutomatedReports\SendReportMailJob;
use Jiminny\Jobs\JobDispatcherInterface;
use Jiminny\Models\Activity;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Activity\CrmOwnerResolver;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Jiminny\Services\UserPilot\UserPilotClient;
/**
* Class JiminnyDebugCommand
*
* @package Jiminny\Console\Commands
*/
class JiminnyDebugCommand extends Command
{
public const string FREQUENCY_DAILY = 'daily';
public const string FREQUENCY_WEEKLY = 'weekly';
public const string FREQUENCY_MONTHLY = 'monthly';
public const string FREQUENCY_QUARTERLY = 'quarterly';
public const string FREQUENCY_ONE_OFF = 'one_off';
protected $signature = 'jiminny:debug';
public function handle(
JobDispatcherInterface $jobDispatcher,
AutomatedReportsService $automatedReportsService,
AutomatedReportsRepository $automatedReportsRepository,
UserPilotClient $userPilotClient
): void {
$user = User::find(143);
// $count = $automatedReportsRepository->countUserReports($user);
// $this->info("Count: {$count}");
// $count = $automatedReportsRepository->countAllUserReports($user);
// $this->info("All count: {$count}");
$payload = [
'report_type' => 'ask_jiminny',
'frequency' => 'weekly',
];
$userPilotClient->track($user, 'ask-jiminny-report-generated', $payload);
exit(1);
$now = Carbon::now()->subDay(1);
$this->info("Now: {$now->toDateTimeString()}");
$weekStart = Carbon::getWeekStartsAt();
$this->info("Now: {$weekStart}");
// $from = $now->copy()->previousWeekday()->startOfDay();
// $to = $now->copy()->previousWeekday()->endOfDay();
// $fromOld = $now->copy()->subWeeks(1)->startOfDay();
// $toOld = $now->copy()->subDay()->endOfDay();
// $fromNew = $now->copy()->subWeek()->startOfWeek();
// $toNew = $now->copy()->subWeek()->endOfWeek();
// $fromOld = $now->copy()->subMonths(1)->startOfDay();
// $toOld = $now->copy()->subDay()->endOfDay();
// $fromNew = $now->copy()->subMonthNoOverflow()->startOfMonth();
// $toNew = $now->copy()->subMonthNoOverflow()->endOfMonth();
$fromOld = $now->copy()->subMonths(3)->startOfDay();
$toOld = $now->copy()->subDay()->endOfDay();
$fromNew = $now->copy()->subQuarterNoOverflow()->startOfQuarter();
$toNew = $now->copy()->subQuarterNoOverflow()->endOfQuarter();
$this->info("From old: {$fromOld->toDateTimeString()}");
$this->info("To old: {$toOld->toDateTimeString()}");
$this->info("From new: {$fromNew->toDateTimeString()}");
$this->info("To new: {$toNew->toDateTimeString()}");
exit(1);
$report = AutomatedReport::find(71);
$job = new RequestGenerateAskJiminnyReportJob($report->getUuid());
$jobDispatcher->dispatch($job);
exit(1);
// $this->formatDate($jobDispatcher);
// $this->sendMail($jobDispatcher, $automatedReportsService);
// $this->crmService();
$this->getPayload($automatedReportsService);
exit(1);
}
private function crmService()
{
$activity = Activity::find(418141);
$team = Team::find(19);
$config = $team->getCrmConfiguration();
$crmResolver = app(CrmOwnerResolver::class, [
'team' => $team,
'integrationAdmin' => $team->getOwner(),
'providerSlug' => $config->getProviderName(),
]);
$crmService = $crmResolver->prepareCrmService();
$crmService->createTranscriptNotes($activity);
}
private function sendMail(JobDispatcherInterface $jobDispatcher, AutomatedReportsService $automatedReportsService)
{
$reportUuid = '';
// $report = $automatedReportsService->getReportResult($reportUuid);
$report = AutomatedReportResult::find(275);
$validRecipients = $automatedReportsService->getValidRecipientUsers(
$report->getReport(),
includeJiminny: true,
);
$recipient = $validRecipients[0];
$fileName = $automatedReportsService->getReportFileName($report);
$typeName = $report->getReport()->getCustomName()
?? $automatedReportsService->getReportTypeName($report);
$teamsName = $automatedReportsService->getReportTeamsName($report);
$periodName = $automatedReportsService->getReportPeriodName($report);
$s3Path = $automatedReportsService->getMediaPath($report);
\Illuminate\Support\Facades\Log::channel('custom_channel')->info('$fileName ' . PHP_EOL . print_r($fileName, true));
\Illuminate\Support\Facades\Log::channel('custom_channel')->info('$typeName ' . PHP_EOL . print_r($typeName, true));
\Illuminate\Support\Facades\Log::channel('custom_channel')->info('$teamsName ' . PHP_EOL . print_r($teamsName, true));
\Illuminate\Support\Facades\Log::channel('custom_channel')->info('$periodName ' . PHP_EOL . print_r($periodName, true));
\Illuminate\Support\Facades\Log::channel('custom_channel')->info('$s3Path ' . PHP_EOL . print_r($s3Path, true));
$jobDispatcher->dispatch(
new SendReportMailJob(
reportUuid: $report->getUuid(),
s3Path: $s3Path,
recipientEmail: $recipient['email'],
recipientName: $recipient['name'] ?? null,
fileName: $fileName,
typeName: $typeName,
teamsName: $teamsName,
periodName: $periodName,
isAskJiminny: true,
)
);
exit(1);
}
private function formatDate(JobDispatcherInterface $jobDispatcher): void
{
$customName = 'Custom report name';
// $frequency = self::FREQUENCY_DAILY;
// $frequency = self::FREQUENCY_WEEKLY;
$frequency = self::FREQUENCY_MONTHLY;
// $frequency = self::FREQUENCY_QUARTERLY;
// $frequency = self::FREQUENCY_ONE_OFF;
$period = $this->calculateFromAndToDatePeriod($frequency);
$from = $period['fromDate'];
$to = $period['toDate'];
$periodName = $this->formatReportPeriodName($frequency, $from, $to);
$filenameSuffix = null;
if ($customName) {
if ($filenameSuffix) {
$customName .= " {$filenameSuffix}";
}
$result = $this->sanitizeFileName("{$customName} - {$periodName}");
}
$this->info($result);
}
public function calculateFromAndToDatePeriod(
string $frequency,
?Carbon $fromDate = null,
?Carbon $toDate = null
): array {
if ($frequency === self::FREQUENCY_ONE_OFF) {
return [
'fromDate' => $fromDate,
'toDate' => $toDate,
];
}
$now = Carbon::now();
return match ($frequency) {
self::FREQUENCY_DAILY => [
'fromDate' => $now->copy()->subDay()->startOfDay(),
'toDate' => $now->copy()->subDay()->endOfDay(),
],
self::FREQUENCY_WEEKLY => [
'fromDate' => $now->copy()->subWeeks(1)->startOfDay(),
'toDate' => $now->copy()->subDay()->endOfDay(),
],
self::FREQUENCY_MONTHLY => [
'fromDate' => $now->copy()->subMonths(1)->startOfDay(),
'toDate' => $now->copy()->subDay()->endOfDay(),
],
self::FREQUENCY_QUARTERLY => [
'fromDate' => $now->copy()->subMonths(3)->startOfDay(),
'toDate' => $now->copy()->subDay()->endOfDay(),
],
default => throw new InvalidArgumentException("Unsupported frequency: {$frequency}"),
};
}
private function formatReportPeriodName(string $frequency, Carbon $from, Carbon $to): string
{
$fromYear = $from->format('Y');
$toYear = $to->format('Y');
$differentYears = $fromYear !== $toYear;
switch ($frequency) {
case self::FREQUENCY_DAILY:
return $from->format('j M Y');
case self::FREQUENCY_QUARTERLY:
// 'Jan-Mar 2025' or 'Nov 2024-Jan 2025' if years differ
$startMonth = $from->format('M');
$endMonth = $to->copy()->subMonth();
$endMonthName = $endMonth->format('M');
$endMonthYear = $endMonth->format('Y');
if ($differentYears) {
return "{$startMonth} {$fromYear} - {$endMonthName} {$endMonthYear}";
}
return "{$startMonth} - {$endMonthName} {$toYear}";
case self::FREQUENCY_MONTHLY:
// 'May 2025' - monthly reports are always within the same year
return $from->format('M Y');
case self::FREQUENCY_WEEKLY:
// '4 - 8 Aug 2025', '27 Oct - 3 Nov 2025', or '28 Dec 2024 - 3 Jan 2025' if years differ
$startDay = $from->format('j');
$endDay = $to->format('j');
$startMonth = $from->format('M');
$endMonth = $to->format('M');
if ($differentYears) {
return "{$startDay} {$startMonth} {$fromYear} - {$endDay} {$endMonth} {$toYear}";
}
if ($startMonth !== $endMonth) {
return "{$startDay} {$startMonth} - {$endDay} {$endMonth} {$toYear}";
}
return "{$startDay} - {$endDay} {$endMonth} {$toYear}";
case self::FREQUENCY_ONE_OFF:
// '2 May-31 May 2025' or '15 Dec 2024-15 Jan 2025' if years differ
$startDay = $from->format('j');
$startMonth = $from->format('M');
$endDay = $to->format('j');
$endMonth = $to->format('M');
// If same month and year, use a format like '2-31 May 2025'
if ($startMonth === $endMonth && ! $differentYears) {
return "{$startDay} - {$endDay} {$startMonth} {$toYear}";
}
// If different years, include both years
if ($differentYears) {
return "{$startDay} {$startMonth} {$fromYear} - {$endDay} {$endMonth} {$toYear}";
}
// Same year but different months
return "{$startDay} {$startMonth} - {$endDay} {$endMonth} {$toYear}";
default:
// Default format for unknown frequencies
return $from->format('j M Y') . ' - ' . $to->format('j M Y');
}
}
public function sanitizeFileName(string $fileName): string
{
return str_replace(['/', '\\'], '-', $fileName);
}
private function getPayload(AutomatedReportsService $automatedReportsService)
{
$reportResult = AutomatedReportResult::find(269);
$automatedReport = $reportResult->getReport();
$activityIds = [1,2,3];
$payload = $automatedReportsService->getAskJiminnyGenerateReportPayload(
automatedReport: $automatedReport,
reportResult: $reportResult,
activityIds: $activityIds,
);
\Illuminate\Support\Facades\Log::channel('custom_channel')->info('$payload ' . PHP_EOL . print_r($payload, true));
}
}
Sync Changes
Hide This Notification...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Pushed JY-20738-debug-AJ-tracking-UP to new branch origin/JY-20738-debug-AJ-tracking-UP","depth":3,"value":"Pushed JY-20738-debug-AJ-tracking-UP to new branch origin/JY-20738-debug-AJ-tracking-UP","help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"Create pull request","depth":2,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"4 files committed","depth":2,"role_description":"text"},{"role":"AXTextField","text":"JY-20738 add debug logs on AJ report UP tracking","depth":3,"value":"JY-20738 add debug logs on AJ report UP tracking","help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"Edit Commit Message…","depth":2,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20738-debug-AJ-tracking-UP, menu","depth":5,"help_text":"Git Branch: JY-20738-debug-AJ-tracking-UP","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"ReportControllerTest","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'ReportControllerTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'ReportControllerTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"3","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"115","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Console\\Commands;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Console\\Command;\nuse InvalidArgumentException;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateAskJiminnyReportJob;\nuse Jiminny\\Jobs\\AutomatedReports\\SendReportMailJob;\nuse Jiminny\\Jobs\\JobDispatcherInterface;\nuse Jiminny\\Models\\Activity;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Activity\\CrmOwnerResolver;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Jiminny\\Services\\UserPilot\\UserPilotClient;\n\n/**\n * Class JiminnyDebugCommand\n *\n * @package Jiminny\\Console\\Commands\n */\nclass JiminnyDebugCommand extends Command\n{\n public const string FREQUENCY_DAILY = 'daily';\n public const string FREQUENCY_WEEKLY = 'weekly';\n public const string FREQUENCY_MONTHLY = 'monthly';\n public const string FREQUENCY_QUARTERLY = 'quarterly';\n public const string FREQUENCY_ONE_OFF = 'one_off';\n protected $signature = 'jiminny:debug';\n\n public function handle(\n JobDispatcherInterface $jobDispatcher,\n AutomatedReportsService $automatedReportsService,\n AutomatedReportsRepository $automatedReportsRepository,\n UserPilotClient $userPilotClient\n ): void {\n $user = User::find(143);\n // $count = $automatedReportsRepository->countUserReports($user);\n // $this->info(\"Count: {$count}\");\n // $count = $automatedReportsRepository->countAllUserReports($user);\n // $this->info(\"All count: {$count}\");\n\n $payload = [\n 'report_type' => 'ask_jiminny',\n 'frequency' => 'weekly',\n ];\n $userPilotClient->track($user, 'ask-jiminny-report-generated', $payload);\n\n exit(1);\n\n $now = Carbon::now()->subDay(1);\n $this->info(\"Now: {$now->toDateTimeString()}\");\n $weekStart = Carbon::getWeekStartsAt();\n $this->info(\"Now: {$weekStart}\");\n\n // $from = $now->copy()->previousWeekday()->startOfDay();\n // $to = $now->copy()->previousWeekday()->endOfDay();\n\n // $fromOld = $now->copy()->subWeeks(1)->startOfDay();\n // $toOld = $now->copy()->subDay()->endOfDay();\n // $fromNew = $now->copy()->subWeek()->startOfWeek();\n // $toNew = $now->copy()->subWeek()->endOfWeek();\n\n // $fromOld = $now->copy()->subMonths(1)->startOfDay();\n // $toOld = $now->copy()->subDay()->endOfDay();\n // $fromNew = $now->copy()->subMonthNoOverflow()->startOfMonth();\n // $toNew = $now->copy()->subMonthNoOverflow()->endOfMonth();\n\n $fromOld = $now->copy()->subMonths(3)->startOfDay();\n $toOld = $now->copy()->subDay()->endOfDay();\n $fromNew = $now->copy()->subQuarterNoOverflow()->startOfQuarter();\n $toNew = $now->copy()->subQuarterNoOverflow()->endOfQuarter();\n\n $this->info(\"From old: {$fromOld->toDateTimeString()}\");\n $this->info(\"To old: {$toOld->toDateTimeString()}\");\n $this->info(\"From new: {$fromNew->toDateTimeString()}\");\n $this->info(\"To new: {$toNew->toDateTimeString()}\");\n\n exit(1);\n\n $report = AutomatedReport::find(71);\n\n $job = new RequestGenerateAskJiminnyReportJob($report->getUuid());\n $jobDispatcher->dispatch($job);\n\n exit(1);\n\n\n // $this->formatDate($jobDispatcher);\n // $this->sendMail($jobDispatcher, $automatedReportsService);\n // $this->crmService();\n\n $this->getPayload($automatedReportsService);\n\n exit(1);\n }\n\n\n\n private function crmService()\n {\n $activity = Activity::find(418141);\n\n $team = Team::find(19);\n $config = $team->getCrmConfiguration();\n\n $crmResolver = app(CrmOwnerResolver::class, [\n 'team' => $team,\n 'integrationAdmin' => $team->getOwner(),\n 'providerSlug' => $config->getProviderName(),\n ]);\n\n $crmService = $crmResolver->prepareCrmService();\n\n $crmService->createTranscriptNotes($activity);\n }\n\n private function sendMail(JobDispatcherInterface $jobDispatcher, AutomatedReportsService $automatedReportsService)\n {\n $reportUuid = '';\n // $report = $automatedReportsService->getReportResult($reportUuid);\n $report = AutomatedReportResult::find(275);\n $validRecipients = $automatedReportsService->getValidRecipientUsers(\n $report->getReport(),\n includeJiminny: true,\n );\n\n $recipient = $validRecipients[0];\n\n $fileName = $automatedReportsService->getReportFileName($report);\n $typeName = $report->getReport()->getCustomName()\n ?? $automatedReportsService->getReportTypeName($report);\n $teamsName = $automatedReportsService->getReportTeamsName($report);\n $periodName = $automatedReportsService->getReportPeriodName($report);\n $s3Path = $automatedReportsService->getMediaPath($report);\n\n \\Illuminate\\Support\\Facades\\Log::channel('custom_channel')->info('$fileName ' . PHP_EOL . print_r($fileName, true));\n \\Illuminate\\Support\\Facades\\Log::channel('custom_channel')->info('$typeName ' . PHP_EOL . print_r($typeName, true));\n \\Illuminate\\Support\\Facades\\Log::channel('custom_channel')->info('$teamsName ' . PHP_EOL . print_r($teamsName, true));\n \\Illuminate\\Support\\Facades\\Log::channel('custom_channel')->info('$periodName ' . PHP_EOL . print_r($periodName, true));\n \\Illuminate\\Support\\Facades\\Log::channel('custom_channel')->info('$s3Path ' . PHP_EOL . print_r($s3Path, true));\n\n $jobDispatcher->dispatch(\n new SendReportMailJob(\n reportUuid: $report->getUuid(),\n s3Path: $s3Path,\n recipientEmail: $recipient['email'],\n recipientName: $recipient['name'] ?? null,\n fileName: $fileName,\n typeName: $typeName,\n teamsName: $teamsName,\n periodName: $periodName,\n isAskJiminny: true,\n )\n );\n\n exit(1);\n }\n\n private function formatDate(JobDispatcherInterface $jobDispatcher): void\n {\n $customName = 'Custom report name';\n // $frequency = self::FREQUENCY_DAILY;\n // $frequency = self::FREQUENCY_WEEKLY;\n $frequency = self::FREQUENCY_MONTHLY;\n // $frequency = self::FREQUENCY_QUARTERLY;\n // $frequency = self::FREQUENCY_ONE_OFF;\n $period = $this->calculateFromAndToDatePeriod($frequency);\n $from = $period['fromDate'];\n $to = $period['toDate'];\n $periodName = $this->formatReportPeriodName($frequency, $from, $to);\n $filenameSuffix = null;\n\n if ($customName) {\n if ($filenameSuffix) {\n $customName .= \" {$filenameSuffix}\";\n }\n\n $result = $this->sanitizeFileName(\"{$customName} - {$periodName}\");\n }\n\n $this->info($result);\n }\n\n public function calculateFromAndToDatePeriod(\n string $frequency,\n ?Carbon $fromDate = null,\n ?Carbon $toDate = null\n ): array {\n if ($frequency === self::FREQUENCY_ONE_OFF) {\n return [\n 'fromDate' => $fromDate,\n 'toDate' => $toDate,\n ];\n }\n\n $now = Carbon::now();\n\n return match ($frequency) {\n self::FREQUENCY_DAILY => [\n 'fromDate' => $now->copy()->subDay()->startOfDay(),\n 'toDate' => $now->copy()->subDay()->endOfDay(),\n ],\n self::FREQUENCY_WEEKLY => [\n 'fromDate' => $now->copy()->subWeeks(1)->startOfDay(),\n 'toDate' => $now->copy()->subDay()->endOfDay(),\n ],\n self::FREQUENCY_MONTHLY => [\n 'fromDate' => $now->copy()->subMonths(1)->startOfDay(),\n 'toDate' => $now->copy()->subDay()->endOfDay(),\n ],\n self::FREQUENCY_QUARTERLY => [\n 'fromDate' => $now->copy()->subMonths(3)->startOfDay(),\n 'toDate' => $now->copy()->subDay()->endOfDay(),\n ],\n default => throw new InvalidArgumentException(\"Unsupported frequency: {$frequency}\"),\n };\n }\n\n private function formatReportPeriodName(string $frequency, Carbon $from, Carbon $to): string\n {\n $fromYear = $from->format('Y');\n $toYear = $to->format('Y');\n $differentYears = $fromYear !== $toYear;\n\n switch ($frequency) {\n case self::FREQUENCY_DAILY:\n return $from->format('j M Y');\n\n case self::FREQUENCY_QUARTERLY:\n // 'Jan-Mar 2025' or 'Nov 2024-Jan 2025' if years differ\n $startMonth = $from->format('M');\n $endMonth = $to->copy()->subMonth();\n $endMonthName = $endMonth->format('M');\n $endMonthYear = $endMonth->format('Y');\n\n if ($differentYears) {\n return \"{$startMonth} {$fromYear} - {$endMonthName} {$endMonthYear}\";\n }\n\n return \"{$startMonth} - {$endMonthName} {$toYear}\";\n\n case self::FREQUENCY_MONTHLY:\n // 'May 2025' - monthly reports are always within the same year\n return $from->format('M Y');\n\n case self::FREQUENCY_WEEKLY:\n // '4 - 8 Aug 2025', '27 Oct - 3 Nov 2025', or '28 Dec 2024 - 3 Jan 2025' if years differ\n $startDay = $from->format('j');\n $endDay = $to->format('j');\n $startMonth = $from->format('M');\n $endMonth = $to->format('M');\n\n if ($differentYears) {\n return \"{$startDay} {$startMonth} {$fromYear} - {$endDay} {$endMonth} {$toYear}\";\n }\n\n if ($startMonth !== $endMonth) {\n return \"{$startDay} {$startMonth} - {$endDay} {$endMonth} {$toYear}\";\n }\n\n return \"{$startDay} - {$endDay} {$endMonth} {$toYear}\";\n\n case self::FREQUENCY_ONE_OFF:\n // '2 May-31 May 2025' or '15 Dec 2024-15 Jan 2025' if years differ\n $startDay = $from->format('j');\n $startMonth = $from->format('M');\n $endDay = $to->format('j');\n $endMonth = $to->format('M');\n\n // If same month and year, use a format like '2-31 May 2025'\n if ($startMonth === $endMonth && ! $differentYears) {\n return \"{$startDay} - {$endDay} {$startMonth} {$toYear}\";\n }\n\n // If different years, include both years\n if ($differentYears) {\n return \"{$startDay} {$startMonth} {$fromYear} - {$endDay} {$endMonth} {$toYear}\";\n }\n\n // Same year but different months\n return \"{$startDay} {$startMonth} - {$endDay} {$endMonth} {$toYear}\";\n\n default:\n // Default format for unknown frequencies\n return $from->format('j M Y') . ' - ' . $to->format('j M Y');\n }\n }\n\n public function sanitizeFileName(string $fileName): string\n {\n return str_replace(['/', '\\\\'], '-', $fileName);\n }\n\n private function getPayload(AutomatedReportsService $automatedReportsService)\n {\n $reportResult = AutomatedReportResult::find(269);\n $automatedReport = $reportResult->getReport();\n $activityIds = [1,2,3];\n $payload = $automatedReportsService->getAskJiminnyGenerateReportPayload(\n automatedReport: $automatedReport,\n reportResult: $reportResult,\n activityIds: $activityIds,\n );\n\n \\Illuminate\\Support\\Facades\\Log::channel('custom_channel')->info('$payload ' . PHP_EOL . print_r($payload, true));\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Console\\Commands;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Console\\Command;\nuse InvalidArgumentException;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateAskJiminnyReportJob;\nuse Jiminny\\Jobs\\AutomatedReports\\SendReportMailJob;\nuse Jiminny\\Jobs\\JobDispatcherInterface;\nuse Jiminny\\Models\\Activity;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Activity\\CrmOwnerResolver;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Jiminny\\Services\\UserPilot\\UserPilotClient;\n\n/**\n * Class JiminnyDebugCommand\n *\n * @package Jiminny\\Console\\Commands\n */\nclass JiminnyDebugCommand extends Command\n{\n public const string FREQUENCY_DAILY = 'daily';\n public const string FREQUENCY_WEEKLY = 'weekly';\n public const string FREQUENCY_MONTHLY = 'monthly';\n public const string FREQUENCY_QUARTERLY = 'quarterly';\n public const string FREQUENCY_ONE_OFF = 'one_off';\n protected $signature = 'jiminny:debug';\n\n public function handle(\n JobDispatcherInterface $jobDispatcher,\n AutomatedReportsService $automatedReportsService,\n AutomatedReportsRepository $automatedReportsRepository,\n UserPilotClient $userPilotClient\n ): void {\n $user = User::find(143);\n // $count = $automatedReportsRepository->countUserReports($user);\n // $this->info(\"Count: {$count}\");\n // $count = $automatedReportsRepository->countAllUserReports($user);\n // $this->info(\"All count: {$count}\");\n\n $payload = [\n 'report_type' => 'ask_jiminny',\n 'frequency' => 'weekly',\n ];\n $userPilotClient->track($user, 'ask-jiminny-report-generated', $payload);\n\n exit(1);\n\n $now = Carbon::now()->subDay(1);\n $this->info(\"Now: {$now->toDateTimeString()}\");\n $weekStart = Carbon::getWeekStartsAt();\n $this->info(\"Now: {$weekStart}\");\n\n // $from = $now->copy()->previousWeekday()->startOfDay();\n // $to = $now->copy()->previousWeekday()->endOfDay();\n\n // $fromOld = $now->copy()->subWeeks(1)->startOfDay();\n // $toOld = $now->copy()->subDay()->endOfDay();\n // $fromNew = $now->copy()->subWeek()->startOfWeek();\n // $toNew = $now->copy()->subWeek()->endOfWeek();\n\n // $fromOld = $now->copy()->subMonths(1)->startOfDay();\n // $toOld = $now->copy()->subDay()->endOfDay();\n // $fromNew = $now->copy()->subMonthNoOverflow()->startOfMonth();\n // $toNew = $now->copy()->subMonthNoOverflow()->endOfMonth();\n\n $fromOld = $now->copy()->subMonths(3)->startOfDay();\n $toOld = $now->copy()->subDay()->endOfDay();\n $fromNew = $now->copy()->subQuarterNoOverflow()->startOfQuarter();\n $toNew = $now->copy()->subQuarterNoOverflow()->endOfQuarter();\n\n $this->info(\"From old: {$fromOld->toDateTimeString()}\");\n $this->info(\"To old: {$toOld->toDateTimeString()}\");\n $this->info(\"From new: {$fromNew->toDateTimeString()}\");\n $this->info(\"To new: {$toNew->toDateTimeString()}\");\n\n exit(1);\n\n $report = AutomatedReport::find(71);\n\n $job = new RequestGenerateAskJiminnyReportJob($report->getUuid());\n $jobDispatcher->dispatch($job);\n\n exit(1);\n\n\n // $this->formatDate($jobDispatcher);\n // $this->sendMail($jobDispatcher, $automatedReportsService);\n // $this->crmService();\n\n $this->getPayload($automatedReportsService);\n\n exit(1);\n }\n\n\n\n private function crmService()\n {\n $activity = Activity::find(418141);\n\n $team = Team::find(19);\n $config = $team->getCrmConfiguration();\n\n $crmResolver = app(CrmOwnerResolver::class, [\n 'team' => $team,\n 'integrationAdmin' => $team->getOwner(),\n 'providerSlug' => $config->getProviderName(),\n ]);\n\n $crmService = $crmResolver->prepareCrmService();\n\n $crmService->createTranscriptNotes($activity);\n }\n\n private function sendMail(JobDispatcherInterface $jobDispatcher, AutomatedReportsService $automatedReportsService)\n {\n $reportUuid = '';\n // $report = $automatedReportsService->getReportResult($reportUuid);\n $report = AutomatedReportResult::find(275);\n $validRecipients = $automatedReportsService->getValidRecipientUsers(\n $report->getReport(),\n includeJiminny: true,\n );\n\n $recipient = $validRecipients[0];\n\n $fileName = $automatedReportsService->getReportFileName($report);\n $typeName = $report->getReport()->getCustomName()\n ?? $automatedReportsService->getReportTypeName($report);\n $teamsName = $automatedReportsService->getReportTeamsName($report);\n $periodName = $automatedReportsService->getReportPeriodName($report);\n $s3Path = $automatedReportsService->getMediaPath($report);\n\n \\Illuminate\\Support\\Facades\\Log::channel('custom_channel')->info('$fileName ' . PHP_EOL . print_r($fileName, true));\n \\Illuminate\\Support\\Facades\\Log::channel('custom_channel')->info('$typeName ' . PHP_EOL . print_r($typeName, true));\n \\Illuminate\\Support\\Facades\\Log::channel('custom_channel')->info('$teamsName ' . PHP_EOL . print_r($teamsName, true));\n \\Illuminate\\Support\\Facades\\Log::channel('custom_channel')->info('$periodName ' . PHP_EOL . print_r($periodName, true));\n \\Illuminate\\Support\\Facades\\Log::channel('custom_channel')->info('$s3Path ' . PHP_EOL . print_r($s3Path, true));\n\n $jobDispatcher->dispatch(\n new SendReportMailJob(\n reportUuid: $report->getUuid(),\n s3Path: $s3Path,\n recipientEmail: $recipient['email'],\n recipientName: $recipient['name'] ?? null,\n fileName: $fileName,\n typeName: $typeName,\n teamsName: $teamsName,\n periodName: $periodName,\n isAskJiminny: true,\n )\n );\n\n exit(1);\n }\n\n private function formatDate(JobDispatcherInterface $jobDispatcher): void\n {\n $customName = 'Custom report name';\n // $frequency = self::FREQUENCY_DAILY;\n // $frequency = self::FREQUENCY_WEEKLY;\n $frequency = self::FREQUENCY_MONTHLY;\n // $frequency = self::FREQUENCY_QUARTERLY;\n // $frequency = self::FREQUENCY_ONE_OFF;\n $period = $this->calculateFromAndToDatePeriod($frequency);\n $from = $period['fromDate'];\n $to = $period['toDate'];\n $periodName = $this->formatReportPeriodName($frequency, $from, $to);\n $filenameSuffix = null;\n\n if ($customName) {\n if ($filenameSuffix) {\n $customName .= \" {$filenameSuffix}\";\n }\n\n $result = $this->sanitizeFileName(\"{$customName} - {$periodName}\");\n }\n\n $this->info($result);\n }\n\n public function calculateFromAndToDatePeriod(\n string $frequency,\n ?Carbon $fromDate = null,\n ?Carbon $toDate = null\n ): array {\n if ($frequency === self::FREQUENCY_ONE_OFF) {\n return [\n 'fromDate' => $fromDate,\n 'toDate' => $toDate,\n ];\n }\n\n $now = Carbon::now();\n\n return match ($frequency) {\n self::FREQUENCY_DAILY => [\n 'fromDate' => $now->copy()->subDay()->startOfDay(),\n 'toDate' => $now->copy()->subDay()->endOfDay(),\n ],\n self::FREQUENCY_WEEKLY => [\n 'fromDate' => $now->copy()->subWeeks(1)->startOfDay(),\n 'toDate' => $now->copy()->subDay()->endOfDay(),\n ],\n self::FREQUENCY_MONTHLY => [\n 'fromDate' => $now->copy()->subMonths(1)->startOfDay(),\n 'toDate' => $now->copy()->subDay()->endOfDay(),\n ],\n self::FREQUENCY_QUARTERLY => [\n 'fromDate' => $now->copy()->subMonths(3)->startOfDay(),\n 'toDate' => $now->copy()->subDay()->endOfDay(),\n ],\n default => throw new InvalidArgumentException(\"Unsupported frequency: {$frequency}\"),\n };\n }\n\n private function formatReportPeriodName(string $frequency, Carbon $from, Carbon $to): string\n {\n $fromYear = $from->format('Y');\n $toYear = $to->format('Y');\n $differentYears = $fromYear !== $toYear;\n\n switch ($frequency) {\n case self::FREQUENCY_DAILY:\n return $from->format('j M Y');\n\n case self::FREQUENCY_QUARTERLY:\n // 'Jan-Mar 2025' or 'Nov 2024-Jan 2025' if years differ\n $startMonth = $from->format('M');\n $endMonth = $to->copy()->subMonth();\n $endMonthName = $endMonth->format('M');\n $endMonthYear = $endMonth->format('Y');\n\n if ($differentYears) {\n return \"{$startMonth} {$fromYear} - {$endMonthName} {$endMonthYear}\";\n }\n\n return \"{$startMonth} - {$endMonthName} {$toYear}\";\n\n case self::FREQUENCY_MONTHLY:\n // 'May 2025' - monthly reports are always within the same year\n return $from->format('M Y');\n\n case self::FREQUENCY_WEEKLY:\n // '4 - 8 Aug 2025', '27 Oct - 3 Nov 2025', or '28 Dec 2024 - 3 Jan 2025' if years differ\n $startDay = $from->format('j');\n $endDay = $to->format('j');\n $startMonth = $from->format('M');\n $endMonth = $to->format('M');\n\n if ($differentYears) {\n return \"{$startDay} {$startMonth} {$fromYear} - {$endDay} {$endMonth} {$toYear}\";\n }\n\n if ($startMonth !== $endMonth) {\n return \"{$startDay} {$startMonth} - {$endDay} {$endMonth} {$toYear}\";\n }\n\n return \"{$startDay} - {$endDay} {$endMonth} {$toYear}\";\n\n case self::FREQUENCY_ONE_OFF:\n // '2 May-31 May 2025' or '15 Dec 2024-15 Jan 2025' if years differ\n $startDay = $from->format('j');\n $startMonth = $from->format('M');\n $endDay = $to->format('j');\n $endMonth = $to->format('M');\n\n // If same month and year, use a format like '2-31 May 2025'\n if ($startMonth === $endMonth && ! $differentYears) {\n return \"{$startDay} - {$endDay} {$startMonth} {$toYear}\";\n }\n\n // If different years, include both years\n if ($differentYears) {\n return \"{$startDay} {$startMonth} {$fromYear} - {$endDay} {$endMonth} {$toYear}\";\n }\n\n // Same year but different months\n return \"{$startDay} {$startMonth} - {$endDay} {$endMonth} {$toYear}\";\n\n default:\n // Default format for unknown frequencies\n return $from->format('j M Y') . ' - ' . $to->format('j M Y');\n }\n }\n\n public function sanitizeFileName(string $fileName): string\n {\n return str_replace(['/', '\\\\'], '-', $fileName);\n }\n\n private function getPayload(AutomatedReportsService $automatedReportsService)\n {\n $reportResult = AutomatedReportResult::find(269);\n $automatedReport = $reportResult->getReport();\n $activityIds = [1,2,3];\n $payload = $automatedReportsService->getAskJiminnyGenerateReportPayload(\n automatedReport: $automatedReport,\n reportResult: $reportResult,\n activityIds: $activityIds,\n );\n\n \\Illuminate\\Support\\Facades\\Log::channel('custom_channel')->info('$payload ' . PHP_EOL . print_r($payload, true));\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-5587254342626962067
|
-5620076495275201141
|
click
|
accessibility
|
NULL
|
Pushed JY-20738-debug-AJ-tracking-UP to new branch Pushed JY-20738-debug-AJ-tracking-UP to new branch origin/JY-20738-debug-AJ-tracking-UP
text/html
text/html
text/html
Create pull request
4 files committed
JY-20738 add debug logs on AJ report UP tracking
text/html
text/html
text/html
Edit Commit Message…
Project: faVsco.js, menu
JY-20738-debug-AJ-tracking-UP, menu
Start Listening for PHP Debug Connections
ReportControllerTest
Run 'ReportControllerTest'
Debug 'ReportControllerTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
3
115
4
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Console\Commands;
use Carbon\Carbon;
use Illuminate\Console\Command;
use InvalidArgumentException;
use Jiminny\Jobs\AutomatedReports\RequestGenerateAskJiminnyReportJob;
use Jiminny\Jobs\AutomatedReports\SendReportMailJob;
use Jiminny\Jobs\JobDispatcherInterface;
use Jiminny\Models\Activity;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Activity\CrmOwnerResolver;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Jiminny\Services\UserPilot\UserPilotClient;
/**
* Class JiminnyDebugCommand
*
* @package Jiminny\Console\Commands
*/
class JiminnyDebugCommand extends Command
{
public const string FREQUENCY_DAILY = 'daily';
public const string FREQUENCY_WEEKLY = 'weekly';
public const string FREQUENCY_MONTHLY = 'monthly';
public const string FREQUENCY_QUARTERLY = 'quarterly';
public const string FREQUENCY_ONE_OFF = 'one_off';
protected $signature = 'jiminny:debug';
public function handle(
JobDispatcherInterface $jobDispatcher,
AutomatedReportsService $automatedReportsService,
AutomatedReportsRepository $automatedReportsRepository,
UserPilotClient $userPilotClient
): void {
$user = User::find(143);
// $count = $automatedReportsRepository->countUserReports($user);
// $this->info("Count: {$count}");
// $count = $automatedReportsRepository->countAllUserReports($user);
// $this->info("All count: {$count}");
$payload = [
'report_type' => 'ask_jiminny',
'frequency' => 'weekly',
];
$userPilotClient->track($user, 'ask-jiminny-report-generated', $payload);
exit(1);
$now = Carbon::now()->subDay(1);
$this->info("Now: {$now->toDateTimeString()}");
$weekStart = Carbon::getWeekStartsAt();
$this->info("Now: {$weekStart}");
// $from = $now->copy()->previousWeekday()->startOfDay();
// $to = $now->copy()->previousWeekday()->endOfDay();
// $fromOld = $now->copy()->subWeeks(1)->startOfDay();
// $toOld = $now->copy()->subDay()->endOfDay();
// $fromNew = $now->copy()->subWeek()->startOfWeek();
// $toNew = $now->copy()->subWeek()->endOfWeek();
// $fromOld = $now->copy()->subMonths(1)->startOfDay();
// $toOld = $now->copy()->subDay()->endOfDay();
// $fromNew = $now->copy()->subMonthNoOverflow()->startOfMonth();
// $toNew = $now->copy()->subMonthNoOverflow()->endOfMonth();
$fromOld = $now->copy()->subMonths(3)->startOfDay();
$toOld = $now->copy()->subDay()->endOfDay();
$fromNew = $now->copy()->subQuarterNoOverflow()->startOfQuarter();
$toNew = $now->copy()->subQuarterNoOverflow()->endOfQuarter();
$this->info("From old: {$fromOld->toDateTimeString()}");
$this->info("To old: {$toOld->toDateTimeString()}");
$this->info("From new: {$fromNew->toDateTimeString()}");
$this->info("To new: {$toNew->toDateTimeString()}");
exit(1);
$report = AutomatedReport::find(71);
$job = new RequestGenerateAskJiminnyReportJob($report->getUuid());
$jobDispatcher->dispatch($job);
exit(1);
// $this->formatDate($jobDispatcher);
// $this->sendMail($jobDispatcher, $automatedReportsService);
// $this->crmService();
$this->getPayload($automatedReportsService);
exit(1);
}
private function crmService()
{
$activity = Activity::find(418141);
$team = Team::find(19);
$config = $team->getCrmConfiguration();
$crmResolver = app(CrmOwnerResolver::class, [
'team' => $team,
'integrationAdmin' => $team->getOwner(),
'providerSlug' => $config->getProviderName(),
]);
$crmService = $crmResolver->prepareCrmService();
$crmService->createTranscriptNotes($activity);
}
private function sendMail(JobDispatcherInterface $jobDispatcher, AutomatedReportsService $automatedReportsService)
{
$reportUuid = '';
// $report = $automatedReportsService->getReportResult($reportUuid);
$report = AutomatedReportResult::find(275);
$validRecipients = $automatedReportsService->getValidRecipientUsers(
$report->getReport(),
includeJiminny: true,
);
$recipient = $validRecipients[0];
$fileName = $automatedReportsService->getReportFileName($report);
$typeName = $report->getReport()->getCustomName()
?? $automatedReportsService->getReportTypeName($report);
$teamsName = $automatedReportsService->getReportTeamsName($report);
$periodName = $automatedReportsService->getReportPeriodName($report);
$s3Path = $automatedReportsService->getMediaPath($report);
\Illuminate\Support\Facades\Log::channel('custom_channel')->info('$fileName ' . PHP_EOL . print_r($fileName, true));
\Illuminate\Support\Facades\Log::channel('custom_channel')->info('$typeName ' . PHP_EOL . print_r($typeName, true));
\Illuminate\Support\Facades\Log::channel('custom_channel')->info('$teamsName ' . PHP_EOL . print_r($teamsName, true));
\Illuminate\Support\Facades\Log::channel('custom_channel')->info('$periodName ' . PHP_EOL . print_r($periodName, true));
\Illuminate\Support\Facades\Log::channel('custom_channel')->info('$s3Path ' . PHP_EOL . print_r($s3Path, true));
$jobDispatcher->dispatch(
new SendReportMailJob(
reportUuid: $report->getUuid(),
s3Path: $s3Path,
recipientEmail: $recipient['email'],
recipientName: $recipient['name'] ?? null,
fileName: $fileName,
typeName: $typeName,
teamsName: $teamsName,
periodName: $periodName,
isAskJiminny: true,
)
);
exit(1);
}
private function formatDate(JobDispatcherInterface $jobDispatcher): void
{
$customName = 'Custom report name';
// $frequency = self::FREQUENCY_DAILY;
// $frequency = self::FREQUENCY_WEEKLY;
$frequency = self::FREQUENCY_MONTHLY;
// $frequency = self::FREQUENCY_QUARTERLY;
// $frequency = self::FREQUENCY_ONE_OFF;
$period = $this->calculateFromAndToDatePeriod($frequency);
$from = $period['fromDate'];
$to = $period['toDate'];
$periodName = $this->formatReportPeriodName($frequency, $from, $to);
$filenameSuffix = null;
if ($customName) {
if ($filenameSuffix) {
$customName .= " {$filenameSuffix}";
}
$result = $this->sanitizeFileName("{$customName} - {$periodName}");
}
$this->info($result);
}
public function calculateFromAndToDatePeriod(
string $frequency,
?Carbon $fromDate = null,
?Carbon $toDate = null
): array {
if ($frequency === self::FREQUENCY_ONE_OFF) {
return [
'fromDate' => $fromDate,
'toDate' => $toDate,
];
}
$now = Carbon::now();
return match ($frequency) {
self::FREQUENCY_DAILY => [
'fromDate' => $now->copy()->subDay()->startOfDay(),
'toDate' => $now->copy()->subDay()->endOfDay(),
],
self::FREQUENCY_WEEKLY => [
'fromDate' => $now->copy()->subWeeks(1)->startOfDay(),
'toDate' => $now->copy()->subDay()->endOfDay(),
],
self::FREQUENCY_MONTHLY => [
'fromDate' => $now->copy()->subMonths(1)->startOfDay(),
'toDate' => $now->copy()->subDay()->endOfDay(),
],
self::FREQUENCY_QUARTERLY => [
'fromDate' => $now->copy()->subMonths(3)->startOfDay(),
'toDate' => $now->copy()->subDay()->endOfDay(),
],
default => throw new InvalidArgumentException("Unsupported frequency: {$frequency}"),
};
}
private function formatReportPeriodName(string $frequency, Carbon $from, Carbon $to): string
{
$fromYear = $from->format('Y');
$toYear = $to->format('Y');
$differentYears = $fromYear !== $toYear;
switch ($frequency) {
case self::FREQUENCY_DAILY:
return $from->format('j M Y');
case self::FREQUENCY_QUARTERLY:
// 'Jan-Mar 2025' or 'Nov 2024-Jan 2025' if years differ
$startMonth = $from->format('M');
$endMonth = $to->copy()->subMonth();
$endMonthName = $endMonth->format('M');
$endMonthYear = $endMonth->format('Y');
if ($differentYears) {
return "{$startMonth} {$fromYear} - {$endMonthName} {$endMonthYear}";
}
return "{$startMonth} - {$endMonthName} {$toYear}";
case self::FREQUENCY_MONTHLY:
// 'May 2025' - monthly reports are always within the same year
return $from->format('M Y');
case self::FREQUENCY_WEEKLY:
// '4 - 8 Aug 2025', '27 Oct - 3 Nov 2025', or '28 Dec 2024 - 3 Jan 2025' if years differ
$startDay = $from->format('j');
$endDay = $to->format('j');
$startMonth = $from->format('M');
$endMonth = $to->format('M');
if ($differentYears) {
return "{$startDay} {$startMonth} {$fromYear} - {$endDay} {$endMonth} {$toYear}";
}
if ($startMonth !== $endMonth) {
return "{$startDay} {$startMonth} - {$endDay} {$endMonth} {$toYear}";
}
return "{$startDay} - {$endDay} {$endMonth} {$toYear}";
case self::FREQUENCY_ONE_OFF:
// '2 May-31 May 2025' or '15 Dec 2024-15 Jan 2025' if years differ
$startDay = $from->format('j');
$startMonth = $from->format('M');
$endDay = $to->format('j');
$endMonth = $to->format('M');
// If same month and year, use a format like '2-31 May 2025'
if ($startMonth === $endMonth && ! $differentYears) {
return "{$startDay} - {$endDay} {$startMonth} {$toYear}";
}
// If different years, include both years
if ($differentYears) {
return "{$startDay} {$startMonth} {$fromYear} - {$endDay} {$endMonth} {$toYear}";
}
// Same year but different months
return "{$startDay} {$startMonth} - {$endDay} {$endMonth} {$toYear}";
default:
// Default format for unknown frequencies
return $from->format('j M Y') . ' - ' . $to->format('j M Y');
}
}
public function sanitizeFileName(string $fileName): string
{
return str_replace(['/', '\\'], '-', $fileName);
}
private function getPayload(AutomatedReportsService $automatedReportsService)
{
$reportResult = AutomatedReportResult::find(269);
$automatedReport = $reportResult->getReport();
$activityIds = [1,2,3];
$payload = $automatedReportsService->getAskJiminnyGenerateReportPayload(
automatedReport: $automatedReport,
reportResult: $reportResult,
activityIds: $activityIds,
);
\Illuminate\Support\Facades\Log::channel('custom_channel')->info('$payload ' . PHP_EOL . print_r($payload, true));
}
}
Sync Changes
Hide This Notification...
|
77304
|
|
77305
|
1942
|
20
|
2026-04-24T09:03:59.705766+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-24/1777 /Users/lukas/.screenpipe/data/data/2026-04-24/1777021439705_m2.jpg...
|
PhpStorm
|
faVsco.js – JiminnyDebugCommand.php
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Pushed JY-20738-debug-AJ-tracking-UP to new branch Pushed JY-20738-debug-AJ-tracking-UP to new branch origin/JY-20738-debug-AJ-tracking-UP
text/html
text/html
text/html
Create pull request
4 files committed
JY-20738 add debug logs on AJ report UP tracking
text/html
text/html
text/html
Edit Commit Message…
Project: faVsco.js, menu
JY-20738-debug-AJ-tracking-UP, menu
Start Listening for PHP Debug Connections
ReportControllerTest
Run 'ReportControllerTest'
Debug 'ReportControllerTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
3
115
4
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Console\Commands;
use Carbon\Carbon;
use Illuminate\Console\Command;
use InvalidArgumentException;
use Jiminny\Jobs\AutomatedReports\RequestGenerateAskJiminnyReportJob;
use Jiminny\Jobs\AutomatedReports\SendReportMailJob;
use Jiminny\Jobs\JobDispatcherInterface;
use Jiminny\Models\Activity;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Activity\CrmOwnerResolver;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Jiminny\Services\UserPilot\UserPilotClient;
/**
* Class JiminnyDebugCommand
*
* @package Jiminny\Console\Commands
*/
class JiminnyDebugCommand extends Command
{
public const string FREQUENCY_DAILY = 'daily';
public const string FREQUENCY_WEEKLY = 'weekly';
public const string FREQUENCY_MONTHLY = 'monthly';
public const string FREQUENCY_QUARTERLY = 'quarterly';
public const string FREQUENCY_ONE_OFF = 'one_off';
protected $signature = 'jiminny:debug';
public function handle(
JobDispatcherInterface $jobDispatcher,
AutomatedReportsService $automatedReportsService,
AutomatedReportsRepository $automatedReportsRepository,
UserPilotClient $userPilotClient
): void {
$user = User::find(143);
// $count = $automatedReportsRepository->countUserReports($user);
// $this->info("Count: {$count}");
// $count = $automatedReportsRepository->countAllUserReports($user);
// $this->info("All count: {$count}");
$payload = [
'report_type' => 'ask_jiminny',
'frequency' => 'weekly',
];
$userPilotClient->track($user, 'ask-jiminny-report-generated', $payload);
exit(1);
$now = Carbon::now()->subDay(1);
$this->info("Now: {$now->toDateTimeString()}");
$weekStart = Carbon::getWeekStartsAt();
$this->info("Now: {$weekStart}");
// $from = $now->copy()->previousWeekday()->startOfDay();
// $to = $now->copy()->previousWeekday()->endOfDay();
// $fromOld = $now->copy()->subWeeks(1)->startOfDay();
// $toOld = $now->copy()->subDay()->endOfDay();
// $fromNew = $now->copy()->subWeek()->startOfWeek();
// $toNew = $now->copy()->subWeek()->endOfWeek();
// $fromOld = $now->copy()->subMonths(1)->startOfDay();
// $toOld = $now->copy()->subDay()->endOfDay();
// $fromNew = $now->copy()->subMonthNoOverflow()->startOfMonth();
// $toNew = $now->copy()->subMonthNoOverflow()->endOfMonth();
$fromOld = $now->copy()->subMonths(3)->startOfDay();
$toOld = $now->copy()->subDay()->endOfDay();
$fromNew = $now->copy()->subQuarterNoOverflow()->startOfQuarter();
$toNew = $now->copy()->subQuarterNoOverflow()->endOfQuarter();
$this->info("From old: {$fromOld->toDateTimeString()}");
$this->info("To old: {$toOld->toDateTimeString()}");
$this->info("From new: {$fromNew->toDateTimeString()}");
$this->info("To new: {$toNew->toDateTimeString()}");
exit(1);
$report = AutomatedReport::find(71);
$job = new RequestGenerateAskJiminnyReportJob($report->getUuid());
$jobDispatcher->dispatch($job);
exit(1);
// $this->formatDate($jobDispatcher);
// $this->sendMail($jobDispatcher, $automatedReportsService);
// $this->crmService();
$this->getPayload($automatedReportsService);
exit(1);
}
private function crmService()
{
$activity = Activity::find(418141);
$team = Team::find(19);
$config = $team->getCrmConfiguration();
$crmResolver = app(CrmOwnerResolver::class, [
'team' => $team,
'integrationAdmin' => $team->getOwner(),
'providerSlug' => $config->getProviderName(),
]);
$crmService = $crmResolver->prepareCrmService();
$crmService->createTranscriptNotes($activity);
}
private function sendMail(JobDispatcherInterface $jobDispatcher, AutomatedReportsService $automatedReportsService)
{
$reportUuid = '';
// $report = $automatedReportsService->getReportResult($reportUuid);
$report = AutomatedReportResult::find(275);
$validRecipients = $automatedReportsService->getValidRecipientUsers(
$report->getReport(),
includeJiminny: true,
);
$recipient = $validRecipients[0];
$fileName = $automatedReportsService->getReportFileName($report);
$typeName = $report->getReport()->getCustomName()
?? $automatedReportsService->getReportTypeName($report);
$teamsName = $automatedReportsService->getReportTeamsName($report);
$periodName = $automatedReportsService->getReportPeriodName($report);
$s3Path = $automatedReportsService->getMediaPath($report);
\Illuminate\Support\Facades\Log::channel('custom_channel')->info('$fileName ' . PHP_EOL . print_r($fileName, true));
\Illuminate\Support\Facades\Log::channel('custom_channel')->info('$typeName ' . PHP_EOL . print_r($typeName, true));
\Illuminate\Support\Facades\Log::channel('custom_channel')->info('$teamsName ' . PHP_EOL . print_r($teamsName, true));
\Illuminate\Support\Facades\Log::channel('custom_channel')->info('$periodName ' . PHP_EOL . print_r($periodName, true));
\Illuminate\Support\Facades\Log::channel('custom_channel')->info('$s3Path ' . PHP_EOL . print_r($s3Path, true));
$jobDispatcher->dispatch(
new SendReportMailJob(
reportUuid: $report->getUuid(),
s3Path: $s3Path,
recipientEmail: $recipient['email'],
recipientName: $recipient['name'] ?? null,
fileName: $fileName,
typeName: $typeName,
teamsName: $teamsName,
periodName: $periodName,
isAskJiminny: true,
)
);
exit(1);
}
private function formatDate(JobDispatcherInterface $jobDispatcher): void
{
$customName = 'Custom report name';
// $frequency = self::FREQUENCY_DAILY;
// $frequency = self::FREQUENCY_WEEKLY;
$frequency = self::FREQUENCY_MONTHLY;
// $frequency = self::FREQUENCY_QUARTERLY;
// $frequency = self::FREQUENCY_ONE_OFF;
$period = $this->calculateFromAndToDatePeriod($frequency);
$from = $period['fromDate'];
$to = $period['toDate'];
$periodName = $this->formatReportPeriodName($frequency, $from, $to);
$filenameSuffix = null;
if ($customName) {
if ($filenameSuffix) {
$customName .= " {$filenameSuffix}";
}
$result = $this->sanitizeFileName("{$customName} - {$periodName}");
}
$this->info($result);
}
public function calculateFromAndToDatePeriod(
string $frequency,
?Carbon $fromDate = null,
?Carbon $toDate = null
): array {
if ($frequency === self::FREQUENCY_ONE_OFF) {
return [
'fromDate' => $fromDate,
'toDate' => $toDate,
];
}
$now = Carbon::now();
return match ($frequency) {
self::FREQUENCY_DAILY => [
'fromDate' => $now->copy()->subDay()->startOfDay(),
'toDate' => $now->copy()->subDay()->endOfDay(),
],
self::FREQUENCY_WEEKLY => [
'fromDate' => $now->copy()->subWeeks(1)->startOfDay(),
'toDate' => $now->copy()->subDay()->endOfDay(),
],
self::FREQUENCY_MONTHLY => [
'fromDate' => $now->copy()->subMonths(1)->startOfDay(),
'toDate' => $now->copy()->subDay()->endOfDay(),
],
self::FREQUENCY_QUARTERLY => [
'fromDate' => $now->copy()->subMonths(3)->startOfDay(),
'toDate' => $now->copy()->subDay()->endOfDay(),
],
default => throw new InvalidArgumentException("Unsupported frequency: {$frequency}"),
};
}
private function formatReportPeriodName(string $frequency, Carbon $from, Carbon $to): string
{
$fromYear = $from->format('Y');
$toYear = $to->format('Y');
$differentYears = $fromYear !== $toYear;
switch ($frequency) {
case self::FREQUENCY_DAILY:
return $from->format('j M Y');
case self::FREQUENCY_QUARTERLY:
// 'Jan-Mar 2025' or 'Nov 2024-Jan 2025' if years differ
$startMonth = $from->format('M');
$endMonth = $to->copy()->subMonth();
$endMonthName = $endMonth->format('M');
$endMonthYear = $endMonth->format('Y');
if ($differentYears) {
return "{$startMonth} {$fromYear} - {$endMonthName} {$endMonthYear}";
}
return "{$startMonth} - {$endMonthName} {$toYear}";
case self::FREQUENCY_MONTHLY:
// 'May 2025' - monthly reports are always within the same year
return $from->format('M Y');
case self::FREQUENCY_WEEKLY:
// '4 - 8 Aug 2025', '27 Oct - 3 Nov 2025', or '28 Dec 2024 - 3 Jan 2025' if years differ
$startDay = $from->format('j');
$endDay = $to->format('j');
$startMonth = $from->format('M');
$endMonth = $to->format('M');
if ($differentYears) {
return "{$startDay} {$startMonth} {$fromYear} - {$endDay} {$endMonth} {$toYear}";
}
if ($startMonth !== $endMonth) {
return "{$startDay} {$startMonth} - {$endDay} {$endMonth} {$toYear}";
}
return "{$startDay} - {$endDay} {$endMonth} {$toYear}";
case self::FREQUENCY_ONE_OFF:
// '2 May-31 May 2025' or '15 Dec 2024-15 Jan 2025' if years differ
$startDay = $from->format('j');
$startMonth = $from->format('M');
$endDay = $to->format('j');
$endMonth = $to->format('M');
// If same month and year, use a format like '2-31 May 2025'
if ($startMonth === $endMonth && ! $differentYears) {
return "{$startDay} - {$endDay} {$startMonth} {$toYear}";
}
// If different years, include both years
if ($differentYears) {
return "{$startDay} {$startMonth} {$fromYear} - {$endDay} {$endMonth} {$toYear}";
}
// Same year but different months
return "{$startDay} {$startMonth} - {$endDay} {$endMonth} {$toYear}";
default:
// Default format for unknown frequencies
return $from->format('j M Y') . ' - ' . $to->format('j M Y');
}
}
public function sanitizeFileName(string $fileName): string
{
return str_replace(['/', '\\'], '-', $fileName);
}
private function getPayload(AutomatedReportsService $automatedReportsService)
{
$reportResult = AutomatedReportResult::find(269);
$automatedReport = $reportResult->getReport();
$activityIds = [1,2,3];
$payload = $automatedReportsService->getAskJiminnyGenerateReportPayload(
automatedReport: $automatedReport,
reportResult: $reportResult,
activityIds: $activityIds,
);
\Illuminate\Support\Facades\Log::channel('custom_channel')->info('$payload ' . PHP_EOL . print_r($payload, true));
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
7
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Services\UserPilot;
use Illuminate\Http\Client\PendingRequest;
use Illuminate\Support\Facades\Http;
use Jiminny\Models\Feature\FeatureEnum;
use Jiminny\Models\Partner;
use Jiminny\Models\Team;
use Jiminny\Models\User;
class UserPilotClient
{
private const API_ENDPOINT = 'https://api.userpilot.io/v1/';
private const ANALYTICS_ENDPOINT = 'https://analytex.userpilot.io/v1/';
private function createRequest(): PendingRequest
{
return Http::withHeaders([
'X-API-Version' => '2020-09-22',
'Authorization' => 'Token ' . config('services.userpilot.key'),
]);
}
public function track(User $user, string $event, array $payload = []): void
{
if ($this->shouldRequest($user->getTeam()) === false) {
return;
}
$this->createRequest()->post(self::ANALYTICS_ENDPOINT . 'track', [
'event_name' => $event,
'user_id' => $user->getUuid(),
'metadata' => $payload,
]);
}
public function upsertUser(User $user): void
{
if ($this->shouldRequest($user->getTeam()) === false) {
return;
}
$companyMetadata = $this->getCompanyMetadata($user->getTeam());
$companyMetadata['id'] = $user->getTeam()->getUuid();
$this->createRequest()->post(self::ANALYTICS_ENDPOINT . 'identify', [
'user_id' => $user->getUuid(),
'metadata' => [
'name' => $user->name,
'first_name' => $user->getFirstName(),
'position' => $user->job ? $user->job->name : null,
'email' => $user->getEmailAddress(),
'created_at' => $user->getCreatedAt()->unix(),
'is_admin' => $user->hasRole(User::ROLE_ADMIN),
'is_manager' => $user->hasRole(User::ROLE_MANAGER),
'is_owner' => $user->isTeamOwner(),
'is_insights' => $user->hasRole(User::ROLE_ANALYST),
'is_recorder' => $user->hasRole(User::ROLE_RECORDER),
'is_jiminny_voice' => $user->hasRole(User::ROLE_RECORDER_AND_VOICE),
'is_listener' => $user->hasRole(User::ROLE_LISTENER),
'license' => null,
'team' => $user->group ? $user->group->name : null,
'language' => $user->getLanguage(),
'email_sync' => $user->isSyncEmailEnabled(),
],
'company' => $companyMetadata,
]);
}
public function upsertCompany(Team $team): void
{
$this->createRequest()->post(self::ANALYTICS_ENDPOINT . 'companies/identify', [
'company_id' => $team->getUuid(),
'metadata' => $this->getCompanyMetadata($team),
]);
}
private function getCompanyMetadata(Team $team): array
{
return [
'created_at' => $team->getCreatedAt()->unix(),
'name' => $team->getName(),
'region' => config('jiminny.deploy_region'),
'crm' => $team->getCrmConfiguration()->getProviderName(),
'crm_installed_app_version' => $team->getCrmConfiguration()->getInstalledAppVersion(),
'calendar' => $team->getCalendarProvider(),
'notification_provider' => $team->getNotificationProvider(),
'has_jiminny_voice' => $team->hasFeature(FeatureEnum::DIALER),
'tier' => $team->getTier()?->getTitle(),
];
}
public function deleteUser(User $user): void
{
if ($this->shouldRequest($user->getTeam()) === false) {
return;
}
$this->createRequest()->delete(self::API_ENDPOINT . 'users', [
'users' => [$user->getUuid()],
]);
}
public function deleteCompany(Team $team): void
{
if ($this->shouldRequest($team) === false) {
return;
}
$this->createRequest()->delete(self::API_ENDPOINT . 'companies', [
'companies' => [$team->getUuid()],
]);
}
public function shouldRequest(Team $team): bool
{
return config('services.userpilot.key') !== null && $team->getPartnerId() === Partner::PARTNER_DEFAULT;
}
}
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Pushed JY-20738-debug-AJ-tracking-UP to new branch origin/JY-20738-debug-AJ-tracking-UP","depth":3,"bounds":{"left":0.8753325,"top":0.82521945,"width":0.11037234,"height":0.040702313},"value":"Pushed JY-20738-debug-AJ-tracking-UP to new branch origin/JY-20738-debug-AJ-tracking-UP","help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"bounds":{"left":0.8753325,"top":0.82521945,"width":0.0944149,"height":0.040702313},"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"Create pull request","depth":2,"bounds":{"left":0.8753325,"top":0.87150836,"width":0.038896278,"height":0.013567438},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"4 files committed","depth":2,"bounds":{"left":0.8753325,"top":0.91300875,"width":0.100398935,"height":0.013567438},"role_description":"text"},{"role":"AXTextField","text":"JY-20738 add debug logs on AJ report UP tracking","depth":3,"bounds":{"left":0.8753325,"top":0.92897046,"width":0.11037234,"height":0.013567438},"value":"JY-20738 add debug logs on AJ report UP tracking","help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"bounds":{"left":0.8753325,"top":0.92897046,"width":0.10472074,"height":0.013567438},"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"Edit Commit Message…","depth":2,"bounds":{"left":0.8753325,"top":0.9481245,"width":0.048204787,"height":0.013567438},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20738-debug-AJ-tracking-UP, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.08510638,"height":0.025538707},"help_text":"Git Branch: JY-20738-debug-AJ-tracking-UP","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.8400931,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"ReportControllerTest","depth":6,"bounds":{"left":0.85538566,"top":0.019952115,"width":0.06017287,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'ReportControllerTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'ReportControllerTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9381649,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96609044,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9773936,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9886968,"top":0.019952115,"width":0.011303186,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"3","depth":4,"bounds":{"left":0.375,"top":0.19952115,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"115","depth":4,"bounds":{"left":0.3849734,"top":0.19952115,"width":0.011303191,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"bounds":{"left":0.39827126,"top":0.19952115,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.40791222,"top":0.19792499,"width":0.00731383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.41522607,"top":0.19792499,"width":0.006981383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Console\\Commands;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Console\\Command;\nuse InvalidArgumentException;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateAskJiminnyReportJob;\nuse Jiminny\\Jobs\\AutomatedReports\\SendReportMailJob;\nuse Jiminny\\Jobs\\JobDispatcherInterface;\nuse Jiminny\\Models\\Activity;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Activity\\CrmOwnerResolver;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Jiminny\\Services\\UserPilot\\UserPilotClient;\n\n/**\n * Class JiminnyDebugCommand\n *\n * @package Jiminny\\Console\\Commands\n */\nclass JiminnyDebugCommand extends Command\n{\n public const string FREQUENCY_DAILY = 'daily';\n public const string FREQUENCY_WEEKLY = 'weekly';\n public const string FREQUENCY_MONTHLY = 'monthly';\n public const string FREQUENCY_QUARTERLY = 'quarterly';\n public const string FREQUENCY_ONE_OFF = 'one_off';\n protected $signature = 'jiminny:debug';\n\n public function handle(\n JobDispatcherInterface $jobDispatcher,\n AutomatedReportsService $automatedReportsService,\n AutomatedReportsRepository $automatedReportsRepository,\n UserPilotClient $userPilotClient\n ): void {\n $user = User::find(143);\n // $count = $automatedReportsRepository->countUserReports($user);\n // $this->info(\"Count: {$count}\");\n // $count = $automatedReportsRepository->countAllUserReports($user);\n // $this->info(\"All count: {$count}\");\n\n $payload = [\n 'report_type' => 'ask_jiminny',\n 'frequency' => 'weekly',\n ];\n $userPilotClient->track($user, 'ask-jiminny-report-generated', $payload);\n\n exit(1);\n\n $now = Carbon::now()->subDay(1);\n $this->info(\"Now: {$now->toDateTimeString()}\");\n $weekStart = Carbon::getWeekStartsAt();\n $this->info(\"Now: {$weekStart}\");\n\n // $from = $now->copy()->previousWeekday()->startOfDay();\n // $to = $now->copy()->previousWeekday()->endOfDay();\n\n // $fromOld = $now->copy()->subWeeks(1)->startOfDay();\n // $toOld = $now->copy()->subDay()->endOfDay();\n // $fromNew = $now->copy()->subWeek()->startOfWeek();\n // $toNew = $now->copy()->subWeek()->endOfWeek();\n\n // $fromOld = $now->copy()->subMonths(1)->startOfDay();\n // $toOld = $now->copy()->subDay()->endOfDay();\n // $fromNew = $now->copy()->subMonthNoOverflow()->startOfMonth();\n // $toNew = $now->copy()->subMonthNoOverflow()->endOfMonth();\n\n $fromOld = $now->copy()->subMonths(3)->startOfDay();\n $toOld = $now->copy()->subDay()->endOfDay();\n $fromNew = $now->copy()->subQuarterNoOverflow()->startOfQuarter();\n $toNew = $now->copy()->subQuarterNoOverflow()->endOfQuarter();\n\n $this->info(\"From old: {$fromOld->toDateTimeString()}\");\n $this->info(\"To old: {$toOld->toDateTimeString()}\");\n $this->info(\"From new: {$fromNew->toDateTimeString()}\");\n $this->info(\"To new: {$toNew->toDateTimeString()}\");\n\n exit(1);\n\n $report = AutomatedReport::find(71);\n\n $job = new RequestGenerateAskJiminnyReportJob($report->getUuid());\n $jobDispatcher->dispatch($job);\n\n exit(1);\n\n\n // $this->formatDate($jobDispatcher);\n // $this->sendMail($jobDispatcher, $automatedReportsService);\n // $this->crmService();\n\n $this->getPayload($automatedReportsService);\n\n exit(1);\n }\n\n\n\n private function crmService()\n {\n $activity = Activity::find(418141);\n\n $team = Team::find(19);\n $config = $team->getCrmConfiguration();\n\n $crmResolver = app(CrmOwnerResolver::class, [\n 'team' => $team,\n 'integrationAdmin' => $team->getOwner(),\n 'providerSlug' => $config->getProviderName(),\n ]);\n\n $crmService = $crmResolver->prepareCrmService();\n\n $crmService->createTranscriptNotes($activity);\n }\n\n private function sendMail(JobDispatcherInterface $jobDispatcher, AutomatedReportsService $automatedReportsService)\n {\n $reportUuid = '';\n // $report = $automatedReportsService->getReportResult($reportUuid);\n $report = AutomatedReportResult::find(275);\n $validRecipients = $automatedReportsService->getValidRecipientUsers(\n $report->getReport(),\n includeJiminny: true,\n );\n\n $recipient = $validRecipients[0];\n\n $fileName = $automatedReportsService->getReportFileName($report);\n $typeName = $report->getReport()->getCustomName()\n ?? $automatedReportsService->getReportTypeName($report);\n $teamsName = $automatedReportsService->getReportTeamsName($report);\n $periodName = $automatedReportsService->getReportPeriodName($report);\n $s3Path = $automatedReportsService->getMediaPath($report);\n\n \\Illuminate\\Support\\Facades\\Log::channel('custom_channel')->info('$fileName ' . PHP_EOL . print_r($fileName, true));\n \\Illuminate\\Support\\Facades\\Log::channel('custom_channel')->info('$typeName ' . PHP_EOL . print_r($typeName, true));\n \\Illuminate\\Support\\Facades\\Log::channel('custom_channel')->info('$teamsName ' . PHP_EOL . print_r($teamsName, true));\n \\Illuminate\\Support\\Facades\\Log::channel('custom_channel')->info('$periodName ' . PHP_EOL . print_r($periodName, true));\n \\Illuminate\\Support\\Facades\\Log::channel('custom_channel')->info('$s3Path ' . PHP_EOL . print_r($s3Path, true));\n\n $jobDispatcher->dispatch(\n new SendReportMailJob(\n reportUuid: $report->getUuid(),\n s3Path: $s3Path,\n recipientEmail: $recipient['email'],\n recipientName: $recipient['name'] ?? null,\n fileName: $fileName,\n typeName: $typeName,\n teamsName: $teamsName,\n periodName: $periodName,\n isAskJiminny: true,\n )\n );\n\n exit(1);\n }\n\n private function formatDate(JobDispatcherInterface $jobDispatcher): void\n {\n $customName = 'Custom report name';\n // $frequency = self::FREQUENCY_DAILY;\n // $frequency = self::FREQUENCY_WEEKLY;\n $frequency = self::FREQUENCY_MONTHLY;\n // $frequency = self::FREQUENCY_QUARTERLY;\n // $frequency = self::FREQUENCY_ONE_OFF;\n $period = $this->calculateFromAndToDatePeriod($frequency);\n $from = $period['fromDate'];\n $to = $period['toDate'];\n $periodName = $this->formatReportPeriodName($frequency, $from, $to);\n $filenameSuffix = null;\n\n if ($customName) {\n if ($filenameSuffix) {\n $customName .= \" {$filenameSuffix}\";\n }\n\n $result = $this->sanitizeFileName(\"{$customName} - {$periodName}\");\n }\n\n $this->info($result);\n }\n\n public function calculateFromAndToDatePeriod(\n string $frequency,\n ?Carbon $fromDate = null,\n ?Carbon $toDate = null\n ): array {\n if ($frequency === self::FREQUENCY_ONE_OFF) {\n return [\n 'fromDate' => $fromDate,\n 'toDate' => $toDate,\n ];\n }\n\n $now = Carbon::now();\n\n return match ($frequency) {\n self::FREQUENCY_DAILY => [\n 'fromDate' => $now->copy()->subDay()->startOfDay(),\n 'toDate' => $now->copy()->subDay()->endOfDay(),\n ],\n self::FREQUENCY_WEEKLY => [\n 'fromDate' => $now->copy()->subWeeks(1)->startOfDay(),\n 'toDate' => $now->copy()->subDay()->endOfDay(),\n ],\n self::FREQUENCY_MONTHLY => [\n 'fromDate' => $now->copy()->subMonths(1)->startOfDay(),\n 'toDate' => $now->copy()->subDay()->endOfDay(),\n ],\n self::FREQUENCY_QUARTERLY => [\n 'fromDate' => $now->copy()->subMonths(3)->startOfDay(),\n 'toDate' => $now->copy()->subDay()->endOfDay(),\n ],\n default => throw new InvalidArgumentException(\"Unsupported frequency: {$frequency}\"),\n };\n }\n\n private function formatReportPeriodName(string $frequency, Carbon $from, Carbon $to): string\n {\n $fromYear = $from->format('Y');\n $toYear = $to->format('Y');\n $differentYears = $fromYear !== $toYear;\n\n switch ($frequency) {\n case self::FREQUENCY_DAILY:\n return $from->format('j M Y');\n\n case self::FREQUENCY_QUARTERLY:\n // 'Jan-Mar 2025' or 'Nov 2024-Jan 2025' if years differ\n $startMonth = $from->format('M');\n $endMonth = $to->copy()->subMonth();\n $endMonthName = $endMonth->format('M');\n $endMonthYear = $endMonth->format('Y');\n\n if ($differentYears) {\n return \"{$startMonth} {$fromYear} - {$endMonthName} {$endMonthYear}\";\n }\n\n return \"{$startMonth} - {$endMonthName} {$toYear}\";\n\n case self::FREQUENCY_MONTHLY:\n // 'May 2025' - monthly reports are always within the same year\n return $from->format('M Y');\n\n case self::FREQUENCY_WEEKLY:\n // '4 - 8 Aug 2025', '27 Oct - 3 Nov 2025', or '28 Dec 2024 - 3 Jan 2025' if years differ\n $startDay = $from->format('j');\n $endDay = $to->format('j');\n $startMonth = $from->format('M');\n $endMonth = $to->format('M');\n\n if ($differentYears) {\n return \"{$startDay} {$startMonth} {$fromYear} - {$endDay} {$endMonth} {$toYear}\";\n }\n\n if ($startMonth !== $endMonth) {\n return \"{$startDay} {$startMonth} - {$endDay} {$endMonth} {$toYear}\";\n }\n\n return \"{$startDay} - {$endDay} {$endMonth} {$toYear}\";\n\n case self::FREQUENCY_ONE_OFF:\n // '2 May-31 May 2025' or '15 Dec 2024-15 Jan 2025' if years differ\n $startDay = $from->format('j');\n $startMonth = $from->format('M');\n $endDay = $to->format('j');\n $endMonth = $to->format('M');\n\n // If same month and year, use a format like '2-31 May 2025'\n if ($startMonth === $endMonth && ! $differentYears) {\n return \"{$startDay} - {$endDay} {$startMonth} {$toYear}\";\n }\n\n // If different years, include both years\n if ($differentYears) {\n return \"{$startDay} {$startMonth} {$fromYear} - {$endDay} {$endMonth} {$toYear}\";\n }\n\n // Same year but different months\n return \"{$startDay} {$startMonth} - {$endDay} {$endMonth} {$toYear}\";\n\n default:\n // Default format for unknown frequencies\n return $from->format('j M Y') . ' - ' . $to->format('j M Y');\n }\n }\n\n public function sanitizeFileName(string $fileName): string\n {\n return str_replace(['/', '\\\\'], '-', $fileName);\n }\n\n private function getPayload(AutomatedReportsService $automatedReportsService)\n {\n $reportResult = AutomatedReportResult::find(269);\n $automatedReport = $reportResult->getReport();\n $activityIds = [1,2,3];\n $payload = $automatedReportsService->getAskJiminnyGenerateReportPayload(\n automatedReport: $automatedReport,\n reportResult: $reportResult,\n activityIds: $activityIds,\n );\n\n \\Illuminate\\Support\\Facades\\Log::channel('custom_channel')->info('$payload ' . PHP_EOL . print_r($payload, true));\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Console\\Commands;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Console\\Command;\nuse InvalidArgumentException;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateAskJiminnyReportJob;\nuse Jiminny\\Jobs\\AutomatedReports\\SendReportMailJob;\nuse Jiminny\\Jobs\\JobDispatcherInterface;\nuse Jiminny\\Models\\Activity;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Activity\\CrmOwnerResolver;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Jiminny\\Services\\UserPilot\\UserPilotClient;\n\n/**\n * Class JiminnyDebugCommand\n *\n * @package Jiminny\\Console\\Commands\n */\nclass JiminnyDebugCommand extends Command\n{\n public const string FREQUENCY_DAILY = 'daily';\n public const string FREQUENCY_WEEKLY = 'weekly';\n public const string FREQUENCY_MONTHLY = 'monthly';\n public const string FREQUENCY_QUARTERLY = 'quarterly';\n public const string FREQUENCY_ONE_OFF = 'one_off';\n protected $signature = 'jiminny:debug';\n\n public function handle(\n JobDispatcherInterface $jobDispatcher,\n AutomatedReportsService $automatedReportsService,\n AutomatedReportsRepository $automatedReportsRepository,\n UserPilotClient $userPilotClient\n ): void {\n $user = User::find(143);\n // $count = $automatedReportsRepository->countUserReports($user);\n // $this->info(\"Count: {$count}\");\n // $count = $automatedReportsRepository->countAllUserReports($user);\n // $this->info(\"All count: {$count}\");\n\n $payload = [\n 'report_type' => 'ask_jiminny',\n 'frequency' => 'weekly',\n ];\n $userPilotClient->track($user, 'ask-jiminny-report-generated', $payload);\n\n exit(1);\n\n $now = Carbon::now()->subDay(1);\n $this->info(\"Now: {$now->toDateTimeString()}\");\n $weekStart = Carbon::getWeekStartsAt();\n $this->info(\"Now: {$weekStart}\");\n\n // $from = $now->copy()->previousWeekday()->startOfDay();\n // $to = $now->copy()->previousWeekday()->endOfDay();\n\n // $fromOld = $now->copy()->subWeeks(1)->startOfDay();\n // $toOld = $now->copy()->subDay()->endOfDay();\n // $fromNew = $now->copy()->subWeek()->startOfWeek();\n // $toNew = $now->copy()->subWeek()->endOfWeek();\n\n // $fromOld = $now->copy()->subMonths(1)->startOfDay();\n // $toOld = $now->copy()->subDay()->endOfDay();\n // $fromNew = $now->copy()->subMonthNoOverflow()->startOfMonth();\n // $toNew = $now->copy()->subMonthNoOverflow()->endOfMonth();\n\n $fromOld = $now->copy()->subMonths(3)->startOfDay();\n $toOld = $now->copy()->subDay()->endOfDay();\n $fromNew = $now->copy()->subQuarterNoOverflow()->startOfQuarter();\n $toNew = $now->copy()->subQuarterNoOverflow()->endOfQuarter();\n\n $this->info(\"From old: {$fromOld->toDateTimeString()}\");\n $this->info(\"To old: {$toOld->toDateTimeString()}\");\n $this->info(\"From new: {$fromNew->toDateTimeString()}\");\n $this->info(\"To new: {$toNew->toDateTimeString()}\");\n\n exit(1);\n\n $report = AutomatedReport::find(71);\n\n $job = new RequestGenerateAskJiminnyReportJob($report->getUuid());\n $jobDispatcher->dispatch($job);\n\n exit(1);\n\n\n // $this->formatDate($jobDispatcher);\n // $this->sendMail($jobDispatcher, $automatedReportsService);\n // $this->crmService();\n\n $this->getPayload($automatedReportsService);\n\n exit(1);\n }\n\n\n\n private function crmService()\n {\n $activity = Activity::find(418141);\n\n $team = Team::find(19);\n $config = $team->getCrmConfiguration();\n\n $crmResolver = app(CrmOwnerResolver::class, [\n 'team' => $team,\n 'integrationAdmin' => $team->getOwner(),\n 'providerSlug' => $config->getProviderName(),\n ]);\n\n $crmService = $crmResolver->prepareCrmService();\n\n $crmService->createTranscriptNotes($activity);\n }\n\n private function sendMail(JobDispatcherInterface $jobDispatcher, AutomatedReportsService $automatedReportsService)\n {\n $reportUuid = '';\n // $report = $automatedReportsService->getReportResult($reportUuid);\n $report = AutomatedReportResult::find(275);\n $validRecipients = $automatedReportsService->getValidRecipientUsers(\n $report->getReport(),\n includeJiminny: true,\n );\n\n $recipient = $validRecipients[0];\n\n $fileName = $automatedReportsService->getReportFileName($report);\n $typeName = $report->getReport()->getCustomName()\n ?? $automatedReportsService->getReportTypeName($report);\n $teamsName = $automatedReportsService->getReportTeamsName($report);\n $periodName = $automatedReportsService->getReportPeriodName($report);\n $s3Path = $automatedReportsService->getMediaPath($report);\n\n \\Illuminate\\Support\\Facades\\Log::channel('custom_channel')->info('$fileName ' . PHP_EOL . print_r($fileName, true));\n \\Illuminate\\Support\\Facades\\Log::channel('custom_channel')->info('$typeName ' . PHP_EOL . print_r($typeName, true));\n \\Illuminate\\Support\\Facades\\Log::channel('custom_channel')->info('$teamsName ' . PHP_EOL . print_r($teamsName, true));\n \\Illuminate\\Support\\Facades\\Log::channel('custom_channel')->info('$periodName ' . PHP_EOL . print_r($periodName, true));\n \\Illuminate\\Support\\Facades\\Log::channel('custom_channel')->info('$s3Path ' . PHP_EOL . print_r($s3Path, true));\n\n $jobDispatcher->dispatch(\n new SendReportMailJob(\n reportUuid: $report->getUuid(),\n s3Path: $s3Path,\n recipientEmail: $recipient['email'],\n recipientName: $recipient['name'] ?? null,\n fileName: $fileName,\n typeName: $typeName,\n teamsName: $teamsName,\n periodName: $periodName,\n isAskJiminny: true,\n )\n );\n\n exit(1);\n }\n\n private function formatDate(JobDispatcherInterface $jobDispatcher): void\n {\n $customName = 'Custom report name';\n // $frequency = self::FREQUENCY_DAILY;\n // $frequency = self::FREQUENCY_WEEKLY;\n $frequency = self::FREQUENCY_MONTHLY;\n // $frequency = self::FREQUENCY_QUARTERLY;\n // $frequency = self::FREQUENCY_ONE_OFF;\n $period = $this->calculateFromAndToDatePeriod($frequency);\n $from = $period['fromDate'];\n $to = $period['toDate'];\n $periodName = $this->formatReportPeriodName($frequency, $from, $to);\n $filenameSuffix = null;\n\n if ($customName) {\n if ($filenameSuffix) {\n $customName .= \" {$filenameSuffix}\";\n }\n\n $result = $this->sanitizeFileName(\"{$customName} - {$periodName}\");\n }\n\n $this->info($result);\n }\n\n public function calculateFromAndToDatePeriod(\n string $frequency,\n ?Carbon $fromDate = null,\n ?Carbon $toDate = null\n ): array {\n if ($frequency === self::FREQUENCY_ONE_OFF) {\n return [\n 'fromDate' => $fromDate,\n 'toDate' => $toDate,\n ];\n }\n\n $now = Carbon::now();\n\n return match ($frequency) {\n self::FREQUENCY_DAILY => [\n 'fromDate' => $now->copy()->subDay()->startOfDay(),\n 'toDate' => $now->copy()->subDay()->endOfDay(),\n ],\n self::FREQUENCY_WEEKLY => [\n 'fromDate' => $now->copy()->subWeeks(1)->startOfDay(),\n 'toDate' => $now->copy()->subDay()->endOfDay(),\n ],\n self::FREQUENCY_MONTHLY => [\n 'fromDate' => $now->copy()->subMonths(1)->startOfDay(),\n 'toDate' => $now->copy()->subDay()->endOfDay(),\n ],\n self::FREQUENCY_QUARTERLY => [\n 'fromDate' => $now->copy()->subMonths(3)->startOfDay(),\n 'toDate' => $now->copy()->subDay()->endOfDay(),\n ],\n default => throw new InvalidArgumentException(\"Unsupported frequency: {$frequency}\"),\n };\n }\n\n private function formatReportPeriodName(string $frequency, Carbon $from, Carbon $to): string\n {\n $fromYear = $from->format('Y');\n $toYear = $to->format('Y');\n $differentYears = $fromYear !== $toYear;\n\n switch ($frequency) {\n case self::FREQUENCY_DAILY:\n return $from->format('j M Y');\n\n case self::FREQUENCY_QUARTERLY:\n // 'Jan-Mar 2025' or 'Nov 2024-Jan 2025' if years differ\n $startMonth = $from->format('M');\n $endMonth = $to->copy()->subMonth();\n $endMonthName = $endMonth->format('M');\n $endMonthYear = $endMonth->format('Y');\n\n if ($differentYears) {\n return \"{$startMonth} {$fromYear} - {$endMonthName} {$endMonthYear}\";\n }\n\n return \"{$startMonth} - {$endMonthName} {$toYear}\";\n\n case self::FREQUENCY_MONTHLY:\n // 'May 2025' - monthly reports are always within the same year\n return $from->format('M Y');\n\n case self::FREQUENCY_WEEKLY:\n // '4 - 8 Aug 2025', '27 Oct - 3 Nov 2025', or '28 Dec 2024 - 3 Jan 2025' if years differ\n $startDay = $from->format('j');\n $endDay = $to->format('j');\n $startMonth = $from->format('M');\n $endMonth = $to->format('M');\n\n if ($differentYears) {\n return \"{$startDay} {$startMonth} {$fromYear} - {$endDay} {$endMonth} {$toYear}\";\n }\n\n if ($startMonth !== $endMonth) {\n return \"{$startDay} {$startMonth} - {$endDay} {$endMonth} {$toYear}\";\n }\n\n return \"{$startDay} - {$endDay} {$endMonth} {$toYear}\";\n\n case self::FREQUENCY_ONE_OFF:\n // '2 May-31 May 2025' or '15 Dec 2024-15 Jan 2025' if years differ\n $startDay = $from->format('j');\n $startMonth = $from->format('M');\n $endDay = $to->format('j');\n $endMonth = $to->format('M');\n\n // If same month and year, use a format like '2-31 May 2025'\n if ($startMonth === $endMonth && ! $differentYears) {\n return \"{$startDay} - {$endDay} {$startMonth} {$toYear}\";\n }\n\n // If different years, include both years\n if ($differentYears) {\n return \"{$startDay} {$startMonth} {$fromYear} - {$endDay} {$endMonth} {$toYear}\";\n }\n\n // Same year but different months\n return \"{$startDay} {$startMonth} - {$endDay} {$endMonth} {$toYear}\";\n\n default:\n // Default format for unknown frequencies\n return $from->format('j M Y') . ' - ' . $to->format('j M Y');\n }\n }\n\n public function sanitizeFileName(string $fileName): string\n {\n return str_replace(['/', '\\\\'], '-', $fileName);\n }\n\n private function getPayload(AutomatedReportsService $automatedReportsService)\n {\n $reportResult = AutomatedReportResult::find(269);\n $automatedReport = $reportResult->getReport();\n $activityIds = [1,2,3];\n $payload = $automatedReportsService->getAskJiminnyGenerateReportPayload(\n automatedReport: $automatedReport,\n reportResult: $reportResult,\n activityIds: $activityIds,\n );\n\n \\Illuminate\\Support\\Facades\\Log::channel('custom_channel')->info('$payload ' . PHP_EOL . print_r($payload, true));\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"7","depth":4,"bounds":{"left":0.67852396,"top":0.12529927,"width":0.0076462766,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.6878325,"top":0.123703115,"width":0.00731383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.69514626,"top":0.123703115,"width":0.006981383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\nnamespace Jiminny\\Services\\UserPilot;\n\nuse Illuminate\\Http\\Client\\PendingRequest;\nuse Illuminate\\Support\\Facades\\Http;\nuse Jiminny\\Models\\Feature\\FeatureEnum;\nuse Jiminny\\Models\\Partner;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\n\nclass UserPilotClient\n{\n private const API_ENDPOINT = 'https://api.userpilot.io/v1/';\n\n private const ANALYTICS_ENDPOINT = 'https://analytex.userpilot.io/v1/';\n\n private function createRequest(): PendingRequest\n {\n return Http::withHeaders([\n 'X-API-Version' => '2020-09-22',\n 'Authorization' => 'Token ' . config('services.userpilot.key'),\n ]);\n }\n\n public function track(User $user, string $event, array $payload = []): void\n {\n if ($this->shouldRequest($user->getTeam()) === false) {\n return;\n }\n\n $this->createRequest()->post(self::ANALYTICS_ENDPOINT . 'track', [\n 'event_name' => $event,\n 'user_id' => $user->getUuid(),\n 'metadata' => $payload,\n ]);\n }\n\n public function upsertUser(User $user): void\n {\n if ($this->shouldRequest($user->getTeam()) === false) {\n return;\n }\n\n $companyMetadata = $this->getCompanyMetadata($user->getTeam());\n $companyMetadata['id'] = $user->getTeam()->getUuid();\n\n $this->createRequest()->post(self::ANALYTICS_ENDPOINT . 'identify', [\n 'user_id' => $user->getUuid(),\n 'metadata' => [\n 'name' => $user->name,\n 'first_name' => $user->getFirstName(),\n 'position' => $user->job ? $user->job->name : null,\n 'email' => $user->getEmailAddress(),\n 'created_at' => $user->getCreatedAt()->unix(),\n 'is_admin' => $user->hasRole(User::ROLE_ADMIN),\n 'is_manager' => $user->hasRole(User::ROLE_MANAGER),\n 'is_owner' => $user->isTeamOwner(),\n 'is_insights' => $user->hasRole(User::ROLE_ANALYST),\n 'is_recorder' => $user->hasRole(User::ROLE_RECORDER),\n 'is_jiminny_voice' => $user->hasRole(User::ROLE_RECORDER_AND_VOICE),\n 'is_listener' => $user->hasRole(User::ROLE_LISTENER),\n 'license' => null,\n 'team' => $user->group ? $user->group->name : null,\n 'language' => $user->getLanguage(),\n 'email_sync' => $user->isSyncEmailEnabled(),\n ],\n 'company' => $companyMetadata,\n ]);\n }\n\n public function upsertCompany(Team $team): void\n {\n $this->createRequest()->post(self::ANALYTICS_ENDPOINT . 'companies/identify', [\n 'company_id' => $team->getUuid(),\n 'metadata' => $this->getCompanyMetadata($team),\n ]);\n }\n\n private function getCompanyMetadata(Team $team): array\n {\n return [\n 'created_at' => $team->getCreatedAt()->unix(),\n 'name' => $team->getName(),\n 'region' => config('jiminny.deploy_region'),\n 'crm' => $team->getCrmConfiguration()->getProviderName(),\n 'crm_installed_app_version' => $team->getCrmConfiguration()->getInstalledAppVersion(),\n 'calendar' => $team->getCalendarProvider(),\n 'notification_provider' => $team->getNotificationProvider(),\n 'has_jiminny_voice' => $team->hasFeature(FeatureEnum::DIALER),\n 'tier' => $team->getTier()?->getTitle(),\n ];\n }\n\n\n public function deleteUser(User $user): void\n {\n if ($this->shouldRequest($user->getTeam()) === false) {\n return;\n }\n\n $this->createRequest()->delete(self::API_ENDPOINT . 'users', [\n 'users' => [$user->getUuid()],\n ]);\n }\n\n public function deleteCompany(Team $team): void\n {\n if ($this->shouldRequest($team) === false) {\n return;\n }\n\n $this->createRequest()->delete(self::API_ENDPOINT . 'companies', [\n 'companies' => [$team->getUuid()],\n ]);\n }\n\n public function shouldRequest(Team $team): bool\n {\n return config('services.userpilot.key') !== null && $team->getPartnerId() === Partner::PARTNER_DEFAULT;\n }\n\n}","depth":4,"bounds":{"left":0.44414893,"top":0.0,"width":0.30784574,"height":1.0},"value":"<?php\n\nnamespace Jiminny\\Services\\UserPilot;\n\nuse Illuminate\\Http\\Client\\PendingRequest;\nuse Illuminate\\Support\\Facades\\Http;\nuse Jiminny\\Models\\Feature\\FeatureEnum;\nuse Jiminny\\Models\\Partner;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\n\nclass UserPilotClient\n{\n private const API_ENDPOINT = 'https://api.userpilot.io/v1/';\n\n private const ANALYTICS_ENDPOINT = 'https://analytex.userpilot.io/v1/';\n\n private function createRequest(): PendingRequest\n {\n return Http::withHeaders([\n 'X-API-Version' => '2020-09-22',\n 'Authorization' => 'Token ' . config('services.userpilot.key'),\n ]);\n }\n\n public function track(User $user, string $event, array $payload = []): void\n {\n if ($this->shouldRequest($user->getTeam()) === false) {\n return;\n }\n\n $this->createRequest()->post(self::ANALYTICS_ENDPOINT . 'track', [\n 'event_name' => $event,\n 'user_id' => $user->getUuid(),\n 'metadata' => $payload,\n ]);\n }\n\n public function upsertUser(User $user): void\n {\n if ($this->shouldRequest($user->getTeam()) === false) {\n return;\n }\n\n $companyMetadata = $this->getCompanyMetadata($user->getTeam());\n $companyMetadata['id'] = $user->getTeam()->getUuid();\n\n $this->createRequest()->post(self::ANALYTICS_ENDPOINT . 'identify', [\n 'user_id' => $user->getUuid(),\n 'metadata' => [\n 'name' => $user->name,\n 'first_name' => $user->getFirstName(),\n 'position' => $user->job ? $user->job->name : null,\n 'email' => $user->getEmailAddress(),\n 'created_at' => $user->getCreatedAt()->unix(),\n 'is_admin' => $user->hasRole(User::ROLE_ADMIN),\n 'is_manager' => $user->hasRole(User::ROLE_MANAGER),\n 'is_owner' => $user->isTeamOwner(),\n 'is_insights' => $user->hasRole(User::ROLE_ANALYST),\n 'is_recorder' => $user->hasRole(User::ROLE_RECORDER),\n 'is_jiminny_voice' => $user->hasRole(User::ROLE_RECORDER_AND_VOICE),\n 'is_listener' => $user->hasRole(User::ROLE_LISTENER),\n 'license' => null,\n 'team' => $user->group ? $user->group->name : null,\n 'language' => $user->getLanguage(),\n 'email_sync' => $user->isSyncEmailEnabled(),\n ],\n 'company' => $companyMetadata,\n ]);\n }\n\n public function upsertCompany(Team $team): void\n {\n $this->createRequest()->post(self::ANALYTICS_ENDPOINT . 'companies/identify', [\n 'company_id' => $team->getUuid(),\n 'metadata' => $this->getCompanyMetadata($team),\n ]);\n }\n\n private function getCompanyMetadata(Team $team): array\n {\n return [\n 'created_at' => $team->getCreatedAt()->unix(),\n 'name' => $team->getName(),\n 'region' => config('jiminny.deploy_region'),\n 'crm' => $team->getCrmConfiguration()->getProviderName(),\n 'crm_installed_app_version' => $team->getCrmConfiguration()->getInstalledAppVersion(),\n 'calendar' => $team->getCalendarProvider(),\n 'notification_provider' => $team->getNotificationProvider(),\n 'has_jiminny_voice' => $team->hasFeature(FeatureEnum::DIALER),\n 'tier' => $team->getTier()?->getTitle(),\n ];\n }\n\n\n public function deleteUser(User $user): void\n {\n if ($this->shouldRequest($user->getTeam()) === false) {\n return;\n }\n\n $this->createRequest()->delete(self::API_ENDPOINT . 'users', [\n 'users' => [$user->getUuid()],\n ]);\n }\n\n public function deleteCompany(Team $team): void\n {\n if ($this->shouldRequest($team) === false) {\n return;\n }\n\n $this->createRequest()->delete(self::API_ENDPOINT . 'companies', [\n 'companies' => [$team->getUuid()],\n ]);\n }\n\n public function shouldRequest(Team $team): bool\n {\n return config('services.userpilot.key') !== null && $team->getPartnerId() === Partner::PARTNER_DEFAULT;\n }\n\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.011968086,"top":0.047885075,"width":0.024268618,"height":0.024740623},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-2746348411827125117
|
3604975423547076527
|
click
|
accessibility
|
NULL
|
Pushed JY-20738-debug-AJ-tracking-UP to new branch Pushed JY-20738-debug-AJ-tracking-UP to new branch origin/JY-20738-debug-AJ-tracking-UP
text/html
text/html
text/html
Create pull request
4 files committed
JY-20738 add debug logs on AJ report UP tracking
text/html
text/html
text/html
Edit Commit Message…
Project: faVsco.js, menu
JY-20738-debug-AJ-tracking-UP, menu
Start Listening for PHP Debug Connections
ReportControllerTest
Run 'ReportControllerTest'
Debug 'ReportControllerTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
3
115
4
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Console\Commands;
use Carbon\Carbon;
use Illuminate\Console\Command;
use InvalidArgumentException;
use Jiminny\Jobs\AutomatedReports\RequestGenerateAskJiminnyReportJob;
use Jiminny\Jobs\AutomatedReports\SendReportMailJob;
use Jiminny\Jobs\JobDispatcherInterface;
use Jiminny\Models\Activity;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Activity\CrmOwnerResolver;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Jiminny\Services\UserPilot\UserPilotClient;
/**
* Class JiminnyDebugCommand
*
* @package Jiminny\Console\Commands
*/
class JiminnyDebugCommand extends Command
{
public const string FREQUENCY_DAILY = 'daily';
public const string FREQUENCY_WEEKLY = 'weekly';
public const string FREQUENCY_MONTHLY = 'monthly';
public const string FREQUENCY_QUARTERLY = 'quarterly';
public const string FREQUENCY_ONE_OFF = 'one_off';
protected $signature = 'jiminny:debug';
public function handle(
JobDispatcherInterface $jobDispatcher,
AutomatedReportsService $automatedReportsService,
AutomatedReportsRepository $automatedReportsRepository,
UserPilotClient $userPilotClient
): void {
$user = User::find(143);
// $count = $automatedReportsRepository->countUserReports($user);
// $this->info("Count: {$count}");
// $count = $automatedReportsRepository->countAllUserReports($user);
// $this->info("All count: {$count}");
$payload = [
'report_type' => 'ask_jiminny',
'frequency' => 'weekly',
];
$userPilotClient->track($user, 'ask-jiminny-report-generated', $payload);
exit(1);
$now = Carbon::now()->subDay(1);
$this->info("Now: {$now->toDateTimeString()}");
$weekStart = Carbon::getWeekStartsAt();
$this->info("Now: {$weekStart}");
// $from = $now->copy()->previousWeekday()->startOfDay();
// $to = $now->copy()->previousWeekday()->endOfDay();
// $fromOld = $now->copy()->subWeeks(1)->startOfDay();
// $toOld = $now->copy()->subDay()->endOfDay();
// $fromNew = $now->copy()->subWeek()->startOfWeek();
// $toNew = $now->copy()->subWeek()->endOfWeek();
// $fromOld = $now->copy()->subMonths(1)->startOfDay();
// $toOld = $now->copy()->subDay()->endOfDay();
// $fromNew = $now->copy()->subMonthNoOverflow()->startOfMonth();
// $toNew = $now->copy()->subMonthNoOverflow()->endOfMonth();
$fromOld = $now->copy()->subMonths(3)->startOfDay();
$toOld = $now->copy()->subDay()->endOfDay();
$fromNew = $now->copy()->subQuarterNoOverflow()->startOfQuarter();
$toNew = $now->copy()->subQuarterNoOverflow()->endOfQuarter();
$this->info("From old: {$fromOld->toDateTimeString()}");
$this->info("To old: {$toOld->toDateTimeString()}");
$this->info("From new: {$fromNew->toDateTimeString()}");
$this->info("To new: {$toNew->toDateTimeString()}");
exit(1);
$report = AutomatedReport::find(71);
$job = new RequestGenerateAskJiminnyReportJob($report->getUuid());
$jobDispatcher->dispatch($job);
exit(1);
// $this->formatDate($jobDispatcher);
// $this->sendMail($jobDispatcher, $automatedReportsService);
// $this->crmService();
$this->getPayload($automatedReportsService);
exit(1);
}
private function crmService()
{
$activity = Activity::find(418141);
$team = Team::find(19);
$config = $team->getCrmConfiguration();
$crmResolver = app(CrmOwnerResolver::class, [
'team' => $team,
'integrationAdmin' => $team->getOwner(),
'providerSlug' => $config->getProviderName(),
]);
$crmService = $crmResolver->prepareCrmService();
$crmService->createTranscriptNotes($activity);
}
private function sendMail(JobDispatcherInterface $jobDispatcher, AutomatedReportsService $automatedReportsService)
{
$reportUuid = '';
// $report = $automatedReportsService->getReportResult($reportUuid);
$report = AutomatedReportResult::find(275);
$validRecipients = $automatedReportsService->getValidRecipientUsers(
$report->getReport(),
includeJiminny: true,
);
$recipient = $validRecipients[0];
$fileName = $automatedReportsService->getReportFileName($report);
$typeName = $report->getReport()->getCustomName()
?? $automatedReportsService->getReportTypeName($report);
$teamsName = $automatedReportsService->getReportTeamsName($report);
$periodName = $automatedReportsService->getReportPeriodName($report);
$s3Path = $automatedReportsService->getMediaPath($report);
\Illuminate\Support\Facades\Log::channel('custom_channel')->info('$fileName ' . PHP_EOL . print_r($fileName, true));
\Illuminate\Support\Facades\Log::channel('custom_channel')->info('$typeName ' . PHP_EOL . print_r($typeName, true));
\Illuminate\Support\Facades\Log::channel('custom_channel')->info('$teamsName ' . PHP_EOL . print_r($teamsName, true));
\Illuminate\Support\Facades\Log::channel('custom_channel')->info('$periodName ' . PHP_EOL . print_r($periodName, true));
\Illuminate\Support\Facades\Log::channel('custom_channel')->info('$s3Path ' . PHP_EOL . print_r($s3Path, true));
$jobDispatcher->dispatch(
new SendReportMailJob(
reportUuid: $report->getUuid(),
s3Path: $s3Path,
recipientEmail: $recipient['email'],
recipientName: $recipient['name'] ?? null,
fileName: $fileName,
typeName: $typeName,
teamsName: $teamsName,
periodName: $periodName,
isAskJiminny: true,
)
);
exit(1);
}
private function formatDate(JobDispatcherInterface $jobDispatcher): void
{
$customName = 'Custom report name';
// $frequency = self::FREQUENCY_DAILY;
// $frequency = self::FREQUENCY_WEEKLY;
$frequency = self::FREQUENCY_MONTHLY;
// $frequency = self::FREQUENCY_QUARTERLY;
// $frequency = self::FREQUENCY_ONE_OFF;
$period = $this->calculateFromAndToDatePeriod($frequency);
$from = $period['fromDate'];
$to = $period['toDate'];
$periodName = $this->formatReportPeriodName($frequency, $from, $to);
$filenameSuffix = null;
if ($customName) {
if ($filenameSuffix) {
$customName .= " {$filenameSuffix}";
}
$result = $this->sanitizeFileName("{$customName} - {$periodName}");
}
$this->info($result);
}
public function calculateFromAndToDatePeriod(
string $frequency,
?Carbon $fromDate = null,
?Carbon $toDate = null
): array {
if ($frequency === self::FREQUENCY_ONE_OFF) {
return [
'fromDate' => $fromDate,
'toDate' => $toDate,
];
}
$now = Carbon::now();
return match ($frequency) {
self::FREQUENCY_DAILY => [
'fromDate' => $now->copy()->subDay()->startOfDay(),
'toDate' => $now->copy()->subDay()->endOfDay(),
],
self::FREQUENCY_WEEKLY => [
'fromDate' => $now->copy()->subWeeks(1)->startOfDay(),
'toDate' => $now->copy()->subDay()->endOfDay(),
],
self::FREQUENCY_MONTHLY => [
'fromDate' => $now->copy()->subMonths(1)->startOfDay(),
'toDate' => $now->copy()->subDay()->endOfDay(),
],
self::FREQUENCY_QUARTERLY => [
'fromDate' => $now->copy()->subMonths(3)->startOfDay(),
'toDate' => $now->copy()->subDay()->endOfDay(),
],
default => throw new InvalidArgumentException("Unsupported frequency: {$frequency}"),
};
}
private function formatReportPeriodName(string $frequency, Carbon $from, Carbon $to): string
{
$fromYear = $from->format('Y');
$toYear = $to->format('Y');
$differentYears = $fromYear !== $toYear;
switch ($frequency) {
case self::FREQUENCY_DAILY:
return $from->format('j M Y');
case self::FREQUENCY_QUARTERLY:
// 'Jan-Mar 2025' or 'Nov 2024-Jan 2025' if years differ
$startMonth = $from->format('M');
$endMonth = $to->copy()->subMonth();
$endMonthName = $endMonth->format('M');
$endMonthYear = $endMonth->format('Y');
if ($differentYears) {
return "{$startMonth} {$fromYear} - {$endMonthName} {$endMonthYear}";
}
return "{$startMonth} - {$endMonthName} {$toYear}";
case self::FREQUENCY_MONTHLY:
// 'May 2025' - monthly reports are always within the same year
return $from->format('M Y');
case self::FREQUENCY_WEEKLY:
// '4 - 8 Aug 2025', '27 Oct - 3 Nov 2025', or '28 Dec 2024 - 3 Jan 2025' if years differ
$startDay = $from->format('j');
$endDay = $to->format('j');
$startMonth = $from->format('M');
$endMonth = $to->format('M');
if ($differentYears) {
return "{$startDay} {$startMonth} {$fromYear} - {$endDay} {$endMonth} {$toYear}";
}
if ($startMonth !== $endMonth) {
return "{$startDay} {$startMonth} - {$endDay} {$endMonth} {$toYear}";
}
return "{$startDay} - {$endDay} {$endMonth} {$toYear}";
case self::FREQUENCY_ONE_OFF:
// '2 May-31 May 2025' or '15 Dec 2024-15 Jan 2025' if years differ
$startDay = $from->format('j');
$startMonth = $from->format('M');
$endDay = $to->format('j');
$endMonth = $to->format('M');
// If same month and year, use a format like '2-31 May 2025'
if ($startMonth === $endMonth && ! $differentYears) {
return "{$startDay} - {$endDay} {$startMonth} {$toYear}";
}
// If different years, include both years
if ($differentYears) {
return "{$startDay} {$startMonth} {$fromYear} - {$endDay} {$endMonth} {$toYear}";
}
// Same year but different months
return "{$startDay} {$startMonth} - {$endDay} {$endMonth} {$toYear}";
default:
// Default format for unknown frequencies
return $from->format('j M Y') . ' - ' . $to->format('j M Y');
}
}
public function sanitizeFileName(string $fileName): string
{
return str_replace(['/', '\\'], '-', $fileName);
}
private function getPayload(AutomatedReportsService $automatedReportsService)
{
$reportResult = AutomatedReportResult::find(269);
$automatedReport = $reportResult->getReport();
$activityIds = [1,2,3];
$payload = $automatedReportsService->getAskJiminnyGenerateReportPayload(
automatedReport: $automatedReport,
reportResult: $reportResult,
activityIds: $activityIds,
);
\Illuminate\Support\Facades\Log::channel('custom_channel')->info('$payload ' . PHP_EOL . print_r($payload, true));
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
7
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Services\UserPilot;
use Illuminate\Http\Client\PendingRequest;
use Illuminate\Support\Facades\Http;
use Jiminny\Models\Feature\FeatureEnum;
use Jiminny\Models\Partner;
use Jiminny\Models\Team;
use Jiminny\Models\User;
class UserPilotClient
{
private const API_ENDPOINT = 'https://api.userpilot.io/v1/';
private const ANALYTICS_ENDPOINT = 'https://analytex.userpilot.io/v1/';
private function createRequest(): PendingRequest
{
return Http::withHeaders([
'X-API-Version' => '2020-09-22',
'Authorization' => 'Token ' . config('services.userpilot.key'),
]);
}
public function track(User $user, string $event, array $payload = []): void
{
if ($this->shouldRequest($user->getTeam()) === false) {
return;
}
$this->createRequest()->post(self::ANALYTICS_ENDPOINT . 'track', [
'event_name' => $event,
'user_id' => $user->getUuid(),
'metadata' => $payload,
]);
}
public function upsertUser(User $user): void
{
if ($this->shouldRequest($user->getTeam()) === false) {
return;
}
$companyMetadata = $this->getCompanyMetadata($user->getTeam());
$companyMetadata['id'] = $user->getTeam()->getUuid();
$this->createRequest()->post(self::ANALYTICS_ENDPOINT . 'identify', [
'user_id' => $user->getUuid(),
'metadata' => [
'name' => $user->name,
'first_name' => $user->getFirstName(),
'position' => $user->job ? $user->job->name : null,
'email' => $user->getEmailAddress(),
'created_at' => $user->getCreatedAt()->unix(),
'is_admin' => $user->hasRole(User::ROLE_ADMIN),
'is_manager' => $user->hasRole(User::ROLE_MANAGER),
'is_owner' => $user->isTeamOwner(),
'is_insights' => $user->hasRole(User::ROLE_ANALYST),
'is_recorder' => $user->hasRole(User::ROLE_RECORDER),
'is_jiminny_voice' => $user->hasRole(User::ROLE_RECORDER_AND_VOICE),
'is_listener' => $user->hasRole(User::ROLE_LISTENER),
'license' => null,
'team' => $user->group ? $user->group->name : null,
'language' => $user->getLanguage(),
'email_sync' => $user->isSyncEmailEnabled(),
],
'company' => $companyMetadata,
]);
}
public function upsertCompany(Team $team): void
{
$this->createRequest()->post(self::ANALYTICS_ENDPOINT . 'companies/identify', [
'company_id' => $team->getUuid(),
'metadata' => $this->getCompanyMetadata($team),
]);
}
private function getCompanyMetadata(Team $team): array
{
return [
'created_at' => $team->getCreatedAt()->unix(),
'name' => $team->getName(),
'region' => config('jiminny.deploy_region'),
'crm' => $team->getCrmConfiguration()->getProviderName(),
'crm_installed_app_version' => $team->getCrmConfiguration()->getInstalledAppVersion(),
'calendar' => $team->getCalendarProvider(),
'notification_provider' => $team->getNotificationProvider(),
'has_jiminny_voice' => $team->hasFeature(FeatureEnum::DIALER),
'tier' => $team->getTier()?->getTitle(),
];
}
public function deleteUser(User $user): void
{
if ($this->shouldRequest($user->getTeam()) === false) {
return;
}
$this->createRequest()->delete(self::API_ENDPOINT . 'users', [
'users' => [$user->getUuid()],
]);
}
public function deleteCompany(Team $team): void
{
if ($this->shouldRequest($team) === false) {
return;
}
$this->createRequest()->delete(self::API_ENDPOINT . 'companies', [
'companies' => [$team->getUuid()],
]);
}
public function shouldRequest(Team $team): bool
{
return config('services.userpilot.key') !== null && $team->getPartnerId() === Partner::PARTNER_DEFAULT;
}
}
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
NULL
|
|
70060
|
1633
|
1
|
2026-04-22T09:39:24.120020+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-22/1776 /Users/lukas/.screenpipe/data/data/2026-04-22/1776850764120_m2.jpg...
|
PhpStorm
|
faVsco.js – CrmEntityRepository.php
|
True
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Pushed 1 commit to origin/JY-20372-ai-reports-prom Pushed 1 commit to origin/JY-20372-ai-reports-promotion-pages
text/html
text/html
text/html
View pull request
2 files committed
JY-20372 add planhat endpoint
text/html
text/html
text/html
Edit Commit Message…
Project: faVsco.js, menu
#11998 on JY-20372-ai-reports-promotion-pages, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Show Replace Field
Search History
map
New Line
Match Case
Words
Regex
Replace History
Replace
New Line
Preserve case
3/3
Previous Occurrence
Next Occurrence
Filter Search Results
Open in Window, Multiple Cursors
Click to highlight
Close
Code changed:
Hide
Sync Changes
Hide This Notification
6
29
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Repositories\Crm;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use Jiminny\Models\Account;
use Jiminny\Models\Contact;
use Jiminny\Models\Crm\BusinessProcess;
use Jiminny\Models\Crm\Configuration;
use Jiminny\Models\Crm\Profile;
use Jiminny\Models\Crm\RecordType;
use Jiminny\Models\Lead;
use Jiminny\Models\Opportunity;
use Jiminny\Models\Stage;
class CrmEntityRepository
{
public function getExternalContactMap(Configuration $configuration): array
{
$configurationId = $configuration->getId();
$contacts = [];
$m1 = memory_get_usage();
Log::info(
'ExternalContactMap before',
[
'current' => $m1,
'peak' => memory_get_peak_usage(),
'config_id' => $configurationId,
]
);
$results = DB::select(
'select id, crm_provider_id from contacts where crm_configuration_id = :id and deleted_at is null',
['id' => $configurationId]
);
$m2 = memory_get_usage();
Log::info(
'ExternalContactMap after',
[
'used' => $m2 - $m1,
'current' => $m2,
'peak' => memory_get_peak_usage(),
'config_id' => $configurationId,
]
);
foreach ($results as $contact) {
$contacts[$contact->crm_provider_id] = $contact->id;
}
$m3 = memory_get_usage();
Log::info(
'ExternalContactMap final',
[
'used' => max($m2, $m3) - $m1,
'current' => $m3,
'peak' => memory_get_peak_usage(),
'config_id' => $configurationId,
]
);
return $contacts;
}
public function getExternalAccountMap(Configuration $configuration): array
{
$accounts = [];
$m1 = memory_get_usage();
$configurationId = $configuration->getId();
Log::info(
'ExternalAccountMap before',
[
'current' => $m1,
'peak' => memory_get_peak_usage(),
'config_id' => $configurationId,
]
);
// direct array result uses the least memory
$items = DB::select(
'select id, crm_provider_id from accounts where crm_configuration_id = :id and deleted_at is null',
['id' => $configurationId]
);
$m2 = memory_get_usage();
Log::info(
'ExternalAccountMap after',
[
'used' => $m2 - $m1,
'current' => $m2,
'peak' => memory_get_peak_usage(),
'config_id' => $configurationId,
]
);
foreach ($items as $item) {
$accounts[$item->crm_provider_id] = $item->id;
}
$m3 = memory_get_usage();
Log::info(
'ExternalAccountMap final',
[
'used' => max($m2, $m3) - $m1,
'current' => $m3,
'peak' => memory_get_peak_usage(),
'config_id' => $configurationId,
]
);
return $accounts;
}
// currently used only in tests, but keep in mind the memory usage could be high with mapWithKeys
public function getInternalAccountToContactMap(Configuration $configuration): array
{
$m1 = memory_get_usage();
$configurationId = $configuration->getId();
Log::info(
'InternalAccountToContactMap before',
[
'current' => $m1,
'config_id' => $configurationId,
]
);
$data = $configuration->accounts()
->whereHas('contacts')
->with('contacts')
->where('is_internal', 1)
->get()
->mapWithKeys(static function (Account $account) {
// Internal accounts must have only 1 contact
return [
$account->getCrmProviderId() => $account->contacts->first()->getCrmProviderId(),
];
})
->toArray();
$m2 = memory_get_usage();
Log::info(
'InternalAccountToContactMap after',
[
'used' => $m2 - $m1,
'current' => $m2,
'peak' => memory_get_peak_usage(),
'config_id' => $configurationId,
]
);
return $data;
}
public function getExternalStageMap(Configuration $configuration, ?string $type = null): array
{
return $configuration->stages()
->when($type, static fn ($query) => $query->where('type', $type))
->get()
->mapWithKeys(static function (Stage $stage) {
return [
$stage->getAttribute('name') => $stage->getAttribute('id'),
$stage->getAttribute('crm_provider_id') => $stage->getAttribute('id'),
];
})
->toArray();
}
public function getStageForName(Configuration $configuration, string $name, ?string $type = null): ?Stage
{
return $configuration->stages()
->when($type, static fn ($query) => $query->where('type', $type))
->where('name', $name)
->first();
}
public function getPipelineStageByConditions(BusinessProcess $businessProcess, array $conditions): ?Stage
{
return $businessProcess->stages()
->where($conditions)
->first();
}
public function getBusinessProcessRecordType(BusinessProcess $businessProcess): ?RecordType
{
return $businessProcess->recordTypes()->first();
}
public function getOpportunityClosedStages(Configuration $configuration): Collection
{
return $configuration->stages()
->where('type', Stage::TYPE_OPPORTUNITY)
->whereIn('probability', [0.00, 100.00])
->get();
}
public function importAccount(Configuration $configuration, array $accountData): Account
{
$account = $configuration->accounts()
->withTrashed()
->updateOrCreate(
[
'crm_configuration_id' => $configuration->getId(),
'team_id' => $configuration->getTeamId(),
'crm_provider_id' => $accountData['crm_provider_id'],
],
$accountData
);
if ($account->trashed()) {
Log::info('Restore deleted account', [
'id' => $account->getId(),
'crm_provider_id' => $account->getCrmProviderId(),
]);
$account->restore();
}
return $account;
}
public function importContact(Configuration $configuration, array $contactData): Contact
{
$contact = $configuration->contacts()
->withTrashed()
->updateOrCreate(
[
'crm_configuration_id' => $configuration->getId(),
'team_id' => $configuration->getTeamId(),
'crm_provider_id' => $contactData['crm_provider_id'],
],
$contactData
);
if ($contact->trashed()) {
Log::info('Restore deleted contact', [
'id' => $contact->getId(),
'crm_provider_id' => $contact->getCrmProviderId(),
]);
$contact->restore();
}
return $contact;
}
public function importLead(Configuration $configuration, array $leadData): Lead
{
$lead = $configuration->leads()
->withTrashed()
->updateOrCreate(
[
'crm_configuration_id' => $configuration->getId(),
'team_id' => $configuration->getTeamId(),
'crm_provider_id' => $leadData['crm_provider_id'],
],
$leadData
);
if ($lead->trashed()) {
Log::info('Restore deleted lead', [
'id' => $lead->getId(),
'crm_provider_id' => $lead->getCrmProviderId(),
]);
$lead->restore();
}
return $lead;
}
public function importOpportunity(
Configuration $configuration,
array $opportunityData,
bool $matchFromOtherCrm = false,
?string $matchName = null,
): Opportunity {
if ($matchFromOtherCrm) {
// Try find and match opportunity from other CRM configuration
// Update and attach it to the new CRM
// This case will work if a team is transitioning from one CRM provider to another, and we want to
// cross-reference deals.
$opportunityData['crm_configuration_id'] = $configuration->getId();
$opportunity = $configuration->getTeam()->opportunities()
->withTrashed()
->updateOrCreate(
[
'team_id' => $configuration->getTeamId(),
'user_id' => $opportunityData['user_id'],
'name' => $matchName,
],
$opportunityData
);
if ($opportunity->trashed()) {
$opportunity->restore();
}
return $opportunity;
}
$opportunity = $configuration->opportunities()
->withTrashed()
->updateOrCreate(
[
'crm_configuration_id' => $configuration->getId(),
'team_id' => $configuration->getTeamId(),
'crm_provider_id' => $opportunityData['crm_provider_id'],
],
$opportunityData
);
if ($opportunity->trashed()) {
Log::info('Restore deleted opportunity', [
'id' => $opportunity->getId(),
'crm_provider_id' => $opportunity->getCrmProviderId(),
]);
$opportunity->restore();
}
return $opportunity;
}
public function upsertOpportunity(array $attributes, array $data): Opportunity
{
/** @var ?Opportunity $opportunity */
$opportunity = Opportunity::withTrashed()->where($attributes)->first();
if ($opportunity === null) {
$opportunity = Opportunity::create($data);
} else {
$opportunity->update($data);
}
return $opportunity;
}
public function importStage(Configuration $configuration, string $objectType, array $stageData): Stage
{
return $configuration->stages()
->updateOrCreate(
[
'crm_configuration_id' => $configuration->getId(),
'team_id' => $configuration->getTeamId(),
'crm_provider_id' => $stageData['crm_provider_id'],
'type' => $objectType,
],
$stageData
);
}
public function importBusinessProcess(Configuration $configuration, array $pipelineData): BusinessProcess
{
return $configuration->businessProcesses()
->updateOrCreate(
[
'crm_configuration_id' => $configuration->getId(),
'team_id' => $configuration->getTeamId(),
'crm_provider_id' => $pipelineData['crm_provider_id'],
'type' => $pipelineData['object_type'],
],
$pipelineData
);
}
public function findAccountByExternalId(Configuration $configuration, string $crmProviderId): ?Account
{
return $configuration->accounts()
->where('crm_provider_id', $crmProviderId)
->first();
}
/**
* Find multiple accounts by their external CRM IDs
*
* @param Configuration $configuration
* @param array<string> $crmProviderIds
*
* @return Collection<Account>
*/
public function findAccountsByExternalIds(Configuration $configuration, array $crmProviderIds): Collection
{
if (empty($crmProviderIds)) {
return collect();
}
return $configuration->accounts()
->whereIn('crm_provider_id', $crmProviderIds)
->get();
}
public function findContactByExternalId(Configuration $configuration, string $crmProviderId): ?Contact
{
return $configuration->contacts()
->where('crm_provider_id', $crmProviderId)
->first();
}
/**
* Find multiple contacts by their external CRM IDs
*
* @param Configuration $configuration
* @param array<string> $crmProviderIds
*
* @return Collection<Contact>
*/
public function findContactsByExternalIds(Configuration $configuration, array $crmProviderIds): Collection
{
if (empty($crmProviderIds)) {
return collect();
}
return $configuration->contacts()
->whereIn('crm_provider_id', $crmProviderIds)
->get();
}
public function findLeadByExternalId(Configuration $configuration, string $crmProviderId): ?Lead
{
return $configuration->leads()
->where('crm_provider_id', $crmProviderId)
->first();
}
public function findOpportunityByExternalId(Configuration $configuration, string $crmProviderId): ?Opportunity
{
return $configuration->opportunities()
->where('crm_provider_id', $crmProviderId)
->first();
}
/**
* Find multiple opportunities by their external CRM IDs
*
* @param Configuration $configuration
* @param array<string> $crmProviderIds
*
* @return Collection<Opportunity>
*/
public function findOpportunitiesByExternalIds(Configuration $configuration, array $crmProviderIds): Collection
{
if (empty($crmProviderIds)) {
return collect();
}
return $configuration->opportunities()
->whereIn('crm_provider_id', $crmProviderIds)
->get();
}
/**
* @param array<string> $crmProviderIds
*
* @return array<string>
*/
public function getExistingLeadCrmIds(Configuration $configuration, array $crmProviderIds): array
{
if (empty($crmProviderIds)) {
return [];
}
return $configuration->leads()
->whereIn('crm_provider_id', $crmProviderIds)
->pluck('crm_provider_id')
->toArray();
}
/**
* @param array<string> $crmProviderIds
*
* @return array<string>
*/
public function getExistingAccountCrmIds(Configuration $configuration, array $crmProviderIds): array
{
if (empty($crmProviderIds)) {
return [];
}
return $configuration->accounts()
->whereIn('crm_provider_id', $crmProviderIds)
->pluck('crm_provider_id')
->toArray();
}
/**
* @param array<string> $crmProviderIds
*
* @return array<string>
*/
public function getExistingContactCrmIds(Configuration $configuration, array $crmProviderIds): array
{
if (empty($crmProviderIds)) {
return [];
}
return $configuration->contacts()
->whereIn('crm_provider_id', $crmProviderIds)
->pluck('crm_provider_id')
->toArray();
}
/**
* @param array<string> $crmProviderIds
*
* @return array<string>
*/
public function getExistingOpportunityCrmIds(Configuration $configuration, array $crmProviderIds): array
{
if (empty($crmProviderIds)) {
return [];
}
return $configuration->opportunities()
->whereIn('crm_provider_id', $crmProviderIds)
->pluck('crm_provider_id')
->toArray();
}
public function findProfileByExternalId(Configuration $configuration, string $crmProviderId): ?Profile
{
return $configuration->profiles()
->where('crm_provider_id', $crmProviderId)
->first();
}
public function findBusinessProcessesByExternalId(
Configuration $configuration,
string $crmProviderId
): ?BusinessProcess {
return $configuration->businessProcesses()
->where('crm_provider_id', $crmProviderId)
->first();
}
/**
* @return Collection<Account>
*/
public function findAccountsByExternalOwnerId(Configuration $configuration, string $crmOwnerId): Collection
{
return $configuration->accounts()
->where('owner_id', $crmOwnerId)
->whereNull('user_id')
->get();
}
/**
* @return Collection<Contact>
*/
public function findContactsByExternalOwnerId(Configuration $configuration, string $crmOwnerId): Collection
{
return $configuration->contacts()
->where('owner_id', $crmOwnerId)
->whereNull('user_id')
->get();
}
/**
* @return Collection<Lead>
*/
public function findLeadsByExternalOwnerId(Configuration $configuration, string $crmOwnerId): Collection
{
return $configuration->leads()
->where('owner_id', $crmOwnerId)
->whereNull('user_id')
->get();
}
/**
* @return Collection<Opportunity>
*/
public function findOpportunitiesByExternalOwnerId(Configuration $configuration, string $crmOwnerId): Collection
{
return $configuration->opportunities()
->where('owner_id', $crmOwnerId)
->whereNull('user_id')
->get();
}
public function searchLeadsByString(
Configuration $configuration,
string $query,
?int $limit = null,
?int $offset = null,
bool $orderByName = false,
bool $usePhoneSearch = false
): Collection {
$queryBuilder = $configuration->leads()
->with('stages')
->where('converted_at', null)
->whereNested(function ($qb) use ($query, $usePhoneSearch) {
$qb->where('crm_provider_id', $query);
if ($usePhoneSearch) {
$qb->orWhere('phone', 'LIKE', "%{$query}%")
->orWhere('mobile_phone', 'LIKE', "%{$query}%");
} else {
$qb->orWhere('name', 'LIKE', "%{$query}%")
->orWhere('company', 'LIKE', "%{$query}%");
}
});
if ($orderByName) {
$queryBuilder->orderBy('name');
}
if ($limit !== null) {
$queryBuilder->limit($limit);
}
if ($offset !== null) {
$queryBuilder->offset($offset);
}
return $queryBuilder->get();
}
public function searchAccountsByString(
Configuration $configuration,
string $query,
?int $limit = null,
?int $offset = null,
bool $orderByName = false,
bool $usePhoneSearch = false
): Collection {
$queryBuilder = $configuration->accounts()
->where('is_internal', 0)
->where(function ($qb) use ($query, $usePhoneSearch) {
$qb->where('crm_provider_id', $query);
if ($usePhoneSearch) {
$qb->orWhere('phone', 'LIKE', "%{$query}%");
} else {
$qb->orWhere('name', 'LIKE', "%{$query}%");
}
});
if ($orderByName) {
$queryBuilder->orderBy('name');
}
if ($limit !== null) {
$queryBuilder->limit($limit);
}
if ($offset !== null) {
$queryBuilder->offset($offset);
}
return $queryBuilder->get();
}
public function searchContactsByString(
Configuration $configuration,
string $query,
?int $limit = null,
?int $offset = null,
bool $orderByName = false,
bool $usePhoneSearch = false
): Collection {
$queryBuilder = $configuration->contacts()
->with('account')
->where(function ($qb) use ($query, $usePhoneSearch) {
$qb->where('crm_provider_id', $query);
if ($usePhoneSearch) {
$qb->orWhere('phone', 'LIKE', "%{$query}%")
->orWhere('mobile_phone', 'LIKE', "%{$query}%");
} else {
$qb->orWhere('name', 'LIKE', "%{$query}%")
->orWhere('email', 'LIKE', "%{$query}%")
->orWhere('phone', 'LIKE', "%{$query}%")
->orWhere('mobile_phone', 'LIKE', "%{$query}%");
}
});
if ($orderByName) {
$queryBuilder->orderBy('name');
}
if ($limit !== null) {
$queryBuilder->limit($limit);
}
if ($offset !== null) {
$queryBuilder->offset($offset);
}
return $queryBuilder->get();
}
/**
* Find a contact by id only if it belongs to the team
*/
public function findContactByConfigurationAndId(Configuration $configuration, int $contactId): ?Contact
{
return $configuration->contacts()
->where('id', $contactId)
->first();
}
/**
* Find a lead by id only if it belongs to the team
*/
public function findLeadByConfigurationAndId(Configuration $configuration, int $leadId): ?Lead
{
return $configuration->leads()
->where('id', $leadId)
->first();
}
/**
* Find an account by id only if it belongs to the team
*/
public function findAccountByConfigurationAndId(Configuration $configuration, int $accountId): ?Account
{
return $configuration->accounts()
->where('id', $accountId)
->first();
}
/**
* Find an opportunity by id only if it belongs to the team
*/
public function findOpportunityByConfigurationAndId(Configuration $configuration, int $opportunityId): ?Opportunity
{
return $configuration->opportunities()
->where('id', $opportunityId)
->first();
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
35
1
33
63
Previous Highlighted Error
Next Highlighted Error
SELECT * FROM teams WHERE name LIKE '%litify%'; # 1069, 994, 24993
SELECT * FROM users WHERE id = 25061;
SELECT * FROM crm_profiles WHERE crm_configuration_id = 994;
SELECT * FROM crm_profiles WHERE user_id = 25061;
select * from crm_configurations where id = 834;
SELECT * FROM teams WHERE id = 882;
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 882 and sa.provider = 'hubspot';
SELECT * FROM crm_configurations where id = 882; # 933 - GoGlobal
SELECT * FROM opportunities WHERE team_id = 933 order by updated_at desc;
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 933 and sa.provider = 'hubspot';
SELECT * FROM crm_configurations WHERE provider = 'hubspot' and crm_provider_id = 7270388;
SELECT * FROM contacts where crm_configuration_id = 834;
SELECT * FROM opportunities WHERE team_id = 933
# AND crm_provider_id IN ('20131586060','46017317898','52543911090','53451356564','54101251892','54323768459');
AND id IN (8482561,18352941,19042734,19232139,19445140,19472541);
SELECT * FROM opportunity_contacts
WHERE opportunity_id IN (8482561,18352941,19042734,19232139,19445140,19472541);
# [PASSWORD_DOTS]
SELECT * FROM crm_configurations where id = 485; #
SELECT * FROM opportunities WHERE team_id = 933 order by updated_at desc;
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 933 and sa.provider = 'hubspot';
select crm.provider, l.* from leads l join crm_configurations crm on l.crm_configuration_id = crm.id
where crm.provider NOT IN ('salesforce', 'integration-app', 'bullhorn', 'copper')
# and l.converted_at IS NOT NULL
;
# [PASSWORD_DOTS]
SELECT * FROM activities a WHERE type IN ('email-inbound', 'email-outbound')
and opportunity_id IS NULL
order by id desc;
SELECT * FROM teams WHERE id = 604; # 598
SELECT * FROM activities WHERE id = 74410828; # [EMAIL]
SELECT * FROM accounts WHERE id = 20068382;
SELECT * FROM accounts WHERE id = 35186038;
SELECT * FROM contacts WHERE team_id = 852 and updated_at > '2026-01-23 12:30:00' order by updated_at desc;
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 559 and sa.provider = 'hubspot';
SELECT * FROM activities WHERE uuid_to_bin('cb6342b6-a183-401c-b0af-ede92b2ae763') = uuid;
select * from sidekick_settings where team_id = 781;
SELECT * FROM crm_configurations where provider = 'hubspot' and crm_provider_id = 26651871; # Teya
SELECT * FROM crm_configurations where provider = 'hubspot' and crm_provider_id = 7562435;
SELECT * FROM crm_configurations where provider = 'hubspot' and crm_provider_id = 8420347; # opflit 2100
SELECT * FROM crm_layouts WHERE crm_configuration_id = 711;
SELECT * FROM activities where crm_configuration_id = 711 and crm_provider_id IS NULL
and is_internal = 0 and status = 'completed'
order by id desc;
SELECT * FROM crm_layout_entities
WHERE crm_layout_id IN (2352, 2353);
;
SELECT * FROM crm_configurations where provider = 'hubspot' and id = 530;
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 556 and sa.provider = 'hubspot';
SELECT * FROM activities WHERE uuid_to_bin('c6ca4b22-7738-4563-a95d-b8a9598924ae') = uuid;
SELECT * FROM activities WHERE uuid_to_bin('442abb2b-28bd-4be8-9c25-19e9bf02766d') = uuid;
select * from contacts
where crm_configuration_id = 530
and crm_provider_id = 872252;
select * from activities where crm_configuration_id = 530
and user_id = 14343 and type like '%softphone%'
and created_at between '2026-01-28 15:00:00' and '2026-01-28 15:10:00';
SELECT * FROM crm_configurations where provider = 'hubspot' and crm_provider_id = 25666868; # Teya
SELECT * FROM crm_configurations where provider = 'hubspot' and crm_provider_id = 8646335; # Teya
SELECT * FROM crm_configurations where provider = 'hubspot' and crm_provider_id IN (5933397);
SELECT t.name, t.id, t.owner_id, c.id, c.provider, c.crm_base_url FROM teams t
JOIN crm_configurations c ON t.id = c.team_id
WHERE t.status = 'active';
SELECT * FROM teams where id = 1091;
SELECT * FROM crm_configurations where team_id = 1091;
SELECT * FROM activity_providers where team_id = 1091;
SELECT * FROM activities where crm_configuration_id = 1024 and type IN ('softphone', 'softphone-outbound')
and provider NOT IN ('hubspot', 'aircall')
# and telephony_provider_id = '019c1131-a22f-4792-b9ea-20adf6a02ed0'
order by id desc;
SELECT * FROM teams WHERE name LIKE '%Leadventure%';
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 1091 and sa.provider = 'salesforce';
SELECT * FROM teams WHERE name LIKE '%Wilson%'; # 862, 812
SELECT * FROM teams where id = 862;
SELECT * FROM crm_configurations where team_id = 862;
SELECT * FROM activity_providers where team_id = 862;
SELECT * FROM activities where crm_configuration_id = 812 and type IN ('softphone', 'softphone-outbound')
and provider NOT IN ('hubspot', 'aircall')
# and telephony_provider_id = '019c1131-a22f-4792-b9ea-20adf6a02ed0'
order by id desc;
SELECT t.id, crm.id, crm.provider, ap.* FROM teams t
join crm_configurations crm on t.id = crm.team_id
join activity_providers ap on t.id = ap.team_id
where t.status = 'active' and ap.is_enabled = 1
and crm.provider = 'hubspot'
and ap.provider NOT IN ('hubspot', 'aircall', 'uploader', 'gong', 'twilio', 'zoom-bot', 'google-meet', 'ms-teams',
'outreach', 'close', 'ringcentral', 'dialpad', 'zoom-phone');
SELECT * FROM teams where id = 1068;
SELECT * FROM crm_configurations where team_id = 1068;
SELECT * FROM activity_providers where team_id = 1068;
SELECT * FROM activities a
where crm_configuration_id = 993 and type IN ('softphone', 'softphone-outbound')
and a.provider NOT IN ('hubspot', 'uploader', 'gong', 'twilio', 'google-meet', 'ms-teams','close'
)
# and telephony_provider_id = '019c1131-a22f-4792-b9ea-20adf6a02ed0'
order by a.id desc;
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 1068 and sa.provider = 'hubspot';
# [PASSWORD_DOTS]
# [PASSWORD_DOTS]
# [PASSWORD_DOTS]
SELECT * FROM crm_configurations where id = 882; # 933 - GoGlobal , portalId: 6017093
SELECT * FROM opportunities WHERE team_id = 933 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;
SELECT * FROM opportunities WHERE team_id = 933 and updated_at > '2026-02-06 00:00:00' order by updated_at desc;
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 933 and sa.provider = 'hubspot';
# [PASSWORD_DOTS]
SELECT * FROM crm_configurations where id = 834; # 882 - AnyVan , portalId: 5468262
SELECT * FROM contacts WHERE crm_configuration_id = 834 and updated_at > '2026-03-30 00:00:00' order by updated_at desc;
SELECT * FROM opportunities WHERE crm_configuration_id = 834 and updated_at > '2026-03-04 08:00:00' order by updated_at desc;
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 882 and sa.provider = 'hubspot';
select * from crm_layouts where crm_configuration_id = 834;
select * from crm_layout_entities where crm_layout_id = 2780;
select * from crm_fields where id IN (321153,321192,321193,321194);
SELECT * FROM opportunities WHERE crm_configuration_id = 834 and id = 10993426;
# [PASSWORD_DOTS]
SELECT * FROM crm_configurations where id = 988; # 1057 - Teya (543ce4f4-168c-4571-91ea-5b35c253f06f) , portalId: 26651871
SELECT * FROM opportunities WHERE team_id = 1057 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;
SELECT * FROM opportunities WHERE team_id = 1057 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 1057 and sa.provider = 'hubspot';
SELECT * FROM crm_configurations where id = 533; # 559 - Connectd , portalId: 6710988
SELECT * FROM opportunities WHERE team_id = 559 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;
SELECT * FROM opportunities WHERE team_id = 559 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;
SELECT * FROM crm_configurations where id = 801; # 852 - Rise Vision , portalId: 2700250
SELECT * FROM opportunities WHERE team_id = 852 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;
SELECT * FROM opportunities WHERE team_id = 852 and updated_at > '2026-02-04 00:00:00' order by updated_at desc; # 6th last
SELECT * FROM crm_configurations where id = 962; # 1034 - evergrowth.io , portalId: 143180990
SELECT * FROM opportunities WHERE team_id = 1034 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;
SELECT * FROM opportunities WHERE team_id = 1034 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;
# [PASSWORD_DOTS]
SELECT * FROM crm_configurations where id = 1037; # 1102 - Jibble , portalId: 6649755
SELECT * FROM opportunities WHERE team_id = 1102 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;
SELECT * FROM opportunities WHERE team_id = 1102 and updated_at > '2026-02-04 12:30:00' order by updated_at desc; # 8
SELECT * FROM crm_configurations where id = 1015; # 1049 - Travefy , portalId: 48904401
SELECT * FROM opportunities WHERE team_id = 1049 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;
SELECT * FROM opportunities WHERE team_id = 1049 and updated_at > '2026-02-04 12:30:00' order by updated_at desc; # 20
SELECT * FROM crm_configurations where id = 64; # 70 - SalaryFinance , portalId: 3404115
SELECT * FROM opportunities WHERE team_id = 70 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;
SELECT * FROM opportunities WHERE team_id = 70 and updated_at > '2026-02-04 12:30:00' order by updated_at desc; # 6th last
SELECT * FROM crm_configurations where id = 802; # 853 - Street Group , portalId: 7658438
SELECT * FROM opportunities WHERE team_id = 853 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;
SELECT * FROM opportunities WHERE team_id = 853 and updated_at > '2026-02-04 12:30:00' order by updated_at desc; # 10
SELECT * FROM crm_configurations where id = 872; # 921 - In Professional Development , portalId: 9238273
SELECT * FROM opportunities WHERE team_id = 921 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;
SELECT * FROM opportunities WHERE team_id = 921 and updated_at > '2026-02-04 12:30:00' order by updated_at desc; # 2
# [PASSWORD_DOTS]
SELECT * FROM crm_configurations where id = 550; # 576 - SeedLegals , portalId: 3028661
SELECT * FROM opportunities WHERE team_id = 576 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;
SELECT * FROM opportunities WHERE team_id = 576 and updated_at > '2026-02-05 14:00:00' order by updated_at desc;
SELECT * FROM crm_configurations where id = 989; # 1058 - rtaoutdoor.com , portalId: 22371204
SELECT * FROM opportunities WHERE team_id = 1058 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;
SELECT * FROM opportunities WHERE team_id = 1058 and updated_at > '2026-02-05 14:00:00' order by updated_at desc;
SELECT * FROM crm_configurations where id = 896; # 946 - Mintago , portalId: 6621281
SELECT * FROM opportunities WHERE team_id = 946 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;
SELECT * FROM opportunities WHERE team_id = 946 and updated_at > '2026-02-05 14:00:00' order by updated_at desc;
SELECT * FROM crm_configurations where id = 617; # 641 - PCS , portalId: 5244937
SELECT * FROM opportunities WHERE team_id = 641 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;
SELECT * FROM opportunities WHERE team_id = 641 and updated_at > '2026-02-05 14:00:00' order by updated_at desc; # 7th
# [PASSWORD_DOTS]
SELECT * FROM crm_configurations where id = 649; # 670 - Eventeny , portalId: 4492849
SELECT * FROM opportunities WHERE team_id = 670 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;
SELECT * FROM opportunities WHERE team_id = 670 and updated_at > '2026-02-09 08:00:00' order by updated_at desc; #
SELECT * FROM crm_configurations where id = 48; # 51 - CleanCloud , portalId: 4373137
SELECT * FROM opportunities WHERE team_id = 51 and updated_at > '2026-03-04 00:00:00' order by updated_at desc;
SELECT * FROM opportunities WHERE team_id = 51 and updated_at > '2026-02-09 08:00:00' order by updated_at desc;
select * from users where team_id = 51; # 7783
SELECT * FROM groups WHERE uuid_to_bin('8a8d2cb6-8b55-4fa3-8b5c-5f0e3d8de59a') = uuid; # 1130
select * from activity_searches where user_id = 7783;
select * from activity_search_filters where activity_search_id IN (32291, 32292);
SELECT asf.activity_search_id, asf.id, asf.value
FROM activity_search_filters asf
WHERE asf.filter = 'group_id'
AND asf.value IN (
SELECT CONCAT(
HEX(SUBSTR(uuid, 5, 4)), '-',
HEX(SUBSTR(uuid, 3, 2)), '-',
HEX(SUBSTR(uuid, 1, 2)), '-',
HEX(SUBSTR(uuid, 9, 2)), '-',
HEX(SUBSTR(uuid, 11))
)
FROM groups
WHERE deleted_at IS NOT NULL
);
SELECT * FROM crm_configurations where id = 272; # 290 - Bonham & Brook , portalId: 5705856
SELECT * FROM opportunities WHERE team_id = 290 and updated_at > '2026-02-05 00:00:00' order by updated_at desc;
SELECT * FROM opportunities WHERE team_id = 290 and updated_at > '2026-02-09 08:00:00' order by updated_at desc; # 6th
# [PASSWORD_DOTS]
SELECT * FROM crm_configurations where provider = 'hubspot';
SELECT * FROM crm_configurations where id = 1056; # 1119 - Chromatic , portalId: 45602133
SELECT * FROM opportunities WHERE team_id = 1119 and remotely_created_at > '2026-02-01 00:00:00' order by updated_at desc;
SELECT * FROM opportunities WHERE team_id = 1119 and updated_at > '2026-02-09 09:00:00' order by updated_at desc; # null
# [PASSWORD_DOTS]
select * from contacts where crm_provider_id = '003Uu00000ojD4NIAU';
select
cp.*
# DISTINCT t.id
# cp.id, cp.user_id, t.id, cp.crm_configuration_id, cp.contact_fields
FROM crm_profiles cp
JOIN crm_configurations crm on crm.id = cp.crm_configuration_id
JOIN users u on u.id = cp.user_id
JOIN teams t ON t.id = crm.team_id
WHERE crm.provider = 'salesforce' and t.status = 'active'
and cp.archived_at IS NULL and u.deleted_at IS NULL
and t.id NOT IN (1093)
and t.id = 2
and cp.contact_fields IS NULL;
# and c.crm_provider_id = '003Uu00000ojD4NIAU';
SELECT * FROM users WHERE id = 26484;
SELECT * FROM crm_profiles WHERE user_id = 26484;
SELECT * FROM social_accounts WHERE sociable_id = 26484;
SELECT * FROM crm_configurations where provider = 'salesforce';
select * from users where id IN (10022, 10403);
select * from users where team_id IN (526);
select * from teams where id IN (526, 532);
select * from crm_configurations where id IN (500, 516);
select * from crm_profiles where crm_configuration_id IN (500, 516) and user_id IN (10022, 10403);
select * from contacts where crm_configuration_id IN (500, 516) and crm_provider_id = '003Uu00000ojD4NIAU';
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 526 and sa.provider = 'salesforce';
select * from team_settings where team_id IN (526, 532);
select * from users where id IN (22824);
select * from crm_profiles where crm_configuration_id IN (1026);
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 1093 and sa.provider = 'salesforce';
select * from teams where id = 1099;
select * from users where id = 29643
select * from activity_processing_states;
SELECT * FROM teams where name LIKE '%Fare%'; # 233
SELECT * FROM opportunities where crm_configuration_id = 215
# and crm_provider_id = 'oppo_ogESZf2P50nDrd1nGPvKDXeA6sSaTN5v51Lp4ayVzKR'
;
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 1088 and sa.provider = 'hubspot';
SELECT * FROM teams order by updated_at DESC
SELECT * FROM crm_configurations WHERE id = 1019; # SimpleConsign 1088 - no social account
select * from crm_configurations where provider = 'pipedrive';
select * from teams where id = 957;
select * from crm_configurations where id = 957;
SELECT * FROM teams WHERE name LIKE '%Prolific%'; # 544, 518, 10743
SELECT * FROM opportunities where crm_configuration_id = 518 order by id desc;
select * from users where team_id = 1; # 26726 - Gabriela Dureva
SELECT * FROM opportunities where user_id = 26726; # 16834447 - Prolific
select * from activities where user_id = 26726 order by id desc;
select * from contacts where crm_configuration_id = 1
and email IN ('[EMAIL]', '[EMAIL]'); # 2094416, 2093620
SELECT * FROM contacts WHERE id = 6284931;
SELECT p.* FROM activities a JOIN participants p ON a.id = p.activity_id
WHERE a.user_id = 26726 and p.lead_id IN (2094416, 2093620) and a.created_at > '2026-01-01 00:00:00' order by p.email;
select * from activities where id IN (75509259,75509261,75509261,75511034,75026464,75517602,75517605);
select * from crm_configurations where id = 1;
43801692-1aeb-32ce-acba-5b80a479701a
44c3c9cf-6f5e-75f3-8179-bc9f75dd2b1b
405975c0-b3d0-7aaa-821f-09d59cae6dd1
4caf848d-4bed-2299-b248-7788d41f9fca
49bedc3f-f196-eef3-89c3-dea6a3b4aa63
43420989-a09d-b8f8-9806-c8bbf7a02aac
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 1 and sa.provider = 'salesforce';
SELECT * FROM activities WHERE id = 75461988;
SELECT * FROM activities WHERE uuid_to_bin('d6c5052e-e972-49e9-8912-26f2f7d6c5f6') = uuid;
select * from contacts where id = 17900517;
select * from contact_roles cr join crm_configurations crm on cr.crm_configuration_id = crm.id
where crm.provider != 'salesforce';
select * from users where id = 21047;
SELECT * FROM crm_configurations WHERE id = 892;
SELECT * FROM teams WHERE id = 942;
select * from opportunities where team_id = 942 order by updated_at desc;
select * from contacts where team_id = 942 order by updated_at desc;
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 942 and sa.provider = 'hubspot';
SELECT * FROM opportunities where team_id = 1 and crm_provider_id IN ('006Pq00000NeH6XIAV', '006Pq000007z8kdIAA'); # 10697889, 6621430
SELECT * FROM crm_configurations WHERE id = 1;
SELECT * FROM teams WHERE crm_id = 1;
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 1 and sa.provider = 'salesforce';
select id, user_id, opportunity_fields from crm_profiles where crm_configuration_id = 1
SELECT * FROM opportunities where team_id = 1 order by updated_at desc; # 10697889, 6621430
select * from teams where id = 852;
select * from groups where id = 2286;
select * from sidekick_settings where team_id = 852;
select * from default_activity_types where team_id = 852;
SELECT cc.provider, cc.id, p.id, u.*
FROM users u
LEFT JOIN crm_profiles p ON u.id = p.user_id AND p.id IS NULL -- no profile
INNER JOIN teams t ON u.team_id = t.id AND t.status = 'active' -- team is active
INNER JOIN crm_configurations cc ON t.crm_id = cc.id
WHERE u.status = 1 AND u.deleted_at IS NULL
AND u.crm_required = 1
AND u.team_id = 1
ORDER BY u.team_id;
SELECT * FROM crm_profiles cp where cp.crm_configuration_id = 1 and cp.user_id IN (
18481
);
SELECT cc.provider, cc.id, p.id, u.*
FROM users u
LEFT JOIN crm_profiles p ON u.id = p.user_id
INNER JOIN teams t ON u.team_id = t.id AND t.status = 'active'
INNER JOIN crm_configurations cc ON t.crm_id = cc.id
WHERE u.status = 1
AND u.deleted_at IS NULL
AND u.crm_required = 1
# AND u.team_id = 1
AND p.id IS NULL -- Move this condition to WHERE clause
ORDER BY u.team_id;
SELECT * FROM opportunities WHERE id = 20002609;
select * from teams where id = 1122; # Velatir, 29953 - [EMAIL]
select * from crm_configurations where id = 1060;
select * from crm_layouts where crm_configuration_id = 1060;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 3596;
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 1122 and sa.provider = 'hubspot';
select * from opportunities where team_id = 1122 order by updated_at desc;
select * from crm_field_data where object_type = 'contact';
SELECT * FROM activities WHERE uuid_to_bin('374fc8ed-3315-4c9f-9b25-318b7fd2928f') = uuid; # 76584262
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 248 and sa.provider = 'salesforce';
SELECT * FROM crm_profiles where user_id = 24115; # 005QF000002CswMYAS
SELECT * FROM users where id = 24115;
SELECT * FROM accounts where id = 4002896;
SELECT * FROM teams WHERE name LIKE '%adswerve%';
SELECT * FROM opportunities where crm_configuration_id = 230 AND crm_provider_id IN ("0069N000003GIQ9QAO","0061r000019yGP9AAM","0066900001S2KWlAAN","0066900001TDpj2AAD","0066900001b8uEwAAI","0069N000001rQi0QAE","006QF00000KD40mYAD","006QF00000LzpRJYAZ","0069N000002uomtQAA","0069N000002xlMLQAY","0066900001NV6ubAAD","0061r00001HJp45AAD","006QF00000uTlUoYAK","006QF00000v0bZqYAI");
SELECT * FROM opportunities WHERE crm_configuration_id = 230 AND crm_provider_id = '0069N000003GIQ9QAO'; # 6272203
SELECT u.id, u.email, ac.name, a.* FROM activities a
JOIN users u ON a.user_id = u.id
JOIN accounts ac ON a.account_id = ac.id
WHERE
uuid_to_bin('e3269598-b562-44fb-b5e9-9d2694dc63e0') = a.uuid or
uuid_to_bin('66ddc3ab-4e15-45aa-af0c-248c1eece593') = a.uuid or
uuid_to_bin('826bd328-e1cc-4213-b8d8-572454cacc07') = a.uuid;
select * from users where id = 5825;
SELECT * FROM activities WHERE uuid_to_bin('e56aa2e8-231a-421b-ab1f-cb38ed2bf573') = uuid;
select * from activities where uuid_to_bin('91e13b2f-2d1b-45f8-b1fd-1141b6563782') = uuid;
19594, 862
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 862 and sa.provider = 'salesforce';
select * from automated_reports where id = 36;
select ar.frequency, r.*, ar.* from automated_report_results r
join automated_reports ar on r.report_id = ar.id
where ar.frequency != 'one_off';
select s.* from activity_searches s join users u ON s.user_id = u.id where u.team_id = 882;
select * from nudges n where n.activity_search_id
select * from teams where created_at > '2026-03-09';
SELECT * FROM crm_layouts WHERE crm_configuration_id = 1065; # 1065
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 3617;
select * from users where team_id = 1 and name like '%Lukas%'; # 7160
SELECT * FROM teams WHERE id = 575;
select * from opportunities where team_id = 575;
SELECT * FROM teams WHERE name LIKE '%Integrum ESG%'; # 1126, 1065,
select * from opportunities where team_id = 1126;
SELECT * FROM teams WHERE name LIKE '%Base%'; # 1125, 1063,
select * from opportunities where team_id = 1125;
select * from contacts c
where c.team_id = 882;
SELECT * FROM activities WHERE id = 76822967;
SELECT * FROM crm_profiles WHERE user_id = 15440;
SELECT * FROM crm_profil...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Pushed 1 commit to origin/JY-20372-ai-reports-promotion-pages","depth":3,"bounds":{"left":0.8753325,"top":0.8387869,"width":0.11037234,"height":0.027134877},"value":"Pushed 1 commit to origin/JY-20372-ai-reports-promotion-pages","help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"bounds":{"left":0.8753325,"top":0.8387869,"width":0.09607713,"height":0.027134877},"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"View pull request","depth":2,"bounds":{"left":0.8753325,"top":0.87150836,"width":0.03523936,"height":0.013567438},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2 files committed","depth":2,"bounds":{"left":0.8753325,"top":0.91300875,"width":0.100398935,"height":0.013567438},"role_description":"text"},{"role":"AXTextField","text":"JY-20372 add planhat endpoint","depth":3,"bounds":{"left":0.8753325,"top":0.92897046,"width":0.11037234,"height":0.013567438},"value":"JY-20372 add planhat endpoint","help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"bounds":{"left":0.8753325,"top":0.92897046,"width":0.065159574,"height":0.013567438},"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"Edit Commit Message…","depth":2,"bounds":{"left":0.8753325,"top":0.9481245,"width":0.048204787,"height":0.013567438},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.25797874,"top":0.019952115,"width":0.03856383,"height":0.025538707},"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11998 on JY-20372-ai-reports-promotion-pages, menu","depth":5,"bounds":{"left":0.29654256,"top":0.019952115,"width":0.12167553,"height":0.025538707},"help_text":"Pull request #11998 exists for current branch JY-20372-ai-reports-promotion-pages","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},"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},"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},"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},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9381649,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96609044,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9773936,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9886968,"top":0.019952115,"width":0.011303186,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Show Replace Field","depth":4,"bounds":{"left":0.35305852,"top":0.25379092,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Search History","depth":3,"bounds":{"left":0.36569148,"top":0.2529928,"width":0.00731383,"height":0.017557861},"role_description":"checkbox","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"map","depth":4,"bounds":{"left":0.37666222,"top":0.2529928,"width":0.043882977,"height":0.015961692},"value":"map","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"New Line","depth":3,"bounds":{"left":0.42952126,"top":0.2529928,"width":0.00731383,"height":0.017557861},"role_description":"checkbox","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Match Case","depth":3,"bounds":{"left":0.43949467,"top":0.2529928,"width":0.00731383,"height":0.017557861},"role_description":"checkbox","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Words","depth":3,"bounds":{"left":0.4481383,"top":0.2529928,"width":0.00731383,"height":0.017557861},"role_description":"checkbox","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Regex","depth":3,"bounds":{"left":0.45678192,"top":0.2529928,"width":0.00731383,"height":0.017557861},"role_description":"checkbox","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Replace History","depth":3,"bounds":{"left":0.27027926,"top":1.0,"width":0.00731383,"height":0.0},"role_description":"checkbox","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"Replace","depth":4,"role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"New Line","depth":3,"bounds":{"left":0.27027926,"top":1.0,"width":0.00731383,"height":0.0},"role_description":"checkbox","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Preserve case","depth":3,"bounds":{"left":0.27027926,"top":1.0,"width":0.00731383,"height":0.0},"role_description":"checkbox","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"3/3","depth":4,"bounds":{"left":0.47041222,"top":0.25219473,"width":0.025598405,"height":0.017557861},"role_description":"text"},{"role":"AXButton","text":"Previous Occurrence","depth":4,"bounds":{"left":0.49601063,"top":0.25139666,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Occurrence","depth":4,"bounds":{"left":0.5046542,"top":0.25139666,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Filter Search Results","depth":4,"bounds":{"left":0.51329786,"top":0.25139666,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open in Window, Multiple Cursors","depth":4,"bounds":{"left":0.5219415,"top":0.25139666,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"Click to highlight","depth":4,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close","depth":4,"bounds":{"left":0.64295214,"top":0.25139666,"width":0.008643617,"height":0.01915403},"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},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"6","depth":4,"bounds":{"left":0.6196808,"top":0.28252193,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"29","depth":4,"bounds":{"left":0.6296542,"top":0.28252193,"width":0.010305851,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.64162236,"top":0.28092578,"width":0.00731383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.64893615,"top":0.28092578,"width":0.006981383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Repositories\\Crm;\n\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Illuminate\\Support\\Facades\\Log;\nuse Jiminny\\Models\\Account;\nuse Jiminny\\Models\\Contact;\nuse Jiminny\\Models\\Crm\\BusinessProcess;\nuse Jiminny\\Models\\Crm\\Configuration;\nuse Jiminny\\Models\\Crm\\Profile;\nuse Jiminny\\Models\\Crm\\RecordType;\nuse Jiminny\\Models\\Lead;\nuse Jiminny\\Models\\Opportunity;\nuse Jiminny\\Models\\Stage;\n\nclass CrmEntityRepository\n{\n public function getExternalContactMap(Configuration $configuration): array\n {\n $configurationId = $configuration->getId();\n $contacts = [];\n $m1 = memory_get_usage();\n Log::info(\n 'ExternalContactMap before',\n [\n 'current' => $m1,\n 'peak' => memory_get_peak_usage(),\n 'config_id' => $configurationId,\n ]\n );\n\n $results = DB::select(\n 'select id, crm_provider_id from contacts where crm_configuration_id = :id and deleted_at is null',\n ['id' => $configurationId]\n );\n\n $m2 = memory_get_usage();\n Log::info(\n 'ExternalContactMap after',\n [\n 'used' => $m2 - $m1,\n 'current' => $m2,\n 'peak' => memory_get_peak_usage(),\n 'config_id' => $configurationId,\n ]\n );\n\n foreach ($results as $contact) {\n $contacts[$contact->crm_provider_id] = $contact->id;\n }\n\n $m3 = memory_get_usage();\n Log::info(\n 'ExternalContactMap final',\n [\n 'used' => max($m2, $m3) - $m1,\n 'current' => $m3,\n 'peak' => memory_get_peak_usage(),\n 'config_id' => $configurationId,\n ]\n );\n\n return $contacts;\n }\n\n public function getExternalAccountMap(Configuration $configuration): array\n {\n $accounts = [];\n $m1 = memory_get_usage();\n $configurationId = $configuration->getId();\n Log::info(\n 'ExternalAccountMap before',\n [\n 'current' => $m1,\n 'peak' => memory_get_peak_usage(),\n 'config_id' => $configurationId,\n ]\n );\n\n // direct array result uses the least memory\n $items = DB::select(\n 'select id, crm_provider_id from accounts where crm_configuration_id = :id and deleted_at is null',\n ['id' => $configurationId]\n );\n\n $m2 = memory_get_usage();\n Log::info(\n 'ExternalAccountMap after',\n [\n 'used' => $m2 - $m1,\n 'current' => $m2,\n 'peak' => memory_get_peak_usage(),\n 'config_id' => $configurationId,\n ]\n );\n\n foreach ($items as $item) {\n $accounts[$item->crm_provider_id] = $item->id;\n }\n\n $m3 = memory_get_usage();\n Log::info(\n 'ExternalAccountMap final',\n [\n 'used' => max($m2, $m3) - $m1,\n 'current' => $m3,\n 'peak' => memory_get_peak_usage(),\n 'config_id' => $configurationId,\n ]\n );\n\n return $accounts;\n }\n\n // currently used only in tests, but keep in mind the memory usage could be high with mapWithKeys\n public function getInternalAccountToContactMap(Configuration $configuration): array\n {\n $m1 = memory_get_usage();\n $configurationId = $configuration->getId();\n Log::info(\n 'InternalAccountToContactMap before',\n [\n 'current' => $m1,\n 'config_id' => $configurationId,\n ]\n );\n\n $data = $configuration->accounts()\n ->whereHas('contacts')\n ->with('contacts')\n ->where('is_internal', 1)\n ->get()\n ->mapWithKeys(static function (Account $account) {\n // Internal accounts must have only 1 contact\n return [\n $account->getCrmProviderId() => $account->contacts->first()->getCrmProviderId(),\n ];\n })\n ->toArray();\n\n $m2 = memory_get_usage();\n Log::info(\n 'InternalAccountToContactMap after',\n [\n 'used' => $m2 - $m1,\n 'current' => $m2,\n 'peak' => memory_get_peak_usage(),\n 'config_id' => $configurationId,\n ]\n );\n\n return $data;\n }\n\n public function getExternalStageMap(Configuration $configuration, ?string $type = null): array\n {\n return $configuration->stages()\n ->when($type, static fn ($query) => $query->where('type', $type))\n ->get()\n ->mapWithKeys(static function (Stage $stage) {\n return [\n $stage->getAttribute('name') => $stage->getAttribute('id'),\n $stage->getAttribute('crm_provider_id') => $stage->getAttribute('id'),\n ];\n })\n ->toArray();\n }\n\n public function getStageForName(Configuration $configuration, string $name, ?string $type = null): ?Stage\n {\n return $configuration->stages()\n ->when($type, static fn ($query) => $query->where('type', $type))\n ->where('name', $name)\n ->first();\n }\n\n public function getPipelineStageByConditions(BusinessProcess $businessProcess, array $conditions): ?Stage\n {\n return $businessProcess->stages()\n ->where($conditions)\n ->first();\n }\n\n public function getBusinessProcessRecordType(BusinessProcess $businessProcess): ?RecordType\n {\n return $businessProcess->recordTypes()->first();\n }\n\n public function getOpportunityClosedStages(Configuration $configuration): Collection\n {\n return $configuration->stages()\n ->where('type', Stage::TYPE_OPPORTUNITY)\n ->whereIn('probability', [0.00, 100.00])\n ->get();\n }\n\n public function importAccount(Configuration $configuration, array $accountData): Account\n {\n $account = $configuration->accounts()\n ->withTrashed()\n ->updateOrCreate(\n [\n 'crm_configuration_id' => $configuration->getId(),\n 'team_id' => $configuration->getTeamId(),\n 'crm_provider_id' => $accountData['crm_provider_id'],\n ],\n $accountData\n );\n\n if ($account->trashed()) {\n Log::info('Restore deleted account', [\n 'id' => $account->getId(),\n 'crm_provider_id' => $account->getCrmProviderId(),\n ]);\n\n $account->restore();\n }\n\n return $account;\n }\n\n public function importContact(Configuration $configuration, array $contactData): Contact\n {\n $contact = $configuration->contacts()\n ->withTrashed()\n ->updateOrCreate(\n [\n 'crm_configuration_id' => $configuration->getId(),\n 'team_id' => $configuration->getTeamId(),\n 'crm_provider_id' => $contactData['crm_provider_id'],\n ],\n $contactData\n );\n\n if ($contact->trashed()) {\n Log::info('Restore deleted contact', [\n 'id' => $contact->getId(),\n 'crm_provider_id' => $contact->getCrmProviderId(),\n ]);\n\n $contact->restore();\n }\n\n return $contact;\n }\n\n public function importLead(Configuration $configuration, array $leadData): Lead\n {\n $lead = $configuration->leads()\n ->withTrashed()\n ->updateOrCreate(\n [\n 'crm_configuration_id' => $configuration->getId(),\n 'team_id' => $configuration->getTeamId(),\n 'crm_provider_id' => $leadData['crm_provider_id'],\n ],\n $leadData\n );\n\n if ($lead->trashed()) {\n Log::info('Restore deleted lead', [\n 'id' => $lead->getId(),\n 'crm_provider_id' => $lead->getCrmProviderId(),\n ]);\n\n $lead->restore();\n }\n\n return $lead;\n }\n\n public function importOpportunity(\n Configuration $configuration,\n array $opportunityData,\n bool $matchFromOtherCrm = false,\n ?string $matchName = null,\n ): Opportunity {\n if ($matchFromOtherCrm) {\n // Try find and match opportunity from other CRM configuration\n // Update and attach it to the new CRM\n // This case will work if a team is transitioning from one CRM provider to another, and we want to\n // cross-reference deals.\n $opportunityData['crm_configuration_id'] = $configuration->getId();\n\n $opportunity = $configuration->getTeam()->opportunities()\n ->withTrashed()\n ->updateOrCreate(\n [\n 'team_id' => $configuration->getTeamId(),\n 'user_id' => $opportunityData['user_id'],\n 'name' => $matchName,\n ],\n $opportunityData\n );\n\n if ($opportunity->trashed()) {\n $opportunity->restore();\n }\n\n return $opportunity;\n }\n\n $opportunity = $configuration->opportunities()\n ->withTrashed()\n ->updateOrCreate(\n [\n 'crm_configuration_id' => $configuration->getId(),\n 'team_id' => $configuration->getTeamId(),\n 'crm_provider_id' => $opportunityData['crm_provider_id'],\n ],\n $opportunityData\n );\n\n if ($opportunity->trashed()) {\n Log::info('Restore deleted opportunity', [\n 'id' => $opportunity->getId(),\n 'crm_provider_id' => $opportunity->getCrmProviderId(),\n ]);\n\n $opportunity->restore();\n }\n\n return $opportunity;\n }\n\n public function upsertOpportunity(array $attributes, array $data): Opportunity\n {\n /** @var ?Opportunity $opportunity */\n $opportunity = Opportunity::withTrashed()->where($attributes)->first();\n if ($opportunity === null) {\n $opportunity = Opportunity::create($data);\n } else {\n $opportunity->update($data);\n }\n\n return $opportunity;\n }\n\n public function importStage(Configuration $configuration, string $objectType, array $stageData): Stage\n {\n return $configuration->stages()\n ->updateOrCreate(\n [\n 'crm_configuration_id' => $configuration->getId(),\n 'team_id' => $configuration->getTeamId(),\n 'crm_provider_id' => $stageData['crm_provider_id'],\n 'type' => $objectType,\n ],\n $stageData\n );\n }\n\n public function importBusinessProcess(Configuration $configuration, array $pipelineData): BusinessProcess\n {\n return $configuration->businessProcesses()\n ->updateOrCreate(\n [\n 'crm_configuration_id' => $configuration->getId(),\n 'team_id' => $configuration->getTeamId(),\n 'crm_provider_id' => $pipelineData['crm_provider_id'],\n 'type' => $pipelineData['object_type'],\n ],\n $pipelineData\n );\n }\n\n public function findAccountByExternalId(Configuration $configuration, string $crmProviderId): ?Account\n {\n return $configuration->accounts()\n ->where('crm_provider_id', $crmProviderId)\n ->first();\n }\n\n /**\n * Find multiple accounts by their external CRM IDs\n *\n * @param Configuration $configuration\n * @param array<string> $crmProviderIds\n *\n * @return Collection<Account>\n */\n public function findAccountsByExternalIds(Configuration $configuration, array $crmProviderIds): Collection\n {\n if (empty($crmProviderIds)) {\n return collect();\n }\n\n return $configuration->accounts()\n ->whereIn('crm_provider_id', $crmProviderIds)\n ->get();\n }\n\n public function findContactByExternalId(Configuration $configuration, string $crmProviderId): ?Contact\n {\n return $configuration->contacts()\n ->where('crm_provider_id', $crmProviderId)\n ->first();\n }\n\n /**\n * Find multiple contacts by their external CRM IDs\n *\n * @param Configuration $configuration\n * @param array<string> $crmProviderIds\n *\n * @return Collection<Contact>\n */\n public function findContactsByExternalIds(Configuration $configuration, array $crmProviderIds): Collection\n {\n if (empty($crmProviderIds)) {\n return collect();\n }\n\n return $configuration->contacts()\n ->whereIn('crm_provider_id', $crmProviderIds)\n ->get();\n }\n\n public function findLeadByExternalId(Configuration $configuration, string $crmProviderId): ?Lead\n {\n return $configuration->leads()\n ->where('crm_provider_id', $crmProviderId)\n ->first();\n }\n\n public function findOpportunityByExternalId(Configuration $configuration, string $crmProviderId): ?Opportunity\n {\n return $configuration->opportunities()\n ->where('crm_provider_id', $crmProviderId)\n ->first();\n }\n\n /**\n * Find multiple opportunities by their external CRM IDs\n *\n * @param Configuration $configuration\n * @param array<string> $crmProviderIds\n *\n * @return Collection<Opportunity>\n */\n public function findOpportunitiesByExternalIds(Configuration $configuration, array $crmProviderIds): Collection\n {\n if (empty($crmProviderIds)) {\n return collect();\n }\n\n return $configuration->opportunities()\n ->whereIn('crm_provider_id', $crmProviderIds)\n ->get();\n }\n\n /**\n * @param array<string> $crmProviderIds\n *\n * @return array<string>\n */\n public function getExistingLeadCrmIds(Configuration $configuration, array $crmProviderIds): array\n {\n if (empty($crmProviderIds)) {\n return [];\n }\n\n return $configuration->leads()\n ->whereIn('crm_provider_id', $crmProviderIds)\n ->pluck('crm_provider_id')\n ->toArray();\n }\n\n /**\n * @param array<string> $crmProviderIds\n *\n * @return array<string>\n */\n public function getExistingAccountCrmIds(Configuration $configuration, array $crmProviderIds): array\n {\n if (empty($crmProviderIds)) {\n return [];\n }\n\n return $configuration->accounts()\n ->whereIn('crm_provider_id', $crmProviderIds)\n ->pluck('crm_provider_id')\n ->toArray();\n }\n\n /**\n * @param array<string> $crmProviderIds\n *\n * @return array<string>\n */\n public function getExistingContactCrmIds(Configuration $configuration, array $crmProviderIds): array\n {\n if (empty($crmProviderIds)) {\n return [];\n }\n\n return $configuration->contacts()\n ->whereIn('crm_provider_id', $crmProviderIds)\n ->pluck('crm_provider_id')\n ->toArray();\n }\n\n /**\n * @param array<string> $crmProviderIds\n *\n * @return array<string>\n */\n public function getExistingOpportunityCrmIds(Configuration $configuration, array $crmProviderIds): array\n {\n if (empty($crmProviderIds)) {\n return [];\n }\n\n return $configuration->opportunities()\n ->whereIn('crm_provider_id', $crmProviderIds)\n ->pluck('crm_provider_id')\n ->toArray();\n }\n\n public function findProfileByExternalId(Configuration $configuration, string $crmProviderId): ?Profile\n {\n return $configuration->profiles()\n ->where('crm_provider_id', $crmProviderId)\n ->first();\n }\n\n public function findBusinessProcessesByExternalId(\n Configuration $configuration,\n string $crmProviderId\n ): ?BusinessProcess {\n return $configuration->businessProcesses()\n ->where('crm_provider_id', $crmProviderId)\n ->first();\n }\n\n /**\n * @return Collection<Account>\n */\n public function findAccountsByExternalOwnerId(Configuration $configuration, string $crmOwnerId): Collection\n {\n return $configuration->accounts()\n ->where('owner_id', $crmOwnerId)\n ->whereNull('user_id')\n ->get();\n }\n\n /**\n * @return Collection<Contact>\n */\n public function findContactsByExternalOwnerId(Configuration $configuration, string $crmOwnerId): Collection\n {\n return $configuration->contacts()\n ->where('owner_id', $crmOwnerId)\n ->whereNull('user_id')\n ->get();\n }\n\n /**\n * @return Collection<Lead>\n */\n public function findLeadsByExternalOwnerId(Configuration $configuration, string $crmOwnerId): Collection\n {\n return $configuration->leads()\n ->where('owner_id', $crmOwnerId)\n ->whereNull('user_id')\n ->get();\n }\n\n /**\n * @return Collection<Opportunity>\n */\n public function findOpportunitiesByExternalOwnerId(Configuration $configuration, string $crmOwnerId): Collection\n {\n return $configuration->opportunities()\n ->where('owner_id', $crmOwnerId)\n ->whereNull('user_id')\n ->get();\n }\n\n public function searchLeadsByString(\n Configuration $configuration,\n string $query,\n ?int $limit = null,\n ?int $offset = null,\n bool $orderByName = false,\n bool $usePhoneSearch = false\n ): Collection {\n $queryBuilder = $configuration->leads()\n ->with('stages')\n ->where('converted_at', null)\n ->whereNested(function ($qb) use ($query, $usePhoneSearch) {\n $qb->where('crm_provider_id', $query);\n\n if ($usePhoneSearch) {\n $qb->orWhere('phone', 'LIKE', \"%{$query}%\")\n ->orWhere('mobile_phone', 'LIKE', \"%{$query}%\");\n } else {\n $qb->orWhere('name', 'LIKE', \"%{$query}%\")\n ->orWhere('company', 'LIKE', \"%{$query}%\");\n }\n });\n\n if ($orderByName) {\n $queryBuilder->orderBy('name');\n }\n\n if ($limit !== null) {\n $queryBuilder->limit($limit);\n }\n\n if ($offset !== null) {\n $queryBuilder->offset($offset);\n }\n\n return $queryBuilder->get();\n }\n\n public function searchAccountsByString(\n Configuration $configuration,\n string $query,\n ?int $limit = null,\n ?int $offset = null,\n bool $orderByName = false,\n bool $usePhoneSearch = false\n ): Collection {\n $queryBuilder = $configuration->accounts()\n ->where('is_internal', 0)\n ->where(function ($qb) use ($query, $usePhoneSearch) {\n $qb->where('crm_provider_id', $query);\n\n if ($usePhoneSearch) {\n $qb->orWhere('phone', 'LIKE', \"%{$query}%\");\n } else {\n $qb->orWhere('name', 'LIKE', \"%{$query}%\");\n }\n });\n\n if ($orderByName) {\n $queryBuilder->orderBy('name');\n }\n\n if ($limit !== null) {\n $queryBuilder->limit($limit);\n }\n\n if ($offset !== null) {\n $queryBuilder->offset($offset);\n }\n\n return $queryBuilder->get();\n }\n\n public function searchContactsByString(\n Configuration $configuration,\n string $query,\n ?int $limit = null,\n ?int $offset = null,\n bool $orderByName = false,\n bool $usePhoneSearch = false\n ): Collection {\n $queryBuilder = $configuration->contacts()\n ->with('account')\n ->where(function ($qb) use ($query, $usePhoneSearch) {\n $qb->where('crm_provider_id', $query);\n\n if ($usePhoneSearch) {\n $qb->orWhere('phone', 'LIKE', \"%{$query}%\")\n ->orWhere('mobile_phone', 'LIKE', \"%{$query}%\");\n } else {\n $qb->orWhere('name', 'LIKE', \"%{$query}%\")\n ->orWhere('email', 'LIKE', \"%{$query}%\")\n ->orWhere('phone', 'LIKE', \"%{$query}%\")\n ->orWhere('mobile_phone', 'LIKE', \"%{$query}%\");\n }\n });\n\n if ($orderByName) {\n $queryBuilder->orderBy('name');\n }\n\n if ($limit !== null) {\n $queryBuilder->limit($limit);\n }\n\n if ($offset !== null) {\n $queryBuilder->offset($offset);\n }\n\n return $queryBuilder->get();\n }\n\n /**\n * Find a contact by id only if it belongs to the team\n */\n public function findContactByConfigurationAndId(Configuration $configuration, int $contactId): ?Contact\n {\n return $configuration->contacts()\n ->where('id', $contactId)\n ->first();\n }\n\n /**\n * Find a lead by id only if it belongs to the team\n */\n public function findLeadByConfigurationAndId(Configuration $configuration, int $leadId): ?Lead\n {\n return $configuration->leads()\n ->where('id', $leadId)\n ->first();\n }\n\n /**\n * Find an account by id only if it belongs to the team\n */\n public function findAccountByConfigurationAndId(Configuration $configuration, int $accountId): ?Account\n {\n return $configuration->accounts()\n ->where('id', $accountId)\n ->first();\n }\n\n /**\n * Find an opportunity by id only if it belongs to the team\n */\n public function findOpportunityByConfigurationAndId(Configuration $configuration, int $opportunityId): ?Opportunity\n {\n return $configuration->opportunities()\n ->where('id', $opportunityId)\n ->first();\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Repositories\\Crm;\n\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Illuminate\\Support\\Facades\\Log;\nuse Jiminny\\Models\\Account;\nuse Jiminny\\Models\\Contact;\nuse Jiminny\\Models\\Crm\\BusinessProcess;\nuse Jiminny\\Models\\Crm\\Configuration;\nuse Jiminny\\Models\\Crm\\Profile;\nuse Jiminny\\Models\\Crm\\RecordType;\nuse Jiminny\\Models\\Lead;\nuse Jiminny\\Models\\Opportunity;\nuse Jiminny\\Models\\Stage;\n\nclass CrmEntityRepository\n{\n public function getExternalContactMap(Configuration $configuration): array\n {\n $configurationId = $configuration->getId();\n $contacts = [];\n $m1 = memory_get_usage();\n Log::info(\n 'ExternalContactMap before',\n [\n 'current' => $m1,\n 'peak' => memory_get_peak_usage(),\n 'config_id' => $configurationId,\n ]\n );\n\n $results = DB::select(\n 'select id, crm_provider_id from contacts where crm_configuration_id = :id and deleted_at is null',\n ['id' => $configurationId]\n );\n\n $m2 = memory_get_usage();\n Log::info(\n 'ExternalContactMap after',\n [\n 'used' => $m2 - $m1,\n 'current' => $m2,\n 'peak' => memory_get_peak_usage(),\n 'config_id' => $configurationId,\n ]\n );\n\n foreach ($results as $contact) {\n $contacts[$contact->crm_provider_id] = $contact->id;\n }\n\n $m3 = memory_get_usage();\n Log::info(\n 'ExternalContactMap final',\n [\n 'used' => max($m2, $m3) - $m1,\n 'current' => $m3,\n 'peak' => memory_get_peak_usage(),\n 'config_id' => $configurationId,\n ]\n );\n\n return $contacts;\n }\n\n public function getExternalAccountMap(Configuration $configuration): array\n {\n $accounts = [];\n $m1 = memory_get_usage();\n $configurationId = $configuration->getId();\n Log::info(\n 'ExternalAccountMap before',\n [\n 'current' => $m1,\n 'peak' => memory_get_peak_usage(),\n 'config_id' => $configurationId,\n ]\n );\n\n // direct array result uses the least memory\n $items = DB::select(\n 'select id, crm_provider_id from accounts where crm_configuration_id = :id and deleted_at is null',\n ['id' => $configurationId]\n );\n\n $m2 = memory_get_usage();\n Log::info(\n 'ExternalAccountMap after',\n [\n 'used' => $m2 - $m1,\n 'current' => $m2,\n 'peak' => memory_get_peak_usage(),\n 'config_id' => $configurationId,\n ]\n );\n\n foreach ($items as $item) {\n $accounts[$item->crm_provider_id] = $item->id;\n }\n\n $m3 = memory_get_usage();\n Log::info(\n 'ExternalAccountMap final',\n [\n 'used' => max($m2, $m3) - $m1,\n 'current' => $m3,\n 'peak' => memory_get_peak_usage(),\n 'config_id' => $configurationId,\n ]\n );\n\n return $accounts;\n }\n\n // currently used only in tests, but keep in mind the memory usage could be high with mapWithKeys\n public function getInternalAccountToContactMap(Configuration $configuration): array\n {\n $m1 = memory_get_usage();\n $configurationId = $configuration->getId();\n Log::info(\n 'InternalAccountToContactMap before',\n [\n 'current' => $m1,\n 'config_id' => $configurationId,\n ]\n );\n\n $data = $configuration->accounts()\n ->whereHas('contacts')\n ->with('contacts')\n ->where('is_internal', 1)\n ->get()\n ->mapWithKeys(static function (Account $account) {\n // Internal accounts must have only 1 contact\n return [\n $account->getCrmProviderId() => $account->contacts->first()->getCrmProviderId(),\n ];\n })\n ->toArray();\n\n $m2 = memory_get_usage();\n Log::info(\n 'InternalAccountToContactMap after',\n [\n 'used' => $m2 - $m1,\n 'current' => $m2,\n 'peak' => memory_get_peak_usage(),\n 'config_id' => $configurationId,\n ]\n );\n\n return $data;\n }\n\n public function getExternalStageMap(Configuration $configuration, ?string $type = null): array\n {\n return $configuration->stages()\n ->when($type, static fn ($query) => $query->where('type', $type))\n ->get()\n ->mapWithKeys(static function (Stage $stage) {\n return [\n $stage->getAttribute('name') => $stage->getAttribute('id'),\n $stage->getAttribute('crm_provider_id') => $stage->getAttribute('id'),\n ];\n })\n ->toArray();\n }\n\n public function getStageForName(Configuration $configuration, string $name, ?string $type = null): ?Stage\n {\n return $configuration->stages()\n ->when($type, static fn ($query) => $query->where('type', $type))\n ->where('name', $name)\n ->first();\n }\n\n public function getPipelineStageByConditions(BusinessProcess $businessProcess, array $conditions): ?Stage\n {\n return $businessProcess->stages()\n ->where($conditions)\n ->first();\n }\n\n public function getBusinessProcessRecordType(BusinessProcess $businessProcess): ?RecordType\n {\n return $businessProcess->recordTypes()->first();\n }\n\n public function getOpportunityClosedStages(Configuration $configuration): Collection\n {\n return $configuration->stages()\n ->where('type', Stage::TYPE_OPPORTUNITY)\n ->whereIn('probability', [0.00, 100.00])\n ->get();\n }\n\n public function importAccount(Configuration $configuration, array $accountData): Account\n {\n $account = $configuration->accounts()\n ->withTrashed()\n ->updateOrCreate(\n [\n 'crm_configuration_id' => $configuration->getId(),\n 'team_id' => $configuration->getTeamId(),\n 'crm_provider_id' => $accountData['crm_provider_id'],\n ],\n $accountData\n );\n\n if ($account->trashed()) {\n Log::info('Restore deleted account', [\n 'id' => $account->getId(),\n 'crm_provider_id' => $account->getCrmProviderId(),\n ]);\n\n $account->restore();\n }\n\n return $account;\n }\n\n public function importContact(Configuration $configuration, array $contactData): Contact\n {\n $contact = $configuration->contacts()\n ->withTrashed()\n ->updateOrCreate(\n [\n 'crm_configuration_id' => $configuration->getId(),\n 'team_id' => $configuration->getTeamId(),\n 'crm_provider_id' => $contactData['crm_provider_id'],\n ],\n $contactData\n );\n\n if ($contact->trashed()) {\n Log::info('Restore deleted contact', [\n 'id' => $contact->getId(),\n 'crm_provider_id' => $contact->getCrmProviderId(),\n ]);\n\n $contact->restore();\n }\n\n return $contact;\n }\n\n public function importLead(Configuration $configuration, array $leadData): Lead\n {\n $lead = $configuration->leads()\n ->withTrashed()\n ->updateOrCreate(\n [\n 'crm_configuration_id' => $configuration->getId(),\n 'team_id' => $configuration->getTeamId(),\n 'crm_provider_id' => $leadData['crm_provider_id'],\n ],\n $leadData\n );\n\n if ($lead->trashed()) {\n Log::info('Restore deleted lead', [\n 'id' => $lead->getId(),\n 'crm_provider_id' => $lead->getCrmProviderId(),\n ]);\n\n $lead->restore();\n }\n\n return $lead;\n }\n\n public function importOpportunity(\n Configuration $configuration,\n array $opportunityData,\n bool $matchFromOtherCrm = false,\n ?string $matchName = null,\n ): Opportunity {\n if ($matchFromOtherCrm) {\n // Try find and match opportunity from other CRM configuration\n // Update and attach it to the new CRM\n // This case will work if a team is transitioning from one CRM provider to another, and we want to\n // cross-reference deals.\n $opportunityData['crm_configuration_id'] = $configuration->getId();\n\n $opportunity = $configuration->getTeam()->opportunities()\n ->withTrashed()\n ->updateOrCreate(\n [\n 'team_id' => $configuration->getTeamId(),\n 'user_id' => $opportunityData['user_id'],\n 'name' => $matchName,\n ],\n $opportunityData\n );\n\n if ($opportunity->trashed()) {\n $opportunity->restore();\n }\n\n return $opportunity;\n }\n\n $opportunity = $configuration->opportunities()\n ->withTrashed()\n ->updateOrCreate(\n [\n 'crm_configuration_id' => $configuration->getId(),\n 'team_id' => $configuration->getTeamId(),\n 'crm_provider_id' => $opportunityData['crm_provider_id'],\n ],\n $opportunityData\n );\n\n if ($opportunity->trashed()) {\n Log::info('Restore deleted opportunity', [\n 'id' => $opportunity->getId(),\n 'crm_provider_id' => $opportunity->getCrmProviderId(),\n ]);\n\n $opportunity->restore();\n }\n\n return $opportunity;\n }\n\n public function upsertOpportunity(array $attributes, array $data): Opportunity\n {\n /** @var ?Opportunity $opportunity */\n $opportunity = Opportunity::withTrashed()->where($attributes)->first();\n if ($opportunity === null) {\n $opportunity = Opportunity::create($data);\n } else {\n $opportunity->update($data);\n }\n\n return $opportunity;\n }\n\n public function importStage(Configuration $configuration, string $objectType, array $stageData): Stage\n {\n return $configuration->stages()\n ->updateOrCreate(\n [\n 'crm_configuration_id' => $configuration->getId(),\n 'team_id' => $configuration->getTeamId(),\n 'crm_provider_id' => $stageData['crm_provider_id'],\n 'type' => $objectType,\n ],\n $stageData\n );\n }\n\n public function importBusinessProcess(Configuration $configuration, array $pipelineData): BusinessProcess\n {\n return $configuration->businessProcesses()\n ->updateOrCreate(\n [\n 'crm_configuration_id' => $configuration->getId(),\n 'team_id' => $configuration->getTeamId(),\n 'crm_provider_id' => $pipelineData['crm_provider_id'],\n 'type' => $pipelineData['object_type'],\n ],\n $pipelineData\n );\n }\n\n public function findAccountByExternalId(Configuration $configuration, string $crmProviderId): ?Account\n {\n return $configuration->accounts()\n ->where('crm_provider_id', $crmProviderId)\n ->first();\n }\n\n /**\n * Find multiple accounts by their external CRM IDs\n *\n * @param Configuration $configuration\n * @param array<string> $crmProviderIds\n *\n * @return Collection<Account>\n */\n public function findAccountsByExternalIds(Configuration $configuration, array $crmProviderIds): Collection\n {\n if (empty($crmProviderIds)) {\n return collect();\n }\n\n return $configuration->accounts()\n ->whereIn('crm_provider_id', $crmProviderIds)\n ->get();\n }\n\n public function findContactByExternalId(Configuration $configuration, string $crmProviderId): ?Contact\n {\n return $configuration->contacts()\n ->where('crm_provider_id', $crmProviderId)\n ->first();\n }\n\n /**\n * Find multiple contacts by their external CRM IDs\n *\n * @param Configuration $configuration\n * @param array<string> $crmProviderIds\n *\n * @return Collection<Contact>\n */\n public function findContactsByExternalIds(Configuration $configuration, array $crmProviderIds): Collection\n {\n if (empty($crmProviderIds)) {\n return collect();\n }\n\n return $configuration->contacts()\n ->whereIn('crm_provider_id', $crmProviderIds)\n ->get();\n }\n\n public function findLeadByExternalId(Configuration $configuration, string $crmProviderId): ?Lead\n {\n return $configuration->leads()\n ->where('crm_provider_id', $crmProviderId)\n ->first();\n }\n\n public function findOpportunityByExternalId(Configuration $configuration, string $crmProviderId): ?Opportunity\n {\n return $configuration->opportunities()\n ->where('crm_provider_id', $crmProviderId)\n ->first();\n }\n\n /**\n * Find multiple opportunities by their external CRM IDs\n *\n * @param Configuration $configuration\n * @param array<string> $crmProviderIds\n *\n * @return Collection<Opportunity>\n */\n public function findOpportunitiesByExternalIds(Configuration $configuration, array $crmProviderIds): Collection\n {\n if (empty($crmProviderIds)) {\n return collect();\n }\n\n return $configuration->opportunities()\n ->whereIn('crm_provider_id', $crmProviderIds)\n ->get();\n }\n\n /**\n * @param array<string> $crmProviderIds\n *\n * @return array<string>\n */\n public function getExistingLeadCrmIds(Configuration $configuration, array $crmProviderIds): array\n {\n if (empty($crmProviderIds)) {\n return [];\n }\n\n return $configuration->leads()\n ->whereIn('crm_provider_id', $crmProviderIds)\n ->pluck('crm_provider_id')\n ->toArray();\n }\n\n /**\n * @param array<string> $crmProviderIds\n *\n * @return array<string>\n */\n public function getExistingAccountCrmIds(Configuration $configuration, array $crmProviderIds): array\n {\n if (empty($crmProviderIds)) {\n return [];\n }\n\n return $configuration->accounts()\n ->whereIn('crm_provider_id', $crmProviderIds)\n ->pluck('crm_provider_id')\n ->toArray();\n }\n\n /**\n * @param array<string> $crmProviderIds\n *\n * @return array<string>\n */\n public function getExistingContactCrmIds(Configuration $configuration, array $crmProviderIds): array\n {\n if (empty($crmProviderIds)) {\n return [];\n }\n\n return $configuration->contacts()\n ->whereIn('crm_provider_id', $crmProviderIds)\n ->pluck('crm_provider_id')\n ->toArray();\n }\n\n /**\n * @param array<string> $crmProviderIds\n *\n * @return array<string>\n */\n public function getExistingOpportunityCrmIds(Configuration $configuration, array $crmProviderIds): array\n {\n if (empty($crmProviderIds)) {\n return [];\n }\n\n return $configuration->opportunities()\n ->whereIn('crm_provider_id', $crmProviderIds)\n ->pluck('crm_provider_id')\n ->toArray();\n }\n\n public function findProfileByExternalId(Configuration $configuration, string $crmProviderId): ?Profile\n {\n return $configuration->profiles()\n ->where('crm_provider_id', $crmProviderId)\n ->first();\n }\n\n public function findBusinessProcessesByExternalId(\n Configuration $configuration,\n string $crmProviderId\n ): ?BusinessProcess {\n return $configuration->businessProcesses()\n ->where('crm_provider_id', $crmProviderId)\n ->first();\n }\n\n /**\n * @return Collection<Account>\n */\n public function findAccountsByExternalOwnerId(Configuration $configuration, string $crmOwnerId): Collection\n {\n return $configuration->accounts()\n ->where('owner_id', $crmOwnerId)\n ->whereNull('user_id')\n ->get();\n }\n\n /**\n * @return Collection<Contact>\n */\n public function findContactsByExternalOwnerId(Configuration $configuration, string $crmOwnerId): Collection\n {\n return $configuration->contacts()\n ->where('owner_id', $crmOwnerId)\n ->whereNull('user_id')\n ->get();\n }\n\n /**\n * @return Collection<Lead>\n */\n public function findLeadsByExternalOwnerId(Configuration $configuration, string $crmOwnerId): Collection\n {\n return $configuration->leads()\n ->where('owner_id', $crmOwnerId)\n ->whereNull('user_id')\n ->get();\n }\n\n /**\n * @return Collection<Opportunity>\n */\n public function findOpportunitiesByExternalOwnerId(Configuration $configuration, string $crmOwnerId): Collection\n {\n return $configuration->opportunities()\n ->where('owner_id', $crmOwnerId)\n ->whereNull('user_id')\n ->get();\n }\n\n public function searchLeadsByString(\n Configuration $configuration,\n string $query,\n ?int $limit = null,\n ?int $offset = null,\n bool $orderByName = false,\n bool $usePhoneSearch = false\n ): Collection {\n $queryBuilder = $configuration->leads()\n ->with('stages')\n ->where('converted_at', null)\n ->whereNested(function ($qb) use ($query, $usePhoneSearch) {\n $qb->where('crm_provider_id', $query);\n\n if ($usePhoneSearch) {\n $qb->orWhere('phone', 'LIKE', \"%{$query}%\")\n ->orWhere('mobile_phone', 'LIKE', \"%{$query}%\");\n } else {\n $qb->orWhere('name', 'LIKE', \"%{$query}%\")\n ->orWhere('company', 'LIKE', \"%{$query}%\");\n }\n });\n\n if ($orderByName) {\n $queryBuilder->orderBy('name');\n }\n\n if ($limit !== null) {\n $queryBuilder->limit($limit);\n }\n\n if ($offset !== null) {\n $queryBuilder->offset($offset);\n }\n\n return $queryBuilder->get();\n }\n\n public function searchAccountsByString(\n Configuration $configuration,\n string $query,\n ?int $limit = null,\n ?int $offset = null,\n bool $orderByName = false,\n bool $usePhoneSearch = false\n ): Collection {\n $queryBuilder = $configuration->accounts()\n ->where('is_internal', 0)\n ->where(function ($qb) use ($query, $usePhoneSearch) {\n $qb->where('crm_provider_id', $query);\n\n if ($usePhoneSearch) {\n $qb->orWhere('phone', 'LIKE', \"%{$query}%\");\n } else {\n $qb->orWhere('name', 'LIKE', \"%{$query}%\");\n }\n });\n\n if ($orderByName) {\n $queryBuilder->orderBy('name');\n }\n\n if ($limit !== null) {\n $queryBuilder->limit($limit);\n }\n\n if ($offset !== null) {\n $queryBuilder->offset($offset);\n }\n\n return $queryBuilder->get();\n }\n\n public function searchContactsByString(\n Configuration $configuration,\n string $query,\n ?int $limit = null,\n ?int $offset = null,\n bool $orderByName = false,\n bool $usePhoneSearch = false\n ): Collection {\n $queryBuilder = $configuration->contacts()\n ->with('account')\n ->where(function ($qb) use ($query, $usePhoneSearch) {\n $qb->where('crm_provider_id', $query);\n\n if ($usePhoneSearch) {\n $qb->orWhere('phone', 'LIKE', \"%{$query}%\")\n ->orWhere('mobile_phone', 'LIKE', \"%{$query}%\");\n } else {\n $qb->orWhere('name', 'LIKE', \"%{$query}%\")\n ->orWhere('email', 'LIKE', \"%{$query}%\")\n ->orWhere('phone', 'LIKE', \"%{$query}%\")\n ->orWhere('mobile_phone', 'LIKE', \"%{$query}%\");\n }\n });\n\n if ($orderByName) {\n $queryBuilder->orderBy('name');\n }\n\n if ($limit !== null) {\n $queryBuilder->limit($limit);\n }\n\n if ($offset !== null) {\n $queryBuilder->offset($offset);\n }\n\n return $queryBuilder->get();\n }\n\n /**\n * Find a contact by id only if it belongs to the team\n */\n public function findContactByConfigurationAndId(Configuration $configuration, int $contactId): ?Contact\n {\n return $configuration->contacts()\n ->where('id', $contactId)\n ->first();\n }\n\n /**\n * Find a lead by id only if it belongs to the team\n */\n public function findLeadByConfigurationAndId(Configuration $configuration, int $leadId): ?Lead\n {\n return $configuration->leads()\n ->where('id', $leadId)\n ->first();\n }\n\n /**\n * Find an account by id only if it belongs to the team\n */\n public function findAccountByConfigurationAndId(Configuration $configuration, int $accountId): ?Account\n {\n return $configuration->accounts()\n ->where('id', $accountId)\n ->first();\n }\n\n /**\n * Find an opportunity by id only if it belongs to the team\n */\n public function findOpportunityByConfigurationAndId(Configuration $configuration, int $opportunityId): ?Opportunity\n {\n return $configuration->opportunities()\n ->where('id', $opportunityId)\n ->first();\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"35","depth":4,"bounds":{"left":0.9281915,"top":0.10055866,"width":0.010305851,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"bounds":{"left":0.94049203,"top":0.10055866,"width":0.00731383,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"33","depth":4,"bounds":{"left":0.94980055,"top":0.10055866,"width":0.010305851,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"63","depth":4,"bounds":{"left":0.96210104,"top":0.10055866,"width":0.010305851,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.9740692,"top":0.09896249,"width":0.00731383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.98138297,"top":0.09896249,"width":0.006981383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT * FROM teams WHERE name LIKE '%litify%'; # 1069, 994, 24993\nSELECT * FROM users WHERE id = 25061;\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 994;\nSELECT * FROM crm_profiles WHERE user_id = 25061;\n\nselect * from crm_configurations where id = 834;\nSELECT * FROM teams WHERE id = 882;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 882 and sa.provider = 'hubspot';\n\nSELECT * FROM crm_configurations where id = 882; # 933 - GoGlobal\nSELECT * FROM opportunities WHERE team_id = 933 order by updated_at desc;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 933 and sa.provider = 'hubspot';\n\nSELECT * FROM crm_configurations WHERE provider = 'hubspot' and crm_provider_id = 7270388;\n\nSELECT * FROM contacts where crm_configuration_id = 834;\nSELECT * FROM opportunities WHERE team_id = 933\n# AND crm_provider_id IN ('20131586060','46017317898','52543911090','53451356564','54101251892','54323768459');\nAND id IN (8482561,18352941,19042734,19232139,19445140,19472541);\nSELECT * FROM opportunity_contacts\nWHERE opportunity_id IN (8482561,18352941,19042734,19232139,19445140,19472541);\n\n# ********************************************************************\nSELECT * FROM crm_configurations where id = 485; #\nSELECT * FROM opportunities WHERE team_id = 933 order by updated_at desc;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 933 and sa.provider = 'hubspot';\n\nselect crm.provider, l.* from leads l join crm_configurations crm on l.crm_configuration_id = crm.id\nwhere crm.provider NOT IN ('salesforce', 'integration-app', 'bullhorn', 'copper')\n# and l.converted_at IS NOT NULL\n;\n\n# ********************************************************************\nSELECT * FROM activities a WHERE type IN ('email-inbound', 'email-outbound')\nand opportunity_id IS NULL\norder by id desc;\n\nSELECT * FROM teams WHERE id = 604; # 598\nSELECT * FROM activities WHERE id = 74410828; # chelseaw@allvoices.co\nSELECT * FROM accounts WHERE id = 20068382;\nSELECT * FROM accounts WHERE id = 35186038;\n\nSELECT * FROM contacts WHERE team_id = 852 and updated_at > '2026-01-23 12:30:00' order by updated_at desc;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 559 and sa.provider = 'hubspot';\n\nSELECT * FROM activities WHERE uuid_to_bin('cb6342b6-a183-401c-b0af-ede92b2ae763') = uuid;\nselect * from sidekick_settings where team_id = 781;\n\nSELECT * FROM crm_configurations where provider = 'hubspot' and crm_provider_id = 26651871; # Teya\nSELECT * FROM crm_configurations where provider = 'hubspot' and crm_provider_id = 7562435;\nSELECT * FROM crm_configurations where provider = 'hubspot' and crm_provider_id = 8420347; # opflit 2100\n\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 711;\nSELECT * FROM activities where crm_configuration_id = 711 and crm_provider_id IS NULL\nand is_internal = 0 and status = 'completed'\norder by id desc;\n\nSELECT * FROM crm_layout_entities\nWHERE crm_layout_id IN (2352, 2353);\n;\n\nSELECT * FROM crm_configurations where provider = 'hubspot' and id = 530;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 556 and sa.provider = 'hubspot';\n\nSELECT * FROM activities WHERE uuid_to_bin('c6ca4b22-7738-4563-a95d-b8a9598924ae') = uuid;\nSELECT * FROM activities WHERE uuid_to_bin('442abb2b-28bd-4be8-9c25-19e9bf02766d') = uuid;\nselect * from contacts\nwhere crm_configuration_id = 530\nand crm_provider_id = 872252;\n\nselect * from activities where crm_configuration_id = 530\nand user_id = 14343 and type like '%softphone%'\nand created_at between '2026-01-28 15:00:00' and '2026-01-28 15:10:00';\n\nSELECT * FROM crm_configurations where provider = 'hubspot' and crm_provider_id = 25666868; # Teya\nSELECT * FROM crm_configurations where provider = 'hubspot' and crm_provider_id = 8646335; # Teya\nSELECT * FROM crm_configurations where provider = 'hubspot' and crm_provider_id IN (5933397);\n\n\nSELECT t.name, t.id, t.owner_id, c.id, c.provider, c.crm_base_url FROM teams t\nJOIN crm_configurations c ON t.id = c.team_id\nWHERE t.status = 'active';\n\nSELECT * FROM teams where id = 1091;\nSELECT * FROM crm_configurations where team_id = 1091;\nSELECT * FROM activity_providers where team_id = 1091;\nSELECT * FROM activities where crm_configuration_id = 1024 and type IN ('softphone', 'softphone-outbound')\nand provider NOT IN ('hubspot', 'aircall')\n# and telephony_provider_id = '019c1131-a22f-4792-b9ea-20adf6a02ed0'\norder by id desc;\n\n\nSELECT * FROM teams WHERE name LIKE '%Leadventure%';\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1091 and sa.provider = 'salesforce';\n\nSELECT * FROM teams WHERE name LIKE '%Wilson%'; # 862, 812\nSELECT * FROM teams where id = 862;\nSELECT * FROM crm_configurations where team_id = 862;\nSELECT * FROM activity_providers where team_id = 862;\nSELECT * FROM activities where crm_configuration_id = 812 and type IN ('softphone', 'softphone-outbound')\nand provider NOT IN ('hubspot', 'aircall')\n# and telephony_provider_id = '019c1131-a22f-4792-b9ea-20adf6a02ed0'\norder by id desc;\n\n\nSELECT t.id, crm.id, crm.provider, ap.* FROM teams t\njoin crm_configurations crm on t.id = crm.team_id\njoin activity_providers ap on t.id = ap.team_id\nwhere t.status = 'active' and ap.is_enabled = 1\nand crm.provider = 'hubspot'\nand ap.provider NOT IN ('hubspot', 'aircall', 'uploader', 'gong', 'twilio', 'zoom-bot', 'google-meet', 'ms-teams',\n 'outreach', 'close', 'ringcentral', 'dialpad', 'zoom-phone');\n\nSELECT * FROM teams where id = 1068;\nSELECT * FROM crm_configurations where team_id = 1068;\nSELECT * FROM activity_providers where team_id = 1068;\n\nSELECT * FROM activities a\nwhere crm_configuration_id = 993 and type IN ('softphone', 'softphone-outbound')\nand a.provider NOT IN ('hubspot', 'uploader', 'gong', 'twilio', 'google-meet', 'ms-teams','close'\n )\n# and telephony_provider_id = '019c1131-a22f-4792-b9ea-20adf6a02ed0'\norder by a.id desc;\n\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1068 and sa.provider = 'hubspot';\n\n# ********************************************************************\n# ********************************************************************\n# ********************************************************************\nSELECT * FROM crm_configurations where id = 882; # 933 - GoGlobal , portalId: 6017093\nSELECT * FROM opportunities WHERE team_id = 933 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 933 and updated_at > '2026-02-06 00:00:00' order by updated_at desc;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 933 and sa.provider = 'hubspot';\n\n# ********************************************************************\nSELECT * FROM crm_configurations where id = 834; # 882 - AnyVan , portalId: 5468262\nSELECT * FROM contacts WHERE crm_configuration_id = 834 and updated_at > '2026-03-30 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE crm_configuration_id = 834 and updated_at > '2026-03-04 08:00:00' order by updated_at desc;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 882 and sa.provider = 'hubspot';\nselect * from crm_layouts where crm_configuration_id = 834;\nselect * from crm_layout_entities where crm_layout_id = 2780;\nselect * from crm_fields where id IN (321153,321192,321193,321194);\n\nSELECT * FROM opportunities WHERE crm_configuration_id = 834 and id = 10993426;\n# ********************************************************************\nSELECT * FROM crm_configurations where id = 988; # 1057 - Teya (543ce4f4-168c-4571-91ea-5b35c253f06f) , portalId: 26651871\nSELECT * FROM opportunities WHERE team_id = 1057 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 1057 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1057 and sa.provider = 'hubspot';\n\nSELECT * FROM crm_configurations where id = 533; # 559 - Connectd , portalId: 6710988\nSELECT * FROM opportunities WHERE team_id = 559 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 559 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 801; # 852 - Rise Vision , portalId: 2700250\nSELECT * FROM opportunities WHERE team_id = 852 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 852 and updated_at > '2026-02-04 00:00:00' order by updated_at desc; # 6th last\n\nSELECT * FROM crm_configurations where id = 962; # 1034 - evergrowth.io , portalId: 143180990\nSELECT * FROM opportunities WHERE team_id = 1034 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 1034 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\n\n# ********************************************************************\nSELECT * FROM crm_configurations where id = 1037; # 1102 - Jibble , portalId: 6649755\nSELECT * FROM opportunities WHERE team_id = 1102 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 1102 and updated_at > '2026-02-04 12:30:00' order by updated_at desc; # 8\n\nSELECT * FROM crm_configurations where id = 1015; # 1049 - Travefy , portalId: 48904401\nSELECT * FROM opportunities WHERE team_id = 1049 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 1049 and updated_at > '2026-02-04 12:30:00' order by updated_at desc; # 20\n\nSELECT * FROM crm_configurations where id = 64; # 70 - SalaryFinance , portalId: 3404115\nSELECT * FROM opportunities WHERE team_id = 70 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 70 and updated_at > '2026-02-04 12:30:00' order by updated_at desc; # 6th last\n\nSELECT * FROM crm_configurations where id = 802; # 853 - Street Group , portalId: 7658438\nSELECT * FROM opportunities WHERE team_id = 853 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 853 and updated_at > '2026-02-04 12:30:00' order by updated_at desc; # 10\n\nSELECT * FROM crm_configurations where id = 872; # 921 - In Professional Development , portalId: 9238273\nSELECT * FROM opportunities WHERE team_id = 921 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 921 and updated_at > '2026-02-04 12:30:00' order by updated_at desc; # 2\n\n# ********************************************************************\nSELECT * FROM crm_configurations where id = 550; # 576 - SeedLegals , portalId: 3028661\nSELECT * FROM opportunities WHERE team_id = 576 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 576 and updated_at > '2026-02-05 14:00:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 989; # 1058 - rtaoutdoor.com , portalId: 22371204\nSELECT * FROM opportunities WHERE team_id = 1058 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 1058 and updated_at > '2026-02-05 14:00:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 896; # 946 - Mintago , portalId: 6621281\nSELECT * FROM opportunities WHERE team_id = 946 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 946 and updated_at > '2026-02-05 14:00:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 617; # 641 - PCS , portalId: 5244937\nSELECT * FROM opportunities WHERE team_id = 641 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 641 and updated_at > '2026-02-05 14:00:00' order by updated_at desc; # 7th\n# ********************************************************************\nSELECT * FROM crm_configurations where id = 649; # 670 - Eventeny , portalId: 4492849\nSELECT * FROM opportunities WHERE team_id = 670 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 670 and updated_at > '2026-02-09 08:00:00' order by updated_at desc; #\n\nSELECT * FROM crm_configurations where id = 48; # 51 - CleanCloud , portalId: 4373137\nSELECT * FROM opportunities WHERE team_id = 51 and updated_at > '2026-03-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 51 and updated_at > '2026-02-09 08:00:00' order by updated_at desc;\nselect * from users where team_id = 51; # 7783\nSELECT * FROM groups WHERE uuid_to_bin('8a8d2cb6-8b55-4fa3-8b5c-5f0e3d8de59a') = uuid; # 1130\nselect * from activity_searches where user_id = 7783;\nselect * from activity_search_filters where activity_search_id IN (32291, 32292);\n\nSELECT asf.activity_search_id, asf.id, asf.value\nFROM activity_search_filters asf\nWHERE asf.filter = 'group_id'\nAND asf.value IN (\n SELECT CONCAT(\n HEX(SUBSTR(uuid, 5, 4)), '-',\n HEX(SUBSTR(uuid, 3, 2)), '-',\n HEX(SUBSTR(uuid, 1, 2)), '-',\n HEX(SUBSTR(uuid, 9, 2)), '-',\n HEX(SUBSTR(uuid, 11))\n )\n FROM groups\n WHERE deleted_at IS NOT NULL\n);\n\nSELECT * FROM crm_configurations where id = 272; # 290 - Bonham & Brook , portalId: 5705856\nSELECT * FROM opportunities WHERE team_id = 290 and updated_at > '2026-02-05 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 290 and updated_at > '2026-02-09 08:00:00' order by updated_at desc; # 6th\n# ********************************************************************\nSELECT * FROM crm_configurations where provider = 'hubspot';\nSELECT * FROM crm_configurations where id = 1056; # 1119 - Chromatic , portalId: 45602133\nSELECT * FROM opportunities WHERE team_id = 1119 and remotely_created_at > '2026-02-01 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 1119 and updated_at > '2026-02-09 09:00:00' order by updated_at desc; # null\n# ********************************************************************\n\nselect * from contacts where crm_provider_id = '003Uu00000ojD4NIAU';\nselect\n cp.*\n# DISTINCT t.id\n# cp.id, cp.user_id, t.id, cp.crm_configuration_id, cp.contact_fields\nFROM crm_profiles cp\nJOIN crm_configurations crm on crm.id = cp.crm_configuration_id\nJOIN users u on u.id = cp.user_id\nJOIN teams t ON t.id = crm.team_id\nWHERE crm.provider = 'salesforce' and t.status = 'active'\n and cp.archived_at IS NULL and u.deleted_at IS NULL\n and t.id NOT IN (1093)\n and t.id = 2\n and cp.contact_fields IS NULL;\n# and c.crm_provider_id = '003Uu00000ojD4NIAU';\n\nSELECT * FROM users WHERE id = 26484;\nSELECT * FROM crm_profiles WHERE user_id = 26484;\nSELECT * FROM social_accounts WHERE sociable_id = 26484;\nSELECT * FROM crm_configurations where provider = 'salesforce';\nselect * from users where id IN (10022, 10403);\nselect * from users where team_id IN (526);\nselect * from teams where id IN (526, 532);\nselect * from crm_configurations where id IN (500, 516);\nselect * from crm_profiles where crm_configuration_id IN (500, 516) and user_id IN (10022, 10403);\nselect * from contacts where crm_configuration_id IN (500, 516) and crm_provider_id = '003Uu00000ojD4NIAU';\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 526 and sa.provider = 'salesforce';\nselect * from team_settings where team_id IN (526, 532);\n\nselect * from users where id IN (22824);\nselect * from crm_profiles where crm_configuration_id IN (1026);\n\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1093 and sa.provider = 'salesforce';\n\nselect * from teams where id = 1099;\nselect * from users where id = 29643\n\nselect * from activity_processing_states;\n\nSELECT * FROM teams where name LIKE '%Fare%'; # 233\nSELECT * FROM opportunities where crm_configuration_id = 215\n# and crm_provider_id = 'oppo_ogESZf2P50nDrd1nGPvKDXeA6sSaTN5v51Lp4ayVzKR'\n;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1088 and sa.provider = 'hubspot';\n\nSELECT * FROM teams order by updated_at DESC\nSELECT * FROM crm_configurations WHERE id = 1019; # SimpleConsign 1088 - no social account\n\nselect * from crm_configurations where provider = 'pipedrive';\n\nselect * from teams where id = 957;\nselect * from crm_configurations where id = 957;\n\nSELECT * FROM teams WHERE name LIKE '%Prolific%'; # 544, 518, 10743\nSELECT * FROM opportunities where crm_configuration_id = 518 order by id desc;\n\nselect * from users where team_id = 1; # 26726 - Gabriela Dureva\nSELECT * FROM opportunities where user_id = 26726; # 16834447 - Prolific\nselect * from activities where user_id = 26726 order by id desc;\nselect * from contacts where crm_configuration_id = 1\nand email IN ('charlotte.ward@prolific.com', 'frankie.bryant@prolific.com'); # 2094416, 2093620\nSELECT * FROM contacts WHERE id = 6284931;\n\nSELECT p.* FROM activities a JOIN participants p ON a.id = p.activity_id\nWHERE a.user_id = 26726 and p.lead_id IN (2094416, 2093620) and a.created_at > '2026-01-01 00:00:00' order by p.email;\n\nselect * from activities where id IN (75509259,75509261,75509261,75511034,75026464,75517602,75517605);\nselect * from crm_configurations where id = 1;\n\n43801692-1aeb-32ce-acba-5b80a479701a\n44c3c9cf-6f5e-75f3-8179-bc9f75dd2b1b\n405975c0-b3d0-7aaa-821f-09d59cae6dd1\n4caf848d-4bed-2299-b248-7788d41f9fca\n49bedc3f-f196-eef3-89c3-dea6a3b4aa63\n43420989-a09d-b8f8-9806-c8bbf7a02aac\n\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1 and sa.provider = 'salesforce';\n\nSELECT * FROM activities WHERE id = 75461988;\n\nSELECT * FROM activities WHERE uuid_to_bin('d6c5052e-e972-49e9-8912-26f2f7d6c5f6') = uuid;\n\nselect * from contacts where id = 17900517;\n\nselect * from contact_roles cr join crm_configurations crm on cr.crm_configuration_id = crm.id\nwhere crm.provider != 'salesforce';\n\nselect * from users where id = 21047;\nSELECT * FROM crm_configurations WHERE id = 892;\nSELECT * FROM teams WHERE id = 942;\nselect * from opportunities where team_id = 942 order by updated_at desc;\nselect * from contacts where team_id = 942 order by updated_at desc;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 942 and sa.provider = 'hubspot';\n\nSELECT * FROM opportunities where team_id = 1 and crm_provider_id IN ('006Pq00000NeH6XIAV', '006Pq000007z8kdIAA'); # 10697889, 6621430\nSELECT * FROM crm_configurations WHERE id = 1;\nSELECT * FROM teams WHERE crm_id = 1;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1 and sa.provider = 'salesforce';\n\nselect id, user_id, opportunity_fields from crm_profiles where crm_configuration_id = 1\nSELECT * FROM opportunities where team_id = 1 order by updated_at desc; # 10697889, 6621430\n\nselect * from teams where id = 852;\nselect * from groups where id = 2286;\nselect * from sidekick_settings where team_id = 852;\nselect * from default_activity_types where team_id = 852;\n\n\nSELECT cc.provider, cc.id, p.id, u.*\nFROM users u\nLEFT JOIN crm_profiles p ON u.id = p.user_id AND p.id IS NULL -- no profile\nINNER JOIN teams t ON u.team_id = t.id AND t.status = 'active' -- team is active\nINNER JOIN crm_configurations cc ON t.crm_id = cc.id\nWHERE u.status = 1 AND u.deleted_at IS NULL\nAND u.crm_required = 1\nAND u.team_id = 1\nORDER BY u.team_id;\n\nSELECT * FROM crm_profiles cp where cp.crm_configuration_id = 1 and cp.user_id IN (\n18481\n );\n\nSELECT cc.provider, cc.id, p.id, u.*\nFROM users u\nLEFT JOIN crm_profiles p ON u.id = p.user_id\nINNER JOIN teams t ON u.team_id = t.id AND t.status = 'active'\nINNER JOIN crm_configurations cc ON t.crm_id = cc.id\nWHERE u.status = 1\n AND u.deleted_at IS NULL\n AND u.crm_required = 1\n# AND u.team_id = 1\n AND p.id IS NULL -- Move this condition to WHERE clause\nORDER BY u.team_id;\n\nSELECT * FROM opportunities WHERE id = 20002609;\nselect * from teams where id = 1122; # Velatir, 29953 - christian@velatir.com\nselect * from crm_configurations where id = 1060;\nselect * from crm_layouts where crm_configuration_id = 1060;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 3596;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1122 and sa.provider = 'hubspot';\nselect * from opportunities where team_id = 1122 order by updated_at desc;\n\nselect * from crm_field_data where object_type = 'contact';\n\nSELECT * FROM activities WHERE uuid_to_bin('374fc8ed-3315-4c9f-9b25-318b7fd2928f') = uuid; # 76584262\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 248 and sa.provider = 'salesforce';\n\nSELECT * FROM crm_profiles where user_id = 24115; # 005QF000002CswMYAS\nSELECT * FROM users where id = 24115;\nSELECT * FROM accounts where id = 4002896;\nSELECT * FROM teams WHERE name LIKE '%adswerve%';\nSELECT * FROM opportunities where crm_configuration_id = 230 AND crm_provider_id IN (\"0069N000003GIQ9QAO\",\"0061r000019yGP9AAM\",\"0066900001S2KWlAAN\",\"0066900001TDpj2AAD\",\"0066900001b8uEwAAI\",\"0069N000001rQi0QAE\",\"006QF00000KD40mYAD\",\"006QF00000LzpRJYAZ\",\"0069N000002uomtQAA\",\"0069N000002xlMLQAY\",\"0066900001NV6ubAAD\",\"0061r00001HJp45AAD\",\"006QF00000uTlUoYAK\",\"006QF00000v0bZqYAI\");\nSELECT * FROM opportunities WHERE crm_configuration_id = 230 AND crm_provider_id = '0069N000003GIQ9QAO'; # 6272203\n\nSELECT u.id, u.email, ac.name, a.* FROM activities a\nJOIN users u ON a.user_id = u.id\nJOIN accounts ac ON a.account_id = ac.id\nWHERE\nuuid_to_bin('e3269598-b562-44fb-b5e9-9d2694dc63e0') = a.uuid or\nuuid_to_bin('66ddc3ab-4e15-45aa-af0c-248c1eece593') = a.uuid or\nuuid_to_bin('826bd328-e1cc-4213-b8d8-572454cacc07') = a.uuid;\n\nselect * from users where id = 5825;\nSELECT * FROM activities WHERE uuid_to_bin('e56aa2e8-231a-421b-ab1f-cb38ed2bf573') = uuid;\n\nselect * from activities where uuid_to_bin('91e13b2f-2d1b-45f8-b1fd-1141b6563782') = uuid;\n19594, 862\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 862 and sa.provider = 'salesforce';\n\nselect * from automated_reports where id = 36;\nselect ar.frequency, r.*, ar.* from automated_report_results r\njoin automated_reports ar on r.report_id = ar.id\nwhere ar.frequency != 'one_off';\n\nselect s.* from activity_searches s join users u ON s.user_id = u.id where u.team_id = 882;\nselect * from nudges n where n.activity_search_id\n\nselect * from teams where created_at > '2026-03-09';\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 1065; # 1065\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 3617;\n\nselect * from users where team_id = 1 and name like '%Lukas%'; # 7160\n\nSELECT * FROM teams WHERE id = 575;\nselect * from opportunities where team_id = 575;\nSELECT * FROM teams WHERE name LIKE '%Integrum ESG%'; # 1126, 1065,\nselect * from opportunities where team_id = 1126;\nSELECT * FROM teams WHERE name LIKE '%Base%'; # 1125, 1063,\nselect * from opportunities where team_id = 1125;\nselect * from contacts c\nwhere c.team_id = 882;\n\nSELECT * FROM activities WHERE id = 76822967;\nSELECT * FROM crm_profiles WHERE user_id = 15440;\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 555;\nSELECT * FROM crm_configurations WHERE id = 555;\nSELECT * FROM users WHERE id = 15440; # team. 581, gr. 15440, pl. 3911, act. field 162182\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 581 and sa.provider = 'salesforce';\n\nSELECT * FROM automated_report_results order by id desc;\n\nselect * from features;\nselect * from team_features where feature_id = 40;\n\nselect * from teams where id = 556;\n\nselect * from automated_reports;\nwhere id = 54; # 4fdd41f6-dcf0-30d0-b339-7345381b6044 , [\"pdf\",\"podcast\"]\nSELECT * FROM automated_report_results WHERE uuid_to_bin('822fa41b-afd3-43a9-a248-86b0e36f3131') = uuid;\nselect * from automated_report_results order by id desc;\nSELECT * FROM automated_report_results WHERE id = 1919;\n\nselect * from automated_report_results WHERE report_id = 54;\n\nselect * from opportunities where id = 7594349;\n\nSELECT * FROM teams WHERE name LIKE '%Les%'; # 711, 692, 16067 - jiminnyintegration@lesmills.com\nselect * from playbooks where team_id = 711; # event 226147\nSELECT * FROM playbook_categories WHERE playbook_id = 5515;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 692 and object_type = 'event';\nSELECT * FROM crm_fields WHERE id = 226147;\nSELECT * FROM crm_field_values WHERE crm_field_id = 226147;\n\nSELECT * FROM crm_configurations WHERE id = 692;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 711 and sa.provider = 'salesforce';\n\nSELECT * FROM crm_profiles cp JOIN users u on u.id = cp.user_id WHERE u.team_id = 711;\n\nselect * from leads;\n\nselect * from calendars;\n\nSELECT\n t.id AS team_id,\n t.name,\n LOWER(SUBSTRING_INDEX(c.calendar_provider_id, '@', -1)) AS calendar_domain\nFROM teams t\nJOIN users u ON u.team_id = t.id\nJOIN calendars c ON c.user_id = u.id AND c.status = 'active' AND c.calendar_provider_id LIKE '%@%'\nLEFT JOIN team_domains td\n ON td.team_id = t.id\n AND td.deleted_at IS NULL\n AND td.domain = LOWER(SUBSTRING_INDEX(c.calendar_provider_id, '@', -1))\nGROUP BY t.id, t.name, calendar_domain\nORDER BY t.name, calendar_domain;\n\nselect * from users u join calendars c on c.user_id = u.id\nwhere u.team_id = 882;\n\n\nselect * from activities where id = 74049485; # team 563 crm 537\nselect * from activities where id = 73272382; # team 563 crm 537\nselect * from activities where id = 64400389; # team 563 crm 537\nselect * from activities where id = 58081273; # team 563 crm 537\nselect * from activities where id = 54520297; # team 563 crm 537\nselect * from participants where activity_id = 58081273;\n\nselect * from activities where crm_configuration_id = 537 and provider = 'aircall'\nand account_id = 19003658 order by updated_at desc;\n\nselect * from contacts where crm_configuration_id = 537 and id = 35957759;\nselect * from accounts where crm_configuration_id = 537 and id = 19003658;","depth":4,"value":"SELECT * FROM teams WHERE name LIKE '%litify%'; # 1069, 994, 24993\nSELECT * FROM users WHERE id = 25061;\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 994;\nSELECT * FROM crm_profiles WHERE user_id = 25061;\n\nselect * from crm_configurations where id = 834;\nSELECT * FROM teams WHERE id = 882;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 882 and sa.provider = 'hubspot';\n\nSELECT * FROM crm_configurations where id = 882; # 933 - GoGlobal\nSELECT * FROM opportunities WHERE team_id = 933 order by updated_at desc;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 933 and sa.provider = 'hubspot';\n\nSELECT * FROM crm_configurations WHERE provider = 'hubspot' and crm_provider_id = 7270388;\n\nSELECT * FROM contacts where crm_configuration_id = 834;\nSELECT * FROM opportunities WHERE team_id = 933\n# AND crm_provider_id IN ('20131586060','46017317898','52543911090','53451356564','54101251892','54323768459');\nAND id IN (8482561,18352941,19042734,19232139,19445140,19472541);\nSELECT * FROM opportunity_contacts\nWHERE opportunity_id IN (8482561,18352941,19042734,19232139,19445140,19472541);\n\n# ********************************************************************\nSELECT * FROM crm_configurations where id = 485; #\nSELECT * FROM opportunities WHERE team_id = 933 order by updated_at desc;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 933 and sa.provider = 'hubspot';\n\nselect crm.provider, l.* from leads l join crm_configurations crm on l.crm_configuration_id = crm.id\nwhere crm.provider NOT IN ('salesforce', 'integration-app', 'bullhorn', 'copper')\n# and l.converted_at IS NOT NULL\n;\n\n# ********************************************************************\nSELECT * FROM activities a WHERE type IN ('email-inbound', 'email-outbound')\nand opportunity_id IS NULL\norder by id desc;\n\nSELECT * FROM teams WHERE id = 604; # 598\nSELECT * FROM activities WHERE id = 74410828; # chelseaw@allvoices.co\nSELECT * FROM accounts WHERE id = 20068382;\nSELECT * FROM accounts WHERE id = 35186038;\n\nSELECT * FROM contacts WHERE team_id = 852 and updated_at > '2026-01-23 12:30:00' order by updated_at desc;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 559 and sa.provider = 'hubspot';\n\nSELECT * FROM activities WHERE uuid_to_bin('cb6342b6-a183-401c-b0af-ede92b2ae763') = uuid;\nselect * from sidekick_settings where team_id = 781;\n\nSELECT * FROM crm_configurations where provider = 'hubspot' and crm_provider_id = 26651871; # Teya\nSELECT * FROM crm_configurations where provider = 'hubspot' and crm_provider_id = 7562435;\nSELECT * FROM crm_configurations where provider = 'hubspot' and crm_provider_id = 8420347; # opflit 2100\n\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 711;\nSELECT * FROM activities where crm_configuration_id = 711 and crm_provider_id IS NULL\nand is_internal = 0 and status = 'completed'\norder by id desc;\n\nSELECT * FROM crm_layout_entities\nWHERE crm_layout_id IN (2352, 2353);\n;\n\nSELECT * FROM crm_configurations where provider = 'hubspot' and id = 530;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 556 and sa.provider = 'hubspot';\n\nSELECT * FROM activities WHERE uuid_to_bin('c6ca4b22-7738-4563-a95d-b8a9598924ae') = uuid;\nSELECT * FROM activities WHERE uuid_to_bin('442abb2b-28bd-4be8-9c25-19e9bf02766d') = uuid;\nselect * from contacts\nwhere crm_configuration_id = 530\nand crm_provider_id = 872252;\n\nselect * from activities where crm_configuration_id = 530\nand user_id = 14343 and type like '%softphone%'\nand created_at between '2026-01-28 15:00:00' and '2026-01-28 15:10:00';\n\nSELECT * FROM crm_configurations where provider = 'hubspot' and crm_provider_id = 25666868; # Teya\nSELECT * FROM crm_configurations where provider = 'hubspot' and crm_provider_id = 8646335; # Teya\nSELECT * FROM crm_configurations where provider = 'hubspot' and crm_provider_id IN (5933397);\n\n\nSELECT t.name, t.id, t.owner_id, c.id, c.provider, c.crm_base_url FROM teams t\nJOIN crm_configurations c ON t.id = c.team_id\nWHERE t.status = 'active';\n\nSELECT * FROM teams where id = 1091;\nSELECT * FROM crm_configurations where team_id = 1091;\nSELECT * FROM activity_providers where team_id = 1091;\nSELECT * FROM activities where crm_configuration_id = 1024 and type IN ('softphone', 'softphone-outbound')\nand provider NOT IN ('hubspot', 'aircall')\n# and telephony_provider_id = '019c1131-a22f-4792-b9ea-20adf6a02ed0'\norder by id desc;\n\n\nSELECT * FROM teams WHERE name LIKE '%Leadventure%';\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1091 and sa.provider = 'salesforce';\n\nSELECT * FROM teams WHERE name LIKE '%Wilson%'; # 862, 812\nSELECT * FROM teams where id = 862;\nSELECT * FROM crm_configurations where team_id = 862;\nSELECT * FROM activity_providers where team_id = 862;\nSELECT * FROM activities where crm_configuration_id = 812 and type IN ('softphone', 'softphone-outbound')\nand provider NOT IN ('hubspot', 'aircall')\n# and telephony_provider_id = '019c1131-a22f-4792-b9ea-20adf6a02ed0'\norder by id desc;\n\n\nSELECT t.id, crm.id, crm.provider, ap.* FROM teams t\njoin crm_configurations crm on t.id = crm.team_id\njoin activity_providers ap on t.id = ap.team_id\nwhere t.status = 'active' and ap.is_enabled = 1\nand crm.provider = 'hubspot'\nand ap.provider NOT IN ('hubspot', 'aircall', 'uploader', 'gong', 'twilio', 'zoom-bot', 'google-meet', 'ms-teams',\n 'outreach', 'close', 'ringcentral', 'dialpad', 'zoom-phone');\n\nSELECT * FROM teams where id = 1068;\nSELECT * FROM crm_configurations where team_id = 1068;\nSELECT * FROM activity_providers where team_id = 1068;\n\nSELECT * FROM activities a\nwhere crm_configuration_id = 993 and type IN ('softphone', 'softphone-outbound')\nand a.provider NOT IN ('hubspot', 'uploader', 'gong', 'twilio', 'google-meet', 'ms-teams','close'\n )\n# and telephony_provider_id = '019c1131-a22f-4792-b9ea-20adf6a02ed0'\norder by a.id desc;\n\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1068 and sa.provider = 'hubspot';\n\n# ********************************************************************\n# ********************************************************************\n# ********************************************************************\nSELECT * FROM crm_configurations where id = 882; # 933 - GoGlobal , portalId: 6017093\nSELECT * FROM opportunities WHERE team_id = 933 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 933 and updated_at > '2026-02-06 00:00:00' order by updated_at desc;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 933 and sa.provider = 'hubspot';\n\n# ********************************************************************\nSELECT * FROM crm_configurations where id = 834; # 882 - AnyVan , portalId: 5468262\nSELECT * FROM contacts WHERE crm_configuration_id = 834 and updated_at > '2026-03-30 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE crm_configuration_id = 834 and updated_at > '2026-03-04 08:00:00' order by updated_at desc;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 882 and sa.provider = 'hubspot';\nselect * from crm_layouts where crm_configuration_id = 834;\nselect * from crm_layout_entities where crm_layout_id = 2780;\nselect * from crm_fields where id IN (321153,321192,321193,321194);\n\nSELECT * FROM opportunities WHERE crm_configuration_id = 834 and id = 10993426;\n# ********************************************************************\nSELECT * FROM crm_configurations where id = 988; # 1057 - Teya (543ce4f4-168c-4571-91ea-5b35c253f06f) , portalId: 26651871\nSELECT * FROM opportunities WHERE team_id = 1057 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 1057 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1057 and sa.provider = 'hubspot';\n\nSELECT * FROM crm_configurations where id = 533; # 559 - Connectd , portalId: 6710988\nSELECT * FROM opportunities WHERE team_id = 559 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 559 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 801; # 852 - Rise Vision , portalId: 2700250\nSELECT * FROM opportunities WHERE team_id = 852 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 852 and updated_at > '2026-02-04 00:00:00' order by updated_at desc; # 6th last\n\nSELECT * FROM crm_configurations where id = 962; # 1034 - evergrowth.io , portalId: 143180990\nSELECT * FROM opportunities WHERE team_id = 1034 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 1034 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;\n\n# ********************************************************************\nSELECT * FROM crm_configurations where id = 1037; # 1102 - Jibble , portalId: 6649755\nSELECT * FROM opportunities WHERE team_id = 1102 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 1102 and updated_at > '2026-02-04 12:30:00' order by updated_at desc; # 8\n\nSELECT * FROM crm_configurations where id = 1015; # 1049 - Travefy , portalId: 48904401\nSELECT * FROM opportunities WHERE team_id = 1049 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 1049 and updated_at > '2026-02-04 12:30:00' order by updated_at desc; # 20\n\nSELECT * FROM crm_configurations where id = 64; # 70 - SalaryFinance , portalId: 3404115\nSELECT * FROM opportunities WHERE team_id = 70 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 70 and updated_at > '2026-02-04 12:30:00' order by updated_at desc; # 6th last\n\nSELECT * FROM crm_configurations where id = 802; # 853 - Street Group , portalId: 7658438\nSELECT * FROM opportunities WHERE team_id = 853 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 853 and updated_at > '2026-02-04 12:30:00' order by updated_at desc; # 10\n\nSELECT * FROM crm_configurations where id = 872; # 921 - In Professional Development , portalId: 9238273\nSELECT * FROM opportunities WHERE team_id = 921 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 921 and updated_at > '2026-02-04 12:30:00' order by updated_at desc; # 2\n\n# ********************************************************************\nSELECT * FROM crm_configurations where id = 550; # 576 - SeedLegals , portalId: 3028661\nSELECT * FROM opportunities WHERE team_id = 576 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 576 and updated_at > '2026-02-05 14:00:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 989; # 1058 - rtaoutdoor.com , portalId: 22371204\nSELECT * FROM opportunities WHERE team_id = 1058 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 1058 and updated_at > '2026-02-05 14:00:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 896; # 946 - Mintago , portalId: 6621281\nSELECT * FROM opportunities WHERE team_id = 946 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 946 and updated_at > '2026-02-05 14:00:00' order by updated_at desc;\n\nSELECT * FROM crm_configurations where id = 617; # 641 - PCS , portalId: 5244937\nSELECT * FROM opportunities WHERE team_id = 641 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 641 and updated_at > '2026-02-05 14:00:00' order by updated_at desc; # 7th\n# ********************************************************************\nSELECT * FROM crm_configurations where id = 649; # 670 - Eventeny , portalId: 4492849\nSELECT * FROM opportunities WHERE team_id = 670 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 670 and updated_at > '2026-02-09 08:00:00' order by updated_at desc; #\n\nSELECT * FROM crm_configurations where id = 48; # 51 - CleanCloud , portalId: 4373137\nSELECT * FROM opportunities WHERE team_id = 51 and updated_at > '2026-03-04 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 51 and updated_at > '2026-02-09 08:00:00' order by updated_at desc;\nselect * from users where team_id = 51; # 7783\nSELECT * FROM groups WHERE uuid_to_bin('8a8d2cb6-8b55-4fa3-8b5c-5f0e3d8de59a') = uuid; # 1130\nselect * from activity_searches where user_id = 7783;\nselect * from activity_search_filters where activity_search_id IN (32291, 32292);\n\nSELECT asf.activity_search_id, asf.id, asf.value\nFROM activity_search_filters asf\nWHERE asf.filter = 'group_id'\nAND asf.value IN (\n SELECT CONCAT(\n HEX(SUBSTR(uuid, 5, 4)), '-',\n HEX(SUBSTR(uuid, 3, 2)), '-',\n HEX(SUBSTR(uuid, 1, 2)), '-',\n HEX(SUBSTR(uuid, 9, 2)), '-',\n HEX(SUBSTR(uuid, 11))\n )\n FROM groups\n WHERE deleted_at IS NOT NULL\n);\n\nSELECT * FROM crm_configurations where id = 272; # 290 - Bonham & Brook , portalId: 5705856\nSELECT * FROM opportunities WHERE team_id = 290 and updated_at > '2026-02-05 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 290 and updated_at > '2026-02-09 08:00:00' order by updated_at desc; # 6th\n# ********************************************************************\nSELECT * FROM crm_configurations where provider = 'hubspot';\nSELECT * FROM crm_configurations where id = 1056; # 1119 - Chromatic , portalId: 45602133\nSELECT * FROM opportunities WHERE team_id = 1119 and remotely_created_at > '2026-02-01 00:00:00' order by updated_at desc;\nSELECT * FROM opportunities WHERE team_id = 1119 and updated_at > '2026-02-09 09:00:00' order by updated_at desc; # null\n# ********************************************************************\n\nselect * from contacts where crm_provider_id = '003Uu00000ojD4NIAU';\nselect\n cp.*\n# DISTINCT t.id\n# cp.id, cp.user_id, t.id, cp.crm_configuration_id, cp.contact_fields\nFROM crm_profiles cp\nJOIN crm_configurations crm on crm.id = cp.crm_configuration_id\nJOIN users u on u.id = cp.user_id\nJOIN teams t ON t.id = crm.team_id\nWHERE crm.provider = 'salesforce' and t.status = 'active'\n and cp.archived_at IS NULL and u.deleted_at IS NULL\n and t.id NOT IN (1093)\n and t.id = 2\n and cp.contact_fields IS NULL;\n# and c.crm_provider_id = '003Uu00000ojD4NIAU';\n\nSELECT * FROM users WHERE id = 26484;\nSELECT * FROM crm_profiles WHERE user_id = 26484;\nSELECT * FROM social_accounts WHERE sociable_id = 26484;\nSELECT * FROM crm_configurations where provider = 'salesforce';\nselect * from users where id IN (10022, 10403);\nselect * from users where team_id IN (526);\nselect * from teams where id IN (526, 532);\nselect * from crm_configurations where id IN (500, 516);\nselect * from crm_profiles where crm_configuration_id IN (500, 516) and user_id IN (10022, 10403);\nselect * from contacts where crm_configuration_id IN (500, 516) and crm_provider_id = '003Uu00000ojD4NIAU';\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 526 and sa.provider = 'salesforce';\nselect * from team_settings where team_id IN (526, 532);\n\nselect * from users where id IN (22824);\nselect * from crm_profiles where crm_configuration_id IN (1026);\n\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1093 and sa.provider = 'salesforce';\n\nselect * from teams where id = 1099;\nselect * from users where id = 29643\n\nselect * from activity_processing_states;\n\nSELECT * FROM teams where name LIKE '%Fare%'; # 233\nSELECT * FROM opportunities where crm_configuration_id = 215\n# and crm_provider_id = 'oppo_ogESZf2P50nDrd1nGPvKDXeA6sSaTN5v51Lp4ayVzKR'\n;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1088 and sa.provider = 'hubspot';\n\nSELECT * FROM teams order by updated_at DESC\nSELECT * FROM crm_configurations WHERE id = 1019; # SimpleConsign 1088 - no social account\n\nselect * from crm_configurations where provider = 'pipedrive';\n\nselect * from teams where id = 957;\nselect * from crm_configurations where id = 957;\n\nSELECT * FROM teams WHERE name LIKE '%Prolific%'; # 544, 518, 10743\nSELECT * FROM opportunities where crm_configuration_id = 518 order by id desc;\n\nselect * from users where team_id = 1; # 26726 - Gabriela Dureva\nSELECT * FROM opportunities where user_id = 26726; # 16834447 - Prolific\nselect * from activities where user_id = 26726 order by id desc;\nselect * from contacts where crm_configuration_id = 1\nand email IN ('charlotte.ward@prolific.com', 'frankie.bryant@prolific.com'); # 2094416, 2093620\nSELECT * FROM contacts WHERE id = 6284931;\n\nSELECT p.* FROM activities a JOIN participants p ON a.id = p.activity_id\nWHERE a.user_id = 26726 and p.lead_id IN (2094416, 2093620) and a.created_at > '2026-01-01 00:00:00' order by p.email;\n\nselect * from activities where id IN (75509259,75509261,75509261,75511034,75026464,75517602,75517605);\nselect * from crm_configurations where id = 1;\n\n43801692-1aeb-32ce-acba-5b80a479701a\n44c3c9cf-6f5e-75f3-8179-bc9f75dd2b1b\n405975c0-b3d0-7aaa-821f-09d59cae6dd1\n4caf848d-4bed-2299-b248-7788d41f9fca\n49bedc3f-f196-eef3-89c3-dea6a3b4aa63\n43420989-a09d-b8f8-9806-c8bbf7a02aac\n\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1 and sa.provider = 'salesforce';\n\nSELECT * FROM activities WHERE id = 75461988;\n\nSELECT * FROM activities WHERE uuid_to_bin('d6c5052e-e972-49e9-8912-26f2f7d6c5f6') = uuid;\n\nselect * from contacts where id = 17900517;\n\nselect * from contact_roles cr join crm_configurations crm on cr.crm_configuration_id = crm.id\nwhere crm.provider != 'salesforce';\n\nselect * from users where id = 21047;\nSELECT * FROM crm_configurations WHERE id = 892;\nSELECT * FROM teams WHERE id = 942;\nselect * from opportunities where team_id = 942 order by updated_at desc;\nselect * from contacts where team_id = 942 order by updated_at desc;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 942 and sa.provider = 'hubspot';\n\nSELECT * FROM opportunities where team_id = 1 and crm_provider_id IN ('006Pq00000NeH6XIAV', '006Pq000007z8kdIAA'); # 10697889, 6621430\nSELECT * FROM crm_configurations WHERE id = 1;\nSELECT * FROM teams WHERE crm_id = 1;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1 and sa.provider = 'salesforce';\n\nselect id, user_id, opportunity_fields from crm_profiles where crm_configuration_id = 1\nSELECT * FROM opportunities where team_id = 1 order by updated_at desc; # 10697889, 6621430\n\nselect * from teams where id = 852;\nselect * from groups where id = 2286;\nselect * from sidekick_settings where team_id = 852;\nselect * from default_activity_types where team_id = 852;\n\n\nSELECT cc.provider, cc.id, p.id, u.*\nFROM users u\nLEFT JOIN crm_profiles p ON u.id = p.user_id AND p.id IS NULL -- no profile\nINNER JOIN teams t ON u.team_id = t.id AND t.status = 'active' -- team is active\nINNER JOIN crm_configurations cc ON t.crm_id = cc.id\nWHERE u.status = 1 AND u.deleted_at IS NULL\nAND u.crm_required = 1\nAND u.team_id = 1\nORDER BY u.team_id;\n\nSELECT * FROM crm_profiles cp where cp.crm_configuration_id = 1 and cp.user_id IN (\n18481\n );\n\nSELECT cc.provider, cc.id, p.id, u.*\nFROM users u\nLEFT JOIN crm_profiles p ON u.id = p.user_id\nINNER JOIN teams t ON u.team_id = t.id AND t.status = 'active'\nINNER JOIN crm_configurations cc ON t.crm_id = cc.id\nWHERE u.status = 1\n AND u.deleted_at IS NULL\n AND u.crm_required = 1\n# AND u.team_id = 1\n AND p.id IS NULL -- Move this condition to WHERE clause\nORDER BY u.team_id;\n\nSELECT * FROM opportunities WHERE id = 20002609;\nselect * from teams where id = 1122; # Velatir, 29953 - christian@velatir.com\nselect * from crm_configurations where id = 1060;\nselect * from crm_layouts where crm_configuration_id = 1060;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 3596;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1122 and sa.provider = 'hubspot';\nselect * from opportunities where team_id = 1122 order by updated_at desc;\n\nselect * from crm_field_data where object_type = 'contact';\n\nSELECT * FROM activities WHERE uuid_to_bin('374fc8ed-3315-4c9f-9b25-318b7fd2928f') = uuid; # 76584262\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 248 and sa.provider = 'salesforce';\n\nSELECT * FROM crm_profiles where user_id = 24115; # 005QF000002CswMYAS\nSELECT * FROM users where id = 24115;\nSELECT * FROM accounts where id = 4002896;\nSELECT * FROM teams WHERE name LIKE '%adswerve%';\nSELECT * FROM opportunities where crm_configuration_id = 230 AND crm_provider_id IN (\"0069N000003GIQ9QAO\",\"0061r000019yGP9AAM\",\"0066900001S2KWlAAN\",\"0066900001TDpj2AAD\",\"0066900001b8uEwAAI\",\"0069N000001rQi0QAE\",\"006QF00000KD40mYAD\",\"006QF00000LzpRJYAZ\",\"0069N000002uomtQAA\",\"0069N000002xlMLQAY\",\"0066900001NV6ubAAD\",\"0061r00001HJp45AAD\",\"006QF00000uTlUoYAK\",\"006QF00000v0bZqYAI\");\nSELECT * FROM opportunities WHERE crm_configuration_id = 230 AND crm_provider_id = '0069N000003GIQ9QAO'; # 6272203\n\nSELECT u.id, u.email, ac.name, a.* FROM activities a\nJOIN users u ON a.user_id = u.id\nJOIN accounts ac ON a.account_id = ac.id\nWHERE\nuuid_to_bin('e3269598-b562-44fb-b5e9-9d2694dc63e0') = a.uuid or\nuuid_to_bin('66ddc3ab-4e15-45aa-af0c-248c1eece593') = a.uuid or\nuuid_to_bin('826bd328-e1cc-4213-b8d8-572454cacc07') = a.uuid;\n\nselect * from users where id = 5825;\nSELECT * FROM activities WHERE uuid_to_bin('e56aa2e8-231a-421b-ab1f-cb38ed2bf573') = uuid;\n\nselect * from activities where uuid_to_bin('91e13b2f-2d1b-45f8-b1fd-1141b6563782') = uuid;\n19594, 862\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 862 and sa.provider = 'salesforce';\n\nselect * from automated_reports where id = 36;\nselect ar.frequency, r.*, ar.* from automated_report_results r\njoin automated_reports ar on r.report_id = ar.id\nwhere ar.frequency != 'one_off';\n\nselect s.* from activity_searches s join users u ON s.user_id = u.id where u.team_id = 882;\nselect * from nudges n where n.activity_search_id\n\nselect * from teams where created_at > '2026-03-09';\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 1065; # 1065\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 3617;\n\nselect * from users where team_id = 1 and name like '%Lukas%'; # 7160\n\nSELECT * FROM teams WHERE id = 575;\nselect * from opportunities where team_id = 575;\nSELECT * FROM teams WHERE name LIKE '%Integrum ESG%'; # 1126, 1065,\nselect * from opportunities where team_id = 1126;\nSELECT * FROM teams WHERE name LIKE '%Base%'; # 1125, 1063,\nselect * from opportunities where team_id = 1125;\nselect * from contacts c\nwhere c.team_id = 882;\n\nSELECT * FROM activities WHERE id = 76822967;\nSELECT * FROM crm_profiles WHERE user_id = 15440;\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 555;\nSELECT * FROM crm_configurations WHERE id = 555;\nSELECT * FROM users WHERE id = 15440; # team. 581, gr. 15440, pl. 3911, act. field 162182\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 581 and sa.provider = 'salesforce';\n\nSELECT * FROM automated_report_results order by id desc;\n\nselect * from features;\nselect * from team_features where feature_id = 40;\n\nselect * from teams where id = 556;\n\nselect * from automated_reports;\nwhere id = 54; # 4fdd41f6-dcf0-30d0-b339-7345381b6044 , [\"pdf\",\"podcast\"]\nSELECT * FROM automated_report_results WHERE uuid_to_bin('822fa41b-afd3-43a9-a248-86b0e36f3131') = uuid;\nselect * from automated_report_results order by id desc;\nSELECT * FROM automated_report_results WHERE id = 1919;\n\nselect * from automated_report_results WHERE report_id = 54;\n\nselect * from opportunities where id = 7594349;\n\nSELECT * FROM teams WHERE name LIKE '%Les%'; # 711, 692, 16067 - jiminnyintegration@lesmills.com\nselect * from playbooks where team_id = 711; # event 226147\nSELECT * FROM playbook_categories WHERE playbook_id = 5515;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 692 and object_type = 'event';\nSELECT * FROM crm_fields WHERE id = 226147;\nSELECT * FROM crm_field_values WHERE crm_field_id = 226147;\n\nSELECT * FROM crm_configurations WHERE id = 692;\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 711 and sa.provider = 'salesforce';\n\nSELECT * FROM crm_profiles cp JOIN users u on u.id = cp.user_id WHERE u.team_id = 711;\n\nselect * from leads;\n\nselect * from calendars;\n\nSELECT\n t.id AS team_id,\n t.name,\n LOWER(SUBSTRING_INDEX(c.calendar_provider_id, '@', -1)) AS calendar_domain\nFROM teams t\nJOIN users u ON u.team_id = t.id\nJOIN calendars c ON c.user_id = u.id AND c.status = 'active' AND c.calendar_provider_id LIKE '%@%'\nLEFT JOIN team_domains td\n ON td.team_id = t.id\n AND td.deleted_at IS NULL\n AND td.domain = LOWER(SUBSTRING_INDEX(c.calendar_provider_id, '@', -1))\nGROUP BY t.id, t.name, calendar_domain\nORDER BY t.name, calendar_domain;\n\nselect * from users u join calendars c on c.user_id = u.id\nwhere u.team_id = 882;\n\n\nselect * from activities where id = 74049485; # team 563 crm 537\nselect * from activities where id = 73272382; # team 563 crm 537\nselect * from activities where id = 64400389; # team 563 crm 537\nselect * from activities where id = 58081273; # team 563 crm 537\nselect * from activities where id = 54520297; # team 563 crm 537\nselect * from participants where activity_id = 58081273;\n\nselect * from activities where crm_configuration_id = 537 and provider = 'aircall'\nand account_id = 19003658 order by updated_at desc;\n\nselect * from contacts where crm_configuration_id = 537 and id = 35957759;\nselect * from accounts where crm_configuration_id = 537 and id = 19003658;","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.24401596,"top":0.047885075,"width":0.024268618,"height":0.024740623},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-2089777087490572776
|
1137771417839220293
|
visual_change
|
accessibility
|
NULL
|
Pushed 1 commit to origin/JY-20372-ai-reports-prom Pushed 1 commit to origin/JY-20372-ai-reports-promotion-pages
text/html
text/html
text/html
View pull request
2 files committed
JY-20372 add planhat endpoint
text/html
text/html
text/html
Edit Commit Message…
Project: faVsco.js, menu
#11998 on JY-20372-ai-reports-promotion-pages, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Show Replace Field
Search History
map
New Line
Match Case
Words
Regex
Replace History
Replace
New Line
Preserve case
3/3
Previous Occurrence
Next Occurrence
Filter Search Results
Open in Window, Multiple Cursors
Click to highlight
Close
Code changed:
Hide
Sync Changes
Hide This Notification
6
29
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Repositories\Crm;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use Jiminny\Models\Account;
use Jiminny\Models\Contact;
use Jiminny\Models\Crm\BusinessProcess;
use Jiminny\Models\Crm\Configuration;
use Jiminny\Models\Crm\Profile;
use Jiminny\Models\Crm\RecordType;
use Jiminny\Models\Lead;
use Jiminny\Models\Opportunity;
use Jiminny\Models\Stage;
class CrmEntityRepository
{
public function getExternalContactMap(Configuration $configuration): array
{
$configurationId = $configuration->getId();
$contacts = [];
$m1 = memory_get_usage();
Log::info(
'ExternalContactMap before',
[
'current' => $m1,
'peak' => memory_get_peak_usage(),
'config_id' => $configurationId,
]
);
$results = DB::select(
'select id, crm_provider_id from contacts where crm_configuration_id = :id and deleted_at is null',
['id' => $configurationId]
);
$m2 = memory_get_usage();
Log::info(
'ExternalContactMap after',
[
'used' => $m2 - $m1,
'current' => $m2,
'peak' => memory_get_peak_usage(),
'config_id' => $configurationId,
]
);
foreach ($results as $contact) {
$contacts[$contact->crm_provider_id] = $contact->id;
}
$m3 = memory_get_usage();
Log::info(
'ExternalContactMap final',
[
'used' => max($m2, $m3) - $m1,
'current' => $m3,
'peak' => memory_get_peak_usage(),
'config_id' => $configurationId,
]
);
return $contacts;
}
public function getExternalAccountMap(Configuration $configuration): array
{
$accounts = [];
$m1 = memory_get_usage();
$configurationId = $configuration->getId();
Log::info(
'ExternalAccountMap before',
[
'current' => $m1,
'peak' => memory_get_peak_usage(),
'config_id' => $configurationId,
]
);
// direct array result uses the least memory
$items = DB::select(
'select id, crm_provider_id from accounts where crm_configuration_id = :id and deleted_at is null',
['id' => $configurationId]
);
$m2 = memory_get_usage();
Log::info(
'ExternalAccountMap after',
[
'used' => $m2 - $m1,
'current' => $m2,
'peak' => memory_get_peak_usage(),
'config_id' => $configurationId,
]
);
foreach ($items as $item) {
$accounts[$item->crm_provider_id] = $item->id;
}
$m3 = memory_get_usage();
Log::info(
'ExternalAccountMap final',
[
'used' => max($m2, $m3) - $m1,
'current' => $m3,
'peak' => memory_get_peak_usage(),
'config_id' => $configurationId,
]
);
return $accounts;
}
// currently used only in tests, but keep in mind the memory usage could be high with mapWithKeys
public function getInternalAccountToContactMap(Configuration $configuration): array
{
$m1 = memory_get_usage();
$configurationId = $configuration->getId();
Log::info(
'InternalAccountToContactMap before',
[
'current' => $m1,
'config_id' => $configurationId,
]
);
$data = $configuration->accounts()
->whereHas('contacts')
->with('contacts')
->where('is_internal', 1)
->get()
->mapWithKeys(static function (Account $account) {
// Internal accounts must have only 1 contact
return [
$account->getCrmProviderId() => $account->contacts->first()->getCrmProviderId(),
];
})
->toArray();
$m2 = memory_get_usage();
Log::info(
'InternalAccountToContactMap after',
[
'used' => $m2 - $m1,
'current' => $m2,
'peak' => memory_get_peak_usage(),
'config_id' => $configurationId,
]
);
return $data;
}
public function getExternalStageMap(Configuration $configuration, ?string $type = null): array
{
return $configuration->stages()
->when($type, static fn ($query) => $query->where('type', $type))
->get()
->mapWithKeys(static function (Stage $stage) {
return [
$stage->getAttribute('name') => $stage->getAttribute('id'),
$stage->getAttribute('crm_provider_id') => $stage->getAttribute('id'),
];
})
->toArray();
}
public function getStageForName(Configuration $configuration, string $name, ?string $type = null): ?Stage
{
return $configuration->stages()
->when($type, static fn ($query) => $query->where('type', $type))
->where('name', $name)
->first();
}
public function getPipelineStageByConditions(BusinessProcess $businessProcess, array $conditions): ?Stage
{
return $businessProcess->stages()
->where($conditions)
->first();
}
public function getBusinessProcessRecordType(BusinessProcess $businessProcess): ?RecordType
{
return $businessProcess->recordTypes()->first();
}
public function getOpportunityClosedStages(Configuration $configuration): Collection
{
return $configuration->stages()
->where('type', Stage::TYPE_OPPORTUNITY)
->whereIn('probability', [0.00, 100.00])
->get();
}
public function importAccount(Configuration $configuration, array $accountData): Account
{
$account = $configuration->accounts()
->withTrashed()
->updateOrCreate(
[
'crm_configuration_id' => $configuration->getId(),
'team_id' => $configuration->getTeamId(),
'crm_provider_id' => $accountData['crm_provider_id'],
],
$accountData
);
if ($account->trashed()) {
Log::info('Restore deleted account', [
'id' => $account->getId(),
'crm_provider_id' => $account->getCrmProviderId(),
]);
$account->restore();
}
return $account;
}
public function importContact(Configuration $configuration, array $contactData): Contact
{
$contact = $configuration->contacts()
->withTrashed()
->updateOrCreate(
[
'crm_configuration_id' => $configuration->getId(),
'team_id' => $configuration->getTeamId(),
'crm_provider_id' => $contactData['crm_provider_id'],
],
$contactData
);
if ($contact->trashed()) {
Log::info('Restore deleted contact', [
'id' => $contact->getId(),
'crm_provider_id' => $contact->getCrmProviderId(),
]);
$contact->restore();
}
return $contact;
}
public function importLead(Configuration $configuration, array $leadData): Lead
{
$lead = $configuration->leads()
->withTrashed()
->updateOrCreate(
[
'crm_configuration_id' => $configuration->getId(),
'team_id' => $configuration->getTeamId(),
'crm_provider_id' => $leadData['crm_provider_id'],
],
$leadData
);
if ($lead->trashed()) {
Log::info('Restore deleted lead', [
'id' => $lead->getId(),
'crm_provider_id' => $lead->getCrmProviderId(),
]);
$lead->restore();
}
return $lead;
}
public function importOpportunity(
Configuration $configuration,
array $opportunityData,
bool $matchFromOtherCrm = false,
?string $matchName = null,
): Opportunity {
if ($matchFromOtherCrm) {
// Try find and match opportunity from other CRM configuration
// Update and attach it to the new CRM
// This case will work if a team is transitioning from one CRM provider to another, and we want to
// cross-reference deals.
$opportunityData['crm_configuration_id'] = $configuration->getId();
$opportunity = $configuration->getTeam()->opportunities()
->withTrashed()
->updateOrCreate(
[
'team_id' => $configuration->getTeamId(),
'user_id' => $opportunityData['user_id'],
'name' => $matchName,
],
$opportunityData
);
if ($opportunity->trashed()) {
$opportunity->restore();
}
return $opportunity;
}
$opportunity = $configuration->opportunities()
->withTrashed()
->updateOrCreate(
[
'crm_configuration_id' => $configuration->getId(),
'team_id' => $configuration->getTeamId(),
'crm_provider_id' => $opportunityData['crm_provider_id'],
],
$opportunityData
);
if ($opportunity->trashed()) {
Log::info('Restore deleted opportunity', [
'id' => $opportunity->getId(),
'crm_provider_id' => $opportunity->getCrmProviderId(),
]);
$opportunity->restore();
}
return $opportunity;
}
public function upsertOpportunity(array $attributes, array $data): Opportunity
{
/** @var ?Opportunity $opportunity */
$opportunity = Opportunity::withTrashed()->where($attributes)->first();
if ($opportunity === null) {
$opportunity = Opportunity::create($data);
} else {
$opportunity->update($data);
}
return $opportunity;
}
public function importStage(Configuration $configuration, string $objectType, array $stageData): Stage
{
return $configuration->stages()
->updateOrCreate(
[
'crm_configuration_id' => $configuration->getId(),
'team_id' => $configuration->getTeamId(),
'crm_provider_id' => $stageData['crm_provider_id'],
'type' => $objectType,
],
$stageData
);
}
public function importBusinessProcess(Configuration $configuration, array $pipelineData): BusinessProcess
{
return $configuration->businessProcesses()
->updateOrCreate(
[
'crm_configuration_id' => $configuration->getId(),
'team_id' => $configuration->getTeamId(),
'crm_provider_id' => $pipelineData['crm_provider_id'],
'type' => $pipelineData['object_type'],
],
$pipelineData
);
}
public function findAccountByExternalId(Configuration $configuration, string $crmProviderId): ?Account
{
return $configuration->accounts()
->where('crm_provider_id', $crmProviderId)
->first();
}
/**
* Find multiple accounts by their external CRM IDs
*
* @param Configuration $configuration
* @param array<string> $crmProviderIds
*
* @return Collection<Account>
*/
public function findAccountsByExternalIds(Configuration $configuration, array $crmProviderIds): Collection
{
if (empty($crmProviderIds)) {
return collect();
}
return $configuration->accounts()
->whereIn('crm_provider_id', $crmProviderIds)
->get();
}
public function findContactByExternalId(Configuration $configuration, string $crmProviderId): ?Contact
{
return $configuration->contacts()
->where('crm_provider_id', $crmProviderId)
->first();
}
/**
* Find multiple contacts by their external CRM IDs
*
* @param Configuration $configuration
* @param array<string> $crmProviderIds
*
* @return Collection<Contact>
*/
public function findContactsByExternalIds(Configuration $configuration, array $crmProviderIds): Collection
{
if (empty($crmProviderIds)) {
return collect();
}
return $configuration->contacts()
->whereIn('crm_provider_id', $crmProviderIds)
->get();
}
public function findLeadByExternalId(Configuration $configuration, string $crmProviderId): ?Lead
{
return $configuration->leads()
->where('crm_provider_id', $crmProviderId)
->first();
}
public function findOpportunityByExternalId(Configuration $configuration, string $crmProviderId): ?Opportunity
{
return $configuration->opportunities()
->where('crm_provider_id', $crmProviderId)
->first();
}
/**
* Find multiple opportunities by their external CRM IDs
*
* @param Configuration $configuration
* @param array<string> $crmProviderIds
*
* @return Collection<Opportunity>
*/
public function findOpportunitiesByExternalIds(Configuration $configuration, array $crmProviderIds): Collection
{
if (empty($crmProviderIds)) {
return collect();
}
return $configuration->opportunities()
->whereIn('crm_provider_id', $crmProviderIds)
->get();
}
/**
* @param array<string> $crmProviderIds
*
* @return array<string>
*/
public function getExistingLeadCrmIds(Configuration $configuration, array $crmProviderIds): array
{
if (empty($crmProviderIds)) {
return [];
}
return $configuration->leads()
->whereIn('crm_provider_id', $crmProviderIds)
->pluck('crm_provider_id')
->toArray();
}
/**
* @param array<string> $crmProviderIds
*
* @return array<string>
*/
public function getExistingAccountCrmIds(Configuration $configuration, array $crmProviderIds): array
{
if (empty($crmProviderIds)) {
return [];
}
return $configuration->accounts()
->whereIn('crm_provider_id', $crmProviderIds)
->pluck('crm_provider_id')
->toArray();
}
/**
* @param array<string> $crmProviderIds
*
* @return array<string>
*/
public function getExistingContactCrmIds(Configuration $configuration, array $crmProviderIds): array
{
if (empty($crmProviderIds)) {
return [];
}
return $configuration->contacts()
->whereIn('crm_provider_id', $crmProviderIds)
->pluck('crm_provider_id')
->toArray();
}
/**
* @param array<string> $crmProviderIds
*
* @return array<string>
*/
public function getExistingOpportunityCrmIds(Configuration $configuration, array $crmProviderIds): array
{
if (empty($crmProviderIds)) {
return [];
}
return $configuration->opportunities()
->whereIn('crm_provider_id', $crmProviderIds)
->pluck('crm_provider_id')
->toArray();
}
public function findProfileByExternalId(Configuration $configuration, string $crmProviderId): ?Profile
{
return $configuration->profiles()
->where('crm_provider_id', $crmProviderId)
->first();
}
public function findBusinessProcessesByExternalId(
Configuration $configuration,
string $crmProviderId
): ?BusinessProcess {
return $configuration->businessProcesses()
->where('crm_provider_id', $crmProviderId)
->first();
}
/**
* @return Collection<Account>
*/
public function findAccountsByExternalOwnerId(Configuration $configuration, string $crmOwnerId): Collection
{
return $configuration->accounts()
->where('owner_id', $crmOwnerId)
->whereNull('user_id')
->get();
}
/**
* @return Collection<Contact>
*/
public function findContactsByExternalOwnerId(Configuration $configuration, string $crmOwnerId): Collection
{
return $configuration->contacts()
->where('owner_id', $crmOwnerId)
->whereNull('user_id')
->get();
}
/**
* @return Collection<Lead>
*/
public function findLeadsByExternalOwnerId(Configuration $configuration, string $crmOwnerId): Collection
{
return $configuration->leads()
->where('owner_id', $crmOwnerId)
->whereNull('user_id')
->get();
}
/**
* @return Collection<Opportunity>
*/
public function findOpportunitiesByExternalOwnerId(Configuration $configuration, string $crmOwnerId): Collection
{
return $configuration->opportunities()
->where('owner_id', $crmOwnerId)
->whereNull('user_id')
->get();
}
public function searchLeadsByString(
Configuration $configuration,
string $query,
?int $limit = null,
?int $offset = null,
bool $orderByName = false,
bool $usePhoneSearch = false
): Collection {
$queryBuilder = $configuration->leads()
->with('stages')
->where('converted_at', null)
->whereNested(function ($qb) use ($query, $usePhoneSearch) {
$qb->where('crm_provider_id', $query);
if ($usePhoneSearch) {
$qb->orWhere('phone', 'LIKE', "%{$query}%")
->orWhere('mobile_phone', 'LIKE', "%{$query}%");
} else {
$qb->orWhere('name', 'LIKE', "%{$query}%")
->orWhere('company', 'LIKE', "%{$query}%");
}
});
if ($orderByName) {
$queryBuilder->orderBy('name');
}
if ($limit !== null) {
$queryBuilder->limit($limit);
}
if ($offset !== null) {
$queryBuilder->offset($offset);
}
return $queryBuilder->get();
}
public function searchAccountsByString(
Configuration $configuration,
string $query,
?int $limit = null,
?int $offset = null,
bool $orderByName = false,
bool $usePhoneSearch = false
): Collection {
$queryBuilder = $configuration->accounts()
->where('is_internal', 0)
->where(function ($qb) use ($query, $usePhoneSearch) {
$qb->where('crm_provider_id', $query);
if ($usePhoneSearch) {
$qb->orWhere('phone', 'LIKE', "%{$query}%");
} else {
$qb->orWhere('name', 'LIKE', "%{$query}%");
}
});
if ($orderByName) {
$queryBuilder->orderBy('name');
}
if ($limit !== null) {
$queryBuilder->limit($limit);
}
if ($offset !== null) {
$queryBuilder->offset($offset);
}
return $queryBuilder->get();
}
public function searchContactsByString(
Configuration $configuration,
string $query,
?int $limit = null,
?int $offset = null,
bool $orderByName = false,
bool $usePhoneSearch = false
): Collection {
$queryBuilder = $configuration->contacts()
->with('account')
->where(function ($qb) use ($query, $usePhoneSearch) {
$qb->where('crm_provider_id', $query);
if ($usePhoneSearch) {
$qb->orWhere('phone', 'LIKE', "%{$query}%")
->orWhere('mobile_phone', 'LIKE', "%{$query}%");
} else {
$qb->orWhere('name', 'LIKE', "%{$query}%")
->orWhere('email', 'LIKE', "%{$query}%")
->orWhere('phone', 'LIKE', "%{$query}%")
->orWhere('mobile_phone', 'LIKE', "%{$query}%");
}
});
if ($orderByName) {
$queryBuilder->orderBy('name');
}
if ($limit !== null) {
$queryBuilder->limit($limit);
}
if ($offset !== null) {
$queryBuilder->offset($offset);
}
return $queryBuilder->get();
}
/**
* Find a contact by id only if it belongs to the team
*/
public function findContactByConfigurationAndId(Configuration $configuration, int $contactId): ?Contact
{
return $configuration->contacts()
->where('id', $contactId)
->first();
}
/**
* Find a lead by id only if it belongs to the team
*/
public function findLeadByConfigurationAndId(Configuration $configuration, int $leadId): ?Lead
{
return $configuration->leads()
->where('id', $leadId)
->first();
}
/**
* Find an account by id only if it belongs to the team
*/
public function findAccountByConfigurationAndId(Configuration $configuration, int $accountId): ?Account
{
return $configuration->accounts()
->where('id', $accountId)
->first();
}
/**
* Find an opportunity by id only if it belongs to the team
*/
public function findOpportunityByConfigurationAndId(Configuration $configuration, int $opportunityId): ?Opportunity
{
return $configuration->opportunities()
->where('id', $opportunityId)
->first();
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
35
1
33
63
Previous Highlighted Error
Next Highlighted Error
SELECT * FROM teams WHERE name LIKE '%litify%'; # 1069, 994, 24993
SELECT * FROM users WHERE id = 25061;
SELECT * FROM crm_profiles WHERE crm_configuration_id = 994;
SELECT * FROM crm_profiles WHERE user_id = 25061;
select * from crm_configurations where id = 834;
SELECT * FROM teams WHERE id = 882;
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 882 and sa.provider = 'hubspot';
SELECT * FROM crm_configurations where id = 882; # 933 - GoGlobal
SELECT * FROM opportunities WHERE team_id = 933 order by updated_at desc;
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 933 and sa.provider = 'hubspot';
SELECT * FROM crm_configurations WHERE provider = 'hubspot' and crm_provider_id = 7270388;
SELECT * FROM contacts where crm_configuration_id = 834;
SELECT * FROM opportunities WHERE team_id = 933
# AND crm_provider_id IN ('20131586060','46017317898','52543911090','53451356564','54101251892','54323768459');
AND id IN (8482561,18352941,19042734,19232139,19445140,19472541);
SELECT * FROM opportunity_contacts
WHERE opportunity_id IN (8482561,18352941,19042734,19232139,19445140,19472541);
# [PASSWORD_DOTS]
SELECT * FROM crm_configurations where id = 485; #
SELECT * FROM opportunities WHERE team_id = 933 order by updated_at desc;
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 933 and sa.provider = 'hubspot';
select crm.provider, l.* from leads l join crm_configurations crm on l.crm_configuration_id = crm.id
where crm.provider NOT IN ('salesforce', 'integration-app', 'bullhorn', 'copper')
# and l.converted_at IS NOT NULL
;
# [PASSWORD_DOTS]
SELECT * FROM activities a WHERE type IN ('email-inbound', 'email-outbound')
and opportunity_id IS NULL
order by id desc;
SELECT * FROM teams WHERE id = 604; # 598
SELECT * FROM activities WHERE id = 74410828; # [EMAIL]
SELECT * FROM accounts WHERE id = 20068382;
SELECT * FROM accounts WHERE id = 35186038;
SELECT * FROM contacts WHERE team_id = 852 and updated_at > '2026-01-23 12:30:00' order by updated_at desc;
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 559 and sa.provider = 'hubspot';
SELECT * FROM activities WHERE uuid_to_bin('cb6342b6-a183-401c-b0af-ede92b2ae763') = uuid;
select * from sidekick_settings where team_id = 781;
SELECT * FROM crm_configurations where provider = 'hubspot' and crm_provider_id = 26651871; # Teya
SELECT * FROM crm_configurations where provider = 'hubspot' and crm_provider_id = 7562435;
SELECT * FROM crm_configurations where provider = 'hubspot' and crm_provider_id = 8420347; # opflit 2100
SELECT * FROM crm_layouts WHERE crm_configuration_id = 711;
SELECT * FROM activities where crm_configuration_id = 711 and crm_provider_id IS NULL
and is_internal = 0 and status = 'completed'
order by id desc;
SELECT * FROM crm_layout_entities
WHERE crm_layout_id IN (2352, 2353);
;
SELECT * FROM crm_configurations where provider = 'hubspot' and id = 530;
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 556 and sa.provider = 'hubspot';
SELECT * FROM activities WHERE uuid_to_bin('c6ca4b22-7738-4563-a95d-b8a9598924ae') = uuid;
SELECT * FROM activities WHERE uuid_to_bin('442abb2b-28bd-4be8-9c25-19e9bf02766d') = uuid;
select * from contacts
where crm_configuration_id = 530
and crm_provider_id = 872252;
select * from activities where crm_configuration_id = 530
and user_id = 14343 and type like '%softphone%'
and created_at between '2026-01-28 15:00:00' and '2026-01-28 15:10:00';
SELECT * FROM crm_configurations where provider = 'hubspot' and crm_provider_id = 25666868; # Teya
SELECT * FROM crm_configurations where provider = 'hubspot' and crm_provider_id = 8646335; # Teya
SELECT * FROM crm_configurations where provider = 'hubspot' and crm_provider_id IN (5933397);
SELECT t.name, t.id, t.owner_id, c.id, c.provider, c.crm_base_url FROM teams t
JOIN crm_configurations c ON t.id = c.team_id
WHERE t.status = 'active';
SELECT * FROM teams where id = 1091;
SELECT * FROM crm_configurations where team_id = 1091;
SELECT * FROM activity_providers where team_id = 1091;
SELECT * FROM activities where crm_configuration_id = 1024 and type IN ('softphone', 'softphone-outbound')
and provider NOT IN ('hubspot', 'aircall')
# and telephony_provider_id = '019c1131-a22f-4792-b9ea-20adf6a02ed0'
order by id desc;
SELECT * FROM teams WHERE name LIKE '%Leadventure%';
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 1091 and sa.provider = 'salesforce';
SELECT * FROM teams WHERE name LIKE '%Wilson%'; # 862, 812
SELECT * FROM teams where id = 862;
SELECT * FROM crm_configurations where team_id = 862;
SELECT * FROM activity_providers where team_id = 862;
SELECT * FROM activities where crm_configuration_id = 812 and type IN ('softphone', 'softphone-outbound')
and provider NOT IN ('hubspot', 'aircall')
# and telephony_provider_id = '019c1131-a22f-4792-b9ea-20adf6a02ed0'
order by id desc;
SELECT t.id, crm.id, crm.provider, ap.* FROM teams t
join crm_configurations crm on t.id = crm.team_id
join activity_providers ap on t.id = ap.team_id
where t.status = 'active' and ap.is_enabled = 1
and crm.provider = 'hubspot'
and ap.provider NOT IN ('hubspot', 'aircall', 'uploader', 'gong', 'twilio', 'zoom-bot', 'google-meet', 'ms-teams',
'outreach', 'close', 'ringcentral', 'dialpad', 'zoom-phone');
SELECT * FROM teams where id = 1068;
SELECT * FROM crm_configurations where team_id = 1068;
SELECT * FROM activity_providers where team_id = 1068;
SELECT * FROM activities a
where crm_configuration_id = 993 and type IN ('softphone', 'softphone-outbound')
and a.provider NOT IN ('hubspot', 'uploader', 'gong', 'twilio', 'google-meet', 'ms-teams','close'
)
# and telephony_provider_id = '019c1131-a22f-4792-b9ea-20adf6a02ed0'
order by a.id desc;
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 1068 and sa.provider = 'hubspot';
# [PASSWORD_DOTS]
# [PASSWORD_DOTS]
# [PASSWORD_DOTS]
SELECT * FROM crm_configurations where id = 882; # 933 - GoGlobal , portalId: 6017093
SELECT * FROM opportunities WHERE team_id = 933 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;
SELECT * FROM opportunities WHERE team_id = 933 and updated_at > '2026-02-06 00:00:00' order by updated_at desc;
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 933 and sa.provider = 'hubspot';
# [PASSWORD_DOTS]
SELECT * FROM crm_configurations where id = 834; # 882 - AnyVan , portalId: 5468262
SELECT * FROM contacts WHERE crm_configuration_id = 834 and updated_at > '2026-03-30 00:00:00' order by updated_at desc;
SELECT * FROM opportunities WHERE crm_configuration_id = 834 and updated_at > '2026-03-04 08:00:00' order by updated_at desc;
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 882 and sa.provider = 'hubspot';
select * from crm_layouts where crm_configuration_id = 834;
select * from crm_layout_entities where crm_layout_id = 2780;
select * from crm_fields where id IN (321153,321192,321193,321194);
SELECT * FROM opportunities WHERE crm_configuration_id = 834 and id = 10993426;
# [PASSWORD_DOTS]
SELECT * FROM crm_configurations where id = 988; # 1057 - Teya (543ce4f4-168c-4571-91ea-5b35c253f06f) , portalId: 26651871
SELECT * FROM opportunities WHERE team_id = 1057 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;
SELECT * FROM opportunities WHERE team_id = 1057 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 1057 and sa.provider = 'hubspot';
SELECT * FROM crm_configurations where id = 533; # 559 - Connectd , portalId: 6710988
SELECT * FROM opportunities WHERE team_id = 559 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;
SELECT * FROM opportunities WHERE team_id = 559 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;
SELECT * FROM crm_configurations where id = 801; # 852 - Rise Vision , portalId: 2700250
SELECT * FROM opportunities WHERE team_id = 852 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;
SELECT * FROM opportunities WHERE team_id = 852 and updated_at > '2026-02-04 00:00:00' order by updated_at desc; # 6th last
SELECT * FROM crm_configurations where id = 962; # 1034 - evergrowth.io , portalId: 143180990
SELECT * FROM opportunities WHERE team_id = 1034 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;
SELECT * FROM opportunities WHERE team_id = 1034 and updated_at > '2026-02-04 00:00:00' order by updated_at desc;
# [PASSWORD_DOTS]
SELECT * FROM crm_configurations where id = 1037; # 1102 - Jibble , portalId: 6649755
SELECT * FROM opportunities WHERE team_id = 1102 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;
SELECT * FROM opportunities WHERE team_id = 1102 and updated_at > '2026-02-04 12:30:00' order by updated_at desc; # 8
SELECT * FROM crm_configurations where id = 1015; # 1049 - Travefy , portalId: 48904401
SELECT * FROM opportunities WHERE team_id = 1049 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;
SELECT * FROM opportunities WHERE team_id = 1049 and updated_at > '2026-02-04 12:30:00' order by updated_at desc; # 20
SELECT * FROM crm_configurations where id = 64; # 70 - SalaryFinance , portalId: 3404115
SELECT * FROM opportunities WHERE team_id = 70 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;
SELECT * FROM opportunities WHERE team_id = 70 and updated_at > '2026-02-04 12:30:00' order by updated_at desc; # 6th last
SELECT * FROM crm_configurations where id = 802; # 853 - Street Group , portalId: 7658438
SELECT * FROM opportunities WHERE team_id = 853 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;
SELECT * FROM opportunities WHERE team_id = 853 and updated_at > '2026-02-04 12:30:00' order by updated_at desc; # 10
SELECT * FROM crm_configurations where id = 872; # 921 - In Professional Development , portalId: 9238273
SELECT * FROM opportunities WHERE team_id = 921 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;
SELECT * FROM opportunities WHERE team_id = 921 and updated_at > '2026-02-04 12:30:00' order by updated_at desc; # 2
# [PASSWORD_DOTS]
SELECT * FROM crm_configurations where id = 550; # 576 - SeedLegals , portalId: 3028661
SELECT * FROM opportunities WHERE team_id = 576 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;
SELECT * FROM opportunities WHERE team_id = 576 and updated_at > '2026-02-05 14:00:00' order by updated_at desc;
SELECT * FROM crm_configurations where id = 989; # 1058 - rtaoutdoor.com , portalId: 22371204
SELECT * FROM opportunities WHERE team_id = 1058 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;
SELECT * FROM opportunities WHERE team_id = 1058 and updated_at > '2026-02-05 14:00:00' order by updated_at desc;
SELECT * FROM crm_configurations where id = 896; # 946 - Mintago , portalId: 6621281
SELECT * FROM opportunities WHERE team_id = 946 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;
SELECT * FROM opportunities WHERE team_id = 946 and updated_at > '2026-02-05 14:00:00' order by updated_at desc;
SELECT * FROM crm_configurations where id = 617; # 641 - PCS , portalId: 5244937
SELECT * FROM opportunities WHERE team_id = 641 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;
SELECT * FROM opportunities WHERE team_id = 641 and updated_at > '2026-02-05 14:00:00' order by updated_at desc; # 7th
# [PASSWORD_DOTS]
SELECT * FROM crm_configurations where id = 649; # 670 - Eventeny , portalId: 4492849
SELECT * FROM opportunities WHERE team_id = 670 and updated_at > '2026-02-18 00:00:00' order by updated_at desc;
SELECT * FROM opportunities WHERE team_id = 670 and updated_at > '2026-02-09 08:00:00' order by updated_at desc; #
SELECT * FROM crm_configurations where id = 48; # 51 - CleanCloud , portalId: 4373137
SELECT * FROM opportunities WHERE team_id = 51 and updated_at > '2026-03-04 00:00:00' order by updated_at desc;
SELECT * FROM opportunities WHERE team_id = 51 and updated_at > '2026-02-09 08:00:00' order by updated_at desc;
select * from users where team_id = 51; # 7783
SELECT * FROM groups WHERE uuid_to_bin('8a8d2cb6-8b55-4fa3-8b5c-5f0e3d8de59a') = uuid; # 1130
select * from activity_searches where user_id = 7783;
select * from activity_search_filters where activity_search_id IN (32291, 32292);
SELECT asf.activity_search_id, asf.id, asf.value
FROM activity_search_filters asf
WHERE asf.filter = 'group_id'
AND asf.value IN (
SELECT CONCAT(
HEX(SUBSTR(uuid, 5, 4)), '-',
HEX(SUBSTR(uuid, 3, 2)), '-',
HEX(SUBSTR(uuid, 1, 2)), '-',
HEX(SUBSTR(uuid, 9, 2)), '-',
HEX(SUBSTR(uuid, 11))
)
FROM groups
WHERE deleted_at IS NOT NULL
);
SELECT * FROM crm_configurations where id = 272; # 290 - Bonham & Brook , portalId: 5705856
SELECT * FROM opportunities WHERE team_id = 290 and updated_at > '2026-02-05 00:00:00' order by updated_at desc;
SELECT * FROM opportunities WHERE team_id = 290 and updated_at > '2026-02-09 08:00:00' order by updated_at desc; # 6th
# [PASSWORD_DOTS]
SELECT * FROM crm_configurations where provider = 'hubspot';
SELECT * FROM crm_configurations where id = 1056; # 1119 - Chromatic , portalId: 45602133
SELECT * FROM opportunities WHERE team_id = 1119 and remotely_created_at > '2026-02-01 00:00:00' order by updated_at desc;
SELECT * FROM opportunities WHERE team_id = 1119 and updated_at > '2026-02-09 09:00:00' order by updated_at desc; # null
# [PASSWORD_DOTS]
select * from contacts where crm_provider_id = '003Uu00000ojD4NIAU';
select
cp.*
# DISTINCT t.id
# cp.id, cp.user_id, t.id, cp.crm_configuration_id, cp.contact_fields
FROM crm_profiles cp
JOIN crm_configurations crm on crm.id = cp.crm_configuration_id
JOIN users u on u.id = cp.user_id
JOIN teams t ON t.id = crm.team_id
WHERE crm.provider = 'salesforce' and t.status = 'active'
and cp.archived_at IS NULL and u.deleted_at IS NULL
and t.id NOT IN (1093)
and t.id = 2
and cp.contact_fields IS NULL;
# and c.crm_provider_id = '003Uu00000ojD4NIAU';
SELECT * FROM users WHERE id = 26484;
SELECT * FROM crm_profiles WHERE user_id = 26484;
SELECT * FROM social_accounts WHERE sociable_id = 26484;
SELECT * FROM crm_configurations where provider = 'salesforce';
select * from users where id IN (10022, 10403);
select * from users where team_id IN (526);
select * from teams where id IN (526, 532);
select * from crm_configurations where id IN (500, 516);
select * from crm_profiles where crm_configuration_id IN (500, 516) and user_id IN (10022, 10403);
select * from contacts where crm_configuration_id IN (500, 516) and crm_provider_id = '003Uu00000ojD4NIAU';
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 526 and sa.provider = 'salesforce';
select * from team_settings where team_id IN (526, 532);
select * from users where id IN (22824);
select * from crm_profiles where crm_configuration_id IN (1026);
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 1093 and sa.provider = 'salesforce';
select * from teams where id = 1099;
select * from users where id = 29643
select * from activity_processing_states;
SELECT * FROM teams where name LIKE '%Fare%'; # 233
SELECT * FROM opportunities where crm_configuration_id = 215
# and crm_provider_id = 'oppo_ogESZf2P50nDrd1nGPvKDXeA6sSaTN5v51Lp4ayVzKR'
;
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 1088 and sa.provider = 'hubspot';
SELECT * FROM teams order by updated_at DESC
SELECT * FROM crm_configurations WHERE id = 1019; # SimpleConsign 1088 - no social account
select * from crm_configurations where provider = 'pipedrive';
select * from teams where id = 957;
select * from crm_configurations where id = 957;
SELECT * FROM teams WHERE name LIKE '%Prolific%'; # 544, 518, 10743
SELECT * FROM opportunities where crm_configuration_id = 518 order by id desc;
select * from users where team_id = 1; # 26726 - Gabriela Dureva
SELECT * FROM opportunities where user_id = 26726; # 16834447 - Prolific
select * from activities where user_id = 26726 order by id desc;
select * from contacts where crm_configuration_id = 1
and email IN ('[EMAIL]', '[EMAIL]'); # 2094416, 2093620
SELECT * FROM contacts WHERE id = 6284931;
SELECT p.* FROM activities a JOIN participants p ON a.id = p.activity_id
WHERE a.user_id = 26726 and p.lead_id IN (2094416, 2093620) and a.created_at > '2026-01-01 00:00:00' order by p.email;
select * from activities where id IN (75509259,75509261,75509261,75511034,75026464,75517602,75517605);
select * from crm_configurations where id = 1;
43801692-1aeb-32ce-acba-5b80a479701a
44c3c9cf-6f5e-75f3-8179-bc9f75dd2b1b
405975c0-b3d0-7aaa-821f-09d59cae6dd1
4caf848d-4bed-2299-b248-7788d41f9fca
49bedc3f-f196-eef3-89c3-dea6a3b4aa63
43420989-a09d-b8f8-9806-c8bbf7a02aac
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 1 and sa.provider = 'salesforce';
SELECT * FROM activities WHERE id = 75461988;
SELECT * FROM activities WHERE uuid_to_bin('d6c5052e-e972-49e9-8912-26f2f7d6c5f6') = uuid;
select * from contacts where id = 17900517;
select * from contact_roles cr join crm_configurations crm on cr.crm_configuration_id = crm.id
where crm.provider != 'salesforce';
select * from users where id = 21047;
SELECT * FROM crm_configurations WHERE id = 892;
SELECT * FROM teams WHERE id = 942;
select * from opportunities where team_id = 942 order by updated_at desc;
select * from contacts where team_id = 942 order by updated_at desc;
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 942 and sa.provider = 'hubspot';
SELECT * FROM opportunities where team_id = 1 and crm_provider_id IN ('006Pq00000NeH6XIAV', '006Pq000007z8kdIAA'); # 10697889, 6621430
SELECT * FROM crm_configurations WHERE id = 1;
SELECT * FROM teams WHERE crm_id = 1;
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 1 and sa.provider = 'salesforce';
select id, user_id, opportunity_fields from crm_profiles where crm_configuration_id = 1
SELECT * FROM opportunities where team_id = 1 order by updated_at desc; # 10697889, 6621430
select * from teams where id = 852;
select * from groups where id = 2286;
select * from sidekick_settings where team_id = 852;
select * from default_activity_types where team_id = 852;
SELECT cc.provider, cc.id, p.id, u.*
FROM users u
LEFT JOIN crm_profiles p ON u.id = p.user_id AND p.id IS NULL -- no profile
INNER JOIN teams t ON u.team_id = t.id AND t.status = 'active' -- team is active
INNER JOIN crm_configurations cc ON t.crm_id = cc.id
WHERE u.status = 1 AND u.deleted_at IS NULL
AND u.crm_required = 1
AND u.team_id = 1
ORDER BY u.team_id;
SELECT * FROM crm_profiles cp where cp.crm_configuration_id = 1 and cp.user_id IN (
18481
);
SELECT cc.provider, cc.id, p.id, u.*
FROM users u
LEFT JOIN crm_profiles p ON u.id = p.user_id
INNER JOIN teams t ON u.team_id = t.id AND t.status = 'active'
INNER JOIN crm_configurations cc ON t.crm_id = cc.id
WHERE u.status = 1
AND u.deleted_at IS NULL
AND u.crm_required = 1
# AND u.team_id = 1
AND p.id IS NULL -- Move this condition to WHERE clause
ORDER BY u.team_id;
SELECT * FROM opportunities WHERE id = 20002609;
select * from teams where id = 1122; # Velatir, 29953 - [EMAIL]
select * from crm_configurations where id = 1060;
select * from crm_layouts where crm_configuration_id = 1060;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 3596;
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 1122 and sa.provider = 'hubspot';
select * from opportunities where team_id = 1122 order by updated_at desc;
select * from crm_field_data where object_type = 'contact';
SELECT * FROM activities WHERE uuid_to_bin('374fc8ed-3315-4c9f-9b25-318b7fd2928f') = uuid; # 76584262
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 248 and sa.provider = 'salesforce';
SELECT * FROM crm_profiles where user_id = 24115; # 005QF000002CswMYAS
SELECT * FROM users where id = 24115;
SELECT * FROM accounts where id = 4002896;
SELECT * FROM teams WHERE name LIKE '%adswerve%';
SELECT * FROM opportunities where crm_configuration_id = 230 AND crm_provider_id IN ("0069N000003GIQ9QAO","0061r000019yGP9AAM","0066900001S2KWlAAN","0066900001TDpj2AAD","0066900001b8uEwAAI","0069N000001rQi0QAE","006QF00000KD40mYAD","006QF00000LzpRJYAZ","0069N000002uomtQAA","0069N000002xlMLQAY","0066900001NV6ubAAD","0061r00001HJp45AAD","006QF00000uTlUoYAK","006QF00000v0bZqYAI");
SELECT * FROM opportunities WHERE crm_configuration_id = 230 AND crm_provider_id = '0069N000003GIQ9QAO'; # 6272203
SELECT u.id, u.email, ac.name, a.* FROM activities a
JOIN users u ON a.user_id = u.id
JOIN accounts ac ON a.account_id = ac.id
WHERE
uuid_to_bin('e3269598-b562-44fb-b5e9-9d2694dc63e0') = a.uuid or
uuid_to_bin('66ddc3ab-4e15-45aa-af0c-248c1eece593') = a.uuid or
uuid_to_bin('826bd328-e1cc-4213-b8d8-572454cacc07') = a.uuid;
select * from users where id = 5825;
SELECT * FROM activities WHERE uuid_to_bin('e56aa2e8-231a-421b-ab1f-cb38ed2bf573') = uuid;
select * from activities where uuid_to_bin('91e13b2f-2d1b-45f8-b1fd-1141b6563782') = uuid;
19594, 862
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 862 and sa.provider = 'salesforce';
select * from automated_reports where id = 36;
select ar.frequency, r.*, ar.* from automated_report_results r
join automated_reports ar on r.report_id = ar.id
where ar.frequency != 'one_off';
select s.* from activity_searches s join users u ON s.user_id = u.id where u.team_id = 882;
select * from nudges n where n.activity_search_id
select * from teams where created_at > '2026-03-09';
SELECT * FROM crm_layouts WHERE crm_configuration_id = 1065; # 1065
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 3617;
select * from users where team_id = 1 and name like '%Lukas%'; # 7160
SELECT * FROM teams WHERE id = 575;
select * from opportunities where team_id = 575;
SELECT * FROM teams WHERE name LIKE '%Integrum ESG%'; # 1126, 1065,
select * from opportunities where team_id = 1126;
SELECT * FROM teams WHERE name LIKE '%Base%'; # 1125, 1063,
select * from opportunities where team_id = 1125;
select * from contacts c
where c.team_id = 882;
SELECT * FROM activities WHERE id = 76822967;
SELECT * FROM crm_profiles WHERE user_id = 15440;
SELECT * FROM crm_profil...
|
NULL
|
|
77825
|
1965
|
7
|
2026-04-24T10:39:11.461388+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-24/1777 /Users/lukas/.screenpipe/data/data/2026-04-24/1777027151461_m1.jpg...
|
PhpStorm
|
faVsco.js – ReportNotGenerated.php
|
True
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Pushed 1 commit to origin/JY-20157-AJ-report-not-s Pushed 1 commit to origin/JY-20157-AJ-report-not-send-notification
text/html
text/html
text/html
View pull request
5 files committed
JY-20157 code review suggestions
text/html
text/html
text/html
Edit Commit Message…
Project: faVsco.js, menu
#12011 on JY-20157-AJ-report-not-send-notification, menu
Start Listening for PHP Debug Connections
ReportControllerTest
Run 'ReportControllerTest'
Debug 'ReportControllerTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Mail\Reports;
use Jiminny\Mail\Mailable;
class ReportNotGenerated extends Mailable
{
public function __construct(
private readonly string $reportName,
private readonly string $periodName,
private readonly string $reportsPageUrl,
private readonly string $mailSubject,
) {
}
public function build(): Mailable
{
$logoCDN = config('logos.cdn.header');
$fullLogoCDN = config('logos.cdn.footer');
$fromAddress = config('mail.from.address');
if (config('jiminny.deploy_region') === 'eu') {
$fromAddress = '[EMAIL]';
}
return $this
->from($fromAddress, config('mail.from.name'))
->view('emails.reports.report-not-generated', [
'reportName' => $this->reportName,
'periodName' => $this->periodName,
'reportsPageUrl' => $this->reportsPageUrl,
'isReport' => true,
'headerLogoCdn' => $logoCDN,
'footerLogoCdn' => $fullLogoCDN,
])
->subject($this->mailSubject);
}
}...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Pushed 1 commit to origin/JY-20157-AJ-report-not-send-notification","depth":3,"value":"Pushed 1 commit to origin/JY-20157-AJ-report-not-send-notification","help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"View pull request","depth":2,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"5 files committed","depth":2,"role_description":"text"},{"role":"AXTextField","text":"JY-20157 code review suggestions","depth":3,"value":"JY-20157 code review suggestions","help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextField","text":"text/html","depth":4,"help_text":"text/html","role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"Edit Commit Message…","depth":2,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#12011 on JY-20157-AJ-report-not-send-notification, menu","depth":5,"help_text":"Pull request #12011 exists for current branch JY-20157-AJ-report-not-send-notification","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"ReportControllerTest","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'ReportControllerTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'ReportControllerTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Mail\\Reports;\n\nuse Jiminny\\Mail\\Mailable;\n\nclass ReportNotGenerated extends Mailable\n{\n public function __construct(\n private readonly string $reportName,\n private readonly string $periodName,\n private readonly string $reportsPageUrl,\n private readonly string $mailSubject,\n ) {\n }\n\n public function build(): Mailable\n {\n $logoCDN = config('logos.cdn.header');\n $fullLogoCDN = config('logos.cdn.footer');\n\n $fromAddress = config('mail.from.address');\n if (config('jiminny.deploy_region') === 'eu') {\n $fromAddress = 'no-reply@jiminny.com';\n }\n\n return $this\n ->from($fromAddress, config('mail.from.name'))\n ->view('emails.reports.report-not-generated', [\n 'reportName' => $this->reportName,\n 'periodName' => $this->periodName,\n 'reportsPageUrl' => $this->reportsPageUrl,\n 'isReport' => true,\n 'headerLogoCdn' => $logoCDN,\n 'footerLogoCdn' => $fullLogoCDN,\n ])\n ->subject($this->mailSubject);\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Mail\\Reports;\n\nuse Jiminny\\Mail\\Mailable;\n\nclass ReportNotGenerated extends Mailable\n{\n public function __construct(\n private readonly string $reportName,\n private readonly string $periodName,\n private readonly string $reportsPageUrl,\n private readonly string $mailSubject,\n ) {\n }\n\n public function build(): Mailable\n {\n $logoCDN = config('logos.cdn.header');\n $fullLogoCDN = config('logos.cdn.footer');\n\n $fromAddress = config('mail.from.address');\n if (config('jiminny.deploy_region') === 'eu') {\n $fromAddress = 'no-reply@jiminny.com';\n }\n\n return $this\n ->from($fromAddress, config('mail.from.name'))\n ->view('emails.reports.report-not-generated', [\n 'reportName' => $this->reportName,\n 'periodName' => $this->periodName,\n 'reportsPageUrl' => $this->reportsPageUrl,\n 'isReport' => true,\n 'headerLogoCdn' => $logoCDN,\n 'footerLogoCdn' => $fullLogoCDN,\n ])\n ->subject($this->mailSubject);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-3354374801044793260
|
-655443479857247262
|
app_switch
|
accessibility
|
NULL
|
Pushed 1 commit to origin/JY-20157-AJ-report-not-s Pushed 1 commit to origin/JY-20157-AJ-report-not-send-notification
text/html
text/html
text/html
View pull request
5 files committed
JY-20157 code review suggestions
text/html
text/html
text/html
Edit Commit Message…
Project: faVsco.js, menu
#12011 on JY-20157-AJ-report-not-send-notification, menu
Start Listening for PHP Debug Connections
ReportControllerTest
Run 'ReportControllerTest'
Debug 'ReportControllerTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Mail\Reports;
use Jiminny\Mail\Mailable;
class ReportNotGenerated extends Mailable
{
public function __construct(
private readonly string $reportName,
private readonly string $periodName,
private readonly string $reportsPageUrl,
private readonly string $mailSubject,
) {
}
public function build(): Mailable
{
$logoCDN = config('logos.cdn.header');
$fullLogoCDN = config('logos.cdn.footer');
$fromAddress = config('mail.from.address');
if (config('jiminny.deploy_region') === 'eu') {
$fromAddress = '[EMAIL]';
}
return $this
->from($fromAddress, config('mail.from.name'))
->view('emails.reports.report-not-generated', [
'reportName' => $this->reportName,
'periodName' => $this->periodName,
'reportsPageUrl' => $this->reportsPageUrl,
'isReport' => true,
'headerLogoCdn' => $logoCDN,
'footerLogoCdn' => $fullLogoCDN,
])
->subject($this->mailSubject);
}
}...
|
NULL
|